diff --git a/pandora_console/extras/mr/65.sql b/pandora_console/extras/mr/65.sql index 3cc6d1016e..d4c7cef5b7 100644 --- a/pandora_console/extras/mr/65.sql +++ b/pandora_console/extras/mr/65.sql @@ -114,6 +114,82 @@ SELECT * FROM ( ALTER TABLE tevento DROP COLUMN user_comment; +-- Insert new VMware APP +SET @short_name = 'pandorafms.vmware'; +SET @name = 'VMware'; +SET @section = 'app'; +SET @description = 'Monitor ESXi hosts, datastores and VMs from a specific datacenter'; +SET @version = '1.0'; +INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version); +SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name; + +-- Insert into tdiscovery_apps_scripts +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec1_', 'bin/pandora_vmware'); +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec2_', 'bin/vmware_instances'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' '_tempfileVMware_' --as_discovery_plugin 1'); + +-- Insert new MySQL APP +SET @short_name = 'pandorafms.mysql'; +SET @name = 'MySQL'; +SET @section = 'app'; +SET @description = 'Monitor MySQL databases'; +SET @version = '1.0'; +INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version); +SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name; + +-- Insert into tdiscovery_apps_scripts +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec1_', 'bin/pandora_mysql'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileConf_' --target_databases '_tempfileTargetDatabases_' --target_agents '_tempfileTargetAgents_' --custom_queries '_tempfileCustomQueries_''); + +-- Insert new MSSQL APP +SET @short_name = 'pandorafms.mssql'; +SET @name = 'Microsoft SQL Server'; +SET @section = 'app'; +SET @description = 'Monitor Microsoft SQL Server databases'; +SET @version = '1.0'; +INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version); +SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name; + +-- Insert into tdiscovery_apps_scripts +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec1_', 'bin/pandora_mssql'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileConf_' --target_databases '_tempfileTargetDatabases_' --target_agents '_tempfileTargetAgents_' --custom_queries '_tempfileCustomQueries_''); + +-- Insert new Oracle APP +SET @short_name = 'pandorafms.oracle'; +SET @name = 'Oracle'; +SET @section = 'app'; +SET @description = 'Monitor Oracle databases'; +SET @version = '1.0'; +INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version); +SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name; + +-- Insert into tdiscovery_apps_scripts +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec1_', 'bin/pandora_oracle'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileConf_' --target_databases '_tempfileTargetDatabases_' --target_agents '_tempfileTargetAgents_' --custom_queries '_tempfileCustomQueries_''); + +-- Insert new DB2 APP +SET @short_name = 'pandorafms.db2'; +SET @name = 'DB2'; +SET @section = 'app'; +SET @description = 'Monitor DB2 databases'; +SET @version = '1.0'; +INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version); +SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name; + +-- Insert into tdiscovery_apps_scripts +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec1_', 'bin/pandora_db2'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileConf_' --target_databases '_tempfileTargetDatabases_' --target_agents '_tempfileTargetAgents_' --custom_queries '_tempfileCustomQueries_''); + ALTER TABLE `tusuario` ADD COLUMN `session_max_time_expire` INT NOT NULL DEFAULT 0 AFTER `auth_token_secret`; CREATE TABLE IF NOT EXISTS `tsca` ( diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 3f8ade2b1a..5090a8baa1 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -82,12 +82,12 @@ if ((bool) check_acl($config['id_user'], 0, 'AR') === true // Applications. $sub2 = []; if (enterprise_installed() === true) { - $sub2['godmode/servers/discovery&wiz=app&mode=MicrosoftSQLServer']['text'] = __('Microsoft SQL Server'); - $sub2['godmode/servers/discovery&wiz=app&mode=mysql']['text'] = __('Mysql'); - $sub2['godmode/servers/discovery&wiz=app&mode=oracle']['text'] = __('Oracle'); - $sub2['godmode/servers/discovery&wiz=app&mode=vmware']['text'] = __('VMware'); - $sub2['godmode/servers/discovery&wiz=app&mode=SAP']['text'] = __('SAP'); - $sub2['godmode/servers/discovery&wiz=app&mode=DB2']['text'] = __('DB2'); + $sub2['godmode/servers/discovery&wiz=app&mode=MicrosoftSQLServer']['text'] = __('Microsoft SQL Server (legacy)'); + $sub2['godmode/servers/discovery&wiz=app&mode=mysql']['text'] = __('Mysql (legacy)'); + $sub2['godmode/servers/discovery&wiz=app&mode=oracle']['text'] = __('Oracle (legacy)'); + $sub2['godmode/servers/discovery&wiz=app&mode=vmware']['text'] = __('VMware (legacy)'); + $sub2['godmode/servers/discovery&wiz=app&mode=SAP']['text'] = __('SAP (legacy)'); + $sub2['godmode/servers/discovery&wiz=app&mode=DB2']['text'] = __('DB2 (legacy)'); } $extensions = ManageExtensions::getExtensionBySection('app'); @@ -112,9 +112,9 @@ if ((bool) check_acl($config['id_user'], 0, 'AR') === true // Cloud. $sub2 = []; if (enterprise_installed() === true) { - $sub2['godmode/servers/discovery&wiz=cloud&mode=amazonws']['text'] = __('Amazon Web Services'); - $sub2['godmode/servers/discovery&wiz=cloud&mode=azure']['text'] = __('Microsoft Azure'); - $sub2['godmode/servers/discovery&wiz=cloud&mode=gcp']['text'] = __('Google Compute Platform'); + $sub2['godmode/servers/discovery&wiz=cloud&mode=amazonws']['text'] = __('Amazon Web Services (legacy)'); + $sub2['godmode/servers/discovery&wiz=cloud&mode=azure']['text'] = __('Microsoft Azure (legacy)'); + $sub2['godmode/servers/discovery&wiz=cloud&mode=gcp']['text'] = __('Google Compute Platform (legacy)'); } diff --git a/pandora_console/godmode/wizards/Applications.class.php b/pandora_console/godmode/wizards/Applications.class.php index 2237fdbe73..107550c261 100644 --- a/pandora_console/godmode/wizards/Applications.class.php +++ b/pandora_console/godmode/wizards/Applications.class.php @@ -67,6 +67,9 @@ class Applications extends Wizard 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=app' ); + // Print Warning Message. + $this->printWarningMessage(); + return $this; } diff --git a/pandora_console/godmode/wizards/Cloud.class.php b/pandora_console/godmode/wizards/Cloud.class.php index 4664b1a566..4c5074cd3c 100644 --- a/pandora_console/godmode/wizards/Cloud.class.php +++ b/pandora_console/godmode/wizards/Cloud.class.php @@ -220,6 +220,9 @@ class Cloud extends Wizard echo '
*'.__('All company names used here are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.').'
'; } + // Print Warning Message. + $this->printWarningMessage(); + return $result; } diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index 1c7ffe5526..36a21ecf71 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -32,6 +32,8 @@ require_once $config['homedir'].'/include/class/HTML.class.php'; require_once $config['homedir'].'/include/functions_users.php'; require_once $config['homedir'].'/include/functions_reports.php'; require_once $config['homedir'].'/include/functions_cron.php'; +require_once $config['homedir'].'/godmode/wizards/Wizard.main.php'; + enterprise_include_once('include/functions_tasklist.php'); enterprise_include_once('include/functions_cron.php'); @@ -214,6 +216,10 @@ class DiscoveryTaskList extends HTML html_print_action_buttons($this->printForm($form, true)); } + // Warning Message. + $wizar_main = new Wizard(); + $wizar_main->printWarningMessage(); + return $ret; } @@ -776,7 +782,7 @@ class DiscoveryTaskList extends HTML 'class' => 'main_menu_icon invert_filter', ] ).'  '; - $data[6] .= __('Cloud.Azure.Compute'); + $data[6] .= __('Cloud.Azure.Compute (legacy)'); break; case DISCOVERY_CLOUD_AWS_EC2: @@ -789,7 +795,7 @@ class DiscoveryTaskList extends HTML 'class' => 'main_menu_icon invert_filter', ] ).'  '; - $data[6] .= __('Cloud.AWS.EC2'); + $data[6] .= __('Cloud.AWS.EC2 (legacy)'); break; case DISCOVERY_CLOUD_AWS_RDS: @@ -802,7 +808,7 @@ class DiscoveryTaskList extends HTML 'class' => 'main_menu_icon invert_filter', ] ).'  '; - $data[6] .= __('Discovery.Cloud.Aws.RDS'); + $data[6] .= __('Discovery.Cloud.Aws.RDS (legacy)'); break; case DISCOVERY_CLOUD_AWS_S3: @@ -815,7 +821,7 @@ class DiscoveryTaskList extends HTML 'class' => 'main_menu_icon invert_filter', ] ).'  '; - $data[6] .= __('Discovery.Cloud.Aws.S3'); + $data[6] .= __('Discovery.Cloud.Aws.S3 (legacy)'); break; case DISCOVERY_APP_MYSQL: @@ -828,7 +834,7 @@ class DiscoveryTaskList extends HTML 'class' => 'main_menu_icon invert_filter', ] ).'  '; - $data[6] .= __('Discovery.App.MySQL'); + $data[6] .= __('Discovery.App.MySQL (legacy)'); break; case DISCOVERY_APP_ORACLE: @@ -841,7 +847,7 @@ class DiscoveryTaskList extends HTML 'class' => 'main_menu_icon invert_filter', ] ).'  '; - $data[6] .= __('Discovery.App.Oracle'); + $data[6] .= __('Discovery.App.Oracle (legacy)'); break; case DISCOVERY_APP_DB2: @@ -854,7 +860,7 @@ class DiscoveryTaskList extends HTML 'class' => 'main_menu_icon invert_filter', ] ).'  '; - $data[6] .= __('Discovery.App.DB2'); + $data[6] .= __('Discovery.App.DB2 (legacy)'); break; case DISCOVERY_DEPLOY_AGENTS: @@ -865,7 +871,7 @@ class DiscoveryTaskList extends HTML true, ['title' => __('Agent deployment')] ).'  '; - $data[6] .= __('Discovery.Agent.Deployment'); + $data[6] .= __('Discovery.Agent.Deployment (legacy)'); break; case DISCOVERY_APP_MICROSOFT_SQL_SERVER: @@ -878,7 +884,7 @@ class DiscoveryTaskList extends HTML 'class' => 'main_menu_icon invert_filter', ] ).'  '; - $data[6] .= __('Discovery.App.Microsoft SQL Server'); + $data[6] .= __('Discovery.App.Microsoft SQL Server (legacy)'); break; case DISCOVERY_EXTENSION: @@ -906,7 +912,7 @@ class DiscoveryTaskList extends HTML 'class' => 'main_menu_icon invert_filter', ] ).'  '; - $data[6] .= __('Discovery.NetScan'); + $data[6] .= __('Discovery.NetScan (legacy)'); } else { // APP or external script recon task. $data[6] = html_print_image( @@ -914,7 +920,7 @@ class DiscoveryTaskList extends HTML true, ['class' => 'main_menu_icon invert_filter'] ).'  '; - $data[6] .= $recon_script_name; + $data[6] .= $recon_script_name.' (legacy)'; } break; } @@ -2022,4 +2028,28 @@ class DiscoveryTaskList extends HTML } + /* + * Generates warning message. + * + * @return void Warning message. + + public function getWarningMessage() + { + return ui_print_warning_message( + __( + 'Starting with version 773, the new modular system of discovery 2.0 has been implemented. The current + discovery (1.0) and its defined tasks will continue to function normally until the next LTS version, + in which migration to the new system will be mandatory. + The tasks of the current discovery (1.0) will be marked as legacy although it will not affect their + operation, it will only be a visual indicator to identify and differentiate the tasks of discovery 1.0 + from those of the new version 2.0. + In the intermediate versions between the 773 and the next LTS version, more applications of the new + discovery 2.0 will be added. Both new and those that will come to replace the applications of the + current discovery 1.0. In addition, an automatic migration tool for legacy (1.0) tasks to the new 2.0 + model will be included.' + ) + ); + }*/ + + } diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index 39c81569c4..a286b97fca 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -522,4 +522,28 @@ class Wizard } + /** + * Generates warning message. + * + * @return void Warning message. + */ + public function printWarningMessage() + { + return ui_print_warning_message( + __( + 'Starting with version 773, the new modular system of discovery 2.0 has been implemented. The current + discovery (1.0) and its defined tasks will continue to function normally until the next LTS version, + in which migration to the new system will be mandatory. + The tasks of the current discovery (1.0) will be marked as legacy although it will not affect their + operation, it will only be a visual indicator to identify and differentiate the tasks of discovery 1.0 + from those of the new version 2.0. + In the intermediate versions between the 773 and the next LTS version, more applications of the new + discovery 2.0 will be added. Both new and those that will come to replace the applications of the + current discovery 1.0. In addition, an automatic migration tool for legacy (1.0) tasks to the new 2.0 + model will be included.' + ) + ); + } + + } diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 6d4fcd2a56..77da370ec0 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -2637,6 +2637,81 @@ INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable` SELECT @last_id := LAST_INSERT_ID(); INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'zoom_en_graficas.png','images/tips/'); +-- Insert new VMware APP +SET @short_name = 'pandorafms.vmware'; +SET @name = 'VMware'; +SET @section = 'app'; +SET @description = 'Monitor ESXi hosts, datastores and VMs from a specific datacenter'; +SET @version = '1.0'; +INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version); +SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name; + +-- Insert into tdiscovery_apps_scripts +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec1_', 'bin/pandora_vmware'); +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec2_', 'bin/vmware_instances'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' '_tempfileVMware_' --as_discovery_plugin 1'); + +-- Insert new MySQL APP +SET @short_name = 'pandorafms.mysql'; +SET @name = 'MySQL'; +SET @section = 'app'; +SET @description = 'Monitor MySQL databases'; +SET @version = '1.0'; +INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version); +SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name; + +-- Insert into tdiscovery_apps_scripts +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec1_', 'bin/pandora_mysql'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileConf_' --target_databases '_tempfileTargetDatabases_' --target_agents '_tempfileTargetAgents_' --custom_queries '_tempfileCustomQueries_''); + +-- Insert new MSSQL APP +SET @short_name = 'pandorafms.mssql'; +SET @name = 'Microsoft SQL Server'; +SET @section = 'app'; +SET @description = 'Monitor Microsoft SQL Server databases'; +SET @version = '1.0'; +INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version); +SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name; + +-- Insert into tdiscovery_apps_scripts +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec1_', 'bin/pandora_mssql'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileConf_' --target_databases '_tempfileTargetDatabases_' --target_agents '_tempfileTargetAgents_' --custom_queries '_tempfileCustomQueries_''); + +-- Insert new Oracle APP +SET @short_name = 'pandorafms.oracle'; +SET @name = 'Oracle'; +SET @section = 'app'; +SET @description = 'Monitor Oracle databases'; +SET @version = '1.0'; +INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version); +SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name; + +-- Insert into tdiscovery_apps_scripts +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec1_', 'bin/pandora_oracle'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileConf_' --target_databases '_tempfileTargetDatabases_' --target_agents '_tempfileTargetAgents_' --custom_queries '_tempfileCustomQueries_''); + +-- Insert new DB2 APP +SET @short_name = 'pandorafms.db2'; +SET @name = 'DB2'; +SET @section = 'app'; +SET @description = 'Monitor DB2 databases'; +SET @version = '1.0'; +INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version); +SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name; + +-- Insert into tdiscovery_apps_scripts +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec1_', 'bin/pandora_db2'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileConf_' --target_databases '_tempfileTargetDatabases_' --target_agents '_tempfileTargetAgents_' --custom_queries '_tempfileCustomQueries_''); INSERT INTO `tsca` VALUES (1000,'Create Separate Partition for /tmp','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.','','Configure /etc/fstab as appropriate or Run the following commands to enable systemd /tmp mounting: systemctl umask tmp.mount; systemctl enable tmp.mount. Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to configure the /tmp mount.','[{\"cis\": [\"2.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(1001,'Set nodev option for /tmp Partition','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.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options). See the fstab(5) manual page for more information. # mount -o remount,nodev /tmp','[{\"cis\": [\"2.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1002,'Set nosuid option for /tmp Partition','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.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options). See the fstab(5) manual page for more information. # mount -o remount,nosuid /tmp','[{\"cis\": [\"2.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1003,'Set noexec option for /tmp partition','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.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options). See the fstab(5) manual page for more information. # mount -o remount,noexec /tmp','[{\"cis\": [\"2.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1004,'Create Separate Partition for /var','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.','','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.','[{\"cis\": [\"2.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1005,'Bind mount the /var/tmp directory to /tmp','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 manner /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 write to 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.','','# mount --bind /tmp /var/tmp and edit the /etc/fstab file to contain the following line: /tmp /var/tmp none bind 0 0','[{\"cis\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1006,'Create Separate Partition for /var/log','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.','','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.','[{\"cis\": [\"2.7\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1007,'Create Separate Partition for /var/log/audit','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.','','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.','[{\"cis\": [\"2.8\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1008,'Create Separate Partition for /home','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.','','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.','[{\"cis\": [\"2.9\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1009,'Add nodev Option to /home','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.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options). See the fstab(5) manual page for more information. # mount -o remount,nodev /home','[{\"cis\": [\"2.10\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1010,'Add nodev Option to /run/shm Partition','The nodev mount option specifies that the /run/shm (temporary filesystem stored in memory) cannot contain block or character special devices.','Since the /run/shm filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create special devices in /run/shm partitions.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options of entries that have mount points that contain /run/shm. See the fstab(5) manual page for more information. # mount -o remount,nodev /run/shm','[{\"cis\": [\"2.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1011,'Add nosuid Option to /run/shm Partition','The nosuid mount option specifies that the /run/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.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options). Look for entries that have mount points that contain /run/shm. See the fstab(5) manual page for more information. # mount -o remount,nosuid /run/shm','[{\"cis\": [\"2.15\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1012,'Add noexec Option to /run/shm Partition','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.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options). Look for entries that have mount points that contain /run/shm. See the fstab(5) manual page for more information. # mount -o remount,noexec /run/shm','[{\"cis\": [\"2.16\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1013,'Disable Mounting of cramfs Filesystems','The cramfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems. A cramfs image can be used without having to first decompress the image.','Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install cramfs /bin/true','[{\"cis\": [\"2.18\"]}, {\"pci_dss\": [\"2.2.5\"]}]'),(1014,'Disable Mounting of freevxfs Filesystems','The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the primary filesystem type for HP-UX operating systems.','Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install freevxfs /bin/true','[{\"cis\": [\"2.19\"]}, {\"pci_dss\": [\"2.2.5\"]}]'),(1015,'Disable Mounting of jffs2 Filesystems','The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices.','Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install jffs2 /bin/true','[{\"cis\": [\"2.20\"]}, {\"pci_dss\": [\"2.2.5\"]}]'),(1016,'Disable Mounting of hfs Filesystems','The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS filesystems.','Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfs /bin/true','[{\"cis\": [\"2.21\"]}, {\"pci_dss\": [\"2.2.5\"]}]'),(1017,'Disable Mounting of hfsplus Filesystems','The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems.','Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfsplus /bin/true','[{\"cis\": [\"2.22\"]}, {\"pci_dss\": [\"2.2.5\"]}]'),(1018,'Disable Mounting of squashfs Filesystems','The squashfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems (similar to cramfs). A squashfs image can be used without having to first decompress the image.','Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install squashfs /bin/true','[{\"cis\": [\"2.23\"]}, {\"pci_dss\": [\"2.2.5\"]}]'),(1019,'Disable Mounting of udf Filesystems','The udf filesystem type is the universal disk format used to implement ISO/IEC 13346 and ECMA-167 specifications. This is an open vendor filesystem type for data storage on a broad range of media. This filesystem type is necessary to support writing DVDs and newer optical disc formats','Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install udf /bin/true','[{\"cis\": [\"2.24\"]}, {\"pci_dss\": [\"2.2.5\"]}]'),(1020,'Disable Automounting','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.','','Disable autofs: # update-rc.d autofs disable','[{\"cis\": [\"2.25\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1021,'Set User/Group Owner on bootloader config','Set the owner and group of your boot loaders config file to the root user. These instructions default to GRUB stored at /boot/grub/grub.cfg .','Setting the owner and group to root prevents non-root users from changing the file.','','Run the following to change ownership of /boot/grub/grub.cfg : # chown root:root /boot/grub/grub.cfg','[{\"cis\": [\"3.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1022,'Set Permissions on bootloader config','Set permission on the your boot loaders config 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.','','Run the following to set the permissions fro /boot/grub/grub.cfg : # chmod og-rwx /boot/grub/grub.cfg','[{\"cis\": [\"3.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1023,'Set Boot Loader Password','Setting the boot loader password will require that anyone rebooting the system must enter a password before being able to set command line boot parameters','Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off SELinux at boot time).','','Create an encrypted password with grub-md5-crypt: # grub-mkpasswd-pbkdf2 Enter password: <password> Reenter password: <password> Your PBKDF2 is <encrypted-password> Add the following into /etc/grub.d/00_header or a custom /etc/grub.d configuration file: cat <<EOF set superusers="<user-list>" password_pbkdf2 <user> <encrypted-password> EOF Unless the --unrestricted option is added to CLASS in /etc/grub.d/10_linux a password will be required to boot in addition to editing boot parameters: CLASS="--class gnu-linux --class gnu --class os --unrestricted" Run the following to update the grub configuration: # update-grub','[{\"cis\": [\"3.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1024,'Require authentication for Single-User mode','Setting a password for the root user will force authentication in single user mode.','Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials.','','Run the following command and follow the prompts to set a password for the root user: # passwd root','[{\"cis\": [\"3.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1025,'Restrict Core Dumps','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.','','Add the following line to the /etc/security/limits.conf file. * hard core 0 Add the following line to the /etc/sysctl.conf file. fs.suid_dumpable = 0','[{\"cis\": [\"4.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1026,'Enable XD/NX Support on 32-bit x86 Systems','Recent processors in the x86 family support the ability to prevent code execution on a per memory page basis. Generically and on AMD processors, this ability is called No Execute (NX), while on Intel processors it is called Execute Disable (XD). This ability can help prevent exploitation of buffer overflow vulnerabilities and should be activated whenever possible. Extra steps must be taken to ensure that this protection is enabled, particularly on 32-bit x86 systems. Other processors, such as Itanium and POWER, have included such support since inception and the standard kernel for those platforms supports the feature.','Enabling any feature that can protect against buffer overflow attacks enhances the security of the system.','','On 32 bit systems install a kernel with PAE support, no installation is required on 64 bit systems: If necessary configure your bootloader to load the new kernel and reboot the system. You may need to enable NX or XD support in your bios.','[{\"cis\": [\"4.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1027,'Enable Randomized Virtual Memory Region Placement','Set the system flag to force randomized virtual memory region placement.','Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting.','','Add the following line to the /etc/sysctl.conf file. kernel.randomize_va_space = 2','[{\"cis\": [\"4.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1028,'Disable Prelink','The prelinking feature changes binaries in an attempt to decrease their startup time.','The prelinking feature can interfere with the operation of AIDE, because it changes binaries. Prelinking can also increase the vulnerability of the system if a malicious user is able to compromise a common library such as libc.','','Run the command: # /usr/sbin/prelink -ua to restore binaries to a normal, non-prelinked state, then remove prelink: # apt-get purge prelink','[{\"cis\": [\"4.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1029,'Activate AppArmor','AppArmor provides a Mandatory Access Control (MAC) system that greatly augments the default Discretionary Access Control (DAC) model.','For an action to occur, both the traditional DAC permissions must be satisfied as well as the AppArmor MAC rules. The action will not be allowed if either one of these models does not permit the action. In this way, AppArmor rules can only make a system's permissions more restrictive and secure.','','Install apparmor and apparmor-utils if missing (additional profiles can be found in the apparmor-profiles package): # apt-get install apparmor apparmor-profiles apparmor-utils Add apparmor=1 and security=apparmor to GRUB_CMDLINE_LINUX in /etc/default/grub: GRUB_CMDLINE_LINUX="apparmor=1 security=apparmor"Update grub configuration (reboot will be required to apply changes): # update-grub Set all profiles to enforce mode: # aa-enforce /etc/apparmor.d/* Any unconfined processes may need to have a profile created or activated for them and then be restarted.','[{\"cis\": [\"4.5\"]}]'),(1030,'Ensure NIS is not installed','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 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.','','Uninstall the nis package: # apt-get purge nis','[{\"cis\": [\"5.1.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1031,'Ensure rsh server is not enabled','The Berkeley rsh-server (rsh, rlogin, rcp) package contains legacy services that exchange credentials in clear-text.','These legacy service contain numerous security exposures and have been replaced with the more secure SSH package.','','Remove or comment out any shell, login, or exec lines in /etc/inetd.conf: #shell stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.rshd #login stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.rlogind #exec stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.rexecd','[{\"cis\": [\"5.1.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1032,'Ensure rsh client is not installed','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 .','','Uninstall the rsh-client and rsh-reload-client packages: # apt-get purge rsh-client rsh-reload-client','[{\"cis\": [\"5.1.4\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1033,'Ensure talk server is not enabled','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.','','Remove or comment out any talk or ntalk lines in /etc/inetd.conf: #talk dgram udp wait nobody.tty /usr/sbin/in.talkd in.talkd #ntalk dgram udp wait nobody.tty /usr/sbin/in.ntalkd in.ntalkd','[{\"cis\": [\"5.1.4\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1034,'Ensure talk client is not installed','The talk software makes it possible for users to send and receive messages across systems through a terminal session. The talk client, which allows initialization of talk sessions, is installed by default.','The software presents a security risk as it uses unencrypted protocols for communication.','','Uninstall the talk package: # apt-get purge talk','[{\"cis\": [\"2.3.3\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1035,'Ensure telnet server is not enabled','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.','','Remove or comment out any telnet lines in /etc/inetd.conf: #telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd','[{\"cis\": [\"5.1.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1036,'Ensure tftp-server is not enabled','Trivial File 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.','','Remove or comment out any tftp lines in /etc/inetd.conf: #tftp stream tcp nowait root internal','[{\"cis\": [\"5.1.7\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\", \"AC.4\", \"SC.7\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1037,'Ensure xinetd is not enabled','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. Note: Several other services recommended to be disabled in this benchmark have xinetd versions as well, if xinetd is required in your environment ensure they are disabled in xinetd configuration as well.','If there are no xinetd services required, it is recommended that the daemon be disabled.','','Disable xinetd: # update-rc.d xinetd disable','[{\"cis\": [\"5.1.8\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1038,'Ensure chargen is not enabled','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.','','Remove or comment out any chargen lines in /etc/inetd.conf: #chargen stream tcp nowait root internal','[{\"cis\": [\"5.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1039,'Ensure daytime is not enabled','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.','','Remove or comment out any daytime lines in /etc/inetd.conf: #daytime stream tcp nowait root internal','[{\"cis\": [\"5.3\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1040,'Ensure echo is not enabled','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.','','Remove or comment out any echo lines in /etc/inetd.conf: #echo stream tcp nowait root internal','[{\"cis\": [\"5.4\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1041,'Ensure discard is not enabled','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.','','Remove or comment out any discard lines in /etc/inetd.conf: #discard stream tcp nowait root internal','[{\"cis\": [\"5.5\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1042,'Ensure time is not enabled','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.','','Remove or comment out any time lines in /etc/inetd.conf: #time stream tcp nowait root internal','[{\"cis\": [\"5.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1043,'Ensure the X Window system is not installed','The X Window system provides a Graphical User Interface (GUI) where users can have multiple windows in which to run programs and various add on. The X Window system is typically used on desktops where users login, but not on servers where users typically do not login.','Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface.','','Uninstall X Windows: # apt-get purge xserver-xorg-core*','[{\"cis\": [\"6.1\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1044,'Ensure Avahi Server is not enabled','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.','','Disable avahi-daemon: # update-rc.d avahi-daemon disable','[{\"cis\": [\"6.2\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1045,'Ensure print server is not enabled','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.','','Disable cups: # update-rc.d cups disable','[{\"cis\": [\"6.3\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1046,'Ensure DHCP Server is not enabled','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.','','Disable isc-dhcp-server: # update-rc.d isc-dhcp-server disable','[{\"cis\": [\"6.4\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1047,'Configure Network Time Protocol (NTP)','The Network Time Protocol (NTP) is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at http://www.ntp.org. NTP can be configured to be a client and/or a server.','It is recommended that physical systems and virtual guests lacking direct access to the physical host's clock be configured as NTP clients to synchronize their clocks (especially to support time sensitive security mechanisms like Kerberos). This also ensures log files have consistent time records across the enterprise, which aids in forensic investigations.','','Install ntp: # apt-get install ntp Ensure the following lines are in /etc/ntp.conf: restrict -4 default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery Also, make sure /etc/ntp.conf has at least one NTP server specified: server <ntp-server> Note: <ntp-server> is the IP address or hostname of a trusted time server. Configuring an NTP server is outside the scope of this benchmark.','[{\"cis\": [\"6.5\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1048,'Ensure LDAP is not enabled','The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.','If the server will not need to act as an LDAP client or server, it is recommended that the software be disabled to reduce the potential attack surface.','','Uninstall the slapd package: # apt-get purge slapd','[{\"cis\": [\"6.6\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1049,'Ensure NFS and RPC are not enabled','The Network File 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.','','Disable rpcbind: # update-rc.d rpcbind disable Disable nfs-kernel-server: # update-rc.d nfs-kernel-server disable','[{\"cis\": [\"6.7\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1050,'Ensure DNS Server is not enabled','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.','','Disable bind9: # update-rc.d bind9 disable','[{\"cis\": [\"6.8\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1051,'Ensure FTP Server is not enabled','The File 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.','','Disable vsftpd: # update-rc.d vsftpd disable','[{\"cis\": [\"6.9\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1052,'Ensure HTTP Server is not enabled','HTTP or web servers provide the ability to host web site content.','Unless there is a need to run the system as a web server, it is recommended that the package be deleted to reduce the potential attack surface.','','Disable apache2: # update-rc.d apache2 disable','[{\"cis\": [\"6.10\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1053,'Ensure IMAP and POP server is not enabled','Dovecot 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.','','Disable dovecot: # update-rc.d dovecot disable','[{\"cis\": [\"6.11\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1054,'Ensure Samba is not enabled','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.','','Disable samba: # update-rc.d samba disable','[{\"cis\": [\"6.12\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1055,'Ensure HTTP Proxy Server is not enabled','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.','','Disable squid3: # update-rc.d squid3 disable','[{\"cis\": [\"6.13\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1056,'Ensure SNMP Server is not enabled','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.','','Disable snmpd: # update-rc.d snmpd disable','[{\"cis\": [\"6.14\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1057,'Configure Mail Transfer Agent for Local-Only Mode','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.','','Edit /etc/exim4/update-exim4.conf.conf and edit the dc_local_interfaces line to remove non loopback addresses: dc_local_interfaces='127.0.0.1 ; ::1' Run update-exim4.conf: # update-exim4.conf Reload exim4 configuration: # service exim4 reload','[{\"cis\": [\"6.15\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AC.4\", \"SC.7\"]}, {\"tsc\": [\"CC5.2\", \"CC6.4\", \"CC6.6\", \"CC6.7\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1058,'Ensure rsync service is not enabled','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.','','Set RSYNC_ENABLE to false in /etc/default/rsync: RSYNC_ENABLE=false','[{\"cis\": [\"6.16\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1059,'Disable IP Forwarding','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.','','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','[{\"cis\": [\"7.1.1\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1060,'Disable Send Packet Redirects','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.','','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 net.ipv4.conf.default.send_redirects=0 Modify active kernel parameters to match: # /sbin/sysctl -w net.ipv4.conf.all.send_redirects=0 # /sbin/sysctl -w net.ipv4.conf.default.send_redirects=0 # /sbin/sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"7.1.2\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1061,'Disable Source Routed Packet Acceptance','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.','','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 net.ipv4.conf.default.accept_source_route=0 Modify active kernel parameters to match: # /sbin/sysctl -w net.ipv4.conf.all.accept_source_route=0 # /sbin/sysctl -w net.ipv4.conf.default.accept_source_route=0 # /sbin/sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"7.2.1\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1062,'Disable ICMP Redirect Acceptance','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.','','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 net.ipv4.conf.default.accept_redirects=0 Modify active kernel parameters to match: # /sbin/sysctl -w net.ipv4.conf.all.accept_redirects=0 # /sbin/sysctl -w net.ipv4.conf.default.accept_redirects=0 # /sbin/sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"7.2.2\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1063,'Disable Secure ICMP Redirect Acceptance','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.','','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 net.ipv4.conf.default.secure_redirects=0 Modify active kernel parameters to match: # /sbin/sysctl -w net.ipv4.conf.all.secure_redirects=0 # /sbin/sysctl -w net.ipv4.conf.default.secure_redirects=0 # /sbin/sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"7.2.3\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1064,'Log Suspicious Packets','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.','','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 net.ipv4.conf.default.log_martians=1 Modify active kernel parameters to match: # /sbin/sysctl -w net.ipv4.conf.all.log_martians=1 # /sbin/sysctl -w net.ipv4.conf.default.log_martians=1 # /sbin/sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"7.2.4\"]}, {\"cis_csc\": [\"6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1065,'Enable Ignore Broadcast Requests','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.','','Set the net.ipv4.icmp_echo_ignore_broadcasts parameter to 1 in /etc/sysctl.conf: net.ipv4.icmp_echo_ignore_broadcasts=1 Modify active kernel parameters to match: # /sbin/sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1 # /sbin/sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"7.2.5\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1066,'Enable Bad Error Message Protection','Setting icmp_ignore_bogus_error_responses to 1 prevents the kernel from logging bogus responses (RFC-1122 non-compliant) from broadcast reframes, keeping file systems from filling up with useless log messages.','Some routers (and some attackers) will send responses that violate RFC-1122 and attempt to fill up a log file system with many useless error messages.','','Set the net.ipv4.icmp_ignore_bogus_error_responses parameter to 1 in /etc/sysctl.conf: net.ipv4.icmp_ignore_bogus_error_responses=1 Modify active kernel parameters to match: # /sbin/sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1 # /sbin/sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"7.2.6\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1067,'Enable RFC-recommended Source Route Validation','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 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.','','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','[{\"cis\": [\"7.2.7\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1068,'Enable TCP SYN Cookies','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.','','Set the net.ipv4.tcp_syncookies parameter to 1 in /etc/sysctl.conf: net.ipv4.tcp_syncookies=1 Modify active kernel parameters to match: # /sbin/sysctl -w net.ipv4.tcp_syncookies=1 # /sbin/sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"7.2.8\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1069,'Disable IPv6 Router Advertisements','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.','','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 net.ipv6.conf.default.accept_ra=0 Modify active kernel parameters to match: # /sbin/sysctl -w net.ipv6.conf.all.accept_ra=0 # /sbin/sysctl -w net.ipv6.conf.default.accept_ra=0 # /sbin/sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"7.3.1\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1070,'Disable IPv6 Redirect Acceptance','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.','','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 net.ipv6.conf.default.accept_redirects=0 Modify active kernel parameters to match: # /sbin/sysctl -w net.ipv6.conf.all.accept_redirects=0 # /sbin/sysctl -w net.ipv6.conf.default.accept_redirects=0 # /sbin/sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"7.3.2\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1071,'Disable IPv6','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.','','Create or edit the file /etc/sysctl.conf and add the following lines: net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv6.conf.lo.disable_ipv6=1 Run the following command or reboot to apply the changes: # sysctl -p','[{\"cis\": [\"7.3.3\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1072,'Install TCP Wrappers','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.','','Install tcpd : # apt-get install tcpd To verify if a service supports TCP Wrappers, run the following command: # ldd <path-to-daemon> | grep libwrap.so If there is any output, then the service supports TCP Wrappers.','[{\"cis\": [\"7.4.2\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(1073,'Create /etc/hosts.allow','The /etc/hosts.allow file specifies which IP addresses are permitted to connect to the host. It is intended to be used in conjunction with the /etc/hosts.deny file.','The /etc/hosts.allow file supports access control by IP and helps ensure that only authorized systems can connect to the server.','','Create /etc/hosts.allow: # echo "ALL: <net>/<mask>, <net>/<mask>, ..." >/etc/hosts.allow where each <net>/<mask> combination (for example, "192.168.1.0/255.255.255.0") represents one network block in use by your organization that requires access to this system.','[{\"cis\": [\"7.4.2\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(1074,'Verify permissions on /etc/hosts.allow','The /etc/hosts.allow 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.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.','','If the permissions of the /etc/hosts.allow file are incorrect, run the following command to correct them: # /bin/chmod 644 /etc/hosts.allow','[{\"cis\": [\"7.4.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(1075,'Create /etc/hosts.deny','The /etc/hosts.deny file specifies which IP addresses are not permitted to connect to the host. It is intended to be used in conjunction with the /etc/hosts.allow file.','The /etc/hosts.deny file serves as a failsafe so that any host not specified in /etc/hosts.allow is denied access to the server.','','Create /etc/hosts.deny: # echo "ALL: ALL" >> /etc/hosts.deny','[{\"cis\": [\"7.4.4\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(1076,'Verify permissions on /etc/hosts.deny','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.','','If the permissions of the /etc/hosts.deny file are incorrect, run the following command to correct them: # /bin/chmod 644 /etc/hosts.deny','[{\"cis\": [\"7.4.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(1077,'Disable DCCP','The Datagram Congestion Control Protocol (DCCP) is a transport layer protocol that supports streaming media and telephony. DCCP provides a way to gain access to congestion control, without having to do it at the application layer, but does not provide in-sequence delivery.','If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface.','','# echo "install dccp /bin/true" >> /etc/modprobe.d/CIS.conf','[{\"cis\": [\"7.5.1\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1078,'Disable SCTP','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.','','# echo "install sctp /bin/true" >> /etc/modprobe.d/CIS.conf','[{\"cis\": [\"7.5.2\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1079,'Disable RDS','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.','','# echo "install rds /bin/true" >> /etc/modprobe.d/CIS.conf','[{\"cis\": [\"7.5.3\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1080,'Disable TIPC','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.','','# echo "install tipc /bin/true" >> /etc/modprobe.d/CIS.conf','[{\"cis\": [\"7.5.4\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1081,'Deactivate Wireless Interfaces','Wireless networking is used when wired networks are unavailable. Debian provides the nmcli interface which allows 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.','','Use the following command to disable wireless: # nmcli nm wifi off','[{\"cis\": [\"7.6\"]}, {\"pci_dss\": [\"1.2.3\"]}, {\"tsc\": [\"CC6.6\"]}]'),(1082,'Ensure Firewall is active','IPtables is an application that allows a system administrator to configure the IPv4 tables, chains and rules provided by the Linux kernel firewall. The iptables-persistent package in Debian provides one way to ensure iptables rules are reapplied on reboot. Note: the audit and remediation included provide instructions for using iptables-persistent to reapply iptables rules. Other methods are available which may be in use in your environment and may conflict with these steps.','IPtables provides extra protection for the Linux system by limiting communications in and out of the box to specific IPv4 addresses and ports.','','Install the iptables and iptables-persistent packages: # apt-get install iptables iptables-persistent Enable the iptables-persistent service: # update-rc.d iptables-persistent enable','[{\"cis\": [\"7.7\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.1\"]}]'),(1083,'Configure Audit Log Storage Size','Configure the maximum size of the audit log file. Once the log reaches the maximum size, it will be rotated and a new log file will be started.','It is important that an appropriate size is determined for log files so that they do not impact the system and audit data is not lost.','','Set the max_log_file parameter in /etc/audit/auditd.conf max_log_file = <MB> Note: MB is the number of MegaBytes the file can be.','[{\"cis\": [\"8.1.1.1\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"10.7\"]}]'),(1084,'Disable System on Audit Log Full','The auditd daemon can be configured to halt the system when the audit logs are full.','In high security contexts, the risk of detecting unauthorized access or nonrepudiation exceeds the benefit of the system's availability.','','Add the following lines to the /etc/audit/auditd.conf file. space_left_action = email action_mail_acct = root admin_space_left_action = halt','[{\"cis\": [\"8.1.1.2\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"10.7\"]}]'),(1085,'Keep All Auditing Information','Normally, auditd will hold 4 logs of maximum log file size before deleting older log files.','In high security contexts, the benefits of maintaining a long audit history exceed the cost of storing the audit history.','','Add the following line to the /etc/audit/auditd.conf file. max_log_file_action = keep_logs','[{\"cis\": [\"8.1.1.3\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"10.7\"]}]'),(1086,'Install and Enable auditd Service','Install and turn on the auditd daemon to record system events.','The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring.','','Install auditd: # apt-get install auditd If needed enable auditd in /etc/rc*.d: # update-rc.d auditd enable','[{\"cis\": [\"8.1.2\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.1\", \"10.7\"]}, {\"tsc\": [\"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(1087,'Enable Auditing for Processes That Start Prior to auditd','Configure grub or lilo so that processes that are capable of being audited can be audited even if they start up prior to auditd startup.','Audit events need to be captured on processes that start up prior to auditd, so that potential malicious activity cannot go undetected.','','Edit /etc/default/grub to include audit=1 as part of GRUB_CMDLINE_LINUX: GRUB_CMDLINE_LINUX="audit=1"And run the following command to update the grub configuration: # update-grub','[{\"cis\": [\"8.1.3\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.2.6\", \"10.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC7.3\", \"CC7.4\", \"CC6.8\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"35.7.d\", \"32.2\"]}]'),(1088,'Record Events That Modify Date and Time Information','Capture events where the system date and/or time has been modified. The parameters in this section are set to determine if the adjtimex (tune kernel clock), settimeofday (Set time, using timeval and timezone structures) stime (using seconds since 1/1/1970) or clock_settime (allows for the setting of several internal clocks and timers) system calls have been executed and always write an audit record to the /var/log/audit.log file upon exit, tagging the records with the identifier "time-change"','Unexpected changes in system date and/or time could be a sign of malicious activity on the system.','','For 64 bit systems, add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change -a always,exit -F arch=b64 -S clock_settime -k time-change -a always,exit -F arch=b32 -S clock_settime -k time-change -w /etc/localtime -p wa -k time-change # Execute the following command to restart auditd # pkill -P 1-HUP auditd For 32 bit systems, add the following lines to the /etc/audit/audit.rules file. -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change -a always,exit -F arch=b32 -S clock_settime -k time-change -w /etc/localtime -p wa -k time-change # Execute the following command to restart auditd # pkill -P 1-HUP auditd','[{\"cis\": [\"8.1.4\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.4.2\", \"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1089,'Record Events That Modify User/Group Information','Record events affecting the group, passwd (user IDs), shadow and gshadow (passwords) or /etc/security/opasswd (old passwords, based on remember parameter in the PAM configuration) files. The parameters in this section will watch the files to see if they have been opened for write or have had attribute changes (e.g. permissions) and tag them with the identifier "identity" in the audit log file.','Unexpected changes to these files could be an indication that the system has been compromised and that an unauthorized user is attempting to hide their activities or compromise additional accounts.','','Add the following lines to the /etc/audit/audit.rules file. -w /etc/group -p wa -k identity -w /etc/passwd -p wa -k identity -w /etc/gshadow -p wa -k identity -w /etc/shadow -p wa -k identity -w /etc/security/opasswd -p wa -k identity # Execute the following command to restart auditd # pkill -P 1-HUP auditd','[{\"cis\": [\"8.1.5\"]}, {\"cis_csc\": [\"5.4\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC7.3\", \"CC7.4\", \"CC6.8\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(1090,'Record Events That Modify the System's Network Environment','Record changes to network environment files or system calls. The below parameters monitor the sethostname (set the systems host name) or setdomainname (set the systems domainname) system calls, and write an audit event on system call exit. The other parameters monitor the /etc/issue and /etc/issue.net files (messages displayed prelogin), /etc/hosts (file containing host names and associated IP addresses) and /etc/network (directory containing network interface scripts and configurations) files.','Monitoring sethostname and setdomainname will identify potential unauthorized changes to host and domainname of a system. The changing of these names could potentially break security parameters that are set based on those names. The /etc/hosts file is monitored for changes in the file that can indicate an unauthorized intruder is trying to change machine associations with IP addresses and trick users and processes into connecting to unintended machines. Monitoring /etc/issue and /etc/issue.net is important, as intruders could put disinformation into those files and trick users into providing information to the intruder. Monitoring /etc/network is important as it can show if network interfaces or scripts are being modified in a way that can lead to the machine becoming unavailable or compromised. All audit records will be tagged with the identifier "system-locale."','','For 64 bit systems, add the following lines to the /etc/audit/audit.rules file. -a exit,always -F arch=b64 -S sethostname -S setdomainname -k system-locale -a exit,always -F arch=b32 -S sethostname -S setdomainname -k system-locale -w /etc/issue -p wa -k system-locale -w /etc/issue.net -p wa -k system-locale -w /etc/hosts -p wa -k system-locale -w /etc/network -p wa -k system-locale # Execute the following command to restart auditd # pkill -P 1-HUP auditd For 32 bit systems, add the following lines to the /etc/audit/audit.rules file. -a exit,always -F arch=b32 -S sethostname -S setdomainname -k system-locale -w /etc/issue -p wa -k system-locale -w /etc/issue.net -p wa -k system-locale -w /etc/hosts -p wa -k system-locale -w /etc/network -p wa -k system-locale # Execute the following command to restart auditd # pkill -P 1-HUP auditd','[{\"cis\": [\"8.1.6\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC7.3\", \"CC7.4\", \"CC6.8\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1091,'Record Events That Modify the System's Mandatory Access Controls','Monitor SELinux mandatory access controls. The parameters below monitor any write access (potential additional, deletion or modification of files in the directory) or attribute changes to the /etc/selinux directory.','Changes to files in this directory could indicate that an unauthorized user is attempting to modify access controls and change security contexts, leading to a compromise of the system.','','Add the following lines to the /etc/audit/audit.rules file. Add the following lines to /etc/audit/audit.rules -w /etc/selinux/ -p wa -k MAC-policy # Execute the following command to restart auditd # pkill -P 1-HUP auditd','[{\"cis\": [\"8.1.7\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC7.3\", \"CC7.4\", \"CC6.8\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(1092,'Collect Login and Logout Events','Monitor login and logout events. The parameters below track changes to files associated with login/logout events. The file /var/log/faillog tracks failed events from login. The file /var/log/lastlog maintain records of the last time a user successfully logged in. The file /var/log/tallylog maintains records of failures via the pam_tally2 module','Monitoring login/logout events could provide a system administrator with information associated with brute force attacks against user logins.','','Add the following lines to the /etc/audit/audit.&& r:rules file. -w /var/log/faillog -p wa -k logins -w /var/log/lastlog -p wa -k logins -w /var/log/tallylog -p wa -k logins # Execute the following command to restart auditd # pkill -HUP -P 1 auditd','[{\"cis\": [\"8.1.8\"]}, {\"cis_csc\": [\"5.5\", \"16.10\", \"16.4\"]}, {\"pci_dss\": [\"10.2.1\", \"10.2.4\", \"10.3\"]}, {\"nist_800_53\": [\"AC.7\", \"AU.14\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC7.3\", \"CC7.4\", \"CC6.8\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1093,'Collect Session Initiation Information','Monitor session initiation events. The parameters in this section track changes to the files associated with session events. The file /var/run/utmp file tracks all currently logged in users. The /var/log/wtmp file tracks logins, logouts, shutdown and reboot events. All audit records will be tagged with the identifier "session." The file /var/log/btmp keeps track of failed login attempts and can be read by entering the command /usr/bin/last -f /var/log/btmp. All audit records will be tagged with the identifier "logins."','Monitoring these files for changes could alert a system administrator to logins occurring at unusual hours, which could indicate intruder activity (i.e. a user logging in at a time when they do not normally log in).','','Add the following lines to the /etc/audit/audit.rules file. -w /var/run/utmp -p wa -k session -w /var/log/wtmp -p wa -k session -w /var/log/btmp -p wa -k session # Execute the following command to restart auditd # pkill -HUP -P 1 auditd Note: Use the last command to read /var/log/wtmp (last with no parameters) and /var/run/utmp (last -f /var/run/utmp)','[{\"cis\": [\"8.1.9\"]}, {\"cis_csc\": [\"5.5\", \"16.10\", \"16.4\"]}, {\"pci_dss\": [\"10.3\"]}]'),(1094,'Collect Discretionary Access Control Permission Modification Events','Monitor changes to file permissions, attributes, ownership and group. The parameters in this section track changes for system calls that affect file permis&& r:sions and attributes. The chmod, fchmod and fchmodat system calls affect the permissions associated with a file. The chown, fchown, fchownat and lchown system calls affect owner and group attributes on a file. The setxattr, lsetxattr, fsetxattr (set extended file attributes) and removexattr, lremovexattr, fremovexattr (remove extended file attributes) control extended file attributes. In all cases, an audit record will only be written for non-system userids (auid >= 1000) and will ignore Daemon events (auid = 4294967295). All audit records will be tagged with the identifier "perm_mod."','Monitoring for changes in file attributes could alert a system administrator to activity that could indicate intruder activity or policy violation.','','For 64 bit systems, add the following lines to the /etc/audit/audit.rules file. -a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod # Execute the following command to restart auditd # pkill -HUP -P 1 auditd For 32 bit systems, add the following lines to the /etc/audit/audit.rules file. -a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod # Execute the following command to restart auditd # pkill -HUP -P 1 auditd','[{\"cis\": [\"8.1.10\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC7.3\", \"CC7.4\", \"CC6.8\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(1095,'Collect Unsuccessful Unauthorized Access Attempts to Files','Monitor for unsuccessful attempts to access files. The parameters below are associated with system calls that control creation (creat), opening (open, openat) and truncation (truncate, ftruncate) of files. An audit log record will only be written if the user is a nonprivileged user (auid > = 500), is not a Daemon event (auid=4294967295) and if the system call returned EACCES (permission denied to the file) or EPERM (some other permanent error associated with the specific system call). All audit records will be tagged with the identifier "access."','Failed attempts to open, create or truncate files could be an indication that an individual or process is trying to gain unauthorized access to the system.','','For 64 bit systems, add the following lines to the /etc/audit/audit.rules file. -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access # Execute the following command to restart auditd # pkill -HUP -P 1 auditd For 32 bit systems, add the following lines to the /etc/audit/audit.rules file. -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access # Execute the following command to restart auditd # pkill -HUP -P 1 auditd','[{\"cis\": [\"8.1.11\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"10.2.4\"]}, {\"nist_800_53\": [\"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC7.3\", \"CC7.4\", \"CC6.8\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1096,'Collect Successful File System Mounts','Monitor the use of the mount system call. The mount (and umount) system call controls the mounting and unmounting of file systems. The parameters below configure the system to create an audit record when the mount system call is used by a non-privileged user','It is highly unusual for a non privileged user to mount file systems to the system. While tracking mount commands gives the system administrator evidence that external media may have been mounted (based on a review of the source of the mount and confirming it's an external media type), it does not conclusively indicate that data was exported to the media. System administrators who wish to determine if data were exported, would also have to track successful open, creat and truncate system calls requiring write access to a file under the mount point of the external media file system. This could give a fair indication that a write occurred. The only way to truly prove it, would be to track successful writes to the external media. Tracking write system calls could quickly fill up the audit log and is not recommended. Recommendations on configuration options to track data export to media is beyond the scope of this document.','','For 64 bit systems, add the following lines to the /etc/audit/audit.rules file. -a always,exit -F arch=b64 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts -a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts # Execute the following command to restart auditd # pkill -HUP -P 1 auditd For 32 bit systems, add the following lines to the /etc/audit/audit.rules file. -a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts # Execute the following command to restart auditd # pkill -HUP -P 1 auditd','[{\"cis\": [\"8.1.13\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC7.3\", \"CC7.4\", \"CC6.8\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1097,'Collect File Deletion Events by User','Monitor the use of system calls associated with the deletion or renaming of files and file attributes. This configuration statement sets up monitoring for the unlink (remove a file), unlinkat (remove a file attribute), rename (rename a file) and renameat (rename a file attribute) system calls and tags them with the identifier "delete".','Monitoring these calls from non-privileged users could provide a system administrator with evidence that inappropriate removal of files and file attributes associated with protected files is occurring. While this audit option will look at all events, system administrators will want to look for specific privileged files that are being deleted or altered.','','At a minimum, configure the audit system to collect file deletion events for all users and root. For 64 bit systems, add the following to the /etc/audit/audit.rules file. -a always,exit -F arch=b64 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete -a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete # Execute the following command to restart auditd # pkill -HUP -P 1 auditd For 32 bit systems, add the following to the /etc/audit/audit.rules file. -a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete # Execute the following command to restart auditd # pkill -P 1-HUP auditd','[{\"cis\": [\"8.1.14\"]}, {\"pci_dss\": [\"10.5.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC7.1\", \"CC7.2\", \"CC7.3\", \"CC8.1\"]}]'),(1098,'Collect Changes to System Administration Scope (sudoers)','Monitor scope changes for system administrations. If the system has been properly configured to force system administrators to log in as themselves first and then use the sudo command to execute privileged commands, it is possible to monitor changes in scope. The file /etc/sudoers will be written to when the file or its attributes have changed. The audit records will be tagged with the identifier "scope."','Changes in the /etc/sudoers file can indicate that an unauthorized change has been made to scope of system administrator activity.','','Add the following lines to the /etc/audit/audit.rules file. -w /etc/sudoers -p wa -k scope # Execute the following command to restart auditd # pkill -HUP -P 1 auditd','[{\"cis\": [\"8.1.15\"]}, {\"cis_csc\": [\"5.4\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC7.3\", \"CC7.4\", \"CC6.8\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(1099,'Collect System Administrator Actions (sudolog)','Monitor the sudo log file. If the system has been properly configured to disable the use of the su command and force all administrators to have to log in first and then use sudo to execute privileged commands, then all administrator commands will be logged to /var/log/sudo.log. Any time a command is executed, an audit event will be triggered as the /var/log/sudo.log file will be opened for write and the executed administration command will be written to the log.','Changes in /var/log/sudo.log indicate that an administrator has executed a command or the log file itself has been tampered with. Administrators will want to correlate the events written to the audit trail with the records written to /var/log/sudo.log to verify if unauthorized commands have been executed.','','Add the following lines to the /etc/audit/audit.rules file. -w /var/log/sudo.log -p wa -k actions # Execute the following command to restart auditd # pkill -HUP -P 1 auditd Note: The system must be configured with su disabled (See Item 9.5 Restrict Access to the su Command) to force all command execution through sudo. This will not be effective on the console, as administrators can log in as root','[{\"cis\": [\"8.1.16\"]}, {\"cis_csc\": [\"5.1\", \"5.5\"]}, {\"pci_dss\": [\"10.2.2\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.6\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.3\", \"CC7.3\", \"CC7.4\", \"CC6.8\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1100,'Collect Kernel Module Loading and Unloading','Monitor the loading and unloading of kernel modules. The programs insmod (install a kernel module), rmmod (remove a kernel module), and modprobe (a more sophisticated program to load and unload modules, as well as some other features) control loading and unloading of modules. The init_module (load a module) and delete_module (delete a module) system calls control loading and unloading of modules. Any execution of the loading and unloading module programs and system calls will trigger an audit record with an identifier of "modules".','Monitoring the use of insmod, rmmod and modprobe could provide system administrators with evidence that an unauthorized user loaded or unloaded a kernel module, possibly compromising the security of the system. Monitoring of the init_module and delete_module system calls would reflect an unauthorized user attempting to use a different program to load and unload modules.','','Add the following lines to the /etc/audit/audit.rules file. -w /sbin/insmod -p x -k modules -w /sbin/rmmod -p x -k modules -w /sbin/modprobe -p x -k modules For 32 bit systems, add -a always,exit -F arch=b32 -S init_module -S delete_module -k modules For 64 bit systems, add -a always,exit -F arch=b64 -S init_module -S delete_module -k modules','[{\"cis\": [\"8.1.17\"]}, {\"cis_csc\": [\"3\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC7.3\", \"CC7.4\", \"CC6.8\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1101,'Make the Audit Configuration Immutable','Set system audit so that audit rules cannot be modified with auditctl. Setting the flag "-e 2" forces audit to be put in immutable mode. Audit changes can only be made on system reboot','In immutable mode, unauthorized users cannot execute changes to the audit system to potentially hide malicious activity and then put the audit rules back. Users would most likely notice a system reboot and that could alert administrators of an attempt to make unauthorized audit changes.','','Add the following lines to the /etc/audit/audit.rules file. -e 2 Note: This must be the last line in the /etc/audit/audit.rules file','[{\"cis\": [\"8.1.18\"]}, {\"cis_csc\": [\"3\", \"6\"]}, {\"pci_dss\": [\"10.5\"]}]'),(1102,'Install the rsyslog package','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.','','Install the rsyslog package: # apt-get install rsyslog','[{\"cis\": [\"8.2.2\"]}, {\"cis_csc\": [\"6.2\"]}]'),(1103,'Ensure the rsyslog Service is activated','Once the rsyslog package is installed it needs to be activated.','If the rsyslog service is not activated the system will not have a syslog service running.','','Enable rsyslog: # update-rc.d rsyslog enable','[{\"cis\": [\"8.2.2\"]}, {\"cis_csc\": [\"6.2\"]}]'),(1104,'Configure rsyslog to Send Logs to a Remote Log Host','The rsyslog utility supports the ability to send logs it gathers to a remote log host running syslogd(8) or to receive messages from remote hosts, reducing administrative overhead.','Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system','','Edit the /etc/rsyslog.conf file and add the following line (where logfile.example.com is the name of your central log host). *.* @@loghost.example.com # Execute the following command to restart rsyslogd # pkill -HUP rsyslogd Note: The double "at" sign (@@) directs rsyslog to use TCP to send log messages to the server, which is a more reliable transport mechanism than the default UDP protocol.','[{\"cis\": [\"8.2.5\"]}, {\"cis_csc\": [\"6.6\"]}]'),(1105,'Accept Remote rsyslog Messages Only on Designated Log Hosts','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.','','For hosts that are designated as log hosts, edit the /etc/rsyslog.conf file and un-comment the following lines: $ModLoad imtcp.so $InputTCPServerRun 514 Execute the following command to restart rsyslogd: # pkill -HUP rsyslogd','[{\"cis\": [\"8.2.6\"]}, {\"cis_csc\": [\"9.1\"]}]'),(1106,'Install AIDE','In some installations, AIDE is not installed automatically','Install AIDE to make use of the file integrity features to monitor critical files for changes that could affect the security of the system.','','Install AIDE: # apt-get install aide Initialize AIDE: # aideinit # cp /var/lib/aide/aide.db.new /var/lib/aide/aide.db Note: The prelinking feature can interfere with AIDE because it alters binaries to speed up their start up times. Run /usr/sbin/prelink -ua to restore the binaries to their prelinked state, thus avoiding false positives from AIDE.','[{\"cis\": [\"8.3.1\"]}, {\"cis_csc\": [\"3.5\"]}, {\"pci_dss\": [\"11.5\"]}]'),(1107,'Implement Periodic Execution of File Integrity','Implement periodic file checking, in compliance with site policy','Periodic file checking allows the system administrator to determine on a regular basis if critical files have been changed in an unauthorized fashion.','','Execute the following command: # crontab -u root -e Add the following line to the crontab: 0 5 * * * /usr/sbin/aide --check Note: The checking in this instance occurs every day at 5am. Alter the frequency and time of the checks in compliance with site policy.','[{\"cis\": [\"8.3.2\"]}, {\"cis_csc\": [\"3.5\"]}, {\"pci_dss\": [\"11.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(1108,'Enable cron Daemon','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.','','Enable cron: # update-rc.d cron enable Enable anacron: # update-rc.d anacron enable','[{\"cis\": [\"9.1.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1109,'Set User/Group Owner and Permission on /etc/crontab','The /etc/crontab file is used by cron to control its own jobs. The commands in this item make sure that root is the user and group owner of the file and that only the owner can access the file.','This file contains information on what system jobs are run by cron. Write access to these files could provide unprivileged users with the ability to elevate their privileges. Read access to these files could provide users with the ability to gain insight on system jobs that run on the system and could provide them a way to gain unauthorized privileged access.','','Run the following commands to set ownership and permissions on /etc/crontab : chown root:root /etc/crontab and chmod og-rwx /etc/crontab','[{\"cis\": [\"9.1.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(1110,'Set User/Group Owner and Permission on /etc/cron.hourly','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.','','Run the following commands to set ownership and permissions on /etc/cron.hourly : chown root:root /etc/cron.hourly and chmod og-rwx /etc/cron.hourly','[{\"cis\": [\"9.1.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1111,'Set User/Group Owner and Permission on /etc/cron.daily','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.','','Run the following commands to set ownership and permissions on /etc/cron.daily : chown root:root /etc/cron.daily and chmod og-rwx /etc/cron.daily','[{\"cis\": [\"9.1.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1112,'Set User/Group Owner and Permission on /etc/cron.weekly','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.','','Run the following commands to set ownership and permissions on /etc/cron.weekly : chown root:root /etc/cron.weekly and chmod og-rwx /etc/cron.weekly','[{\"cis\": [\"9.1.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1113,'Set User/Group Owner and Permission on /etc/cron.monthly','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.','','Run the following commands to set ownership and permissions on /etc/cron.monthly : chown root:root /etc/cron.monthly and chmod og-rwx /etc/cron.monthly','[{\"cis\": [\"9.1.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1114,'Set User/Group Owner and Permission on /etc/cron.d','Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow , cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs.','On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.','','Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow: rm /etc/cron.deny;rm /etc/at.deny;touch /etc/cron.allow; touch /etc/at.allow; chmod og-rwx /etc/cron.allow; chmod og-rwx /etc/at.allow; chown root:root /etc/cron.allow and chown root:root /etc/at.allow','[{\"cis\": [\"9.1.7\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1115,'Restrict at/cron to Authorized Users','Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow, cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs.','On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.','','# /bin/rm /etc/cron.deny # /bin/rm /etc/at.deny # touch /etc/cron.allow # touch /etc/at.allow # chmod og-rwx /etc/cron.allow # chmod og-rwx /etc/at.allow # chown root:root /etc/cron.allow # chown root:root /etc/at.allow','[{\"cis\": [\"9.1.8\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1116,'Set Password Creation Requirement Parameters Using pam_cracklib','The pam_cracklib module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more. The following are definitions of the pam_cracklib.so options. # retry=3 - Allow 3 tries before sending back a failure. # minlen=14 - password must be 14 characters or more # dcredit=-1 - provide at least one digit # ucredit=-1 - provide at least one uppercase character # ocredit=-1 - provide at least one special character # lcredit=-1 - provide at least one lowercase character The setting shown above is one possible policy. Alter these values to conform to your own organization's password policies.','Strong passwords protect systems from being hacked through brute force methods.','','1) Install the libpam-cracklib package: # apt-get install libpam-cracklib 2) Set the pam_cracklib.so parameters as follows in /etc/pam.d/common-password: password required pam_cracklib.so retry=3 minlen=14 dcredit=-1 ucredit=-1 ocredit=-1 lcredit=-1','[{\"cis\": [\"9.2.1\"]}, {\"pci_dss\": [\"8.2.3\"]}]'),(1117,'Set Lockout for Failed Password Attempts','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.','','Edit the /etc/pam.d/login file and add the auth line below: auth required pam_tally2.so onerr=fail audit silent deny=5 unlock_time=900 Note: If a user has been locked out because they have reached the maximum consecutive failure count defined by deny= in the pam_tally2.so module, the user can be unlocked by issuing the command /sbin/pam_tally2 -u <username> --reset. This command sets the failed count to 0, effectively unlocking the user.','[{\"cis\": [\"9.2.2\"]}, {\"pci_dss\": [\"8.2.5\"]}]'),(1118,'Limit Password Reuse','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.','','Set the pam_unix.so remember parameter to 5 in /etc/pam.d/common-password: password [success=1 default=ignore] pam_unix.so obscure sha512 remember=5 Note: The default password setting in this document is the last 5 passwords. Change this number to conform to your site's password policy.','[{\"cis\": [\"9.2.3\"]}, {\"pci_dss\": [\"8.2.5\"]}]'),(1119,'Set SSH Protocol to 2','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2','[{\"cis\": [\"9.3.1\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}]'),(1120,'Set LogLevel to 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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel INFO','[{\"cis\": [\"9.3.2\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}]'),(1121,'Set Permissions on /etc/ssh/sshd_config','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-privileged users.','','If the user and group ownership of the /etc/ssh/sshd_config file are incorrect, run the following command to correct them: # chown root:root /etc/ssh/sshd_config If the permissions are incorrect, run the following command to correct them: # chmod 600 /etc/ssh/sshd_config','[{\"cis\": [\"9.3.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1122,'Disable SSH X11 Forwarding','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: X11Forwarding no','[{\"cis\": [\"9.3.4\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1123,'Set SSH MaxAuthTries to 4 or Less','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4','[{\"cis\": [\"9.3.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1124,'Set SSH IgnoreRhosts to Yes','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes','[{\"cis\": [\"9.3.6\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}]'),(1125,'Set SSH HostbasedAuthentication to No','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no','[{\"cis\": [\"9.3.7\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}]'),(1126,'Disable SSH Root Login','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no','[{\"cis\": [\"9.3.8\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}]'),(1127,'Set SSH PermitEmptyPasswords to No','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no','[{\"cis\": [\"9.3.9\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}]'),(1128,'Do Not Allow Users to Set Environment Options','The PermitUserEnvironment option allows users to present environment options to the ssh daemon.','Permitting users the ability to set environment variables through the SSH daemon could potentially allow users to bypass security controls (e.g. setting an execution path that has ssh executing trojan'd programs)','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitUserEnvironment no','[{\"cis\": [\"9.3.10\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}]'),(1129,'Use Only Approved Cipher in Counter Mode','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: Ciphers aes128-ctr,aes192-ctr,aes256-ctr','[{\"cis\": [\"9.3.11\"]}]'),(1130,'Set Idle Timeout Interval for User Login','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: ClientAliveInterval 300 ClientAliveCountMax 0','[{\"cis\": [\"9.3.12\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(1131,'Limit Access via SSH','There are several options available to limit which users and group can access the system via SSH. It is recommended that at least one of the following options be leveraged: AllowUsers, AllowGroups, DenyUsers, DenyGroups.','Restricting which users can remotely access the system via SSH will help ensure that only authorized users access the system.','','Edit the /etc/ssh/sshd_config file to set one or more of the parameter as follows: AllowUsers <userlist> AllowGroups <grouplist> DenyUsers <userlist> DenyGroups <grouplist>','[{\"cis\": [\"9.3.13\"]}, {\"pci_dss\": [\"8.1\"]}]'),(1132,'Set SSH Banner','The Banner parameter specifies a file whose contents must be sent to the remote user before authentication is permitted. By default, no banner is displayed.','Banners are used to warn connecting users of the particular site's policy regarding connection. Consult with your legal department for the appropriate warning banner for your site.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: Banner /etc/issue.net','[{\"cis\": [\"9.3.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1133,'Restrict Access to the su Command','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.','','1) Add the following line to the /etc/pam.d/su file: auth required pam_wheel.so use_uid 2) Once this is done, create a comma separated list of users in the wheel statement in the /etc/group file.','[{\"cis\": [\"9.5\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(1134,'Set Password Expiration Days','The PASS_MAX_DAYS parameter in /etc/login.defs allows an administrator to force passwords to expire once they reach a defined age. It is recommended that the PASS_MAX_DAYS parameter be set to less than or equal to 90 days.','The window of opportunity for an attacker to leverage compromised credentials or successfully compromise credentials via an online brute force attack is limited by the age of the password. Therefore, reducing the maximum age of a password also reduces an attacker's window of opportunity.','','Set the PASS_MAX_DAYS parameter to 90 in /etc/login.defs: PASS_MAX_DAYS 90 Modify user parameters for all users with a password set to match: # chage --maxdays 90 <user>','[{\"cis\": [\"10.1.1\"]}, {\"pci_dss\": [\"8.2.4\"]}]'),(1135,'Set Password Change Minimum Number of Days','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.','','Set the PASS_MIN_DAYS parameter to 7 in /etc/login.defs: PASS_MIN_DAYS 7 Modify user parameters for all users with a password set to match: # chage --mindays 7 <user>','[{\"cis\": [\"10.1.2\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(1136,'Set Password Expiring Warning Days','The PASS_WARN_AGE parameter in /etc/login.defs allows an administrator to notify users that their password will expire in a defined number of days. It is recommended that the PASS_WARN_AGE parameter be set to 7 or more days.','Providing an advance warning that a password will be expiring gives users time to think of a secure password. Users caught unaware may choose a simple password or write it down where it may be discovered.','','Set the PASS_WARN_AGE parameter to 7 in /etc/login.defs: PASS_WARN_AGE 7 Modify user parameters for all users with a password set to match: # chage --warndays 7 <user>','[{\"cis\": [\"10.1.3\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(1137,'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.','Using GID 0 for the root account helps prevent root-owned files from accidentally becoming accessible to non-privileged users.','','# usermod -g 0 root','[{\"cis\": [\"10.3\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(1138,'Set Default umask for Users','The default umask determines the permissions of files created by users. The user creating the file has the discretion of making their files and directories readable by others via the chmod command. Users who wish to allow their files and directories to be readable by others by default may choose a different default umask by inserting the umask command into the standard shell configuration files (.profile, .bashrc, etc.) in their home directories.','Setting a very secure default value for umask ensures that users make a conscious choice about their file permissions. A default umask setting of 077 causes files and directories created by users to not be readable by any other user on the system. A umask of 027 would make files and directories readable by users in the same Unix group, while a umask of 022 would make files readable by every user on the system. Note: The directives in this section apply to bash and shell. If other shells are supported on the system, it is recommended that their configuration files also are checked.','','Edit the /etc/bash.bashrc and /etc/profile.d/cis.sh files (and the appropriate files for any other shell supported on your system) and add the following the UMASK parameter as shown: umask 077','[{\"cis\": [\"10.4\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(1139,'Lock Inactive User Accounts','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.','Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies.','','# useradd -D -f 35','[{\"cis\": [\"10.5\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(1140,'Set Warning Banner for Standard Login Services','The contents of the /etc/issue file are displayed prior to the login prompt on the system's console and serial devices, and also prior to logins via telnet. The contents of the /etc/motd file is generally displayed after all successful logins, no matter where the user is logging in from, but is thought to be less useful because it only provides notification to the user after the machine has been accessed.','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Consult with your organization's legal counsel for the appropriate wording for your specific organization.','','# touch /etc/motd # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue.net # chown root:root /etc/motd # chmod 644 /etc/motd # chown root:root /etc/issue # chmod 644 /etc/issue # chown root:root /etc/issue.net # chmod 644 /etc/issue.net','[{\"cis\": [\"11.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(1141,'Remove OS Information from Login Warning Banners','Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform.','Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the "uname -a" command once they have logged in.','','Edit the /etc/motd, /etc/issue and /etc/issue.net files and remove any lines containing m, , s or v.','[{\"cis\": [\"11.2\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(1142,'Ensure GDM login banner is configured','Debian defaults to using GNOME Display Manager for graphical login session management. KDM is also available as well as lightdm. Instructions are provided for GDM only, if you are using another display manager you will need to follow different procedures to audit and remediate this setting.','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Consult with your organization's legal counsel for the appropriate wording for your specific organization.','','Uncomment or add the following lines to /etc/gdm3/greeter.gsettings : banner-message-enable=true banner-message-text='<banner-text>'','[{\"cis\": [\"11.3\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(1143,'Verify permissions on /etc/passwd','The /etc/passwd file contains user account information that is used by many system utilities and therefore must be readable for these utilities to operate.','It is critical to ensure that the /etc/passwd file is protected from unauthorized write access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','If the permissions of the /etc/passwd file are incorrect, run the following command to correct them: # /bin/chmod 644 /etc/passwd','[{\"cis\": [\"12.1\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(1144,'Verify permissions on /etc/shadow','The /etc/shadow file is used to store the information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information.','If attackers can gain read access to the /etc/shadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/shadow file (such as expiration) could also be useful to subvert the user accounts.','','If the permissions of the /etc/shadow file are incorrect, run the following command to correct them: # /bin/chmod 644 /etc/shadow','[{\"cis\": [\"12.2\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(1145,'Verify permissions on /etc/group','The /etc/group file contains a list of all the valid groups defined in the system. The command below allows read/write access for root and read access for everyone else.','The /etc/group file needs to be protected from unauthorized changes by non-privileged users, but needs to be readable as this information is used with many non-privileged programs.','','If the permissions of the /etc/group file are incorrect, run the following command to correct them: # /bin/chmod 644 /etc/group','[{\"cis\": [\"12.3\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(1146,'Verify User/Group Ownership on /etc/passwd','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.','The /etc/passwd file needs to be protected from unauthorized changes by non-privileged users, but needs to be readable as this information is used with many non-privileged programs.','','If the user and group ownership of the /etc/passwd file are incorrect, run the following command to correct them: # /bin/chown root:root /etc/passwd','[{\"cis\": [\"12.4\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(1147,'Verify User/Group Ownership on /etc/shadow','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.','If attackers can gain read access to the /etc/shadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/shadow file (such as expiration) could also be useful to subvert the user accounts.','','If the ownership of the /etc/shadow file are incorrect, run the following command to correct them: # /bin/chown root:shadow /etc/shadow','[{\"cis\": [\"12.5\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(1148,'Verify User/Group Ownership on /etc/group','The /etc/group file contains a list of all the valid groups defined in the system. The command below allows read/write access for root and read access for everyone else.','The /etc/group file needs to be protected from unauthorized changes by non-privileged users, but needs to be readable as this information is used with many non-privileged programs.','','If the ownership of the /etc/group file are incorrect, run the following command to correct them: # /bin/chown root:root /etc/group','[{\"cis\": [\"12.6\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(1149,'Ensure Password Fields are Not Empty','An account with an empty password field means that anybody may log in as that user without providing a password.','All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user.','','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 <username> Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off.','[{\"cis\": [\"13.1\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2\"]}]'),(1150,'Verify No Legacy "+" Entries Exist in /etc/passwd File','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Delete these entries if they exist.','[{\"cis\": [\"13.2\"]}, {\"cis_csc\": [\"16.9\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1151,'Verify No Legacy "+" Entries Exist in /etc/shadow File','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Delete these entries if they exist.','[{\"cis\": [\"13.3\"]}, {\"cis_csc\": [\"16.9\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1152,'Verify No Legacy "+" Entries Exist in /etc/group File','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Delete these entries if they exist.','[{\"cis\": [\"13.4\"]}, {\"cis_csc\": [\"16.9\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1153,'Verify No UID 0 Accounts Exist Other Than root','Any account with UID 0 has superuser privileges on the system.','This access must be limited to only the default root account and only from the system console. Administrative access must be through an unprivileged account using an approved mechanism as noted in Item 9.4 Restrict root Login to System Console.','','Delete any other entries that are displayed.','[{\"cis\": [\"13.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\", \"CC8.1\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(1154,'Ensure shadow group is empty','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.','','Remove all users from the shadow group, and change the primary group of any users with shadow as their primary group.','[{\"cis\": [\"13.20\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(1500,'Ensure mounting of cramfs filesystems is disabled','The cramfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems. A cramfs image can be used without having to first decompress the image.','Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it.','','1) Edit or create a file in the /etc/modprobe.d/ directory ending in .conf and add the following line: install cramfs /bin/true. 2) Run the following command to unload the cramfs module: # rmmod cramfs','[{\"cis\": [\"1.1.1.1\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(1501,'Ensure mounting of freevxfs filesystems is disabled','The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the primary filesystem type for HP-UX operating systems.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','1) Edit or create a file in the /etc/modprobe.d/ directory ending in .conf and add the following line: install freevxfs /bin/true. 2) Run the following command to unload the freevxfs module: # rmmod freevxfs','[{\"cis\": [\"1.1.1.2\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(1502,'Ensure mounting of jffs2 filesystems is disabled','The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf and add the following line: install jffs2 /bin/true. 2) Run the following command to unload the jffs2 module: # rmmod jffs2','[{\"cis\": [\"1.1.1.3\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(1503,'Ensure mounting of hfs filesystems is disabled','The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS filesystems.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','1) Edit or create a file in the /etc/modprobe.d/ directory ending in .conf and add the following line: install hfs /bin/true. 2) Run the following command to unload the hfs module: # rmmod hfs','[{\"cis\": [\"1.1.1.4\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(1504,'Ensure mounting of hfsplus filesystems is disabled','The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','1) Edit or create a file in the /etc/modprobe.d/ directory ending in .conf and add the following line: install hfsplus /bin/true. 2) Run the following command to unload the hfsplus module: # rmmod hfsplus','[{\"cis\": [\"1.1.1.5\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(1505,'Ensure mounting of squashfs filesystems is disabled','The squashfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems (similar to cramfs ). A squashfs image can be used without having to first decompress the image.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','1) Edit or create a file in the /etc/modprobe.d/ directory ending in .conf and add the following line: install squashfs /bin/true. 2) Run the following command to unload the squashfs module: # rmmod squashfs','[{\"cis\": [\"1.1.1.6\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(1506,'Ensure mounting of udf filesystems is disabled','The udf filesystem type is the universal disk format used to implement ISO/IEC 13346 and ECMA-167 specifications. This is an open vendor filesystem type for data storage on a broad range of media. This filesystem type is necessary to support writing DVDs and newer optical disc formats.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','1) Edit or create a file in the /etc/modprobe.d/ directory ending in .conf and add the following line: install udf /bin/true. 2) Run the following command to unload the udf module: # rmmod udf','[{\"cis\": [\"1.1.1.7\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(1507,'Ensure /tmp is configured','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.','','Configure /etc/fstab as appropriate or Run the following commands to enable systemd /tmp mounting: systemctl umask tmp.mount; systemctl enable tmp.mount. Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to configure the /tmp mount.','[{\"cis\": [\"1.1.2\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1508,'Ensure nodev option set on /tmp partition','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.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options). See the fstab(5) manual page for more information. # mount -o remount,nodev /tmp','[{\"cis\": [\"1.1.3\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1509,'Ensure nosuid option set on /tmp partition','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.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options). See the fstab(5) manual page for more information. # mount -o remount,nosuid /tmp','[{\"cis\": [\"1.1.4\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1510,'Ensure separate partition exists for /var','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.','','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.','[{\"cis\": [\"1.1.5\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1511,'Ensure separate partition exists for /var/tmp','The /var/tmp directory is a world-writable directory used for temporary storage by all users and some applications.','Since the /var/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 /var/tmp its own file system allows an administrator to set the noexec option on the mount, making /var/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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var/tmp. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.6\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1512,'Ensure nodev option set on /var/tmp partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the /var/tmp filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices in /var/tmp.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /var/tmp: # mount -o remount,nodev /var/tmp','[{\"cis\": [\"1.1.7\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1513,'Ensure nosuid option set on /var/tmp partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /var/tmp.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /var/tmp: # mount -o remount,nosuid /var/tmp','[{\"cis\": [\"1.1.8\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1514,'Ensure noexec option set on /var/tmp partition','The noexec mount option specifies that the filesystem cannot contain executable binaries.','Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /var/tmp.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /var/tmp: # mount -o remount,noexec /var/tmp','[{\"cis\": [\"1.1.9\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1515,'Ensure separate partition exists for /var/log','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.','','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.','[{\"cis\": [\"1.1.10\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1516,'Ensure separate partition exists for /var/log/audit','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.','','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.','[{\"cis\": [\"1.1.11\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1517,'Ensure separate partition exists for /home','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.','','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.','[{\"cis\": [\"1.1.12\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1518,'Ensure nodev option set on /home partition','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.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options). See the fstab(5) manual page for more information. # mount -o remount,nodev /home','[{\"cis\": [\"1.1.13\"]}, {\"cis_csc\": [\"13\", \"15.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1519,'Ensure nodev option set on /dev/shm partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the /run/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.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /dev/shm partition. See the fstab(5) manual page for more information. Run the following command to remount /dev/shm: # mount -o remount,nodev /dev/shm','[{\"cis\": [\"1.1.14\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1520,'Ensure nosuid option set on /dev/shm partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /dev/shm partition. See the fstab(5) manual page for more information. Run the following command to remount /dev/shm: # mount -o remount,nosuid /dev/shm','[{\"cis\": [\"1.1.15\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1521,'Ensure noexec option set on /dev/shm partition','The noexec mount option specifies that the filesystem cannot contain executable binaries.','Setting this option on a file system prevents users from executing programs from shared memory. This deters users from introducing potentially malicious software on the system.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /dev/shm partition. See the fstab(5) manual page for more information. Run the following command to remount /dev/shm: # mount -o remount,noexec /run/shm','[{\"cis\": [\"1.1.16\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1522,'Disable Automounting','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.','','Disable autofs: # update-rc.d autofs disable','[{\"cis\": [\"1.1.21\"]}, {\"cis_csc\": [\"8.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1523,'Ensure AIDE is installed','AIDE takes a snapshot of filesystem state including modification times, permissions, and file hashes which can then be used to compare against the current state of the filesystem to detect modifications to the system.','By monitoring the filesystem state compromised files can be detected to prevent or limit the exposure of accidental or malicious misconfigurations or modified binaries.','','Install AIDE: # apt-get install aide aide-common. Configure AIDE as appropriate for your environment. Consult the AIDE documentation for options. Initialize AIDE: # aideinit','[{\"cis\": [\"1.3.1\"]}, {\"cis_csc\": [\"3.5\"]}, {\"pci_dss\": [\"11.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(1524,'Ensure filesystem integrity is regularly checked','Periodic checking of the filesystem integrity is needed to detect changes to the filesystem.','Periodic file checking allows the system administrator to determine on a regular basis if critical files have been changed in an unauthorized fashion.','','Execute the following command: # crontab -u root -e Add the following line to the crontab: 0 5 * * * /usr/sbin/aide --check. Note: The checking in this instance occurs every day at 5am. Alter the frequency and time of the checks in compliance with site policy.','[{\"cis\": [\"1.3.2\"]}, {\"cis_csc\": [\"3.5\"]}, {\"pci_dss\": [\"11.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(1525,'Ensure permissions on bootloader config are configured','The grub configuration file contains information on boot settings and passwords for unlocking boot options. The grub configuration is usually grub.cfg stored in /boot/grub.','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.','','Run the following commands to set permissions on your grub configuration: chown root:root /boot/grub/grub.cfg, chmod og-rwx /boot/grub/grub.cfg','[{\"cis\": [\"1.4.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1526,'Ensure bootloader password is set','Setting the boot loader password will require that anyone rebooting the system must enter a password before being able to set command line boot parameters.','Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off SELinux at boot time).','','1) Create an encrypted password with grub-md5-crypt: # grub-mkpasswd-pbkdf2 Enter password: <password> Reenter password: <password> Your PBKDF2 is <encrypted-password> 2) Add the following into /etc/grub.d/00_header or a custom /etc/grub.d configuration file: cat <<EOF set superusers="<user-list>" password_pbkdf2 <user> <encrypted-password> EOF Unless the --unrestricted option is added to CLASS in /etc/grub.d/10_linux a password will be required to boot in addition to editing boot parameters: CLASS="--class gnu-linux --class gnu --class os --unrestricted" 3) Run the following to update the grub configuration: # update-grub','[{\"cis\": [\"1.4.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1527,'Ensure authentication required for single user mode','Single user mode is used for recovery when the system detects an issue during boot or by manual selection from the bootloader.','Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials.','','Run the following command and follow the prompts to set a password for the root user: # passwd root','[{\"cis\": [\"1.4.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1528,'Ensure core dumps are restricted','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.','','Add the following line to the /etc/security/limits.conf file. * hard core 0 Add the following line to the /etc/sysctl.conf file: fs.suid_dumpable = 0. Run the following command to set the active kernel parameter: # sysctl -w fs.suid_dumpable=0','[{\"cis\": [\"1.5.1\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1529,'Ensure XD/NX support is enabled','Recent processors in the x86 family support the ability to prevent code execution on a per memory page basis. Generically and on AMD processors, this ability is called No Execute (NX), while on Intel processors it is called Execute Disable (XD). This ability can help prevent exploitation of buffer overflow vulnerabilities and should be activated whenever possible. Extra steps must be taken to ensure that this protection is enabled, particularly on 32-bit x86 systems. Other processors, such as Itanium and POWER, have included such support since inception and the standard kernel for those platforms supports the feature.','Enabling any feature that can protect against buffer overflow attacks enhances the security of the system.','','On 32 bit systems install a kernel with PAE support, no installation is required on 64 bit systems: If necessary configure your bootloader to load the new kernel and reboot the system. You may need to enable NX or XD support in your bios.','[{\"cis\": [\"1.5.2\"]}, {\"cis_csc\": [\"8.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1530,'Ensure address space layout randomization (ASLR) is enabled','Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process.','Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting.','','Add the following line to the /etc/sysctl.conf file: kernel.randomize_va_space = 2 and run the following command to set the active kernel parameter: # sysctl -w kernel.randomize_va_space=2','[{\"cis\": [\"1.5.3\"]}, {\"cis_csc\": [\"8.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1531,'Ensure prelink is disabled','prelink is a program that modifies ELF shared libraries and ELF dynamically linked binaries in such a way that the time needed for the dynamic linker to perform relocations at startup significantly decreases.','The prelinking feature can interfere with the operation of AIDE, because it changes binaries. Prelinking can also increase the vulnerability of the system if a malicious user is able to compromise a common library such as libc.','','Run the following commands to restore binaries to normal and uninstall prelink: prelink -ua && apt-get remove prelink','[{\"cis\": [\"1.5.4\"]}, {\"cis_csc\": [\"3.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1532,'Ensure SELinux is not disabled in bootloader configuration','Configure SELINUX to be enabled at boot time and verify that it has not been overwritten by the grub boot parameters.','SELinux must be enabled at boot time in your grub configuration to ensure that the controls it provides are not overridden.','','Edit /etc/default/grub and remove all instances of selinux=0 and enforcing=0 from all CMDLINE_LINUX parameters: GRUB_CMDLINE_LINUX_DEFAULT="quiet" GRUB_CMDLINE_LINUX="" || Run the following command to update the grub2 configuration: # update-grub','[{\"cis\": [\"1.6.1.1\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1533,'Ensure the SELinux state is enforcing','Set SELinux to enable when the system is booted.','SELinux must be enabled at boot time in to ensure that the controls it provides are in effect at all times.','','Edit the /etc/selinux/config file to set the SELINUX parameter: SELINUX=enforcing','[{\"cis\": [\"1.6.1.2\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1534,'Ensure SELinux policy is configured','Configure SELinux to meet or exceed the default targeted policy, which constrains daemons and system software only.','Security configuration requirements vary from site to site. Some sites may mandate a policy that is stricter than the default policy, which is perfectly acceptable. This item is intended to ensure that at least the default recommendations are met.','','Edit the /etc/selinux/config file to set the SELINUXTYPE parameter: SELINUXTYPE=targeted','[{\"cis\": [\"1.6.1.3\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1535,'Ensure no unconfined daemons exist','Daemons that are not defined in SELinux policy will inherit the security context of their parent process.','Since daemons are launched and descend from the init process, they will inherit the security context label initrc_t . This could cause the unintended consequence of giving the process more permission than it requires.','','Investigate any unconfined daemons found during the audit action. They may need to have an existing security context assigned to them or a policy built for them.','[{\"cis\": [\"1.6.1.4\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1536,'Ensure AppArmor is enabled in the bootloader configuration','Configure AppArmor to be enabled at boot time and verify that it has not been overwrittenby the bootloader boot parameters.','AppArmor must be enabled at boot time in your grub configuration to ensure that the controls it provides are not overridden.','','Edit /etc/default/grub and add the appermor=1 and security=apparmor parameters to the GRUB_CMDLINE_LINUX= line GRUB_CMDLINE_LINUX="apparmor=1 security=apparmor" update the grub configuration # update-grub Notes: This recommendation is designed around the grub bootloader, if LILO or another bootloader is in use in your environment enact equivalent settings.','[{\"cis\": [\"1.6.2.1\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1537,'Ensure all AppArmor Profiles are enforcing','AppArmor profiles define what resources applicatons are able to access.','Security configuration requirements vary from site to site. Some sites may mandate a policy that is stricter than the default policy, which is perfectly acceptable. This item is intended to ensure that any policies that exist on the system are activated..','','Run the following command to set all profiles to enforce mode: # aa-enforce /etc/apparmor.d/* Any unconfined processes may need to have a profile created or activated for them and then be restarted.','[{\"cis\": [\"1.6.2.2\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1538,'Ensure SELinux or AppArmor are installed','SELinux and AppArmor provide Mandatory Access Controls.','Without a Mandatory Access Control system installed only the default Discretionary Access Control system will be available.','','Run one of the following commands to install SELinux or apparmor: # apt-get install selinux-basics Or: # apt-get install apparmor apparmor-profiles apparmor-utils','[{\"cis\": [\"1.6.3\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1539,'Ensure message of the day is configured properly','The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/motd file with the appropriate contents according to your site policy, remove any instances of m , , s , or v.','[{\"cis\": [\"1.7.1.1\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"7.1\"]}]'),(1540,'Ensure local login warning banner is configured properly','The contents of the /etc/issue file are displayed to users prior to login for local terminals. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/issue file with the appropriate contents according to your site policy, remove any instances of m, ,s, or v: # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue','[{\"cis\": [\"1.7.1.2\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"7.1\"]}]'),(1541,'Ensure remote login warning banner is configured properly','The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/issue.net file with the appropriate contents according to your site policy, remove any instances of m , , s , or v: # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue.net','[{\"cis\": [\"1.7.1.3\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"7.1\"]}]'),(1542,'Ensure permissions on /etc/motd are configured','The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users.','If the /etc/motd file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/motd: # chown root:root /etc/motd # chmod 644 /etc/motd','[{\"cis\": [\"1.7.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(1543,'Ensure permissions on /etc/issue are configured','The contents of the /etc/issue file are displayed to users prior to login for local terminals.','If the /etc/issue file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/issue: # chown root:root /etc/issue # chmod 644 /etc/issue','[{\"cis\": [\"1.7.1.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(1544,'Ensure permissions on /etc/issue.net are configured','The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services.','If the /etc/issue.net file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/issue.net: # chown root:root /etc/issue.net # chmod 644 /etc/issue.net','[{\"cis\": [\"1.7.1.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(1545,'Ensure GDM login banner is configured','GDM is the GNOME Display Manager which handles graphical login for GNOME based systems.','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place.','','Edit or create the file /etc/gdm3/greeter.dconf-defaults and add: [org/gnome/login-screen], banner-message-enable=true, banner-message-text='Authorized uses only. All activity may be monitored and reported.'','[{\"cis\": [\"1.7.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1546,'Ensure updates, patches, and additional security software are installed','Periodically patches are released for included software either due to security flaws or to include additional functionality.','Newer patches may contain security enhancements that would not be available through the latest full update. As a result, it is recommended that the latest software patches be used to take advantage of the latest functionality. As with any software installation, organizations need to determine if a given update meets their requirements and verify the compatibility and supportability of any additional software against the update revision that is selected.','','Use your package manager to update all packages on the system according to site policy. Notes: Site policy may mandate a testing period before install onto production systems for available updates.','[{\"cis\": [\"1.8\"]}, {\"cis_csc\": [\"4.5\"]}, {\"pci_dss\": [\"5.2\"]}, {\"nist_800_53\": [\"AU.6\", \"SI.4\"]}, {\"gpg_13\": [\"4.2\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"A1.2\"]}]'),(1547,'Ensure xinetd is not installed','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.','','Run the following command to disable xinetd: # apt-get remove xinetd','[{\"cis\": [\"2.1.1\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1548,'Ensure inetd is not installed','The inetd daemon listens for well known services and dispatches the appropriate daemon to properly respond to service requests.','If there are no inetd services required, it is recommended that the daemon be removed.','','Run the following commands to uninstall openbsd-inetd and inetutils-inetd: # apt-get remove openbsd-inetd # apt-get remove inetutils-inetd','[{\"cis\": [\"2.1.2\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1549,'Ensure time synchronization is in use','System time should be synchronized between all systems in an environment. This is typically done by establishing an authoritative time server or set of servers and having all systems synchronize their clocks to them.','Time synchronization is important to support time sensitive security mechanisms like Kerberos and also ensures log files have consistent time records across the enterprise, which aids in forensic investigations.','','On physical systems or virtual systems where host based time synchronization is not available install NTP or chrony using one of the following commands: # apt-get install ntp # apt-get install chrony On virtual systems where host based time synchronization is available consult your virtualization software documentation and setup host based synchronization.','[{\"cis\": [\"2.2.1.1\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"10.4\"]}, {\"nist_800_53\": [\"AU.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(1550,'Ensure ntp is configured','ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at http://www.ntp.org. ntp can be configured to be a client and/or a server. This recommendation only applies if ntp is in use on the system.','If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly.','','Add or edit restrict lines in /etc/ntp.conf to match the following: restrict -4 default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery . Add or edit server or pool lines to /etc/ntp.conf as appropriate: server <remote-server> . Configure ntp to run as the ntp user by adding or editing the /etc/init.d/ntp file: RUNASUSER=ntp','[{\"cis\": [\"2.2.1.2\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1551,'Ensure chrony is configured','chrony is a daemon which implements the Network Time Protocol (NTP) is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on chrony can be found at http://chrony.tuxfamily.org/. chrony can be configured to be a client and/or a server.','If chrony is in use on the system proper configuration is vital to ensuring time synchronization is working properly. This recommendation only applies if chrony is in use on the system.','','Add or edit server or pool lines to /etc/chrony/chrony.conf as appropriate: server <remote-server>','[{\"cis\": [\"2.2.1.3\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1552,'Ensure the X Window system is not installed','The X Window System provides a Graphical User Interface (GUI) where users can have multiple windows in which to run programs and various add on. The X Windows system is typically used on workstations where users login, but not on servers where users typically do not login.','Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface.','','Run the following command to remove the X Windows System packages: apt-get remove xserver-xorg*','[{\"cis\": [\"2.2.2\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(1553,'Ensure Avahi Server is not enabled','Avahi is a free zeroconf implementation, including a system for multicast DNS/DNS-SD service discovery. Avahi allows programs to publish and discover services and hosts running on a local network with no specific configuration. For example, a user can plug a computer into a network and Avahi automatically finds printers to print to, files to look at and people to talk to, as well as network services running on the machine.','Automatic discovery of network services is not normally required for system functionality. It is recommended to disable the service to reduce the potential attach surface.','','Run the following command to disable avahi-daemon: # systemctl disable avahi-daemon','[{\"cis\": [\"2.2.3\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1554,'Ensure CUPS is not enabled','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.','','Run the following command to disable cups: # systemctl disable cups','[{\"cis\": [\"2.2.4\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1555,'Ensure DHCP Server is not enabled','The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses.','Unless a system is specifically set up to act as a DHCP server, it is recommended that this service be disabled to reduce the potential attack surface.','','Run the following commands to disable dhcpd: # systemctl disable isc-dhcp-server # systemctl disable isc-dhcp-server6','[{\"cis\": [\"2.2.5\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1556,'Ensure LDAP server is not enabled','The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.','If the system will not need to act as an LDAP server, it is recommended that the software be disabled to reduce the potential attack surface.','','Run the following command to disable slapd: # systemctl disable slapd','[{\"cis\": [\"2.2.6\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1557,'Ensure NFS and RPC are not enabled','The Network File System (NFS) is one of the first and most widely distributed file systems in the UNIX environment. It provides the ability for systems to mount file systems of other servers through the network.','If the system does not export NFS shares or act as an NFS client, it is recommended that these services be disabled to reduce remote attack surface.','','Run the following commands to disable nfs and rpcbind: # systemctl disable nfs-server # systemctl disable rpcbind','[{\"cis\": [\"2.2.7\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1558,'Ensure DNS Server is not enabled','The Domain Name System (DNS) is a hierarchical naming system that maps names to IP addresses for computers, services and other resources connected to a network.','Unless a system is specifically designated to act as a DNS server, it is recommended that the package be deleted to reduce the potential attack surface.','','Run the following command to disable named: # systemctl disable bind9','[{\"cis\": [\"2.2.8\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1559,'Ensure FTP Server is not enabled','The File 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.','','Run the following command to disable vsftpd: # systemctl disable vsftpd','[{\"cis\": [\"2.2.9\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1560,'Ensure HTTP Server is not enabled','HTTP or web servers provide the ability to host web site content.','Unless there is a need to run the system as a web server, it is recommended that the package be deleted to reduce the potential attack surface.','','Run the following command to disable apache2: # systemctl disable apache2','[{\"cis\": [\"2.2.10\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1561,'Ensure IMAP and POP3 server is not enabled','exim is an open source IMAP and POP3 server for Linux based systems.','Unless POP3 and/or IMAP servers are to be provided by this system, it is recommended that the package be removed to reduce the potential attack surface.','','Run the following commands to remove exim: # apt-get remove exim4; # apt-get purge exim4','[{\"cis\": [\"2.2.11\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1562,'Ensure Samba is not enabled','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.','','Run the following command to disable smbd: # systemctl disable smbd','[{\"cis\": [\"2.2.12\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1563,'Ensure HTTP Proxy Server is not enabled','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.','','Run the following command to disable squid: # systemctl disable squid','[{\"cis\": [\"2.2.13\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1564,'Ensure SNMP Server is not enabled','The Simple Network Management Protocol (SNMP) server is used to listen for SNMP commands from an SNMP management system, execute the commands or collect the information and then send results back to the requesting system.','The SNMP server can communicate using SNMP v1, which transmits data in the clear and does not require authentication to execute commands. Unless absolutely necessary, it is recommended that the SNMP service not be used. If SNMP is required the server should be configured to disallow SNMP v1.','','Run the following command to disable snmpd: # systemctl disable snmpd','[{\"cis\": [\"2.2.14\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1565,'Ensure mail transfer agent is configured for local-only mode','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.','','Edit /etc/postfix/main.cf and add the following line to the RECEIVING MAIL section. If the line already exists, change it to look like the line below: inet_interfaces = loopback-only . Restart postfix: # systemctl restart postfix','[{\"cis\": [\"2.2.15\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AC.4\", \"SC.7\"]}, {\"tsc\": [\"CC5.2\", \"CC6.4\", \"CC6.6\", \"CC6.7\"]}]'),(1566,'Ensure rsync service is not enabled','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.','','Run the following command to disable rsync: # systemctl disable rsync','[{\"cis\": [\"2.2.16\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(1567,'Ensure NIS Server is not enabled','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','','Run the following command to disable nis: # systemctl disable nis','[{\"cis\": [\"2.2.17\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1568,'Ensure NIS Client is not installed','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 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.','','Uninstall the nis package: # apt-get remove nis','[{\"cis\": [\"2.3.1\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1569,'Ensure rsh client is not installed','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 rshpackage removes the clients for rsh, rcpand rlogin.','','Run the following command to uninstall rsh: apt-get remove rsh-client rsh-redone-client','[{\"cis\": [\"2.3.2\"]}, {\"cis_csc\": [\"3.4\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1570,'Ensure talk client is not installed','The talk software makes it possible for users to send and receive messages across systems through a terminal session. The talkclient, which allows initialization of talk sessions, is installed by default.','The software presents a security risk as it uses unencrypted protocols for communication.','','Run the following command to uninstall talk: apt-get remove talk','[{\"cis\": [\"2.3.3\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1571,'Ensure telnet client is not installed','The telnet package contains the telnet client, which allows users to start connections to other systems via the telnet protocol.','The telnet protocol is insecure and unencrypted. The use of an unencrypted transmission medium could allow an unauthorized user to steal credentials. The ssh package provides an encrypted session and stronger security and is included in most Linux distributions.','','Run the following command to uninstall telnet: # apt-get remove telnet','[{\"cis\": [\"2.3.4\"]}, {\"cis_csc\": [\"3.4\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1572,'Ensure LDAP client is not installed','The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.','If the system will not need to act as an LDAP client, it is recommended that the software be removed to reduce the potential attack surface.','','Uninstall ldap-utils using the appropriate package manager or manual installation: # apt-get remove ldap-utils','[{\"cis\": [\"2.3.5\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1573,'Ensure IP forwarding is disabled','The net.ipv4.ip_forward and net.ipv6.conf.all.forwarding flags are used to tell the system whether it can forward packets or not.','Setting the flags to 0 ensures that a system with multiple interfaces (for example, a hard proxy), will never be able to forward packets, and therefore, never serve as a router.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.ip_forward = 0 net.ipv6.conf.all.forwarding = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.ip_forward=0 # sysctl -w net.ipv6.conf.all.forwarding=0 # sysctl -w net.ipv4.route.flush=1 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.1.1\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1574,'Ensure packet redirect sending is disabled','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.','','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 net.ipv4.conf.default.send_redirects=0 Modify active kernel parameters to match: # sysctl -w net.ipv4.conf.all.send_redirects=0 # sysctl -w net.ipv4.conf.default.send_redirects=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.1.2\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1575,'Ensure source routed packets are not accepted','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, net.ipv4.conf.default.accept_source_route, net.ipv6.conf.all.accept_source_route and net.ipv6.conf.default.accept_source_route to 0 disables the system from accepting source routed packets. Assume this system was capable of routing packets to Internet routable addresses on one interface and private addresses on another interface. Assume that the private addresses were not routable to the Internet routable addresses and vice versa. Under normal routing circumstances, an attacker from the Internet routable addresses could not use the system as a way to reach the private address systems. If, however, source routed packets were allowed, they could be used to gain access to the private address systems as the route could be specified, rather than rely on routing protocols that did not allow this routing.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 net.ipv6.conf.all.accept_source_route = 0 net.ipv6.conf.default.accept_source_route = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_source_route=0 # sysctl -w net.ipv4.conf.default.accept_source_route=0 # sysctl -w net.ipv6.conf.all.accept_source_route=0 # sysctl -w net.ipv6.conf.default.accept_source_route=0 # sysctl -w net.ipv4.route.flush=1 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.2.1\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1576,'Ensure ICMP redirects are not accepted','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 net.ipv6.conf.all.accept_redirects = 0 net.ipv6.conf.default.accept_redirects = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_redirects=0 # sysctl -w net.ipv4.conf.default.accept_redirects=0 # sysctl -w net.ipv6.conf.all.accept_redirects=0 # sysctl -w net.ipv6.conf.default.accept_redirects=0 # sysctl -w net.ipv4.route.flush=1 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.2.2\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1577,'Ensure secure ICMP redirects are not accepted','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.secure_redirects = 0 net.ipv4.conf.default.secure_redirects = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.secure_redirects=0 # sysctl -w net.ipv4.conf.default.secure_redirects=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.3\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1578,'Ensure suspicious packets are logged','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.log_martians = 1 net.ipv4.conf.default.log_martians = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.log_martians=1 # sysctl -w net.ipv4.conf.default.log_martians=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.4\"]}, {\"cis_csc\": [\"6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1579,'Ensure broadcast ICMP requests are ignored','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_echo_ignore_broadcasts = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.5\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1580,'Ensure bogus ICMP responses are ignored','Setting icmp_ignore_bogus_error_responses to 1 prevents the kernel from logging bogus responses (RFC-1122 non-compliant) from broadcast reframes, keeping file systems from filling up with useless log messages.','Some routers (and some attackers) will send responses that violate RFC-1122 and attempt to fill up a log file system with many useless error messages.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_ignore_bogus_error_responses = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.6\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1581,'Ensure Reverse Path Filtering is enabled','Setting net.ipv4.conf.all.rp_filter and net.ipv4.conf.default.rp_filter to 1 forces the Linux kernel to utilize reverse path filtering on a received packet to determine if the packet was valid. Essentially, with reverse path filtering, if the return packet does not go out the same interface that the corresponding source packet came from, the packet is dropped (and logged if log_martians is set).','Setting these flags is a good way to deter attackers from sending your system bogus packets that cannot be responded to. One instance where this feature breaks down is if asymmetrical routing is employed. This would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your system, you will not be able to enable this feature without breaking the routing.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.rp_filter=1 # sysctl -w net.ipv4.conf.default.rp_filter=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.7\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1582,'Ensure TCP SYN Cookies is enabled','When tcp_syncookies is set, the kernel will handle TCP SYN packets normally until the half-open connection queue is full, at which time, the SYN cookie functionality kicks in. SYN cookies work by not using the SYN queue at all. Instead, the kernel simply replies to the SYN with a SYN|ACK, but will include a specially crafted TCP sequence number that encodes the source and destination IP address and port number and the time the packet was sent. A legitimate connection would send the ACK packet of the three way handshake with the specially crafted sequence number. This allows the system to verify that it has received a valid response to a SYN cookie and allow the connection, even though there is no corresponding SYN in the queue.','Attackers use SYN flood attacks to perform a denial of service attacked on a system by sending many SYN packets without completing the three way handshake. This will quickly use up slots in the kernel's half-open connection queue and prevent legitimate connections from succeeding. SYN cookies allow the system to keep accepting valid connections, even if under a denial of service attack.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.tcp_syncookies = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.tcp_syncookies=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.8\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1583,'Ensure IPv6 router advertisements are not accepted','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.default.accept_ra = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_ra=0 # sysctl -w net.ipv6.conf.default.accept_ra=0 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.2.9\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1584,'Install TCP Wrappers','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.','','Install tcpd : # apt-get install tcpd Notes: To verify if a service supports TCP Wrappers, run the following command: # ldd <path-to-daemon> | grep libwrap.so If there is any output, then the service supports TCP Wrappers.','[{\"cis\": [\"3.3.1\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(1585,'Ensure /etc/hosts.allow is configured','The /etc/hosts.allow file specifies which IP addresses are permitted to connect to the host. It is intended to be used in conjunction with the /etc/hosts.deny file.','The /etc/hosts.allow file supports access control by IP and helps ensure that only authorized systems can connect to the system.','','Run the following command to create /etc/hosts.allow: # echo "ALL: <net>/<mask>, <net>/<mask>, ..." >/etc/hosts.allow. Where each <net>/<mask> combination (for example, "192.168.1.0/255.255.255.0") represents one network block in use by your organization that requires access to this system.','[{\"cis\": [\"3.3.2\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(1586,'Ensure /etc/hosts.deny is configured','The /etc/hosts.deny file specifies which IP addresses are not permitted to connect to the host. It is intended to be used in conjunction with the /etc/hosts.allow file.','The /etc/hosts.deny file serves as a failsafe so that any host not specified in /etc/hosts.allow is denied access to the server.','','Run the following command to create /etc/hosts.deny: # echo "ALL: ALL" >> /etc/hosts.deny','[{\"cis\": [\"3.3.3\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(1587,'Verify permissions on /etc/hosts.allow','The /etc/hosts.allow 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.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.','','Run the following commands to set permissions on /etc/hosts.allow : # chown root:root /etc/hosts.allow # chmod 644 /etc/hosts.allow','[{\"cis\": [\"3.3.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"1.3.5\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1588,'Verify permissions on /etc/hosts.deny','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.','','Run the following commands to set permissions on /etc/hosts.deny : # chown root:root /etc/hosts.deny # chmod 644 /etc/hosts.deny','[{\"cis\": [\"3.3.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"1.3.5\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1589,'Ensure DCCP is disabled','The Datagram Congestion Control Protocol (DCCP) is a transport layer protocol that supports streaming media and telephony. DCCP provides a way to gain access to congestion control, without having to do it at the application layer, but does not provide in- sequence delivery.','If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/dccp.conf and add the following line: install dccp /bin/true','[{\"cis\": [\"3.4.1\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1590,'Ensure SCTP is disabled','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.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/sctp.conf and add the following line: install sctp /bin/true','[{\"cis\": [\"3.4.2\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1591,'Ensure RDS is disabled','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.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/rds.conf and add the following line: install rds /bin/true','[{\"cis\": [\"3.4.3\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1592,'Ensure TIPC is disabled','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.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/tipc.conf and add the following line: install tipc /bin/true','[{\"cis\": [\"3.4.4\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1593,'Ensure default deny firewall policy','A default deny all policy on connections ensures that any unconfigured network usage will be rejected.','With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following commands to implement a default DROP policy: # iptables -P INPUT DROP # iptables -P OUTPUT DROP # iptables -P FORWARD DROP. Notes: Changing firewall settings while connected over network can result in being locked out of the system. Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well.','[{\"cis\": [\"3.5.1.1\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(1594,'Ensure loopback traffic is configured','Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (127.0.0.0/8).','Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (127.0.0.0/8) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.','','Run the following commands to implement the loopback rules: # iptables -A INPUT -i lo -j ACCEPT # iptables -A OUTPUT -o lo -j ACCEPT # iptables -A INPUT -s 127.0.0.0/8 -j DROP','[{\"cis\": [\"3.5.1.2\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(1595,'Ensure IPv6 default deny firewall policy','A default deny all policy on connections ensures that any unconfigured network usage will be rejected.','With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following commands to implement a default DROP policy: # ip6tables -P INPUT DROP # ip6tables -P OUTPUT DROP # ip6tables -P FORWARD DROP. Notes: Changing firewall settings while connected over network can result in being locked out of the system. Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well.','[{\"cis\": [\"3.5.2.1\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(1596,'Ensure IPv6 loopback traffic is configured','Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (::1).','Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (::1) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.','','Run the following commands to implement the loopback rules: # ip6tables -A INPUT -i lo -j ACCEPT # ip6tables -A OUTPUT -o lo -j ACCEPT # ip6tables -A INPUT -s ::1 -j DROP','[{\"cis\": [\"3.5.2.2\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(1597,'Ensure iptables is installed','iptables allows configuration of the IPv4 tables in the linux kernel and the rules stored within them. Most firewall configuration utilities operate as a front end to iptables.','iptables is required for firewall management and configuration.','','Run the following command to install iptables: # apt-get install iptables','[{\"cis\": [\"3.5.3\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(1598,'Disable IPv6','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.','','Edit /etc/default/grub and add ipv6.disable=1 to the GRUB_CMDLINE_LINUX parameters: GRUB_CMDLINE_LINUX="ipv6.disable=1" Run the following command to update the grub2 configuration: # update-grub','[{\"cis\": [\"3.7\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1599,'Ensure audit log storage size is configured','Configure the maximum size of the audit log file. Once the log reaches the maximum size, it will be rotated and a new log file will be started.','It is important that an appropriate size is determined for log files so that they do not impact the system and audit data is not lost.','','Set the following parameter in /etc/audit/auditd.conf in accordance with site policy: max_log_file = <MB> Notes: The max_log_file parameter is measured in megabytes.','[{\"cis\": [\"4.1.1.1\"]}, {\"cis_csc\": [\"6.3\"]}]'),(1600,'Ensure system is disabled when audit logs are full','The auditd daemon can be configured to halt the system when the audit logs are full.','In high security contexts, the risk of detecting unauthorized access or nonrepudiation exceeds the benefit of the system's availability.','','Set the following parameters in /etc/audit/auditd.conf: space_left_action = email action_mail_acct = root admin_space_left_action = halt','[{\"cis\": [\"4.1.1.2\"]}, {\"cis_csc\": [\"6.3\"]}]'),(1601,'Ensure audit logs are not automatically deleted','The max_log_file_action setting determines how to handle the audit log file reaching the max file size. A value of keep_logs will rotate the logs but never delete old logs.','In high security contexts, the benefits of maintaining a long audit history exceed the cost of storing the audit history.','','Set the following parameter in /etc/audit/auditd.conf: max_log_file_action = keep_logs','[{\"cis\": [\"4.1.1.3\"]}, {\"cis_csc\": [\"6.3\"]}]'),(1602,'Ensure auditd service is enabled','Turn on the auditd daemon to record system events.','The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring.','','Run the following command to enable auditd: # systemctl enable auditd','[{\"cis\": [\"4.1.2\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.1\", \"10.7\"]}, {\"tsc\": [\"CC6.1\"\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(1603,'Ensure auditing for processes that start prior to auditd is enabled','Configure grub or lilo so that processes that are capable of being audited can be audited even if they start up prior to auditd startup.','Audit events need to be captured on processes that start up prior to auditd, so that potential malicious activity cannot go undetected.','','1) Edit /etc/default/grub and add audit=1 to GRUB_CMDLINE_LINUX: GRUB_CMDLINE_LINUX="audit=1" 2) Run the following command to update the grub2 configuration: # update-grub Notes: This recommendation is designed around the grub bootloader, if LILO or another bootloader is in use in your environment enact equivalent settings.','[{\"cis\": [\"4.1.3\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.2.6\", \"10.7\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"35.7.d\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(1604,'Ensure events that modify date and time information are collected','Capture events where the system date and/or time has been modified. The parameters in this section are set to determine if the adjtimex (tune kernel clock), settimeofday (Set time, using timeval and timezone structures) stime (using seconds since 1/1/1970) or clock_settime (allows for the setting of several internal clocks and timers) system calls have been executed and always write an audit record to the /var/log/audit.log file upon exit, tagging the records with the identifier "time-change"','Unexpected changes in system date and/or time could be a sign of malicious activity on the system.','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time- change | -a always,exit -F arch=b32 -S clock_settime -k time-change | -w /etc/localtime -p wa -k time-change. For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change | -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change | -a always,exit -F arch=b64 -S clock_settime -k time-change -a always,exit -F arch=b32 -S clock_settime -k time-change | -w /etc/localtime -p wa -k time-change','[{\"cis\": [\"4.1.4\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.4.2\", \"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.3\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(1605,'Ensure events that modify user/group information are collected','Record events affecting the group , passwd (user IDs), shadow and gshadow (passwords) or /etc/security/opasswd (old passwords, based on remember parameter in the PAM configuration) files. The parameters in this section will watch the files to see if they have been opened for write or have had attribute changes (e.g. permissions) and tag them with the identifier "identity" in the audit log file.','Unexpected changes to these files could be an indication that the system has been compromised and that an unauthorized user is attempting to hide their activities or compromise additional accounts.','','Add the following lines to the /etc/audit/audit.rules file: -w /etc/group -p wa -k identity | -w /etc/passwd -p wa -k identity | -w /etc/gshadow -p wa -k identity | -w /etc/shadow -p wa -k identity | -w /etc/security/opasswd -p wa -k identity Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.5\"]}, {\"cis_csc\": [\"5.4\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(1606,'Ensure events that modify the system's network environment are collected','Record changes to network environment files or system calls. The below parameters monitor the sethostname (set the systems host name) or setdomainname (set the systems domainname) system calls, and write an audit event on system call exit. The other parameters monitor the /etc/issue and /etc/issue.net files (messages displayed pre- login), /etc/hosts (file containing host names and associated IP addresses) and /etc/sysconfig/network (directory containing network interface scripts and configurations) files.','Monitoring sethostname and setdomainname will identify potential unauthorized changes to host and domainname of a system. The changing of these names could potentially break security parameters that are set based on those names. The /etc/hosts file is monitored for changes in the file that can indicate an unauthorized intruder is trying to change machine associations with IP addresses and trick users and processes into connecting to unintended machines. Monitoring /etc/issue and /etc/issue.net is important, as intruders could put disinformation into those files and trick users into providing information to the intruder. Monitoring /etc/sysconfig/network is important as it can show if network interfaces or scripts are being modified in a way that can lead to the machine becoming unavailable or compromised. All audit records will be tagged with the identifier "system-locale."','','For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S sethostname -S setdomainname -k system-locale | -a always,exit -F arch=b32 -S sethostname -S setdomainname -k system-locale | -w /etc/issue -p wa -k system-locale | -w /etc/issue.net -p wa -k system-locale | -w /etc/hosts -p wa -k system-locale | -w /etc/sysconfig/network -p wa -k system-locale Notes: /etc/sysconfig/network is common to Red Hat and SUSE based distributions. You should expand or replace this coverage to any network configuration files on your system such as /etc/network on Debian based distributions. Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.6\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(1607,'Ensure events that modify the system's Mandatory Access Controls are collected','Monitor SELinux/AppArmor mandatory access controls. The parameters below monitor any write access (potential additional, deletion or modification of files in the directory) or attribute changes to the /etc/selinux or /etc/apparmor and /etc/apparmor.d directories.','Changes to files in these directories could indicate that an unauthorized user is attempting to modify access controls and change security contexts, leading to a compromise of the system.','','On systems using SELinux add the following line to the /etc/audit/audit.rules file: -w /etc/selinux/ -p wa -k MAC-policy | -w /usr/share/selinux/ -p wa -k MAC-policy On systems using AppArmor add the following line to the /etc/audit/audit.rules file: -w /etc/apparmor/ -p wa -k MAC-policy | -w /etc/apparmor.d/ -p wa -k MAC-policy','[{\"cis\": [\"4.1.7\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(1608,'Ensure login and logout events are collected','Monitor login and logout events. The parameters below track changes to files associated with login/logout events. The file /var/log/faillog tracks failed events from login. The file /var/log/lastlog maintain records of the last time a user successfully logged in. The file /var/log/tallylog maintains records of failures via the pam_tally2 module','Monitoring login/logout events could provide a system administrator with information associated with brute force attacks against user logins.','','Add the following lines to the /etc/audit/audit.rules file: -w /var/log/faillog -p wa -k logins | -w /var/log/lastlog -p wa -k logins | -w /var/log/tallylog -p wa -k logins. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.8\"]}, {\"cis_csc\": [\"5.5\", \"16.10\", \"16.4\"]}, {\"pci_dss\": [\"10.2.1\", \"10.2.4\", \"10.3\"]}, {\"nist_800_53\": [\"AC.7\", \"AU.14\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(1609,'Ensure session initiation information is collected','Monitor session initiation events. The parameters in this section track changes to the files associated with session events. The file /var/run/utmp file tracks all currently logged in users. All audit records will be tagged with the identifier "session." The /var/log/wtmp file tracks logins, logouts, shutdown, and reboot events. The file /var/log/btmp keeps track of failed login attempts and can be read by entering the command /usr/bin/last -f /var/log/btmp . All audit records will be tagged with the identifier "logins."','Monitoring these files for changes could alert a system administrator to logins occurring at unusual hours, which could indicate intruder activity (i.e. a user logging in at a time when they do not normally log in).','','Add the following lines to the /etc/audit/audit.rules file: -w /var/run/utmp -p wa -k session | -w /var/log/wtmp -p wa -k logins | -w /var/log/btmp -p wa -k logins. Notes: The last command can be used to read /var/log/wtmp (last with no parameters) and /var/run/utmp (last -f /var/run/utmp). Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.9\"]}, {\"cis_csc\": [\"5.5\", \"16.10\", \"16.4\"]}, {\"pci_dss\": [\"10.3\"]}, {\"nist_800_53\": [\"AC.7\", \"AU.14\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1610,'Ensure discretionary access control permission modification events are collected','Monitor changes to file permissions, attributes, ownership and group. The parameters in this section track changes for system calls that affect file permissions and attributes. The chmod , fchmod and fchmodat system calls affect the permissions associated with a file. The chown , fchown , fchownat and lchown system calls affect owner and group attributes on a file. The setxattr , lsetxattr , fsetxattr (set extended file attributes) and removexattr , lremovexattr , fremovexattr (remove extended file attributes) control extended file attributes. In all cases, an audit record will only be written for non-system user ids (auid >= 1000) and will ignore Daemon events (auid = 4294967295). All audit records will be tagged with the identifier "perm_mod."','Monitoring for changes in file attributes could alert a system administrator to activity that could indicate intruder activity or policy violation.','','For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod | -a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod | -a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod | -a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod | -a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod | -a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.10\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.4.2\", \"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(1611,'Ensure unsuccessful unauthorized file access attempts are collected','Monitor for unsuccessful attempts to access files. The parameters below are associated with system calls that control creation ( creat ), opening ( open , openat ) and truncation ( truncate , ftruncate ) of files. An audit log record will only be written if the user is a non- privileged user (auid > = 1000), is not a Daemon event (auid=4294967295) and if the system call returned EACCES (permission denied to the file) or EPERM (some other permanent error associated with the specific system call). All audit records will be tagged with the identifier "access."','Failed attempts to open, create or truncate files could be an indication that an individual or process is trying to gain unauthorized access to the system.','','For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access | -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access | -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access | -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.11\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"10.2.4\"]}, {\"nist_800_53\": [\"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(1612,'Ensure successful file system mounts are collected','Monitor the use of the mount system call. The mount (and umount ) system call controls the mounting and unmounting of file systems. The parameters below configure the system to create an audit record when the mount system call is used by a non-privileged user.','It is highly unusual for a non privileged user to mount file systems to the system. While tracking mount commands gives the system administrator evidence that external media may have been mounted (based on a review of the source of the mount and confirming it's an external media type), it does not conclusively indicate that data was exported to the media. System administrators who wish to determine if data were exported, would also have to track successful open , creat and truncate system calls requiring write access to a file under the mount point of the external media file system. This could give a fair indication that a write occurred. The only way to truly prove it, would be to track successful writes to the external media. Tracking write system calls could quickly fill up the audit log and is not recommended. Recommendations on configuration options to track data export to media is beyond the scope of this document.','','For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts | -a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts. Notes: This tracks successful and unsuccessful mount commands. File system mounts do not have to come from external media and this action still does not verify write (e.g. CD ROMS). Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.13\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(1613,'Ensure file deletion events by users are collected','Monitor the use of system calls associated with the deletion or renaming of files and file attributes. This configuration statement sets up monitoring for the unlink (remove a file), unlinkat (remove a file attribute), rename (rename a file) and renameat (rename a file attribute) system calls and tags them with the identifier "delete".','Monitoring these calls from non-privileged users could provide a system administrator with evidence that inappropriate removal of files and file attributes associated with protected files is occurring. While this audit option will look at all events, system administrators will want to look for specific privileged files that are being deleted or altered.','','For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete | -a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete. Notes: At a minimum, configure the audit system to collect file deletion events for all users and root. Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.14\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"10.5.5\"]}, {\"nist_800_53\": [\"AU.14\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(1614,'Ensure changes to system administration scope (sudoers) is collected','Monitor scope changes for system administrations. If the system has been properly configured to force system administrators to log in as themselves first and then use the sudo command to execute privileged commands, it is possible to monitor changes in scope. The file /etc/sudoers will be written to when the file or its attributes have changed. The audit records will be tagged with the identifier "scope."','Changes in the /etc/sudoers file can indicate that an unauthorized change has been made to scope of system administrator activity.','','Add the following line to the /etc/audit/audit.rules file: -w /etc/sudoers -p wa -k scope | -w /etc/sudoers.d/ -p wa -k scope. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.15\"]}, {\"cis_csc\": [\"5.4\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(1615,'Ensure system administrator actions (sudolog) are collected','Monitor the sudo log file. If the system has been properly configured to disable the use of the su command and force all administrators to have to log in first and then use sudo to execute privileged commands, then all administrator commands will be logged to /var/log/sudo.log . Any time a command is executed, an audit event will be triggered as the /var/log/sudo.log file will be opened for write and the executed administration command will be written to the log.','Changes in /var/log/sudo.log indicate that an administrator has executed a command or the log file itself has been tampered with. Administrators will want to correlate the events written to the audit trail with the records written to /var/log/sudo.log to verify if unauthorized commands have been executed.','','Add the following lines to the /etc/audit/audit.rules file: -w /var/log/sudo.log -p wa -k actions. Notes: The system must be configured with sudisabled (See Item 5.6 Ensure access to the su command is restricted) to force all command execution through sudo. This will not be effective on the console, as administrators can log in as root. Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.16\"]}, {\"cis_csc\": [\"5.1\", \"5.5\"]}, {\"pci_dss\": [\"10.2.2\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.6\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(1616,'Ensure kernel module loading and unloading is collected','Monitor the loading and unloading of kernel modules. The programs insmod (install a kernel module), rmmod (remove a kernel module), and modprobe (a more sophisticated program to load and unload modules, as well as some other features) control loading and unloading of modules. The init_module (load a module) and delete_module (delete a module) system calls control loading and unloading of modules. Any execution of the loading and unloading module programs and system calls will trigger an audit record with an identifier of "modules".','Monitoring the use of insmod, rmmod and modprobe could provide system administrators with evidence that an unauthorized user loaded or unloaded a kernel module, possibly compromising the security of the system. Monitoring of the init_module and delete_module system calls would reflect an unauthorized user attempting to use a different program to load and unload modules.','','For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -w /sbin/insmod -p x -k modules | -w /sbin/rmmod -p x -k modules | -w /sbin/modprobe -p x -k modules | -a always,exit -F arch=b64 -S init_module -S delete_module -k modules. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.17\"]}, {\"cis_csc\": [\"3\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(1617,'Ensure the audit configuration is immutable','Set system audit so that audit rules cannot be modified with auditctl. Setting the flag "-e 2" forces audit to be put in immutable mode. Audit changes can only be made on system reboot.','In immutable mode, unauthorized users cannot execute changes to the audit system to potentially hide malicious activity and then put the audit rules back. Users would most likely notice a system reboot and that could alert administrators of an attempt to make unauthorized audit changes.','','Add the following line to the end of the /etc/audit/audit.rules file: -e 2. Notes: This setting will ensure reloading the auditd config to set active settings requires a system reboot.','[{\"cis\": [\"4.1.18\"]}, {\"cis_csc\": [\"3\", \"6\"]}, {\"pci_dss\": [\"10.5\"]}, {\"nist_800_53\": [\"AU.9\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\"]}]'),(1618,'Ensure rsyslog Service is enabled','Once the rsyslog package is installed it needs to be activated.','If the rsyslog service is not activated the system will not have a syslog service running.','','Run the following command to enable rsyslog: # systemctl enable rsyslog','[{\"cis\": [\"4.2.1.1\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.1\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1619,'Ensure rsyslog default file permissions configured','rsyslog will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files.','It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected.','','Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and set $FileCreateMode to 0640 or more restrictive: $FileCreateMode 0640','[{\"cis\": [\"4.2.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.5.1\", \"10.5.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.9\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC7.2\", \"CC.7.3\", \"CC7.4\"]}]'),(1620,'Ensure rsyslog is configured to send logs to a remote log host','The rsyslog utility supports the ability to send logs it gathers to a remote log host running syslogd(8) or to receive messages from remote hosts, reducing administrative overhead.','Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.','','Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and add the following line (where loghost.example.com is the name of your central log host): *.* @@loghost.example.com. Run the following command to reload the rsyslogd configuration: # pkill -HUP rsyslogd','[{\"cis\": [\"4.2.1.4\"]}, {\"cis_csc\": [\"6.6\"]}, {\"pci_dss\": [\"10.5.3\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.4\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1621,'Ensure remote rsyslog messages are only accepted on designated log hosts','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.','','For hosts that are designated as log hosts, edit the /etc/rsyslog.conf file and un-comment or add the following lines:$ModLoad imtcp & $InputTCPServerRun 514. For hosts that are not designated as log hosts, edit the /etc/rsyslog.conf file and comment or remove the following lines: # $ModLoad imtcp # $InputTCPServerRun 514. Run the following command to reload the rsyslogd configuration: # pkill -HUP rsyslogd','[{\"cis\": [\"4.2.1.5\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"10.5.1\"]}]'),(1622,'Ensure syslog-ng service is enabled','Once the syslog-ng package is installed it needs to be activated.','If the syslog-ng service is not activated the system may default to the syslogd service or lack logging instead.','','Run the following command to enable rsyslog : # systemctl enable syslog-ng','[{\"cis\": [\"4.2.2.1\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.1\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1623,'Ensure syslog-ng default file permissions configured','syslog-ng will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files.','It is important to ensure that log files have the correct permissions to ensure that sensitive syslog-ng data is archived and protected.','','Edit the /etc/syslog-ng/syslog-ng.conf and set perm option to 0640 or more restrictive: options { chain_hostnames(off); flush_lines(0); perm(0640); stats_freq(3600); threaded(yes); };','[{\"cis\": [\"4.2.2.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.5.1\", \"10.5.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.9\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC7.2\", \"CC.7.3\", \"CC7.4\"]}]'),(1624,'Ensure syslog-ng is configured to send logs to a remote log host','The syslog-ng utility supports the ability to send logs it gathers to a remote log host or to receive messages from remote hosts, reducing administrative overhead.','Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.','','Edit the /etc/syslog-ng/syslog-ng.conf file and add the following lines (where logfile.example.com is the name of your central log host). destination logserver { tcp("logfile.example.com" port(514)); }; log { source(src); destination(logserver); }; Run the following command to reload the rsyslogd configuration: # pkill -HUP syslog-ng','[{\"cis\": [\"4.2.2.4\"]}, {\"cis_csc\": [\"6.6\"]}, {\"pci_dss\": [\"10.5.3\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.4\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1625,'Ensure rsyslog or syslog-ng is installed','The rsyslog and syslog-ng software are recommended replacements to the original syslogd daemon which provide improvements over syslogd , such as connection-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server.','The security enhancements of rsyslog and syslog-ng such as connection-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server) justify installing and configuring the package.','','Install rsyslog or syslog-ng using one of the following commands: # apt-get install rsyslog # apt-get install syslog-ng','[{\"cis\": [\"4.2.3\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.1\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1626,'Ensure cron daemon is enabled','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.','','Run the following command to enable cron: systemctl enable cron','[{\"cis\": [\"5.1.1\"]}, {\"cis_csc\": [\"6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1627,'Ensure permissions on /etc/crontab are configured','The /etc/crontab file is used by cron to control its own jobs. The commands in this item make sure that root is the user and group owner of the file and that only the owner can access the file.','This file contains information on what system jobs are run by cron. Write access to these files could provide unprivileged users with the ability to elevate their privileges. Read access to these files could provide users with the ability to gain insight on system jobs that run on the system and could provide them a way to gain unauthorized privileged access.','','Run the following commands to set ownership and permissions on /etc/crontab : chown root:root /etc/crontab and chmod og-rwx /etc/crontab','[{\"cis\": [\"5.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(1628,'Ensure permissions on /etc/cron.hourly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.hourly : chown root:root /etc/cron.hourly and chmod og-rwx /etc/cron.hourly','[{\"cis\": [\"5.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1629,'Ensure permissions on /etc/cron.daily are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.daily : chown root:root /etc/cron.daily and chmod og-rwx /etc/cron.daily','[{\"cis\": [\"5.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1630,'Ensure permissions on /etc/cron.weekly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.weekly : chown root:root /etc/cron.weekly and chmod og-rwx /etc/cron.weekly','[{\"cis\": [\"5.1.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1631,'Ensure permissions on /etc/cron.monthly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.monthly : chown root:root /etc/cron.monthly and chmod og-rwx /etc/cron.monthly','[{\"cis\": [\"5.1.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1632,'Ensure permissions on /etc/cron.d are configured','Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow , cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs.','On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.','','Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow: rm /etc/cron.deny;rm /etc/at.deny;touch /etc/cron.allow; touch /etc/at.allow; chmod og-rwx /etc/cron.allow; chmod og-rwx /etc/at.allow; chown root:root /etc/cron.allow and chown root:root /etc/at.allow','[{\"cis\": [\"5.1.7\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1633,'Ensure at/cron is restricted to authorized users','Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow, cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs.','On many systems, only the system administrator is authorized to schedule cronjobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.','','Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow: # rm /etc/cron.deny # rm /etc/at.deny # touch /etc/cron.allow # touch /etc/at.allow # chmod og-rwx /etc/cron.allow # chmod og-rwx /etc/at.allow # chown root:root /etc/cron.allow # chown root:root /etc/at.allow','[{\"cis\": [\"5.1.8\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1634,'Ensure permissions on /etc/ssh/sshd_config are configured','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- privileged users.','','Run the following commands to set ownership and permissions on /etc/ssh/sshd_config: # chown root:root /etc/ssh/sshd_config # chmod og-rwx /etc/ssh/sshd_config','[{\"cis\": [\"5.2.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1635,'Ensure SSH Protocol is set to 2','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2','[{\"cis\": [\"5.2.4\"]}, {\"cis_csc\": [\"3.4\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(1636,'Ensure SSH LogLevel is appropriate','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. VERBOSE level specifies that login and logout activity as well as the key fingerprint for any SSH key used for login will be logged. This information is important for SSH key management, especially in legacy environments.','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel VERBOSE or LogLevel INFO','[{\"cis\": [\"5.2.5\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(1637,'Ensure SSH X11 forwarding is disabled','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.','','Edit the /etc/ssh/sshd_configfile to set the parameter as follows: X11Forwarding no','[{\"cis\": [\"5.2.6\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1638,'Ensure SSH MaxAuthTries is set to 4 or less','The MaxAuthTries parameter specifies the maximum number of authentication attempts permitted per connection. When the login failure count reaches half the number, error messages will be written to the syslog file detailing the login failure.','Setting the MaxAuthTries parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. While the recommended setting is 4, set the number based on site policy.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4','[{\"cis\": [\"5.2.7\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1639,'Ensure SSH IgnoreRhosts is enabled','The IgnoreRhosts parameter specifies that .rhostsand .shostsfiles will not be used in RhostsRSAAuthenticationor HostbasedAuthentication.','Setting this parameter forces users to enter a password when authenticating with ssh.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes','[{\"cis\": [\"5.2.8\"]}, {\"cis_csc\": [\"9\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(1640,'Ensure SSH HostbasedAuthentication is disabled','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no','[{\"cis\": [\"5.2.9\"]}, {\"cis_csc\": [\"9\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(1641,'Ensure SSH root login is disabled','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no','[{\"cis\": [\"5.2.10\"]}, {\"cis_csc\": [\"5.8\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(1642,'Ensure SSH PermitEmptyPasswords is disabled','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','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no','[{\"cis\": [\"5.2.11\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(1643,'Ensure SSH PermitUserEnvironment is disabled','The PermitUserEnvironment option allows users to present environment options to the ssh daemon.','Permitting users the ability to set environment variables through the SSH daemon could potentially allow users to bypass security controls (e.g. setting an execution path that has ssh executing trojan'd programs)','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitUserEnvironment no','[{\"cis\": [\"5.2.12\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\", \"CC6.1\", \"CC7.2\"]}]'),(1644,'Ensure only strong ciphers are used','This variable limits the ciphers that SSH can use during communication.','Weak ciphers that are used for authentication to the cryptographic module cannot be relied upon to provide confidentiality or integrity, and system data may be compromised The DES, Triple DES, and Blowfish ciphers, as used in SSH, have a birthday bound of approximately four billion blocks, which makes it easier for remote attackers to obtain cleartext data via a birthday attack against a long-duration encrypted session, aka a "Sweet32" attack The RC4 algorithm, as used in the TLS protocol and SSL protocol, does not properly combine state data with key data during the initialization phase, which makes it easier for remote attackers to conduct plaintext-recovery attacks against the initial bytes of a stream by sniffing network traffic that occasionally relies on keys affected by the Invariance Weakness, and then using a brute-force approach involving LSB values, aka the "Bar Mitzvah" issue The passwords used during an SSH session encrypted with RC4 can be recovered by an attacker who is able to capture and replay the session Error handling in the SSH protocol; Client and Server, when using a block cipher algorithm in Cipher Block Chaining (CBC) mode, makes it easier for remote attackers to recover certain plaintext data from an arbitrary block of ciphertext in an SSH session via unknown vectors The mm_newkeys_from_blob function in monitor_wrap.c, when an AES-GCM cipher is used, does not properly initialize memory for a MAC context data structure, which allows remote authenticated users to bypass intended ForceCommand and login-shell restrictions via packet data that provides a crafted callback address','','Edit the /etc/ssh/sshd_config file add/modify the Ciphers line to contain a comma separated list of the site approved ciphers Example: Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr','[{\"cis\": [\"5.2.13\"]}, {\"cis_csc\": [\"3.4\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\", \"CC6.1\", \"CC7.2\"]}]'),(1645,'Ensure only strong MAC algorithms are used','This variable limits the types of MAC algorithms that SSH can use during communication.','MD5 and 96-bit MAC algorithms are considered weak and have been shown to increase exploitability in SSH downgrade attacks. Weak algorithms continue to have a great deal of attention as a weak spot that can be exploited with expanded computing power. An attacker that breaks the algorithm could take advantage of a MiTM position to decrypt the SSH tunnel and capture credentials and information','','Edit the /etc/ssh/sshd_config file and add/modify the MACs line to contain a comma separated list of the site approved MACs Example: MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2- 512,hmac-sha2-256','[{\"cis\": [\"5.2.14\"]}, {\"cis_csc\": [\"3.4\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\", \"CC6.1\", \"CC7.2\"]}]'),(1646,'Ensure only strong Key Exchange algorithms are used','Key exchange is any method in cryptography by which cryptographic keys are exchanged between two parties, allowing use of a cryptographic algorithm. If the sender and receiver wish to exchange encrypted messages, each must be equipped to encrypt messages to be sent and decrypt messages received','Key exchange methods that are considered weak should be removed. A key exchange method may be weak because too few bits are used, or the hashing algorithm is considered too weak. Using weak algorithms could expose connections to man-in-the-middle attacks','','Edit the /etc/ssh/sshd_config file add/modify the KexAlgorithms line to contain a comma separated list of the site approved key exchange algorithms Example: KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256','[{\"cis\": [\"5.2.15\"]}, {\"cis_csc\": [\"3.4\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\", \"CC6.1\", \"CC7.2\"]}]'),(1647,'Ensure SSH Idle Timeout Interval is configured','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.','','Edit the /etc/ssh/sshd_config file to set the parameters according to site policy: ClientAliveInterval 300 ClientAliveCountMax 0','[{\"cis\": [\"5.2.16\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(1648,'Ensure SSH LoginGraceTime is set to one minute or less','The LoginGraceTime parameter specifies the time allowed for successful authentication to the SSH server. The longer the Grace period is the more open unauthenticated connections can exist. Like other session controls in this session the Grace Period should be limited to appropriate organizational limits to ensure the service is available for needed access.','Setting the LoginGraceTime parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. It will also limit the number of concurrent unauthenticated connections While the recommended setting is 60 seconds (1 Minute), set the number based on site policy.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: LoginGraceTime 60','[{\"cis\": [\"5.2.17\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.1\"]}]'),(1649,'Ensure SSH access is limited','There are several options available to limit which users and group can access the system via SSH. It is recommended that at least one of the following options be leveraged: AllowUsers, AllowGroups, DenyUsers, DenyGroups.','Restricting which users can remotely access the system via SSH will help ensure that only authorized users access the system.','','Edit the /etc/ssh/sshd_config file to set one or more of the parameter as follows: AllowUsers <userlist> AllowGroups <grouplist> DenyUsers <userlist> DenyGroups <grouplist>','[{\"cis\": [\"5.2.18\"]}, {\"cis_csc\": [\"5.1\", \"5.8\"]}, {\"pci_dss\": [\"8.1\"]}]'),(1650,'Ensure SSH warning banner is configured','The Banner parameter specifies a file whose contents must be sent to the remote user before authentication is permitted. By default, no banner is displayed.','Banners are used to warn connecting users of the particular site's policy regarding connection. Presenting a warning message prior to the normal user login may assist the prosecution of trespassers on the computer system.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: Banner /etc/issue.net','[{\"cis\": [\"5.2.19\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1651,'Ensure password creation requirements are configured','The pam_pwquality.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more. The following are definitions of the pam_pwquality.so options: - retry=3 (Allow 3 tries before sending back a failure). The following options are set in the /etc/security/pwquality.conf file: - minlen = 14 dcredit = -1 ucredit = -1 ocredit = -1 lcredit = -1 (The settings shown above are one possible policy. Alter these values to conform to your own organization's password policies.)','Strong passwords protect systems from being hacked through brute force methods.','','1) Run the following command to install the pam_pwquality module: apt-get install libpam-pwquality 2) Edit the /etc/pam.d/common-password file to include the appropriate options for pam_pwquality.so and to conform to site policy: password requisite pam_pwquality.so retry=3 3) Edit /etc/security/pwquality.conf to add or update the following settings to conform to site policy: minlen = 14 dcredit = -1 ucredit = -1 ocredit = -1 lcredit = -1. Notes: Additional module options may be set, recommendation requirements only cover including try_first_pass and minlen set to 14 or more. Settings in /etc/security/pwquality.conf must use spaces around the = symbol.','[{\"cis\": [\"5.3.1\"]}, {\"cis_csc\": [\"5.7\", \"16.12\"]}, {\"pci_dss\": [\"8.2.3\"]}]'),(1652,'Ensure lockout for failed password attempts is configured','Lock out users after n unsuccessful consecutive login attempts. The first sets of changes are made to the PAM configuration files. The second set of changes are applied to the program specific PAM configuration file. The second set of changes must be applied to each program that will lock out users. Check the documentation for each secondary program for instructions on how to configure them to work with PAM. Set the lockout number to the policy in effect at your site.','Locking out user IDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems.','','Edit the /etc/pam.d/common-auth file and add the auth line below: auth required pam_tally2.so onerr=fail audit silent deny=5 unlock_time=900. Note: If a user has been locked out because they have reached the maximum consecutive failure count defined by deny= in the pam_tally2.so module, the user can be unlocked by issuing the command /sbin/pam_tally2 -u <username> --reset. This command sets the failed count to 0, effectively unlocking the user. Notes: Use of the "audit" keyword may log credentials in the case of user error during authentication. This risk should be evaluated in the context of the site policies of your organization.','[{\"cis\": [\"5.3.2\"]}, {\"cis_csc\": [\"16.7\"]}, {\"pci_dss\": [\"8.2.5\"]}]'),(1653,'Ensure password reuse is limited','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.','','Edit the /etc/pam.d/common-password file to include the remember option and conform to site policy as shown: password required pam_pwhistory.so remember=5. Notes: Additional module options may be set, recommendation only covers those listed here.','[{\"cis\": [\"5.3.3\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2.5\"]}]'),(1654,'Ensure password hashing algorithm is SHA-512','The commands below change password encryption from md5 to sha512 (a much stronger hashing algorithm). All existing accounts will need to perform a password change to upgrade the stored hashes to the new algorithm.','The SHA-512 algorithm provides much stronger hashing than MD5, thus providing additional protection to the system by increasing the level of effort for an attacker to successfully determine passwords. Note that these change only apply to accounts configured on the local system.','','Edit the /etc/pam.d/common-password file to include the sha512 option for pam_unix.so as shown: password [success=1 default=ignore] pam_unix.so sha512','[{\"cis\": [\"5.3.4\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(1655,'Ensure password expiration is 365 days or less','The PASS_MAX_DAYS parameter in /etc/login.defs allows an administrator to force passwords to expire once they reach a defined age. It is recommended that the PASS_MAX_DAYS parameter be set to less than or equal to 365 days.','The window of opportunity for an attacker to leverage compromised credentials or successfully compromise credentials via an online brute force attack is limited by the age of the password. Therefore, reducing the maximum age of a password also reduces an attacker's window of opportunity.','','Set the PASS_MAX_DAYS parameter to conform to site policy in /etc/login.defs: PASS_MAX_DAYS 90. Modify user parameters for all users with a password set to match: # chage --maxdays 90 <user>. Notes: You can also check this setting in /etc/shadow directly. The 5th field should be 365 or less for all users with a password. A value of -1 will disable password expiration. Additionally the password expiration must be greater than the minimum days between password changes or users will be unable to change their password.','[{\"cis\": [\"5.4.1.1\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2.4\"]}]'),(1656,'Ensure minimum days between password changes is 7 or more','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.','','Set the PASS_MIN_DAYS parameter to 7 in /etc/login.defs: PASS_MIN_DAYS 7. Modify user parameters for all users with a password set to match: # chage --mindays 7 <user>. Notes: You can also check this setting in /etc/shadow directly. The 4th field should be 7 or more for all users with a password.','[{\"cis\": [\"5.4.1.2\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(1657,'Ensure password expiration warning days is 7 or more','The PASS_WARN_AGE parameter in /etc/login.defs allows an administrator to notify users that their password will expire in a defined number of days. It is recommended that the PASS_WARN_AGE parameter be set to 7 or more days.','Providing an advance warning that a password will be expiring gives users time to think of a secure password. Users caught unaware may choose a simple password or write it down where it may be discovered.','','Set the PASS_WARN_AGE parameter to 7 in /etc/login.defs: PASS_WARN_AGE 7. Modify user parameters for all users with a password set to match: # chage --warndays 7 <user>. Notes: You can also check this setting in /etc/shadow directly. The 6th field should be 7 or more for all users with a password.','[{\"cis\": [\"5.4.1.3\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(1658,'Ensure inactive password lock is 30 days or less','User accounts that have been inactive for over a given period of time can be automatically disabled. It is recommended that accounts that are inactive for 30 days after password expiration be disabled.','Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies.','','Run the following command to set the default password inactivity period to 30 days: # useradd -D -f 30. Modify user parameters for all users with a password set to match: # chage --inactive 30 <user>. Notes: You can also check this setting in /etc/shadow directly. The 7th field should be 30 or less for all users with a password. A value of -1 would disable this setting.','[{\"cis\": [\"5.4.1.4\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(1659,'Ensure default group for the root account is GID 0','The usermod command can be used to specify which group the root user belongs to. This affects permissions of files that are created by the root user.','Using GID 0 for the root account helps prevent root-owned files from accidentally becoming accessible to non-privileged users.','','Run the following command to set the root user default group to GID 0: # usermod -g 0 root','[{\"cis\": [\"5.4.3\"]}, {\"cis_csc\": [\"5\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(1660,'Ensure default user umask is 027 or more restrictive','The default umask determines the permissions of files created by users. The user creating the file has the discretion of making their files and directories readable by others via the chmod command. Users who wish to allow their files and directories to be readable by others by default may choose a different default umask by inserting the umask command into the standard shell configuration files ( .profile , .bashrc , etc.) in their home directories.','Setting a very secure default value for umask ensures that users make a conscious choice about their file permissions. A default umask setting of 077 causes files and directories created by users to not be readable by any other user on the system. A umask of 027 would make files and directories readable by users in the same Unix group, while a umask of 022 would make files readable by every user on the system.','','Edit the /etc/bash.bashrc , /etc/profile and /etc/profile.d/*.sh files (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: umask 027','[{\"cis\": [\"5.4.4\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(1661,'Ensure default user shell timeout is 900 seconds or less','The default TMOUT determines the shell timeout for users. The TMOUT value is measured in seconds.','Having no timeout value associated with a shell could allow an unauthorized user access to another user's shell 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.','','Edit the /etc/bashrc, /etc/profile files, and /etc/profile.d*.sh (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: TMOUT=600','[{\"cis\": [\"5.4.5\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(1662,'Ensure access to the su command is restricted','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 sudo 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.','','1) Add the following line to the /etc/pam.d/su file: auth required pam_wheel.so 2) Create a comma separated list of users in the sudo statement in the /etc/group file: sudo:x:10:root,<user list> Notes: The use_uid option to pam_wheel.so is a no-op on debian based systems. It is acceptable but not required as these systems use its behavior as default.','[{\"cis\": [\"5.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(1663,'Ensure permissions on /etc/passwd are configured','The /etc/passwd file contains user account information that is used by many system utilities and therefore must be readable for these utilities to operate.','It is critical to ensure that the /etc/passwd file is protected from unauthorized write access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/passwd: # chown root:root /etc/passwd # chmod 644 /etc/passwd','[{\"cis\": [\"6.1.2\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1664,'Ensure permissions on /etc/shadow are configured','The /etc/shadow file is used to store the information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information.','If attackers can gain read access to the /etc/shadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/shadow file (such as expiration) could also be useful to subvert the user accounts.','','Run the following commands to set permissions on /etc/shadow : # chown root:shadow /etc/shadow # chmod o-rwx,g-wx /etc/shadow','[{\"cis\": [\"6.1.3\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1665,'Ensure permissions on /etc/group are configured','The /etc/group file contains a list of all the valid groups defined in the system. The command below allows read/write access for root and read access for everyone else.','The /etc/group file needs to be protected from unauthorized changes by non-privileged users, but needs to be readable as this information is used with many non-privileged programs.','','Run the following command to set permissions on /etc/group: # chown root:root /etc/group # chmod 644 /etc/group','[{\"cis\": [\"6.1.4\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1666,'Ensure permissions on /etc/gshadow are configured','The /etc/gshadow file is used to store the information about groups that is critical to the security of those accounts, such as the hashed password and other security information.','If attackers can gain read access to the /etc/gshadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/gshadow file (such as group administrators) could also be useful to subvert the group','','Run the following commands to set permissions on /etc/gshadow : # chown root:shadow /etc/gshadow # chmod o-rwx,g-wx /etc/gshadow','[{\"cis\": [\"6.1.5\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1667,'Ensure permissions on /etc/passwd- are configured','The /etc/passwd- file contains backup user account information.','It is critical to ensure that the /etc/passwd- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/passwd-: # chown root:root /etc/passwd- # chmod u-x,go-wx /etc/passwd-','[{\"cis\": [\"6.1.6\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1668,'Ensure permissions on /etc/shadow- are configured','The /etc/shadow- file is used to store backup information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information.','It is critical to ensure that the /etc/shadow- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the one of the following chown commands as appropriate and the chmod to set permissions on /etc/shadow- : # chown root:root /etc/shadow- # chown root:shadow /etc/shadow- # chmod o-rwx,g-rw /etc/shadow-','[{\"cis\": [\"6.1.7\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1669,'Ensure permissions on /etc/group- are configured','The /etc/group- file contains a backup list of all the valid groups defined in the system.','It is critical to ensure that the /etc/group- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/group-: # chown root:root /etc/group- # chmod u-x,go-wx /etc/group-','[{\"cis\": [\"6.1.8\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1670,'Ensure permissions on /etc/gshadow- are configured','The /etc/gshadow- file is used to store backup information about groups that is critical to the security of those accounts, such as the hashed password and other security information.','It is critical to ensure that the /etc/gshadow- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the one of the following chown commands as appropriate and the chmod to set permissions on /etc/gshadow- : # chown root:root /etc/gshadow- # chown root:shadow /etc/gshadow- # chmod o-rwx,g-wx /etc/gshadow-','[{\"cis\": [\"6.1.9\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(1671,'Ensure password fields are not empty','An account with an empty password field means that anybody may log in as that user without providing a password.','All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user.','','If any accounts in the /etc/shadow file do not have a password, run the following command to lock the account until it can be determined why it does not have a password: # passwd -l <em><username></em>. Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off.','[{\"cis\": [\"6.2.1\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2\"]}]'),(1672,'Ensure no legacy "+" entries exist in /etc/passwd','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Remove any legacy + entries from /etc/passwd if they exist.','[{\"cis\": [\"6.2.2\"]}, {\"cis_csc\": [\"16.9\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1673,'Ensure no legacy "+" entries exist in /etc/shadow','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Remove any legacy + entries from /etc/shadow if they exist.','[{\"cis\": [\"6.2.3\"]}, {\"cis_csc\": [\"16.9\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1674,'Ensure no legacy "+" entries exist in /etc/group','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Remove any legacy + entries from /etc/group if they exist.','[{\"cis\": [\"6.2.4\"]}, {\"cis_csc\": [\"16.9\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(1675,'Ensure root is the only UID 0 account','Any account with UID 0 has superuser privileges on the system.','This access must be limited to only the default root account and only from the system console. Administrative access must be through an unprivileged account using an approved mechanism as noted in Item 5.6 Ensure access to the su command is restricted.','','Remove any users other than root with UID 0 or assign them a new UID if appropriate.','[{\"cis\": [\"6.2.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(1676,'Ensure shadow group is empty','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.','','Remove all users from the shadow group, and change the primary group of any users with shadow as their primary group.','[{\"cis\": [\"6.2.20\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(2000,'Ensure mounting of freevxfs filesystems is disabled','The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the primary filesystem type for HP-UX operating systems.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/freevxfs.conf and add the following line: install freevxfs /bin/true Run the following command to unload the freevxfs module: # rmmod freevxfs','[{\"cis\": [\"1.1.1.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(2001,'Ensure mounting of jffs2 filesystems is disabled','The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/jffs2.conf and add the following line: install jffs2 /bin/true Run the following command to unload the jffs2 module: # rmmod jffs2','[{\"cis\": [\"1.1.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(2002,'Ensure mounting of hfs filesystems is disabled','The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS filesystems.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/hfs.conf and add the following line: install hfs /bin/true Run the following command to unload the hfs module: # rmmod hfs','[{\"cis\": [\"1.1.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(2003,'Ensure mounting of hfsplus filesystems is disabled','The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .confExample: vim /etc/modprobe.d/hfsplus.conf and add the following line: install hfsplus /bin/true Run the following command to unload the hfsplus module: # rmmod hfsplus','[{\"cis\": [\"1.1.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(2004,'Ensure mounting of udf filesystems is disabled','The udf filesystem type is the universal disk format used to implement ISO/IEC 13346 and ECMA-167 specifications. This is an open vendor filesystem type for data storage on a broad range of media. This filesystem type is necessary to support writing DVDs and newer optical disc formats.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/udf.conf and add the following line: install udf /bin/true Run the following command to unload the udf module: # rmmod udf','[{\"cis\": [\"1.1.1.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(2005,'Ensure /tmp is configured','The /tmp directory is a world-writable directory used for temporary storage by all users and some applications.','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.','','Configure /etc/fstab as appropriate. Example: tmpfs /tmp tmpfs defaults,rw,nosuid,nodev,noexec,relatime 0 0 or Run the following commands to enable systemd /tmp mounting: systemctl unmask tmp.mount systemctl enable tmp.mount Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to configure the /tmp mount','[{\"cis\": [\"1.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2006,'Ensure nodev option set on /tmp partition','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.','','Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to configure the /tmp mount: [Mount] What=tmpfs Where=/tmp Type=tmpfs Options=mode=1777,strictatime,noexec,nodev,nosuid and run the following commands to enable systemd /tmp mounting: systemctl unmask tmp.mount systemctl enable tmp.mount','[{\"cis\": [\"1.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2007,'Ensure nosuid option set on /tmp partition','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.','','Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add nodev to the /tmp mount options: [Mount] Options=mode=1777,strictatime,noexec,nodev,nosuid Run the following command to remount /tmp : # mount -o remount,nodev /tmp','[{\"cis\": [\"1.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2008,'Ensure noexec option set on /tmp partition','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 .','','Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add noexec to the /tmp mount options: [Mount] Options=mode=1777,strictatime,noexec,nodev,nosuid Run the following command to remount /tmp : # mount -o remount,noexec /tmp','[{\"cis\": [\"1.1.5\"]}, {\"cis_csc\": [\"2.6\", \"8\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2009,'Ensure separate partition exists for /var','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2010,'Ensure separate partition exists for /var/tmp','The /var/tmp directory is a world-writable directory used for temporary storage by all users and some applications.','Since the /var/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 /var/tmp its own file system allows an administrator to set the noexec option on the mount, making /var/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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var/tmp. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.7\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2011,'Ensure nodev option set on /var/tmp partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the /var/tmp filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices in /var/tmp.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /var/tmp : # mount -o remount,nodev /var/tmp','[{\"cis\": [\"1.1.8\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2012,'Ensure nosuid option set on /var/tmp partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /var/tmp.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /var/tmp: # mount -o remount,nosuid /var/tmp','[{\"cis\": [\"1.1.9\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2013,'Ensure noexec option set on /var/tmp partition','The noexec mount option specifies that the filesystem cannot contain executable binaries.','Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /var/tmp.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /var/tmp: # mount -o remount,noexec /var/tmp','[{\"cis\": [\"1.1.10\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2014,'Ensure separate partition exists for /var/log','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var/log. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.11\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2015,'Ensure separate partition exists for /var/log/audit','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.','','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, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.12\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2016,'Ensure separate partition exists for /home','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /home. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.13\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2017,'Ensure nodev option set on /home partition','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.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /home partition. See the fstab(5) manual page for more information. # mount -o remount,nodev /home','[{\"cis\": [\"1.1.14\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2018,'Ensure nodev option set on /dev/shm partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the /run/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.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /dev/shm partition. See the fstab(5) manual page for more information. Run the following command to remount /dev/shm: # mount -o remount,nodev /dev/shm','[{\"cis\": [\"1.1.15\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2019,'Ensure nosuid option set on /dev/shm partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /dev/shm partition. See the fstab(5) manual page for more information. Run the following command to remount /dev/shm: # mount -o remount,nosuid /dev/shm','[{\"cis\": [\"1.1.16\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2020,'Ensure noexec option set on /dev/shm partition','The noexec mount option specifies that the filesystem cannot contain executable binaries.','Setting this option on a file system prevents users from executing programs from shared memory. This deters users from introducing potentially malicious software on the system.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /dev/shm partition. See the fstab(5) manual page for more information. Run the following command to remount /dev/shm: # mount -o remount,noexec /dev/shm','[{\"cis\": [\"1.1.17\"]}, {\"cis_csc\": [\"2.6\", \"8\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2021,'Disable Automounting','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.','','Run the following command to disable autofs: # systemctl disable autofs','[{\"cis\": [\"1.1.22\"]}, {\"cis_csc\": [\"8.4\", \"8.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2022,'Ensure AIDE is installed','AIDE takes a snapshot of filesystem state including modification times, permissions, and file hashes which can then be used to compare against the current state of the filesystem to detect modifications to the system.','By monitoring the filesystem state compromised files can be detected to prevent or limit the exposure of accidental or malicious misconfigurations or modified binaries.','','Run the following command to install AIDE: # apt-get install aide aide-common. Configure AIDE as appropriate for your environment. Consult the AIDE documentation for options. Initialize AIDE: # aideinit','[{\"cis\": [\"1.3.1\"]}, {\"cis_csc\": [\"14.9\"]}, {\"pci_dss\": [\"11.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2023,'Ensure filesystem integrity is regularly checked','Periodic checking of the filesystem integrity is needed to detect changes to the filesystem.','Periodic file checking allows the system administrator to determine on a regular basis if critical files have been changed in an unauthorized fashion.','','Run the following command: # crontab -u root -e Add the following line to the crontab: 0 5 * * * /usr/bin/aide.wrapper --config /etc/aide/aide.conf --check','[{\"cis\": [\"1.3.2\"]}, {\"cis_csc\": [\"14.9\"]}, {\"pci_dss\": [\"11.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2024,'Ensure permissions on bootloader config are configured','The grub configuration file contains information on boot settings and passwords for unlocking boot options. The grub configuration is usually grub.cfg stored in /boot/grub.','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.','','Run the following commands to set permissions on your grub configuration: chown root:root /boot/grub/grub.cfg, chmod og-rwx /boot/grub/grub.cfg','[{\"cis\": [\"1.4.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2025,'Ensure bootloader password is set','Setting the boot loader password will require that anyone rebooting the system must enter a password before being able to set command line boot parameters.','Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off SELinux at boot time).','','Create an encrypted password with grub-mkpasswd-pbkdf2 Create a custom /etc/grub.d configuration file: If there is a requirement to be able to boot/reboot without entering the password, edit /etc/grub.d/10_linux and add --unrestricted to the line CLASS= Example: CLASS="--class gnu-linux --class gnu --class os --unrestricted" Run the following command to update the grub2 configuration: # update-grub','[{\"cis\": [\"1.4.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2026,'Ensure authentication required for single user mode','Single user mode is used for recovery when the system detects an issue during boot or by manual selection from the bootloader.','Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials.','','Run the following command and follow the prompts to set a password for the root user: # passwd root','[{\"cis\": [\"1.4.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2027,'Ensure core dumps are restricted','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.','','Add the following line to /etc/security/limits.conf or a /etc/security/limits.d/* file: * hard core 0 Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: fs.suid_dumpable = 0 Run the following command to set the active kernel parameter: # sysctl -w fs.suid_dumpable=0','[{\"cis\": [\"1.5.1\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2028,'Ensure XD/NX support is enabled','Recent processors in the x86 family support the ability to prevent code execution on a per memory page basis. Generically and on AMD processors, this ability is called No Execute (NX), while on Intel processors it is called Execute Disable (XD). This ability can help prevent exploitation of buffer overflow vulnerabilities and should be activated whenever possible. Extra steps must be taken to ensure that this protection is enabled, particularly on 32-bit x86 systems. Other processors, such as Itanium and POWER, have included such support since inception and the standard kernel for those platforms supports the feature.','Enabling any feature that can protect against buffer overflow attacks enhances the security of the system.','','On 32 bit systems install a kernel with PAE support, no installation is required on 64 bit systems: If necessary configure your bootloader to load the new kernel and reboot the system. You may need to enable NX or XD support in your bios.','[{\"cis\": [\"1.5.2\"]}, {\"cis_csc\": [\"8.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2029,'Ensure address space layout randomization (ASLR) is enabled','Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process.','Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: kernel.randomize_va_space = 2 Run the following command to set the active kernel parameter: # sysctl -w kernel.randomize_va_space=2','[{\"cis\": [\"1.5.3\"]}, {\"cis_csc\": [\"8.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2030,'Ensure prelink is disabled','prelink is a program that modifies ELF shared libraries and ELF dynamically linked binaries in such a way that the time needed for the dynamic linker to perform relocations at startup significantly decreases.','The prelinking feature can interfere with the operation of AIDE, because it changes binaries. Prelinking can also increase the vulnerability of the system if a malicious user is able to compromise a common library such as libc.','','Run the following commands to restore binaries to normal and uninstall prelink: prelink -ua && yum remove prelink','[{\"cis\": [\"1.5.4\"]}, {\"cis_csc\": [\"14.9\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2031,'Ensure SELinux is enabled in the bootloader configuration','Configure SELINUX to be enabled at boot time and verify that it has not been overwritten by the grub boot parameters.','SELinux must be enabled at boot time in your grub configuration to ensure that the controls it provides are not overridden.','','Run the following command to configure GRUB and PAM and to create /.autorelabel: # selinux-activate Edit /etc/default/grub and add the following parameters to the GRUB_CMDLINE_LINUX= line: selinux=1 security=selinux example: GRUB_CMDLINE_LINUX_DEFAULT="quiet" GRUB_CMDLINE_LINUX="selinux=1 security=selinux enforcing=1 audit=1" Run the following command to update the grub2configuration: # update-grub','[{\"cis\": [\"1.6.1.1\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2032,'Ensure the SELinux state is enforcing','Set SELinux to enable when the system is booted.','SELinux must be enabled at boot time in to ensure that the controls it provides are in effect at all times.','','Edit the /etc/selinux/config file to set the SELINUX parameter: SELINUX=enforcing Edit /etc/default/grub and add the following parameters to the GRUB_CMDLINE_LINUX= line: enforcing=1 Example: GRUB_CMDLINE_LINUX_DEFAULT="quiet" GRUB_CMDLINE_LINUX="selinux=1 security=selinux enforcing=1 audit=1" Run the following command to update the grub2 configuration: # update-grub','[{\"cis\": [\"1.6.1.2\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2033,'Ensure SELinux policy is configured','Configure SELinux to meet or exceed the default targeted policy, which constrains daemons and system software only.','Security configuration requirements vary from site to site. Some sites may mandate a policy that is stricter than the default policy, which is perfectly acceptable. This item is intended to ensure that at least the default recommendations are met.','','Edit the /etc/selinux/config file to set the SELINUXTYPE parameter: SELINUXTYPE=targeted','[{\"cis\": [\"1.6.1.3\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2034,'Ensure no unconfined daemons exist','Daemons that are not defined in SELinux policy will inherit the security context of their parent process.','Since daemons are launched and descend from the init process, they will inherit the security context label initrc_t . This could cause the unintended consequence of giving the process more permission than it requires.','','Investigate any unconfined daemons found during the audit action. They may need to have an existing security context assigned to them or a policy built for them.','[{\"cis\": [\"1.6.1.4\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2035,'Ensure AppArmor is enabled in the bootloader configuration','Configure AppArmor to be enabled at boot time and verify that it has not been overwrittenby the bootloader boot parameters.','AppArmor must be enabled at boot time in your grub configuration to ensure that the controls it provides are not overridden.','','Edit /etc/default/grub and add the appermor=1 and security=apparmor parameters to the GRUB_CMDLINE_LINUX= line GRUB_CMDLINE_LINUX="apparmor=1 security=apparmor" update the grub configuration # update-grub Notes: This recommendation is designed around the grub bootloader, if LILO or another bootloader is in use in your environment enact equivalent settings.','[{\"cis\": [\"1.6.2.1\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2036,'Ensure all AppArmor Profiles are enforcing','AppArmor profiles define what resources applicatons are able to access.','Security configuration requirements vary from site to site. Some sites may mandate a policy that is stricter than the default policy, which is perfectly acceptable. This item is intended to ensure that any policies that exist on the system are activated..','','Run the following command to set all profiles to enforce mode: # aa-enforce /etc/apparmor.d/* Any unconfined processes may need to have a profile created or activated for them and then be restarted.','[{\"cis\": [\"1.6.2.2\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2037,'Ensure SELinux or AppArmor are installed','SELinux and AppArmor provide Mandatory Access Controls.','Without a Mandatory Access Control system installed only the default Discretionary Access Control system will be available.','','Run one of the following commands to install SELinux or apparmor: # apt-get install selinux-basics Or: # apt-get install apparmor apparmor-profiles apparmor-utils','[{\"cis\": [\"1.6.3\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2038,'Ensure message of the day is configured properly','The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/motd file with the appropriate contents according to your site policy, remove any instances of m , , s , or v.','[{\"cis\": [\"1.7.1.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"7.1\"]}]'),(2039,'Ensure local login warning banner is configured properly','The contents of the /etc/issue file are displayed to users prior to login for local terminals. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/issue file with the appropriate contents according to your site policy, remove any instances of m , , s , or v , or references to the OS platform # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue','[{\"cis\": [\"1.7.1.2\"]}, {\"cis_csc\": [\"5.1\"]}]'),(2040,'Ensure remote login warning banner is configured properly','The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/issue.net file with the appropriate contents according to your site policy, remove any instances of m , , s , or v: # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue.net','[{\"cis\": [\"1.7.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"7.1\"]}]'),(2041,'Ensure permissions on /etc/motd are configured','The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users.','If the /etc/motd file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/motd: # chown root:root /etc/motd # chmod 644 /etc/motd','[{\"cis\": [\"1.7.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2042,'Ensure permissions on /etc/issue are configured','The contents of the /etc/issue file are displayed to users prior to login for local terminals.','If the /etc/issue file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/issue: # chown root:root /etc/issue # chmod 644 /etc/issue','[{\"cis\": [\"1.7.1.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2043,'Ensure permissions on /etc/issue.net are configured','The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services.','If the /etc/issue.net file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/issue.net: # chown root:root /etc/issue.net # chmod 644 /etc/issue.net','[{\"cis\": [\"1.7.1.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2044,'Ensure GDM login banner is configured','GDM is the GNOME Display Manager which handles graphical login for GNOME based systems.','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place.','','Edit or create the file /etc/gdm3/greeter.dconf-defaults and add: [org/gnome/login-screen], banner-message-enable=true, banner-message-text='Authorized uses only. All activity may be monitored and reported.'','[{\"cis\": [\"1.7.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2045,'Ensure updates, patches, and additional security software are installed','Periodically patches are released for included software either due to security flaws or to include additional functionality.','Newer patches may contain security enhancements that would not be available through the latest full update. As a result, it is recommended that the latest software patches be used to take advantage of the latest functionality. As with any software installation, organizations need to determine if a given update meets their requirements and verify the compatibility and supportability of any additional software against the update revision that is selected.','','Use your package manager to update all packages on the system according to site policy. Notes: Site policy may mandate a testing period before install onto production systems for available updates.','[{\"cis\": [\"1.8\"]}, {\"cis_csc\": [\"3.4\", \"3.5\"]}, {\"pci_dss\": [\"5.2\"]}, {\"nist_800_53\": [\"AU.6\", \"SI.4\"]}, {\"gpg_13\": [\"4.2\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"A1.2\"]}]'),(2046,'Ensure xinetd is not installed','The eXtended InterNET Daemon (xinetd) is an open source super daemon that replaced the original inetd daemon. The xinetddaemon 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 package be removed.','','Run the following commands to remove xinetd: # apt-get remove xinetd # apt-get purge xinetd','[{\"cis\": [\"2.1.1\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2047,'Ensure openbsd-inetd is not installed','The inetd daemon listens for well known services and dispatches the appropriate daemon to properly respond to service requests.','If there are no inetd services required, it is recommended that the daemon be removed.','','Run the following command to uninstall openbsd-inetd: apt-get remove openbsd-inetd','[{\"cis\": [\"2.1.2\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2048,'Ensure time synchronization is in use','System time should be synchronized between all systems in an environment. This is typically done by establishing an authoritative time server or set of servers and having all systems synchronize their clocks to them.','Time synchronization is important to support time sensitive security mechanisms like Kerberos and also ensures log files have consistent time records across the enterprise, which aids in forensic investigations.','','On physical systems or virtual systems where host based time synchronization is not available install NTP or chrony using one of the following commands: # apt-get install ntp # apt-get install chrony On virtual systems where host based time synchronization is available consult your virtualization software documentation and setup host based synchronization.','[{\"cis\": [\"2.2.1.1\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"10.4\"]}, {\"nist_800_53\": [\"AU.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2049,'Ensure ntp is configured','ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at http://www.ntp.org. ntp can be configured to be a client and/or a server. This recommendation only applies if ntp is in use on the system.','If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly.','','Add or edit restrict lines in /etc/ntp.conf to match the following: restrict -4 default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery Add or edit server or pool lines to /etc/ntp.conf as appropriate: server <remote-server> Configure ntp to run as the ntp user by adding or editing the /etc/init.d/ntp file: RUNASUSER=ntp','[{\"cis\": [\"2.2.1.2\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2050,'Ensure chrony is configured','chrony is a daemon which implements the Network Time Protocol (NTP) is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on chrony can be found at http://chrony.tuxfamily.org/. chrony can be configured to be a client and/or a server.','If chrony is in use on the system proper configuration is vital to ensuring time synchronization is working properly. This recommendation only applies if chrony is in use on the system.','','Add or edit server or pool lines to /etc/chrony/chrony.conf as appropriate: server <remote-server>','[{\"cis\": [\"2.2.1.3\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2051,'Ensure the X Window system is not installed','The X Window System provides a Graphical User Interface (GUI) where users can have multiple windows in which to run programs and various add on. The X Windows system is typically used on workstations where users login, but not on servers where users typically do not login.','Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface.','','Run the following command to remove the X Windows System packages: apt-get remove xserver-xorg*','[{\"cis\": [\"2.2.2\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(2052,'Ensure Avahi Server is not enabled','Avahi is a free zeroconf implementation, including a system for multicast DNS/DNS-SD service discovery. Avahi allows programs to publish and discover services and hosts running on a local network with no specific configuration. For example, a user can plug a computer into a network and Avahi automatically finds printers to print to, files to look at and people to talk to, as well as network services running on the machine.','Automatic discovery of network services is not normally required for system functionality. It is recommended to disable the service to reduce the potential attach surface.','','Run the following command to disable avahi-daemon: # systemctl disable avahi-daemon','[{\"cis\": [\"2.2.3\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2053,'Ensure CUPS is not enabled','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.','','Run the following command to disable cups: # systemctl disable cups','[{\"cis\": [\"2.2.4\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2054,'Ensure DHCP Server is not enabled','The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses.','Unless a system is specifically set up to act as a DHCP server, it is recommended that this service be disabled to reduce the potential attack surface.','','Run the following commands to disable dhcpd: # systemctl disable isc-dhcp-server # systemctl disable isc-dhcp-server6','[{\"cis\": [\"2.2.5\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2055,'Ensure LDAP server is not enabled','The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.','If the system will not need to act as an LDAP server, it is recommended that the software be disabled to reduce the potential attack surface.','','Run the following command to disable slapd: # systemctl disable slapd','[{\"cis\": [\"2.2.6\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2056,'Ensure NFS and RPC are not enabled','The Network File System (NFS) is one of the first and most widely distributed file systems in the UNIX environment. It provides the ability for systems to mount file systems of other servers through the network.','If the system does not export NFS shares or act as an NFS client, it is recommended that these services be disabled to reduce remote attack surface.','','Run the following commands to disable nfs and rpcbind: # systemctl disable nfs-server # systemctl disable rpcbind','[{\"cis\": [\"2.2.7\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2057,'Ensure DNS Server is not enabled','The Domain Name System (DNS) is a hierarchical naming system that maps names to IP addresses for computers, services and other resources connected to a network.','Unless a system is specifically designated to act as a DNS server, it is recommended that the package be deleted to reduce the potential attack surface.','','Run the following command to disable named: # systemctl disable bind9','[{\"cis\": [\"2.2.8\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2058,'Ensure FTP Server is not enabled','The File 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.','','Run the following command to disable vsftpd: # systemctl disable vsftpd','[{\"cis\": [\"2.2.9\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2059,'Ensure HTTP Server is not enabled','HTTP or web servers provide the ability to host web site content.','Unless there is a need to run the system as a web server, it is recommended that the package be deleted to reduce the potential attack surface.','','Run the following command to disable apache2: # systemctl disable apache2','[{\"cis\": [\"2.2.10\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2060,'Ensure IMAP and POP3 server is not enabled','exim is an open source IMAP and POP3 server for Linux based systems.','Unless POP3 and/or IMAP servers are to be provided by this system, it is recommended that the package be removed to reduce the potential attack surface.','','Run the following commands to remove exim: # apt-get remove exim4; # apt-get purge exim4','[{\"cis\": [\"2.2.11\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2061,'Ensure Samba is not enabled','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.','','Run the following command to disable smbd: # systemctl disable smbd','[{\"cis\": [\"2.2.12\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2062,'Ensure HTTP Proxy Server is not enabled','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.','','Run the following command to disable squid: # systemctl disable squid','[{\"cis\": [\"2.2.13\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2063,'Ensure SNMP Server is not enabled','The Simple Network Management Protocol (SNMP) server is used to listen for SNMP commands from an SNMP management system, execute the commands or collect the information and then send results back to the requesting system.','The SNMP server can communicate using SNMP v1, which transmits data in the clear and does not require authentication to execute commands. Unless absolutely necessary, it is recommended that the SNMP service not be used. If SNMP is required the server should be configured to disallow SNMP v1.','','Run the following command to disable snmpd: # systemctl disable snmpd','[{\"cis\": [\"2.2.14\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2064,'Ensure mail transfer agent is configured for local-only mode','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.','','Edit /etc/postfix/main.cf and add the following line to the RECEIVING MAIL section. If the line already exists, change it to look like the line below: inet_interfaces = loopback-only . Restart postfix: # systemctl restart postfix','[{\"cis\": [\"2.2.15\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AC.4\", \"SC.7\"]}, {\"tsc\": [\"CC5.2\", \"CC6.4\", \"CC6.6\", \"CC6.7\"]}]'),(2065,'Ensure rsync service is not enabled','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.','','Run the following command to disable rsync: # systemctl disable rsync','[{\"cis\": [\"2.2.16\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(2066,'Ensure NIS Server is not enabled','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','','Run the following command to disable nis: # systemctl disable nis','[{\"cis\": [\"2.2.17\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2067,'Ensure NIS Client is not installed','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 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.','','Uninstall the nis package: # apt-get remove nis','[{\"cis\": [\"2.3.1\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2068,'Ensure rsh client is not installed','The rshpackage 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 rshpackage removes the clients for rsh, rcpand rlogin.','','Run the following command to uninstall rsh: apt-get remove rsh-client rsh-redone-client','[{\"cis\": [\"2.3.2\"]}, {\"cis_csc\": [\"2.6\", \"4.5\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2069,'Ensure talk client is not installed','The talksoftware makes it possible for users to send and receive messages across systems through a terminal session. The talkclient, which allows initialization of talk sessions, is installed by default.','The software presents a security risk as it uses unencrypted protocols for communication.','','Run the following command to uninstall talk: apt-get remove talk','[{\"cis\": [\"2.3.3\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2070,'Ensure telnet client is not installed','The telnet package contains the telnet client, which allows users to start connections to other systems via the telnet protocol.','The telnet protocol is insecure and unencrypted. The use of an unencrypted transmission medium could allow an unauthorized user to steal credentials. The ssh package provides an encrypted session and stronger security and is included in most Linux distributions.','','Run the following command to uninstall telnet: # apt-get remove telnet','[{\"cis\": [\"2.3.4\"]}, {\"cis_csc\": [\"2.6\", \"4.5\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2071,'Ensure LDAP client is not installed','The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.','If the system will not need to act as an LDAP client, it is recommended that the software be removed to reduce the potential attack surface.','','Run the following command to uninstall openldap-clients : # apt-get remove ldap-utils','[{\"cis\": [\"2.3.5\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2072,'Ensure IP forwarding is disabled','The net.ipv4.ip_forward and net.ipv6.conf.all.forwarding flags are used to tell the system whether it can forward packets or not.','Setting the flags to 0 ensures that a system with multiple interfaces (for example, a hard proxy), will never be able to forward packets, and therefore, never serve as a router.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.ip_forward = 0 net.ipv6.conf.all.forwarding = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.ip_forward=0 # sysctl -w net.ipv6.conf.all.forwarding=0 # sysctl -w net.ipv4.route.flush=1 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.1.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2073,'Ensure packet redirect sending is disabled','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.','','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 net.ipv4.conf.default.send_redirects=0 Modify active kernel parameters to match: # sysctl -w net.ipv4.conf.all.send_redirects=0 # sysctl -w net.ipv4.conf.default.send_redirects=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2074,'Ensure source routed packets are not accepted','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, net.ipv4.conf.default.accept_source_route, net.ipv6.conf.all.accept_source_route and net.ipv6.conf.default.accept_source_route to 0 disables the system from accepting source routed packets. Assume this system was capable of routing packets to Internet routable addresses on one interface and private addresses on another interface. Assume that the private addresses were not routable to the Internet routable addresses and vice versa. Under normal routing circumstances, an attacker from the Internet routable addresses could not use the system as a way to reach the private address systems. If, however, source routed packets were allowed, they could be used to gain access to the private address systems as the route could be specified, rather than rely on routing protocols that did not allow this routing.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 net.ipv6.conf.all.accept_source_route = 0 net.ipv6.conf.default.accept_source_route = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_source_route=0 # sysctl -w net.ipv4.conf.default.accept_source_route=0 # sysctl -w net.ipv6.conf.all.accept_source_route=0 # sysctl -w net.ipv6.conf.default.accept_source_route=0 # sysctl -w net.ipv4.route.flush=1 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.2.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2075,'Ensure ICMP redirects are not accepted','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 and net.ipv6.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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 net.ipv6.conf.all.accept_redirects = 0 net.ipv6.conf.default.accept_redirects = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_redirects=0 # sysctl -w net.ipv4.conf.default.accept_redirects=0 # sysctl -w net.ipv6.conf.all.accept_redirects=0 # sysctl -w net.ipv6.conf.default.accept_redirects=0 # sysctl -w net.ipv4.route.flush=1 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.2.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2076,'Ensure secure ICMP redirects are not accepted','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.secure_redirects = 0 net.ipv4.conf.default.secure_redirects = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.secure_redirects=0 # sysctl -w net.ipv4.conf.default.secure_redirects=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2077,'Ensure suspicious packets are logged','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.log_martians = 1 net.ipv4.conf.default.log_martians = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.log_martians=1 # sysctl -w net.ipv4.conf.default.log_martians=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.4\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2078,'Ensure broadcast ICMP requests are ignored','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_echo_ignore_broadcasts = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2079,'Ensure bogus ICMP responses are ignored','Setting icmp_ignore_bogus_error_responses to 1 prevents the kernel from logging bogus responses (RFC-1122 non-compliant) from broadcast reframes, keeping file systems from filling up with useless log messages.','Some routers (and some attackers) will send responses that violate RFC-1122 and attempt to fill up a log file system with many useless error messages.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_ignore_bogus_error_responses = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2080,'Ensure Reverse Path Filtering is enabled','Setting net.ipv4.conf.all.rp_filter and net.ipv4.conf.default.rp_filter to 1 forces the Linux kernel to utilize reverse path filtering on a received packet to determine if the packet was valid. Essentially, with reverse path filtering, if the return packet does not go out the same interface that the corresponding source packet came from, the packet is dropped (and logged if log_martians is set).','Setting these flags is a good way to deter attackers from sending your system bogus packets that cannot be responded to. One instance where this feature breaks down is if asymmetrical routing is employed. This would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your system, you will not be able to enable this feature without breaking the routing.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.rp_filter=1 # sysctl -w net.ipv4.conf.default.rp_filter=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.7\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2081,'Ensure TCP SYN Cookies is enabled','When tcp_syncookies is set, the kernel will handle TCP SYN packets normally until the half-open connection queue is full, at which time, the SYN cookie functionality kicks in. SYN cookies work by not using the SYN queue at all. Instead, the kernel simply replies to the SYN with a SYN|ACK, but will include a specially crafted TCP sequence number that encodes the source and destination IP address and port number and the time the packet was sent. A legitimate connection would send the ACK packet of the three way handshake with the specially crafted sequence number. This allows the system to verify that it has received a valid response to a SYN cookie and allow the connection, even though there is no corresponding SYN in the queue.','Attackers use SYN flood attacks to perform a denial of service attacked on a system by sending many SYN packets without completing the three way handshake. This will quickly use up slots in the kernel's half-open connection queue and prevent legitimate connections from succeeding. SYN cookies allow the system to keep accepting valid connections, even if under a denial of service attack.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.tcp_syncookies = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.tcp_syncookies=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.8\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2082,'Ensure IPv6 router advertisements are not accepted','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.default.accept_ra = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_ra=0 # sysctl -w net.ipv6.conf.default.accept_ra=0 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.2.9\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2083,'Install TCP Wrappers','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.','','Install tcpd : # apt-get install tcpd To verify if a service supports TCP Wrappers, run the following command: # ldd <path-to-daemon> | grep libwrap.so If there is any output, then the service supports TCP Wrappers.','[{\"cis\": [\"3.3.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(2084,'Ensure /etc/hosts.allow is configured','The /etc/hosts.allow file specifies which IP addresses are permitted to connect to the host. It is intended to be used in conjunction with the /etc/hosts.deny file.','The /etc/hosts.allow file supports access control by IP and helps ensure that only authorized systems can connect to the system.','','Run the following command to create /etc/hosts.allow: # echo "ALL: <net>/<mask>, <net>/<mask>, ..." >/etc/hosts.allow. Where each <net>/<mask> combination (for example, "192.168.1.0/255.255.255.0") represents one network block in use by your organization that requires access to this system.','[{\"cis\": [\"3.3.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(2085,'Ensure /etc/hosts.deny is configured','The /etc/hosts.deny file specifies which IP addresses are not permitted to connect to the host. It is intended to be used in conjunction with the /etc/hosts.allow file.','The /etc/hosts.deny file serves as a failsafe so that any host not specified in /etc/hosts.allow is denied access to the server.','','Run the following command to create /etc/hosts.deny: # echo "ALL: ALL" >> /etc/hosts.deny','[{\"cis\": [\"3.3.3\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(2086,'Verify permissions on /etc/hosts.allow','The /etc/hosts.allow 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.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.','','Run the following commands to set permissions on /etc/hosts.allow : # chown root:root /etc/hosts.allow # chmod 644 /etc/hosts.allow','[{\"cis\": [\"3.3.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"1.3.5\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2087,'Verify permissions on /etc/hosts.deny','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.','','Run the following commands to set permissions on /etc/hosts.deny : # chown root:root /etc/hosts.deny # chmod 644 /etc/hosts.deny','[{\"cis\": [\"3.3.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"1.3.5\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2088,'Ensure DCCP is disabled','The Datagram Congestion Control Protocol (DCCP) is a transport layer protocol that supports streaming media and telephony. DCCP provides a way to gain access to congestion control, without having to do it at the application layer, but does not provide in- sequence delivery.','If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/dccp.conf and add the following line: install dccp /bin/true','[{\"cis\": [\"3.4.1\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2089,'Ensure SCTP is disabled','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.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/sctp.conf and add the following line: install sctp /bin/true','[{\"cis\": [\"3.4.2\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2090,'Ensure RDS is disabled','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.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/rds.conf and add the following line: install rds /bin/true','[{\"cis\": [\"3.4.3\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2091,'Ensure TIPC is disabled','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.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/tipc.conf and add the following line: install tipc /bin/true','[{\"cis\": [\"3.4.4\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2092,'Ensure default deny firewall policy','A default deny all policy on connections ensures that any unconfigured network usage will be rejected.','With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following commands to implement a default DROP policy: # iptables -P INPUT DROP # iptables -P OUTPUT DROP # iptables -P FORWARD DROP. Notes: Changing firewall settings while connected over network can result in being locked out of the system. Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well.','[{\"cis\": [\"3.5.1.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(2093,'Ensure loopback traffic is configured','Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (127.0.0.0/8).','Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (127.0.0.0/8) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.','','Run the following commands to implement the loopback rules: # iptables -A INPUT -i lo -j ACCEPT # iptables -A OUTPUT -o lo -j ACCEPT # iptables -A INPUT -s 127.0.0.0/8 -j DROP','[{\"cis\": [\"3.5.1.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(2094,'Ensure IPv6 default deny firewall policy','A default deny all policy on connections ensures that any unconfigured network usage will be rejected.','With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following commands to implement a default DROP policy: # ip6tables -P INPUT DROP # ip6tables -P OUTPUT DROP # ip6tables -P FORWARD DROP. Notes: Changing firewall settings while connected over network can result in being locked out of the system. Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well.','[{\"cis\": [\"3.5.2.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(2095,'Ensure IPv6 loopback traffic is configured','Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (::1).','Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (::1) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.','','Run the following commands to implement the loopback rules: # ip6tables -A INPUT -i lo -j ACCEPT # ip6tables -A OUTPUT -o lo -j ACCEPT # ip6tables -A INPUT -s ::1 -j DROP','[{\"cis\": [\"3.5.2.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(2096,'Ensure iptables is installed','iptables allows configuration of the IPv4 tables in the linux kernel and the rules stored within them. Most firewall configuration utilities operate as a front end to iptables.','iptables is required for firewall management and configuration.','','Run the following command to install iptables: # apt-get install iptables','[{\"cis\": [\"3.5.3\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(2097,'Ensure audit log storage size is configured','Configure the maximum size of the audit log file. Once the log reaches the maximum size, it will be rotated and a new log file will be started.','It is important that an appropriate size is determined for log files so that they do not impact the system and audit data is not lost.','','Set the following parameter in /etc/audit/auditd.conf in accordance with site policy: max_log_file = <MB> Notes: The max_log_file parameter is measured in megabytes.','[{\"cis\": [\"4.1.1.1\"]}, {\"cis_csc\": [\"6.4\"]}]'),(2098,'Ensure system is disabled when audit logs are full','The auditd daemon can be configured to halt the system when the audit logs are full.','In high security contexts, the risk of detecting unauthorized access or nonrepudiation exceeds the benefit of the system's availability.','','Set the following parameters in /etc/audit/auditd.conf: space_left_action = email action_mail_acct = root admin_space_left_action = halt','[{\"cis\": [\"4.1.1.2\"]}, {\"cis_csc\": [\"6.4\"]}]'),(2099,'Ensure audit logs are not automatically deleted','The max_log_file_action setting determines how to handle the audit log file reaching the max file size. A value of keep_logs will rotate the logs but never delete old logs.','In high security contexts, the benefits of maintaining a long audit history exceed the cost of storing the audit history.','','Set the following parameter in /etc/audit/auditd.conf: max_log_file_action = keep_logs','[{\"cis\": [\"4.1.1.3\"]}, {\"cis_csc\": [\"6.4\"]}]'),(2100,'Ensure auditd service is enabled','Turn on the auditd daemon to record system events.','The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring.','','Run the following command to enable auditd: # systemctl enable auditd','[{\"cis\": [\"4.1.2\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.1\", \"10.7\"]}, {\"tsc\": [\"CC6.1\"\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2101,'Ensure auditing for processes that start prior to auditd is enabled','Configure grub or lilo so that processes that are capable of being audited can be audited even if they start up prior to auditd startup.','Audit events need to be captured on processes that start up prior to auditd, so that potential malicious activity cannot go undetected.','','1) Edit /etc/default/grub and add audit=1 to GRUB_CMDLINE_LINUX: GRUB_CMDLINE_LINUX="audit=1" 2) Run the following command to update the grub2 configuration: # update-grub Notes: This recommendation is designed around the grub bootloader, if LILO or another bootloader is in use in your environment enact equivalent settings.','[{\"cis\": [\"4.1.3\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.2.6\", \"10.7\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"35.7.d\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2102,'Ensure events that modify date and time information are collected','Capture events where the system date and/or time has been modified. The parameters in this section are set to determine if the adjtimex (tune kernel clock), settimeofday (Set time, using timeval and timezone structures) stime (using seconds since 1/1/1970) or clock_settime (allows for the setting of several internal clocks and timers) system calls have been executed and always write an audit record to the /var/log/audit.log file upon exit, tagging the records with the identifier "time-change"','Unexpected changes in system date and/or time could be a sign of malicious activity on the system.','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time- change | -a always,exit -F arch=b32 -S clock_settime -k time-change | -w /etc/localtime -p wa -k time-change. For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change | -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change | -a always,exit -F arch=b64 -S clock_settime -k time-change -a always,exit -F arch=b32 -S clock_settime -k time-change | -w /etc/localtime -p wa -k time-change','[{\"cis\": [\"4.1.4\"]}, {\"cis_csc\": [\"5.5\"]}, {\"pci_dss\": [\"10.4.2\", \"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.3\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2103,'Ensure events that modify user/group information are collected','Record events affecting the group , passwd (user IDs), shadow and gshadow (passwords) or /etc/security/opasswd (old passwords, based on remember parameter in the PAM configuration) files. The parameters in this section will watch the files to see if they have been opened for write or have had attribute changes (e.g. permissions) and tag them with the identifier "identity" in the audit log file.','Unexpected changes to these files could be an indication that the system has been compromised and that an unauthorized user is attempting to hide their activities or compromise additional accounts.','','Add the following lines to the /etc/audit/audit.rules file: -w /etc/group -p wa -k identity | -w /etc/passwd -p wa -k identity | -w /etc/gshadow -p wa -k identity | -w /etc/shadow -p wa -k identity | -w /etc/security/opasswd -p wa -k identity Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.5\"]}, {\"cis_csc\": [\"4.8\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(2104,'Ensure events that modify the system's network environment are collected','Record changes to network environment files or system calls. The below parameters monitor the sethostname (set the systems host name) or setdomainname (set the systems domainname) system calls, and write an audit event on system call exit. The other parameters monitor the /etc/issue and /etc/issue.net files (messages displayed pre- login), /etc/hosts (file containing host names and associated IP addresses) and /etc/sysconfig/network (directory containing network interface scripts and configurations) files.','Monitoring sethostname and setdomainname will identify potential unauthorized changes to host and domainname of a system. The changing of these names could potentially break security parameters that are set based on those names. The /etc/hosts file is monitored for changes in the file that can indicate an unauthorized intruder is trying to change machine associations with IP addresses and trick users and processes into connecting to unintended machines. Monitoring /etc/issue and /etc/issue.net is important, as intruders could put disinformation into those files and trick users into providing information to the intruder. Monitoring /etc/sysconfig/network is important as it can show if network interfaces or scripts are being modified in a way that can lead to the machine becoming unavailable or compromised. All audit records will be tagged with the identifier "system-locale."','','For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S sethostname -S setdomainname -k system-locale | -a always,exit -F arch=b32 -S sethostname -S setdomainname -k system-locale | -w /etc/issue -p wa -k system-locale | -w /etc/issue.net -p wa -k system-locale | -w /etc/hosts -p wa -k system-locale | -w /etc/sysconfig/network -p wa -k system-locale Notes: /etc/sysconfig/network is common to Red Hat and SUSE based distributions. You should expand or replace this coverage to any network configuration files on your system such as /etc/network on Debian based distributions. Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.6\"]}, {\"cis_csc\": [\"5.5\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(2105,'Ensure events that modify the system's Mandatory Access Controls are collected','Monitor SELinux/AppArmor mandatory access controls. The parameters below monitor any write access (potential additional, deletion or modification of files in the directory) or attribute changes to the /etc/selinux or /etc/apparmor and /etc/apparmor.d directories.','Changes to files in these directories could indicate that an unauthorized user is attempting to modify access controls and change security contexts, leading to a compromise of the system.','','On systems using SELinux add the following line to the /etc/audit/audit.rules file: -w /etc/selinux/ -p wa -k MAC-policy | -w /usr/share/selinux/ -p wa -k MAC-policy On systems using AppArmor add the following line to the /etc/audit/audit.rules file: -w /etc/apparmor/ -p wa -k MAC-policy | -w /etc/apparmor.d/ -p wa -k MAC-policy','[{\"cis\": [\"4.1.7\"]}, {\"cis_csc\": [\"5.5\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(2106,'Ensure login and logout events are collected','Monitor login and logout events. The parameters below track changes to files associated with login/logout events. The file /var/log/faillog tracks failed events from login. The file /var/log/lastlog maintain records of the last time a user successfully logged in. The file /var/log/tallylog maintains records of failures via the pam_tally2 module','Monitoring login/logout events could provide a system administrator with information associated with brute force attacks against user logins.','','Add the following lines to the /etc/audit/audit.rules file: -w /var/log/faillog -p wa -k logins | -w /var/log/lastlog -p wa -k logins | -w /var/log/tallylog -p wa -k logins. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.8\"]}, {\"cis_csc\": [\"4.9\", \"16.11\", \"16.13\"]}, {\"pci_dss\": [\"10.2.1\", \"10.2.4\", \"10.3\"]}, {\"nist_800_53\": [\"AC.7\", \"AU.14\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(2107,'Ensure session initiation information is collected','Monitor session initiation events. The parameters in this section track changes to the files associated with session events. The file /var/run/utmp file tracks all currently logged in users. All audit records will be tagged with the identifier "session." The /var/log/wtmp file tracks logins, logouts, shutdown, and reboot events. The file /var/log/btmp keeps track of failed login attempts and can be read by entering the command /usr/bin/last -f /var/log/btmp . All audit records will be tagged with the identifier "logins."','Monitoring these files for changes could alert a system administrator to logins occurring at unusual hours, which could indicate intruder activity (i.e. a user logging in at a time when they do not normally log in).','','Add the following lines to the /etc/audit/audit.rules file: -w /var/run/utmp -p wa -k session | -w /var/log/wtmp -p wa -k logins | -w /var/log/btmp -p wa -k logins. Notes: The last command can be used to read /var/log/wtmp (last with no parameters) and /var/run/utmp (last -f /var/run/utmp). Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.9\"]}, {\"cis_csc\": [\"4.9\", \"16.11\", \"16.13\"]}, {\"pci_dss\": [\"10.3\"]}, {\"nist_800_53\": [\"AC.7\", \"AU.14\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2108,'Ensure discretionary access control permission modification events are collected','Monitor changes to file permissions, attributes, ownership and group. The parameters in this section track changes for system calls that affect file permissions and attributes. The chmod , fchmod and fchmodat system calls affect the permissions associated with a file. The chown , fchown , fchownat and lchown system calls affect owner and group attributes on a file. The setxattr , lsetxattr , fsetxattr (set extended file attributes) and removexattr , lremovexattr , fremovexattr (remove extended file attributes) control extended file attributes. In all cases, an audit record will only be written for non-system user ids (auid >= 1000) and will ignore Daemon events (auid = 4294967295). All audit records will be tagged with the identifier "perm_mod."','Monitoring for changes in file attributes could alert a system administrator to activity that could indicate intruder activity or policy violation.','','For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod | -a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod | -a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod | -a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod | -a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod | -a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.10\"]}, {\"cis_csc\": [\"5.5\"]}, {\"pci_dss\": [\"10.4.2\", \"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(2109,'Ensure unsuccessful unauthorized file access attempts are collected','Monitor for unsuccessful attempts to access files. The parameters below are associated with system calls that control creation ( creat ), opening ( open , openat ) and truncation ( truncate , ftruncate ) of files. An audit log record will only be written if the user is a non- privileged user (auid > = 1000), is not a Daemon event (auid=4294967295) and if the system call returned EACCES (permission denied to the file) or EPERM (some other permanent error associated with the specific system call). All audit records will be tagged with the identifier "access."','Failed attempts to open, create or truncate files could be an indication that an individual or process is trying to gain unauthorized access to the system.','','For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access | -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access | -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access | -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.11\"]}, {\"cis_csc\": [\"14.9\"]}, {\"pci_dss\": [\"10.2.4\"]}, {\"nist_800_53\": [\"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(2110,'Ensure successful file system mounts are collected','Monitor the use of the mount system call. The mount (and umount ) system call controls the mounting and unmounting of file systems. The parameters below configure the system to create an audit record when the mount system call is used by a non-privileged user.','It is highly unusual for a non privileged user to mount file systems to the system. While tracking mount commands gives the system administrator evidence that external media may have been mounted (based on a review of the source of the mount and confirming it's an external media type), it does not conclusively indicate that data was exported to the media. System administrators who wish to determine if data were exported, would also have to track successful open , creat and truncate system calls requiring write access to a file under the mount point of the external media file system. This could give a fair indication that a write occurred. The only way to truly prove it, would be to track successful writes to the external media. Tracking write system calls could quickly fill up the audit log and is not recommended. Recommendations on configuration options to track data export to media is beyond the scope of this document.','','For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts | -a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts. Notes: This tracks successful and unsuccessful mount commands. File system mounts do not have to come from external media and this action still does not verify write (e.g. CD ROMS). Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.13\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(2111,'Ensure file deletion events by users are collected','Monitor the use of system calls associated with the deletion or renaming of files and file attributes. This configuration statement sets up monitoring for the unlink (remove a file), unlinkat (remove a file attribute), rename (rename a file) and renameat (rename a file attribute) system calls and tags them with the identifier "delete".','Monitoring these calls from non-privileged users could provide a system administrator with evidence that inappropriate removal of files and file attributes associated with protected files is occurring. While this audit option will look at all events, system administrators will want to look for specific privileged files that are being deleted or altered.','','For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete | -a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete. Notes: At a minimum, configure the audit system to collect file deletion events for all users and root. Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.14\"]}, {\"cis_csc\": [\"6,2\", \"13\"]}, {\"pci_dss\": [\"10.5.5\"]}, {\"nist_800_53\": [\"AU.14\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2112,'Ensure changes to system administration scope (sudoers) is collected','Monitor scope changes for system administrations. If the system has been properly configured to force system administrators to log in as themselves first and then use the sudo command to execute privileged commands, it is possible to monitor changes in scope. The file /etc/sudoers will be written to when the file or its attributes have changed. The audit records will be tagged with the identifier "scope."','Changes in the /etc/sudoers file can indicate that an unauthorized change has been made to scope of system administrator activity.','','Add the following line to the /etc/audit/audit.rules file: -w /etc/sudoers -p wa -k scope | -w /etc/sudoers.d/ -p wa -k scope. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.15\"]}, {\"cis_csc\": [\"4.8\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(2113,'Ensure system administrator actions (sudolog) are collected','Monitor the sudo log file. If the system has been properly configured to disable the use of the su command and force all administrators to have to log in first and then use sudo to execute privileged commands, then all administrator commands will be logged to /var/log/sudo.log . Any time a command is executed, an audit event will be triggered as the /var/log/sudo.log file will be opened for write and the executed administration command will be written to the log.','Changes in /var/log/sudo.log indicate that an administrator has executed a command or the log file itself has been tampered with. Administrators will want to correlate the events written to the audit trail with the records written to /var/log/sudo.log to verify if unauthorized commands have been executed.','','Add the following lines to the /etc/audit/audit.rules file: -w /var/log/sudo.log -p wa -k actions. Notes: The system must be configured with sudisabled (See Item 5.6 Ensure access to the su command is restricted) to force all command execution through sudo. This will not be effective on the console, as administrators can log in as root. Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.16\"]}, {\"cis_csc\": [\"4.9\"]}, {\"pci_dss\": [\"10.2.2\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.6\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(2114,'Ensure kernel module loading and unloading is collected','Monitor the loading and unloading of kernel modules. The programs insmod (install a kernel module), rmmod (remove a kernel module), and modprobe (a more sophisticated program to load and unload modules, as well as some other features) control loading and unloading of modules. The init_module (load a module) and delete_module (delete a module) system calls control loading and unloading of modules. Any execution of the loading and unloading module programs and system calls will trigger an audit record with an identifier of "modules".','Monitoring the use of insmod, rmmod and modprobe could provide system administrators with evidence that an unauthorized user loaded or unloaded a kernel module, possibly compromising the security of the system. Monitoring of the init_module and delete_module system calls would reflect an unauthorized user attempting to use a different program to load and unload modules.','','For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -w /sbin/insmod -p x -k modules | -w /sbin/rmmod -p x -k modules | -w /sbin/modprobe -p x -k modules | -a always,exit -F arch=b64 -S init_module -S delete_module -k modules. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.17\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}]'),(2115,'Ensure the audit configuration is immutable','Set system audit so that audit rules cannot be modified with auditctl. Setting the flag "-e 2" forces audit to be put in immutable mode. Audit changes can only be made on system reboot.','In immutable mode, unauthorized users cannot execute changes to the audit system to potentially hide malicious activity and then put the audit rules back. Users would most likely notice a system reboot and that could alert administrators of an attempt to make unauthorized audit changes.','','Add the following line to the end of the /etc/audit/audit.rules file: -e 2. Notes: This setting will ensure reloading the auditd config to set active settings requires a system reboot.','[{\"cis\": [\"4.1.18\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.5\"]}, {\"nist_800_53\": [\"AU.9\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC7.2\"]}]'),(2116,'Ensure rsyslog Service is enabled','Once the rsyslog package is installed it needs to be activated.','If the rsyslog service is not activated the system will not have a syslog service running.','','Run the following command to enable rsyslog: # systemctl enable rsyslog','[{\"cis\": [\"4.2.1.1\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.1\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2117,'Ensure rsyslog default file permissions configured','rsyslog will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files.','It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected.','','Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and set $FileCreateMode to 0640 or more restrictive: $FileCreateMode 0640','[{\"cis\": [\"4.2.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.5.1\", \"10.5.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.9\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC7.2\", \"CC.7.3\", \"CC7.4\"]}]'),(2118,'Ensure rsyslog is configured to send logs to a remote log host','The rsyslog utility supports the ability to send logs it gathers to a remote log host running syslogd(8) or to receive messages from remote hosts, reducing administrative overhead.','Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.','','Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and add the following line (where loghost.example.com is the name of your central log host): *.* @@loghost.example.com. Run the following command to reload the rsyslogd configuration: # pkill -HUP rsyslogd','[{\"cis\": [\"4.2.1.4\"]}, {\"cis_csc\": [\"6.6\", \"6.8\"]}, {\"pci_dss\": [\"10.5.3\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.4\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2119,'Ensure remote rsyslog messages are only accepted on designated log hosts','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.','','For hosts that are designated as log hosts, edit the /etc/rsyslog.conf file and un-comment or add the following lines:$ModLoad imtcp & $InputTCPServerRun 514. For hosts that are not designated as log hosts, edit the /etc/rsyslog.conf file and comment or remove the following lines: # $ModLoad imtcp # $InputTCPServerRun 514. Run the following command to reload the rsyslogd configuration: # pkill -HUP rsyslogd','[{\"cis\": [\"4.2.1.5\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"10.5.1\"]}]'),(2120,'Ensure syslog-ng service is enabled','Once the syslog-ng package is installed it needs to be activated.','If the syslog-ng service is not activated the system may default to the syslogd service or lack logging instead.','','Run the following command to enable rsyslog : # systemctl enable syslog-ng','[{\"cis\": [\"4.2.2.1\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.1\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2121,'Ensure syslog-ng default file permissions configured','syslog-ng will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files.','It is important to ensure that log files have the correct permissions to ensure that sensitive syslog-ng data is archived and protected.','','Edit the /etc/syslog-ng/syslog-ng.conf and set perm option to 0640 or more restrictive: options { chain_hostnames(off); flush_lines(0); perm(0640); stats_freq(3600); threaded(yes); };','[{\"cis\": [\"4.2.2.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.5.1\", \"10.5.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.9\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC7.2\", \"CC.7.3\", \"CC7.4\"]}]'),(2122,'Ensure syslog-ng is configured to send logs to a remote log host','The syslog-ng utility supports the ability to send logs it gathers to a remote log host or to receive messages from remote hosts, reducing administrative overhead.','Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.','','Edit the /etc/syslog-ng/syslog-ng.conf file and add the following lines (where logfile.example.com is the name of your central log host). destination logserver { tcp("logfile.example.com" port(514)); }; log { source(src); destination(logserver); }; Run the following command to reload the rsyslogd configuration: # pkill -HUP syslog-ng','[{\"cis\": [\"4.2.2.4\"]}, {\"cis_csc\": [\"6.6\", \"6.8\"]}, {\"pci_dss\": [\"10.5.3\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.4\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2123,'Ensure rsyslog or syslog-ng is installed','The rsyslog and syslog-ng software are recommended replacements to the original syslogd daemon which provide improvements over syslogd , such as connection-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server.','The security enhancements of rsyslog and syslog-ng such as connection-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server) justify installing and configuring the package.','','Install rsyslog or syslog-ng using one of the following commands: # apt-get install rsyslog # apt-get install syslog-ng','[{\"cis\": [\"4.2.3\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.1\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2124,'Ensure cron daemon is enabled','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.','','Run the following command to enable cron: systemctl enable cron','[{\"cis\": [\"5.1.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2125,'Ensure permissions on /etc/crontab are configured','The /etc/crontab file is used by cron to control its own jobs. The commands in this item make sure that root is the user and group owner of the file and that only the owner can access the file.','This file contains information on what system jobs are run by cron. Write access to these files could provide unprivileged users with the ability to elevate their privileges. Read access to these files could provide users with the ability to gain insight on system jobs that run on the system and could provide them a way to gain unauthorized privileged access.','','Run the following commands to set ownership and permissions on /etc/crontab : chown root:root /etc/crontab and chmod og-rwx /etc/crontab','[{\"cis\": [\"5.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(2126,'Ensure permissions on /etc/cron.hourly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.hourly : chown root:root /etc/cron.hourly and chmod og-rwx /etc/cron.hourly','[{\"cis\": [\"5.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2127,'Ensure permissions on /etc/cron.daily are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.daily : chown root:root /etc/cron.daily and chmod og-rwx /etc/cron.daily','[{\"cis\": [\"5.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2128,'Ensure permissions on /etc/cron.weekly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.weekly : chown root:root /etc/cron.weekly and chmod og-rwx /etc/cron.weekly','[{\"cis\": [\"5.1.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2129,'Ensure permissions on /etc/cron.monthly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.monthly : chown root:root /etc/cron.monthly and chmod og-rwx /etc/cron.monthly','[{\"cis\": [\"5.1.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2130,'Ensure permissions on /etc/cron.d are configured','Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow , cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs.','On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.','','Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow: rm /etc/cron.deny;rm /etc/at.deny;touch /etc/cron.allow; touch /etc/at.allow; chmod og-rwx /etc/cron.allow; chmod og-rwx /etc/at.allow; chown root:root /etc/cron.allow and chown root:root /etc/at.allow','[{\"cis\": [\"5.1.7\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2131,'Ensure at/cron is restricted to authorized users','Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow, cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs.','On many systems, only the system administrator is authorized to schedule cronjobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.','','Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow: # rm /etc/cron.deny # rm /etc/at.deny # touch /etc/cron.allow # touch /etc/at.allow # chmod og-rwx /etc/cron.allow # chmod og-rwx /etc/at.allow # chown root:root /etc/cron.allow # chown root:root /etc/at.allow','[{\"cis\": [\"5.1.8\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2132,'Ensure permissions on /etc/ssh/sshd_config are configured','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- privileged users.','','Run the following commands to set ownership and permissions on /etc/ssh/sshd_config: # chown root:root /etc/ssh/sshd_config # chmod og-rwx /etc/ssh/sshd_config','[{\"cis\": [\"5.2.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2133,'Ensure SSH Protocol is set to 2','Older versions of SSH support 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. Notes: This command not longer exists in newer versions of SSH. This check is still being included for systems that may be running an older version of SSH. As of openSSH version 7.4 this parameter will not cause an issue when included.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2','[{\"cis\": [\"5.2.4\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(2134,'Ensure SSH LogLevel is appropriate','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. VERBOSE level specifies that login and logout activity as well as the key fingerprint for any SSH key used for login will be logged. This information is important for SSH key management, especially in legacy environments.','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel VERBOSE or LogLevel INFO','[{\"cis\": [\"5.2.5\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(2135,'Ensure SSH X11 forwarding is disabled','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.','','Edit the /etc/ssh/sshd_configfile to set the parameter as follows: X11Forwarding no','[{\"cis\": [\"5.2.6\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2136,'Ensure SSH MaxAuthTries is set to 4 or less','The MaxAuthTries parameter specifies the maximum number of authentication attempts permitted per connection. When the login failure count reaches half the number, error messages will be written to the syslog file detailing the login failure.','Setting the MaxAuthTries parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. While the recommended setting is 4, set the number based on site policy.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4','[{\"cis\": [\"5.2.7\"]}, {\"cis_csc\": [\"16.13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2137,'Ensure SSH IgnoreRhosts is enabled','The IgnoreRhosts parameter specifies that .rhostsand .shostsfiles will not be used in RhostsRSAAuthenticationor HostbasedAuthentication.','Setting this parameter forces users to enter a password when authenticating with ssh.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes','[{\"cis\": [\"5.2.8\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(2138,'Ensure SSH HostbasedAuthentication is disabled','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no','[{\"cis\": [\"5.2.9\"]}, {\"cis_csc\": [\"16.3\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(2139,'Ensure SSH root login is disabled','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no','[{\"cis\": [\"5.2.10\"]}, {\"cis_csc\": [\"4.3\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(2140,'Ensure SSH PermitEmptyPasswords is disabled','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','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no','[{\"cis\": [\"5.2.11\"]}, {\"cis_csc\": [\"16.3\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(2141,'Ensure SSH PermitUserEnvironment is disabled','The PermitUserEnvironment option allows users to present environment options to the ssh daemon.','Permitting users the ability to set environment variables through the SSH daemon could potentially allow users to bypass security controls (e.g. setting an execution path that has ssh executing trojan'd programs)','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitUserEnvironment no','[{\"cis\": [\"5.2.12\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\", \"CC6.1\", \"CC7.2\"]}]'),(2142,'Ensure only strong ciphers are used','This variable limits the ciphers that SSH can use during communication.','Weak ciphers that are used for authentication to the cryptographic module cannot be relied upon to provide confidentiality or integrity, and system data may be compromised The DES, Triple DES, and Blowfish ciphers, as used in SSH, have a birthday bound of approximately four billion blocks, which makes it easier for remote attackers to obtain cleartext data via a birthday attack against a long-duration encrypted session, aka a "Sweet32" attack The RC4 algorithm, as used in the TLS protocol and SSL protocol, does not properly combine state data with key data during the initialization phase, which makes it easier for remote attackers to conduct plaintext-recovery attacks against the initial bytes of a stream by sniffing network traffic that occasionally relies on keys affected by the Invariance Weakness, and then using a brute-force approach involving LSB values, aka the "Bar Mitzvah" issue The passwords used during an SSH session encrypted with RC4 can be recovered by an attacker who is able to capture and replay the session Error handling in the SSH protocol; Client and Server, when using a block cipher algorithm in Cipher Block Chaining (CBC) mode, makes it easier for remote attackers to recover certain plaintext data from an arbitrary block of ciphertext in an SSH session via unknown vectors The mm_newkeys_from_blob function in monitor_wrap.c, when an AES-GCM cipher is used, does not properly initialize memory for a MAC context data structure, which allows remote authenticated users to bypass intended ForceCommand and login-shell restrictions via packet data that provides a crafted callback address','','Edit the /etc/ssh/sshd_config file add/modify the Ciphers line to contain a comma separated list of the site approved ciphers Example: Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr','[{\"cis\": [\"5.2.13\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\", \"CC6.1\", \"CC7.2\"]}]'),(2143,'Ensure only strong MAC algorithms are used','This variable limits the types of MAC algorithms that SSH can use during communication.','MD5 and 96-bit MAC algorithms are considered weak and have been shown to increase exploitability in SSH downgrade attacks. Weak algorithms continue to have a great deal of attention as a weak spot that can be exploited with expanded computing power. An attacker that breaks the algorithm could take advantage of a MiTM position to decrypt the SSH tunnel and capture credentials and information','','Edit the /etc/ssh/sshd_config file and add/modify the MACs line to contain a comma separated list of the site approved MACs Example: MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2- 512,hmac-sha2-256','[{\"cis\": [\"5.2.14\"]}, {\"cis_csc\": [\"14.4\", \"16.5\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\", \"CC6.1\", \"CC7.2\"]}]'),(2144,'Ensure only strong Key Exchange algorithms are used','Key exchange is any method in cryptography by which cryptographic keys are exchanged between two parties, allowing use of a cryptographic algorithm. If the sender and receiver wish to exchange encrypted messages, each must be equipped to encrypt messages to be sent and decrypt messages received','Key exchange methods that are considered weak should be removed. A key exchange method may be weak because too few bits are used, or the hashing algorithm is considered too weak. Using weak algorithms could expose connections to man-in-the-middle attacks','','Edit the /etc/ssh/sshd_config file add/modify the KexAlgorithms line to contain a comma separated list of the site approved key exchange algorithms Example: KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman- group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18- sha512,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie- hellman-group-exchange-sha256','[{\"cis\": [\"5.2.15\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\", \"CC6.1\", \"CC7.2\"]}]'),(2145,'Ensure SSH Idle Timeout Interval is configured','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.','','Edit the /etc/ssh/sshd_config file to set the parameters according to site policy: ClientAliveInterval 300 ClientAliveCountMax 0','[{\"cis\": [\"5.2.16\"]}, {\"cis_csc\": [\"16.11\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(2146,'Ensure SSH LoginGraceTime is set to one minute or less','The LoginGraceTime parameter specifies the time allowed for successful authentication to the SSH server. The longer the Grace period is the more open unauthenticated connections can exist. Like other session controls in this session the Grace Period should be limited to appropriate organizational limits to ensure the service is available for needed access.','Setting the LoginGraceTime parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. It will also limit the number of concurrent unauthenticated connections While the recommended setting is 60 seconds (1 Minute), set the number based on site policy.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: LoginGraceTime 60','[{\"cis\": [\"5.2.17\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"8.1\"]}]'),(2147,'Ensure SSH access is limited','There are several options available to limit which users and group can access the system via SSH. It is recommended that at least one of the following options be leveraged: AllowUsers, AllowGroups, DenyUsers, DenyGroups.','Restricting which users can remotely access the system via SSH will help ensure that only authorized users access the system.','','Edit the /etc/ssh/sshd_config file to set one or more of the parameter as follows: AllowUsers <userlist> AllowGroups <grouplist> DenyUsers <userlist> DenyGroups <grouplist>','[{\"cis\": [\"5.2.18\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"8.1\"]}]'),(2148,'Ensure SSH warning banner is configured','The Banner parameter specifies a file whose contents must be sent to the remote user before authentication is permitted. By default, no banner is displayed.','Banners are used to warn connecting users of the particular site's policy regarding connection. Presenting a warning message prior to the normal user login may assist the prosecution of trespassers on the computer system.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: Banner /etc/issue.net','[{\"cis\": [\"5.2.19\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2149,'Ensure password creation requirements are configured','The pam_pwquality.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more. The following are definitions of the pam_pwquality.so options: - retry=3 (Allow 3 tries before sending back a failure). The following options are set in the /etc/security/pwquality.conf file: - minlen = 14 dcredit = -1 ucredit = -1 ocredit = -1 lcredit = -1 (The settings shown above are one possible policy. Alter these values to conform to your own organization's password policies.)','Strong passwords protect systems from being hacked through brute force methods.','','1) Run the following command to install the pam_pwquality module: apt-get install libpam-pwquality 2) Edit the /etc/pam.d/common-password file to include the appropriate options for pam_pwquality.so and to conform to site policy: password requisite pam_pwquality.so retry=3 3) Edit /etc/security/pwquality.conf to add or update the following settings to conform to site policy: minlen = 14 dcredit = -1 ucredit = -1 ocredit = -1 lcredit = -1. Notes: Additional module options may be set, recommendation requirements only cover including try_first_pass and minlen set to 14 or more. Settings in /etc/security/pwquality.conf must use spaces around the = symbol.','[{\"cis\": [\"5.3.1\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2.3\"]}]'),(2150,'Ensure lockout for failed password attempts is configured','Lock out users after n unsuccessful consecutive login attempts. The first sets of changes are made to the PAM configuration files. The second set of changes are applied to the program specific PAM configuration file. The second set of changes must be applied to each program that will lock out users. Check the documentation for each secondary program for instructions on how to configure them to work with PAM. Set the lockout number to the policy in effect at your site.','Locking out user IDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems.','','Edit the /etc/pam.d/common-auth file and add the auth line below: auth required pam_tally2.so onerr=fail audit silent deny=5 unlock_time=900. Edit the /etc/pam.d/common-account file and add the account line bellow: account required pam_tally2.so. Note: If a user has been locked out because they have reached the maximum consecutive failure count defined by deny= in the pam_tally2.so module, the user can be unlocked by issuing the command /sbin/pam_tally2 -u <username> --reset. This command sets the failed count to 0, effectively unlocking the user. Notes:BUG In pam_tally2.so To work around this issue the addition of pam_tally2.so in the accounts section of the /etc/pam.d/common-account file has been added to the audit and remediation sections. pam_tally2 line must be added for the counter to reset to 0 when using sudo. Use of the "audit" keyword may log credentials in the case of user error during authentication. This risk should be evaluated in the context of the site policies of your organization.','[{\"cis\": [\"5.3.2\"]}, {\"cis_csc\": [\"16.7\"]}, {\"pci_dss\": [\"8.2.5\"]}]'),(2151,'Ensure password reuse is limited','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.','','Edit the /etc/pam.d/common-password file to include the remember option and conform to site policy as shown: password required pam_pwhistory.so remember=5. Notes: Additional module options may be set, recommendation only covers those listed here.','[{\"cis\": [\"5.3.3\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2.5\"]}]'),(2152,'Ensure password hashing algorithm is SHA-512','The commands below change password encryption from md5 to sha512 (a much stronger hashing algorithm). All existing accounts will need to perform a password change to upgrade the stored hashes to the new algorithm.','The SHA-512 algorithm provides much stronger hashing than MD5, thus providing additional protection to the system by increasing the level of effort for an attacker to successfully determine passwords. Note that these change only apply to accounts configured on the local system.','','Edit the /etc/pam.d/common-password file to include the sha512 option for pam_unix.so as shown: password [success=1 default=ignore] pam_unix.so sha512','[{\"cis\": [\"5.3.4\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(2153,'Ensure password expiration is 365 days or less','The PASS_MAX_DAYS parameter in /etc/login.defs allows an administrator to force passwords to expire once they reach a defined age. It is recommended that the PASS_MAX_DAYS parameter be set to less than or equal to 365 days.','The window of opportunity for an attacker to leverage compromised credentials or successfully compromise credentials via an online brute force attack is limited by the age of the password. Therefore, reducing the maximum age of a password also reduces an attacker's window of opportunity.','','Set the PASS_MAX_DAYS parameter to conform to site policy in /etc/login.defs: PASS_MAX_DAYS 90. Modify user parameters for all users with a password set to match: # chage --maxdays 90 <user>. Notes: You can also check this setting in /etc/shadow directly. The 5th field should be 365 or less for all users with a password. A value of -1 will disable password expiration. Additionally the password expiration must be greater than the minimum days between password changes or users will be unable to change their password.','[{\"cis\": [\"5.4.1.1\"]}, {\"cis_csc\": [\"4.4\", \"16\"]}, {\"pci_dss\": [\"8.2.4\"]}]'),(2154,'Ensure minimum days between password changes is 7 or more','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.','','Set the PASS_MIN_DAYS parameter to 7 in /etc/login.defs: PASS_MIN_DAYS 7. Modify user parameters for all users with a password set to match: # chage --mindays 7 <user>. Notes: You can also check this setting in /etc/shadow directly. The 4th field should be 7 or more for all users with a password.','[{\"cis\": [\"5.4.1.2\"]}, {\"cis_csc\": [\"4.4\", \"16\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(2155,'Ensure password expiration warning days is 7 or more','The PASS_WARN_AGE parameter in /etc/login.defs allows an administrator to notify users that their password will expire in a defined number of days. It is recommended that the PASS_WARN_AGE parameter be set to 7 or more days.','Providing an advance warning that a password will be expiring gives users time to think of a secure password. Users caught unaware may choose a simple password or write it down where it may be discovered.','','Set the PASS_WARN_AGE parameter to 7 in /etc/login.defs: PASS_WARN_AGE 7. Modify user parameters for all users with a password set to match: # chage --warndays 7 <user>. Notes: You can also check this setting in /etc/shadow directly. The 6th field should be 7 or more for all users with a password.','[{\"cis\": [\"5.4.1.3\"]}, {\"cis_csc\": [\"4.4\", \"16\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(2156,'Ensure inactive password lock is 30 days or less','User accounts that have been inactive for over a given period of time can be automatically disabled. It is recommended that accounts that are inactive for 30 days after password expiration be disabled.','Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies.','','Run the following command to set the default password inactivity period to 30 days: # useradd -D -f 30. Modify user parameters for all users with a password set to match: # chage --inactive 30 <user>. Notes: You can also check this setting in /etc/shadow directly. The 7th field should be 30 or less for all users with a password. A value of -1 would disable this setting.','[{\"cis\": [\"5.4.1.4\"]}, {\"cis_csc\": [\"4.4\", \"16\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(2157,'Ensure default group for the root account is GID 0','The usermod command can be used to specify which group the root user belongs to. This affects permissions of files that are created by the root user.','Using GID 0 for the root account helps prevent root-owned files from accidentally becoming accessible to non-privileged users.','','Run the following command to set the root user default group to GID 0: # usermod -g 0 root','[{\"cis\": [\"5.4.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(2158,'Ensure default user umask is 027 or more restrictive','The default umask determines the permissions of files created by users. The user creating the file has the discretion of making their files and directories readable by others via the chmod command. Users who wish to allow their files and directories to be readable by others by default may choose a different default umask by inserting the umask command into the standard shell configuration files ( .profile , .bashrc , etc.) in their home directories.','Setting a very secure default value for umask ensures that users make a conscious choice about their file permissions. A default umask setting of 077 causes files and directories created by users to not be readable by any other user on the system. A umask of 027 would make files and directories readable by users in the same Unix group, while a umask of 022 would make files readable by every user on the system.','','Edit the /etc/bash.bashrc , /etc/profile and /etc/profile.d/*.sh files (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: umask 027','[{\"cis\": [\"5.4.4\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"3.6.1\"]}]'),(2159,'Ensure default user shell timeout is 900 seconds or less','The default TMOUT determines the shell timeout for users. The TMOUT value is measured in seconds.','Having no timeout value associated with a shell could allow an unauthorized user access to another user's shell 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.','','Edit the /etc/bashrc, /etc/profile files, and /etc/profile.d*.sh (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: TMOUT=600','[{\"cis\": [\"5.4.5\"]}, {\"cis_csc\": [\"16.11\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(2160,'Ensure access to the su command is restricted','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 sudo 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.','','1) Add the following line to the /etc/pam.d/su file: auth required pam_wheel.so 2) Create a comma separated list of users in the sudo statement in the /etc/group file: sudo:x:10:root,<user list> Notes: The use_uid option to pam_wheel.so is a no-op on debian based systems. It is acceptable but not required as these systems use its behavior as default.','[{\"cis\": [\"5.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(2161,'Ensure permissions on /etc/gshadow are configured','The /etc/gshadow file is used to store the information about groups that is critical to the security of those accounts, such as the hashed password and other security information.','If attackers can gain read access to the /etc/gshadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/gshadow file (such as group administrators) could also be useful to subvert the group','','Run the following commands to set permissions on /etc/gshadow : # chown root:shadow /etc/gshadow # chmod o-rwx,g-rw /etc/gshadow','[{\"cis\": [\"6.1.2\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2162,'Ensure permissions on /etc/shadow- are configured','The /etc/shadow- file is used to store backup information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information.','It is critical to ensure that the /etc/shadow- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the one of the following chown commands as appropriate and the chmod to set permissions on /etc/shadow- : # chown root:root /etc/shadow- # chown root:shadow /etc/shadow- # chmod o-rwx,g-rw /etc/shadow-','[{\"cis\": [\"6.1.3\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2163,'Ensure permissions on /etc/gshadow- are configured','The /etc/gshadow- file is used to store backup information about groups that is critical to the security of those accounts, such as the hashed password and other security information.','It is critical to ensure that the /etc/gshadow- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','# chown root:root /etc/gshadow- # chown root:shadow /etc/gshadow- # chmod o-rwx,g-rw /etc/gshadow-','[{\"cis\": [\"6.1.4\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2164,'Ensure permissions on /etc/passwd are configured','The /etc/passwd file contains user account information that is used by many system utilities and therefore must be readable for these utilities to operate.','It is critical to ensure that the /etc/passwd file is protected from unauthorized write access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/passwd: # chown root:root /etc/passwd # chmod 644 /etc/passwd','[{\"cis\": [\"6.1.5\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2165,'Ensure permissions on /etc/shadow are configured','The /etc/shadow file is used to store the information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information.','If attackers can gain read access to the /etc/shadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/shadow file (such as expiration) could also be useful to subvert the user accounts.','','Run the one following commands to set permissions on /etc/shadow : # chown root:shadow /etc/shadow # chmod o-rwx,g-wx /etc/shadow','[{\"cis\": [\"6.1.6\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2166,'Ensure permissions on /etc/group are configured','The /etc/group file contains a list of all the valid groups defined in the system. The command below allows read/write access for root and read access for everyone else.','The /etc/group file needs to be protected from unauthorized changes by non-privileged users, but needs to be readable as this information is used with many non-privileged programs.','','Run the following command to set permissions on /etc/group: # chown root:root /etc/group # chmod 644 /etc/group','[{\"cis\": [\"6.1.7\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2167,'Ensure permissions on /etc/passwd- are configured','The /etc/passwd- file contains backup user account information.','It is critical to ensure that the /etc/passwd- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/passwd-: # chown root:root /etc/passwd- # chmod 644 /etc/passwd-','[{\"cis\": [\"6.1.8\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2168,'Ensure permissions on /etc/group- are configured','The /etc/group- file contains a backup list of all the valid groups defined in the system.','It is critical to ensure that the /etc/group- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/group-: # chown root:root /etc/group- # chmod 644 /etc/group-','[{\"cis\": [\"6.1.9\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2169,'Ensure password fields are not empty','An account with an empty password field means that anybody may log in as that user without providing a password.','All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user.','','If any accounts in the /etc/shadow file do not have a password, run the following command to lock the account until it can be determined why it does not have a password: # passwd -l <em><username></em>. Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off.','[{\"cis\": [\"6.2.1\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2\"]}]'),(2170,'Ensure no legacy "+" entries exist in /etc/passwd','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Remove any legacy + entries from /etc/passwd if they exist.','[{\"cis\": [\"6.2.2\"]}, {\"cis_csc\": [\"16.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2171,'Ensure no legacy "+" entries exist in /etc/shadow','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Remove any legacy + entries from /etc/shadow if they exist.','[{\"cis\": [\"6.2.3\"]}, {\"cis_csc\": [\"16.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2172,'Ensure no legacy "+" entries exist in /etc/group','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Remove any legacy + entries from /etc/group if they exist.','[{\"cis\": [\"6.2.4\"]}, {\"cis_csc\": [\"16.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2173,'Ensure root is the only UID 0 account','Any account with UID 0 has superuser privileges on the system.','This access must be limited to only the default root account and only from the system console. Administrative access must be through an unprivileged account using an approved mechanism as noted in Item 5.6 Ensure access to the su command is restricted.','','Remove any users other than root with UID 0 or assign them a new UID if appropriate.','[{\"cis\": [\"6.2.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(2174,'Ensure shadow group is empty','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.','','Remove all users from the shadow group, and change the primary group of any users with shadow as their primary group.','[{\"cis\": [\"6.2.20\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(2500,'Ensure mounting of freevxfs filesystems is disabled','The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the primary filesystem type for HP-UX operating systems.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vi /etc/modprobe.d/freevxfs.conf and add the following line: install freevxfs /bin/true Run the following command to unload the freevxfs module: # rmmod freevxfs','[{\"cis\": [\"1.1.1.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(2501,'Ensure mounting of jffs2 filesystems is disabled','The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vi /etc/modprobe.d/jffs2.conf and add the following line: install jffs2 /bin/true Run the following command to unload the jffs2 module: # rmmod jffs2','[{\"cis\": [\"1.1.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(2502,'Ensure mounting of hfs filesystems is disabled','The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS filesystems.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vi /etc/modprobe.d/hfs.conf and add the following line: install hfs /bin/true Run the following command to unload the hfs module: # rmmod hfs','[{\"cis\": [\"1.1.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(2503,'Ensure mounting of hfsplus filesystems is disabled','The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .confExample: vi /etc/modprobe.d/hfsplus.conf and add the following line: install hfsplus /bin/true Run the following command to unload the hfsplus module: # rmmod hfsplus','[{\"cis\": [\"1.1.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(2504,'Ensure mounting of squashfs filesystems is disabled','The squashfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems (similar to cramfs ). A squashfs image can be used without having to first decompress the image.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vi /etc/modprobe.d/squashfs.confand add the following line: install squashfs /bin/true Run the following command to unload the squashfsmodule: # rmmod squashfs','[{\"cis\": [\"1.1.1.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(2505,'Ensure mounting of udf filesystems is disabled','The udf filesystem type is the universal disk format used to implement ISO/IEC 13346 and ECMA-167 specifications. This is an open vendor filesystem type for data storage on a broad range of media. This filesystem type is necessary to support writing DVDs and newer optical disc formats.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vi /etc/modprobe.d/udf.conf and add the following line: install udf /bin/true Run the following command to unload the udf module: # rmmod udf','[{\"cis\": [\"1.1.1.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(2506,'Ensure mounting of FAT filesystems is disabled','The FAT filesystem format is primarily used on older windows systems and portable USB drives or flash modules. It comes in three types FAT12 , FAT16 , and FAT32 all of which are supported by the vfat kernel module.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vi /etc/modprobe.d/vfat.conf: install vfat /bin/true. Run the following command to unload the vfat module: rmmod vfat','[{\"cis\": [\"1.1.1.7\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(2507,'Ensure /tmp is configured','The /tmp directory is a world-writable directory used for temporary storage by all users and some applications.','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. This can be accomplished by either mounting tmpfs to /tmp, or creating a separate partition for /tmp.','','Configure /etc/fstab as appropriate. Example: tmpfs /tmp tmpfs defaults,rw,nosuid,nodev,noexec,relatime 0 0 or Run the following commands to enable systemd /tmp mounting: systemctl unmask tmp.mount systemctl enable tmp.mount Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to configure the /tmp mount: [Mount] What=tmpfs Where=/tmp Type=tmpfs Options=mode=1777,strictatime,noexec,nodev,nosuid','[{\"cis\": [\"1.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2508,'Ensure nodev option set on /tmp partition','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.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /tmp: # mount -o remount,nodev /tmp OR Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add nodevto the /tmp mount options: [Mount] Options=mode=1777,strictatime,noexec,nodev,nosuid Run the following command to remount /tmp: # mount -o remount,nodev /tmp','[{\"cis\": [\"1.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2509,'Ensure nosuid option set on /tmp partition','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.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /tmp: # mount -o remount,nosuid /tmp OR Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add nosuidto the /tmp mount options:[Mount] Options=mode=1777,strictatime,noexec,nodev,nosuid Run the following command to remount /tmp:# mount -o remount,nosuid /tmp','[{\"cis\": [\"1.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2510,'Ensure noexec option set on /tmp partition','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 create set userid files in /tmp.','','Edit the /etc/fstab file and add noexecto the fourth field (mounting options) for the /tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /tmp: # mount -o remount,noexec /tmp OR Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add noexecto the /tmp mount options: [Mount] Options=mode=1777,strictatime,noexec,nodev,nosuid Run the following command to remount /tmp: # mount -o remount,noexec /tmp','[{\"cis\": [\"1.1.4\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2511,'Ensure separate partition exists for /var','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2512,'Ensure separate partition exists for /var/tmp','The /var/tmp directory is a world-writable directory used for temporary storage by all users and some applications.','Since the /var/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 /var/tmp its own file system allows an administrator to set the noexec option on the mount, making /var/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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var/tmp. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.7\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2513,'Ensure nodev option set on /var/tmp partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the /var/tmp filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices in /var/tmp.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /var/tmp : # mount -o remount,nodev /var/tmp','[{\"cis\": [\"1.1.8\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2514,'Ensure nosuid option set on /var/tmp partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /var/tmp.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /var/tmp: # mount -o remount,nosuid /var/tmp','[{\"cis\": [\"1.1.9\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2515,'Ensure noexec option set on /var/tmp partition','The noexec mount option specifies that the filesystem cannot contain executable binaries.','Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /var/tmp.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /var/tmp: # mount -o remount,noexec /var/tmp','[{\"cis\": [\"1.1.10\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2516,'Ensure separate partition exists for /var/log','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var/log. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.11\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2517,'Ensure separate partition exists for /var/log/audit','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.','','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, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.12\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2518,'Ensure separate partition exists for /home','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /home. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.13\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2519,'Ensure nodev option set on /home partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the user partitions are not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices. 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.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /home partition. See the fstab(5) manual page for more information. # mount -o remount,nodev /home','[{\"cis\": [\"1.1.14\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2520,'Ensure nodev option set on /dev/shm partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the /dev/shm filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create special devices in /dev/shm partitions.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /dev/shm partition. See the fstab(5) manual page for more information. Run the following command to remount /dev/shm: # mount -o remount,nodev /dev/shm','[{\"cis\": [\"1.1.15\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2521,'Ensure nosuid option set on /dev/shm partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /dev/shm partition. See the fstab(5) manual page for more information. Run the following command to remount /dev/shm: # mount -o remount,nosuid /dev/shm','[{\"cis\": [\"1.1.16\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2522,'Ensure noexec option set on /dev/shm partition','The noexec mount option specifies that the filesystem cannot contain executable binaries.','Setting this option on a file system prevents users from executing programs from shared memory. This deters users from introducing potentially malicious software on the system.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /dev/shm partition. See the fstab(5) manual page for more information. Run the following command to remount /dev/shm: # mount -o remount,noexec /dev/shm','[{\"cis\": [\"1.1.17\"]}, {\"cis_csc\": [\"2.6\", \"8\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2523,'Disable Automounting','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.','','Run one of the following commands: Run the following command to disable autofs: # systemctl --now disable autofs OR Run the following command to remove autofs: # apt purge autofs','[{\"cis\": [\"1.1.22\"]}, {\"cis_csc\": [\"8.4\", \"8.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2524,'Disable USB Storage','USB storage provides a means to transfer and store files insuring persistence and availability of the files independent of network connection status. Its popularity and utility has led to USB-based malware being a simple and common means for network infiltration and a first step to establishing a persistent threat within a networked environment.','Restricting USB access on the system will decrease the physical attack surface for a device and diminish the possible vectors to introduce malware.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vi /etc/modprobe.d/usb_storage.conf and add the following line: # install usb-storage /bin/true . Run the following command to unload the usb-storage module: # rmmod usb-storage','[{\"cis\": [\"1.1.23\"]}, {\"cis_csc\": [\"8.4\", \"8.5\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC6.3\"]}]'),(2525,'Ensure sudo is installed','sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy. The invoking user's real (not effective) user ID is used to determine the user name with which to query the security policy.','sudo supports a plugin architecture for security policies and input/output logging. Third parties can develop and distribute their own policy and I/O logging plugins to work seamlessly with the sudo front end. The default security policy is sudoers, which is configured via the file /etc/sudoers. The security policy determines what privileges, if any, a user has to run sudo. The policy may require that users authenticate themselves with a password or another authentication mechanism. If authentication is required, sudo will exit if the user's password is not entered within a configurable time limit. This limit is policy-specific.','','Install sudo using the following command. # apt install sudo OR # apt install sudo-ldap','[{\"cis\": [\"1.3.1\"]}, {\"cis_csc\": [\"4.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2526,'Ensure sudo commands use pty','sudo can be configured to run only froma pseudo-pty','Attackers can run a malicious program using sudo, which would again fork a background process that remains even when the main program has finished executing.','','edit the file /etc/sudoers or a file in /etc/sudoers.d/ with visudo -f and add the following line: Defaults use_pty','[{\"cis\": [\"1.3.2\"]}, {\"cis_csc\": [\"4.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2527,'Ensure sudo log file exists','sudo can use a custom log file','A sudo log file simplifies auditing of sudo commands','','edit the file /etc/sudoers or a file in /etc/sudoers.d/ with visudo -f and add the following line: Defaults logfile="<PATH TO CUSTOM LOG FILE>" Example Defaults logfile="/var/log/sudo.log"','[{\"cis\": [\"1.3.3\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2528,'Ensure AIDE is installed','AIDE takes a snapshot of filesystem state including modification times, permissions, and file hashes which can then be used to compare against the current state of the filesystem to detect modifications to the system.','By monitoring the filesystem state compromised files can be detected to prevent or limit the exposure of accidental or malicious misconfigurations or modified binaries.','','Install AIDE: # apt install aide aide-common. Configure AIDE as appropriate for your environment. Consult the AIDE documentation for options. Initialize AIDE: # aideinit . Notes: The prelinking feature can interfere with AIDE because it alters binaries to speed up their start up times. Run prelink -ua to restore the binaries to their prelinked state, thus avoiding false positives from AIDE.','[{\"cis\": [\"1.4.1\"]}, {\"cis_csc\": [\"14.9\"]}, {\"pci_dss\": [\"11.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2529,'Ensure filesystem integrity is regularly checked','Periodic checking of the filesystem integrity is needed to detect changes to the filesystem.','Periodic file checking allows the system administrator to determine on a regular basis if critical files have been changed in an unauthorized fashion.','','If cron will be used to schedule and run aide check, run the following command: # crontab -u root -e Add the following line to the crontab: 0 5 * * * /usr/bin/aide.wrapper --config /etc/aide/aide.conf --check','[{\"cis\": [\"1.4.2\"]}, {\"cis_csc\": [\"14.9\"]}, {\"pci_dss\": [\"11.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2530,'Ensure permissions on bootloader config are configured','The grub configuration file contains information on boot settings and passwords for unlocking boot options. The grub configuration is usually grub.cfg stored in /boot/grub.','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.','','Run the following commands to set permissions on your grub configuration: chown root:root /boot/grub/grub.cfg, chmod og-rwx /boot/grub/grub.cfg','[{\"cis\": [\"1.5.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2531,'Ensure bootloader password is set','Setting the boot loader password will require that anyone rebooting the system must enter a password before being able to set command line boot parameters.','Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off SELinux at boot time).','','Create an encrypted password with grub-mkpasswd-pbkdf2 : # grub-mkpasswd-pbkdf2 Enter password: <password> Reenter password: <password> PBKDF2 hash of your password is <encrypted-password> Add the following into a custom /etc/grub.d configuration file: cat <<EOF set superusers="<username>" password_pbkdf2 <username> <encrypted-password> EOF The superuser/user information and password should not be contained in the /etc/grub.d/00_header file as this file could be overwritten in a package update. If there is a requirement to be able to boot/reboot without entering the password, edit /etc/grub.d/10_linux and add --unrestricted to the line CLASS= Example: CLASS="--class gnu-linux --class gnu --class os --unrestricted" Run the following command to update the grub2 configuration: # update-grub','[{\"cis\": [\"1.5.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2532,'Ensure authentication required for single user mode','Single user mode is used for recovery when the system detects an issue during boot or by manual selection from the bootloader.','Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials.','','Run the following command and follow the prompts to set a password for the root user: # passwd root','[{\"cis\": [\"1.5.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2533,'Ensure XD/NX support is enabled','Recent processors in the x86 family support the ability to prevent code execution on a per memory page basis. Generically and on AMD processors, this ability is called No Execute (NX), while on Intel processors it is called Execute Disable (XD). This ability can help prevent exploitation of buffer overflow vulnerabilities and should be activated whenever possible. Extra steps must be taken to ensure that this protection is enabled, particularly on 32-bit x86 systems. Other processors, such as Itanium and POWER, have included such support since inception and the standard kernel for those platforms supports the feature.','Enabling any feature that can protect against buffer overflow attacks enhances the security of the system.','','On 32 bit systems install a kernel with PAE support, no installation is required on 64 bit systems: If necessary configure your bootloader to load the new kernel and reboot the system. You may need to enable NX or XD support in your bios.','[{\"cis\": [\"1.6.1\"]}, {\"cis_csc\": [\"8.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2534,'Ensure address space layout randomization (ASLR) is enabled','Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process.','Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: kernel.randomize_va_space = 2 Run the following command to set the active kernel parameter: # sysctl -w kernel.randomize_va_space=2','[{\"cis\": [\"1.6.2\"]}, {\"cis_csc\": [\"8.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2535,'Ensure prelink is disabled','prelink is a program that modifies ELF shared libraries and ELF dynamically linked binaries in such a way that the time needed for the dynamic linker to perform relocations at startup significantly decreases.','The prelinking feature can interfere with the operation of AIDE, because it changes binaries. Prelinking can also increase the vulnerability of the system if a malicious user is able to compromise a common library such as libc.','','Run the following command to restore binaries to normal: # prelink -ua Uninstall prelink using the appropriate package manager or manual installation: # apt purge prelink','[{\"cis\": [\"1.6.3\"]}, {\"cis_csc\": [\"14.9\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2536,'Ensure core dumps are restricted','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.','','Add the following line to /etc/security/limits.conf or a /etc/security/limits.d/* file: * hard core 0 Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: fs.suid_dumpable = 0 Run the following command to set the active kernel parameter: # sysctl -w fs.suid_dumpable=0','[{\"cis\": [\"1.6.4\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2537,'Ensure AppArmor is installed','AppArmor provides Mandatory Access Controls.','Without a Mandatory Access Control system installed only the default Discretionary Access Control system will be available.','','Install Apparmor. # apt install apparmor # apt install apparmor-utils','[{\"cis\": [\"1.7.1.1\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2538,'Ensure AppArmor is enabled in the bootloader configuration','Configure AppArmor to be enabled at boot time and verify that it has not been overwrittenby the bootloader boot parameters.','AppArmor must be enabled at boot time in your grub configuration to ensure that the controls it provides are not overridden.','','Edit /etc/default/grub and add the apparmor=1 and security=apparmor parameters to the GRUB_CMDLINE_LINUX= line GRUB_CMDLINE_LINUX="apparmor=1 security=apparmor" Run the following command to update the grub2 configuration # update-grub Notes: This recommendation is designed around the grub bootloader, if LILO or another bootloader is in use in your environment enact equivalent settings.','[{\"cis\": [\"1.7.1.2\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2539,'Ensure all AppArmor Profiles are in enforce or complain mode','AppArmor profiles define what resources applicatons are able to access.','Security configuration requirements vary from site to site. Some sites may mandate a policy that is stricter than the default policy, which is perfectly acceptable. This item is intended to ensure that any policies that exist on the system are activated..','','Run the following command to set all profiles to enforce mode: # aa-enforce /etc/apparmor.d/* OR Run the following command to set all profiles to complain mode: # aa-complain /etc/apparmor.d/* Any unconfined processes may need to have a profile created or activated for them and then be restarted.','[{\"cis\": [\"1.7.1.3\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2540,'Ensure all AppArmor Profiles are enforcing','AppArmor profiles define what resources applicatons are able to access.','Security configuration requirements vary from site to site. Some sites may mandate a policy that is stricter than the default policy, which is perfectly acceptable. This item is intended to ensure that any policies that exist on the system are activated..','','Run the following command to set all profiles to enforce mode: # aa-enforce /etc/apparmor.d/* Any unconfined processes may need to have a profile created or activated for them and then be restarted.','[{\"cis\": [\"1.7.1.4\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2541,'Ensure message of the day is configured properly','The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/motd file with the appropriate contents according to your site policy, remove any instances of m , , s , v or references to the OS platform OR If the motd is not used, this file can be removed. Run the following command to remove the motd file: # rm /etc/motd','[{\"cis\": [\"1.8.1.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(2542,'Ensure local login warning banner is configured properly','The contents of the /etc/issue file are displayed to users prior to login for local terminals. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/issue file with the appropriate contents according to your site policy, remove any instances of m , , s , or v , or references to the OS platform # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue','[{\"cis\": [\"1.8.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(2543,'Ensure remote login warning banner is configured properly','The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/issue.net file with the appropriate contents according to your site policy, remove any instances of m , , s , or v or references to the OS platform: # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue.net','[{\"cis\": [\"1.8.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(2544,'Ensure permissions on /etc/motd are configured','The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users.','If the /etc/motd file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/motd: # chown root:root /etc/motd # chmod u-x,go-wx /etc/motd','[{\"cis\": [\"1.8.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2545,'Ensure permissions on /etc/issue are configured','The contents of the /etc/issue file are displayed to users prior to login for local terminals.','If the /etc/issue file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/issue: # chown root:root /etc/issue # chmod u-x,go-wx /etc/issue','[{\"cis\": [\"1.8.1.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2546,'Ensure permissions on /etc/issue.net are configured','The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services.','If the /etc/issue.net file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/issue.net: # chown root:root /etc/issue.net # chmod u-x,go-wx /etc/issue.net','[{\"cis\": [\"1.8.1.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2547,'Ensure GDM login banner is configured','GDM is the GNOME Display Manager which handles graphical login for GNOME based systems.','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place.','','Edit or create the file /etc/gdm3/greeter.dconf-defaults and add: [org/gnome/login-screen], banner-message-enable=true, banner-message-text='Authorized uses only. All activity may be monitored and reported.'','[{\"cis\": [\"1.8.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2548,'Ensure updates, patches, and additional security software are installed','Periodically patches are released for included software either due to security flaws or to include additional functionality.','Newer patches may contain security enhancements that would not be available through the latest full update. As a result, it is recommended that the latest software patches be used to take advantage of the latest functionality. As with any software installation, organizations need to determine if a given update meets their requirements and verify the compatibility and supportability of any additional software against the update revision that is selected.','','Use your package manager to update all packages on the system according to site policy. Notes: Site policy may mandate a testing period before install onto production systems for available updates.','[{\"cis\": [\"1.9\"]}, {\"cis_csc\": [\"3.4\", \"3.5\"]}, {\"pci_dss\": [\"5.2\"]}, {\"nist_800_53\": [\"AU.6\", \"SI.4\"]}, {\"gpg_13\": [\"4.2\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"A1.2\"]}]'),(2549,'Ensure xinetd is not installed','The eXtended InterNET Daemon (xinetd) is an open source super daemon that replaced the original inetd daemon. The xinetddaemon 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 package be removed.','','Run the following command to remove xinetd: # apt purge xinetd','[{\"cis\": [\"2.1.1\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2550,'Ensure openbsd-inetd is not installed','The inetd daemon listens for well known services and dispatches the appropriate daemon to properly respond to service requests.','If there are no inetd services required, it is recommended that the daemon be removed.','','Run the following command to uninstall openbsd-inetd: apt purge openbsd-inetd','[{\"cis\": [\"2.1.2\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2551,'Ensure time synchronization is in use','System time should be synchronized between all systems in an environment. This is typically done by establishing an authoritative time server or set of servers and having all systems synchronize their clocks to them.','Time synchronization is important to support time sensitive security mechanisms like Kerberos and also ensures log files have consistent time records across the enterprise, which aids in forensic investigations.','','On systems where host based time synchronization is not available, configure systemd-timesyncd. If "full featured" and/or encrypted time synchronization is required, install chrony or NTP. To install chrony: # apt install chrony To install ntp: # apt install ntp On virtual systems where host based time synchronization is available consult your virtualization software documentation and setup host based synchronization.','[{\"cis\": [\"2.2.1.1\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"10.4\"]}, {\"nist_800_53\": [\"AU.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2552,'Ensure systemd-timesyncd is configured','systemd-timesyncd is a daemon that has been added for synchronizing the system clock across the network. It implements an SNTP client. In contrast to NTP implementations such as chrony or the NTP reference server this only implements a client side, and does not bother with the full NTP complexity, focusing only on querying time from one remote server and synchronizing the local clock to it. The daemon runs with minimal privileges, and has been hooked up with networkd to only operate when network connectivity is available. The daemon saves the current clock to disk every time a new NTP sync has been acquired, and uses this to possibly correct the system clock early at bootup, in order to accommodate for systems that lack an RTC such as the Raspberry Pi and embedded devices, and make sure that time monotonically progresses on these systems, even if it is not always correct. To make use of this daemon a new system user and group "systemd- timesync" needs to be created on installation of systemd. Note: The systemd-timesyncd service specifically implements only SNTP. This minimalistic service will set the system clock for large offsets or slowly adjust it for smaller deltas. More complex use cases are not covered by systemd-timesyncd. This recommendation only applies if timesyncd is in use on the system.','Proper configuration is vital to ensuring time synchronization is working properly. This recommendation only applies if timesyncd is in use on the system.','','Run the following command to enable systemd-timesyncd # systemctl enable systemd-timesyncd.service || Edit the file /etc/systemd/timesyncd.conf and add/modify the following lines: NTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org FallbackNTP=2.debian.pool.ntp.org 3.debian.pool.ntp.org RootDistanceMax=1 || Run the following commands to start systemd-timesyncd.service # systemctl start systemd-timesyncd.service # timedatectl set-ntp true || Notes: Servers listed and RootDistanceMax should be In Accordance With Local Policy some versions of systemd have been compiled without systemd-timesycnd. On these distributions, chrony or NTP should be used instead of systemd-timesycnd. Not all options are available on all versions of systemd-timesyncd','[{\"cis\": [\"2.2.1.2\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2553,'Ensure chrony is configured','chrony is a daemon which implements the Network Time Protocol (NTP) is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on chrony can be found at http://chrony.tuxfamily.org/. chrony can be configured to be a client and/or a server.','If chrony is in use on the system proper configuration is vital to ensuring time synchronization is working properly. This recommendation only applies if chrony is in use on the system.','','Add or edit server or pool lines to /etc/chrony/chrony.conf as appropriate: server <remote-server> Configure chrony to run as the chrony user by configuring the appropriate startup script for your distribution. Startup scripts are typically stored in /etc/init.d or /etc/systemd .','[{\"cis\": [\"2.2.1.3\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2554,'Ensure ntp is configured','ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at http://www.ntp.org. ntp can be configured to be a client and/or a server. This recommendation only applies if ntp is in use on the system.','If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly.','','Add or edit restrict lines in /etc/ntp.conf to match the following: restrict -4 default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery Add or edit server or pool lines to /etc/ntp.conf as appropriate: server <remote-server> Configure ntp to run as the ntp user by adding or editing the /etc/init.d/ntp file: RUNASUSER=ntp','[{\"cis\": [\"2.2.1.4\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2555,'Ensure the X Window system is not installed','The X Window System provides a Graphical User Interface (GUI) where users can have multiple windows in which to run programs and various add on. The X Windows system is typically used on workstations where users login, but not on servers where users typically do not login.','Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface.','','Remove the X Windows System packages: apt purge xserver-xorg*','[{\"cis\": [\"2.2.2\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.8\", \"CC7.1\", \"CC7.2\", \"CC8.1\"]}]'),(2556,'Ensure Avahi Server is not enabled','Avahi is a free zeroconf implementation, including a system for multicast DNS/DNS-SD service discovery. Avahi allows programs to publish and discover services and hosts running on a local network with no specific configuration. For example, a user can plug a computer into a network and Avahi automatically finds printers to print to, files to look at and people to talk to, as well as network services running on the machine.','Automatic discovery of network services is not normally required for system functionality. It is recommended to disable the service to reduce the potential attach surface.','','Run the following command to disable avahi-daemon: # systemctl --now disable avahi-daemon','[{\"cis\": [\"2.2.3\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2557,'Ensure CUPS is not enabled','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.','','Run the following command to disable cups: # systemctl --now disable cups','[{\"cis\": [\"2.2.4\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2558,'Ensure DHCP Server is not enabled','The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses.','Unless a system is specifically set up to act as a DHCP server, it is recommended that this service be disabled to reduce the potential attack surface.','','Run the following commands to disable dhcpd: # systemctl --now disable isc-dhcp-server # systemctl --now disable isc-dhcp-server6','[{\"cis\": [\"2.2.5\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2559,'Ensure LDAP server is not enabled','The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.','If the system will not need to act as an LDAP server, it is recommended that the software be disabled to reduce the potential attack surface.','','Run the following command to disable slapd: # systemctl --now disable slapd','[{\"cis\": [\"2.2.6\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2560,'Ensure NFS and RPC are not enabled','The Network File System (NFS) is one of the first and most widely distributed file systems in the UNIX environment. It provides the ability for systems to mount file systems of other servers through the network.','If the system does not export NFS shares or act as an NFS client, it is recommended that these services be disabled to reduce remote attack surface.','','Run the following commands to disable nfs and rpcbind: # systemctl --now disable nfs-server # systemctl --now disable rpcbind','[{\"cis\": [\"2.2.7\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2561,'Ensure DNS Server is not enabled','The Domain Name System (DNS) is a hierarchical naming system that maps names to IP addresses for computers, services and other resources connected to a network.','Unless a system is specifically designated to act as a DNS server, it is recommended that the package be deleted to reduce the potential attack surface.','','Run the following command to disable named: # systemctl --now disable bind9','[{\"cis\": [\"2.2.8\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2562,'Ensure FTP Server is not enabled','The File 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.','','Run the following command to disable vsftpd: # systemctl --now disable vsftpd','[{\"cis\": [\"2.2.9\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2563,'Ensure HTTP Server is not enabled','HTTP or web servers provide the ability to host web site content.','Unless there is a need to run the system as a web server, it is recommended that the package be deleted to reduce the potential attack surface.','','Run the following command to disable apache2: # systemctl --now disable apache2','[{\"cis\": [\"2.2.10\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2564,'Ensure email services are not enabled','dovecot is an open source mail submission and transport server for Linux based systems.','Unless mail transport services are to be provided by this system, it is recommended that the service be disabled or deleted to reduce the potential attack surface.','','Run one of the following commands to disable dovecot : # systemctl --now disable dovecot','[{\"cis\": [\"2.2.11\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2565,'Ensure Samba is not enabled','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.','','Run the following command to disable smbd: # systemctl --now disable smbd','[{\"cis\": [\"2.2.12\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2566,'Ensure HTTP Proxy Server is not enabled','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.','','Run the following command to disable squid: # systemctl --now disable squid','[{\"cis\": [\"2.2.13\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2567,'Ensure SNMP Server is not enabled','The Simple Network Management Protocol (SNMP) server is used to listen for SNMP commands from an SNMP management system, execute the commands or collect the information and then send results back to the requesting system.','The SNMP server can communicate using SNMP v1, which transmits data in the clear and does not require authentication to execute commands. Unless absolutely necessary, it is recommended that the SNMP service not be used. If SNMP is required the server should be configured to disallow SNMP v1.','','Run the following command to disable snmpd: # systemctl --now disable snmpd','[{\"cis\": [\"2.2.14\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2568,'Ensure mail transfer agent is configured for local-only mode','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.','','Edit /etc/exim4/update-exim4.conf.conf and and or modify following lines to look like the lines below: dc_eximconfig_configtype='local' dc_local_interfaces='127.0.0.1 ; ::1' dc_readhost='' dc_relay_domains='' dc_minimaldns='false' dc_relay_nets='' dc_smarthost='' dc_use_split_config='false' dc_hide_mailname='' dc_mailname_in_oh='true' dc_localdelivery='mail_spool' Restart exim4: # systemctl restart exim4','[{\"cis\": [\"2.2.15\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AC.4\", \"SC.7\"]}, {\"tsc\": [\"CC5.2\", \"CC6.4\", \"CC6.6\", \"CC6.7\"]}]'),(2569,'Ensure rsync service is not enabled','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.','','Run the following command to disable rsync: # systemctl --now disable rsync','[{\"cis\": [\"2.2.16\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(2570,'Ensure NIS Server is not enabled','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','','Run the following command to disable nis: # systemctl --now disable nis','[{\"cis\": [\"2.2.17\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2571,'Ensure NIS Client is not installed','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 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.','','Uninstall nis : apt purge nis','[{\"cis\": [\"2.3.1\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2572,'Ensure rsh client is not installed','The rsh-client 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 .','','Uninstall rsh : apt purge rsh-client','[{\"cis\": [\"2.3.2\"]}, {\"cis_csc\": [\"4.5\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2573,'Ensure talk client is not installed','The talk software makes it possible for users to send and receive messages across systems through a terminal session. The talkclient, which allows initialization of talk sessions, is installed by default.','The software presents a security risk as it uses unencrypted protocols for communication.','','Uninstall talk : apt purge talk','[{\"cis\": [\"2.3.3\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2574,'Ensure telnet client is not installed','The telnet package contains the telnet client, which allows users to start connections to other systems via the telnet protocol.','The telnet protocol is insecure and unencrypted. The use of an unencrypted transmission medium could allow an unauthorized user to steal credentials. The ssh package provides an encrypted session and stronger security and is included in most Linux distributions.','','Uninstall telnet : # apt purge telnet','[{\"cis\": [\"2.3.4\"]}, {\"cis_csc\": [\"4.5\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2575,'Ensure LDAP client is not installed','The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.','If the system will not need to act as an LDAP client, it is recommended that the software be removed to reduce the potential attack surface.','','Uninstall ldap-utils : # apt purge ldap-utils','[{\"cis\": [\"2.3.5\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2576,'Disable IPv6','Although IPv6 has many advantages over IPv4, not all organizations have IPv6 or dual stack configurations implemented.','If IPv6 or dual stack is not to be used, it is recommended that IPv6 be disabled to reduce the attack surface of the system.','','Edit /etc/default/grub and add ipv6.disable=1 to the GRUB_CMDLINE_LINUX parameters: GRUB_CMDLINE_LINUX="ipv6.disable=1" Run the following command to update the grub2 configuration: # update-grub','[{\"cis\": [\"3.1.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.6\", \"CC5.2\"]}]'),(2577,'Ensure wireless interfaces are disabled','Wireless networking is used when wired networks are unavailable. Debian 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.','','Run the following command to disable any wireless interfaces: # nmcli radio all off','[{\"cis\": [\"3.1.2\"]}, {\"cis_csc\": [\"15.4\", \"15.5\"]}, {\"pci_dss\": [\"1.2.3\"]}, {\"tsc\": [\"CC6.6\"]}]'),(2578,'Ensure packet redirect sending is disabled','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.send_redirects=0 # sysctl -w net.ipv4.conf.default.send_redirects=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2579,'Ensure IP forwarding is disabled','The net.ipv4.ip_forward and net.ipv6.conf.all.forwarding flags are used to tell the system whether it can forward packets or not.','Setting the flags to 0 ensures that a system with multiple interfaces (for example, a hard proxy), will never be able to forward packets, and therefore, never serve as a router.','','Run the following command to restore the default parameter and set the active kernel parameter: # grep -Els "^s*net.ipv4.ip_forwards*=s*1" /etc/sysctl.conf /etc/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /run/sysctl.d/*.conf | while read filename; do sed -ri "s/^s*(net.ipv4.ip_forwards*)(=)(s*S+).*$/# *REMOVED* 1/" $filename; done; sysctl -w net.ipv4.ip_forward=0; sysctl -w net.ipv4.route.flush=1 IF IPv6 is enabled: Run the following command to restore the default parameter and set the active kernel parameter: # grep -Els "^s*net.ipv6.conf.all.forwardings*=s*1" /etc/sysctl.conf /etc/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /run/sysctl.d/*.conf | while read filename; do sed -ri "s/^s*(net.ipv6.conf.all.forwardings*)(=)(s*S+).*$/# *REMOVED* 1/" $filename; done; sysctl -w net.ipv6.conf.all.forwarding=0; sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.2.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2580,'Ensure source routed packets are not accepted','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, net.ipv4.conf.default.accept_source_route, net.ipv6.conf.all.accept_source_route and net.ipv6.conf.default.accept_source_route to 0 disables the system from accepting source routed packets. Assume this system was capable of routing packets to Internet routable addresses on one interface and private addresses on another interface. Assume that the private addresses were not routable to the Internet routable addresses and vice versa. Under normal routing circumstances, an attacker from the Internet routable addresses could not use the system as a way to reach the private address systems. If, however, source routed packets were allowed, they could be used to gain access to the private address systems as the route could be specified, rather than rely on routing protocols that did not allow this routing.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_source_route=0 # sysctl -w net.ipv4.conf.default.accept_source_route=0 # sysctl -w net.ipv4.route.flush=1 IF IPv6 is enabled: Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_source_route = 0 net.ipv6.conf.default.accept_source_route = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_source_route=0 # sysctl -w net.ipv6.conf.default.accept_source_route=0 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.3.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2581,'Ensure ICMP redirects are not accepted','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_redirects=0 # sysctl -w net.ipv4.conf.default.accept_redirects=0 # sysctl -w net.ipv4.route.flush=1 IF IPv6 is enabled: Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_redirects = 0 net.ipv6.conf.default.accept_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_redirects=0 # sysctl -w net.ipv6.conf.default.accept_redirects=0 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.3.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2582,'Ensure secure ICMP redirects are not accepted','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.secure_redirects = 0 net.ipv4.conf.default.secure_redirects = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.secure_redirects=0 # sysctl -w net.ipv4.conf.default.secure_redirects=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.3.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2583,'Ensure suspicious packets are logged','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.log_martians = 1 net.ipv4.conf.default.log_martians = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.log_martians=1 # sysctl -w net.ipv4.conf.default.log_martians=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.3.4\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2584,'Ensure broadcast ICMP requests are ignored','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_echo_ignore_broadcasts = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.3.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2585,'Ensure bogus ICMP responses are ignored','Setting icmp_ignore_bogus_error_responses to 1 prevents the kernel from logging bogus responses (RFC-1122 non-compliant) from broadcast reframes, keeping file systems from filling up with useless log messages.','Some routers (and some attackers) will send responses that violate RFC-1122 and attempt to fill up a log file system with many useless error messages.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_ignore_bogus_error_responses = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.3.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2586,'Ensure Reverse Path Filtering is enabled','Setting net.ipv4.conf.all.rp_filter and net.ipv4.conf.default.rp_filter to 1 forces the Linux kernel to utilize reverse path filtering on a received packet to determine if the packet was valid. Essentially, with reverse path filtering, if the return packet does not go out the same interface that the corresponding source packet came from, the packet is dropped (and logged if log_martians is set).','Setting these flags is a good way to deter attackers from sending your system bogus packets that cannot be responded to. One instance where this feature breaks down is if asymmetrical routing is employed. This would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your system, you will not be able to enable this feature without breaking the routing.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.rp_filter=1 # sysctl -w net.ipv4.conf.default.rp_filter=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.3.7\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2587,'Ensure TCP SYN Cookies is enabled','When tcp_syncookies is set, the kernel will handle TCP SYN packets normally until the half-open connection queue is full, at which time, the SYN cookie functionality kicks in. SYN cookies work by not using the SYN queue at all. Instead, the kernel simply replies to the SYN with a SYN|ACK, but will include a specially crafted TCP sequence number that encodes the source and destination IP address and port number and the time the packet was sent. A legitimate connection would send the ACK packet of the three way handshake with the specially crafted sequence number. This allows the system to verify that it has received a valid response to a SYN cookie and allow the connection, even though there is no corresponding SYN in the queue.','Attackers use SYN flood attacks to perform a denial of service attacked on a system by sending many SYN packets without completing the three way handshake. This will quickly use up slots in the kernel's half-open connection queue and prevent legitimate connections from succeeding. SYN cookies allow the system to keep accepting valid connections, even if under a denial of service attack.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.tcp_syncookies = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.tcp_syncookies=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.3.8\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2588,'Ensure IPv6 router advertisements are not accepted','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.default.accept_ra = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_ra=0 # sysctl -w net.ipv6.conf.default.accept_ra=0 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.3.9\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2589,'Ensure DCCP is disabled','The Datagram Congestion Control Protocol (DCCP) is a transport layer protocol that supports streaming media and telephony. DCCP provides a way to gain access to congestion control, without having to do it at the application layer, but does not provide in- sequence delivery.','If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/dccp.conf and add the following line: install dccp /bin/true','[{\"cis\": [\"3.4.1\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2590,'Ensure SCTP is disabled','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.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/sctp.conf and add the following line: install sctp /bin/true','[{\"cis\": [\"3.4.2\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2591,'Ensure RDS is disabled','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.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/rds.conf and add the following line: install rds /bin/true','[{\"cis\": [\"3.4.3\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2592,'Ensure TIPC is disabled','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.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/tipc.conf and add the following line: install tipc /bin/true','[{\"cis\": [\"3.4.4\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2593,'Ensure a Firewall package is installed','A Firewall package should be selected. Most firewall configuration utilities operate as a front end to nftables or iptables.','A Firewall package is required for firewall management and configuration.','','Run one of the following commands to install the Firewall package that follows local site policy: To install UFW , run the following command: # apt install ufw To install nftables , run the following command: # apt install nftables To install iptables , run the following command: # apt install iptables','[{\"cis\": [\"3.5.1.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.1\"]}, {\"tsc\": [\"CC6.6\"]}]'),(2594,'Ensure ufw service is enabled','UncomplicatedFirewall (ufw) is a frontend for iptables. ufw provides a framework for managing netfilter, as well as a command-line and available graphical user interface for manipulating the firewall. Ensure that the ufw service is enabled to protect your system.','The ufw service must be enabled and running in order for ufw to protect the system','','Run the following command to enable ufw: # ufw enable','[{\"cis\": [\"3.5.2.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(2595,'Ensure default deny firewall policy','A default deny all policy on connections ensures that any unconfigured network usage will be rejected.','With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following commands to implement a default deny policy: # ufw default deny incoming # ufw default deny outgoing # ufw default deny routed','[{\"cis\": [\"3.5.2.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(2596,'Ensure loopback traffic is configured','Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (127.0.0.0/8 for IPv4 and ::1/128 for IPv6).','Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.','','Run the following commands to implement the loopback rules: # ufw allow in on lo # ufw allow out on lo # sudo ufw deny in from 127.0.0.0/8 # sudo ufw deny in from ::1','[{\"cis\": [\"3.5.2.3\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(2597,'Ensure a table exists','Tables hold chains. Each table only has one address family and only applies to packets of this family. Tables can have one of five families.','nftables doesn't have any default tables. Without a table being build, nftables will not filter network traffic.','','Run the following command to create a table in nftables: # nft create table inet <table name> .Example: # nft create table inet filter','[{\"cis\": [\"3.5.3.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2\"]}, {\"tsc\": [\"CC6.6\"]}]'),(2598,'Ensure base chains exist','Chains are containers for rules. They exist in two kinds, base chains and regular chains. A base chain is an entry point for packets from the networking stack, a regular chain may be used as jump target and is used for better rule organization.','If a base chain doesn't exist with a hook for input, forward, and delete, packets that would flow through those chains will not be touched by nftables.','','Run the following command to create the base chains: # nft create chain inet <table name> <base chain name> { type filter hook <(input|forward|output)> priority 0 ; } . Example: # nft create chain inet filter input { type filter hook input priority 0 ; } # nft create chain inet filter forward { type filter hook forward priority 0; } # nft create chain inet filter output { type filter hook output priority 0 ; }','[{\"cis\": [\"3.5.3.3\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2\"]}, {\"tsc\": [\"CC6.6\"]}]'),(2599,'Ensure default deny firewall policy','Base chain policy is the default verdict that will be applied to packets reaching the end of the chain.','There are two policies: accept (Default) and drop. If the policy is set to accept , the firewall will accept any packet that is not configured to be denied and the packet will continue transversing the network stack. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following command for the base chains with the input, forward, and output hooks to implement a default DROP policy: # nft chain <table family> <table name> <chain name> { policy drop ; } . Example: # nft chain inet filter input { policy drop ; } ; # nft chain inet filter forward { policy drop ; } and # nft chain inet filter output { policy drop ; }','[{\"cis\": [\"3.5.3.6\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC6.6\"]}]'),(2600,'Ensure nftables service is enabled','The nftables service allows for the loading of nftables rulesets during boot, or starting of the nftables service.','The nftables service restores the nftables rules from the rules files referenced in the /etc/sysconfig/nftables.conf file during boot or the starting of the nftables service.','','Run the following command to enable the nftables service: # systemctl enable nftables','[{\"cis\": [\"3.5.3.7\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2\"]}, {\"tsc\": [\"CC6.6\"]}]'),(2601,'Ensure default deny firewall policy','A default deny all policy on connections ensures that any unconfigured network usage will be rejected.','With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following commands to implement a default DROP policy: # iptables -P INPUT DROP; # iptables -P OUTPUT DROP; # iptables -P FORWARD DROP','[{\"cis\": [\"3.5.4.1.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC6.6\"]}]'),(2602,'Ensure loopback traffic is configured','Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (127.0.0.0/8).','Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (127.0.0.0/8) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.','','Run the following commands to implement the loopback rules: # iptables -A INPUT -i lo -j ACCEPT # iptables -A OUTPUT -o lo -j ACCEPT # iptables -A INPUT -s 127.0.0.0/8 -j DROP','[{\"cis\": [\"3.5.4.1.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC6.6\"]}]'),(2603,'Ensure IPv6 default deny firewall policy','A default deny all policy on connections ensures that any unconfigured network usage will be rejected.','With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following commands to implement a default DROP policy: # ip6tables -P INPUT DROP # ip6tables -P OUTPUT DROP # ip6tables -P FORWARD DROP. Notes: Changing firewall settings while connected over network can result in being locked out of the system. Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well.','[{\"cis\": [\"3.5.4.2.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(2604,'Ensure IPv6 loopback traffic is configured','Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (::1).','Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (::1) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.','','Run the following commands to implement the loopback rules: # ip6tables -A INPUT -i lo -j ACCEPT # ip6tables -A OUTPUT -o lo -j ACCEPT # ip6tables -A INPUT -s ::1 -j DROP','[{\"cis\": [\"3.5.4.2.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(2605,'Ensure auditd is installed','auditd is the userspace component to the Linux Auditing System. It's responsible for writing audit records to the disk','The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring.','','Run the following command to enable auditd: # apt install auditd audispd-plugins','[{\"cis\": [\"4.1.1.1\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.1\"]}, {\"nist_800_53\": [\"AU.2\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2606,'Ensure auditd service is enabled','Enable and start the auditd daemon to record system events.','The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring.','','Run the following command to enable auditd: # systemctl --now enable auditd','[{\"cis\": [\"4.1.1.2\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.1\", \"10.7\"]}, {\"nist_800_53\": [\"AU.2\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2607,'Ensure auditing for processes that start prior to auditd is enabled','Configure grub so that processes that are capable of being audited can be audited even if they start up prior to auditd startup.','Audit events need to be captured on processes that start up prior to auditd, so that potential malicious activity cannot go undetected.','','Edit /etc/default/grub and add audit=1 to GRUB_CMDLINE_LINUX: GRUB_CMDLINE_LINUX="audit=1" Run the following command to update the grub2 configuration: # update-grub Notes: This recommendation is designed around the grub bootloader, if LILO or another bootloader is in use in your environment enact equivalent settings.','[{\"cis\": [\"4.1.1.3\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.2.6\", \"10.7\"]}, {\"nist_800_53\": [\"AU.2\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"35.7.d\", \"32.2\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2608,'Ensure audit log storage size is configured','Configure the maximum size of the audit log file. Once the log reaches the maximum size, it will be rotated and a new log file will be started.','It is important that an appropriate size is determined for log files so that they do not impact the system and audit data is not lost.','','Set the following parameter in /etc/audit/auditd.conf in accordance with site policy: max_log_file = <MB> Notes: The max_log_file parameter is measured in megabytes.','[{\"cis\": [\"4.1.2.1\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"10.7\"]}, {\"nist_800_53\": [\"AU.4\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2609,'Ensure audit logs are not automatically deleted','The max_log_file_action setting determines how to handle the audit log file reaching the max file size. A value of keep_logs will rotate the logs but never delete old logs.','In high security contexts, the benefits of maintaining a long audit history exceed the cost of storing the audit history.','','Set the following parameter in /etc/audit/auditd.conf: max_log_file_action = keep_logs','[{\"cis\": [\"4.1.2.2\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"10.7\"]}, {\"nist_800_53\": [\"AU.9\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2610,'Ensure system is disabled when audit logs are full','The auditd daemon can be configured to halt the system when the audit logs are full.','In high security contexts, the risk of detecting unauthorized access or nonrepudiation exceeds the benefit of the system's availability.','','Set the following parameters in /etc/audit/auditd.conf: space_left_action = email action_mail_acct = root admin_space_left_action = halt','[{\"cis\": [\"4.1.2.3\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"10.7\"]}]'),(2611,'Ensure events that modify date and time information are collected','Capture events where the system date and/or time has been modified. The parameters in this section are set to determine if the adjtimex (tune kernel clock), settimeofday (Set time, using timeval and timezone structures) stime (using seconds since 1/1/1970) or clock_settime (allows for the setting of several internal clocks and timers) system calls have been executed and always write an audit record to the /var/log/audit.log file upon exit, tagging the records with the identifier "time-change"','Unexpected changes in system date and/or time could be a sign of malicious activity on the system.','','For 32 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time- change | -a always,exit -F arch=b32 -S clock_settime -k time-change | -w /etc/localtime -p wa -k time-change. For 64 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change | -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change | -a always,exit -F arch=b64 -S clock_settime -k time-change -a always,exit -F arch=b32 -S clock_settime -k time-change | -w /etc/localtime -p wa -k time-change','[{\"cis\": [\"4.1.3\"]}, {\"cis_csc\": [\"5.5\"]}, {\"pci_dss\": [\"10.4.2\", \"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2612,'Ensure events that modify user/group information are collected','Record events affecting the group , passwd (user IDs), shadow and gshadow (passwords) or /etc/security/opasswd (old passwords, based on remember parameter in the PAM configuration) files. The parameters in this section will watch the files to see if they have been opened for write or have had attribute changes (e.g. permissions) and tag them with the identifier "identity" in the audit log file.','Unexpected changes to these files could be an indication that the system has been compromised and that an unauthorized user is attempting to hide their activities or compromise additional accounts.','','edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -w /etc/group -p wa -k identity | -w /etc/passwd -p wa -k identity | -w /etc/gshadow -p wa -k identity | -w /etc/shadow -p wa -k identity | -w /etc/security/opasswd -p wa -k identity Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.4\"]}, {\"cis_csc\": [\"4.8\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2613,'Ensure events that modify the system's network environment are collected','Record changes to network environment files or system calls. The below parameters monitor the sethostname (set the systems host name) or setdomainname (set the systems domainname) system calls, and write an audit event on system call exit. The other parameters monitor the /etc/issue and /etc/issue.net files (messages displayed pre- login), /etc/hosts (file containing host names and associated IP addresses) and /etc/sysconfig/network (directory containing network interface scripts and configurations) files.','Monitoring sethostname and setdomainname will identify potential unauthorized changes to host and domainname of a system. The changing of these names could potentially break security parameters that are set based on those names. The /etc/hosts file is monitored for changes in the file that can indicate an unauthorized intruder is trying to change machine associations with IP addresses and trick users and processes into connecting to unintended machines. Monitoring /etc/issue and /etc/issue.net is important, as intruders could put disinformation into those files and trick users into providing information to the intruder. Monitoring /etc/network is important as it can show if network interfaces or scripts are being modified in a way that can lead to the machine becoming unavailable or compromised. All audit records will be tagged with the identifier "system-locale."','','For 32 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules Example: vi /etc/audit/rules.d/system-locale.rules and add the following lines: -a always,exit -F arch=b32 -S sethostname -S setdomainname -k system-locale -w /etc/issue -p wa -k system-locale -w /etc/issue.net -p wa -k system-locale -w /etc/hosts -p wa -k system-locale-w /etc/network -p wa -k system-locale For 64 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules Example: vi /etc/audit/rules.d/system-locale.rules and add the following lines: -a always,exit -F arch=b64 -S sethostname -S setdomainname -k system-locale -a always,exit -F arch=b32 -S sethostname -S setdomainname -k system-locale -w /etc/issue -p wa -k system-locale -w /etc/issue.net -p wa -k system-locale -w /etc/hosts -p wa -k system-locale -w /etc/network -p wa -k system-locale','[{\"cis\": [\"4.1.5\"]}, {\"cis_csc\": [\"5.5\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2614,'Ensure events that modify the system's Mandatory Access Controls are collected','Monitor AppArmor mandatory access control. The parameters below monitor any write access (potential additional, deletion or modification of files in the directory) or attribute changes to the /etc/apparmor and /etc/apparmor.d directories.','Changes to files in these directories could indicate that an unauthorized user is attempting to modify access controls and change security contexts, leading to a compromise of the system.','','On systems using AppArmor add the following line to the /etc/audit/audit.rules file: -w /etc/apparmor/ -p wa -k MAC-policy | -w /etc/apparmor.d/ -p wa -k MAC-policy. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.6\"]}, {\"cis_csc\": [\"5.5\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2615,'Ensure login and logout events are collected','Monitor login and logout events. The parameters below track changes to files associated with login/logout events. The file /var/log/faillog tracks failed events from login. The file /var/log/lastlog maintain records of the last time a user successfully logged in. The file /var/log/tallylog maintains records of failures via the pam_tally2 module','Monitoring login/logout events could provide a system administrator with information associated with brute force attacks against user logins.','','edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -w /var/log/faillog -p wa -k logins | -w /var/log/lastlog -p wa -k logins | -w /var/log/tallylog -p wa -k logins. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.7\"]}, {\"cis_csc\": [\"4.9\", \"16.11\", \"16.13\"]}, {\"pci_dss\": [\"10.2.1\", \"10.2.4\", \"10.3\"]}, {\"nist_800_53\": [\"AC.7\", \"AU.14\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2616,'Ensure session initiation information is collected','Monitor session initiation events. The parameters in this section track changes to the files associated with session events. The file /var/run/utmp file tracks all currently logged in users. All audit records will be tagged with the identifier "session." The /var/log/wtmp file tracks logins, logouts, shutdown, and reboot events. The file /var/log/btmp keeps track of failed login attempts and can be read by entering the command /usr/bin/last -f /var/log/btmp . All audit records will be tagged with the identifier "logins."','Monitoring these files for changes could alert a system administrator to logins occurring at unusual hours, which could indicate intruder activity (i.e. a user logging in at a time when they do not normally log in).','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -w /var/run/utmp -p wa -k session | -w /var/log/wtmp -p wa -k logins | -w /var/log/btmp -p wa -k logins. Notes: The last command can be used to read /var/log/wtmp (last with no parameters) and /var/run/utmp (last -f /var/run/utmp). Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.8\"]}, {\"cis_csc\": [\"4.9\", \"16.11\", \"16.13\"]}, {\"pci_dss\": [\"10.3\"]}, {\"nist_800_53\": [\"AC.7\", \"AU.14\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2617,'Ensure discretionary access control permission modification events are collected','Monitor changes to file permissions, attributes, ownership and group. The parameters in this section track changes for system calls that affect file permissions and attributes. The chmod , fchmod and fchmodat system calls affect the permissions associated with a file. The chown , fchown , fchownat and lchown system calls affect owner and group attributes on a file. The setxattr , lsetxattr , fsetxattr (set extended file attributes) and removexattr , lremovexattr , fremovexattr (remove extended file attributes) control extended file attributes. In all cases, an audit record will only be written for non-system user ids (auid >= 1000) and will ignore Daemon events (auid = 4294967295). All audit records will be tagged with the identifier "perm_mod."','Monitoring for changes in file attributes could alert a system administrator to activity that could indicate intruder activity or policy violation.','','For 64 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod | -a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod | -a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod | -a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod | -a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod | -a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.9\"]}, {\"cis_csc\": [\"5.5\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2618,'Ensure unsuccessful unauthorized file access attempts are collected','Monitor for unsuccessful attempts to access files. The parameters below are associated with system calls that control creation ( creat ), opening ( open , openat ) and truncation ( truncate , ftruncate ) of files. An audit log record will only be written if the user is a non- privileged user (auid > = 1000), is not a Daemon event (auid=4294967295) and if the system call returned EACCES (permission denied to the file) or EPERM (some other permanent error associated with the specific system call). All audit records will be tagged with the identifier "access."','Failed attempts to open, create or truncate files could be an indication that an individual or process is trying to gain unauthorized access to the system.','','For 32 bit systems Edit or create a file in the /etc/audit/rules.d/directory ending in .rules Example: vi /etc/audit/rules.d/audit.rules and add the following lines: -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access | -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access For 64 bit systems Edit or create a file in the /etc/audit/rules.d/directory ending in .rules Example: vi /etc/audit/rules.d/access.rules and add the following lines: -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access | -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access | -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access | -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access Notes: Reloading the auditd config toset active settings requires the auditd service to be restarted, and may require a system reboot.','[{\"cis\": [\"4.1.10\"]}, {\"cis_csc\": [\"14.9\"]}, {\"pci_dss\": [\"10.2.4\"]}, {\"nist_800_53\": [\"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2619,'Ensure successful file system mounts are collected','Monitor the use of the mount system call. The mount (and umount ) system call controls the mounting and unmounting of file systems. The parameters below configure the system to create an audit record when the mount system call is used by a non-privileged user.','It is highly unusual for a non privileged user to mount file systems to the system. While tracking mount commands gives the system administrator evidence that external media may have been mounted (based on a review of the source of the mount and confirming it's an external media type), it does not conclusively indicate that data was exported to the media. System administrators who wish to determine if data were exported, would also have to track successful open , creat and truncate system calls requiring write access to a file under the mount point of the external media file system. This could give a fair indication that a write occurred. The only way to truly prove it, would be to track successful writes to the external media. Tracking write system calls could quickly fill up the audit log and is not recommended. Recommendations on configuration options to track data export to media is beyond the scope of this document.','','For 32 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts. For 64 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -a always,exit -F arch=b64 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts | -a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts. Notes: This tracks successful and unsuccessful mount commands. File system mounts do not have to come from external media and this action still does not verify write (e.g. CD ROMS). Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.12\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2620,'Ensure file deletion events by users are collected','Monitor the use of system calls associated with the deletion or renaming of files and file attributes. This configuration statement sets up monitoring for the unlink (remove a file), unlinkat (remove a file attribute), rename (rename a file) and renameat (rename a file attribute) system calls and tags them with the identifier "delete".','Monitoring these calls from non-privileged users could provide a system administrator with evidence that inappropriate removal of files and file attributes associated with protected files is occurring. While this audit option will look at all events, system administrators will want to look for specific privileged files that are being deleted or altered.','','For 32 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete. For 64 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -a always,exit -F arch=b64 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete | -a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete. Notes: At a minimum, configure the audit system to collect file deletion events for all users and root. Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.13\"]}, {\"cis_csc\": [\"6.2\", \"13\"]}, {\"pci_dss\": [\"10.5.5\"]}, {\"nist_800_53\": [\"AU.14\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC7.1\", \"CC7.2\", \"CC7.3\", \"CC8.1\"]}]'),(2621,'Ensure changes to system administration scope (sudoers) is collected','Monitor scope changes for system administrations. If the system has been properly configured to force system administrators to log in as themselves first and then use the sudo command to execute privileged commands, it is possible to monitor changes in scope. The file /etc/sudoers will be written to when the file or its attributes have changed. The audit records will be tagged with the identifier "scope."','Changes in the /etc/sudoers file can indicate that an unauthorized change has been made to scope of system administrator activity.','','Add the following line to the /etc/audit/audit.rules file: -w /etc/sudoers -p wa -k scope | -w /etc/sudoers.d/ -p wa -k scope. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.14\"]}, {\"cis_csc\": [\"4.8\"]}, {\"pci_dss\": [\"10.5.5\"]}, {\"nist_800_53\": [\"AU.14\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC7.1\", \"CC7.2\", \"CC7.3\", \"CC8.1\"]}]'),(2622,'Ensure system administrator actions (sudolog) are collected','Monitor the sudo log file. If the system has been properly configured to disable the use of the su command and force all administrators to have to log in first and then use sudo to execute privileged commands, then all administrator commands will be logged to /var/log/sudo.log . Any time a command is executed, an audit event will be triggered as the /var/log/sudo.log file will be opened for write and the executed administration command will be written to the log.','Changes in /var/log/sudo.log indicate that an administrator has executed a command or the log file itself has been tampered with. Administrators will want to correlate the events written to the audit trail with the records written to /var/log/sudo.log to verify if unauthorized commands have been executed.','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -w <Path to sudo logfile> -p wa -k actions. Notes: The system must be configured with sudisabled (See Item 5.6 Ensure access to the su command is restricted) to force all command execution through sudo. This will not be effective on the console, as administrators can log in as root. Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.15\"]}, {\"cis_csc\": [\"4.9\"]}, {\"pci_dss\": [\"10.2.2\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.6\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2623,'Ensure kernel module loading and unloading is collected','Monitor the loading and unloading of kernel modules. The programs insmod (install a kernel module), rmmod (remove a kernel module), and modprobe (a more sophisticated program to load and unload modules, as well as some other features) control loading and unloading of modules. The init_module (load a module) and delete_module (delete a module) system calls control loading and unloading of modules. Any execution of the loading and unloading module programs and system calls will trigger an audit record with an identifier of "modules".','Monitoring the use of insmod, rmmod and modprobe could provide system administrators with evidence that an unauthorized user loaded or unloaded a kernel module, possibly compromising the security of the system. Monitoring of the init_module and delete_module system calls would reflect an unauthorized user attempting to use a different program to load and unload modules.','','For 32 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -w /sbin/insmod -p x -k modules | -w /sbin/rmmod -p x -k modules | -w /sbin/modprobe -p x -k modules | -a always,exit -F arch=b32 -S init_module -S delete_module -k modules. For 64 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -w /sbin/insmod -p x -k modules | -w /sbin/rmmod -p x -k modules | -w /sbin/modprobe -p x -k modules | -a always,exit -F arch=b64 -S init_module -S delete_module -k modules. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.16\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(2624,'Ensure the audit configuration is immutable','Set system audit so that audit rules cannot be modified with auditctl. Setting the flag "-e 2" forces audit to be put in immutable mode. Audit changes can only be made on system reboot.','In immutable mode, unauthorized users cannot execute changes to the audit system to potentially hide malicious activity and then put the audit rules back. Users would most likely notice a system reboot and that could alert administrators of an attempt to make unauthorized audit changes.','','Edit or create the file /etc/audit/rules.d/99-finalize.rules and add the line: -e 2. Notes: This setting will ensure reloading the auditd config to set active settings requires a system reboot.','[{\"cis\": [\"4.1.17\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.5\"]}, {\"nist_800_53\": [\"AU.9\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2625,'Ensure rsyslog is installed','The rsyslog software are recommended replacements to the original syslogd daemon which provide improvements over syslogd , such as connection-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server.','The security enhancements of rsyslogsuch 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.','','Install rsyslog: # apt install rsyslog','[{\"cis\": [\"4.2.1.1\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.1\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2626,'Ensure rsyslog Service is enabled','Once the rsyslog package is installed it needs to be activated.','If the rsyslog service is not activated the system will not have a syslog service running.','','Run the following command to enable rsyslog: # systemctl --now enable rsyslog','[{\"cis\": [\"4.2.1.2\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.1\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2627,'Ensure rsyslog default file permissions configured','rsyslog will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files.','It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected.','','Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and set $FileCreateMode to 0640 or more restrictive: $FileCreateMode 0640','[{\"cis\": [\"4.2.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.5.1\", \"10.5.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.9\"]}, {\"tsc\": [\"CC5.2\", \"CC6.1\", \"CC7.2\", \"CC.7.3\", \"CC7.4\"]}]'),(2628,'Ensure rsyslog is configured to send logs to a remote log host','The rsyslog utility supports the ability to send logs it gathers to a remote log host running syslogd(8) or to receive messages from remote hosts, reducing administrative overhead.','Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.','','Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and add one of the following lines: Newer syntax: <files to sent to the remote log server> action(type="omfwd" target="<FQDN or ip of loghost>" port="<port number>" protocol="tcp" ction.resumeRetryCount="<number of re-tries>" queue.type="linkList" queue.size=<number of messages to queue>") Example: *.* action(type="omfwd" target="192.168.2.100" port"514" protocol="tcp" action.resumeRetryCount="100" queue.type="linkList" queue.size="1000") Older syntax: *.* @@<FQDN or ip of loghost>','[{\"cis\": [\"4.2.1.5\"]}, {\"cis_csc\": [\"6.6\", \"6.8\"]}, {\"pci_dss\": [\"10.5.3\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.4\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2629,'Ensure remote rsyslog messages are only accepted on designated log hosts','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.','','For hosts that are designated as log hosts, edit the /etc/rsyslog.conf file and un-comment or add the following lines: $ModLoad imtcp $InputTCPServerRun 514. For hosts that are not designated as log hosts, edit the /etc/rsyslog.conf file and comment or remove the following lines: # $ModLoad imtcp # $InputTCPServerRun 514. Run the following command to reload the rsyslogd configuration: # pkill -HUP rsyslogd','[{\"cis\": [\"4.2.1.6\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"10.5.1\"]}]'),(2630,'Ensure journald is configured to send logs to rsyslog','Data from journald may be stored in volatile memory or persisted locally on the server. Utilities exist to accept remote export of journald logs, however, use of the rsyslog service provides a consistent means of log collection and export.','Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.','','Edit the /etc/systemd/journald.conf file and add the following line: ForwardToSyslog=yes','[{\"cis\": [\"4.2.2.1\"]}, {\"cis_csc\": [\"6.5\"]}, {\"pci_dss\": [\"10.5.3\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.9\", \"AU.4\"]}, {\"tsc\": [\"CC5.2\", \"CC7.2\"]}]'),(2631,'Ensure journald is configured to compress large log files','The journald system includes the capability of compressing overly large files to avoid filling up the system with logs or making the logs unmanageably large.','Uncompressed large files may unexpectedly fill a filesystem leading to resource unavailability. Compressing logs prior to write can prevent sudden, unexpected filesystem impacts.','','Edit the /etc/systemd/journald.conf file and add the following line: Compress=yes','[{\"cis\": [\"4.2.2.2\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"10.7\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.4\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2632,'Ensure journald is configured to write logfiles to persistent disk','Data from journald may be stored in volatile memory or persisted locally on the server. Logs in memory will be lost upon a system reboot. By persisting logs to local disk on the server they are protected from loss.','Writing log data to disk will provide the ability to forensically reconstruct events which may have impacted the operations or security of a system even after a system crash or reboot.','','Edit the /etc/systemd/journald.conf file and add the following line: Storage=persistent','[{\"cis\": [\"4.2.2.3\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.7\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.4\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2633,'Ensure permissions on all logfiles are configured','Log files stored in /var/log/ contain logged information from many services on the system, or on log hosts others as well.','It is important to ensure that log files have the correct permissions to ensure that sensitivebdata is archived and protected.','','Run the following command to set permissions on all existing log files: find /var/log -type f -exec chmod g-wx,o-rwx "{}" + -o -type d -exec chmod g-w,o-rwx "{}" +','[{\"cis\": [\"4.2.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.5.1\", \"10.5.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.9\"]}, {\"tsc\": [\"CC5.2\", \"CC7.2\"]}]'),(2634,'Ensure logrotate assigns appropriate permissions','Log files stored in /var/log/ contain logged information from many services on the system, or on log hosts others as well.','It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected.','','Edit /etc/logrotate.conf and update the create line to read 0640 or more restrictive, following local site policy Example: create 0640 root utmp','[{\"cis\": [\"4.4\"]}, {\"cis_csc\": [\"14.6\"]}]'),(2635,'Ensure cron daemon is enabled','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.','','Run the following command to enable cron: systemctl --now enable cron','[{\"cis\": [\"5.1.1\"]}, {\"cis_csc\": [\"6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2636,'Ensure permissions on /etc/crontab are configured','The /etc/crontab file is used by cron to control its own jobs. The commands in this item make sure that root is the user and group owner of the file and that only the owner can access the file.','This file contains information on what system jobs are run by cron. Write access to these files could provide unprivileged users with the ability to elevate their privileges. Read access to these files could provide users with the ability to gain insight on system jobs that run on the system and could provide them a way to gain unauthorized privileged access.','','Run the following commands to set ownership and permissions on /etc/crontab : chown root:root /etc/crontab and chmod og-rwx /etc/crontab','[{\"cis\": [\"5.1.2\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(2637,'Ensure permissions on /etc/cron.hourly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.hourly : chown root:root /etc/cron.hourly and chmod og-rwx /etc/cron.hourly','[{\"cis\": [\"5.1.3\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2638,'Ensure permissions on /etc/cron.daily are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.daily : chown root:root /etc/cron.daily and chmod og-rwx /etc/cron.daily','[{\"cis\": [\"5.1.4\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2639,'Ensure permissions on /etc/cron.weekly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.weekly : chown root:root /etc/cron.weekly and chmod og-rwx /etc/cron.weekly','[{\"cis\": [\"5.1.5\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2640,'Ensure permissions on /etc/cron.monthly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.monthly : chown root:root /etc/cron.monthly and chmod og-rwx /etc/cron.monthly','[{\"cis\": [\"5.1.6\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2641,'Ensure permissions on /etc/cron.d are configured','Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow , cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs.','On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.','','Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow: rm /etc/cron.deny;rm /etc/at.deny;touch /etc/cron.allow; touch /etc/at.allow; chmod og-rwx /etc/cron.allow; chmod og-rwx /etc/at.allow; chown root:root /etc/cron.allow and chown root:root /etc/at.allow','[{\"cis\": [\"5.1.7\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2642,'Ensure at/cron is restricted to authorized users','Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow, cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs.','On many systems, only the system administrator is authorized to schedule cronjobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.','','Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow: # rm /etc/cron.deny # rm /etc/at.deny # touch /etc/cron.allow # touch /etc/at.allow # chmod og-rwx /etc/cron.allow # chmod og-rwx /etc/at.allow # chown root:root /etc/cron.allow # chown root:root /etc/at.allow','[{\"cis\": [\"5.1.8\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2643,'Ensure permissions on /etc/ssh/sshd_config are configured','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- privileged users.','','Run the following commands to set ownership and permissions on /etc/ssh/sshd_config: # chown root:root /etc/ssh/sshd_config # chmod og-rwx /etc/ssh/sshd_config','[{\"cis\": [\"5.2.1\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2644,'Ensure permissions on SSH private host key files are configured','An SSH private key is one of two files used in SSH public key authentication. In this authentication method, The possession of the private key is proof of identity. Only a private key that corresponds to a public key will be able to authenticate successfully. The private keys need to be stored and handled carefully, and no copies of the private key should be distributed.','If an unauthorized user obtains the private SSH host key file, the host could be impersonated','','Run the following commands to set ownership and permissions on the private SSH host key files: # find /etc/ssh -xdev -type f -name 'ssh_host_*_key' -exec chown root:root {} ; # find /etc/ssh -xdev -type f -name 'ssh_host_*_key' -exec chmod 0600 {} ;','[{\"cis\": [\"5.2.2\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2645,'Ensure permissions on SSH public host key files are configured','An SSH public key is one of two files used in SSH public key authentication. In this authentication method, a public key is a key that can be used for verifying digital signatures generated using a corresponding private key. Only a public key that corresponds to a private key will be able to authenticate successfully.','If a public host key file is modified by an unauthorized user, the SSH service may be compromised.','','Run the following commands to set permissions and ownership on the SSH host public key files: # find /etc/ssh -xdev -type f -name 'ssh_host_*_key.pub' -exec chmod 0644 {} ; #find /etc/ssh -xdev -type f -name 'ssh_host_*_key.pub' -exec chown root:root {} ;','[{\"cis\": [\"5.2.3\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2646,'Ensure SSH Protocol is not set to 1','Older versions of SSH support 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. Notes: This command not longer exists in newer versions of SSH. This check is still being included for systems that may be running an older version of SSH. As of openSSH version 7.4 this parameter will not cause an issue when included.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2','[{\"cis\": [\"5.2.4\"]}, {\"cis_csc\": [\"4.5\", \"14.4\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(2647,'Ensure SSH LogLevel is appropriate','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. VERBOSE level specifies that login and logout activity as well as the key fingerprint for any SSH key used for login will be logged. This information is important for SSH key management, especially in legacy environments.','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel VERBOSE or LogLevel INFO','[{\"cis\": [\"5.2.5\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(2648,'Ensure SSH X11 forwarding is disabled','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.','','Edit the /etc/ssh/sshd_configfile to set the parameter as follows: X11Forwarding no','[{\"cis\": [\"5.2.6\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2649,'Ensure SSH MaxAuthTries is set to 4 or less','The MaxAuthTries parameter specifies the maximum number of authentication attempts permitted per connection. When the login failure count reaches half the number, error messages will be written to the syslog file detailing the login failure.','Setting the MaxAuthTries parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. While the recommended setting is 4, set the number based on site policy.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4','[{\"cis\": [\"5.2.7\"]}, {\"cis_csc\": [\"16.13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2650,'Ensure SSH IgnoreRhosts is enabled','The IgnoreRhosts parameter specifies that .rhostsand .shostsfiles will not be used in RhostsRSAAuthenticationor HostbasedAuthentication.','Setting this parameter forces users to enter a password when authenticating with ssh.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes','[{\"cis\": [\"5.2.8\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(2651,'Ensure SSH HostbasedAuthentication is disabled','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no','[{\"cis\": [\"5.2.9\"]}, {\"cis_csc\": [\"16.3\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(2652,'Ensure SSH root login is disabled','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no','[{\"cis\": [\"5.2.10\"]}, {\"cis_csc\": [\"4.3\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(2653,'Ensure SSH PermitEmptyPasswords is disabled','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','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no','[{\"cis\": [\"5.2.11\"]}, {\"cis_csc\": [\"16.3\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\"]}]'),(2654,'Ensure SSH PermitUserEnvironment is disabled','The PermitUserEnvironment option allows users to present environment options to the ssh daemon.','Permitting users the ability to set environment variables through the SSH daemon could potentially allow users to bypass security controls (e.g. setting an execution path that has ssh executing trojan'd programs)','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitUserEnvironment no','[{\"cis\": [\"5.2.12\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\", \"CC6.1\", \"CC7.2\"]}]'),(2655,'Ensure only strong ciphers are used','This variable limits the ciphers that SSH can use during communication.','Weak ciphers that are used for authentication to the cryptographic module cannot be relied upon to provide confidentiality or integrity, and system data may be compromised The DES, Triple DES, and Blowfish ciphers, as used in SSH, have a birthday bound of approximately four billion blocks, which makes it easier for remote attackers to obtain cleartext data via a birthday attack against a long-duration encrypted session, aka a "Sweet32" attack The RC4 algorithm, as used in the TLS protocol and SSL protocol, does not properly combine state data with key data during the initialization phase, which makes it easier for remote attackers to conduct plaintext-recovery attacks against the initial bytes of a stream by sniffing network traffic that occasionally relies on keys affected by the Invariance Weakness, and then using a brute-force approach involving LSB values, aka the "Bar Mitzvah" issue The passwords used during an SSH session encrypted with RC4 can be recovered by an attacker who is able to capture and replay the session Error handling in the SSH protocol; Client and Server, when using a block cipher algorithm in Cipher Block Chaining (CBC) mode, makes it easier for remote attackers to recover certain plaintext data from an arbitrary block of ciphertext in an SSH session via unknown vectors The mm_newkeys_from_blob function in monitor_wrap.c, when an AES-GCM cipher is used, does not properly initialize memory for a MAC context data structure, which allows remote authenticated users to bypass intended ForceCommand and login-shell restrictions via packet data that provides a crafted callback address','','Edit the /etc/ssh/sshd_config file add/modify the Ciphers line to contain a comma separated list of the site approved ciphers Example: Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr','[{\"cis\": [\"5.2.13\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\", \"CC6.1\", \"CC7.2\"]}]'),(2656,'Ensure only strong MAC algorithms are used','This variable limits the types of MAC algorithms that SSH can use during communication.','MD5 and 96-bit MAC algorithms are considered weak and have been shown to increase exploitability in SSH downgrade attacks. Weak algorithms continue to have a great deal of attention as a weak spot that can be exploited with expanded computing power. An attacker that breaks the algorithm could take advantage of a MiTM position to decrypt the SSH tunnel and capture credentials and information','','Edit the /etc/ssh/sshd_config file and add/modify the MACs line to contain a comma separated list of the site approved MACs Example: MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512,hmac-sha2-256','[{\"cis\": [\"5.2.14\"]}, {\"cis_csc\": [\"14.4\", \"16.5\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\", \"CC6.1\", \"CC7.2\"]}]'),(2657,'Ensure only strong Key Exchange algorithms are used','Key exchange is any method in cryptography by which cryptographic keys are exchanged between two parties, allowing use of a cryptographic algorithm. If the sender and receiver wish to exchange encrypted messages, each must be equipped to encrypt messages to be sent and decrypt messages received','Key exchange methods that are considered weak should be removed. A key exchange method may be weak because too few bits are used, or the hashing algorithm is considered too weak. Using weak algorithms could expose connections to man-in-the-middle attacks','','Edit the /etc/ssh/sshd_config file add/modify the KexAlgorithms line to contain a comma separated list of the site approved key exchange algorithms Example: KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256','[{\"cis\": [\"5.2.15\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.7\", \"CC6.1\", \"CC7.2\"]}]'),(2658,'Ensure SSH Idle Timeout Interval is configured','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.','','Edit the /etc/ssh/sshd_config file to set the parameters according to site policy: ClientAliveInterval 300 ClientAliveCountMax 0','[{\"cis\": [\"5.2.16\"]}, {\"cis_csc\": [\"16.11\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(2659,'Ensure SSH LoginGraceTime is set to one minute or less','The LoginGraceTime parameter specifies the time allowed for successful authentication to the SSH server. The longer the Grace period is the more open unauthenticated connections can exist. Like other session controls in this session the Grace Period should be limited to appropriate organizational limits to ensure the service is available for needed access.','Setting the LoginGraceTime parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. It will also limit the number of concurrent unauthenticated connections While the recommended setting is 60 seconds (1 Minute), set the number based on site policy.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: LoginGraceTime 60','[{\"cis\": [\"5.2.17\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"8.1\"]}, {\"tsc\": [\"CC6.1\"]}]'),(2660,'Ensure SSH access is limited','There are several options available to limit which users and group can access the system via SSH. It is recommended that at least one of the following options be leveraged: AllowUsers, AllowGroups, DenyUsers, DenyGroups.','Restricting which users can remotely access the system via SSH will help ensure that only authorized users access the system.','','Edit the /etc/ssh/sshd_config file to set one or more of the parameter as follows: AllowUsers <userlist> AllowGroups <grouplist> DenyUsers <userlist> DenyGroups <grouplist>','[{\"cis\": [\"5.2.18\"]}, {\"cis_csc\": [\"4.3\"]}, {\"pci_dss\": [\"8.1\"]}, {\"tsc\": [\"CC6.1\"]}]'),(2661,'Ensure SSH warning banner is configured','The Banner parameter specifies a file whose contents must be sent to the remote user before authentication is permitted. By default, no banner is displayed.','Banners are used to warn connecting users of the particular site's policy regarding connection. Presenting a warning message prior to the normal user login may assist the prosecution of trespassers on the computer system.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: Banner /etc/issue.net','[{\"cis\": [\"5.2.19\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2662,'Ensure SSH PAM is enabled','UsePAM Enables the Pluggable Authentication Module interface. If set to “yes” this will enable PAM authentication using ChallengeResponseAuthentication and PasswordAuthentication in addition to PAM account and session module processing for all authentication types.','When usePAM is set to yes, PAM runs through account and session types properly. This is important if you want to restrict access to services based off of IP, time or other factors of the account. Additionally, you can make sure users inherit certain environment variables on login or disallow access to the server.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: UsePAM yes','[{\"cis\": [\"5.2.20\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2663,'Ensure SSH AllowTcpForwarding is disabled','SSH port forwarding is a mechanism in SSH for tunneling application ports from the client to the server, or servers to clients. It can be used for adding encryption to legacy applications, going through firewalls, and some system administrators and IT professionals use it for opening backdoors into the internal network from their home machines.','Leaving port forwarding enabled can expose the organization to security risks and back-doors. SSH connections are protected with strong encryption. This makes their contents invisible to most deployed network monitoring and traffic filtering solutions. This invisibility carries considerable risk potential if it is used for malicious purposes such as data exfiltration. Cybercriminals or malware could exploit SSH to hide their unauthorized communications, or to exfiltrate stolen data from the target network.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: AllowTcpForwarding no','[{\"cis\": [\"5.2.21\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(2664,'Ensure SSH MaxStartups is configured','The MaxStartups parameter specifies the maximum number of concurrent unauthenticated connections to the SSH daemon.','To protect a system from denial of service due to a large number of pending authentication connection attempts, use the rate limiting function of MaxStartups to protect availability of sshd logins and prevent overwhelming the daemon.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: maxstartups 10:30:60','[{\"cis\": [\"5.2.22\"]}, {\"cis_csc\": [\"5.1\"]}]'),(2665,'Ensure SSH MaxSessions is limited','The MaxSessions parameter specifies the maximum number of open sessions permitted from a given connection.','To protect a system from denial of service due to a large number of concurrent sessions, use the rate limiting function of MaxSessions to protect availability of sshd logins and prevent overwhelming the daemon.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxSessions 10','[{\"cis\": [\"5.2.19\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2666,'Ensure password creation requirements are configured','The pam_pwquality.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more. The following are definitions of the pam_pwquality.so options: - retry=3 (Allow 3 tries before sending back a failure). The following options are set in the /etc/security/pwquality.conf file: - minlen = 14 dcredit = -1 ucredit = -1 ocredit = -1 lcredit = -1 (The settings shown above are one possible policy. Alter these values to conform to your own organization's password policies.)','Strong passwords protect systems from being hacked through brute force methods.','','1) Run the following command to install the pam_pwquality module: apt install libpam-pwquality 2) Edit the /etc/pam.d/common-password file to include the appropriate options for pam_pwquality.so and to conform to site policy: password requisite pam_pwquality.so retry=3 3) Edit /etc/security/pwquality.conf to add or update the following settings to conform to site policy: minlen = 14 dcredit = -1 ucredit = -1 ocredit = -1 lcredit = -1. Notes: Additional module options may be set, recommendation requirements only cover including try_first_pass and minlen set to 14 or more. Settings in /etc/security/pwquality.conf must use spaces around the = symbol.','[{\"cis\": [\"5.3.1\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2.3\"]}, {\"tsc\": [\"CC6.1\"]}]'),(2667,'Ensure lockout for failed password attempts is configured','Lock out users after n unsuccessful consecutive login attempts. The first sets of changes are made to the PAM configuration files. The second set of changes are applied to the program specific PAM configuration file. The second set of changes must be applied to each program that will lock out users. Check the documentation for each secondary program for instructions on how to configure them to work with PAM. Set the lockout number to the policy in effect at your site.','Locking out user IDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems.','','Edit the /etc/pam.d/common-auth file and add the auth line below: auth required pam_tally2.so onerr=fail audit silent deny=5 unlock_time=900. Edit the /etc/pam.d/common-account file and add the account lines below: account requisite pam_deny.so account required pam_tally2.so. Note: If a user has been locked out because they have reached the maximum consecutive failure count defined by deny= in the pam_tally2.so module, the user can be unlocked by issuing the command /sbin/pam_tally2 -u <username> --reset. This command sets the failed count to 0, effectively unlocking the user. Notes:BUG In pam_tally2.so To work around this issue the addition of pam_tally2.so in the accounts section of the /etc/pam.d/common-account file has been added to the audit and remediation sections. pam_tally2 line must be added for the counter to reset to 0 when using sudo. Use of the "audit" keyword may log credentials in the case of user error during authentication. This risk should be evaluated in the context of the site policies of your organization.','[{\"cis\": [\"5.3.2\"]}, {\"cis_csc\": [\"16.7\"]}, {\"pci_dss\": [\"8.2.5\"]}, {\"tsc\": [\"CC6.1\"]}]'),(2668,'Ensure password reuse is limited','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.','','Edit the /etc/pam.d/common-password file to include the remember option and conform to site policy as shown: password required pam_pwhistory.so remember=5. Notes: Additional module options may be set, recommendation only covers those listed here.','[{\"cis\": [\"5.3.3\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2.5\"]}, {\"tsc\": [\"CC6.1\"]}]'),(2669,'Ensure password hashing algorithm is SHA-512','The commands below change password encryption from md5 to sha512 (a much stronger hashing algorithm). All existing accounts will need to perform a password change to upgrade the stored hashes to the new algorithm.','The SHA-512 algorithm provides much stronger hashing than MD5, thus providing additional protection to the system by increasing the level of effort for an attacker to successfully determine passwords. Note that these change only apply to accounts configured on the local system.','','Edit the /etc/pam.d/common-password file to include the sha512 option for pam_unix.so as shown: password [success=1 default=ignore] pam_unix.so sha512','[{\"cis\": [\"5.3.4\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"3.6.1\", \"8.2.1\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\"]}]'),(2670,'Ensure password expiration is 365 days or less','The PASS_MAX_DAYS parameter in /etc/login.defs allows an administrator to force passwords to expire once they reach a defined age. It is recommended that the PASS_MAX_DAYS parameter be set to less than or equal to 365 days.','The window of opportunity for an attacker to leverage compromised credentials or successfully compromise credentials via an online brute force attack is limited by the age of the password. Therefore, reducing the maximum age of a password also reduces an attacker's window of opportunity.','','Set the PASS_MAX_DAYS parameter to conform to site policy in /etc/login.defs: PASS_MAX_DAYS 90. Modify user parameters for all users with a password set to match: # chage --maxdays 90 <user>. Notes: You can also check this setting in /etc/shadow directly. The 5th field should be 365 or less for all users with a password. A value of -1 will disable password expiration. Additionally the password expiration must be greater than the minimum days between password changes or users will be unable to change their password.','[{\"cis\": [\"5.4.1.1\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2.4\"]}, {\"tsc\": [\"CC6.1\"]}]'),(2671,'Ensure minimum days between password changes is 7 or more','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.','','Set the PASS_MIN_DAYS parameter to 7 in /etc/login.defs: PASS_MIN_DAYS 7. Modify user parameters for all users with a password set to match: # chage --mindays 7 <user>. Notes: You can also check this setting in /etc/shadow directly. The 4th field should be 7 or more for all users with a password.','[{\"cis\": [\"5.4.1.2\"]}, {\"cis_csc\": [\"4.4\", \"16\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(2672,'Ensure password expiration warning days is 7 or more','The PASS_WARN_AGE parameter in /etc/login.defs allows an administrator to notify users that their password will expire in a defined number of days. It is recommended that the PASS_WARN_AGE parameter be set to 7 or more days.','Providing an advance warning that a password will be expiring gives users time to think of a secure password. Users caught unaware may choose a simple password or write it down where it may be discovered.','','Set the PASS_WARN_AGE parameter to 7 in /etc/login.defs: PASS_WARN_AGE 7. Modify user parameters for all users with a password set to match: # chage --warndays 7 <user>. Notes: You can also check this setting in /etc/shadow directly. The 6th field should be 7 or more for all users with a password.','[{\"cis\": [\"5.4.1.3\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(2673,'Ensure inactive password lock is 30 days or less','User accounts that have been inactive for over a given period of time can be automatically disabled. It is recommended that accounts that are inactive for 30 days after password expiration be disabled.','Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies.','','Run the following command to set the default password inactivity period to 30 days: # useradd -D -f 30. Modify user parameters for all users with a password set to match: # chage --inactive 30 <user>. Notes: You can also check this setting in /etc/shadow directly. The 7th field should be 30 or less for all users with a password. A value of -1 would disable this setting.','[{\"cis\": [\"5.4.1.4\"]}, {\"cis_csc\": [\"4.4\", \"16\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(2674,'Ensure default group for the root account is GID 0','The usermod command can be used to specify which group the root user belongs to. This affects permissions of files that are created by the root user.','Using GID 0 for the root account helps prevent root-owned files from accidentally becoming accessible to non-privileged users.','','Run the following command to set the root user default group to GID 0: # usermod -g 0 root','[{\"cis\": [\"5.4.3\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(2675,'Ensure default user umask is 027 or more restrictive','The default umask determines the permissions of files created by users. The user creating the file has the discretion of making their files and directories readable by others via the chmod command. Users who wish to allow their files and directories to be readable by others by default may choose a different default umask by inserting the umask command into the standard shell configuration files ( .profile , .bashrc , etc.) in their home directories.','Setting a very secure default value for umask ensures that users make a conscious choice about their file permissions. A default umask setting of 077 causes files and directories created by users to not be readable by any other user on the system. A umask of 027 would make files and directories readable by users in the same Unix group, while a umask of 022 would make files readable by every user on the system.','','Edit the /etc/bash.bashrc , /etc/profile and /etc/profile.d/*.sh files (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: umask 027','[{\"cis\": [\"5.4.4\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(2676,'Ensure default user shell timeout is 900 seconds or less','The default TMOUT determines the shell timeout for users. The TMOUT value is measured in seconds.','Having no timeout value associated with a shell could allow an unauthorized user access to another user's shell 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.','','Edit the /etc/bash.bashrc , /etc/profile and /etc/profile.d/*.sh files (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: readonly TMOUT=900 ; export TMOUT . Note that setting the value to readonly prevents unwanted modification during runtime.','[{\"cis\": [\"5.4.5\"]}, {\"cis_csc\": [\"16.11\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(2677,'Ensure access to the su command is restricted','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 sudo 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.','','Create an empty group that will be specified for use of the su command. The group should be named according to site policy. Example # groupadd sugroup Add the following line to the /etc/pam.d/su file, specifying the empty group: auth required pam_wheel.so use_uid group=sugroup','[{\"cis\": [\"5.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(2678,'Ensure permissions on /etc/passwd are configured','The /etc/passwd file contains user account information that is used by many system utilities and therefore must be readable for these utilities to operate.','It is critical to ensure that the /etc/passwd file is protected from unauthorized write access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/passwd: # chown root:root /etc/passwd # chmod 644 /etc/passwd','[{\"cis\": [\"6.1.2\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2679,'Ensure permissions on /etc/gshadow- are configured','The /etc/gshadow- file is used to store backup information about groups that is critical to the security of those accounts, such as the hashed password and other security information.','It is critical to ensure that the /etc/gshadow- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the one of the following chown commands as appropriate and the chmod to set permissions on /etc/gshadow- : # chown root:root /etc/gshadow- # chown root:shadow /etc/gshadow- # chmod o-rwx,g-wx /etc/gshadow-','[{\"cis\": [\"6.1.3\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2680,'Ensure permissions on /etc/shadow are configured','The /etc/shadow file is used to store the information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information.','If attackers can gain read access to the /etc/shadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/shadow file (such as expiration) could also be useful to subvert the user accounts.','','Run the one following commands to set permissions on /etc/shadow : # chown root:shadow /etc/shadow # chmod o-rwx,g-wx /etc/shadow','[{\"cis\": [\"6.1.4\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2681,'Ensure permissions on /etc/group are configured','The /etc/group file contains a list of all the valid groups defined in the system. The command below allows read/write access for root and read access for everyone else.','The /etc/group file needs to be protected from unauthorized changes by non-privileged users, but needs to be readable as this information is used with many non-privileged programs.','','Run the following command to set permissions on /etc/group: # chown root:root /etc/group # chmod 644 /etc/group','[{\"cis\": [\"6.1.5\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2682,'Ensure permissions on /etc/passwd- are configured','The /etc/passwd- file contains backup user account information.','It is critical to ensure that the /etc/passwd- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/passwd-: # chown root:root /etc/passwd- # chmod u-x,go-rwx /etc/passwd-','[{\"cis\": [\"6.1.6\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2683,'Ensure permissions on /etc/shadow- are configured','The /etc/shadow- file is used to store backup information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information.','It is critical to ensure that the /etc/shadow- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following commands to set permissions on /etc/shadow- : # chown root:shadow /etc/shadow- # chmod u-x,go-rwx /etc/shadow-','[{\"cis\": [\"6.1.7\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2684,'Ensure permissions on /etc/group- are configured','The /etc/group- file contains a backup list of all the valid groups defined in the system.','It is critical to ensure that the /etc/group- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/group-: # chown root:root /etc/group- # chmod u-x,go-rwx /etc/group-','[{\"cis\": [\"6.1.8\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2685,'Ensure permissions on /etc/gshadow are configured','The /etc/gshadow file is used to store the information about groups that is critical to the security of those accounts, such as the hashed password and other security information.','If attackers can gain read access to the /etc/gshadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/gshadow file (such as group administrators) could also be useful to subvert the group','','Run the following commands to set permissions on /etc/gshadow : # chown root:shadow /etc/gshadow # chmod o-rwx,g-rw /etc/gshadow','[{\"cis\": [\"6.1.9\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(2686,'Ensure password fields are not empty','An account with an empty password field means that anybody may log in as that user without providing a password.','All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user.','','If any accounts in the /etc/shadow file do not have a password, run the following command to lock the account until it can be determined why it does not have a password: # passwd -l <em><username></em>. Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off.','[{\"cis\": [\"6.2.1\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(2687,'Ensure no legacy "+" entries exist in /etc/passwd','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Remove any legacy + entries from /etc/passwd if they exist.','[{\"cis\": [\"6.2.2\"]}, {\"cis_csc\": [\"16.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2688,'Ensure no legacy "+" entries exist in /etc/shadow','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Remove any legacy + entries from /etc/shadow if they exist.','[{\"cis\": [\"6.2.4\"]}, {\"cis_csc\": [\"16.9\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2689,'Ensure no legacy "+" entries exist in /etc/group','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Remove any legacy + entries from /etc/group if they exist.','[{\"cis\": [\"6.2.5\"]}, {\"cis_csc\": [\"16.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(2690,'Ensure root is the only UID 0 account','Any account with UID 0 has superuser privileges on the system.','This access must be limited to only the default root account and only from the system console. Administrative access must be through an unprivileged account using an approved mechanism as noted in Item 5.6 Ensure access to the su command is restricted.','','Remove any users other than root with UID 0 or assign them a new UID if appropriate.','[{\"cis\": [\"6.2.6\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(2691,'Ensure shadow group is empty','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.','','Remove all users from the shadow group, and change the primary group of any users with shadow as their primary group.','[{\"cis\": [\"6.2.20\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC7.2\", \"CC6.1\", \"CC6.8\", \"CC7.3\", \"CC7.4\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}]'),(3000,'SSH Hardening: Port should not be 22','The ssh daemon should not be listening on port 22 (the default value) for incoming connections.','Changing the default port you may reduce the number of successful attacks from zombie bots, an attacker or bot doing port-scanning can quickly identify your SSH port.','','Change the Port option value in the sshd_config file.','[{\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3001,'SSH Hardening: Protocol should be set to 2','The SSH protocol should not be 1.','The Protocol parameter dictates which version of the SSH communication and encryption protocols are in use. Version 1 of the SSH protocol has weaknesses.','','Change the Protocol option value in the sshd_config file.','[{\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3002,'SSH Hardening: Root account should not be able to log in','The option PermitRootLogin should be set to no.','The option PermitRootLogin specifies whether root can log in using ssh. If you want log in as root, you should use the option "Match" and restrict it to a few IP addresses.','','Change the PermitRootLogin option value in the sshd_config file.','\"\"'),(3003,'SSH Hardening: No Public Key authentication','The option PubkeyAuthentication should be set yes.','Access only by public key. Generally people will use weak passwords and have poor password practices. Keys are considered stronger than password.','','Change the PubkeyAuthentication option value in the sshd_config file.','[{\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3004,'SSH Hardening: Password Authentication should be disabled','The option PasswordAuthentication should be set to no.','The option PasswordAuthentication specifies whether we should use password-based authentication. Use public key authentication instead of passwords.','','Change the PasswordAuthentication option value in the sshd_config file.','[{\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3005,'SSH Hardening: Empty passwords should not be allowed','The option PermitEmptyPasswords should be set to no.','The option PermitEmptyPasswords specifies whether the server allows logging in to accounts with a null password. Accounts with null passwords are a bad practice.','','Change the PermitEmptyPasswords option value in the sshd_config file.','[{\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3006,'SSH Hardening: Rhost or shost should not be used for authentication','The option IgnoreRhosts should be set to yes.','The option IgnoreRhosts specifies whether rhosts or shosts files should not be used in authentication. For security reasons it is recommended to no use rhosts or shosts files for authentication.','','Change the IgnoreRhosts option value in the sshd_config file.','[{\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3007,'SSH Hardening: Grace Time should be one minute or less.','The option LoginGraceTime should be set to 60 or less.','The option LoginGraceTime specifies how long in seconds after a connection request the server will wait before disconnecting if the user has not successfully logged in. 30 seconds is the recommended time for avoiding open connections without authenticate.','','Change the LoginGraceTime option value in the sshd_config file.','[{\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3008,'SSH Hardening: Wrong Maximum number of authentication attempts','The option MaxAuthTries should be set to 4 or less.','The MaxAuthTries parameter specifies the maximum number of authentication attempts permitted per connection. Once the number of failures reaches half this value, additional failures are logged. This should be set to 4.','','Change the MaxAuthTries option value in the sshd_config file.','[{\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3009,'SSH Hardening: Ensure SSH HostbasedAuthentication is disabled','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no','[{\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(3010,'Ensure retry option for passwords is less than 3','The pam_pwquality.so module and pam_cracklib.so module (depending on the Linux distribution used) checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more.','Strong passwords protect systems from being hacked through brute force methods.','','Edit the /etc/pam.d/common-password and /etc/security/pwquality.conf files, or the /etc/pam.d/password-auth and /etc/pam.d/system-auth files, to include the appropriate options for pam_pwquality.so or pam_cracklib.so and to conform to site policy.','[{\"cis_csc\": [\"4.4\", \"5.7\", \"16.12\"]}]'),(3011,'Ensure passwords are longer than 14 characters','The pam_pwquality.so module and pam_cracklib.so module (depending on the Linux distribution used) checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more.','Strong passwords protect systems from being hacked through brute force methods.','','Edit the /etc/pam.d/common-password and /etc/security/pwquality.conf files, or the /etc/pam.d/password-auth and /etc/pam.d/system-auth files, to include the appropriate options for pam_pwquality.so or pam_cracklib.so and to conform to site policy.','[{\"cis_csc\": [\"4.4\", \"5.7\", \"16.12\"]}]'),(3012,'Ensure passwords contain at least one digit','The pam_pwquality.so module and pam_cracklib.so module (depending on the Linux distribution used) checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more.','Strong passwords protect systems from being hacked through brute force methods.','','Edit the /etc/pam.d/common-password and /etc/security/pwquality.conf files, or the /etc/pam.d/password-auth and /etc/pam.d/system-auth files, to include the appropriate options for pam_pwquality.so or pam_cracklib.so and to conform to site policy.','[{\"cis_csc\": [\"4.4\", \"5.7\", \"16.12\"]}]'),(3013,'Ensure passwords contain at least one lowercase character','The pam_pwquality.so module and pam_cracklib.so module (depending on the Linux distribution used) checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more.','Strong passwords protect systems from being hacked through brute force methods.','','Edit the /etc/pam.d/common-password and /etc/security/pwquality.conf files, or the /etc/pam.d/password-auth and /etc/pam.d/system-auth files, to include the appropriate options for pam_pwquality.so or pam_cracklib.so and to conform to site policy.','[{\"cis_csc\": [\"4.4\", \"5.7\", \"16.12\"]}]'),(3014,'Ensure passwords contain at least one uppercase character','The pam_pwquality.so module and pam_cracklib.so module (depending on the Linux distribution used) checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more.','Strong passwords protect systems from being hacked through brute force methods.','','Edit the /etc/pam.d/common-password and /etc/security/pwquality.conf files, or the /etc/pam.d/password-auth and /etc/pam.d/system-auth files, to include the appropriate options for pam_pwquality.so or pam_cracklib.so and to conform to site policy.','[{\"cis_csc\": [\"4.4\", \"5.7\", \"16.12\"]}]'),(3015,'Ensure passwords contain at least one special character','The pam_pwquality.so module and pam_cracklib.so module (depending on the Linux distribution used) checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more.','Strong passwords protect systems from being hacked through brute force methods.','','Edit the /etc/pam.d/common-password and /etc/security/pwquality.conf files, or the /etc/pam.d/password-auth and /etc/pam.d/system-auth files, to include the appropriate options for pam_pwquality.so or pam_cracklib.so and to conform to site policy.','[{\"cis_csc\": [\"4.4\", \"5.7\", \"16.12\"]}]'),(3016,'Ensure lockout for failed password attempts is configured','Lock out users after n unsuccessful consecutive login attempts. The first sets of changes are made to the PAM configuration files. The second set of changes are applied to the program specific PAM configuration file. The second set of changes must be applied to each program that will lock out users.','Locking out user IDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems.','','Edit the /etc/pam.d/common-auth file and add the auth line below: #auth required pam_tally2.so onerr=fail audit silent deny=5 unlock_time=900','\"\"'),(3017,'Ensure password hashing algorithm is SHA-512','The commands below change password encryption from md5 to sha512 (a much stronger hashing algorithm). All existing accounts will need to perform a password change to upgrade the stored hashes to the new algorithm.','The SHA-512 algorithm provides much stronger hashing than MD5, thus providing additional protection to the system by increasing the level of effort for an attacker to successfully determine passwords. Note that these change only apply to accounts configured on the local system.','','Edit the /etc/pam.d/common-password file to include the sha512 option for pam_unix.so as shown: password required pam_unix.so sha512','[{\"cis_csc\": [\"16.14\"]}]'),(3018,'Ensure passwords in /etc/shadow are hashed with SHA-512 or SHA-256','SHA-512 and SHA-256 are much stronger hashing algorithms than MD5.','The SHA-512 algorithm provides much stronger hashing than MD5, thus providing additional protection to the system by increasing the level of effort for an attacker to successfully determine passwords.','','Set the default algorithm for password hashing in /etc/shadow to SHA-512 or SHA-256.','\"\"'),(3019,'Ensure password expiration is 365 days or less','The PASS_MAX_DAYS parameter in /etc/login.defs allows an administrator to force passwords to expire once they reach a defined age. It is recommended that the PASS_MAX_DAYS parameter be set to less than or equal to 365 days.','The window of opportunity for an attacker to leverage compromised credentials or successfully compromise credentials via an online brute force attack is limited by the age of the password. Therefore, reducing the maximum age of a password also reduces an attacker's window of opportunity.','','Set the PASS_MAX_DAYS parameter to conform to site policy in /etc/login.defs.','[{\"cis_csc\": [\"4.4\", \"16\"]}]'),(3020,'Ensure SELinux or AppArmor are installed','SELinux and AppArmor provide Mandatory Access Controls.','Without a Mandatory Access Control system installed only the default Discretionary Access Control system will be available.','','Run one of the following commands to install SELinux or apparmor: # apt-get install selinux-basics Or: # apt-get install apparmor apparmor-profiles apparmor-utils','[{\"cis_csc\": [\"14.4\", \"14.6\"]}]'),(3021,'Ensure CUPS is not enabled','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.','','Run the following command to disable cups: # systemctl disable cups','[{\"cis_csc\": [\"9.1\", \"9.2\"]}]'),(3022,'Ensure auditd service is enabled','Turn on the auditd daemon to record system events.','The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring.','','Run the following command to enable auditd: # systemctl enable auditd','[{\"cis_csc\": [\"6.2\", \"6.3\"]}]'),(3500,'Create Separate Partition for /tmp','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.','','For new installations, check the box to 'Review and modify partitioning' and create a separate partition for /tmp . For systems that were previously installed, use the Logical Volume Manager (LVM) to create partitions.','[{\"cis\": [\"1.1.1\"]}]'),(3501,'Set nodev option for /tmp Partition','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.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options). # mount -o remount,nodev /tmp','[{\"cis\": [\"1.1.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3502,'Set nosuid option for /tmp Partition','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 .','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options).','[{\"cis\": [\"1.1.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3503,'Set noexec option for /tmp Partition','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 .','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options). # mount -o remount,noexec /tmp','[{\"cis\": [\"1.1.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3504,'Create Separate Partition for /var','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.','','For new installations, check the box to 'Review and modify partitioning' and create a separate partition for /var. For systems that were previously installed, use the Logical Volume Manager (LVM) to create partitions.','[{\"cis\": [\"1.1.5\"]}]'),(3505,'Bind Mount the /var/tmp directory to /tmp','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.','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.','','# mount --bind /tmp /var/tmp and edit the /etc/fstab file to contain the following line: /tmp /var/tmp none bind 0 0','[{\"cis\": [\"1.1.6\"]}]'),(3506,'Create Separate Partition for /var/log','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.','','For new installations, check the box to 'Review and modify partitioning' and create a separate partition for /var/log. For systems that were previously installed, use the Logical Volume Manager (LVM) to create partitions.','[{\"cis\": [\"1.1.7\"]}]'),(3507,'Create Separate Partition for /var/log/audit','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.','','For new installations, check the box to 'Review and modify partitioning' and create a separate partition for /var/log/audit . For systems that were previously installed, use the Logical Volume Manager (LVM) to create partitions.','[{\"cis\": [\"1.1.8\"]}]'),(3508,'Create Separate Partition for /home','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.','','For new installations, check the box to 'Review and modify partitioning' and create a separate partition for /home. For systems that were previously installed, use the Logical Volume Manager (LVM) to create partitions.','[{\"cis\": [\"1.1.9\"]}]'),(3509,'Add nodev Option to /home','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.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options). # mount -o remount,nodev /home','[{\"cis\": [\"1.1.10\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3510,'Add nodev Option to /dev/shm Partition','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.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options of entries that have mount points that contain /dev/shm). # mount -o remount,nodev /dev/shm','[{\"cis\": [\"1.1.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3511,'Add nosuid Option to /dev/shm Partition','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.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options). Look for entries that have mount points that contain /dev/shm. # mount -o remount,nosuid /dev/shm','[{\"cis\": [\"1.1.15\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'); INSERT INTO `tsca` VALUES (3512,'Add noexec Option to /dev/shm Partition','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.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options). Look for entries that have mount points that contain /dev/shm. # mount -o remount,noexec /dev/shm','[{\"cis\": [\"1.1.16\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3513,'Disable yum-updatesd','The yum-updatesd utility provides notification of updates that are available for your system.','The yum-updatesd service may introduce unnecessary overhead and prevent other programs from running. When possible, replace this service with a cron job that calls yum directly.','','Disable the yum-updatesd daemon by running the following command: # chkconfig yum-updatesd off','[{\"cis\": [\"1.2.5\"]}, {\"pci_dss\": [\"6.2\"]}, {\"nist_800_53\": [\"SI.2\"]}, {\"tsc\": [\"A1.2\", \"CC6.8\"]}]'),(3514,'Enable SELinux in /etc/grub.conf','Configure SELINUX to be enabled at boot time and verify that it has not been overwritten by the grub boot parameters','SELinux must be enabled at boot time in /etc/grub.conf to ensure that the controls it provides are not overwritten.','','Remove all instances of selinux=0 and enforcing=0 from /etc/grub.conf.','[{\"cis\": [\"1.4.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3515,'Set the SELinux State','Set SELinux to enable when the system is booted.','SELinux must be enabled at boot time in to ensure that the controls it provides are in effect at all times.','','Edit the /etc/selinux/config file to set the SELINUX parameter: SELINUX=enforcing','[{\"cis\": [\"1.4.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3516,'Set the SELinux Policy','Configure SELinux to meet or exceed the default targeted policy, which constrains daemons and system software only.','Security configuration requirements vary from site to site. Some sites may mandate a policy that is stricter than the default policy, which is perfectly acceptable. This item is intended to ensure that at least the default recommendations are met.','','Edit the /etc/selinux/config file to set the SELINUXTYPE parameter: SELINUXTYPE=targeted','[{\"cis\": [\"1.4.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3517,'Remove SETroubleshoot','The SETroubleshoot service notifies desktop users of SELinux denials through a user-friendly interface. The service provides important information around configuration errors, unauthorized intrusions, and other potential errors.','The SETroubleshoot service is an unnecessary daemon to have running on a server, especially if X Windows is disabled.','','rpm -qa setroubleshoot','[{\"cis\": [\"1.4.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3518,'Disable MCS Translation Service (mcstrans)','The mcstransd daemon provides category label information to client processes requesting information. The label translations are defined in /etc/selinux/targeted/setrans.conf','Since this service is not used very often, disable it to reduce the amount of potentially vulnerable code running on the system.','','# chkconfig mctrans off','[{\"cis\": [\"1.4.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3519,'Set Boot Loader Password','Setting the boot loader password will require that the person who is rebooting system the must enter a password before being able to set command line boot parameters','Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off SELinux at boot time).','','Set a bootloader password','[{\"cis\": [\"1.5.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3520,'Require Authentication for Single-User Mode','Since /etc/init 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.','','Add the following to /etc/inittab : ~:S:wait:/sbin/sulogin','[{\"cis\": [\"1.5.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3521,'Disable Interactive Boot','The PROMPT option provides console users the ability to interactively boot the system and select which services to start on boot .','Turn off the PROMPT option on the console to prevent console users from potentially overriding established security settings.','','Set the PROMPT parameter in /etc/sysconfig/init to no .','[{\"cis\": [\"1.5.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3522,'Restrict Core Dumps','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.','','Add the following line to /etc/security/limits.conf file. * hard core 0. Add the following line to the /etc/sysctl.conf file. fs.suid_dumpable = 0','[{\"cis\": [\"1.6.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3523,'Enable Randomized Virtual Memory Region Placement','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.','','Add the following line to the /etc/sysctl.conf file. kernel.randomize_va_space = 2','[{\"cis\": [\"1.6.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3524,'Configure ExecShield','Execshield is made up of a number of kernel features to provide protection against buffer overflow attacks. These features include prevention of execution in memory data space, and special handling of text buffers.','Enabling any feature that can protect against buffer overflow attacks enhances the security of the system.','','Add the following line to the /etc/sysctl.conf file. kernel.exec-shield = 1','[{\"cis\": [\"1.6.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3525,'Disable Prelink','Prelinking is a performance enhancing feature that decreases process start up time. It loads shared libraries into addresses for which the linking of required symbols has already been performed. After a binary has been prelinked, the addresses at which shared libraries is not changed, even if kernel.randomize_va_space is set to 1.','There is a bug in prelink that interferes with AIDE, the Linux file integrity checker. This has been fixed in RHEL6 (so prelink does not need to be disabled in RHEL6 systems).','','Edit /etc/sysconfig/prelink and set PRELINKING=no','[{\"cis\": [\"1.6.5\"]}]'),(3526,'Remove telnet-server','The telnet-server package contains the telnetd 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 and is included in most Red Hat Linux distributions.','','# yum erase telnet-server','[{\"cis\": [\"2.1.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3527,'Remove rsh-server','The Berkeley rsh-server ( rsh , rlogin , rcp ) package contains legacy services that exchange credentials in clear-text.','These legacy service contain numerous security exposures and have been replaced with the more secure SSH package.','','# yum erase rsh-server','[{\"cis\": [\"2.1.3\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3528,'Remove NIS Client','The Network Information Service (NIS), formerly known as Yellow Pages, is a client-server directory service protocol used to distribute system configuration files. The NIS client (ypbind) was used to bind a machine to an NIS server and receive the distributed configuration files','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.','','# yum erase ypbind','[{\"cis\": [\"2.1.5\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3529,'Remove NIS Server','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.','','# yum erase ypserv','[{\"cis\": [\"2.1.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3530,'Remove tftp-server','Trivial File Transfer Protocol (TFTP) is a simple file transfer protocol, typically used to automatically transfer configuration or boot machines from a boot server. The package tftp-server is the server package used to define and support a TFTP server.','TFTP does not support authentication nor does it ensure the confidentiality of 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.','','# yum erase tftp-server','[{\"cis\": [\"2.1.8\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3531,'Remove talk-server','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.','','# yum erase talk-server','[{\"cis\": [\"2.1.10\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3532,'Set Daemon umask','Set the default umask for all processes started at boot time. The settings in umask selectively turn off default permission when a file is created by a daemon process.','Setting the umask to 027 will make sure that files created by daemons will not be readable, writable or executable by any other than the group and owner of the daemon process and will not be writable by the group of the daemon process. The daemon process can manually override these settings if these files need additional permission.','','Add the following line to the /etc/sysconfig/init file. umask 027','[{\"cis\": [\"3.2\"]}]'),(3533,'Remove X Windows','The X Windows system provides a Graphical User Interface (GUI) where users can have multiple windows in which to run programs and various add on.','Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface.','','Edit /etc/inittab set default runlevel as follows: s/:5:/:3:/ Uninstall the X Windows System: # yum groupremove 'X Window System'','[{\"cis\": [\"3.3\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3534,'Disable Avahi Server','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.','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.','','# chkconfig avahi-daemon off In addition, edit the /etc/sysconfig/network file and remove zeroconf.','[{\"cis\": [\"3.1.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3535,'Disable NFS and RPC','The Network File 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.','','# chkconfig nfslock off; #chkconfig rpcgssd off; #chkconfig rpcidmapd off; # chkconfig portmap off;','[{\"cis\": [\"3.8\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3536,'Remove FTP Server','The File 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.','','# yum erase vsftpd','[{\"cis\": [\"3.10\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3537,'Remove HTTP Server','HTTP or web servers provide the ability to host web site content. The default HTTP server shipped with Red Hat Linux is Apache.','Unless there is a need to run the system as a web server, it is recommended that the package be deleted to reduce the potential attack surface.','','# yum erase httpd','[{\"cis\": [\"3.11\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3538,'Remove Dovecot','Dovecot 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.','','# yum erase dovecot','[{\"cis\": [\"3.12\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3539,'Remove Samba','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.','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.','','# yum erase samba','[{\"cis\": [\"3.13\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3540,'Remove HTTP Proxy Server','The default HTTP proxy package shipped with Red Hat Linux is squid.','If there is no need for a proxy server, it is recommended that the squid proxy be deleted to reduce the potential attack surface.','','# yum erase squid','[{\"cis\": [\"3.14\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3541,'Remove SNMP Server','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.','','# yum erase net-snmp','[{\"cis\": [\"3.15\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3542,'Disable IP Forwarding','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.','','Set the net.ipv4.ip_forward parameter to 0 in /etc/sysctl.conf and modify active kernel parameters to match:','[{\"cis\": [\"4.1.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3543,'Disable Send Packet Redirects','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.','','Set the net.ipv4.conf.all.send_redirects and net.ipv4.conf.default.send_redirects parameters to 0 in /etc/sysctl.conf','[{\"cis\": [\"4.1.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3544,'Disable Source Routed Packet Acceptance','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.','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.','','Set the net.ipv4.conf.all.accept_source_route and net.ipv4.conf.default.accept_source_route parameters to 0 in /etc/sysctl.conf and modify active kernel parameters to match.','[{\"cis\": [\"4.2.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3545,'Disable ICMP Redirect Acceptance','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.','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.','','Set the net.ipv4.conf.all.accept_redirects and net.ipv4.conf.default.accept_redirects parameters to 0 in /etc/sysctl.conf and modify active kernel parameters to match.','[{\"cis\": [\"4.2.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3546,'Disable Secure ICMP Redirect Acceptance','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.','','Set the net.ipv4.conf.all.secure_redirects and net.ipv4.conf.default.secure_redirects parameters to 0 in /etc/sysctl.conf and modify active kernel parameters to match.','[{\"cis\": [\"4.2.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3547,'Log Suspicious Packets','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.','','Set the net.ipv4.conf.all.log_martians and net.ipv4.conf.default.log_martians parameters to 1 in /etc/sysctl.conf and modify active kernel parameters to match.','[{\"cis\": [\"4.2.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3548,'Enable Ignore Broadcast Requests','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.','','Set the net.ipv4.icmp_echo_ignore_broadcasts parameter to 1 in /etc/sysctl.conf and modify active kernel parameters to match.','[{\"cis\": [\"4.2.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3549,'Enable Bad Error Message Protection','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.','','Set the net.ipv4.icmp_ignore_bogus_error_responses parameter to 1 in /etc/sysctl.conf and modify active kernel parameters to match.','[{\"cis\": [\"4.2.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3550,'Enable RFC-recommended Source Route Validation','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.','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.','','Set the net.ipv4.conf.all.rp_filter and net.ipv4.conf.default.rp_filter parameters to 1 in /etc/sysctl.conf and modify active kernel parameters to match.','[{\"cis\": [\"4.2.7\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3551,'Enable TCP SYN Cookies','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.','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.','','Set the net.ipv4.tcp_syncookies parameter to 1 in /etc/sysctl.conf: net.ipv4.tcp_syncookies=1 Modify active kernel parameters to match.','[{\"cis\": [\"4.2.8\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3552,'Set SSH Protocol to 2','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2','[{\"cis\": [\"6.2.1\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(3553,'Ensure SSH LogLevel is set to INFO','The INFO parameter specifies that login and logout activity will be logged.','SSH provides several logging levels with varying amounts of verbosity. DEBUG is specifically not recommended other than strictly for debugging SSH communications since it provides so much data that it is difficult to identify important security information.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel INFO','[{\"cis\": [\"5.2.3\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(3554,'Ensure SSH MaxAuthTries is set to 4 or less','The MaxAuthTries parameter specifies the maximum number of authentication attempts permitted per connection. When the login failure count reaches half the number, error messages will be written to the syslog file detailing the login failure.','Setting the MaxAuthTries parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. While the recommended setting is 4, set the number based on site policy.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4','[{\"cis\": [\"5.2.5\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(3555,'Set SSH IgnoreRhosts to Yes','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 .','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes','[{\"cis\": [\"6.2.6\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(3556,'Set SSH HostbasedAuthentication to No','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no','[{\"cis\": [\"6.2.7\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(3557,'Disable SSH Root Login','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','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no','[{\"cis\": [\"6.2.8\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(3558,'Set SSH PermitEmptyPasswords to No','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','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no','[{\"cis\": [\"6.2.9\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(3559,'Verify No UID 0 Accounts Exist Other Than root','Any account with UID 0 has superuser privileges on the system.','This access must be limited to only the default root account and only from the system console. Administrative access must be through an unprivileged account using an approved mechanism as noted in Item 7.5 Restrict root Login to System Console.','','Remove any users other than root with UID 0 or assign them a new UID if appropriate.','[{\"cis\": [\"9.2.5\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4000,'Ensure mounting of cramfs filesystems is disabled','The cramfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems. A cramfs image can be used without having to first decompress the image.','Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install cramfs /bin/true. Run the following command to unload the cramfs module: rmmod cramfs','[{\"cis\": [\"1.1.1.1\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(4001,'Ensure mounting of freevxfs filesystems is disabled','The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the primary filesystem type for HP-UX operating systems.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install freevxfs /bin/true. Run the following command to unload the freevxfs module: rmmod freevxfs','[{\"cis\": [\"1.1.1.2\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(4002,'Ensure mounting of jffs2 filesystems is disabled','The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install jffs2 /bin/true. Run the following command to unload the jffs2 module: rmmod jffs2','[{\"cis\": [\"1.1.1.3\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(4003,'Ensure mounting of hfs filesystems is disabled','The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS filesystems.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfs /bin/true. Run the following command to unload the hfs module: rmmod hfs','[{\"cis\": [\"1.1.1.4\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(4004,'Ensure mounting of hfsplus filesystems is disabled','The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfsplus /bin/true. Run the following command to unload the hfsplus module: rmmod hfsplus','[{\"cis\": [\"1.1.1.5\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(4005,'Ensure mounting of squashfs filesystems is disabled','The squashfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems (similar to cramfs ). A squashfs image can be used without having to first decompress the image.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install squashfs /bin/true. Run the following command to unload the squashfs module: rmmod squashfs','[{\"cis\": [\"1.1.1.6\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(4006,'Ensure mounting of udf filesystems is disabled','The udf filesystem type is the universal disk format used to implement ISO/IEC 13346 and ECMA-167 specifications. This is an open vendor filesystem type for data storage on a broad range of media. This filesystem type is necessary to support writing DVDs and newer optical disc formats.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install udf /bin/true. Run the following command to unload the udf module: rmmod udf','[{\"cis\": [\"1.1.1.7\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(4007,'Ensure mounting of FAT filesystems is disabled','The FAT filesystem format is primarily used on older windows systems and portable USB drives or flash modules. It comes in three types FAT12 , FAT16 , and FAT32 all of which are supported by the vfat kernel module.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install vfat /bin/true. Run the following command to unload the vfat module: rmmod vfat','[{\"cis\": [\"1.1.1.8\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(4008,'Ensure separate partition exists for /tmp','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /tmp. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4009,'Ensure nodev option set on /tmp partition','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.','','Edit the /etc/fstabfile and add nodev to the fourth field (mounting options) for the /tmp partition. See the fstab(5)manual page for more information. Run the following command to remount /tmp:# mount -o remount,nodev /tmp','[{\"cis\": [\"1.1.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4010,'Ensure nosuid option set on /tmp partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /tmp.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /tmp partition. See the fstab(5)manual page for more information. Run the following command to remount /tmp: # mount -o remount,nosuid /tmp','[{\"cis\": [\"1.1.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4011,'Ensure noexec option set on /tmp partition','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.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /tmp partition. See the fstab(5)manual page for more information. Run the following command to remount /tmp: # mount -o remount,noexec /tmp','[{\"cis\": [\"1.1.5\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4012,'Ensure separate partition exists for /var','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4013,'Ensure separate partition exists for /var/tmp','The /var/tmp directory is a world-writable directory used for temporary storage by all users and some applications.','Since the /var/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 /var/tmp its own file system allows an administrator to set the noexec option on the mount, making /var/tmp useless for an attacker to install executable code.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var/tmp. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.7\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4014,'Ensure nodev option set on /var/tmp partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the /var/tmp filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices in /var/tmp .','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information.','[{\"cis\": [\"1.1.8\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4015,'Ensure nosuid option set on /var/tmp partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /var/tmp.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information.','[{\"cis\": [\"1.1.9\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4016,'Ensure noexec option set on /var/tmp partition','The noexec mount option specifies that the filesystem cannot contain executable binaries.','Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /var/tmp.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information.','[{\"cis\": [\"1.1.10\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4017,'Ensure separate partition exists for /var/log','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var/log. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.11\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"2.2.4\", \"10.7\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4018,'Ensure separate partition exists for /var/log/audit','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.','','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, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.12\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"2.2.4\", \"10.7\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4019,'Ensure separate partition exists for /home','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /home. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4020,'Ensure nodev option set on /home partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the user partitions are not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /home partition. # mount -o remount,nodev /home','[{\"cis\": [\"1.1.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4021,'Ensure nodev option set on /dev/shm partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the /dev/shm filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create special devices in /dev/shm partitions.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /dev/shm partition. Run the following command to remount /dev/shm: # mount -o remount,nodev /dev/shm','[{\"cis\": [\"1.1.15\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4022,'Ensure nosuid option set on /dev/shm partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /dev/shm partition. Run the following command to remount /dev/shm: # mount -o remount,nosuid /dev/shm','[{\"cis\": [\"1.1.16\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4023,'Ensure noexec option set on /dev/shm partition','The noexec mount option specifies that the filesystem cannot contain executable binaries.','Setting this option on a file system prevents users from executing programs from shared memory. This deters users from introducing potentially malicious software on the system.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /dev/shm partition. Run the following command to remount /dev/shm: # mount -o remount,noexec /dev/shm','[{\"cis\": [\"1.1.17\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4024,'Disable Automounting','autofs allows automatic mounting of devices, typically including CD/DVDs and USB drives.','With automounting enabled anyone with physical access could attach a USB drive or disc and have its contents available in system even if they lacked permissions to mount it themselves.','','Run the following command to disable autofs: # chkconfig autofs off','[{\"cis\": [\"1.1.22\"]}, {\"cis_csc\": [\"8.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4025,'Ensure gpgcheck is globally activated','The gpgcheck option, found in the main section of the /etc/yum.conf and individual /etc/yum/repos.d/* files determines if an RPM package's signature is checked prior to its installation.','It is important to ensure that an RPM's package signature is always checked prior to installation to ensure that the software is obtained from a trusted source.','','Edit /etc/yum.conf and set ' gpgcheck=1 ' in the [main] section. Edit any failing files in /etc/yum.repos.d/* and set all instances of gpgcheck to ' 1 '.','[{\"cis\": [\"1.2.3\"]}, {\"cis_csc\": [\"4.5\"]}, {\"pci_dss\": [\"6.2\"]}, {\"nist_800_53\": [\"SI.2\", \"SA.11\", \"SI.4\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"A1.2\", \"CC6.8\"]}]'),(4026,'Disable the rhnsd Daemon','The rhnsd daemon polls the Red Hat Network web site for scheduled actions and, if there are, executes those actions.','Patch management policies may require that organizations test the impact of a patch before it is deployed in a production environment. Having patches automatically deployed could have a negative impact on the environment. It is best to not allow an action by default but only after appropriate consideration has been made. It is recommended that the service be disabled unless the risk is understood and accepted or you are running your own satellite . This item is not scored because organizations may have addressed the risk.','','Run the following command to disable rhnsd : # chkconfig rhnsd off','[{\"cis\": [\"1.2.5\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(4027,'Ensure AIDE is installed','AIDE takes a snapshot of filesystem state including modification times, permissions, and file hashes which can then be used to compare against the current state of the filesystem to detect modifications to the system.','By monitoring the filesystem state compromised files can be detected to prevent or limit the exposure of accidental or malicious misconfigurations or modified binaries.','','Run the following command to install aide: yum install aide // Configure AIDE as appropriate for your environment. Consult the AIDE documentation for options. Initialize AIDE: aide --init && mv /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz','[{\"cis\": [\"1.3.1\"]}, {\"cis_csc\": [\"3.5\"]}, {\"pci_dss\": [\"11.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4028,'Ensure filesystem integrity is regularly checked','Periodic checking of the filesystem integrity is needed to detect changes to the filesystem.','Periodic file checking allows the system administrator to determine on a regular basis if critical files have been changed in an unauthorized fashion.','','Run the following command: crontab -u root -e // Add the following line to the crontab: 0 5 * * * /usr/sbin/aide --check // Notes: The checking in this recommendation occurs every day at 5am. Alter the frequency and time of the checks in compliance with site policy. ','[{\"cis\": [\"1.3.2\"]}, {\"cis_csc\": [\"3.5\"]}, {\"pci_dss\": [\"11.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4029,'Ensure permissions on bootloader config are configured','The grub configuration file contains information on boot settings and passwords for unlocking boot options. The grub configuration is usually located at /boot/grub/grub.conf and linked as /boot/grub/menu.lst and /etc/grub.conf .','Setting the permissions to read and write for root only prevents non-root users from seeing the boot parameters or changing them. Non-root users who read the boot parameters may be able to identify weaknesses in security upon boot and be able to exploit them.','','Run the following commands to set permissions on your grub configuration: # chown root:root /boot/grub/grub.conf # chmod og-rwx /boot/grub/grub.conf','[{\"cis\": [\"1.4.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4030,'Ensure bootloader password is set','Setting the boot loader password will require that anyone rebooting the system must enter a password before being able to set command line boot parameters.','Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off SELinux at boot time).','','Create an encrypted password with grub-md5-crypt: # grub-md5-crypt Password: <password> Retype Password: <password> <encrypted-password> Copy and paste the <encrypted-password> into the global section of /boot/grub/grub.conf : password --md5 <encrypted-password>','[{\"cis\": [\"1.4.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4031,'Ensure authentication required for single user mode','Single user mode is used for recovery when the system detects an issue during boot or by manual selection from the bootloader.','Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials.','','Edit /etc/sysconfig/init and set SINGLE to ' /sbin/sulogin': SINGLE=/sbin/sulogin','[{\"cis\": [\"1.4.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4032,'Ensure interactive boot is not enabled','Interactive boot allows console users to interactively select which services start on boot. The PROMPT option provides console users the ability to interactively boot the system and select which services to start on boot . ','Turn off the PROMPT option on the console to prevent console users from potentially overriding established security settings. ','','Edit the /etc/sysconfig/init file and set PROMPT to ' no ': PROMPT=no','[{\"cis\": [\"1.4.4\"]}, {\"cis_csc\": [\"5.1\"]}]'),(4033,'Ensure core dumps are restricted','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.','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). In addition, setting the fs.suid_dumpable variable to 0 will prevent setuid programs from dumping core.','','Add the following line to /etc/security/limits.conf or a /etc/security/limits.d/* file: * hard core 0. Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: fs.suid_dumpable = 0 and Run the following command to set the active kernel parameter: # sysctl -w fs.suid_dumpable=0','[{\"cis\": [\"1.5.1\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4034,'Ensure XD/NX support is enabled','Recent processors in the x86 family support the ability to prevent code execution on a per memory page basis. Generically and on AMD processors, this ability is called No Execute (NX), while on Intel processors it is called Execute Disable (XD). This ability can help prevent exploitation of buffer overflow vulnerabilities and should be activated whenever possible. Extra steps must be taken to ensure that this protection is enabled, particularly on 32-bit x86 systems. Other processors, such as Itanium and POWER, have included such support since inception and the standard kernel for those platforms supports the feature.','Enabling any feature that can protect against buffer overflow attacks enhances the security of the system.','','On 32 bit systems install a kernel with PAE support, no installation is required on 64 bit systems: If necessary configure your bootloader to load the new kernel and reboot the system. You may need to enable NX or XD support in your bios.','[{\"cis\": [\"1.5.2\"]}, {\"cis_csc\": [\"8.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4035,'Ensure address space layout randomization (ASLR) is enabled','Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process.','Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: kernel.randomize_va_space = 2. Run the following command to set the active kernel parameter: # sysctl -w kernel.randomize_va_space=2','[{\"cis\": [\"1.5.3\"]}, {\"cis_csc\": [\"8.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4036,'Ensure prelink is disabled','prelink is a program that modifies ELF shared libraries and ELF dynamically linked binaries in such a way that the time needed for the dynamic linker to perform relocations at startup significantly decreases.','The prelinking feature can interfere with the operation of AIDE, because it changes binaries. Prelinking can also increase the vulnerability of the system if a malicious user is able to compromise a common library such as libc.','','Run the following commands to restore binaries to normal and uninstall prelink: prelink -ua && yum remove prelink','[{\"cis\": [\"1.5.4\"]}, {\"cis_csc\": [\"3.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4037,'Ensure SELinux is not disabled in bootloader configuration','Configure SELINUX to be enabled at boot time and verify that it has not been overwritten by the grub boot parameters.','SELinux must be enabled at boot time in your grub configuration to ensure that the controls it provides are not overridden.','','Edit /boot/grub/grub.conf and remove all instances of selinux=0 and enforcing=0 on all kernel lines','[{\"cis\": [\"1.6.1.1\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4038,'Ensure the SELinux state is enforcing','Set SELinux to enable when the system is booted.','SELinux must be enabled at boot time in to ensure that the controls it provides are in effect at all times.','','Edit the /etc/selinux/config file to set the SELINUX parameter: SELINUX=enforcing','[{\"cis\": [\"1.6.1.2\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4039,'Ensure SELinux policy is configured','Configure SELinux to meet or exceed the default targeted policy, which constrains daemons and system software only.','Security configuration requirements vary from site to site. Some sites may mandate a policy that is stricter than the default policy, which is perfectly acceptable. This item is intended to ensure that at least the default recommendations are met.','','Edit the /etc/selinux/config file to set the SELINUXTYPE parameter: SELINUXTYPE=targeted','[{\"cis\": [\"1.6.1.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4040,'Ensure SETroubleshoot is not installed','The SETroubleshoot service notifies desktop users of SELinux denials through a user-friendly interface. The service provides important information around configuration errors, unauthorized intrusions, and other potential errors.','The SETroubleshoot service is an unnecessary daemon to have running on a server, especially if X Windows is disabled.','','Run the following command to uninstall setroubleshoot: # yum remove setroubleshoot','[{\"cis\": [\"1.6.1.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4041,'Ensure the MCS Translation Service (mcstrans) is not installed','The mcstransd daemon provides category label information to client processes requesting information. The label translations are defined in /etc/selinux/targeted/setrans.conf','Since this service is not used very often, remove it to reduce the amount of potentially vulnerable code running on the system.','','Run the following command to uninstall mcstrans: # yum remove mcstrans','[{\"cis\": [\"1.6.1.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4042,'Ensure no unconfined daemons exist','Daemons that are not defined in SELinux policy will inherit the security context of their parent process.','Since daemons are launched and descend from the init process, they will inherit the security context label initrc_t . This could cause the unintended consequence of giving the process more permission than it requires.','','Investigate any unconfined daemons found during the audit action. They may need to have an existing security context assigned to them or a policy built for them.','[{\"cis\": [\"1.6.1.6\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4043,'Ensure SELinux is installed','SELinux provides Mandatory Access Controls.','Without a Mandatory Access Control system installed only the default Discretionary Access Control system will be available.','','Run the following command to install libselinux: yum install libselinux','[{\"cis\": [\"1.6.2\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4044,'Ensure message of the day is configured properly','The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/motd file with the appropriate contents according to your site policy, remove any instances of m , , s , or v.','[{\"cis\": [\"1.7.1.1\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(4045,'Ensure local login warning banner is configured properly','The contents of the /etc/issue file are displayed to users prior to login for local terminals. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/issue file with the appropriate contents according to your site policy, remove any instances of m , , s , or v: # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue','[{\"cis\": [\"1.7.1.2\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(4046,'Ensure remote login warning banner is configured properly','The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/issue.net file with the appropriate contents according to your site policy, remove any instances of m , , s , or v: # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue.net','[{\"cis\": [\"1.7.1.3\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(4047,'Ensure permissions on /etc/motd are configured','The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users.','If the /etc/motd file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/motd: # chown root:root /etc/motd # chmod 644 /etc/motd','[{\"cis\": [\"1.7.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4048,'Ensure permissions on /etc/issue are configured','The contents of the /etc/issue file are displayed to users prior to login for local terminals.','If the /etc/issue file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/issue: # chown root:root /etc/issue # chmod 644 /etc/issue','[{\"cis\": [\"1.7.1.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4049,'Ensure permissions on /etc/issue.net are configured','The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services.','If the /etc/issue.net file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/issue.net: # chown root:root /etc/issue.net # chmod 644 /etc/issue.net','[{\"cis\": [\"1.7.1.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4050,'Ensure GDM login banner is configured','GDM is the GNOME Display Manager which handles graphical login for GNOME based systems.','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place.','','Create the /etc/dconf/profile/gdm file with the following contents: user-db:user system-db:gdm file-db:/usr/share/gdm/greeter-dconf-defaults || Create or edit the banner-message-enable and banner-message-text options in /etc/dconf/db/gdm.d/01-banner-message : [org/gnome/login-screen] banner-message-enable=true banner-message-text='Authorized uses only. All activity may be monitored and reported.' || Run the following command to update the system databases: dconf update','[{\"cis\": [\"1.7.2\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(4051,'Ensure updates, patches, and additional security software are installed','Periodically patches are released for included software either due to security flaws or to include additional functionality.','Newer patches may contain security enhancements that would not be available through the latest full update. As a result, it is recommended that the latest software patches be used to take advantage of the latest functionality. As with any software installation, organizations need to determine if a given update meets their requirements and verify the compatibility and supportability of any additional software against the update revision that is selected.','','Site policy may mandate a testing period before install onto production systems for available updates. The audit and remediation here only cover security updates. Non-security updates can be audited with and comparing against site policy: # yum check-update','[{\"cis\": [\"1.8\"]}, {\"cis_csc\": [\"4.5\"]}, {\"pci_dss\": [\"5.2\"]}, {\"nist_800_53\": [\"AU.6\", \"SI.4\"]}, {\"gpg_13\": [\"4.2\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"A1.2\"]}]'),(4052,'Ensure chargen services are not enabled','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.','','Run the following commands to disable chargen-dgram and chargen-stream: # chkconfig chargen-dgram off; # chkconfig chargen-stream off','[{\"cis\": [\"2.1.1\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4053,'Ensure daytime services are not enabled','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.','','Run the following commands to disable daytime-dgram and daytime-stream: # chkconfig daytime-dgram off; # chkconfig daytime-stream off','[{\"cis\": [\"2.1.2\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4054,'Ensure discard services are not enabled','discardis 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.','','Run the following commands to disable discard-dgram and discard-stream: # chkconfig discard-dgram off; # chkconfig discard-stream off','[{\"cis\": [\"2.1.3\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4055,'Ensure echo services are not enabled','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.','','Run the following commands to disable echo-dgram and echo-stream: # chkconfig echo-dgram off; # chkconfig echo-stream off','[{\"cis\": [\"2.1.4\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4056,'Ensure time services are not enabled','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.','','Run the following commands to disable time-dgram and time-stream: # chkconfig time-dgram off; # chkconfig time-stream off','[{\"cis\": [\"2.1.5\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4057,'Ensure rsh server is not enabled','The Berkeley rsh-server ( rsh , rlogin , rexec ) package contains legacy services that exchange credentials in clear-text.','These legacy services contain numerous security exposures and have been replaced with the more secure SSH package.','','Run the following commands to disable rsh, rlogin, and rexec: # chkconfig rsh off # chkconfig rlogin off # chkconfig rexec off','[{\"cis\": [\"2.1.6\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4058,'Ensure talk server is not enabled','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.','','Run the following command to disable talk: # chkconfig talk off','[{\"cis\": [\"2.1.7\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4059,'Ensure telnet server is not enabled','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.','','Run the following command to disable telnet: # chkconfig telnet off','[{\"cis\": [\"2.1.8\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4060,'Ensure tftp server is not enabled','Trivial File Transfer Protocol (TFTP) is a simple file transfer protocol, typically used to automatically transfer configuration or boot machines from a boot server. The package tftp-server is 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.','','Run the following command to disable tftp: # chkconfig tftp off','[{\"cis\": [\"2.1.9\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\", \"AC.4\", \"SC.7\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4061,'Ensure rsync service is not enabled','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.','','Run the following command to disable rsync: # chkconfig rsyncd off','[{\"cis\": [\"2.1.10\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4062,'Ensure xinetd is not enabled','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.','','Run the following command to disable xinetd: # chkconfig xinetd off','[{\"cis\": [\"2.1.11\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4063,'Ensure time synchronization is in use','System time should be synchronized between all systems in an environment. This is typically done by establishing an authoritative time server or set of servers and having all systems synchronize their clocks to them.','Time synchronization is important to support time sensitive security mechanisms like Kerberos and also ensures log files have consistent time records across the enterprise, which aids in forensic investigations.','','On physical systems or virtual systems where host based time synchronization is not available run the following commands and verify either ntp or chrony is installed: # rpm -q ntp # rpm -q chrony On virtual systems where host based time synchronization is available consult your virtualization software documentation and verify that host based synchronization is in use.','[{\"cis\": [\"2.2.2.1\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"10.4\"]}, {\"nist_800_53\": [\"AU.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4064,'Ensure ntp is configured','ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at https://www.ntp.org. ntp can be configured to be a client and/or a server.','If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly.','','1) Add or edit restrict lines in /etc/ntp.conf to match the following: - restrict -4 default kod nomodify notrap nopeer noquery and - restrict -4 default kod nomodify notrap nopeer noquery. 2) Add or edit server or pool lines to /etc/ntp.conf as appropriate: server <remote-server>. 3) Add or edit the OPTIONS in /etc/sysconfig/ntpd to include ' -u ntp:ntp ': - OPTIONS='-u ntp:ntp'','[{\"cis\": [\"2.2.1.2\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4065,'Ensure chrony is configured','chrony is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at https://www.ntp.org. ntp can be configured to be a client and/or a server.','If chrony is in use on the system proper configuration is vital to ensuring time synchronization is working properly.','','1) Add or edit restrict lines in /etc/chrony.conf to match the following: - 1) Add or edit server or pool lines to /etc/chrony.conf as appropriate: server <remote-server>. 3) Add or edit the OPTIONS in /etc/sysconfig/chronyd to include: - OPTIONS='-u chronyd'','[{\"cis\": [\"2.2.1.3\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4066,'Ensure X Window System is not installed','The X Window System provides a Graphical User Interface (GUI) where users can have multiple windows in which to run programs and various add on. The X Windows system is typically used on workstations where users login, but not on servers where users typically do not login.','Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface.','','Run the following command to remove the X Windows System packages: # yum remove xorg-x11*','[{\"cis\": [\"2.2.2\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4067,'Ensure Avahi Server is not enabled','Avahi is a free zeroconf implementation, including a system for multicast DNS/DNS-SD service discovery. Avahi allows programs to publish and discover services and hosts running on a local network with no specific configuration. For example, a user can plug a computer into a network and Avahi automatically finds printers to print to, files to look at and people to talk to, as well as network services running on the machine.','Automatic discovery of network services is not normally required for system functionality. It is recommended to disable the service to reduce the potential attack surface.','','Run the following command to disable avahi-daemon: # chkconfig avahi-daemon off','[{\"cis\": [\"2.2.3\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4068,'Ensure CUPS is not enabled','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.','','Run the following command to disable cups : # chkconfig cups off','[{\"cis\": [\"2.2.4\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4069,'Ensure DHCP Server is not enabled','The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses.','Unless a system is specifically set up to act as a DHCP server, it is recommended that this service be disabled to reduce the potential attack surface.','','Run the following command to disable dhcpd: # chkconfig dhcpd off','[{\"cis\": [\"2.2.5\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4070,'Ensure LDAP Server is not enabled','The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.','If the system will not need to act as an LDAP server, it is recommended that the software be disabled to reduce the potential attack surface.','','Run the following command to disable slapd: # chkconfig slapd off','[{\"cis\": [\"2.2.6\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4071,'Ensure NFS and RPC are not enabled','The Network File System (NFS) is one of the first and most widely distributed file systems in the UNIX environment. It provides the ability for systems to mount file systems of other servers through the network.','If the system does not export NFS shares or act as an NFS client, it is recommended that these services be disabled to reduce remote attack surface.','','Run the following commands to disable nfs, nfs-server and rpcbind: # chkconfig nfs off; # chkconfig rpcbind off','[{\"cis\": [\"2.2.7\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4072,'Ensure DNS Server is not enabled','The Domain Name System (DNS) is a hierarchical naming system that maps names to IP addresses for computers, services and other resources connected to a network.','Unless a system is specifically designated to act as a DNS server, it is recommended that the service be disabled to reduce the potential attack surface.','','Run the following command to disable named : # chkconfig named off','[{\"cis\": [\"2.2.8\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4073,'Ensure FTP Server is not enabled','The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files.','FTP does not protect the confidentiality of data or authentication credentials. It is recommended sftp be used if file transfer is required. Unless there is a need to run the system as a FTP server (for example, to allow anonymous downloads), it is recommended that the service be disabled to reduce the potential attack surface.','','Run the following command to disable vsftpd: # chkconfig vsftpd off','[{\"cis\": [\"2.2.9\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4074,'Ensure HTTP server is not enabled','HTTP or web servers provide the ability to host web site content.','Unless there is a need to run the system as a web server, it is recommended that the service be disabled to reduce the potential attack surface.','','Run the following command to disable httpd: # chkconfig httpd off','[{\"cis\": [\"2.2.10\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4075,'Ensure IMAP and POP3 server is not enabled','dovecot is an open source IMAP and POP3 server for Linux based systems.','Unless POP3 and/or IMAP servers are to be provided by this system, it is recommended that the service be disabled to reduce the potential attack surface.','','Run the following command to disable dovecot: # chkconfig dovecot off','[{\"cis\": [\"2.2.11\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4076,'Ensure Samba is not enabled','The Samba daemon allows system administrators to configure their Linux systems to share file systems and directories with Windows desktops. Samba will advertise the file systems and directories via the Small Message Block (SMB) protocol. Windows desktop users will be able to mount these directories and file systems as letter drives on their systems.','If there is no need to mount directories and file systems to Windows systems, then this service can be disabled to reduce the potential attack surface.','','Run the following command to disable smb: # chkconfig smb off','[{\"cis\": [\"2.2.12\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4077,'Ensure HTTP Proxy Server is not enabled','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 disabled to reduce the potential attack surface.','','Run the following command to disable squid: # chkconfig squid off','[{\"cis\": [\"2.2.13\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4078,'Ensure SNMP Server is not enabled','The Simple Network Management Protocol (SNMP) server is used to listen for SNMP commands from an SNMP management system, execute the commands or collect the information and then send results back to the requesting system.','The SNMP server can communicate using SNMP v1, which transmits data in the clear and does not require authentication to execute commands. Unless absolutely necessary, it is recommended that the SNMP service not be used. If SNMP is required the server should be configured to disallow SNMP v1.','','Run the following command to disable snmpd: # chkconfig snmpd off','[{\"cis\": [\"2.2.14\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4079,'Ensure mail transfer agent is configured for local-only mode','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.','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.','','Edit /etc/postfix/main.cf and add the following line to the RECEIVING MAIL section. If the line already exists, change it to look like the line below: inet_interfaces = loopback-only Restart postfix: # service postfix restart','[{\"cis\": [\"2.2.15\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AC.4\", \"SC.7\"]}, {\"tsc\": [\"CC5.2\", \"CC6.4\", \"CC6.6\", \"CC6.7\"]}]'),(4080,'Ensure NIS Server is not enabled','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','','Run the following command to disable ypserv: # chkconfig ypserv off','[{\"cis\": [\"2.2.16\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4081,'Ensure NIS Client is not installed','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.','','Run the following command to uninstall ypbind: # yum remove ypbind','[{\"cis\": [\"2.3.1\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4082,'Ensure rsh client is not installed','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 .','','Run the following command to uninstall rsh : # yum remove rsh','[{\"cis\": [\"2.3.2\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4083,'Ensure talk client is not installed','The talk software makes it possible for users to send and receive messages across systems through a terminal session. The talk client, which allows initialization of talk sessions, is installed by default.','The software presents a security risk as it uses unencrypted protocols for communication.','','Run the following command to uninstall talk : # yum remove talk','[{\"cis\": [\"2.3.3\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4084,'Ensure telnet client is not installed','The telnet package contains the telnet client, which allows users to start connections to other systems via the telnet protocol.','The telnet protocol is insecure and unencrypted. The use of an unencrypted transmission medium could allow an unauthorized user to steal credentials. The ssh package provides an encrypted session and stronger security and is included in most Linux distributions.','','Run the following command to uninstall telnet : # yum remove telnet','[{\"cis\": [\"2.3.4\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4085,'Ensure LDAP client is not installed','The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.','If the system will not need to act as an LDAP client, it is recommended that the software be removed to reduce the potential attack surface.','','Run the following command to uninstall openldap-clients : # yum remove openldap-clients','[{\"cis\": [\"2.3.5\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4086,'Ensure IP forwarding is disabled','The net.ipv4.ip_forward flag is used to tell the system whether it can forward packets or not.','Setting the flag to 0 ensures that a system with multiple interfaces (for example, a hard proxy), will never be able to forward packets, and therefore, never serve as a router.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.ip_forward = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.ip_forward=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.1.1\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4087,'Ensure packet redirect sending is disabled','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.send_redirects = 0; net.ipv4.conf.default.send_redirects = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.send_redirects=0; # sysctl -w net.ipv4.conf.default.send_redirects=0; # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.1.2\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4088,'Ensure source routed packets are not accepted','In networking, source routing allows a sender to partially or fully specify the route packets take through a network. In contrast, non-source routed packets travel a path determined by routers in the network. In some cases, systems may not be routable or reachable from some locations (e.g. private addresses vs. Internet routable), and so source routed packets would need to be used.','Setting net.ipv4.conf.all.accept_source_route and net.ipv4.conf.default.accept_source_route to 0 disables the system from accepting source routed packets. Assume this system was capable of routing packets to Internet routable addresses on one interface and private addresses on another interface. Assume that the private addresses were not routable to the Internet routable addresses and vice versa. Under normal routing circumstances, an attacker from the Internet routable addresses could not use the system as a way to reach the private address systems. If, however, source routed packets were allowed, they could be used to gain access to the private address systems as the route could be specified, rather than rely on routing protocols that did not allow this routing.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_source_route = 0; net.ipv4.conf.default.accept_source_route = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_source_route=0 # sysctl -w net.ipv4.conf.default.accept_source_route=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.1\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4089,'Ensure ICMP redirects are not accepted','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.','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_redirects = 0; net.ipv4.conf.default.accept_redirects = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_redirects=0 # sysctl -w net.ipv4.conf.default.accept_redirects=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.2\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4090,'Ensure secure ICMP redirects are not accepted','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.secure_redirects = 0; net.ipv4.conf.default.secure_redirects = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.secure_redirects=0 # sysctl -w net.ipv4.conf.default.secure_redirects=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.3\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4091,'Ensure suspicious packets are logged','When enabled, this feature logs packets with un-routable source addresses to the kernel log.','Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.log_martians = 1; net.ipv4.conf.default.log_martians = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.log_martians=1 # sysctl -w net.ipv4.conf.default.log_martians=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.4\"]}, {\"cis_csc\": [\"6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4092,'Ensure broadcast ICMP requests are ignored','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.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_echo_ignore_broadcasts = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.5\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4093,'Ensure bogus ICMP responses are ignored','Setting icmp_ignore_bogus_error_responses to 1 prevents the kernel from logging bogus responses (RFC-1122 non-compliant) from broadcast reframes, keeping file systems from filling up with useless log messages.','Some routers (and some attackers) will send responses that violate RFC-1122 and attempt to fill up a log file system with many useless error messages.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_ignore_bogus_error_responses = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.6\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4094,'Ensure Reverse Path Filtering is enabled','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 would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your system, you will not be able to enable this feature without breaking the routing.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.rp_filter = 1; net.ipv4.conf.default.rp_filter = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.rp_filter=1 # sysctl -w net.ipv4.conf.default.rp_filter=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.7\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4095,'Ensure TCP SYN Cookies is enabled','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.','Attackers use SYN flood attacks to perform a denial of service attacked on a system by sending many SYN packets without completing the three way handshake. This will quickly use up slots in the kernel's half-open connection queue and prevent legitimate connections from succeeding. SYN cookies allow the system to keep accepting valid connections, even if under a denial of service attack.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.tcp_syncookies = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.tcp_syncookies=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.8\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4096,'Ensure IPv6 router advertisements are not accepted','This setting disables the system's ability to accept IPv6 router advertisements.','It is recommended that systems not accept router advertisements as they could be tricked into routing traffic to compromised machines. Setting hard routes within the system (usually a single default route to a trusted router) protects the system from bad routes.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_ra = 0 and net.ipv6.conf.default.accept_ra = 0 Then, run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_ra=0 # sysctl -w net.ipv6.conf.default.accept_ra=0 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.3.1\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4097,'Ensure IPv6 redirects are not accepted','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_redirects = 0 || net.ipv6.conf.default.accept_redirects = 0 Then, run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_redirects=0 # sysctl -w net.ipv6.conf.default.accept_redirects=0 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.3.2\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4098,'Ensure IPv6 is disabled','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.','','Edit /boot/grub/grub.conf to include ipv6.disable=1 on all kernel lines.','[{\"cis\": [\"3.3.3\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4099,'Ensure TCP Wrappers is installed','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.','','Run the following command to install tcp_wrappers: yum install tcp_wrappers','[{\"cis\": [\"3.4.1\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(4100,'Ensure /etc/hosts.deny is configured','The /etc/hosts.deny file specifies which IP addresses are not permitted to connect to the host. It is intended to be used in conjunction with the /etc/hosts.allow file.','The /etc/hosts.allow file supports access control by IP and helps ensure that only authorized systems can connect to the system.','','Run the following command to create /etc/hosts.deny: echo 'ALL: ALL' >> /etc/hosts.deny','[{\"cis\": [\"3.4.3\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(4101,'Ensure permissions on /etc/hosts.allow are configured.','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.','','Run the following commands to set permissions on /etc/hosts.allow : chown root:root /etc/hosts.allow and chmod 644 /etc/hosts.allow','[{\"cis\": [\"3.4.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(4102,'Ensure permissions on /etc/hosts.deny are configured.','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.','','Run the following commands to set permissions on /etc/hosts.deny : chown root:root /etc/hosts.deny and chmod 644 /etc/hosts.deny','[{\"cis\": [\"3.4.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4103,'Ensure DCCP is disabled','The Datagram Congestion Control Protocol (DCCP) is a transport layer protocol that supports streaming media and telephony. DCCP provides a way to gain access to congestion control, without having to do it at the application layer, but does not provide in-sequence delivery.','If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install dccp /bin/true','[{\"cis\": [\"3.5.1\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4104,'Ensure SCTP is disabled','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.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install sctp /bin/true','[{\"cis\": [\"3.5.2\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4105,'Ensure RDS is disabled','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.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install rds /bin/true','[{\"cis\": [\"3.5.3\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4106,'Ensure TIPC is disabled','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.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install tipc /bin/true','[{\"cis\": [\"3.5.4\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4107,'Ensure iptables is installed','iptables allows configuration of the IPv4 tables in the linux kernel and the rules stored within them. Most firewall configuration utilities operate as a front end to iptables .','iptables is required for firewall management and configuration.','','Run the following command to install iptables : yum install iptables','[{\"cis\": [\"3.6.1\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.1\"]}]'),(4108,'Ensure default deny firewall policy','A default deny all policy on connections ensures that any unconfigured network usage will be rejected.','With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following commands to implement a default DROP policy: iptables -P INPUT DROP; iptables -P OUTPUT DROP and iptables -P FORWARD DROP','[{\"cis\": [\"3.6.2\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4109,'Ensure loopback traffic is configured','Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (127.0.0.0/8).','Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (127.0.0.0/8) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.','','Run the following commands to implement the loopback rules: # iptables -A INPUT -i lo -j ACCEPT # iptables -A OUTPUT -o lo -j ACCEPT # iptables -A INPUT -s 127.0.0.0/8 -j DROP','[{\"cis\": [\"3.6.3\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4110,'Ensure audit log storage size is configured','Configure the maximum size of the audit log file. Once the log reaches the maximum size, it will be rotated and a new log file will be started.','It is important that an appropriate size is determined for log files so that they do not impact the system and audit data is not lost.','','Set the following parameter in /etc/audit/auditd.conf in accordance with site policy: max_log_file = <MB>','[{\"cis\": [\"4.1.1.1\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"10.7\"]}]'),(4111,'Ensure system is disabled when audit logs are full','The auditd daemon can be configured to halt the system when the audit logs are full.','In high security contexts, the risk of detecting unauthorized access or nonrepudiation exceeds the benefit of the system's availability.','','Set the following parameters in /etc/audit/auditd.conf: space_left_action = email action_mail_acct = root admin_space_left_action = halt','[{\"cis\": [\"4.1.1.2\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"10.7\"]}]'),(4112,'Ensure audit logs are not automatically deleted','The max_log_file_action setting determines how to handle the audit log file reaching the max file size. A value of keep_logs will rotate the logs but never delete old logs.','In high security contexts, the benefits of maintaining a long audit history exceed the cost of storing the audit history.','','Set the following parameter in /etc/audit/auditd.conf: max_log_file_action = keep_logs','[{\"cis\": [\"4.1.1.3\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"10.7\"]}]'),(4113,'Ensure auditd service is enabled','Turn on the auditd daemon to record system events.','The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring.','','Run the following command to enable auditd : # chkconfig auditd on','[{\"cis\": [\"4.1.2\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.1\", \"10.7\"]}, {\"tsc\": [\"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4114,'Ensure auditing for processes that start prior to auditd is enabled','Configure grub so that processes that are capable of being audited can be audited even if they start up prior to auditd startup.','Audit events need to be captured on processes that start up prior to auditd, so that potential malicious activity cannot go undetected.','','Edit /boot/grub/grub.conf to include audit=1 on all kernel lines. Notes: This recommendation is designed around the grub bootloader, if LILO or another bootloader is in use in your environment enact equivalent settings.','[{\"cis\": [\"4.1.3\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.2.6\", \"10.7\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"35.7.d\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4115,'Ensure events that modify date and time information are collected','Capture events where the system date and/or time has been modified. The parameters in this section are set to determine if the adjtimex (tune kernel clock), settimeofday (Set time, using timeval and timezone structures) stime (using seconds since 1/1/1970) or clock_settime (allows for the setting of several internal clocks and timers) system calls have been executed and always write an audit record to the /var/log/audit.log file upon exit, tagging the records with the identifier "time-change".','Unexpected changes in system date and/or time could be a sign of malicious activity on the system.','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change -a always,exit -F arch=b32 -S clock_settime -k time-change -w /etc/localtime -p wa -k time-change For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change -a always,exit -F arch=b64 -S clock_settime -k time-change -a always,exit -Farch=b32 -S clock_settime -k time-change -w /etc/localtime -p wa -k time-change','[{\"cis\": [\"4.1.4\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.4.2\", \"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4116,'Ensure events that modify user/group information are collected','Record events affecting the group , passwd (user IDs), shadow and gshadow (passwords) or /etc/security/opasswd (old passwords, based on remember parameter in the PAM configuration) files. The parameters in this section will watch the files to see if they have been opened for write or have had attribute changes (e.g. permissions) and tag them with the identifier "identity" in the audit log file.','Unexpected changes to these files could be an indication that the system has been compromised and that an unauthorized user is attempting to hide their activities or compromise additional accounts.','','Add the following lines to the /etc/audit/audit.rules file: -w /etc/group -p wa -k identity -w /etc/passwd -p wa -k identity -w /etc/gshadow -p wa -k identity -w /etc/shadow -p wa -k identity -w /etc/security/opasswd -p wa -k identity','[{\"cis\": [\"4.1.5\"]}, {\"cis_csc\": [\"5.4\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4117,'Ensure events that modify the system's network environment are collected','Record changes to network environment files or system calls. The below parameters monitor the sethostname (set the systems host name) or setdomainname (set the systems domainname) system calls, and write an audit event on system call exit. The other parameters monitor the /etc/issue and /etc/issue.net files (messages displayed pre-login), /etc/hosts (file containing host names and associated IP addresses), /etc/sysconfig/network file and /etc/sysconfig/network-scripts/ directory (containing network interface scripts and configurations).','Monitoring sethostname and setdomainname will identify potential unauthorized changes to host and domainname of a system. The changing of these names could potentially break security parameters that are set based on those names. The /etc/hosts file is monitored for changes in the file that can indicate an unauthorized intruder is trying to change machine associations with IP addresses and trick users and processes into connecting to unintended machines. Monitoring /etc/issue and /etc/issue.net is important, as intruders could put disinformation into those files and trick users into providing information to the intruder. Monitoring /etc/sysconfig/network and /etc/sysconfig/network-scripts/ is important as it can show if network interfaces or scripts are being modified in a way that can lead to the machine becoming unavailable or compromised. All audit records will be tagged with the identifier "system-locale."','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S sethostname -S setdomainname -k system-locale -w /etc/issue -p wa -k system-locale -w /etc/issue.net -p wa -k system-locale -w /etc/hosts -p wa -k system-locale -w /etc/sysconfig/network -p wa -k system-locale -w /etc/sysconfig/network-scripts/ -p wa -k system-locale For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S sethostname -S setdomainname -k system-locale -a always,exit -F arch=b32 -S sethostname -S setdomainname -k system-locale -w /etc/issue -p wa -k system-locale -w /etc/issue.net -p wa -k system-locale -w /etc/hosts -p wa -k system-locale -w /etc/sysconfig/network -p wa -k system-locale -w /etc/sysconfig/network-scripts/ -p wa -k system-locale','[{\"cis\": [\"4.1.6\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4118,'Ensure events that modify the system's Mandatory Access Controls are collected','Monitor SELinux mandatory access controls. The parameters below monitor any write access (potential additional, deletion or modification of files in the directory) or attribute changes to the /etc/selinux or directory.','Changes to files in these directories could indicate that an unauthorized user is attempting to modify access controls and change security contexts, leading to a compromise of the system.','','Add the following lines to the /etc/audit/audit.rules file: -w /etc/selinux/ -p wa -k MAC-policy -w /usr/share/selinux/ -p wa -k MAC-policy','[{\"cis\": [\"4.1.7\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4119,'Ensure login and logout events are collected','Monitor login and logout events. The parameters below track changes to files associated with login/logout events. The file /var/log/lastlog maintain records of the last time a user successfully logged in. The /var/run/failock directory maintains records of login failures via the pam_faillock module.','Monitoring login/logout events could provide a system administrator with information associated with brute force attacks against user logins.','','Add the following lines to the /etc/audit/audit.rules file: -w /var/log/lastlog -p wa -k logins -w /var/run/faillock/ -p wa -k logins','[{\"cis\": [\"4.1.8\"]}, {\"cis_csc\": [\"5.5\", \"16.10\", \"16.4\"]}, {\"pci_dss\": [\"10.2.1\", \"10.2.4\", \"10.3\"]}, {\"nist_800_53\": [\"AC.7\", \"AU.14\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4120,'Ensure session initiation information is collected','Monitor session initiation events. The parameters in this section track changes to the files associated with session events. The file /var/run/utmp file tracks all currently logged in users. All audit records will be tagged with the identifier "session." The /var/log/wtmp file tracks logins, logouts, shutdown, and reboot events. The file /var/log/btmp keeps track of failed login attempts and can be read by entering the command /usr/bin/last -f /var/log/btmp . All audit records will be tagged with the identifier "logins.".','Monitoring these files for changes could alert a system administrator to logins occurring at unusual hours, which could indicate intruder activity (i.e. a user logging in at a time when they do not normally log in).','','Add the following lines to the /etc/audit/audit.rules file: -w /var/run/utmp -p wa -k session -w /var/log/wtmp -p wa -k logins -w /var/log/btmp -p wa -k logins','[{\"cis\": [\"4.1.8\"]}, {\"cis_csc\": [\"5.5\", \"16.10\", \"16.4\"]}, {\"pci_dss\": [\"10.3\"]}]'),(4121,'Ensure discretionary access control permission modification events are collected','Monitor changes to file permissions, attributes, ownership and group. The parameters in this section track changes for system calls that affect file permissions and attributes. The chmod , fchmod and fchmodat system calls affect the permissions associated with a file. The chown , fchown , fchownat and lchown system calls affect owner and group attributes on a file. The setxattr , lsetxattr , fsetxattr (set extended file attributes) and removexattr , lremovexattr , fremovexattr (remove extended file attributes) control extended file attributes. In all cases, an audit record will only be written for non-system user ids (auid >= 500) and will ignore Daemon events (auid = 4294967295). All audit records will be tagged with the identifier "perm_mod."','Monitoring for changes in file attributes could alert a system administrator to activity that could indicate intruder activity or policy violation.','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lrem','[{\"cis\": [\"4.1.10\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4122,'Ensure unsuccessful unauthorized file access attempts are collected','Monitor for unsuccessful attempts to access files. The parameters below are associated with system calls that control creation ( creat ), opening ( open , openat ) and truncation ( truncate , ftruncate ) of files. An audit log record will only be written if the user is a non- privileged user (auid > = 500), is not a Daemon event (auid=4294967295) and if the system call returned EACCES (permission denied to the file) or EPERM (some other permanent error associated with the specific system call). All audit records will be tagged with the identifier "access."','Failed attempts to open, create or truncate files could be an indication that an individual or process is trying to gain unauthorized access to the system.','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access','[{\"cis\": [\"4.1.11\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"10.2.4\"]}, {\"nist_800_53\": [\"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4123,'Ensure successful file system mounts are collected','Monitor the use of the mount system call. The mount (and umount ) system call controls the mounting and unmounting of file systems. The parameters below configure the system to create an audit record when the mount system call is used by a non-privileged user.','It is highly unusual for a non privileged user to mount file systems to the system. While tracking mount commands gives the system administrator evidence that external media may have been mounted (based on a review of the source of the mount and confirming it's an external media type), it does not conclusively indicate that data was exported to the media. System administrators who wish to determine if data were exported, would also have to track successful open , creat and truncate system calls requiring write access to a file under the mount point of the external media file system. This could give a fair indication that a write occurred. The only way to truly prove it, would be to track successful writes to the external media. Tracking write system calls could quickly fill up the audit log and is not recommended. Recommendations on configuration options to track data export to media is beyond the scope of this document.','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S mount -F auid>=500 -F auid!=4294967295 -k mounts For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S mount -F auid>=500 -F auid!=4294967295 -k mounts -a always,exit -F arch=b32 -S mount -F auid>=500 -F auid!=4294967295 -k mounts','[{\"cis\": [\"4.1.13\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4124,'Ensure file deletion events by users are collected','Monitor the use of system calls associated with the deletion or renaming of files and file attributes. This configuration statement sets up monitoring for the unlink (remove a file), unlinkat (remove a file attribute), rename (rename a file) and renameat (rename a file attribute) system calls and tags them with the identifier "delete".','Monitoring these calls from non-privileged users could provide a system administrator with evidence that inappropriate removal of files and file attributes associated with protected files is occurring. While this audit option will look at all events, system administrators will want to look for specific privileged files that are being deleted or altered.','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k delete For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k delete -a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k delete','[{\"cis\": [\"4.1.14\"]}, {\"pci_dss\": [\"10.5.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC7.1\", \"CC7.2\", \"CC7.3\", \"CC8.1\"]}]'),(4125,'Ensure changes to system administration scope (sudoers) is collected','Monitor scope changes for system administrations. If the system has been properly configured to force system administrators to log in as themselves first and then use the sudo command to execute privileged commands, it is possible to monitor changes in scope. The file /etc/sudoers will be written to when the file or its attributes have changed. The audit records will be tagged with the identifier "scope."','Changes in the /etc/sudoers file can indicate that an unauthorized change has been made to scope of system administrator activity.','','Add the following line to the /etc/audit/audit.rules file: -w /etc/sudoers -p wa -k scope -w /etc/sudoers.d/ -p wa -k scope','[{\"cis\": [\"4.1.15\"]}, {\"cis_csc\": [\"5.4\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4126,'Ensure system administrator actions (sudolog) are collected','Monitor the sudo log file. If the system has been properly configured to disable the use of the su command and force all administrators to have to log in first and then use sudo to execute privileged commands, then all administrator commands will be logged to /var/log/sudo.log . Any time a command is executed, an audit event will be triggered as the /var/log/sudo.log file will be opened for write and the executed administration command will be written to the log.','Changes in /var/log/sudo.log indicate that an administrator has executed a command or the log file itself has been tampered with. Administrators will want to correlate the events written to the audit trail with the records written to /var/log/sudo.log to verify if unauthorized commands have been executed.','','Add the following line to the /etc/audit/audit.rules file: -w /var/log/sudo.log -p wa -k actions','[{\"cis\": [\"4.1.16\"]}, {\"cis_csc\": [\"5.1\", \"5.5\"]}, {\"pci_dss\": [\"10.2.2\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.6\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4127,'Ensure kernel module loading and unloading is collected','Monitor the loading and unloading of kernel modules. The programs insmod (install a kernel module), rmmod (remove a kernel module), and modprobe (a more sophisticated program to load and unload modules, as well as some other features) control loading and unloading of modules. The init_module (load a module) and delete_module (delete a module) system calls control loading and unloading of modules. Any execution of the loading and unloading module programs and system calls will trigger an audit record with an identifier of "modules".','Monitoring the use of insmod , rmmod and modprobe could provide system administrators with evidence that an unauthorized user loaded or unloaded a kernel module, possibly compromising the security of the system. Monitoring of the init_module and delete_module system calls would reflect an unauthorized user attempting to use a different program to load and unload modules.','','Add the following line to the /etc/audit/audit.rules file: -w /var/log/sudo.log -p wa -k actions','[{\"cis\": [\"4.1.17\"]}, {\"cis_csc\": [\"3\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4128,'Ensure the audit configuration is immutable','Set system audit so that audit rules cannot be modified with auditctl . Setting the flag "-e 2" forces audit to be put in immutable mode. Audit changes can only be made on system reboot.','In immutable mode, unauthorized users cannot execute changes to the audit system to potentially hide malicious activity and then put the audit rules back. Users would most likely notice a system reboot and that could alert administrators of an attempt to make unauthorized audit changes.','','Add the following line to the end of the /etc/audit/audit.rules file. -e 2','[{\"cis\": [\"4.1.18\"]}, {\"cis_csc\": [\"3\", \"6\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4129,'Ensure rsyslog Service is enabled','Once the rsyslog package is installed it needs to be activated.','If the rsyslog service is not activated the system may default to the syslogd service or lackblogging instead.','','Run the following command to enable rsyslog : # chkconfig rsyslog on','[{\"cis\": [\"4.2.1.1\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4130,'Ensure rsyslog default file permissions configured','rsyslog will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files.','It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected.','','Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and set $FileCreateMode to 0640 or more restrictive: $FileCreateMode 0640','[{\"cis\": [\"4.2.1.3\"]}, {\"cis_csc\": [\"5.1\"]}]'),(4131,'Ensure rsyslog is configured to send logs to a remote log host','The rsyslog utility supports the ability to send logs it gathers to a remote log host running syslogd(8) or to receive messages from remote hosts, reducing administrative overhead.','Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.','','Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and add the following line (where loghost.example.com is the name of your central log host). *.* @@loghost.example.com Run the following command to reload the rsyslogd configuration: # pkill -HUP rsyslogd','[{\"cis\": [\"4.2.1.4\"]}, {\"cis_csc\": [\"6.6\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4132,'Ensure syslog-ng service is enabled','Once the syslog-ng package is installed it needs to be activated.','If the syslog-ng service is not activated the system may default to the syslogd service or lack logging instead.','','Run the following command to enable syslog-ng : # chkconfig syslog-ng on','[{\"cis\": [\"4.2.2.1\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4133,'Ensure syslog-ng default file permissions configured','syslog-ng will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files.','It is important to ensure that log files have the correct permissions to ensure that sensitive syslog-ng data is archived and protected.','','Edit the /etc/syslog-ng/syslog-ng.conf and set perm option to 0640 or more restrictive: options { chain_hostnames(off); flush_lines(0); perm(0640); stats_freq(3600); threaded(yes); };','[{\"cis\": [\"4.2.2.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4134,'Ensure syslog-ng is configured to send logs to a remote log host','The syslog-ng utility supports the ability to send logs it gathers to a remote log host or to receive messages from remote hosts, reducing administrative overhead.','Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.','','Edit the /etc/syslog-ng/syslog-ng.conf file and add the following lines (where logfile.example.com is the name of your central log host). destination logserver { tcp("logfile.example.com" port(514)); }; log { source(src); destination(logserver); }; Run the following command to reload the rsyslogd configuration: # pkill -HUP syslog-ng','[{\"cis\": [\"4.2.2.4\"]}, {\"cis_csc\": [\"6.6\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4135,'Ensure rsyslog or syslog-ng is installed','The rsyslog and syslog-ng software are recommended replacements to the original syslogd daemon which provide improvements over syslogd , such as connection-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server.','The security enhancements of rsyslog and syslog-ng such as connection-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server) justify installing and configuring the package.','','Install rsyslog or syslog-ng using one of the following commands: # yum install rsyslog # yum install syslog-ng','[{\"cis\": [\"4.2.3\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4136,'Ensure permissions on all logfiles are configured','Log files stored in /var/log/ contain logged information from many services on the system, or on log hosts others as well.','It is important to ensure that log files have the correct permissions to ensure that sensitivebdata is archived and protected.','','Run the following command to set permissions on all existing log files: # find /var/log -type f -exec chmod g-wx,o-rwx {} +','[{\"cis\": [\"4.2.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4137,'Ensure cron daemon is enabled','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.','','Run the following command to enable cron : # chkconfig crond on','[{\"cis\": [\"5.1.1\"]}, {\"cis_csc\": [\"6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4138,'Ensure permissions on /etc/crontab are configured','The /etc/crontab file is used by cron to control its own jobs. The commands in this item make sure that root is the user and group owner of the file and that only the owner can access the file.','This file contains information on what system jobs are run by cron. Write access to these files could provide unprivileged users with the ability to elevate their privileges. Read access to these files could provide users with the ability to gain insight on system jobs that run on the system and could provide them a way to gain unauthorized privileged access.','','Run the following commands to set ownership and permissions on /etc/crontab : chown root:root /etc/crontab and chmod og-rwx /etc/crontab','[{\"cis\": [\"5.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4139,'Ensure permissions on /etc/cron.hourly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.hourly : chown root:root /etc/cron.hourly and chmod og-rwx /etc/cron.hourly','[{\"cis\": [\"5.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4140,'Ensure permissions on /etc/cron.daily are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.daily : chown root:root /etc/cron.daily and chmod og-rwx /etc/cron.daily','[{\"cis\": [\"5.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4141,'Ensure permissions on /etc/cron.weekly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.weekly : chown root:root /etc/cron.weekly and chmod og-rwx /etc/cron.weekly','[{\"cis\": [\"5.1.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4142,'Ensure permissions on /etc/cron.monthly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.monthly : chown root:root /etc/cron.monthly and chmod og-rwx /etc/cron.monthly','[{\"cis\": [\"5.1.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4143,'Ensure permissions on /etc/cron.d are configured','Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow , cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs.','On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.','','Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow: rm /etc/cron.deny;rm /etc/at.deny;touch /etc/cron.allow; touch /etc/at.allow; chmod og-rwx /etc/cron.allow; chmod og-rwx /etc/at.allow; chown root:root /etc/cron.allow and chown root:root /etc/at.allow','[{\"cis\": [\"5.1.7\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4144,'Ensure at/cron is restricted to authorized users','Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow , cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs.','On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.','','Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow: rm /etc/cron.deny;rm /etc/at.deny;touch /etc/cron.allow; touch /etc/at.allow; chmod og-rwx /etc/cron.allow; chmod og-rwx /etc/at.allow; chown root:root /etc/cron.allow and chown root:root /etc/at.allow','[{\"cis\": [\"5.1.8\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4145,'Ensure permissions on /etc/ssh/sshd_config are configured','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-privileged users.','','Run the following commands to set ownership and permissions on /etc/ssh/sshd_config: chown root:root /etc/ssh/sshd_config and chmod og-rwx /etc/ssh/sshd_config','[{\"cis\": [\"5.2.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4146,'Ensure SSH Protocol is set to 2','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2','[{\"cis\": [\"5.2.2\"]}, {\"cis_csc\": [\"3.4\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(4147,'Ensure SSH LogLevel is set to INFO','The INFO parameter specifies that login and logout activity will be logged.','SSH provides several logging levels with varying amounts of verbosity. DEBUG is specifically not recommended other than strictly for debugging SSH communications since it provides so much data that it is difficult to identify important security information.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel INFO','[{\"cis\": [\"5.2.3\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(4148,'Ensure SSH MaxAuthTries is set to 4 or less','The MaxAuthTries parameter specifies the maximum number of authentication attempts permitted per connection. When the login failure count reaches half the number, error messages will be written to the syslog file detailing the login failure.','Setting the MaxAuthTries parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. While the recommended setting is 4, set the number based on site policy.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4','[{\"cis\": [\"5.2.5\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4149,'Ensure SSH IgnoreRhosts is enabled','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes','[{\"cis\": [\"5.2.6\"]}, {\"cis_csc\": [\"9\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(4150,'Ensure SSH HostbasedAuthentication is disabled','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no','[{\"cis\": [\"5.2.7\"]}, {\"cis_csc\": [\"9\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(4151,'Ensure SSH root login is disabled','The PermitRootLogin parameter specifies if the root user can log in using ssh(1). The default is no.','Disallowing root logins over SSH requires system admins to authenticate using their own individual account, then escalating to root via sudo or su . This in turn limits opportunity for non-repudiation and provides a clear audit trail in the event of a security incident','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no','[{\"cis\": [\"5.2.8\"]}, {\"cis_csc\": [\"5.8\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(4152,'Ensure SSH PermitEmptyPasswords is disabled','The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts with empty password strings.','Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no','[{\"cis\": [\"5.2.9\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(4153,'Ensure SSH PermitUserEnvironment is disabled','The PermitUserEnvironment option allows users to present environment options to the ssh daemon.','Permitting users the ability to set environment variables through the SSH daemon could potentially allow users to bypass security controls (e.g. setting an execution path that has ssh executing trojan'd programs)','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitUserEnvironment no','[{\"cis\": [\"5.2.10\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(4154,'Ensure SSH Idle Timeout Interval is configured','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.','','Edit the /etc/ssh/sshd_config file to set the parameters according to site policy: ClientAliveInterval 300 and ClientAliveCountMax 0','[{\"cis\": [\"5.2.12\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(4155,'Ensure SSH LoginGraceTime is set to one minute or less','The LoginGraceTime parameter specifies the time allowed for successful authentication to the SSH server. The longer the Grace period is the more open unauthenticated connections can exist. Like other session controls in this session the Grace Period should be limited to appropriate organizational limits to ensure the service is available for needed access.','Setting the LoginGraceTime parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. It will also limit the number of concurrent unauthenticated connections While the recommended setting is 60 seconds (1 Minute), set the number based on site policy.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: LoginGraceTime 60','[{\"cis\": [\"5.2.13\"]}, {\"pci_dss\": [\"8.1\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4156,'Ensure SSH access is limited','There are several options available to limit which users and group can access the system via SSH. It is recommended that at least one of the following options be leveraged: AllowUsers The AllowUsers variable gives the system administrator the option of allowing specific users to ssh into the system. The list consists of space separated user names. Numeric user IDs are not recognized with this variable. If a system administrator wants to restrict user access further by only allowing the allowed users to log in from a particular host, the entry can be specified in the form of user@host. AllowGroups The AllowGroups variable gives the system administrator the option of allowing specific groups of users to ssh into the system. The list consists of space separated group names. Numeric group IDs are not recognized with this variable. DenyUsers The DenyUsers variable gives the system administrator the option of denying specific users to ssh into the system. The list consists of space separated user names. Numeric user IDs are not recognized with this variable. If a system administrator wants to restrict user access further by specifically denying a user's access from a particular host, the entry can be specified in the form of user@host. DenyGroups The DenyGroups variable gives the system administrator the option of denying specific groups of users to ssh into the system. The list consists of space separated group names. Numeric group IDs are not recognized with this variable.','Restricting which users can remotely access the system via SSH will help ensure that only authorized users access the system.','','Edit the /etc/ssh/sshd_config file to set one or more of the parameter as follows: AllowUsers <userlist>; AllowGroups <grouplist>; DenyUsers <userlist> and DenyGroups <grouplist>','[{\"cis\": [\"5.2.14\"]}, {\"cis_csc\": [\"5.1\", \"5.8\"]}, {\"pci_dss\": [\"8.1\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4157,'Ensure SSH warning banner is configured','The Banner parameter specifies a file whose contents must be sent to the remote user before authentication is permitted. By default, no banner is displayed.','Banners are used to warn connecting users of the particular site's policy regarding connection. Presenting a warning message prior to the normal user login may assist the prosecution of trespassers on the computer system.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: Banner /etc/issue.net','[{\"cis\": [\"5.2.15\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4158,'Ensure password creation requirements are configured','The pam_cracklib.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more','Strong passwords protect systems from being hacked through brute force methods.','','Edit the /etc/pam.d/password-auth and /etc/pam.d/system-auth files to include the appropriate options for pam_cracklib.so and to conform to site policy: password requisite pam_cracklib.so try_first_pass retry=3 minlen=14 dcredit=-1 ucredit=-1 ocredit=-1 lcredit=-1','[{\"cis\": [\"5.3.1\"]}, {\"cis_csc\": [\"5.7\", \"16.12\"]}, {\"pci_dss\": [\"8.2.3\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4159,'Ensure password reuse is limited','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.','','Edit the /etc/pam.d/password-auth and /etc/pam.d/system-auth files to include the remember option and conform to site policy as shown: password sufficient pam_unix.so remember=5 or password required pam_pwhistory.so remember=5','[{\"cis\": [\"5.3.3\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2.5\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4160,'Ensure password hashing algorithm is SHA-512','The commands below change password encryption from md5 to sha512 (a much stronger hashing algorithm). All existing accounts will need to perform a password change to upgrade the stored hashes to the new algorithm.','The SHA-512 algorithm provides much stronger hashing than MD5, thus providing additional protection to the system by increasing the level of effort for an attacker to successfully determine passwords. Note that these change only apply to accounts configured on the local system.','','Edit the /etc/pam.d/password-auth and /etc/pam.d/system-auth files to include the sha512 option for pam_unix.so as shown: password sufficient pam_unix.so sha512','[{\"cis\": [\"5.3.4\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"3.6.1\", \"8.2.1\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\"]}]'),(4161,'Ensure password expiration is 365 days or less','The PASS_MAX_DAYS parameter in /etc/login.defs allows an administrator to force passwords to expire once they reach a defined age. It is recommended that the PASS_MAX_DAYS parameter be set to less than or equal to 365 days.','The window of opportunity for an attacker to leverage compromised credentials or successfully compromise credentials via an online brute force attack is limited by the age of the password. Therefore, reducing the maximum age of a password also reduces an attacker's window of opportunity.','','Set the PASS_MAX_DAYS parameter to conform to site policy in /etc/login.defs : PASS_MAX_DAYS 90 and modify user parameters for all users with a password set to match: chage --maxdays 90 <user>','[{\"cis\": [\"5.4.1.1\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2.4\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4162,'Ensure minimum days between password changes is 7 or more','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.','','Set the PASS_MIN_DAYS parameter to 7 in /etc/login.defs: PASS_MIN_DAYS 7 and modify user parameters for all users with a password set to match: chage --mindays 7 <user>','[{\"cis\": [\"5.4.1.2\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4163,'Ensure password expiration warning days is 7 or more','The PASS_WARN_AGE parameter in /etc/login.defs allows an administrator to notify users that their password will expire in a defined number of days. It is recommended that the PASS_WARN_AGE parameter be set to 7 or more days.','Providing an advance warning that a password will be expiring gives users time to think of a secure password. Users caught unaware may choose a simple password or write it down where it may be discovered.','','Set the PASS_WARN_AGE parameter to 7 in /etc/login.defs: PASS_WARN_AGE 7 and modify user parameters for all users with a password set to match: chage --warndays 7 <user>','[{\"cis\": [\"5.4.1.3\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4164,'Ensure inactive password lock is 30 days or less','User accounts that have been inactive for over a given period of time can be automatically disabled. It is recommended that accounts that are inactive for 30 days after password expiration be disabled.','Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies.','','Run the following command to set the default password inactivity period to 30 days: useradd -D -f 30 and modify user parameters for all users with a password set to match: chage --inactive 30 <user>','[{\"cis\": [\"5.4.1.4\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4165,'Ensure default group for the root account is GID 0','The usermod command can be used to specify which group the root user belongs to. This affects permissions of files that are created by the root user.','Using GID 0 for the root account helps prevent root -owned files from accidentally becoming accessible to non-privileged users.','','Run the following command to set the root user default group to GID 0: usermod -g 0 root','[{\"cis\": [\"5.4.3\"]}, {\"cis_csc\": [\"5\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4166,'Ensure default user umask is 027 or more restrictive','The default umask determines the permissions of files created by users. The user creating the file has the discretion of making their files and directories readable by others via the chmod command. Users who wish to allow their files and directories to be readable by others by default may choose a different default umask by inserting the umask command into the standard shell configuration files ( .profile , .bashrc , etc.) in their home directories.','Setting a very secure default value for umask ensures that users make a conscious choice about their file permissions. A default umask setting of 077 causes files and directories created by users to not be readable by any other user on the system. A umask of 027 would make files and directories readable by users in the same Unix group, while a umask of 022 would make files readable by every user on the system.','','Edit the /etc/bashrc , /etc/profile and /etc/profile.d/*.sh files (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: umask 027','[{\"cis\": [\"5.4.4\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4167,'Ensure default user shell timeout is 900 seconds or less','The default TMOUT determines the shell timeout for users. The TMOUT value is measured in seconds.','Having no timeout value associated with a shell could allow an unauthorized user access to another user's shell 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.','','Edit the /etc/bashrc and /etc/profile files (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: TMOUT=600','[{\"cis\": [\"5.4.5\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(4168,'Ensure access to the su command is restricted.','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.','','Add the following line to the /etc/pam.d/su file: auth required pam_wheel.so use_uid','[{\"cis\": [\"5.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4169,'Ensure permissions on /etc/passwd are configured','The /etc/passwd file contains user account information that is used by many system utilities and therefore must be readable for these utilities to operate.','It is critical to ensure that the /etc/passwd file is protected from unauthorized write access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/passwd: # chown root:root /etc/passwd # chmod 644 /etc/passwd','[{\"cis\": [\"6.1.2\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4170,'Ensure permissions on /etc/shadow are configured','The /etc/shadow file is used to store the information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information.','If attackers can gain read access to the /etc/shadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/shadow file (such as expiration) could also be useful to subvert the user accounts.','','Run the following command to set permissions on /etc/shadow: # chown root:root /etc/shadow # chmod 000 /etc/shadow','[{\"cis\": [\"6.1.3\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4171,'Ensure permissions on /etc/group are configured','The /etc/group file contains a list of all the valid groups defined in the system. The command below allows read/write access for root and read access for everyone else.','The /etc/group file needs to be protected from unauthorized changes by non-privileged users, but needs to be readable as this information is used with many non-privileged programs.','','Run the following command to set permissions on /etc/group: # chown root:root /etc/group # chmod 644 /etc/group','[{\"cis\": [\"6.1.4\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4172,'Ensure permissions on /etc/gshadow are configured','The /etc/gshadow file is used to store the information about groups that is critical to the security of those accounts, such as the hashed password and other security information.','If attackers can gain read access to the /etc/gshadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/gshadow file (such as group administrators) could also be useful to subvert the group','','Run the following command to set permissions on /etc/gshadow: # chown root:root /etc/gshadow # chmod 000 /etc/gshadow','[{\"cis\": [\"6.1.5\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4173,'Ensure permissions on /etc/passwd- are configured','The /etc/passwd- file contains backup user account information.','It is critical to ensure that the /etc/passwd- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/passwd-: # chown root:root /etc/passwd- # chmod 644 /etc/passwd-','[{\"cis\": [\"6.1.6\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4174,'Ensure permissions on /etc/shadow- are configured','The /etc/shadow- file is used to store backup information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information.','It is critical to ensure that the /etc/shadow- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/shadow-: # chown root:root /etc/shadow- # chmod 000 /etc/shadow-','[{\"cis\": [\"6.1.7\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4175,'Ensure permissions on /etc/group- are configured','The /etc/group- file contains a backup list of all the valid groups defined in the system.','It is critical to ensure that the /etc/group- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/group-: # chown root:root /etc/group- # chmod 644 /etc/group-','[{\"cis\": [\"6.1.8\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4176,'Ensure permissions on /etc/gshadow- are configured','The /etc/gshadow- file is used to store backup information about groups that is critical to the security of those accounts, such as the hashed password and other security information.','It is critical to ensure that the /etc/gshadow- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/gshadow-: # chown root:root /etc/gshadow- # chmod 000 /etc/gshadow-','[{\"cis\": [\"6.1.9\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4177,'Ensure password fields are not empty','An account with an empty password field means that anybody may log in as that user without providing a password.','All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user.','','If any accounts in the /etc/shadow file do not have a password, run the following command to lock the account until it can be determined why it does not have a password: passwd -l <username> || Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off.','[{\"cis\": [\"6.2.1\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4178,'Ensure no legacy "+" entries exist in /etc/passwd','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Remove any legacy '+' entries from /etc/passwd if they exist.','[{\"cis\": [\"6.2.2\"]}, {\"cis_csc\": [\"16.9\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4179,'Ensure no legacy "+" entries exist in /etc/shadow','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Remove any legacy '+' entries from /etc/shadow if they exist.','[{\"cis\": [\"6.2.3\"]}, {\"cis_csc\": [\"16.9\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4180,'Ensure no legacy "+" entries exist in /etc/group','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Remove any legacy '+' entries from /etc/group if they exist.','[{\"cis\": [\"6.2.4\"]}, {\"cis_csc\": [\"16.9\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4181,'Ensure root is the only UID 0 account','Any account with UID 0 has superuser privileges on the system.','This access must be limited to only the default root account and only from the system console. Administrative access must be through an unprivileged account using an approved mechanism as noted in Item 5.6 Ensure access to the su command is restricted.','','Remove any users other than root with UID 0 or assign them a new UID if appropriate.','[{\"cis\": [\"6.2.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4500,'Ensure mounting of cramfs filesystems is disabled','The cramfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems. A cramfs image can be used without having to first decompress the image.','Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/directory ending in .conf. Example: vim /etc/modprobe.d/cramfs.confand add the following line: install cramfs /bin/true. Run the following command to unload the cramfs module: rmmod cramfs','[{\"cis\": [\"1.1.1.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(4501,'Ensure mounting of squashfs filesystems is disabled','The squashfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems (similar to cramfs ). A squashfs image can be used without having to first decompress the image.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install squashfs /bin/true. Run the following command to unload the squashfs module: rmmod squashfs','[{\"cis\": [\"1.1.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(4502,'Ensure mounting of udf filesystems is disabled','The udf filesystem type is the universal disk format used to implement ISO/IEC 13346 and ECMA-167 specifications. This is an open vendor filesystem type for data storage on a broad range of media. This filesystem type is necessary to support writing DVDs and newer optical disc formats.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install udf /bin/true. Run the following command to unload the udf module: rmmod udf','[{\"cis\": [\"1.1.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(4503,'Ensure mounting of FAT filesystems is disabled','The FAT filesystem format is primarily used on older windows systems and portable USB drives or flash modules. It comes in three types FAT12, FAT16, and FAT32 all of which are supported by the vfat kernel module.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','If utilizing UEFI the FAT filesystem format is required. If this case, ensure that the FAT filesystem is only used where appropriate. Run the following command: grep -E -i 'svfats' /etc/fstab And review that any output is appropriate for your environment. If not utilizing UEFI: Edit or create a file in the /etc/modprobe.d/ directory ending in .conf and add the following lines: Example: vim /etc/modprobe.d/fat.conf install fat /bin/true install vfat /bin/true install msdos /bin/true Run the following commands to unload the msdos, vfat, and fatmodules: # rmmod msdos # rmmod vfat # rmmod fat ','[{\"cis\": [\"1.1.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(4504,'Ensure /tmp is configured','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.','','Create or update an entry for /tmp in either /etc/fstab OR in a systemd tmp.mount file: If /etc/fstab is used: Configure /etc/fstab as appropriate. Example: tmpfs /tmp tmpfs defaults,rw,nosuid,nodev,noexec,relatime 0 0 Run the following command to remount /tmp: # mount -o remount,noexec,nodev,nosuid /tmp OR If systemd tmp.mount file is used: Run the following command to create the file /etc/systemd/system/tmp.mount if it doesn't exist: # [ ! -f /etc/systemd/system/tmp.mount ] && cp -v /usr/lib/systemd/system/tmp.mount /etc/systemd/system/ Edit the file /etc/systemd/system/tmp.mount: [Mount] What=tmpfs Where=/tmp Type=tmpfs Options=mode=1777,strictatime,noexec,nodev,nosuid Run the following command to reload the systemd daemon:# systemctl daemon-reload Run the following command to unmask tmp.mount: # systemctl unmask tmp.mpunt Run the following command to enable and start tmp.mount: # systemctl enable --now tmp.mount','[{\"cis\": [\"1.1.2\"]}, {\"cis_csc\": [\"9.4\", \"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4505,'Ensure noexec option set on /tmp partition','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.','','Edit the /etc/fstab file OR the /etc/systemd/system/local-fs.target.wants/tmp.mount file: IF /etc/fstab is used to mount /tmp Edit the /etc/fstabfile and add noexecto the fourth field (mounting options) for the /tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /tmp: # mount -o remount,noexec /tmp OR IF systemd is used to mount /tmp: Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add noexec to the /tmp mount options: [Mount] Options=mode=1777,strictatime,noexec,nodev,nosuid Run the following command to restart the systemd daemon: # systemctl daemon-reload Run the following command to restart tmp.mount # systemctl restart tmp.mount','[{\"cis\": [\"1.1.3\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4506,'Ensure nodev option set on /tmp partition','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.','','Edit the /etc/fstab file OR the /etc/systemd/system/local-fs.target.wants/tmp.mount file: IF /etc/fstab is used to mount /tmp Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /tmp: # mount -o remount,nodev /tmp OR IF systemd is used to mount /tmp: Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add nodev to the /tmp mount options: [Mount] Options=mode=1777,strictatime,noexec,nodev,nosuid Run the following command to restart the systemd daemon: # systemctl daemon-reload Run the following command to restart tmp.mount # systemctl restart tmp.mount','[{\"cis\": [\"1.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4507,'Ensure nosuid option set on /tmp partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /tmp.','','IF /etc/fstab is used to mount /tmp Edit the /etc/fstab file OR the /etc/systemd/system/local-fs.target.wants/tmp.mount file: IF /etc/fstab is used to mount /tmp Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /tmp: # mount -o remount,nosuid /tmp OR IF systemd is used to mount /tmp: Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add nosuid to the /tmp mount options: [Mount] Options=mode=1777,strictatime,noexec,nosuid,nosuid Run the following command to restart the systemd daemon: # systemctl daemon-reload Run the following command to restart tmp.mount # systemctl restart tmp.mount','[{\"cis\": [\"1.1.5\"]}, {\"cis_csc\": [\"5.1\", \"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4508,'Ensure /dev/shm is configured ','/dev/shm is a traditional shared memory concept. One program will create a memory portion, which other processes (if permitted) can access. Mounting tmpfs at /dev/shm is handled automatically by systemd.','Any user can upload and execute files inside the /dev/shm similar to the /tmp partition. Configuring /dev/shm allows an administrator to set the noexec option on the mount, making /dev/shm 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.','','Edit /etc/fstab and add or edit the following line: tmpfs /dev/shm tmpfs defaults,noexec,nodev,nosuid,seclabel 0 0 Run the following command to remount /dev/shm: # mount -o remount,noexec,nodev,nosuid /dev/shm','[{\"cis\": [\"1.1.6\"]}, {\"cis_csc\": [\"5.1\", \"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4509,'Ensure noexec option set on /dev/shm partition','The noexec mount option specifies that the filesystem cannot contain executable binaries.','Setting this option on a file system prevents users from executing programs from shared memory. This deters users from introducing potentially malicious software on the system.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /dev/shm partition. Run the following command to remount /dev/shm: # mount -o remount,noexec /dev/shm','[{\"cis\": [\"1.1.7\"]}, {\"cis_csc\": [\"2.6\", \"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4510,'Ensure nodev option set on /dev/shm partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the /dev/shm filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create special devices in /dev/shm partitions.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /dev/shm partition. Run the following command to remount /dev/shm: # mount -o remount,nodev /dev/shm','[{\"cis\": [\"1.1.8\"]}, {\"cis_csc\": [\"5.1\", \"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4511,'Ensure nosuid option set on /dev/shm partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /dev/shm partition. Run the following command to remount /dev/shm: # mount -o remount,nosuid /dev/shm','[{\"cis\": [\"1.1.9\"]}, {\"cis_csc\": [\"5.1\", \"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4512,'Ensure separate partition exists for /var','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.10\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4513,'Ensure separate partition exists for /var/tmp','The /var/tmp directory is a world-writable directory used for temporary storage by all users and some applications and is intended for temporary files that are preserved across reboots.','Since the /var/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 /var/tmp its own file system allows an administrator to set the noexec option on the mount, making /var/tmp useless for an attacker to install executable code.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var/tmp. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.11\"]}, {\"cis_csc\": [\"5.1\", \"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4514,'Ensure noexec option set on /var/tmp partition','The noexec mount option specifies that the filesystem cannot contain executable binaries.','Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /var/tmp.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information. un the following command to remount /var/tmp: # mount -o remount,noexec /var/tmp','[{\"cis\": [\"1.1.12\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4515,'Ensure nodev option set on /var/tmp partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the /var/tmp filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices in /var/tmp .','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /var/tmp: # mount -o remount,nodev /var/tmp','[{\"cis\": [\"1.1.13\"]}, {\"cis_csc\": [\"5.1\", \"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4516,'Ensure nosuid option set on /var/tmp partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /var/tmp.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /var/tmp: # mount -o remount,nosuid /var/tmp','[{\"cis\": [\"1.1.14\"]}, {\"cis_csc\": [\"5.1\", \"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4517,'Ensure separate partition exists for /var/log','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var/log. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.15\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"2.2.4\", \"10.7\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4518,'Ensure separate partition exists for /var/log/audit','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.','','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, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.16\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"2.2.4\", \"10.7\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4519,'Ensure separate partition exists for /home','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /home. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.17\"]}, {\"cis_csc\": [\"5.1\", \"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4520,'Ensure nodev option set on /home partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the user partitions are not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /home partition. # mount -o remount,nodev /home','[{\"cis\": [\"1.1.18\"]}, {\"cis_csc\": [\"5.1\", \"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4521,'Disable Automounting','autofs allows automatic mounting of devices, typically including CD/DVDs and USB drives.','With automounting enabled anyone with physical access could attach a USB drive or disc and have its contents available in system even if they lacked permissions to mount it themselves.','','Run the following command to disable autofs: systemctl disable autofs','[{\"cis\": [\"1.1.23\"]}, {\"cis_csc\": [\"8.4\", \"8.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4522,'Disable USB Storage','USB storage provides a means to transfer and store files insuring persistence and availability of the files independent of network connection status. Its popularity and utility has led to USB-based malware being a simple and common means for network infiltration and a first step to establishing a persistent threat within a networked environment.','Restricting USB access on the system will decrease the physical attack surface for a device and diminish the possible vectors to introduce malware.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/usb_storage.conf Add the following line: install usb-storage /bin/true Run the following command to unload the usb-storage module: rmmod usb-storage','[{\"cis\": [\"1.1.22\"]}, {\"cis_csc\": [\"8.4\", \"8.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4523,'Ensure gpgcheck is globally activated','The gpgcheck option, found in the main section of the /etc/yum.conf and individual /etc/yum/repos.d/* files determines if an RPM package's signature is checked prior to its installation.','It is important to ensure that an RPM's package signature is always checked prior to installation to ensure that the software is obtained from a trusted source.','','Edit /etc/yum.conf and set ' gpgcheck=1 ' in the [main] section. Edit any failing files in /etc/yum.repos.d/* and set all instances of gpgcheck to ' 1 '.','[{\"cis\": [\"1.2.3\"]}, {\"cis_csc\": [\"3.4\"]}, {\"pci_dss\": [\"6.2\"]}, {\"nist_800_53\": [\"SI.2\", \"SA.11\", \"SI.4\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"A1.2\", \"CC6.8\"]}]'),(4524,'Disable the rhnsd Daemon','The rhnsd daemon polls the Red Hat Network web site for scheduled actions and, if there are, executes those actions.','Patch management policies may require that organizations test the impact of a patch before it is deployed in a production environment. Having patches automatically deployed could have a negative impact on the environment. It is best to not allow an action by default but only after appropriate consideration has been made. It is recommended that the service be disabled unless the risk is understood and accepted or you are running your own satellite . This item is not scored because organizations may have addressed the risk.','','Run the following command to stop and mask the rhnsd: # systemctl --now mask rhnsd','[{\"cis\": [\"1.2.5\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(4525,'Ensure sudo is installed','sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy. The invoking user's real (not effective) user ID is used to determine the user name with which to query the security policy.','sudo supports a plugin architecture for security policies and input/output logging. Third parties can develop and distribute their own policy and I/O logging plugins to work seamlessly with the sudo front end. The default security policy is sudoers, which is configured via the file /etc/sudoers. The security policy determines what privileges, if any, a user has to run sudo. The policy may require that users authenticate themselves with a password or another authentication mechanism. If authentication is required, sudo will exit if the user's password is not entered within a configurable time limit. This limit is policy-specific.','','Run the following command to install sudo. # yum install sudo','[{\"cis\": [\"1.3.1\"]}, {\"cis_csc\": [\"4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4526,'Ensure sudo commands use pty','sudo can be configured to run only from a pseudo-pty','Attackers can run a malicious program using sudo, which would again fork a background process that remains even when the main program has finished executing. This can be mitigated by configuring sudo to run other commands only from a pseudo-pty, whether I/O logging is turned on or not.','','Edit the file /etc/sudoers or a file in /etc/sudoers.d/ with visudo or visudo -f <PATH TO FILE> and add the following line: Defaults use_pty','[{\"cis\": [\"1.3.2\"]}, {\"cis_csc\": [\"4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4527,'Ensure sudo log file exists','sudo can use a custom log file','A sudo log file simplifies auditing of sudo commands','','Edit the file /etc/sudoers or a file in /etc/sudoers.d/ with visudo or visudo -f <PATH TO FILE> and add the following line: Defaults logfile='<PATH TO CUSTOM LOG FILE>' Example:Defaults logfile="/var/log/sudo.log"','[{\"cis\": [\"1.3.3\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4528,'Ensure AIDE is installed','AIDE takes a snapshot of filesystem state including modification times, permissions, and file hashes which can then be used to compare against the current state of the filesystem to detect modifications to the system.','By monitoring the filesystem state compromised files can be detected to prevent or limit the exposure of accidental or malicious misconfigurations or modified binaries.','','Run the following command to install AIDE: yum install aide // Configure AIDE as appropriate for your environment. Consult the AIDE documentation for options. Initialize AIDE: aide --init && mv /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz','[{\"cis\": [\"1.4.1\"]}, {\"cis_csc\": [\"14.9\"]}, {\"pci_dss\": [\"11.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4529,'Ensure filesystem integrity is regularly checked','Periodic checking of the filesystem integrity is needed to detect changes to the filesystem.','Periodic file checking allows the system administrator to determine on a regular basis if critical files have been changed in an unauthorized fashion.','','If cron will be used to schedule and run aide check run the following command: crontab -u root -e Add the following line to the crontab: 0 5 * * * /usr/sbin/aide --check // Notes: The checking in this recommendation occurs every day at 5am. Alter the frequency and time of the checks in compliance with site policy. OR If aidecheck.service and aidecheck.timer will be used to schedule and run aide check: Create or edit the file /etc/systemd/system/aidecheck.service and add the following lines: [Unit] Description=Aide Check [Service] Type=simpleExecStart=/usr/sbin/aide --check [Install] WantedBy=multi-user.target Create or edit the file /etc/systemd/system/aidecheck.timer and add the following lines: [Unit] Description=Aide check every day at 5AM [Timer] OnCalendar=*-*-* 05:00:00 Unit=aidecheck.service [Install] WantedBy=multi-user.target Run the following commands: # chown root:root /etc/systemd/system/aidecheck.* # chmod 0644 /etc/systemd/system/aidecheck.* # systemctl daemon-reload # systemctl enable aidecheck.service # systemctl --now enable aidecheck.timer ','[{\"cis\": [\"1.4.2\"]}, {\"cis_csc\": [\"14.9\"]}, {\"pci_dss\": [\"11.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4530,'Ensure bootloader password is set','Setting the boot loader password will require that anyone rebooting the system must enter a password before being able to set command line boot parameters.','Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off SELinux at boot time).','','For newergrub2based systems (centOS/RHEL 7.2 and newer): Create an encrypted password with grub2-setpassword: # grub2-setpassword OR For older grub2based systems: create an encrypted password with grub2-mkpasswd-pbkdf2: # grub2-mkpasswd-pbkdf2 Enter password: <password> Reenter password: <password> Your PBKDF2 is <encrypted-password> Add the following into /etc/grub.d/01_users or a custom /etc/grub.d configuration file: cat <<EOFset superusers="<username>"password_pbkdf2 <username> <encrypted-password>EOF Run the following command to update the grub2 configuration: # grub2-mkconfig -o /boot/grub2/grub.cfg','[{\"cis\": [\"1.5.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4531,'Ensure permissions on bootloader config are configured','The grub configuration file contains information on boot settings and passwords for unlocking boot options. The grub configuration is usually located at /boot/grub2/grub.cfg and linked as /etc/grub2.cfg . On newer grub2 systems the encrypted bootloader password is contained in /boot/grub2/user.cfg','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.','','Run the following commands to set permissions on your grub configuration: # chown root:root /boot/grub2/grub.cfg # chmod og-rwx /boot/grub2/grub.cfg # chown root:root /boot/grub2/user.cfg # chmod og-rwx /boot/grub2/user.cfg','[{\"cis\": [\"1.5.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4532,'Ensure authentication required for single user mode','Single user mode (rescue mode) is used for recovery when the system detects an issue during boot or by manual selection from the bootloader.','Requiring authentication in single user mode (rescue mode) prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials.','','Edit /usr/lib/systemd/system/rescue.service and /usr/lib/systemd/system/emergency.service and set ExecStart to use /sbin/sulogin or /usr/sbin/sulogin: ExecStart=-/bin/sh -c "/sbin/sulogin; /usr/bin/systemctl --fail --no-block default" ','[{\"cis\": [\"1.5.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4533,'Ensure core dumps are restricted','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.','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). In addition, setting the fs.suid_dumpable variable to 0 will prevent setuid programs from dumping core.','','Add the following line to /etc/security/limits.conf or a /etc/security/limits.d/* file: * hard core 0. Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: fs.suid_dumpable = 0. Run the following command to set the active kernel parameter: # sysctl -w fs.suid_dumpable=0','[{\"cis\": [\"1.6.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4534,'Ensure XD/NX support is enabled','Recent processors in the x86 family support the ability to prevent code execution on a per memory page basis. Generically and on AMD processors, this ability is called No Execute (NX), while on Intel processors it is called Execute Disable (XD). This ability can help prevent exploitation of buffer overflow vulnerabilities and should be activated whenever possible. Extra steps must be taken to ensure that this protection is enabled, particularly on 32-bit x86 systems. Other processors, such as Itanium and POWER, have included such support since inception and the standard kernel for those platforms supports the feature.','Enabling any feature that can protect against buffer overflow attacks enhances the security of the system.','','On 32 bit systems install a kernel with PAE support, no installation is required on 64 bit systems: If necessary configure your bootloader to load the new kernel and reboot the system. You may need to enable NX or XD support in your bios.','[{\"cis\": [\"1.6.2\"]}, {\"cis_csc\": [\"8.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4535,'Ensure address space layout randomization (ASLR) is enabled','Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process.','Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: kernel.randomize_va_space = 2. Run the following command to set the active kernel parameter: # sysctl -w kernel.randomize_va_space=2','[{\"cis\": [\"1.6.3\"]}, {\"cis_csc\": [\"8.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4536,'Ensure prelink is disabled','prelink is a program that modifies ELF shared libraries and ELF dynamically linked binaries in such a way that the time needed for the dynamic linker to perform relocations at startup significantly decreases.','The prelinking feature can interfere with the operation of AIDE, because it changes binaries. Prelinking can also increase the vulnerability of the system if a malicious user is able to compromise a common library such as libc.','','Run the following commands to restore binaries to normal: # prelink -ua Run the following command to uninstall prelink: # yum remove prelink','[{\"cis\": [\"1.6.4\"]}, {\"cis_csc\": [\"14.9\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4537,'Ensure SELinux is installed','SELinux provides Mandatory Access Controls.','Without a Mandatory Access Control system installed only the default Discretionary Access Control system will be available.','','Run the following command to install libselinux: # yum install libselinux','[{\"cis\": [\"1.7.1.1\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4538,'Ensure SELinux is not disabled in bootloader configuration','Configure SELINUX to be enabled at boot time and verify that it has not been overwritten by the grub boot parameters.','SELinux must be enabled at boot time in your grub configuration to ensure that the controls it provides are not overridden.','','Edit /etc/default/grub and remove all instances of selinux=0 and enforcing=0 from all CMDLINE_LINUX parameters: GRUB_CMDLINE_LINUX_DEFAULT="quiet" GRUB_CMDLINE_LINUX="" || Run the following command to update the grub2 configuration: grub2-mkconfig -o /boot/grub2/grub.cfg','[{\"cis\": [\"1.7.1.2\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4539,'Ensure SELinux policy is configured','Configure SELinux to meet or exceed the default targeted policy, which constrains daemons and system software only.','Security configuration requirements vary from site to site. Some sites may mandate a policy that is stricter than the default policy, which is perfectly acceptable. This item is intended to ensure that at least the default recommendations are met.','','Edit the /etc/selinux/config file to set the SELINUXTYPE parameter: SELINUXTYPE=targeted','[{\"cis\": [\"1.7.1.3\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4540,'Ensure the SELinux mode is enforcing or permissive','SELinux can run in one of three modes: disabled, permissive, or enforcing: Enforcing - Is the default, and recommended, mode of operation; in enforcing mode SELinux operates normally, enforcing the loaded security policy on the entire system. Permissive - The system acts as if SELinux is enforcing the loaded security policy, including labeling objects and emitting access denial entries in the logs, but it does not actually deny any operations. While not recommended for production systems, permissive mode can be helpful for SELinux policy development. Disabled -Is strongly discouraged; not only does the system avoid enforcing the SELinux policy, it also avoids labeling any persistent objects such as files, making it difficult to enable SELinux in the future','Running SELinux in disabled modeis strongly discouraged; not only does the system avoid enforcing the SELinux policy, it also avoids labeling any persistent objects such as files, making it difficult to enable SELinux in the future.','','Run one of the following commands to set SELinux's running mode: To set SELinux mode to Enforcing: # setenforce 1 OR To set SELinux mode to Permissive: # setenforce 0 Edit the /etc/selinux/config file to set the SELINUX parameter: For Enforcing mode: SELINUX=enforcing OR For Permissive mode: SELINUX=permissive','[{\"cis\": [\"1.7.1.4\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4541,'Ensure no unconfined services exist','Unconfined processes run in unconfined domains','For unconfined processes, SELinux policy rules are applied, but policy rules exist that allow processes running in unconfined domains almost all access. Processes running in unconfined domains fall back to using DAC rules exclusively. If an unconfined process is compromised, SELinux does not prevent an attacker from gaining access to system resources and data, but of course, DAC rules are still used. SELinux is a security enhancement on top of DAC rules – it does not replace them','','Investigate any unconfined processes found during the audit action. They may need to have an existing security context assigned to them or a policy built for them.','[{\"cis\": [\"1.7.1.6\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4542,'Ensure SETroubleshoot is not installed','The SETroubleshoot service notifies desktop users of SELinux denials through a user-friendly interface. The service provides important information around configuration errors, unauthorized intrusions, and other potential errors.','The SETroubleshoot service is an unnecessary daemon to have running on a server, especially if X Windows is disabled.','','Run the following command to uninstall setroubleshoot: # yum remove setroubleshoot','[{\"cis\": [\"1.7.1.7\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4543,'Ensure the MCS Translation Service (mcstrans) is not installed','The mcstransd daemon provides category label information to client processes requesting information. The label translations are defined in /etc/selinux/targeted/setrans.conf','Since this service is not used very often, remove it to reduce the amount of potentially vulnerable code running on the system.','','Run the following command to uninstall mcstrans: # yum remove mcstrans','[{\"cis\": [\"1.7.1.8\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4544,'Ensure message of the day is configured properly','The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/motd file with the appropriate contents according to your site policy, remove any instances of m, , s, v or references to the OS platform OR If the motd is not used, this file can be removed. Run the following command to remove the motd file: # rm /etc/motd','[{\"cis\": [\"1.8.1.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(4545,'Ensure local login warning banner is configured properly','The contents of the /etc/issue file are displayed to users prior to login for local terminals. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version -or the operating system's name.','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/issue file with the appropriate contents according to your site policy, remove any instances of m, , s, or v: # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue','[{\"cis\": [\"1.8.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(4546,'Ensure remote login warning banner is configured properly','The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/issue.net file with the appropriate contents according to your site policy, remove any instances of m, , s, or v: # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue.net','[{\"cis\": [\"1.8.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(4547,'Ensure permissions on /etc/motd are configured','The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users.','If the /etc/motd file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/motd: # chown root:root /etc/motd # chmod 644 /etc/motd','[{\"cis\": [\"1.8.1.4\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4548,'Ensure permissions on /etc/issue are configured','The contents of the /etc/issue file are displayed to users prior to login for local terminals.','If the /etc/issue file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/issue: # chown root:root /etc/issue # chmod 644 /etc/issue','[{\"cis\": [\"1.8.1.5\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4549,'Ensure permissions on /etc/issue.net are configured','The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services.','If the /etc/issue.net file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/issue.net: # chown root:root /etc/issue.net # chmod 644 /etc/issue.net','[{\"cis\": [\"1.8.1.6\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4550,'Ensure updates, patches, and additional security software are installed','Periodically patches are released for included software either due to security flaws or to include additional functionality.','Newer patches may contain security enhancements that would not be available through the latest full update. As a result, it is recommended that the latest software patches be used to take advantage of the latest functionality. As with any software installation, organizations need to determine if a given update meets their requirements and verify the compatibility and supportability of any additional software against the update revision that is selected.','','Use your package manager to update all packages on the system according to site policy. The following command will install all available packages # yum update --security Note: The audit and remediation here only cover security updates. Non-security updates can be audited with the following command and comparing the output against site policy: # yum check-update','[{\"cis\": [\"1.9\"]}, {\"cis_csc\": [\"3.4\", \"3.5\"]}, {\"pci_dss\": [\"5.2\"]}, {\"nist_800_53\": [\"AU.6\", \"SI.4\"]}, {\"gpg_13\": [\"4.2\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"A1.2\"]}]'),(4551,'Ensure GDM login banner is configured','GDM is the GNOME Display Manager which handles graphical login for GNOME based systems.','If a graphical login is not required, it should be removed to reduce the attack surface of the system. If a graphical login is required, last logged in user display should be disabled, and a warning banner should be configured. Displaying the last logged in user eliminates half of the Userid/Password equation that an unauthorized person would need to log on. Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place.','','Run the following command to remove gdm: # yum remove gdm OR If GDM is required: Edit or create the file /etc/dconf/profile/gdm and add the following: user-db:user system-db:gdm file-db:/usr/share/gdm/greeter-dconf-defaults Edit or create the file /etc/dconf/db/gdm.d/ and add the following: (This is typically /etc/dconf/db/gdm.d/01-banner-message) [org/gnome/login-screen] banner-message-enable=true banner-message-text='<banner message>' Example Banner Text: 'Authorized uses only. All activity may be monitored and reported. 'Edit or create the file /etc/dconf/db/gdm.d/and add the following: (This is typically /etc/dconf/db/gdm.d/00-login-screen) [org/gnome/login-screen] # Do not show the user list disable-user-list=true Run the following command to update the system databases: # dconf update','[{\"cis\": [\"1.10\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(4552,'Ensure daytime services are not enabled','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 package be removed to reduce the attack surface area of the system. Note: If an xinetd service or services are required, ensure that any xinetd service not required is stopped and disabled','','Run the following command to remove xinetd: # yum remove xinetd','[{\"cis\": [\"2.1.2\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4553,'Ensure time synchronization is in use','System time should be synchronized between all systems in an environment. This is typically done by establishing an authoritative time server or set of servers and having all systems synchronize their clocks to them.','Time synchronization is important to support time sensitive security mechanisms like Kerberos and also ensures log files have consistent time records across the enterprise, which aids in forensic investigations.','','On systems where host based time synchronization is not available, install chrony or NTP: to install chrony run the following command: # yum install chrony OR to install ntp: run the following command: # yum install ntp','[{\"cis\": [\"2.2.1.1\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"10.4\"]}, {\"nist_800_53\": [\"AU.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4554,'Ensure chrony is configured','chrony is a daemon which implements the Network Time Protocol (NTP) and is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on chrony can be found at http://chrony.tuxfamily.org/. chrony can be configured to be a client and/or a server.','If chrony is in use on the system proper configuration is vital to ensuring time synchronization is working properly. Note: This recommendation only applies if chrony is in use on the system.','','1) Add or edit server or pool lines to /etc/chrony.conf as appropriate: server <remote-server>. 2) Add or edit the OPTIONS in /etc/sysconfig/chronyd to include '-u chrony':OPTIONS="-u chrony"','[{\"cis\": [\"2.2.1.3\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4555,'Ensure ntp is configured','ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at https://www.ntp.org. ntp can be configured to be a client and/or a server.','If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly.','','1) Add or edit restrict lines in /etc/ntp.conf to match the following: - restrict -4 default kod nomodify notrap nopeer noquery and - restrict -4 default kod nomodify notrap nopeer noquery. 2) Add or edit server or pool lines to /etc/ntp.conf as appropriate: server <remote-server>. 3) Add or edit the OPTIONS in /etc/sysconfig/ntpd to include ' -u ntp:ntp ': - OPTIONS='-u ntp:ntp'','[{\"cis\": [\"2.2.1.2\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4556,' Ensure X11 Server components are not installed','The X Window System provides a Graphical User Interface (GUI) where users can have multiple windows in which to run programs and various add on. The X Windows system is typically used on workstations where users login, but not on servers where users typically do not login.','Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface.','','Run the following command to remove the X Windows System packages: # yum remove xorg-x11*','[{\"cis\": [\"2.2.2\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4557,' Ensure Avahi Server is not installed','Avahi is a free zeroconf implementation, including a system for multicast DNS/DNS-SD service discovery. Avahi allows programs to publish and discover services and hosts running on a local network with no specific configuration. For example, a user can plug a computer into a network and Avahi automatically finds printers to print to, files to look at and people to talk to, as well as network services running on the machine.','Automatic discovery of network services is not normally required for system functionality. It is recommended to remove this package to reduce the potential attack surface.','','Run the following commands to stop, mask and remove avahi-autoipd and avahi: # systemctl stop avahi-daemon.socket avahi-daemon.service; # yum remove avahi-autoipd avahi','[{\"cis\": [\"2.2.3\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4558,'Ensure CUPS is not installed','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 removed to reduce the potential attack surface. Disabling CUPS will prevent printing from the system, a common task for workstation systems.','','Run the following command to remove cups: # yum remove cups','[{\"cis\": [\"2.2.4\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4559,'Ensure DHCP Server is not installed','The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses.','Unless a system is specifically set up to act as a DHCP server, it is recommended that this the dhcp package be removed to reduce the potential attack surface.','','Run the following command to remove dhcpd: # yum remove dhcp','[{\"cis\": [\"2.2.5\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4560,'Ensure LDAP Server is not installed','The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.','If the system will not need to act as an LDAP server, it is recommended that the software be removed to reduce the potential attack surface.','','Run the following command to remove slapd: # yum remove openldap-servers','[{\"cis\": [\"2.2.6\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4561,'Ensure nfs-utils is not installed or the nfs-server service is masked','The Network File System (NFS) is one of the first and most widely distributed file systems in the UNIX environment. It provides the ability for systems to mount file systems of other servers through the network.','If the system does not require network shares, it is recommended that the nfs-utils package be removed to reduce the attack surface of the system.','','Run the following command to remove nfs-utils: # yum remove nfs-utils; OR if the nfs-package is required as a dependency: run the following command to stop and mask the nfs-server service: # systemctl --now mask nfs-server','[{\"cis\": [\"2.2.7\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4562,'Ensure nfs-utils is not installed or the nfs-server service is masked','The rpcbind utility maps RPC services to the ports on which they listen. RPC processes notify rpcbind when they start, registering the ports they are listening on and the RPC program numbers they expect to serve. The client system then contacts rpcbind on the server with a particular RPC program number. The rpcbind service redirects the client to the proper port number so it can communicate with the requested service Portmapper is an RPC service, which always listens on tcp and udp 111, and is used to map other RPC services (such as nfs, nlockmgr, quotad, mountd, etc.) to their corresponding port number on the server. When a remote host makes an RPC call to that server, it first consults with portmap to determine where the RPC server is listening','A small request (~82 bytes via UDP) sent to the Portmapper generates a large response (7x to 28x amplification), which makes it a suitable tool for DDoS attacks. If rpcbind is not required, it is recommended that the rpcbind package be removed to reduce the attack surface of the system.','','Run the following command to remove nfs-utils: # yum remove nfs-utils; OR if the nfs-package is required as a dependency: run the following command to stop and mask the nfs-server service: # systemctl --now mask nfs-server','[{\"cis\": [\"2.2.8\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4563,' Ensure DNS Server is not installed ','The Domain Name System (DNS) is a hierarchical naming system that maps names to IP addresses for computers, services and other resources connected to a network.','Unless a system is specifically designated to act as a DNS server, it is recommended that the package be removed to reduce the potential attack surface.','','Run the following command to disable named: # yum remove bind','[{\"cis\": [\"2.2.9\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4564,'Ensure FTP Server is not installed','FTP (File Transfer Protocol) is a traditional and widely used standard tool for transferring files between a server and clients over a network, especially where no authentication is necessary (permits anonymous users to connect to a server)','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 removed to reduce the potential attack surface.','','Run the following command to disable vsftpd: # yum remove vsftpd','[{\"cis\": [\"2.2.10\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4565,'Ensure HTTP server is not installed','HTTP or web servers provide the ability to host web site content.','Unless there is a need to run the system as a web server, it is recommended that the package be removed to reduce the potential attack surface.','','Run the following command to disable httpd: # yum remove httpd','[{\"cis\": [\"2.2.11\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4566,'Ensure IMAP and POP3 server is not installed','dovecot is an open source IMAP and POP3 server for Linux based systems.','Unless POP3 and/or IMAP servers are to be provided by this system, it is recommended that the package be removed to reduce the potential attack surface.','','Run the following command to disable dovecot: # yum remove dovecot','[{\"cis\": [\"2.2.12\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4567,'Ensure Samba is not installed','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 package can be removed to reduce the potential attack surface.','','Run the following command to disable smb: # yum remove samba','[{\"cis\": [\"2.2.13\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4568,'Ensure HTTP Proxy Server is not installed','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 package be removed to reduce the potential attack surface.','','Run the following command to disable squid: # yum remove squid','[{\"cis\": [\"2.2.14\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4569,'Ensure SNMP Server is not installed','The Simple Network Management Protocol (SNMP) server is used to listen for SNMP commands from an SNMP management system, execute the commands or collect the information and then send results back to the requesting system.','The SNMP server can communicate using SNMPv1, which transmits data in the clear and does not require authentication to execute commands. SNMPv3replaces the simple/clear text password sharing used in SNMPv2with more securely encoded parameters. If the SNMP service is not required, the net-snmp package should be removed to reduce the attack surface of the system.','','Run the following command to disable snmpd: # # yum remove net-snmp','[{\"cis\": [\"2.2.15\"]}, {\"cis_csc\": [\"2.6\", \"9.2\"\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4570,'Ensure mail transfer agent is configured for local-only mode','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.','','Edit /etc/postfix/main.cf and add the following line to the RECEIVING MAIL section. If the line already exists, change it to look like the line below: inet_interfaces = loopback-only . Restart postfix: # systemctl restart postfix','[{\"cis\": [\"2.2.16\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AC.4\", \"SC.7\"]}, {\"tsc\": [\"CC5.2\", \"CC6.4\", \"CC6.6\", \"CC6.7\"]}]'),(4571,'Ensure rsync is not installed or the rsyncd service is masked','The rsyncd service can be used to synchronize files between systems over network links.','Unless required, the rsync package should be removed to reduce the attack surface area of the system. The rsyncd service presents a security risk as it uses unencrypted protocols for communication.','','Run the following command to remove the rsync package: # yum remove rsync; OR run the following command to mask the rsyncd service: # systemctl --now mask rsyncd','[{\"cis\": [\"2.2.17\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AC.4\", \"SC.7\"]}, {\"tsc\": [\"CC5.2\", \"CC6.4\", \"CC6.6\", \"CC6.7\"]}]'),(4572,'Ensure NIS Server is not installed','The ypserv package provides the Network Information Service (NIS). This service, 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 has been replaced by such protocols as Lightweight Directory Access Protocol (LDAP). It is recommended that the ypservpackage be removed, and if required a more secure services be used.','','Run the following command to disable ypserv: # yum remove ypserv','[{\"cis\": [\"2.2.18\"]}, {\"cis_csc\": [\"2.6\", \"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4573,'Ensure telnet server is not installed','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.','','Run the following command to disable telnet: # yum remove telnet-server','[{\"cis\": [\"2.2.19\"]}, {\"cis_csc\": [\"2.6\", \"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4574,'Ensure NIS Client is not installed','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.','','Run the following command to uninstall ypbind: # yum remove ypbind','[{\"cis\": [\"2.3.1\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4575,'Ensure rsh client is not installed','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 .','','Run the following command to uninstall rsh: # yum remove rsh','[{\"cis\": [\"2.3.2\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4576,'Ensure talk client is not installed','The talk software makes it possible for users to send and receive messages across systems through a terminal session. The talk client, which allows initialization of talk sessions, is installed by default.','The software presents a security risk as it uses unencrypted protocols for communication.','','Run the following command to uninstall talk: # yum remove talk','[{\"cis\": [\"2.3.3\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4577,'Ensure telnet client is not installed','The telnet package contains the telnet client, which allows users to start connections to other systems via the telnet protocol.','The telnet protocol is insecure and unencrypted. The use of an unencrypted transmission medium could allow an unauthorized user to steal credentials. The ssh package provides an encrypted session and stronger security and is included in most Linux distributions.','','Run the following command to uninstall telnet: # yum remove telnet','[{\"cis\": [\"2.3.4\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4578,'Ensure LDAP client is not installed','The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.','If the system will not need to act as an LDAP client, it is recommended that the software be removed to reduce the potential attack surface.','','Run the following command to uninstall openldap-clients: # yum remove openldap-clients','[{\"cis\": [\"2.3.5\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4579,'Ensure nonessential services are removed or masked','A network port is identified by its number, the associated IP address, and the type of the communication protocol such as TCP or UDP.A listening port is a network port on which an application or process listens on, acting as a communication endpoint. Each listening port can be open or closed (filtered) using a firewall. In general terms, an open port is a network port that accepts incoming packets from remote locations','Services listening on the system pose a potential risk as an attack vector. These services should be reviewed, and if not required, the service should be stopped, and the package containing the service should be removed. If required packages have a dependency, the service should be stopped and masked to reduce the attack surface of the system.','','Review the output of: # lsof -i -P -n | grep -v '(ESTABLISHED)'; to ensure that all services listed are required on the system. If a listed service is not required, remove the package containing the service. If the package containing the service is required, stop and mask the service. Run the following command to remove the package containing the service:# yum remove <package_name> OR if required packages have a dependency: run the following command to stop and mask the service:# systemctl --now mask <service_name>','[{\"cis\": [\"2.5\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4580,'Disable IPv6','Although IPv6 has many advantages over IPv4, not all organizations have IPv6 or dual stack configurations implemented.','If IPv6 or dual stack is not to be used, it is recommended that IPv6be disabled to reduce the attack surface of the system.','','To disable IPv6 through the GRUB2 config: edit /etc/default/gruband add ipv6.disable=1 to the GRUB_CMDLINE_LINUX parameters: GRUB_CMDLINE_LINUX="ipv6.disable=1" Run the following command to update the grub2 configuration:# grub2-mkconfig –o /boot/grub2/grub.cfg; OR to disable IPv6 through sysctl settings: set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: # net.ipv6.conf.all.disable_ipv6 = 1; # net.ipv6.conf.default.disable_ipv6 = 1; Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.disable_ipv6=1; # sysctl -w net.ipv6.conf.default.disable_ipv6=1; # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.1.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4581,'Ensure wireless interfaces are disabled','Wireless networking is used when wired networks are unavailable.','If wireless is not to be used, wireless devices should be disabled to reduce the potential attack surface','','Run the following command to disable any wireless interfaces: # ip link set <interface> down','[{\"cis\": [\"3.1.2\"]}, {\"cis_csc\": [\"15.4\", \"15.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4582,'Ensure IP forwarding is disabled','The net.ipv4.ip_forward flag is used to tell the system whether it can forward packets or not.','Setting the flag to 0 ensures that a system with multiple interfaces (for example, a hard proxy), will never be able to forward packets, and therefore, never serve as a router.','','Run the following commands to restore the default parameters and set the active kernel parameters: # grep -Els '^s*net.ipv4.ip_forwards*=s*1' /etc/sysctl.conf /etc/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /run/sysctl.d/*.conf | while read filename; do sed -ri 's/^s*(net.ipv4.ip_forwards*)(=)(s*S+).*$/# *REMOVED* 1/' $filename; done; sysctl -w net.ipv4.ip_forward=0; sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4583,'Ensure packet redirect sending is disabled','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.send_redirects = 0; net.ipv4.conf.default.send_redirects = 0 and set the active kernel parameters. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.send_redirects=0; # sysctl -w net.ipv4.conf.default.send_redirects=0; # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4584,'Ensure source routed packets are not accepted','In networking, source routing allows a sender to partially or fully specify the route packets take through a network. In contrast, non-source routed packets travel a path determined by routers in the network. In some cases, systems may not be routable or reachable from some locations (e.g. private addresses vs. Internet routable), and so source routed packets would need to be used.','Setting net.ipv4.conf.all.accept_source_route and net.ipv4.conf.default.accept_source_route to 0 disables the system from accepting source routed packets. Assume this system was capable of routing packets to Internet routable addresses on one interface and private addresses on another interface. Assume that the private addresses were not routable to the Internet routable addresses and vice versa. Under normal routing circumstances, an attacker from the Internet routable addresses could not use the system as a way to reach the private address systems. If, however, source routed packets were allowed, they could be used to gain access to the private address systems as the route could be specified, rather than rely on routing protocols that did not allow this routing.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_source_route = 0; net.ipv4.conf.default.accept_source_route = 0 and set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_source_route=0 # sysctl -w net.ipv4.conf.default.accept_source_route=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.3.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4585,'Ensure ICMP redirects are not accepted','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.','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_redirects = 0; net.ipv4.conf.default.accept_redirects = 0 and set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_redirects=0 # sysctl -w net.ipv4.conf.default.accept_redirects=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.3.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4586,'Ensure secure ICMP redirects are not accepted','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.secure_redirects = 0; net.ipv4.conf.default.secure_redirects = 0 and set the active kernel parameters: # sysctl -w net.ipv4.conf.all.secure_redirects=0 # sysctl -w net.ipv4.conf.default.secure_redirects=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.3.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4587,'Ensure suspicious packets are logged','When enabled, this feature logs packets with un-routable source addresses to the kernel log.','Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.log_martians = 1; net.ipv4.conf.default.log_martians = 1 and set the active kernel parameters: # sysctl -w net.ipv4.conf.all.log_martians=1 # sysctl -w net.ipv4.conf.default.log_martians=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.3.4\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4588,'Ensure broadcast ICMP requests are ignored','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.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_echo_ignore_broadcasts = 1 and set the active kernel parameters: # sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.3.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4589,'Ensure bogus ICMP responses are ignored','Setting icmp_ignore_bogus_error_responses to 1 prevents the kernel from logging bogus responses (RFC-1122 non-compliant) from broadcast reframes, keeping file systems from filling up with useless log messages.','Some routers (and some attackers) will send responses that violate RFC-1122 and attempt to fill up a log file system with many useless error messages.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_ignore_bogus_error_responses = 1 and set the active kernel parameters: # sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.3.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4590,'Ensure Reverse Path Filtering is enabled','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 would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your system, you will not be able to enable this feature without breaking the routing.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.rp_filter = 1; net.ipv4.conf.default.rp_filter = 1 and set the active kernel parameters: # sysctl -w net.ipv4.conf.all.rp_filter=1 # sysctl -w net.ipv4.conf.default.rp_filter=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.3.7\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4591,'Ensure TCP SYN Cookies is enabled','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.','Attackers use SYN flood attacks to perform a denial of service attacked on a system by sending many SYN packets without completing the three way handshake. This will quickly use up slots in the kernel's half-open connection queue and prevent legitimate connections from succeeding. SYN cookies allow the system to keep accepting valid connections, even if under a denial of service attack.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.tcp_syncookies = 1 and set the active kernel parameters: # sysctl -w net.ipv4.tcp_syncookies=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.3.8\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4592,'Ensure IPv6 router advertisements are not accepted','This setting disables the system's ability to accept IPv6 router advertisements.','It is recommended that systems not accept router advertisements as they could be tricked into routing traffic to compromised machines. Setting hard routes within the system (usually a single default route to a trusted router) protects the system from bad routes.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_ra = 0 and net.ipv6.conf.default.accept_ra = 0 Then, run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_ra=0 # sysctl -w net.ipv6.conf.default.accept_ra=0 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.3.9\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4593,'Ensure DCCP is disabled','The Datagram Congestion Control Protocol (DCCP) is a transport layer protocol that supports streaming media and telephony. DCCP provides a way to gain access to congestion control, without having to do it at the application layer, but does not provide in-sequence delivery.','If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install dccp /bin/true','[{\"cis\": [\"3.4.1\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4594,'Ensure SCTP is disabled','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.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install sctp /bin/true','[{\"cis\": [\"3.4.2\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4595,'Ensure FirewallD or nftables or iptables-services is installed','firewalld is a firewall management tool for Linux operating systems. It provides firewall features by acting as a front-end for the Linux kernel's net filter framework via the iptables backend or provides firewall features by acting as a front-end for the Linux kernel's netfilter framework via the nftables utility. FirewallD replaces iptables as the default firewall management tool. Use the firewalld utility to configure a firewall for less complex firewalls. The utility is easy to use and covers the typical use cases scenario. FirewallD supports both IPv4 and IPv6 networks and can administer separate firewall zones with varying degrees of trust as defined in zone profiles.','A firewall utility is required to configure the Linux kernel's netfilter framework via the iptables or nftables back-end. The Linux kernel's netfilter framework host-based firewall can protect against threats originating from within a corporate network to include malicious mobile code and poorly configured software on a host.','','Run the following command to install firewalld: # yum install firewalld iptables; OR to install nftables: # yum install nftables; OR to install iptables-services: # yum install iptables-services iptables','[{\"cis\": [\"3.5.1.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4596,'Ensure iptables-services and FirewallD are not installed at the same time','The iptables-services package contains the iptables.service and ip6tables.service. These services allow for management of the Host Based Firewall provided by the iptables package.','iptables.service and ip6tables.service are still supported and can be installed with the iptables-services package. Running both firewalld and the services included in the iptables-services package may lead to conflict.','','Run the following commands to stop the services included in the iptables-services package and remove the iptables-services package: # systemctl stop iptables; # systemctl stop ip6tables; # yum remove iptables-services. OR Run the following command to remove firewalld: # yum remove firewalld OR Run the following command to stop and mask firewalld: # systemctl --now mask firewalld','[{\"cis\": [\"3.5.1.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4597,'Ensure nftables and FirewallD are not installed at the same time or ensure one of them is stopped and masked','nftables is a subsystem of the Linux kernel providing filtering and classification of network packets/datagrams/frames and is the successor to iptables.Note: Support for using nftables as the back-end for firewalld was added in release v0.6.0. In Fedora 19 Linux derivatives, firewalld utilizes iptables as its back-end by default.','Running both firewalld and nftables may lead to conflict.','','Run the following command to remove nftables:# yum remove nftables; OR run the following command to stop and mask nftables: # systemctl --now mask nftables. OR Run the following command to remove firewalld: # yum remove firewalld OR Run the following command to stop and mask firewalld: # systemctl --now mask firewalld','[{\"cis\": [\"3.5.1.3\", \"3.5.3.1.3\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4598,'Ensure nftables and iptables-services are not installed at the same time or ensure one of them is stopped and masked','nftables is a subsystem of the Linux kernel providing filtering and classification of network packets/datagrams/frames and is the successor to iptables.Note: Support for using nftables as the back-end for firewalld was added in release v0.6.0. In Fedora 19 Linux derivatives, firewalld utilizes iptables as its back-end by default.','Running both nftables and nftables may lead to conflict.','','Run the following command to remove nftables:# yum remove nftables; OR run the following command to stop and mask nftables: # systemctl --now mask nftables. OR Run the following command to remove iptables# # systemctl stop iptables; # systemctl stop ip6tables; # yum remove iptables-services','[{\"cis\": [\"3.5.1.3\", \"3.5.3.1.3\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4599,'Ensure firewalld service is enabled and running','firewalld.serviceenables the enforcement of firewall rules configured through firewalld','Ensure that the firewalld.service is enabled and running to enforce firewall rules configured through firewalld','','Run the following command to unmask firewalld: # systemctl unmask firewalld; Run the following command to enable and start firewalld: # systemctl --now enable firewalld','[{\"cis\": [\"3.5.1.4\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4600,'Ensure a table exists','nTables hold chains. Each table only has one address family and only applies to packets of this family. Tables can have one of five families.','nftables doesn't have any default tables. Without a table being build, nftables will not filter network traffic.','','Run the following command to create a table in nftables: # nft create table inet <table name>','[{\"cis\": [\"3.5.2.5\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4601,'Ensure base chains exist','Chains are containers for rules. They exist in two kinds, base chains and regular chains. A base chain is an entry point for packets from the networking stack, a regular chain may be used as jump target and is used for better rule organization.','If a base chain doesn't exist with a hook for input, forward, and delete, packets that would flow through those chains will not be touched by nftables.','','Run the following command to create the base chains: # nft createchain inet <table name> <base chain name> { type filter hook <(input|forward|output)> priority 0 ; } ','[{\"cis\": [\"3.5.2.6\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4602,'Ensure loopback traffic is configured','Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network','Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.','','Run the following commands to implement the loopback rules: # nft add rule inet filter input iif lo accept; # nft create rule inet filter input ip saddr 127.0.0.0/8 counter drop; IF IPv6 is enabled: run the following command to implement the IPv6 loopback rules: # nft add rule inet filter input ip6 saddr::1 counter drop','[{\"cis\": [\"3.5.2.7\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4603,'Ensure outbound and established connections are configured','Configure the firewall rules for new outbound and established connections.','If rules are not in place for new outbound and established connections, all packets will be dropped by the default policy preventing network usage.','','Configure nftables in accordance with site policy. The following commands will implement a policy to allow all outbound connections and all established connections: # nft add rule inet filter input ip protocol tcp ct state established accept; # nft add rule inet filter input ip protocol udp ct state established accept; # nft add rule inet filter input ip protocol icmp ct state established accept; # nft add rule inet filter output ip protocol tcp ct state new,related,established accept; # nft add rule inet filter output ip protocol udp ct state new,related,established accept; # nft add rule inet filter output ip protocol icmp ct state new,related,established accept','[{\"cis\": [\"3.5.2.8\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4604,'Ensure default deny firewall policy','Base chain policy is the default verdict that will be applied to packets reaching the end of the chain.','There are two policies: accept (Default) and drop. If the policy is set to accept, the firewall will accept any packet that is not configured to be denied and the packet will continue traversing the network stack. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following command for the base chains with the input, forward, and output hooks to implement a default DROP policy: # nft chain <table family> <table name> <chain name> { policy drop ; }','[{\"cis\": [\"3.5.2.9\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4605,'Ensure nftables service is enabled','The nftables service allows for the loading of nftables rulesets during boot, or starting on the nftables service','The nftables service restores the nftables rules from the rules files referenced in the /etc/sysconfig/nftables.conffile during boot or the starting of the nftables service','','Run the following command to enable the nftables service: # systemctl enable nftables','[{\"cis\": [\"3.5.2.10\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4606,'Ensure nftables rules are permanent','nftables is a subsystem of the Linux kernel providing filtering and classification of network packets/datagrams/frames. The nftables service reads the /etc/sysconfig/nftables.conffile for a nftables file or files to include in the nftables ruleset. A nftables ruleset containing the input, forward, and output base chains allow network traffic to be filtered.','Changes made to nftables ruleset only affect the live system, you will also need to configure the nftables ruleset to apply on boot','','Run the following command to enable the nftables service: # systemctl enable nftables','[{\"cis\": [\"3.5.2.11\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4607,'Ensure default deny firewall policy','A default deny all policy on connections ensures that any unconfigured network usage will be rejected.','With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following commands to implement a default DROP policy: # iptables -P INPUT DROP # iptables -P OUTPUT DROP # iptables -P FORWARD DROP','[{\"cis\": [\"3.5.3.2.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4608,'Ensure loopback traffic is configured','Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (127.0.0.0/8).','Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (127.0.0.0/8) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.','','Run the following commands to implement the loopback rules: # iptables -A INPUT -i lo -j ACCEPT # iptables -A OUTPUT -o lo -j ACCEPT # iptables -A INPUT -s 127.0.0.0/8 -j DROP','[{\"cis\": [\"3.5.3.2.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4609,'Ensure iptables is enabled and running','iptables.service is a utility for configuring and maintaining iptables.','iptables.service willload the iptables rules saved in the file /etc/sysconfig/iptablesat boot, otherwise the iptables rules will be cleared during a re-boot of the system.','','Run the following commands to implement a default DROP policy: # ip6tables -P INPUT DROP; # ip6tables -P OUTPUT DROP; # ip6tables -PFORWARD DROP','[{\"cis\": [\"3.5.3.2.6\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4610,'Ensure IPv6 default deny firewall policy','A default deny all policy on connections ensures that any unconfigured network usage will be rejected.','With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following commands to implement a default DROP policy: # ip6tables -P INPUT DROP; # ip6tables -P OUTPUT DROP; # ip6tables -PFORWARD DROP','[{\"cis\": [\"3.5.3.3.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4611,'Ensure IPv6 loopback traffic is configured','Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic tothe loopback network (::1).','Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (::1) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure','','Run the following commands to implement the loopback rules:# ip6tables -A INPUT -i lo -j ACCEPT# ip6tables -A OUTPUT -o lo -j ACCEPT# ip6tables -A INPUT -s::1 -j DROP','[{\"cis\": [\"3.5.3.3.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4612,'Ensure IPv6 outbound and established connections are configured','Configure the firewall rules for new outbound, and established IPv6 connections.','If rules are not in place for new outbound, and established connections all packets will be dropped by the default policy preventing network usage','','Configure iptables in accordance with site policy. The following commands will implement a policy to allow all outbound connections and all established connections:# ip6tables -AOUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT# ip6tables -A OUTPUT -p udp -m state --state NEW,ESTABLISHED -j ACCEPT# ip6tables -A OUTPUT -p icmp -m state --state NEW,ESTABLISHED -j ACCEPT# ip6tables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT# ip6tables -A INPUT -p udp -m state --state ESTABLISHED -j ACCEPT# ip6tables -A INPUT -p icmp -m state --state ESTABLISHED -j ACCEPT','[{\"cis\": [\"3.5.3.3.3\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4613,'Ensure ip6tables is enabled and running','ip6tables.service is a utility for configuring and maintaining ip6tables.','ip6tables.service will load the iptables rules saved in the file /etc/sysconfig/ip6tables at boot, otherwise the ip6tables rules will be cleared during a re-boot of the system.','','Run the following command to enable and start ip6tables: # systemctl --now start ip6tables','[{\"cis\": [\"3.5.3.3.3\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(4614,'Ensure auditd is installed','auditd is the userspace component to the Linux Auditing System. It's responsible for writing audit records to the disk.','The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring.','','Run the following command to Install auditd # yum install audit audit-libs','[{\"cis\": [\"4.1.1.1\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.1\", \"10.7\"]}, {\"tsc\": [\"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4615,'Ensure auditd service is enabled and running','Turn on the auditd daemon to record system events.','The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring.','','Run the following command to enable auditd: # systemctl --now enable auditd','[{\"cis\": [\"4.1.1.2\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.1\", \"10.7\"]}, {\"tsc\": [\"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4616,'Ensure auditing for processes that start prior to auditd is enabled','Configure grub so that processes that are capable of being audited can be audited even if they start up prior to auditd startup.','Audit events need to be captured on processes that start up prior to auditd, so that potential malicious activity cannot go undetected. Note: This recommendation is designed around the grub2 bootloader, if LILO or another bootloader is in use in your environment enact equivalent settings.','','Edit /etc/default/grub and add audit=1 to GRUB_CMDLINE_LINUX: GRUB_CMDLINE_LINUX="audit=1" . Run the following command to update the grub2 configuration: # grub2-mkconfig -o /boot/grub2/grub.cfg','[{\"cis\": [\"4.1.1.3\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.2.6\", \"10.7\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"35.7.d\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4617,'Ensure audit log storage size is configured','Configure the maximum size of the audit log file. Once the log reaches the maximum size, it will be rotated and a new log file will be started.','It is important that an appropriate size is determined for log files so that they do not impact the system and audit data is not lost.','','Set the following parameter in /etc/audit/auditd.conf in accordance with site policy: max_log_file = <MB>','[{\"cis\": [\"4.1.2.1\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"10.7\"]}]'),(4618,'Ensure audit logs are not automatically deleted','The max_log_file_action setting determines how to handle the audit log file reaching the max file size. A value of keep_logs will rotate the logs but never delete old logs.','In high security contexts, the benefits of maintaining a long audit history exceed the cost of storing the audit history.','','Set the following parameter in /etc/audit/auditd.conf: max_log_file_action = keep_logs','[{\"cis\": [\"4.1.2.2\"]}, {\"cis_csc\": [\"6.2\", \"6.4\"]}, {\"pci_dss\": [\"10.7\"]}]'),(4619,'Ensure system is disabled when audit logs are full','The auditd daemon can be configured to halt the system when the audit logs are full.','In high security contexts, the risk of detecting unauthorized access or nonrepudiation exceeds the benefit of the system's availability.','','Set the following parameters in /etc/audit/auditd.conf: space_left_action = email action_mail_acct = root admin_space_left_action = halt','[{\"cis\": [\"4.1.2.3\"]}, {\"cis_csc\": [\"6.2\", \"6.4\"]}, {\"pci_dss\": [\"10.7\"]}]'),(4620,'Ensure audit_backlog_limit is sufficient','The backlog limit has a default setting of 64','During boot if audit=1, then the backlog will hold 64 records. If more than 64 records are created during boot, auditd records will be lost and potential malicious activity could go undetected','','Edit /etc/default/grub and add audit_backlog_limit=<BACKLOG SIZE> to GRUB_CMDLINE_LINUX: Example: GRUB_CMDLINE_LINUX="audit_backlog_limit=8192" Run the following command to update the grub2 configuration: # grub2-mkconfig -o /boot/grub2/grub.cfg','[{\"cis\": [\"4.1.2.4\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.7\"]}]'),(4621,'Ensure events that modify date and time information are collected','Capture events where the system date and/or time has been modified. The parameters in this section are set to determine if the adjtimex (tune kernel clock), settimeofday (Set time, using timeval and timezone structures) stime (using seconds since 1/1/1970) or clock_settime (allows for the setting of several internal clocks and timers) system calls have been executed and always write an audit record to the /var/log/audit.log file upon exit, tagging the records with the identifier "time-change".','Unexpected changes in system date and/or time could be a sign of malicious activity on the system.','','For 32 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/time-change.rules and add the following lines: -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change -a always,exit -F arch=b32 -S clock_settime -k time-change -w /etc/localtime -p wa -k time-change For 64 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/time-change.rules and add the following lines: -a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change -a always,exit -F arch=b64 -S clock_settime -k time-change -a always,exit -Farch=b32 -S clock_settime -k time-change -w /etc/localtime -p wa -k time-change. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.3\"]}, {\"cis_csc\": [\"5.5\"]}, {\"pci_dss\": [\"10.4.2\", \"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4622,'Ensure events that modify user/group information are collected','Record events affecting the group, passwd (user IDs), shadow and gshadow (passwords) or /etc/security/opasswd (old passwords, based on remember parameter in the PAM configuration) files. The parameters in this section will watch the files to see if they have been opened for write or have had attribute changes (e.g. permissions) and tag them with the identifier "identity" in the audit log file.','Unexpected changes to these files could be an indication that the system has been compromised and that an unauthorized user is attempting to hide their activities or compromise additional accounts.','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/identity.rules and add the following lines: -w /etc/group -p wa -k identity -w /etc/passwd -p wa -k identity -w /etc/gshadow -p wa -k identity -w /etc/shadow -p wa -k identity -w /etc/security/opasswd -p wa -k identity. Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.4\"]}, {\"cis_csc\": [\"4.8\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4623,'Ensure events that modify the system's network environment are collected','Record changes to network environment files or system calls. The below parameters monitor the sethostname (set the systems host name) or setdomainname (set the systems domainname) system calls, and write an audit event on system call exit. The other parameters monitor the /etc/issue and /etc/issue.net files (messages displayed pre-login), /etc/hosts (file containing host names and associated IP addresses), /etc/sysconfig/network file and /etc/sysconfig/network-scripts/ directory (containing network interface scripts and configurations).','Monitoring sethostname and setdomainname will identify potential unauthorized changes to host and domainname of a system. The changing of these names could potentially break security parameters that are set based on those names. The /etc/hosts file is monitored for changes in the file that can indicate an unauthorized intruder is trying to change machine associations with IP addresses and trick users and processes into connecting to unintended machines. Monitoring /etc/issue and /etc/issue.net is important, as intruders could put disinformation into those files and trick users into providing information to the intruder. Monitoring /etc/sysconfig/network and /etc/sysconfig/network-scripts/ is important as it can show if network interfaces or scripts are being modified in a way that can lead to the machine becoming unavailable or compromised. All audit records will be tagged with the identifier "system-locale."','','For 32 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/system-locale.rules and add the following lines: -a always,exit -F arch=b32 -S sethostname -S setdomainname -k system-locale -w /etc/issue -p wa -k system-locale -w /etc/issue.net -p wa -k system-locale -w /etc/hosts -p wa -k system-locale -w /etc/sysconfig/network -p wa -k system-locale For 64 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/system-locale.rules and add the following lines: -a always,exit -F arch=b64 -S sethostname -S setdomainname -k system-locale -a always,exit -F arch=b32 -S sethostname -S setdomainname -k system-locale -w /etc/issue -p wa -k system-locale -w /etc/issue.net -p wa -k system-locale -w /etc/hosts -p wa -k system-locale -w /etc/sysconfig/network -p wa -k system-locale ','[{\"cis\": [\"4.1.5\"]}, {\"cis_csc\": [\"5.5\", \"6.2\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4624,'Ensure events that modify the system's Mandatory Access Controls are collected','Monitor SELinux mandatory access controls. The parameters below monitor any write access (potential additional, deletion or modification of files in the directory) or attribute changes to the /etc/selinux/ and /usr/share/selinux/ directories.','Changes to files in the /etc/selinux/ and /usr/share/selinux/ directories could indicate that an unauthorized user is attempting to modify access controls and change security contexts, leading to a compromise of the system.','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/MAC-policy.rules and add the following lines: -w /etc/selinux/ -p wa -k MAC-policy -w /usr/share/selinux/ -p wa -k MAC-policy .','[{\"cis\": [\"4.1.6\"]}, {\"cis_csc\": [\"5.5\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4625,'Ensure login and logout events are collected','Monitor login and logout events. The parameters below track changes to files associated with login/logout events. The file /var/log/faillog tracks failed events from login. The file /var/log/lastlog maintain records of the last time a user successfully logged in. The /var/run/faillock/ directory maintains records of login failures via the pam_faillock module. The file /var/log/tallylog maintains records of failures via the pam_tally2 module','Monitoring login/logout events could provide a system administrator with information associated with brute force attacks against user logins.','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/logins.rules and add the following lines: -w /var/log/lastlog -p wa -k logins -w /var/run/faillog/ -p wa -k logins IF the pam_faillock.so module is used: Also include the line: -w /var/run/faillock/ -p wa -k logins OR IF the pam_tally2.so module is used: Also include the line: -w /var/log/tallylog -p wa -k logins','[{\"cis\": [\"4.1.7\"]}, {\"cis_csc\": [\"4.9\", \"16.11\", \"16.13\"]}, {\"pci_dss\": [\"10.2.1\", \"10.2.4\", \"10.3\"]}, {\"nist_800_53\": [\"AC.7\", \"AU.14\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4626,'Ensure session initiation information is collected','Monitor session initiation events. The parameters in this section track changes to the files associated with session events. The file /var/run/utmp file tracks all currently logged in users. All audit records will be tagged with the identifier "session." The /var/log/wtmp file tracks logins, logouts, shutdown, and reboot events. The file /var/log/btmp keeps track of failed login attempts and can be read by entering the command /usr/bin/last -f /var/log/btmp . All audit records will be tagged with the identifier "logins.".','Monitoring these files for changes could alert a system administrator to logins occurring at unusual hours, which could indicate intruder activity (i.e. a user logging in at a time when they do not normally log in).','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/logins.rules and add the following lines: -w /var/run/utmp -p wa -k session -w /var/log/wtmp -p wa -k logins -w /var/log/btmp -p wa -k logins . Notes: The last command can be used to read /var/log/wtmp ( last with no parameters) and /var/run/utmp ( last -f /var/run/utmp ) Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.8\"]}, {\"cis_csc\": [\"4.9\", \"16.11\", \"16.13\"]}, {\"pci_dss\": [\"10.3\"]}]'),(4627,'Ensure discretionary access control permission modification events are collected','Monitor changes to file permissions, attributes, ownership and group. The parameters in this section track changes for system calls that affect file permissions and attributes. The chmod, fchmod and fchmodat system calls affect the permissions associated with a file. The chown, fchown, fchownat and lchown system calls affect owner and group attributes on a file. The setxattr, lsetxattr, fsetxattr (set extended file attributes) and removexattr, lremovexattr, fremovexattr (remove extended file attributes) control extended file attributes. In all cases, an audit record will only be written for non-system user ids (auid >= 1000) and will ignore Daemon events (auid = 4294967295). All audit records will be tagged with the identifier "perm_mod."','Monitoring for changes in file attributes could alert a system administrator to activity that could indicate intruder activity or policy violation.','','For 32 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/perm_mod.rules and add the following lines: -a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod For 64 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/perm_mod.rules and add the following lines: -a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lrem . Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.9\"]}, {\"cis_csc\": [\"5.5\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4628,'Ensure unsuccessful unauthorized file access attempts are collected','Monitor for unsuccessful attempts to access files. The parameters below are associated with system calls that control creation ( creat ), opening ( open, openat ) and truncation ( truncate, ftruncate ) of files. An audit log record will only be written if the user is a non- privileged user (auid > = 1000), is not a Daemon event (auid=4294967295) and if the system call returned EACCES (permission denied to the file) or EPERM (some other permanent error associated with the specific system call). All audit records will be tagged with the identifier "access."','Failed attempts to open, create or truncate files could be an indication that an individual or process is trying to gain unauthorized access to the system.','','For 32 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/access.rules and add the following lines: -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access For 64 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/access.rules and add the following lines: -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access . Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.10\"]}, {\"cis_csc\": [\"14.9\"]}, {\"pci_dss\": [\"10.2.4\"]}, {\"nist_800_53\": [\"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4629,'Ensure successful file system mounts are collected','Monitor the use of the mount system call. The mount (and umount ) system call controls the mounting and unmounting of file systems. The parameters below configure the system to create an audit record when the mount system call is used by a non-privileged user.','It is highly unusual for a non privileged user to mount file systems to the system. While tracking mount commands gives the system administrator evidence that external media may have been mounted (based on a review of the source of the mount and confirming it's an external media type), it does not conclusively indicate that data was exported to the media. System administrators who wish to determine if data were exported, would also have to track successful open, creat and truncate system calls requiring write access to a file under the mount point of the external media file system. This could give a fair indication that a write occurred. The only way to truly prove it, would be to track successful writes to the external media. Tracking write system calls could quickly fill up the audit log and is not recommended. Recommendations on configuration options to track data export to media is beyond the scope of this document.','','For 32 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/mount.rules and add the following lines: -a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts For 64 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/mounts.rules and add the following lines: -a always,exit -F arch=b64 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts -a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts . Notes: This tracks successful and unsuccessful mount commands. File system mounts do not have to come from external media and this action still does not verify write (e.g. CD ROMS). Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.13\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4630,'Ensure file deletion events by users are collected','Monitor the use of system calls associated with the deletion or renaming of files and file attributes. This configuration statement sets up monitoring for ollowing system calls and tags them with the identifier "delete": unlink -remove a file unlinkat - remove a file attribute), rename (rename a file and renameat - rename a file attribute.','Monitoring these calls from non-privileged users could provide a system administrator with evidence that inappropriate removal of files and file attributes associated with protected files is occurring. While this audit option will look at all events, system administrators will want to look for specific privileged files that are being deleted or altered.','','For 32 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/delete.rules and add the following lines: -a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete For 64 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/delete.rules and add the following lines: -a always,exit -F arch=b64 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete -a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete . Notes: At a minimum, configure the audit system to collect file deletion events for all users and root. Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.13\"]}, {\"cis_csc\": [\"6.2\", \"13\"]}, {\"pci_dss\": [\"10.5.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC7.1\", \"CC7.2\", \"CC7.3\", \"CC8.1\"]}]'),(4631,'Ensure changes to system administration scope (sudoers) is collected','Monitor scope changes for system administrators. If the system has been properly configured to force system administrators to log in as themselves first and then use the sudo command to execute privileged commands, it is possible to monitor changes in scope. The file /etc/sudoers or a file in the /etc/sudoers.d directory will be written to when the file or its attributes have changed.','Changes in the /etc/sudoers file, or a file in the /etc/sudoers.d/ directory can indicate that an unauthorized change has been made to scope of system administrator activity.','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/scope.rules and add the following lines:: -w /etc/sudoers -p wa -k scope -w /etc/sudoers.d/ -p wa -k scope . Notes: Reloading the auditd config to set active settings may require a system reboot.','[{\"cis\": [\"4.1.14\"]}, {\"cis_csc\": [\"4.8\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4632,'Ensure system administrator actions (sudolog) are collected','Monitor the sudo log file. The sudo log file is configured in /etc/sudoersor a file in /etc/sudoers.d. If the system has been properly configured to disable the use of the su command and force all administrators to have to log in first and then use sudo to execute privileged commands, then all administrator commands will be logged to the sudo log file. Any time a command is executed, an audit event will be triggered as the sudo log file will be opened for write and the executed administration command will be written to the log.','Changes in /var/log/sudo.log indicate that an administrator has executed a command or the log file itself has been tampered with. Administrators will want to correlate the events written to the audit trail with the records written to /var/log/sudo.log to verify if unauthorized commands have been executed.','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules . Example: vi /etc/audit/rules.d/action.rules and add the following lines: -w /var/log/sudo.log -p wa -k actions .','[{\"cis\": [\"4.1.15\"]}, {\"cis_csc\": [\"4.9\", \"5.5\"]}, {\"pci_dss\": [\"10.2.2\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.6\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4633,'Ensure kernel module loading and unloading is collected','Monitor the loading and unloading of kernel modules. The programs insmod (install a kernel module), rmmod (remove a kernel module), and modprobe (a more sophisticated program to load and unload modules, as well as some other features) control loading and unloading of modules. The init_module (load a module) and delete_module (delete a module) system calls control loading and unloading of modules. Any execution of the loading and unloading module programs and system calls will trigger an audit record with an identifier of "modules".','Monitoring the use of insmod, rmmod and modprobe could provide system administrators with evidence that an unauthorized user loaded or unloaded a kernel module, possibly compromising the security of the system. Monitoring of the init_module and delete_module system calls would reflect an unauthorized user attempting to use a different program to load and unload modules.','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules. Example: vi /etc/audit/rules.d/modules.rules and add the following lines: -w /sbin/insmod -p x -k modules -w /sbin/rmmod -p x -k modules -w /sbin/modprobe -p x -k modules -a always,exit -F arch=b32 -S init_module -S delete_module -k modules For 64 bit systems Edit or create a file in the /etc/audit/rules.d/directory ending in .rules Example: vi /etc/audit/rules.d/modules.rules Add the following lines: -w /sbin/insmod -p x -k modules -w /sbin/rmmod -p x -k modules -w /sbin/modprobe -p x -k modules -a always,exit -F arch=b64 -S init_module -S delete_module -k modules ','[{\"cis\": [\"4.1.16\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4634,'Ensure the audit configuration is immutable','Set system audit so that audit rules cannot be modified with auditctl . Setting the flag "-e 2" forces audit to be put in immutable mode. Audit changes can only be made on system reboot.','In immutable mode, unauthorized users cannot execute changes to the audit system to potentially hide malicious activity and then put the audit rules back. Users would most likely notice a system reboot and that could alert administrators of an attempt to make unauthorized audit changes.','','Edit or create the file /etc/audit/rules.d/99-finalize.rulesand add the following line at the end of the file: -e 2','[{\"cis\": [\"4.1.17\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4635,'Ensure rsyslog is installed','The rsyslog software is a recommended replacement to the original syslogd daemon. rsyslog provides improvements over syslogd, including: - connection-oriented (i.e. TCP) transmission of logs - The option to log to database formats - Encryption of log data en route to a central logging server','The security enhancements of rsyslog and syslog-ng such as connection-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server) justify installing and configuring the package.','','Run the following command to install rsyslog: # yum install rsyslog','[{\"cis\": [\"4.2.1.1\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4636,'Ensure rsyslog Service is enabled and running','rsyslogneeds to be enabled and running to perform logging','If the rsyslog service is not activated the system may default to the syslogd service or lackblogging instead.','','Run the following command to enable rsyslog: # systemctl --now enable rsyslog','[{\"cis\": [\"4.2.1.1\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4637,'Ensure rsyslog default file permissions configured','rsyslog will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files.','It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected.','','Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and set $FileCreateMode to 0640 or more restrictive: $FileCreateMode 0640','[{\"cis\": [\"4.2.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4638,'Ensure rsyslog is configured to send logs to a remote log host','The rsyslog utility supports the ability to send logs it gathers to a remote log host running syslogd(8) or to receive messages from remote hosts, reducing administrative overhead.','Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.','','Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and add the following line (where loghost.example.com is the name of your central log host). *.* @@loghost.example.com Run the following command to reload the rsyslogd configuration: # systemctl restart rsyslog','[{\"cis\": [\"4.2.1.5\"]}, {\"cis_csc\": [\"6.6\", \"6.8\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4639,'Ensure journald is configured to send logs to rsyslog ','Data from journald may be stored in volatile memory or persisted locally on the server. Utilities exist to accept remote export of journald logs, however, use of the rsyslog service provides a consistent means of log collection and export.','Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.','','Edit the /etc/systemd/journald.conf file and add the following line: ForwardToSyslog=yes','[{\"cis\": [\"4.2.2.1\"]}, {\"cis_csc\": [\"6.5\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4640,'Ensure journald is configured to compress large log files','The journald system includes the capability of compressing overly large files to avoid filling up the system with logs or making the logs unmanageably large.','Uncompressed large files may unexpectedly fill a filesystem leading to resource unavailability. Compressing logs prior to write can prevent sudden, unexpected filesystem impacts.','','Edit the /etc/systemd/journald.conf file and add the following line: Compress=yes','[{\"cis\": [\"4.2.2.2\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4641,'Ensure journald is configured to compress large log files','Data from journald may be stored in volatile memory or persisted locally on the server. Logs in memory will be lost upon a system reboot. By persisting logs to local disk on the server they are protected from loss.','Writing log data to disk will provide the ability to forensically reconstruct events which may have impacted the operations or security of a system even after a system crash or reboot.','','Edit the /etc/systemd/journald.conf file and add the following line: Storage=persistent','[{\"cis\": [\"4.2.2.3\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4642,'Ensure permissions on all logfiles are configured','Log files stored in /var/log/ contain logged information from many services on the system, or on log hosts others as well.','It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected. Other/world should not have the ability to view this information. Group should not have the ability to modify this information.','','Run the following command to set permissions on all existing log files: # find /var/log -type f -exec chmod g-wx,o-rwx "{}" + -o -type d -exec chmod g-wx,o-rwx "{}" +','[{\"cis\": [\"4.2.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4643,'Ensure cron daemon is enabled','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.','','Run the following command to enable cron : # systemctl enable crond; OR run the following command to remove cron: # yum remove cronie','[{\"cis\": [\"5.1.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4644,'Ensure permissions on /etc/crontab are configured','The /etc/crontab file is used by cron to control its own jobs. The commands in this item make sure that root is the user and group owner of the file and that only the owner can access the file.','This file contains information on what system jobs are run by cron. Write access to these files could provide unprivileged users with the ability to elevate their privileges. Read access to these files could provide users with the ability to gain insight on system jobs that run on the system and could provide them a way to gain unauthorized privileged access.','','Run the following commands to set ownership and permissions on /etc/crontab : # chown root:root /etc/crontab; # chmod og-rwx /etc/crontab; OR run the following command to remove cron: # yum remove cronie','[{\"cis\": [\"5.1.2\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4645,'Ensure permissions on /etc/cron.hourly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.hourly : chown root:root /etc/cron.hourly; # chmod og-rwx /etc/cron.hourly; OR run the following command to remove cron: # yum remove cronie','[{\"cis\": [\"5.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4646,'Ensure permissions on /etc/cron.daily are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.daily : chown root:root /etc/cron.daily; # chmod og-rwx /etc/cron.daily; OR run the following command to remove cron: # yum remove cronie','[{\"cis\": [\"5.1.4\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4647,'Ensure permissions on /etc/cron.weekly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.weekly : chown root:root /etc/cron.weekly; # chmod og-rwx /etc/cron.weekly; OR run the following command to remove cron: # yum remove cronie','[{\"cis\": [\"5.1.5\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4648,'Ensure permissions on /etc/cron.monthly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.monthly : chown root:root /etc/cron.monthly; # chmod og-rwx /etc/cron.monthly; OR run the following command to remove cron: # yum remove cronie','[{\"cis\": [\"5.1.6\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4649,'Ensure permissions on /etc/cron.d are configured','The /etc/cron.d/directory contains system cronjobs 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.','','Run the following commands to set ownership and permissions on /etc/cron.d : # chown root:root /etc/cron.d; # chmod og-rwx /etc/cron.d; OR run the following command to remove cron: # yum remove cronie','[{\"cis\": [\"5.1.7\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4650,'Ensure cron is restricted to authorized users','If cronis installed in the system, configure /etc/cron.allowto allow specific users to use these services. If /etc/cron.allowdoes not exist, then /etc/cron.denyis checked. Any user not specifically defined in those files is allowed to use cron. By removing the file, only users in /etc/cron.alloware allowed to use cron.','On many systems, only the system administrator is authorized to schedule cronjobs. Using the cron.allowfile to control who can run cronjobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.','','Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow: rm /etc/cron.deny;rm /etc/at.deny;touch /etc/cron.allow; touch /etc/at.allow; chmod og-rwx /etc/cron.allow; chmod og-rwx /etc/at.allow; chown root:root /etc/cron.allow and chown root:root /etc/at.allow','[{\"cis\": [\"5.1.8\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4651,'Ensure at is restricted to authorized users','If atis installed in the system, configure /etc/at.allowto allow specific users to use these services. If /etc/at.allowdoes not exist, then /etc/at.denyis checked. Any user not specifically defined in those files is allowed to use at. By removing the file, only users in /etc/at.alloware allowed to use at.','On many systems, only the system administrator is authorized to schedule atjobs. Using the at.allowfile to control who can run atjobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.','','Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow: rm /etc/cron.deny;rm /etc/at.deny;touch /etc/cron.allow; touch /etc/at.allow; chmod og-rwx /etc/cron.allow; chmod og-rwx /etc/at.allow; chown root:root /etc/cron.allow and chown root:root /etc/at.allow','[{\"cis\": [\"5.1.9\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4652,'Ensure permissions on /etc/ssh/sshd_config are configured','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-privileged users.','','Run the following commands to set ownership and permissions on /etc/ssh/sshd_config: chown root:root /etc/ssh/sshd_config and chmod og-rwx /etc/ssh/sshd_config','[{\"cis\": [\"5.2.1\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4653,'Ensure permissions on SSH private host key files are configured','An SSH private key is one of two files used in SSH public key authentication. In this authentication method, The possession of the private key is proof of identity. Only a private key that corresponds to a public key will be able to authenticate successfully. The private keys need to be stored and handled carefully, and no copies of the private key should be distributed.','If an unauthorized user obtains the private SSH host key file, the host could be impersonated','','Run the following commands to set permissions, ownership, and group on the private SSH host key files: # find /etc/ssh -xdev -type f -name 'ssh_host_*_key' -exec chmod u-x,g-wx,o-rwx {} ; # find /etc/ssh -xdev -type f -name 'ssh_host_*_key' -exec chown root:ssh_keys {} ;','[{\"cis\": [\"5.2.2\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4654,'Ensure permissions on SSH private host key files are configured','An SSH public key is one of two files used in SSH public key authentication. In this authentication method, a public key is a key that can be used for verifying digital signatures generated using a corresponding private key. Only a public key that corresponds to a private key will be able to authenticate successfully.','If a public host key file is modified by an unauthorized user, the SSH service may be compromised.','','Run the following commands to set permissions and ownership on the SSH host public key: # find /etc/ssh -xdev -type f -name 'ssh_host_*_key.pub' -exec chmod u-x,go-wx {} ; #find /etc/ssh -xdev -type f -name 'ssh_host_*_key.pub' -exec chown root:root {} ;','[{\"cis\": [\"5.2.3\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4655,'Ensure SSH access is limited','There are several options available to limit which users and group can access the system via SSH. It is recommended that at least one of the following options be leveraged: AllowUsers The AllowUsers variable gives the system administrator the option of allowing specific users to ssh into the system. The list consists of space separated user names. Numeric user IDs are not recognized with this variable. If a system administrator wants to restrict user access further by only allowing the allowed users to log in from a particular host, the entry can be specified in the form of user@host. AllowGroups The AllowGroups variable gives the system administrator the option of allowing specific groups of users to ssh into the system. The list consists of space separated group names. Numeric group IDs are not recognized with this variable. DenyUsers The DenyUsers variable gives the system administrator the option of denying specific users to ssh into the system. The list consists of space separated user names. Numeric user IDs are not recognized with this variable. If a system administrator wants to restrict user access further by specifically denying a user's access from a particular host, the entry can be specified in the form of user@host. DenyGroups The DenyGroups variable gives the system administrator the option of denying specific groups of users to ssh into the system. The list consists of space separated group names. Numeric group IDs are not recognized with this variable.','Restricting which users can remotely access the system via SSH will help ensure that only authorized users access the system.','','Edit the /etc/ssh/sshd_config file to set one or more of the parameter as follows: # AllowUsers <userlist>; # AllowGroups <grouplist>; # DenyUsers <userlist>; # DenyGroups <grouplist>','[{\"cis\": [\"5.2.4\"]}, {\"cis_csc\": [\"4.3\"]}, {\"pci_dss\": [\"8.1\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4656,'Ensure SSH LogLevel is appropriate','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.VERBOSE level specifies that login and logout activity as well as the key fingerprint for any SSH key used for login will be logged. This information is important for SSH key management, especially in legacy environments.','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel INFO','[{\"cis\": [\"5.2.3\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(4657,'Ensure SSH X11 forwarding is disabled','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: X11Forwarding no','[{\"cis\": [\"5.2.6\"]}, {\"pci_dss\": [\"9.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4658,'Ensure SSH MaxAuthTries is set to 4 or less','The MaxAuthTries parameter specifies the maximum number of authentication attempts permitted per connection. When the login failure count reaches half the number, error messages will be written to the syslog file detailing the login failure.','Setting the MaxAuthTries parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. While the recommended setting is 4, set the number based on site policy.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4','[{\"cis\": [\"5.2.7\"]}, {\"cis_csc\": [\"16.13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4659,'Ensure SSH IgnoreRhosts is enabled','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes','[{\"cis\": [\"5.2.8\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(4660,'Ensure SSH HostbasedAuthentication is disabled','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no','[{\"cis\": [\"5.2.9\"]}, {\"cis_csc\": [\"16.3\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(4661,'Ensure SSH root login is disabled','The PermitRootLogin parameter specifies if the root user can log in using ssh. The default is no.','Disallowing root logins over SSH requires system admins to authenticate using their own individual account, then escalating to root via sudo or su . This in turn limits opportunity for non-repudiation and provides a clear audit trail in the event of a security incident.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no','[{\"cis\": [\"5.2.10\"]}, {\"cis_csc\": [\"4.3\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(4662,'Ensure SSH PermitEmptyPasswords is disabled','The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts with empty password strings.','Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no','[{\"cis\": [\"5.2.11\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(4663,'Ensure SSH PermitUserEnvironment is disabled','The PermitUserEnvironment option allows users to present environment options to the ssh daemon.','Permitting users the ability to set environment variables through the SSH daemon could potentially allow users to bypass security controls (e.g. setting an execution path that has ssh executing trojan'd programs)','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitUserEnvironment no','[{\"cis\": [\"5.2.12\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(4664,'Ensure SSH Idle Timeout Interval is configured','This variable limits the ciphers that SSH can use during communication.','Weak ciphers that are used for authentication to the cryptographic module cannot be relied upon to provide confidentiality or integrity, and system data may be compromised.: The DES, Triple DES, and Blowfish ciphers, as used in SSH, have a birthday bound of approximately four billion blocks, which makes it easier for remote attackers to obtain cleartext data via a birthday attack against a long-duration encrypted session, aka a 'Sweet32' attack; The RC4 algorithm, as used in the TLS protocol and SSL protocol, does not properly combine state data with key data during the initialization phase, which makes it easier for remote attackers to conduct plaintext-recovery attacks against the initial bytes of a stream by sniffing network traffic that occasionally relies on keys affected by the Invariance Weakness, and then using a brute-force approach involvingLSB values, aka the 'Bar Mitzvah' issue; The passwords used during an SSH session encrypted with RC4 can be recovered by an attacker who is able to capture and replay the session; Error handling in the SSH protocol; Client and Server, when using a block cipher algorithm in Cipher Block Chaining (CBC) mode, makes it easier for remote attackers to recover certain plaintext data from an arbitrary block of ciphertext in an SSH session via unknown vectors; The mm_newkeys_from_blob function in monitor_wrap.c, when an AES-GCM cipher is used, does not properly initialize memory for a MAC context data structure, which allows remote authenticated users to bypass intended ForceCommand and login-shell restrictions via packet data that provides a crafted callback address','','Edit the /etc/ssh/sshd_configfile add/modify the Ciphersline to contain a comma separated list of the site approved ciphersExample:Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr','[{\"cis\": [\"5.2.13\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(4665,'Ensure only strong MAC algorithms are used','This variable limits the types of MAC algorithms that SSH can use during communication.','MD5 and 96-bit MAC algorithms are considered weak and have been shown to increase exploitability in SSH downgrade attacks. Weak algorithms continue to have a great deal of attention as a weak spot that can be exploited with expanded computing power. An attacker that breaks the algorithm could take advantage of a MiTM position to decrypt the SSH tunnel and capture credentials and information','','Edit the /etc/ssh/sshd_config file and add/modify the MACs line to contain a comma separated list of the site approved MACs Example:MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512,hmac-sha2-256','[{\"cis\": [\"5.2.14\"]}, {\"cis_csc\": [\"14.4\", \"16.5\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(4666,'Ensure only strong Key Exchange algorithms are used','Key exchange is any method in cryptography by which cryptographic keys are exchanged between two parties, allowing use of a cryptographic algorithm. If the sender and receiver wish to exchange encrypted messages, each must be equipped to encrypt messages to be sent and decrypt messages received','Key exchange methods that are considered weak should be removed. A key exchange method may be weak because too few bits are used, or the hashing algorithm is considered too weak. Using weak algorithms could expose connections to man-in-the-middle attacks','','Edit the /etc/ssh/sshd_config file add/modify the KexAlgorithms line to contain a comma separated list of the site approved key exchange algorithms.Example:'KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256'','[{\"cis\": [\"5.2.15\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(4667,'Ensure SSH Idle Timeout Interval is configured','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.','','Edit the /etc/ssh/sshd_config file to set the parameters according to site policy: ClientAliveInterval 300 and ClientAliveCountMax 0','[{\"cis\": [\"5.2.16\"]}, {\"cis_csc\": [\"16.11\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(4668,'Ensure SSH LoginGraceTime is set to one minute or less','The LoginGraceTime parameter specifies the time allowed for successful authentication to the SSH server. The longer the Grace period is the more open unauthenticated connections can exist. Like other session controls in this session the Grace Period should be limited to appropriate organizational limits to ensure the service is available for needed access.','Setting the LoginGraceTime parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. It will also limit the number of concurrent unauthenticated connections While the recommended setting is 60 seconds (1 Minute), set the number based on site policy.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: LoginGraceTime 60','[{\"cis\": [\"5.2.17\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"4.1\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4669,'Ensure SSH warning banner is configured','The Banner parameter specifies a file whose contents must be sent to the remote user before authentication is permitted. By default, no banner is displayed.','Banners are used to warn connecting users of the particular site's policy regarding connection. Presenting a warning message prior to the normal user login may assist the prosecution of trespassers on the computer system.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: Banner /etc/issue.net','[{\"cis\": [\"5.2.18\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4670,'Ensure SSH PAM is enabled','UsePAM Enables the Pluggable Authentication Module interface. If set to “yes” this will enable PAM authentication using ChallengeResponseAuthenticationand PasswordAuthentication in addition to PAM account and session module processing for all authentication types','When usePAM is set to yes, PAM runs through account and session types properly. This is important if you want to restrict access to services based off of IP, time or other factors of the account. Additionally, you can make sure users inherit certain environment variables on login or disallow access to the server','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: UsePAM yes','[{\"cis\": [\"5.2.19\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4671,'Ensure SSH AllowTcpForwarding is disabled','SSH port forwarding is a mechanism in SSH for tunneling application ports from the client to the server, or servers to clients. It can be used for adding encryption to legacy applications, going through firewalls, and some system administrators and IT professionals use it for opening backdoors into the internal network from their home machines','Leaving port forwarding enabled can expose the organization to security risks and back-doors.SSH connections are protected with strong encryption. This makes their contents invisible to most deployed network monitoring and traffic filtering solutions. This invisibility carries considerable risk potential if it is used for malicious purposes such as data exfiltration. Cybercriminals or malware could exploit SSH to hide their unauthorized communications, or to exfiltrate stolen data from the target network','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: AllowTcpForwarding no','[{\"cis\": [\"5.2.20\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4672,'Ensure SSH MaxStartups is configured','The MaxStartupsparameter specifies the maximum number of concurrent unauthenticated connections to the SSH daemon','To protect a system from denial of service due to a large number of pending authentication connection attempts, use the rate limiting function of MaxStartups to protect availability of sshd logins and prevent overwhelming the daemon','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: maxstartups 10:30:60','[{\"cis\": [\"5.2.21\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4673,'Ensure SSH MaxSessions is limited','The MaxSessionsparameter specifies the maximum number of open sessions permitted from a given connection.','To protect a system from denial of service due to a large number of pending authentication connection attempts, use the rate limiting function of MaxStartups to protect availability of sshd logins and prevent overwhelming the daemon','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxSessions 10','[{\"cis\": [\"5.2.22\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4674,'Ensure password creation requirements are configured','The pam_pwquality.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more','Strong passwords protect systems from being hacked through brute force methods.','','Edit the file /etc/security/pwquality.conf and add or modify the following line for password length to conform to site policy: minlen = 14 Edit the file /etc/security/pwquality.conf and add or modify the following line for password complexity to conform to site policy: minclass = 4 OR dcredit = -1 ucredit = -1 ocredit = -1 lcredit = -1 Edit the /etc/pam.d/password-auth and /etc/pam.d/system-auth files to include the appropriate options for pam_pwquality.so and to conform to site policy:password requisite pam_pwquality.so try_first_pass retry=3','[{\"cis\": [\"5.3.1\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2.3\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4675,'Ensure password hashing algorithm is SHA-512','The commands below change password encryption from md5 to sha512 (a much stronger hashing algorithm). All existing accounts will need to perform a password change to upgrade the stored hashes to the new algorithm.','The SHA-512 algorithm provides much stronger hashing than MD5, thus providing additional protection to the system by increasing the level of effort for an attacker to successfully determine passwords. Note that these changes only apply to accounts configured on the local system.','','Edit the /etc/pam.d/password-auth and /etc/pam.d/system-auth files to include the sha512 option for pam_unix.so as shown: password sufficient pam_unix.so sha512','[{\"cis\": [\"5.3.3\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"3.6.1\", \"8.2.1\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\"]}]'),(4676,'Ensure password reuse is limited','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 changes only apply to accounts configured on the local system.','','Edit the /etc/pam.d/password-auth and /etc/pam.d/system-auth files to include the remember option and conform to site policy as shown: password sufficient pam_unix.so remember=5 or password required pam_pwhistory.so remember=5','[{\"cis\": [\"5.3.3\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2.5\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4677,'Ensure password expiration is 365 days or less','The PASS_MAX_DAYS parameter in /etc/login.defs allows an administrator to force passwords to expire once they reach a defined age. It is recommended that the PASS_MAX_DAYS parameter be set to less than or equal to 365 days.','The window of opportunity for an attacker to leverage compromised credentials or successfully compromise credentials via an online brute force attack is limited by the age of the password. Therefore, reducing the maximum age of a password also reduces an attacker's window of opportunity.','','Set the PASS_MAX_DAYS parameter to conform to site policy in /etc/login.defs : PASS_MAX_DAYS 90 and modify user parameters for all users with a password set to match: chage --maxdays 90 <user>','[{\"cis\": [\"5.4.1.1\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2.4\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4678,'Ensure minimum days between password changes is configured','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 1 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.','','Set the PASS_MIN_DAYS parameter to 1 in /etc/login.defs: PASS_MIN_DAYS 1 and modify user parameters for all users with a password set to match: chage --mindays 1 <user>','[{\"cis\": [\"5.4.1.2\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4679,'Ensure minimum days between password changes is 7 or more','The PASS_WARN_AGE parameter in /etc/login.defs allows an administrator to notify users that their password will expire in a defined number of days. It is recommended that the PASS_WARN_AGE parameter be set to 7 or more days.','Providing an advance warning that a password will be expiring gives users time to think of a secure password. Users caught unaware may choose a simple password or write it down where it may be discovered.','','Set the PASS_WARN_AGE parameter to 7 in /etc/login.defs: PASS_WARN_AGE 7 and modify user parameters for all users with a password set to match: chage --warndays 7 <user>','[{\"cis\": [\"5.4.1.3\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4680,'Ensure inactive password lock is 30 days or less','User accounts that have been inactive for over a given period of time can be automatically disabled. It is recommended that accounts that are inactive for 30 days after password expiration be disabled.','Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies.','','Run the following command to set the default password inactivity period to 30 days: useradd -D -f 30 and modify user parameters for all users with a password set to match: chage --inactive 30 <user>','[{\"cis\": [\"5.4.1.4\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4681,'Ensure default group for the root account is GID 0','The usermod command can be used to specify which group the root user belongs to. This affects permissions of files that are created by the root user.','Using GID 0 for the root account helps prevent root -owned files from accidentally becoming accessible to non-privileged users.','','Run the following command to set the root user default group to GID 0: usermod -g 0 root','[{\"cis\": [\"5.4.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4682,' Ensure default user shell timeout is configured','TMOUT is an environmental setting that determines the timeout of a shell in seconds.','Setting a timeout value reduces the window of opportunity for unauthorized user access to another user's shell session that has been left unattended. It also ends the inactive session and releases the resources associated with that session.','','Edit the /etc/bashrc and /etc/profile files (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: TMOUT=600','[{\"cis\": [\"5.4.4\"]}, {\"cis_csc\": [\"16.11\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(4683,'Ensure default user umask is configured','The user file-creation mode mask (umask) is use to determine the file permission for newly created directories and files. In Linux, the default permissions for any newly created directory is 0777 (rwxrwxrwx), and for any newly created file it is 0666 (rw-rw-rw-). The umask modifies the default Linux permissions by restricting (masking) these permissions. The umask is not simply subtracted, but is processed bitwise. Bits set in the umaskare cleared in the resulting file mode.','Setting a very secure default value for umask ensures that users make a conscious choice about their file permissions. A default umask setting of 077 causes files and directories created by users to not be readable by any other user on the system. A umask of 027 would make files and directories readable by users in the same Unix group, while a umask of 022 would make files readable by every user on the system.','','Edit the /etc/bashrc, /etc/profile and /etc/profile.d/*.sh files (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: umask 027','[{\"cis\": [\"5.4.4\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4684,'Ensure access to the su command is restricted.','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.','','Add the following line to the /etc/pam.d/su file: auth required pam_wheel.so use_uid','[{\"cis\": [\"5.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4685,'Ensure permissions on /etc/passwd are configured','The /etc/passwd file contains user account information that is used by many system utilities and therefore must be readable for these utilities to operate.','It is critical to ensure that the /etc/passwd file is protected from unauthorized write access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/passwd: # chown root:root /etc/passwd # chmod u-x,g-wx,o-wx /etc/passwd','[{\"cis\": [\"6.1.2\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4686,'Ensure permissions on /etc/shadow are configured','The /etc/shadow file is used to store the information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information.','If attackers can gain read access to the /etc/shadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/shadow file (such as expiration) could also be useful to subvert the user accounts.','','Run the following command to set permissions on /etc/shadow: # chown root:root /etc/shadow # chmod 000 /etc/shadow','[{\"cis\": [\"6.1.3\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(4687,'Ensure permissions on /etc/group are configured','The /etc/group file contains a list of all the valid groups defined in the system. The command below allows read/write access for root and read access for everyone else.','The /etc/group file needs to be protected from unauthorized changes by non-privileged users, but needs to be readable as this information is used with many non-privileged programs.','','Run the following command to set permissions on /etc/group: # chown root:root /etc/group # chmod u-x,g-wx,o-wx /etc/group','[{\"cis\": [\"6.1.4\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4688,'Ensure permissions on /etc/gshadow are configured','The /etc/gshadow file is used to store the information about groups that is critical to the security of those accounts, such as the hashed password and other security information.','If attackers can gain read access to the /etc/gshadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/gshadow file (such as group administrators) could also be useful to subvert the group','','Run the following command to set permissions on /etc/gshadow: # chown root:root /etc/gshadow # chmod 000 /etc/gshadow','[{\"cis\": [\"6.1.5\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4689,'Ensure permissions on /etc/passwd- are configured','The /etc/passwd- file contains backup user account information.','It is critical to ensure that the /etc/passwd- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/passwd-: # chown root:root /etc/passwd- # chmod 644 /etc/passwd-','[{\"cis\": [\"6.1.6\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4690,'Ensure permissions on /etc/shadow- are configured','The /etc/shadow- file is used to store backup information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information.','It is critical to ensure that the /etc/shadow- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/shadow-: # chown root:root /etc/shadow- # chmod 000 /etc/shadow-','[{\"cis\": [\"6.1.7\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4691,'Ensure permissions on /etc/group- are configured','The /etc/group- file contains a backup list of all the valid groups defined in the system.','It is critical to ensure that the /etc/group- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/group-: # chown root:root /etc/group- # chmod 644 /etc/group-','[{\"cis\": [\"6.1.8\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4692,'Ensure permissions on /etc/gshadow- are configured','The /etc/gshadow- file is used to store backup information about groups that is critical to the security of those accounts, such as the hashed password and other security information.','It is critical to ensure that the /etc/gshadow- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/gshadow-: # chown root:root /etc/gshadow- # chmod 000 /etc/gshadow-','[{\"cis\": [\"6.1.9\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(4693,'Ensure accounts in /etc/passwd use shadowed passwords','Local accounts can uses shadowed passwords. With shadowed passwords, The passwords are saved in shadow password file, /etc/shadow, encrypted by a salted one-way hash. Accounts with a shadowed password have an xin the second field in /etc/passwd.','The /etc/passwd file also contains information like user ID's and group ID's that are used by many system programs. Therefore, the /etc/passwd file must remain world readable. In spite of encoding the password with a randomly-generated one-way hash function, an attacker could still break the system if they got access to the /etc/passwd file. This can be mitigated by using shadowed passwords, thus moving the passwords in the /etc/passwd file to /etc/shadow. The /etc/shadow file is set so only root will be able to read and write. This helps mitigate the risk of an attacker gaining access to the encoded passwords with which to perform a dictionary attack.','','f any accounts in the /etc/passwdfile do not have a single x in the password field, run the following command to set these accounts to use shadowed passwords:# sed -e 's/^([a-zA-Z0-9_]*):[^:]*:/1:x:/' -i /etc/passwdInvestigate to determine if the account is logged in and what it is being used for, to determine if it needs to be forced off.','[{\"cis\": [\"6.2.1\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4694,'Ensure password fields are not empty','An account with an empty password field means that anybody may log in as that user without providing a password.','All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user.','','If any accounts in the /etc/shadow file do not have a password, run the following command to lock the account until it can be determined why it does not have a password: passwd -l <username> || Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off.','[{\"cis\": [\"6.2.2\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(4695,'Ensure root is the only UID 0 account','Any account with UID 0 has superuser privileges on the system.','This access must be limited to only the default root account and only from the system console. Administrative access must be through an unprivileged account using an approved mechanism as noted in Item 5.6 Ensure access to the su command is restricted.','','Remove any users other than root with UID 0 or assign them a new UID if appropriate.','[{\"cis\": [\"6.2.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(4696,'Ensure shadow group is empty','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 runa 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.','','Remove any legacy '+' entries from /etc/shadow if they exist.','[{\"cis\": [\"6.2.18\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5000,'Ensure mounting of cramfs filesystems is disabled','The cramfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems. A cramfs image can be used without having to first decompress the image.','Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf .Example: vim /etc/modprobe.d/cramfs.conf: and add the following line: install cramfs /bin/true. Run the following command to unload the cramfs module: # rmmod cramfs','[{\"cis\": [\"1.1.1.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(5001,'Ensure mounting of FAT filesystems is limited','The VFAT filesystem format is primarily used on older windows systems and portable USB drives or flash modules. It comes in three types FAT12 , FAT16 , and FAT32 all of which are supported by the vfat kernel module.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf . Example: vim /etc/modprobe.d/vfat.conf: install vfat /bin/true. Run the following command to unload the vfat module: # rmmod vfat','[{\"cis\": [\"1.1.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(5002,'Ensure mounting of squashfs filesystems is disabled','The squashfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems (similar to cramfs ). A squashfs image can be used without having to first decompress the image.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf . Example: vim /etc/modprobe.d/squashfs.conf and add the following line: install squashfs /bin/true. Run the following command to unload the squashfs module: rmmod squashfs','[{\"cis\": [\"1.1.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(5003,'Ensure mounting of udf filesystems is disabled','The udf filesystem type is the universal disk format used to implement ISO/IEC 13346 and ECMA-167 specifications. This is an open vendor filesystem type for data storage on a broad range of media. This filesystem type is necessary to support writing DVDs and newer optical disc formats.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf. Example: vim /etc/modprobe.d/udf.conf and add the following line: install udf /bin/true. Run the following command to unload the udf module: # rmmod udf','[{\"cis\": [\"1.1.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(5004,'Ensure /tmp is configured','The /tmp directory is a world-writable directory used for temporary storage by all users and some applications.','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. This can be accomplished by either mounting tmpfs to /tmp, or creating a separate partition for /tmp.','','Configure /etc/fstab as appropriate. example: "tmpfs /tmp tmpfs defaults,rw,nosuid,nodev,noexec,relatime 0 0" OR Run the following commands to enable systemd /tmp mounting: # systemctl unmask tmp.mount # systemctl enable tmp.mount Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to configure the /tmp mount: [Mount] What=tmpfs Where=/tmp Type=tmpfs Options=mode=1777,strictatime,noexec,nodev,nosuid','[{\"cis\": [\"1.1.2\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5005,'Ensure nodev option set on /tmp partition','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.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /tmp : # mount -o remount,nodev /tmp OR Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add nodev to the /tmp mount options: [Mount] Options=mode=1777,strictatime,noexec,nodev,nosuid Run the following command to remount /tmp : # mount -o remount,nodev /tmp','[{\"cis\": [\"1.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5006,'Ensure nosuid option set on /tmp partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /tmp.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /tmp : # mount -o remount,nosuid /tmp OR Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add nosuid to the /tmp mount options: [Mount] Options=mode=1777,strictatime,noexec,nodev,nosuid Run the following command to remount /tmp : # mount -o remount,nosuid /tmp','[{\"cis\": [\"1.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5007,'Ensure noexec option set on /tmp partition','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.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /tmp : # mount -o remount,noexec /tmp OR Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add noexec to the /tmp mount options: [Mount] Options=mode=1777,strictatime,noexec,nodev,nosuid Run the following command to remount /tmp : # mount -o remount,noexec /tmp','[{\"cis\": [\"1.1.5\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5008,'Ensure separate partition exists for /var','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5009,'Ensure separate partition exists for /var/tmp','The /var/tmp directory is a world-writable directory used for temporary storage by all users and some applications.','Since the /var/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 /var/tmp its own file system allows an administrator to set the noexec option on the mount, making /var/tmp useless for an attacker to install executable code.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var/tmp. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.7\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5010,'Ensure nodev option set on /var/tmp partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the /var/tmp filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices in /var/tmp .','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information.','[{\"cis\": [\"1.1.8\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5011,'Ensure nosuid option set on /var/tmp partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /var/tmp.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information.','[{\"cis\": [\"1.1.9\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5012,'Ensure noexec option set on /var/tmp partition','The noexec mount option specifies that the filesystem cannot contain executable binaries.','Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /var/tmp.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information.','[{\"cis\": [\"1.1.10\"]}, {\"cis_csc\": [\"5.1\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5013,'Ensure separate partition exists for /var/log','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var/log. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.11\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"2.2.4\", \"10.7\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5014,'Ensure separate partition exists for /var/log/audit','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.','','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, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.12\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"2.2.4\", \"10.7\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5015,'Ensure separate partition exists for /home','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /home. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.13\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5016,'Ensure nodev option set on /home partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the user partitions are not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /home partition. # mount -o remount,nodev /home','[{\"cis\": [\"1.1.14\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5017,'Ensure nodev option set on /dev/shm partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the /dev/shm filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create special devices in /dev/shm partitions.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /dev/shm partition. Run the following command to remount /dev/shm: # mount -o remount,nodev /dev/shm','[{\"cis\": [\"1.1.15\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5018,'Ensure nosuid option set on /dev/shm partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /dev/shm partition. Run the following command to remount /dev/shm: # mount -o remount,nosuid /dev/shm','[{\"cis\": [\"1.1.16\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5019,'Ensure noexec option set on /dev/shm partition','The noexec mount option specifies that the filesystem cannot contain executable binaries.','Setting this option on a file system prevents users from executing programs from shared memory. This deters users from introducing potentially malicious software on the system.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /dev/shm partition. Run the following command to remount /dev/shm: # mount -o remount,noexec /dev/shm','[{\"cis\": [\"1.1.17\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5020,'Disable Automounting','autofs allows automatic mounting of devices, typically including CD/DVDs and USB drives.','With automounting enabled anyone with physical access could attach a USB drive or disc and have its contents available in system even if they lacked permissions to mount it themselves.','','Run the following command to disable autofs : systemctl disable autofs','[{\"cis\": [\"1.1.22\"]}, {\"cis_csc\": [\"8.4\", \"8.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5021,'Disable USB Storage','USB storage provides a means to transfer and store files insuring persistence and availability of the files independent of network connection status. Its popularity and utility has led to USB-based malware being a simple and common means for network infiltration and a first step to establishing a persistent threat within a networked environment.','Restricting USB access on the system will decrease the physical attack surface for a device and diminish the possible vectors to introduce malware.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf Example: vim /etc/modprobe.d/usb-storage.conf and add the following line: install usb-storage /bin/true Run the following command to unload the usb-storage module: # rmmod usb-storage','[{\"cis\": [\"1.1.23\"]}, {\"cis_csc\": [\"8.4\", \"8.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5022,'Disable the rhnsd Daemon','The rhnsd daemon polls the Red Hat Network web site for scheduled actions and, if there are, executes those actions.','Patch management policies may require that organizations test the impact of a patch before it is deployed in a production environment. Having patches automatically deployed could have a negative impact on the environment. It is best to not allow an action by default but only after appropriate consideration has been made. It is recommended that the service be disabled unless the risk is understood and accepted or you are running your own satellite . This item is not scored because organizations may have addressed the risk.','','Run the following command to disable rhnsd : # systemctl --now disable rhnsd','[{\"cis\": [\"1.2.2\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(5023,'Ensure gpgcheck is globally activated','The gpgcheck option, found in the main section of the /etc/yum.conf and individual /etc/yum/repos.d/* files determines if an RPM package's signature is checked prior to its installation.','It is important to ensure that an RPM's package signature is always checked prior to installation to ensure that the software is obtained from a trusted source.','','Edit /etc/yum.conf and set ' gpgcheck=1 ' in the [main] section. Edit any failing files in /etc/yum.repos.d/* and set all instances of gpgcheck to ' 1 '.','[{\"cis\": [\"1.2.4\"]}, {\"cis_csc\": [\"3.4\"]}, {\"pci_dss\": [\"6.2\"]}, {\"nist_800_53\": [\"SI.2\", \"SA.11\", \"SI.4\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"A1.2\", \"CC6.8\"]}]'),(5024,'Ensure sudo is installed','sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy. The invoking user's real (not effective) user ID is used to determine the user name with which to query the security policy.','sudo supports a plugin architecture for security policies and input/output logging. Third parties can develop and distribute their own policy and I/O logging plugins to work seamlessly with the sudo front end. The default security policy is sudoers, which is configured via the file /etc/sudoers. The security policy determines what privileges, if any, a user has to run sudo. The policy may require that users authenticate themselves with a password or another authentication mechanism. If authentication is required, sudo will exit if the user's password is not entered within a configurable time limit. This limit is policy-specific.','','Run the following command to install sudo: # dnf install sudo','[{\"cis\": [\"1.3.1\"]}, {\"cis_csc\": [\"4.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5025,'Ensure sudo commands use pty','sudo can be configured to run only from a pseudo-pty','Attackers can run a malicious program using sudo which would fork a background process that remains even when the main program has finished executing.','','edit the file /etc/sudoers or a file in /etc/sudoers.d/ with visudo -f and add the following line: Defaults use_pty','[{\"cis\": [\"1.3.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5026,'Ensure sudo log file exists','sudo can use a custom log file','A sudo log file simplifies auditing of sudo commands','','edit the file /etc/sudoers or a file in /etc/sudoers.d/ with visudo -f and add the following line: Defaults logfile="<PATH TO CUSTOM LOG FILE>"','[{\"cis\": [\"1.3.3\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5027,'Ensure AIDE is installed','AIDE takes a snapshot of filesystem state including modification times, permissions, and file hashes which can then be used to compare against the current state of the filesystem to detect modifications to the system.','By monitoring the filesystem state compromised files can be detected to prevent or limit the exposure of accidental or malicious misconfigurations or modified binaries.','','Run the following command to install aide: # dnf install aide || Configure AIDE as appropriate for your environment. Consult the AIDE documentation for options. Initialize AIDE: #aide --init && mv /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz','[{\"cis\": [\"1.3.1\"]}, {\"cis_csc\": [\"14.9\"]}, {\"pci_dss\": [\"11.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5028,'Ensure filesystem integrity is regularly checked','Periodic checking of the filesystem integrity is needed to detect changes to the filesystem.','Periodic file checking allows the system administrator to determine on a regular basis if critical files have been changed in an unauthorized fashion.','',' Run the following commands: # cp ./config/aidecheck.service /etc/systemd/system/aidecheck.service # cp ./config/aidecheck.timer /etc/systemd/system/aidecheck.timer # chmod 0644 /etc/systemd/system/aidecheck.* # systemctl reenable aidecheck.timer # systemctl restart aidecheck.timer # systemctl daemon-reload. OR Run the following command: crontab -u root -e // Add the following line to the crontab: 0 5 * * * /usr/sbin/aide --check // Notes: The checking in this recommendation occurs every day at 5am. Alter the frequency and time of the checks in compliance with site policy. ','[{\"cis\": [\"1.3.2\"]}, {\"cis_csc\": [\"3.5\"]}, {\"pci_dss\": [\"11.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5029,'Ensure permissions on bootloader config are configured','The grub configuration file contains information on boot settings and passwords for unlocking boot options. The grub configuration is usually grub.cfg and grubenv stored in /boot/grub2/','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.','','Run the following commands to set permissions on your grub configuration: # chown root:root /boot/grub2/grub.cfg # chmod og-rwx /boot/grub2/grub.cfg # chown root:root /boot/grub2/grubenv # chmod og-rwx /boot/grub2/grubenv','[{\"cis\": [\"1.5.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5030,'Ensure bootloader password is set','Setting the boot loader password will require that anyone rebooting the system must enter a password before being able to set command line boot parameters.','Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off SELinux at boot time).','','Create an encrypted password with grub2-setpassword: # grub2-setpassword || Run the following command to update the grub2 configuration: # grub2-mkconfig -o /boot/grub2/grub.cfg','[{\"cis\": [\"1.5.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5031,'Ensure authentication required for single user mode','Single user mode (rescue mode) is used for recovery when the system detects an issue during boot or by manual selection from the bootloader.','Requiring authentication in single user mode (rescue mode) prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials.','','Edit /usr/lib/systemd/system/rescue.service and add/modify the following line: ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue Edit /usr/lib/systemd/system/emergency.service and add/modify the following line: ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency','[{\"cis\": [\"1.5.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5032,'Ensure core dumps are restricted','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.','','Add the following line to /etc/security/limits.conf or a /etc/security/limits.d/* file: * hard core 0. Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: fs.suid_dumpable = 0. Run the following command to set the active kernel parameter: # sysctl -w fs.suid_dumpable=0. If systemd-coredump is installed: edit /etc/systemd/coredump.conf and add/modify the following lines: Storage=none ProcessSizeMax=0 Run the command: # systemctl daemon-reload','[{\"cis\": [\"1.6.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5033,'Ensure address space layout randomization (ASLR) is enabled','Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process.','Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: kernel.randomize_va_space = 2 Run the following command to set the active kernel parameter: # sysctl -w kernel.randomize_va_space=2','[{\"cis\": [\"1.6.2\"]}, {\"cis_csc\": [\"8.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5034,'Ensure SELinux is installed','SELinux provides Mandatory Access Control.','Without a Mandatory Access Control system installed only the default Discretionary Access Control system will be available.','','Run the following command to install SELinux : # dnf install libselinux','[{\"cis\": [\"1.7.1.1\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5035,'Ensure SELinux is not disabled in bootloader configuration','Configure SELINUX to be enabled at boot time and verify that it has not been overwritten by the grub boot parameters.','SELinux must be enabled at boot time in your grub configuration to ensure that the controls it provides are not overridden.','','Edit /etc/default/grub and remove all instances of selinux=0 and enforcing=0 from all CMDLINE_LINUX parameters: GRUB_CMDLINE_LINUX_DEFAULT="quiet" GRUB_CMDLINE_LINUX="" || Run the following command to update the grub2 configuration: grub2-mkconfig -o /boot/grub2/grub.cfg','[{\"cis\": [\"1.7.1.2\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5036,'Ensure SELinux policy is configured','Configure SELinux to meet or exceed the default targeted policy, which constrains daemons and system software only.','Security configuration requirements vary from site to site. Some sites may mandate a policy that is stricter than the default policy, which is perfectly acceptable. This item is intended to ensure that at least the default recommendations are met.','','Edit the /etc/selinux/config file to set the SELINUXTYPE parameter: SELINUXTYPE=targeted','[{\"cis\": [\"1.7.1.3\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5037,'Ensure the SELinux state is enforcing','Set SELinux to enable when the system is booted.','SELinux must be enabled at boot time in to ensure that the controls it provides are in effect at all times.','','Edit the /etc/selinux/config file to set the SELINUX parameter: SELINUX=enforcing','[{\"cis\": [\"1.7.1.4\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5038,'Ensure no unconfined services exist','Unconfined processes run in unconfined domains','For unconfined processes, SELinux policy rules are applied, but policy rules exist that allow processes running in unconfined domains almost all access. Processes running in unconfined domains fall back to using DAC rules exclusively. If an unconfined process is compromised, SELinux does not prevent an attacker from gaining access to system resources and data, but of course, DAC rules are still used. SELinux is a security enhancement on top of DAC rules – it does not replace them','','Investigate any unconfined processes found during the audit action. They may need to have an existing security context assigned to them or a policy built for them. Notes: Occasionally certain daemons such as backup or centralized management software may require running unconfined. Any such software should be carefully analyzed and documented before such an exception is made.','[{\"cis\": [\"1.7.1.5\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5039,'Ensure SETroubleshoot is not installed','The SETroubleshoot service notifies desktop users of SELinux denials through a user-friendly interface. The service provides important information around configuration errors, unauthorized intrusions, and other potential errors.','The SETroubleshoot service is an unnecessary daemon to have running on a server, especially if X Windows is disabled.','','Run the following command to uninstall setroubleshoot: # dnf remove setroubleshoot','[{\"cis\": [\"1.7.1.6\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5040,'Ensure the MCS Translation Service (mcstrans) is not installed','The mcstransd daemon provides category label information to client processes requesting information. The label translations are defined in /etc/selinux/targeted/setrans.conf','Since this service is not used very often, remove it to reduce the amount of potentially vulnerable code running on the system.','','Run the following command to uninstall mcstrans: # dnf remove mcstrans','[{\"cis\": [\"1.7.1.5\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5041,'Ensure message of the day is configured properly','The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/motd file with the appropriate contents according to your site policy, remove any instances of m , , s , v or references to the OS platform OR If the motd is not used, this file can be removed. Run the following command to remove the motd file: # rm /etc/motd','[{\"cis\": [\"1.8.1.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(5042,'Ensure local login warning banner is configured properly','The contents of the /etc/issue file are displayed to users prior to login for local terminals. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/issue file with the appropriate contents according to your site policy, remove any instances of m , , s , v or references to the OS platform: # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue','[{\"cis\": [\"1.8.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(5043,'Ensure remote login warning banner is configured properly','The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/issue.net file with the appropriate contents according to your site policy, remove any instances of m , , s , v or references to the OS platform: # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue.net','[{\"cis\": [\"1.8.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(5044,'Ensure permissions on /etc/motd are configured','The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users.','If the /etc/motd file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/motd: # chown root:root /etc/motd # chmod 644 /etc/motd','[{\"cis\": [\"1.8.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5045,'Ensure permissions on /etc/issue are configured','The contents of the /etc/issue file are displayed to users prior to login for local terminals.','If the /etc/issue file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/issue: # chown root:root /etc/issue # chmod 644 /etc/issue','[{\"cis\": [\"1.8.1.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5046,'Ensure permissions on /etc/issue.net are configured','The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services.','If the /etc/issue.net file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/issue.net: # chown root:root /etc/issue.net # chmod 644 /etc/issue.net','[{\"cis\": [\"1.8.1.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5047,'Ensure GDM login banner is configured','GDM is the GNOME Display Manager which handles graphical login for GNOME based systems.','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place.','','Edit or create the file /etc/gdm3/greeter.dconf-defaults and add the following in 3 lines: (1) [org/gnome/login-screen] (2) banner-message-enable=true (3) banner-message-text='Authorized uses only. All activity may be monitored and reported.'','[{\"cis\": [\"1.8.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(5048,'Ensure updates, patches, and additional security software are installed','Periodically patches are released for included software either due to security flaws or to include additional functionality.','Newer patches may contain security enhancements that would not be available through the latest full update. As a result, it is recommended that the latest software patches be used to take advantage of the latest functionality. As with any software installation, organizations need to determine if a given update meets their requirements and verify the compatibility and supportability of any additional software against the update revision that is selected.','','Use your package manager to update all packages on the system according to site policy. The following command will install all available security updates: # dnf update --security . Site policy may mandate a testing period before install onto production systems for available updates. The audit and remediation here only cover security updates. Non-security updates can be audited with and comparing against site policy: # dnf check-update','[{\"cis\": [\"1.9\"]}, {\"cis_csc\": [\"3.4\"]}, {\"pci_dss\": [\"5.2\"]}, {\"nist_800_53\": [\"AU.6\", \"SI.4\"]}, {\"gpg_13\": [\"4.2\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"A1.2\"]}]'),(5049,'Ensure system-wide crypto policy is not legacy','The system-wide crypto-policies followed by the crypto core components allow consistently deprecating and disabling algorithms system-wide. The individual policy levels (DEFAULT, LEGACY, FUTURE, and FIPS) are included in the crypto-policies(7) package.','If the Legacy system-wide crypto policy is selected, it includes support for TLS 1.0, TLS 1.1, and SSH2 protocols or later. The algorithms DSA, 3DES, and RC4 are allowed, while RSA and Diffie-Hellman parameters are accepted if larger than 1023-bits. These legacy protocols and algorithms can make the system vulnerable to attacks, including those listed in RFC 7457','','Run the following command to change the system-wide crypto policy # update-crypto-policies --set <CRYPTO POLICY> Example: # update-crypto-policies --set DEFAULT Run the following to make the updated system-wide crypto policy active # update-crypto-policies','[{\"cis\": [\"1.10\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5050,'Ensure system-wide crypto policy is FUTURE or FIPS','The system-wide crypto-policies followed by the crypto core components allow consistently deprecating and disabling algorithms system-wide. The individual policy levels (DEFAULT, LEGACY, FUTURE, and FIPS) are included in the crypto-policies(7) package.','If the Legacy system-wide crypto policy is selected, it includes support for TLS 1.0, TLS 1.1, and SSH2 protocols or later. The algorithms DSA, 3DES, and RC4 are allowed, while RSA and Diffie-Hellman parameters are accepted if larger than 1023-bits. These legacy protocols and algorithms can make the system vulnerable to attacks, including those listed in RFC 7457 FUTURE: Is a conservative security level that is believed to withstand any near-term future attacks. This level does not allow the use of SHA-1 in signature algorithms. The RSA and Diffie-Hellman parameters are accepted if larger than 3071 bits. The level provides at least 128-bit security FIPS: Conforms to the FIPS 140-2 requirements. This policy is used internally by the fips-mode-setup(8) tool which can switch the system into the FIPS 140-2 compliance mode. The level provides at least 112-bit security','','Run the following command to change the system-wide crypto policy # update-crypto-policies --set FUTURE OR To switch the system to FIPS mode, run the following command: # fips-mode-setup --enable','[{\"cis\": [\"1.11\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5051,'Ensure xinetd is not installed','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.','','Run the following command to remove xinetd: # dnf remove xinetd','[{\"cis\": [\"2.1.1\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5052,'Ensure time synchronization is in use','System time should be synchronized between all systems in an environment. This is typically done by establishing an authoritative time server or set of servers and having all systems synchronize their clocks to them.','Time synchronization is important to support time sensitive security mechanisms like Kerberos and also ensures log files have consistent time records across the enterprise, which aids in forensic investigations.','','On physical systems or virtual systems where host based time synchronization is not available install chrony: # dnf install chrony On virtual systems where host based time synchronization is available consult your virtualization software documentation and verify that host based synchronization is in use.','[{\"cis\": [\"2.2.2.1\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"10.4\"]}, {\"nist_800_53\": [\"AU.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5053,'Ensure chrony is configured','chrony is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at https://www.ntp.org. ntp can be configured to be a client and/or a server.','If chrony is in use on the system proper configuration is vital to ensuring time synchronization is working properly.','','Add or edit server or pool lines to /etc/chrony.conf as appropriate: server <remote-server> Configure chrony to run as the chrony user','[{\"cis\": [\"2.2.1.2\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5054,'Ensure X Window System is not installed','The X Window System provides a Graphical User Interface (GUI) where users can have multiple windows in which to run programs and various add on. The X Windows system is typically used on workstations where users login, but not on servers where users typically do not login.','Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface.','','Run the following command to remove the X Windows System packages: # dnf remove xorg-x11*','[{\"cis\": [\"2.2.2\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5055,'Ensure rsync service is not enabled','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.','','Run the following command to disable rsync: # systemctl --now disable rsyncd','[{\"cis\": [\"2.2.3\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5056,'Ensure Avahi Server is not enabled','Avahi is a free zeroconf implementation, including a system for multicast DNS/DNS-SD service discovery. Avahi allows programs to publish and discover services and hosts running on a local network with no specific configuration. For example, a user can plug a computer into a network and Avahi automatically finds printers to print to, files to look at and people to talk to, as well as network services running on the machine.','Automatic discovery of network services is not normally required for system functionality. It is recommended to disable the service to reduce the potential attack surface.','','Run the following command to disable avahi-daemon: # systemctl --now disable avahi-daemon','[{\"cis\": [\"2.2.4\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5057,'Ensure SNMP Server is not enabled','The Simple Network Management Protocol (SNMP) server is used to listen for SNMP commands from an SNMP management system, execute the commands or collect the information and then send results back to the requesting system.','The SNMP server can communicate using SNMP v1, which transmits data in the clear and does not require authentication to execute commands. Unless absolutely necessary, it is recommended that the SNMP service not be used. If SNMP is required the server should be configured to disallow SNMP v1.','','Run the following command to disable snmpd: # systemctl --now disable snmpd','[{\"cis\": [\"2.2.5\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5058,'Ensure HTTP Proxy Server is not enabled','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 disabled to reduce the potential attack surface.','','Run the following command to disable squid: # systemctl --now disable squid','[{\"cis\": [\"2.2.6\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5059,'Ensure Samba is not enabled','The Samba daemon allows system administrators to configure their Linux systems to share file systems and directories with Windows desktops. Samba will advertise the file systems and directories via the Small Message Block (SMB) protocol. Windows desktop users will be able to mount these directories and file systems as letter drives on their systems.','If there is no need to mount directories and file systems to Windows systems, then this service can be disabled to reduce the potential attack surface.','','Run the following command to disable smb: # systemctl --now disable smb','[{\"cis\": [\"2.2.7\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5060,'Ensure IMAP and POP3 server is not enabled','dovecot is an open source IMAP and POP3 server for Linux based systems.','Unless POP3 and/or IMAP servers are to be provided by this system, it is recommended that the service be disabled to reduce the potential attack surface.','','Run the following command to disable dovecot: # systemctl --now disable dovecot','[{\"cis\": [\"2.2.8\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5061,'Ensure HTTP server is not enabled','HTTP or web servers provide the ability to host web site content.','Unless there is a need to run the system as a web server, it is recommended that the service be disabled to reduce the potential attack surface.','','Run the following command to disable httpd: # systemctl --now disable httpd','[{\"cis\": [\"2.2.9\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5062,'Ensure FTP Server is not enabled','The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files.','FTP does not protect the confidentiality of data or authentication credentials. It is recommended sftp be used if file transfer is required. Unless there is a need to run the system as a FTP server (for example, to allow anonymous downloads), it is recommended that the service be disabled to reduce the potential attack surface.','','Run the following command to disable vsftpd: # systemctl --now disable vsftpd','[{\"cis\": [\"2.2.10\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5063,'Ensure DNS Server is not enabled','The Domain Name System (DNS) is a hierarchical naming system that maps names to IP addresses for computers, services and other resources connected to a network.','Unless a system is specifically designated to act as a DNS server, it is recommended that the service be disabled to reduce the potential attack surface.','','Run the following command to disable named : # systemctl --now disable named','[{\"cis\": [\"2.2.11\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5064,'Ensure NFS is not enabled','The Network File System (NFS) is one of the first and most widely distributed file systems in the UNIX environment. It provides the ability for systems to mount file systems of other servers through the network.','If the system does not export NFS shares, it is recommended that the NFS be disabled to reduce remote attack surface.','','Run the following commands to disable nfs: # systemctl --now disable nfs','[{\"cis\": [\"2.2.12\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5065,'Ensure RPC is not enabled','The rpcbind service maps Remote Procedure Call (RPC) services to the ports on which they listen. RPC processes notify rpcbind when they start, registering the ports they are listening on and the RPC program numbers they expect to serve. The client system then contacts rpcbind on the server with a particular RPC program number. The rpcbind service redirects the client to the proper port number so it can communicate with the requested service.','If the system does not require rpc based services, it is recommended that rpcbind be disabled to reduce the remote attack surface.','','Run the following commands to disable nfs: # systemctl --now disable rpcbind','[{\"cis\": [\"2.2.13\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5066,'Ensure LDAP Server is not enabled','The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.','If the system will not need to act as an LDAP server, it is recommended that the software be disabled to reduce the potential attack surface.','','Run the following command to disable slapd: # systemctl --now disable slapd','[{\"cis\": [\"2.2.14\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5067,'Ensure DHCP Server is not enabled','The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses.','Unless a system is specifically set up to act as a DHCP server, it is recommended that this service be disabled to reduce the potential attack surface.','','Run the following command to disable dhcpd: # systemctl --now disable dhcpd','[{\"cis\": [\"2.2.15\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5068,'Ensure CUPS is not enabled','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.','','Run the following command to disable cups : # systemctl --now disable cups','[{\"cis\": [\"2.2.16\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5069,'Ensure NIS Server is not enabled','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','','Run the following command to disable ypserv: # systemctl --now disable ypserv','[{\"cis\": [\"2.2.17\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5070,'Ensure mail transfer agent is configured for local-only mode','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.','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.','','Edit /etc/postfix/main.cf and add the following line to the RECEIVING MAIL section. If the line already exists, change it to look like the line below: inet_interfaces = loopback-only . Restart postfix: # systemctl restart postfix','[{\"cis\": [\"2.2.18\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AC.4\", \"SC.7\"]}, {\"tsc\": [\"CC5.2\", \"CC6.4\", \"CC6.6\", \"CC6.7\"]}]'),(5071,'Ensure NIS Client is not installed','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.','','Run the following command to uninstall ypbind: # dnf remove ypbind','[{\"cis\": [\"2.3.1\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5072,'Ensure telnet client is not installed','The telnet package contains the telnet client, which allows users to start connections to other systems via the telnet protocol.','The telnet protocol is insecure and unencrypted. The use of an unencrypted transmission medium could allow an unauthorized user to steal credentials. The ssh package provides an encrypted session and stronger security and is included in most Linux distributions.','','Run the following command to uninstall telnet : # dnf remove telnet','[{\"cis\": [\"2.3.2\"]}, {\"cis_csc\": [\"4.5\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5073,'Ensure LDAP client is not installed','The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.','If the system will not need to act as an LDAP client, it is recommended that the software be removed to reduce the potential attack surface.','','Run the following command to uninstall openldap-clients : # dnf remove openldap-clients','[{\"cis\": [\"2.3.3\"]}, {\"cis_csc\": [\"2.6\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5074,'Ensure IP forwarding is disabled','The net.ipv4.ip_forward and net.ipv6.conf.all.forwarding flags are used to tell the system whether it can forward packets or not.','Setting the flags to 0 ensures that a system with multiple interfaces (for example, a hard proxy), will never be able to forward packets, and therefore, never serve as a router.','','Run the following commands to restore the default parameters and set the active kernel parameters: # grep -Els "^s*net.ipv4.ip_forwards*=s*1" /etc/sysctl.conf /etc/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /run/sysctl.d/*.conf | while read filename; do sed -ri "s/^s*(net.ipv4.ip_forwards*)(=)(s*S+).*$/# *REMOVED* 1/" "s/^s*(net.ipv4.ip_forwards*)(=)(s*S+).*$/# *REMOVED* 1/" $filename; done; sysctl -w net.ipv4.ip_forward=0; sysctl -w net.ipv4.route.flush=1 && # grep -Els "^s*net.ipv6.conf.all.forwardings*=s*1" /etc/sysctl.conf /etc/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /run/sysctl.d/*.conf | while read filename; do sed -ri "s/^s*(net.ipv6.conf.all.forwardings*)(=)(s*S+).*$/# *REMOVED* 1/" $filename; done; sysctl -w net.ipv6.conf.all.forwarding=0; sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.1.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5075,'Ensure packet redirect sending is disabled','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 .Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.send_redirects=0; # sysctl -w net.ipv4.conf.default.send_redirects=0; # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5076,'Ensure source routed packets are not accepted','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, net.ipv4.conf.default.accept_source_route, net.ipv6.conf.all.accept_source_route and net.ipv6.conf.default.accept_source_route to 0 disables the system from accepting source routed packets. Assume this system was capable of routing packets to Internet routable addresses on one interface and private addresses on another interface. Assume that the private addresses were not routable to the Internet routable addresses and vice versa. Under normal routing circumstances, an attacker from the Internet routable addresses could not use the system as a way to reach the private address systems. If, however, source routed packets were allowed, they could be used to gain access to the private address systems as the route could be specified, rather than rely on routing protocols that did not allow this routing.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 net.ipv6.conf.all.accept_source_route = 0 net.ipv6.conf.default.accept_source_route = 0 and Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_source_route=0; # sysctl -w net.ipv4.conf.default.accept_source_route=0; # sysctl -w net.ipv6.conf.all.accept_source_route=0; # sysctl -w net.ipv6.conf.default.accept_source_route=0; # sysctl -w net.ipv4.route.flush=1; # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.2.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5077,'Ensure ICMP redirects are not accepted','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 and net.ipv6.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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 net.ipv6.conf.all.accept_redirects = 0 net.ipv6.conf.default.accept_redirects = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_redirects=0; # sysctl -w net.ipv4.conf.default.accept_redirects=0; # sysctl -w net.ipv6.conf.all.accept_redirects=0; # sysctl -w net.ipv6.conf.default.accept_redirects=0; # sysctl -w net.ipv4.route.flush=1 and # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.2.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5078,'Ensure secure ICMP redirects are not accepted','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.secure_redirects = 0 and net.ipv4.conf.default.secure_redirects = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.secure_redirects=0; # sysctl -w net.ipv4.conf.default.secure_redirects=0 and # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5079,'Ensure suspicious packets are logged','When enabled, this feature logs packets with un-routable source addresses to the kernel log.','Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.log_martians = 1 and net.ipv4.conf.default.log_martians = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.log_martians=1; # sysctl -w net.ipv4.conf.default.log_martians=1 and # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.4\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5080,'Ensure broadcast ICMP requests are ignored','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.','','Run the following command to restore the default parameters and set the active kernel parameters: # grep -Els "^s*net.ipv4.icmp_echo_ignore_broadcastss*=s*0" /etc/sysctl.conf /etc/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /etc/sysctl.conf /etc/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf "s/^s*(net.ipv4.icmp_echo_ignore_broadcastss*)(=)(s*S+).*$/# *REMOVED* 1/" $filename; done; sysctl -w net.icmp_echo_ignore_broadcasts=1; sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5081,'Ensure bogus ICMP responses are ignored','Setting icmp_ignore_bogus_error_responses to 1 prevents the kernel from logging bogus responses (RFC-1122 non-compliant) from broadcast reframes, keeping file systems from filling up with useless log messages.','Some routers (and some attackers) will send responses that violate RFC-1122 and attempt to fill up a log file system with many useless error messages.','','Run the following commands to restore the default parameters and set the active kernel parameters: # grep -Els "^s*net.ipv4.icmp_ignore_bogus_error_responsess*=s*0 /etc/sysctl.conf /etc/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /run/sysctl.d/*.conf | while read filename; do sed -ri "s/^s*(net.ipv4.icmp_ignore_bogus_error_responsess*)(=)(s*S+).*$/# *REMOVED* 1/" $filename; done; sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1; sysctl -w net.ipv4.route.flush=1"','[{\"cis\": [\"3.2.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5082,'Ensure Reverse Path Filtering is enabled','Setting net.ipv4.conf.all.rp_filter and net.ipv4.conf.default.rp_filter to 1 forces the Linux kernel to utilize reverse path filtering on a received packet to determine if the packet was valid. Essentially, with reverse path filtering, if the return packet does not go out the same interface that the corresponding source packet came from, the packet is dropped (and logged if log_martians is set).','Setting these flags is a good way to deter attackers from sending your system bogus packets that cannot be responded to. One instance where this feature breaks down is if asymmetrical routing is employed. This would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your system, you will not be able to enable this feature without breaking the routing.','','Run the following command to restore the default net.ipv4.conf.all.rp_filter = 1 parameter and set the active kernel parameter: # grep -Els "^s*net.ipv4.conf.all.rp_filters*=s*0" /etc/sysctl.conf /etc/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /run/sysctl.d/*.conf | while read filename; do sed -ri "s/^s*(net.ipv4.net.ipv4.conf.all.rp_filters*)(=)(s*S+).*$/# *REMOVED* 1/" $filename; done; sysctl -w net.ipv4.conf.all.rp_filter=1; sysctl -w net.ipv4.route.flush=1 .Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.default.rp_filter=1 and Run the following commands to set the active kernel parameter: # sysctl -w net.ipv4.conf.default.rp_filter=1 and # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.7\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5083,'Ensure TCP SYN Cookies is enabled','When tcp_syncookies is set, the kernel will handle TCP SYN packets normally until the half-open connection queue is full, at which time, the SYN cookie functionality kicks in. SYN cookies work by not using the SYN queue at all. Instead, the kernel simply replies to the SYN with a SYN|ACK, but will include a specially crafted TCP sequence number that encodes the source and destination IP address and port number and the time the packet was sent. A legitimate connection would send the ACK packet of the three way handshake with the specially crafted sequence number. This allows the system to verify that it has received a valid response to a SYN cookie and allow the connection, even though there is no corresponding SYN in the queue.','Attackers use SYN flood attacks to perform a denial of service attacked on a system by sending many SYN packets without completing the three way handshake. This will quickly use up slots in the kernel's half-open connection queue and prevent legitimate connections from succeeding. SYN cookies allow the system to keep accepting valid connections, even if under a denial of service attack.','','Run the following command to restore the default parameter and set the active kernel parameters: grep -Els "^s*net.ipv4.tcp_syncookiess*=s*[02]*" /etc/sysctl.conf /etc/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /run/sysctl.d/*.conf | while read filename; do sed -ri "s/^s*(net.ipv4.tcp_syncookiess*)(=)(s*S+).*$/# *REMOVED* 1/" $filename; done; sysctl -w net.ipv4.tcp_syncookies=1; sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.8\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5084,'Ensure IPv6 router advertisements are not accepted','This setting disables the system's ability to accept IPv6 router advertisements.','It is recommended that systems do 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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_ra = 0 and net.ipv6.conf.default.accept_ra = 0 . Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_ra=0; # sysctl -w net.ipv6.conf.default.accept_ra=0 and # sysctl -w net.ipv6.route.flush=1;','[{\"cis\": [\"3.2.9\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5085,'Ensure DCCP is disabled','The Datagram Congestion Control Protocol (DCCP) is a transport layer protocol that supports streaming media and telephony. DCCP provides a way to gain access to congestion control, without having to do it at the application layer, but does not provide in-sequence delivery','If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf. Example: vim /etc/modprobe.d/dccp.conf and add the following line: install dccp /bin/true','[{\"cis\": [\"3.3.1\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5086,'Ensure SCTP is disabled','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.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf .Example: vim /etc/modprobe.d/sctp.conf and add the following line: install sctp /bin/true','[{\"cis\": [\"3.3.2\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5087,'Ensure RDS is disabled','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.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf .Example: vim /etc/modprobe.d/rds.conf and add the following line: install rds /bin/true','[{\"cis\": [\"3.3.3\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5088,'Ensure TIPC is disabled','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.','','Edit or create a file in the /etc/modprobe.d/ directory ending in .conf .Example: vim /etc/modprobe.d/tipc.conf and add the following line: install tipc /bin/true','[{\"cis\": [\"3.3.4\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5089,'Ensure a Firewall package is installed','A Firewall package should be selected. Most firewall configuration utilities operate as a front end to nftables or iptables.','A Firewall package is required for firewall management and configuration.','','Run one of the following commands to install a Firewall package. For firewalld: dnf install firewalld .For nftables: # dnf install nftables. For iptables: # dnf install iptables','[{\"cis\": [\"3.4.1.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.1\"]}, {\"tsc\": [\"CC6.6\"]}]'),(5090,'Ensure firewalld service is enabled and running','Ensure that the firewalld service is enabled to protect your system','firewalld (Dynamic Firewall Manager) tool provides a dynamically managed firewall. The tool enables network/firewall zones to define the trust level of network connections and/or interfaces. It has support both for IPv4 and IPv6 firewall settings. Also, it supports Ethernet bridges and allow you to separate between runtime and permanent configuration options. Finally, it supports an interface for services or applications to add firewall rules directly','','Run the following command to enable and start firewalld: # systemctl --now enable firewalld','[{\"cis\": [\"3.4.2.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2\"]}, {\"tsc\": [\"CC6.6\"]}]'),(5091,'Ensure iptables is not enabled','IPtables is an application that allows a system administrator to configure the IPv4 and IPv6 tables, chains and rules provided by the Linux kernel firewall. IPtables is installed as a dependency with firewalld.','Running firewalld and IPtables concurrently may lead to conflict, therefore IPtables should be stopped and masked when using firewalld.','','Run the following command to stop and mask iptables: systemctl --now mask iptables','[{\"cis\": [\"3.4.2.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2\"]}, {\"tsc\": [\"CC6.6\"]}]'),(5092,'Ensure nftables is not enabled','nftables is a subsystem of the Linux kernel providing filtering and classification of network packets/datagrams/frames and is the successor to iptables. nftables are installed as a dependency with firewalld.','Running firewalld and nftables concurrently may lead to conflict, therefore nftables should be stopped and masked when using firewalld.','','Run the following command to mask and stop nftables: systemctl --now mask nftables','[{\"cis\": [\"3.4.2.3\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2\"]}, {\"tsc\": [\"CC6.6\"]}]'),(5093,'Ensure iptables are flushed','nftables is a replacement for iptables, ip6tables, ebtables and arptables','It is possible to mix iptables and nftables. However, this increases complexity and also the chance to introduce errors. For simplicity flush out all iptables rules, and ensure it is not loaded.','','Run the following commands to flush iptables: For iptables: # iptables -F and For ip6tables: # ip6tables -F','[{\"cis\": [\"3.4.3.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2\"]}, {\"tsc\": [\"CC6.6\"]}]'),(5094,'Ensure a table exists','Tables hold chains. Each table only has one address family and only applies to packets of this family. Tables can have one of five families.','nftables doesn't have any default tables. Without a table being build, nftables will not filter network traffic.','','Run the following command to create a table in nftables: # nft create table inet <table name> .Example: # nft create table inet filter','[{\"cis\": [\"3.4.3.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2\"]}, {\"tsc\": [\"CC6.6\"]}]'),(5095,'Ensure base chains exist','Chains are containers for rules. They exist in two kinds, base chains and regular chains. A base chain is an entry point for packets from the networking stack, a regular chain may be used as jump target and is used for better rule organization.','If a base chain doesn't exist with a hook for input, forward, and delete, packets that would flow through those chains will not be touched by nftables.','','Run the following command to create the base chains: # nft create chain inet <table name> <base chain name> { type filter hook <(input|forward|output)> priority 0 ; } . Example: # nft create chain inet filter input { type filter hook input priority 0 ; } # nft create chain inet filter forward { type filter hook forward priority 0; } # nft create chain inet filter output { type filter hook output priority 0 ; }','[{\"cis\": [\"3.4.3.3\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2\"]}, {\"tsc\": [\"CC6.6\"]}]'),(5096,'Ensure default deny firewall policy','Base chain policy is the default verdict that will be applied to packets reaching the end of the chain.','There are two policies: accept (Default) and drop. If the policy is set to accept , the firewall will accept any packet that is not configured to be denied and the packet will continue transversing the network stack. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following command for the base chains with the input, forward, and output hooks to implement a default DROP policy: # nft chain <table family> <table name> <chain name> { policy drop ; } . Example: # nft chain inet filter input { policy drop ; } ; # nft chain inet filter forward { policy drop ; } and # nft chain inet filter output { policy drop ; }','[{\"cis\": [\"3.4.3.6\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC6.6\"]}]'),(5097,'Ensure nftables service is enabled','The nftables service allows for the loading of nftables rulesets during boot, or starting of the nftables service.','The nftables service restores the nftables rules from the rules files referenced in the /etc/sysconfig/nftables.conf file during boot or the starting of the nftables service.','','Run the following command to enable the nftables service: # systemctl --now enable nftables','[{\"cis\": [\"3.4.3.7\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2\"]}, {\"tsc\": [\"CC6.6\"]}]'),(5098,'Ensure iptables default deny firewall policy','A default deny all policy on connections ensures that any unconfigured network usage will be rejected.','With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following commands to implement a default DROP policy: # iptables -P INPUT DROP; # iptables -P OUTPUT DROP; # iptables -P FORWARD DROP','[{\"cis\": [\"3.4.4.1.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC6.6\"]}]'),(5099,'Ensure loopback traffic is configured','Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (127.0.0.0/8).','Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (127.0.0.0/8) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.','','Run the following commands to implement the loopback rules: # iptables -A INPUT -i lo -j ACCEPT # iptables -A OUTPUT -o lo -j ACCEPT # iptables -A INPUT -s 127.0.0.0/8 -j DROP','[{\"cis\": [\"3.4.4.1.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC6.6\"]}]'),(5100,'Ensure IPv6 default deny firewall policy','A default deny all policy on connections ensures that any unconfigured network usage will be rejected.','With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following commands to implement a default DROP policy: # ip6tables -P INPUT DROP; # ip6tables -P OUTPUT DROP; # ip6tables -P FORWARD DROP','[{\"cis\": [\"3.4.4.2.1\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC6.6\"]}]'),(5101,'Ensure loopback traffic is configured','Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (::1).','Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (::1) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.','','Run the following commands to implement the loopback rules: # ip6tables -A INPUT -i lo -j ACCEPT # ip6tables -A OUTPUT -o lo -j ACCEPT # ip6tables -A INPUT -s ::1 -j DROP','[{\"cis\": [\"3.4.4.2.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC6.6\"]}]'),(5102,'Ensure wireless interfaces are disabled','Wireless networking is used when wired networks are unavailable. Red Hat Enterprise Linux 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.','','Run the following command to disable any wireless interfaces: # nmcli radio all off . Disable any wireless interfaces in your network configuration.','[{\"cis\": [\"3.5\"]}, {\"cis_csc\": [\"15.4\", \"15.5\"]}, {\"pci_dss\": [\"1.2.3\"]}, {\"tsc\": [\"CC6.6\"]}]'),(5103,'Disable IPv6','Although IPv6 has many advantages over IPv4, not all organizations have IPv6 or dual stack configurations implemented.','If IPv6 or dual stack is not to be used, it is recommended that IPv6 be disabled to reduce the attack surface of the system.','','Edit /etc/default/grub and add ipv6.disable=1 to the GRUB_CMDLINE_LINUX parameters: GRUB_CMDLINE_LINUX="ipv6.disable=1" .Run the following command to update the grub2 configuration: # grub2-mkconfig -o /boot/grub2/grub.cfg','[{\"cis\": [\"3.6\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.6\", \"CC5.2\"]}]'),(5104,'Ensure rsyslog is installed','The rsyslog software is a recommended replacement to the original syslogd daemon which provide improvements over syslogd , such as connection-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server.','The security enhancements of rsyslog 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.','','Run the following command to install rsyslog: # dnf install rsyslog','[{\"cis\": [\"4.2.1.1\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.1\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5105,'Ensure auditd is installed','auditd is the userspace component to the Linux Auditing System. It's responsible for writing audit records to the disk.','The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring.','','Run the following command to Install auditd # dnf install audit audit-libs','[{\"cis\": [\"4.1.1.1\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.1\"]}, {\"nist_800_53\": [\"AU.2\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5106,'Ensure auditd service is enabled','Turn on the auditd daemon to record system events.','The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring.','','Run the following command to enable auditd : # systemctl --now enable auditd','[{\"cis\": [\"4.1.2\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.1\", \"10.7\"]}, {\"nist_800_53\": [\"AU.2\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5107,'Ensure auditing for processes that start prior to auditd is enabled','Configure grub2 so that processes that are capable of being audited can be audited even if they start up prior to auditd startup.','The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring.','','Edit /etc/default/grub and add audit=1 to GRUB_CMDLINE_LINUX : GRUB_CMDLINE_LINUX="audit=1" . Run the following command to update the grub2 configuration: # grub2-mkconfig -o /boot/grub2/grub.cfg','[{\"cis\": [\"4.1.1.3\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.2.6\", \"10.7\"]}, {\"nist_800_53\": [\"AU.2\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"35.7.d\", \"32.2\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5108,'Ensure audit_backlog_limit is sufficient','The backlog limit has a default setting of 64.','During boot if audit=1, then the backlog will hold 64 records. If more than 64 records are created during boot, auditd records will be lost and potential malicious activity could go undetected.','','Edit /etc/default/grub and add audit_backlog_limit=<BACKLOG SIZE> to GRUB_CMDLINE_LINUX: Run the following command to update the grub2 configuration: # grub2-mkconfig -o /boot/grub2/grub.cfg','[{\"cis\": [\"4.1.1.4\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.7\"]}, {\"nist_800_53\": [\"AU.4\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(5109,'Ensure audit log storage size is configured','Configure the maximum size of the audit log file. Once the log reaches the maximum size, it will be rotated and a new log file will be started.','It is important that an appropriate size is determined for log files so that they do not impact the system and audit data is not lost.','','Set the following parameter in /etc/audit/auditd.conf in accordance with site policy: max_log_file = <MB>','[{\"cis\": [\"4.1.2.1\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"10.7\"]}, {\"nist_800_53\": [\"AU.4\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(5110,'Ensure audit logs are not automatically deleted','The max_log_file_action setting determines how to handle the audit log file reaching the max file size. A value of keep_logs will rotate the logs but never delete old logs.','In high security contexts, the benefits of maintaining a long audit history exceed the cost of storing the audit history.','','Set the following parameter in /etc/audit/auditd.conf: max_log_file_action = keep_logs','[{\"cis\": [\"4.1.2.2\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"10.7\"]}, {\"nist_800_53\": [\"AU.9\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(5111,'Ensure system is disabled when audit logs are full','The auditd daemon can be configured to halt the system when the audit logs are full.','In high security contexts, the risk of detecting unauthorized access or nonrepudiation exceeds the benefit of the system's availability.','','Set the following parameters in /etc/audit/auditd.conf: space_left_action = email action_mail_acct = root admin_space_left_action = halt','[{\"cis\": [\"4.1.1.2\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"10.7\"]}]'),(5112,'Ensure changes to system administration scope (sudoers) is collected','Monitor scope changes for system administrations. If the system has been properly configured to force system administrators to log in as themselves first and then use the sudo command to execute privileged commands, it is possible to monitor changes in scope. The file /etc/sudoers will be written to when the file or its attributes have changed. The audit records will be tagged with the identifier "scope."','Changes in the /etc/sudoers file can indicate that an unauthorized change has been made to scope of system administrator activity.','','Add the following line to the /etc/audit/audit.rules file: -w /etc/sudoers -p wa -k scope -w /etc/sudoers.d/ -p wa -k scope','[{\"cis\": [\"4.1.15\"]}, {\"cis_csc\": [\"4.8\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5113,'Ensure login and logout events are collected','Monitor login and logout events. The parameters below track changes to files associated with login/logout events. The file /var/log/faillog tracks failed events from login. The file /var/log/lastlog maintain records of the last time a user successfully logged in.','Monitoring login/logout events could provide a system administrator with information associated with brute force attacks against user logins.','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -w /var/log/lastlog -p wa -k logins -w /var/run/faillock/ -p wa -k logins','[{\"cis\": [\"4.1.4\"]}, {\"cis_csc\": [\"4.9\", \"16.13\"]}, {\"pci_dss\": [\"10.2.1\", \"10.2.4\", \"10.3\"]}, {\"nist_800_53\": [\"AC.7\", \"AU.14\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5114,'Ensure session initiation information is collected','Monitor session initiation events. The parameters in this section track changes to the files associated with session events. The file /var/run/utmp file tracks all currently logged in users. All audit records will be tagged with the identifier "session." The /var/log/wtmp file tracks logins, logouts, shutdown, and reboot events. The file /var/log/btmp keeps track of failed login attempts and can be read by entering the command /usr/bin/last -f /var/log/btmp . All audit records will be tagged with the identifier "logins.".','Monitoring these files for changes could alert a system administrator to logins occurring at unusual hours, which could indicate intruder activity (i.e. a user logging in at a time when they do not normally log in).','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -w /var/run/utmp -p wa -k session -w /var/log/wtmp -p wa -k logins -w /var/log/btmp -p wa -k logins','[{\"cis\": [\"4.1.5\"]}, {\"cis_csc\": [\"4.9\", \"16.13\"]}, {\"pci_dss\": [\"10.3\"]}, {\"nist_800_53\": [\"AC.7\", \"AU.14\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(5115,'Ensure events that modify date and time information are collected','Capture events where the system date and/or time has been modified. The parameters in this section are set to determine if the adjtimex (tune kernel clock), settimeofday (Set time, using timeval and timezone structures) stime (using seconds since 1/1/1970) or clock_settime (allows for the setting of several internal clocks and timers) system calls have been executed and always write an audit record to the /var/log/audit.log file upon exit, tagging the records with the identifier "time-change".','Unexpected changes in system date and/or time could be a sign of malicious activity on the system.','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change -a always,exit -F arch=b32 -S clock_settime -k time-change -w /etc/localtime -p wa -k time-change For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change -a always,exit -F arch=b64 -S clock_settime -k time-change -a always,exit -Farch=b32 -S clock_settime -k time-change -w /etc/localtime -p wa -k time-change','[{\"cis\": [\"4.1.6\"]}, {\"cis_csc\": [\"5.5\"]}, {\"pci_dss\": [\"10.4.2\", \"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5116,'Ensure events that modify the system's Mandatory Access Controls are collected','Monitor SELinux mandatory access controls. The parameters below monitor any write access (potential additional, deletion or modification of files in the directory) or attribute changes to the /etc/selinux or /etc/apparmor and /etc/apparmor.d directories.','Changes to files in these directories could indicate that an unauthorized user is attempting to modify access controls and change security contexts, leading to a compromise of the system.','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -w /etc/selinux/ -p wa -k MAC-policy -w /usr/share/selinux/ -p wa -k MAC-policy','[{\"cis\": [\"4.1.7\"]}, {\"cis_csc\": [\"5.5\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5117,'Ensure events that modify the system's network environment are collected','Record changes to network environment files or system calls. The below parameters monitor the sethostname (set the systems host name) or setdomainname (set the systems domainname) system calls, and write an audit event on system call exit. The other parameters monitor the /etc/issue and /etc/issue.net files (messages displayed pre-login), /etc/hosts (file containing host names and associated IP addresses), /etc/sysconfig/network file and /etc/sysconfig/network-scripts/ directory (containing network interface scripts and configurations).','Monitoring sethostname and setdomainname will identify potential unauthorized changes to host and domainname of a system. The changing of these names could potentially break security parameters that are set based on those names. The /etc/hosts file is monitored for changes in the file that can indicate an unauthorized intruder is trying to change machine associations with IP addresses and trick users and processes into connecting to unintended machines. Monitoring /etc/issue and /etc/issue.net is important, as intruders could put disinformation into those files and trick users into providing information to the intruder. Monitoring /etc/sysconfig/network and /etc/sysconfig/network-scripts/ is important as it can show if network interfaces or scripts are being modified in a way that can lead to the machine becoming unavailable or compromised. All audit records will be tagged with the identifier "system-locale."','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -a always,exit -F arch=b64 -S sethostname -S setdomainname -k system-locale -a always,exit -F arch=b32 -S sethostname -S setdomainname -k system-locale -w /etc/issue -p wa -k system-locale -w /etc/issue.net -p wa -k system-locale -w /etc/hosts -p wa -k system-locale -w /etc/sysconfig/network -p wa -k system-locale -w /etc/sysconfig/network-scripts/ -p wa -k system-locale','[{\"cis\": [\"4.1.8\"]}, {\"cis_csc\": [\"5.5\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5118,'Ensure discretionary access control permission modification events are collected','Monitor changes to file permissions, attributes, ownership and group. The parameters in this section track changes for system calls that affect file permissions and attributes. The chmod , fchmod and fchmodat system calls affect the permissions associated with a file. The chown , fchown , fchownat and lchown system calls affect owner and group attributes on a file. The setxattr , lsetxattr , fsetxattr (set extended file attributes) and removexattr , lremovexattr , fremovexattr (remove extended file attributes) control extended file attributes. In all cases, an audit record will only be written for non-system user ids (auid >= 1000) and will ignore Daemon events (auid = 4294967295). All audit records will be tagged with the identifier "perm_mod."','Monitoring for changes in file attributes could alert a system administrator to activity that could indicate intruder activity or policy violation.','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lrem','[{\"cis\": [\"4.1.9\"]}, {\"cis_csc\": [\"5.5\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5119,'Ensure unsuccessful unauthorized file access attempts are collected','Monitor for unsuccessful attempts to access files. The parameters below are associated with system calls that control creation ( creat ), opening ( open , openat ) and truncation ( truncate , ftruncate ) of files. An audit log record will only be written if the user is a non- privileged user (auid > = 1000), is not a Daemon event (auid=4294967295) and if the system call returned EACCES (permission denied to the file) or EPERM (some other permanent error associated with the specific system call). All audit records will be tagged with the identifier "access."','Failed attempts to open, create or truncate files could be an indication that an individual or process is trying to gain unauthorized access to the system.','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access','[{\"cis\": [\"4.1.10\"]}, {\"cis_csc\": [\"14.9\"]}, {\"pci_dss\": [\"10.2.4\"]}, {\"nist_800_53\": [\"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5120,'Ensure events that modify user/group information are collected','Record events affecting the group , passwd (user IDs), shadow and gshadow (passwords) or /etc/security/opasswd (old passwords, based on remember parameter in the PAM configuration) files. The parameters in this section will watch the files to see if they have been opened for write or have had attribute changes (e.g. permissions) and tag them with the identifier "identity" in the audit log file.','Unexpected changes to these files could be an indication that the system has been compromised and that an unauthorized user is attempting to hide their activities or compromise additional accounts.','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -w /etc/group -p wa -k identity -w /etc/passwd -p wa -k identity -w /etc/gshadow -p wa -k identity -w /etc/shadow -p wa -k identity -w /etc/security/opasswd -p wa -k identity','[{\"cis\": [\"4.1.11\"]}, {\"cis_csc\": [\"4.8\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5121,'Ensure successful file system mounts are collected','Monitor the use of the mount system call. The mount (and umount ) system call controls the mounting and unmounting of file systems. The parameters below configure the system to create an audit record when the mount system call is used by a non-privileged user.','It is highly unusual for a non privileged user to mount file systems to the system. While tracking mount commands gives the system administrator evidence that external media may have been mounted (based on a review of the source of the mount and confirming it's an external media type), it does not conclusively indicate that data was exported to the media. System administrators who wish to determine if data were exported, would also have to track successful open , creat and truncate system calls requiring write access to a file under the mount point of the external media file system. This could give a fair indication that a write occurred. The only way to truly prove it, would be to track successful writes to the external media. Tracking write system calls could quickly fill up the audit log and is not recommended. Recommendations on configuration options to track data export to media is beyond the scope of this document.','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -a always,exit -F arch=b64 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts -a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts','[{\"cis\": [\"4.1.12\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5122,'Ensure file deletion events by users are collected','Monitor the use of system calls associated with the deletion or renaming of files and file attributes. This configuration statement sets up monitoring for the unlink (remove a file), unlinkat (remove a file attribute), rename (rename a file) and renameat (rename a file attribute) system calls and tags them with the identifier "delete".','Monitoring these calls from non-privileged users could provide a system administrator with evidence that inappropriate removal of files and file attributes associated with protected files is occurring. While this audit option will look at all events, system administrators will want to look for specific privileged files that are being deleted or altered.','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -a always,exit -F arch=b64 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete -a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete','[{\"cis\": [\"4.1.14\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"10.5.5\"]}, {\"nist_800_53\": [\"AU.14\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC7.1\", \"CC7.2\", \"CC7.3\", \"CC8.1\"]}]'),(5123,'Ensure kernel module loading and unloading is collected','Monitor the loading and unloading of kernel modules. The programs insmod (install a kernel module), rmmod (remove a kernel module), and modprobe (a more sophisticated program to load and unload modules, as well as some other features) control loading and unloading of modules. The init_module (load a module) and delete_module (delete a module) system calls control loading and unloading of modules. Any execution of the loading and unloading module programs and system calls will trigger an audit record with an identifier of "modules".','Monitoring the use of insmod , rmmod and modprobe could provide system administrators with evidence that an unauthorized user loaded or unloaded a kernel module, possibly compromising the security of the system. Monitoring of the init_module and delete_module system calls would reflect an unauthorized user attempting to use a different program to load and unload modules.','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -w /sbin/insmod -p x -k modules -w /sbin/rmmod -p x -k modules -w /sbin/modprobe -p x -k modules -a always,exit -F arch=b32 -S init_module -S delete_module -k modules -a always,exit -F arch=b64 -S init_module -S delete_module -k modules','[{\"cis\": [\"4.1.15\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5124,'Ensure system administrator actions (sudolog) are collected','Monitor the sudo log file. If the system has been properly configured to disable the use of the su command and force all administrators to have to log in first and then use sudo to execute privileged commands, then all administrator commands will be logged to /var/log/sudo.log . Any time a command is executed, an audit event will be triggered as the /var/log/sudo.log file will be opened for write and the executed administration command will be written to the log.','Changes in /var/log/sudo.log indicate that an administrator has executed a command or the log file itself has been tampered with. Administrators will want to correlate the events written to the audit trail with the records written to /var/log/sudo.log to verify if unauthorized commands have been executed.','','Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add the following lines: -w /var/log/sudo.log -p wa -k actions','[{\"cis\": [\"4.1.16\"]}, {\"cis_csc\": [\"4.9\"]}, {\"pci_dss\": [\"10.2.2\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.6\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5125,'Ensure the audit configuration is immutable','Set system audit so that audit rules cannot be modified with auditctl . Setting the flag "-e 2" forces audit to be put in immutable mode. Audit changes can only be made on system reboot.','In immutable mode, unauthorized users cannot execute changes to the audit system to potentially hide malicious activity and then put the audit rules back. Users would most likely notice a system reboot and that could alert administrators of an attempt to make unauthorized audit changes.','','Edit or create the file /etc/audit/rules.d/99-finalize.rules and add the line: -e 2 at the end of the file','[{\"cis\": [\"4.1.17\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.5\"]}, {\"nist_800_53\": [\"AU.9\"]}, {\"hipaa\": [\"164.312.b\"]}]'),(5126,'Ensure rsyslog Service is enabled','Once the rsyslog package is installed it needs to be activated.','If the rsyslog service is not activated the system may default to the syslogd service or lack logging instead.','','Run the following command to enable rsyslog : # systemctl --now enable rsyslog','[{\"cis\": [\"4.2.1.2\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.1\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5127,'Ensure rsyslog default file permissions configured','rsyslog will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files.','It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected.','','Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and set $FileCreateMode to 0640 or more restrictive: $FileCreateMode 0640','[{\"cis\": [\"4.2.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.5.1\", \"10.5.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.9\"]}, {\"tsc\": [\"CC5.2\", \"CC7.2\"]}]'),(5128,'Ensure rsyslog is configured to send logs to a remote log host','The rsyslog utility supports the ability to send logs it gathers to a remote log host running syslogd(8) or to receive messages from remote hosts, reducing administrative overhead.','Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.','','Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and add the following line (where loghost.example.com is the name of your central log host). *.* @@loghost.example.com Run the following command to reload the rsyslogd configuration: # pkill -HUP rsyslogd','[{\"cis\": [\"4.2.1.5\"]}, {\"cis_csc\": [\"6.6\", \"6.8\"]}, {\"pci_dss\": [\"10.5.3\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.4\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5129,'Ensure journald is configured to send logs to rsyslog','Data from journald may be stored in volatile memory or persisted locally on the server. Utilities exist to accept remote export of journald logs, however, use of the rsyslog service provides a consistent means of log collection and export.','Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.','','Edit the /etc/systemd/journald.conf file and add the following line: ForwardToSyslog=yes','[{\"cis\": [\"4.2.2.1\"]}, {\"cis_csc\": [\"6.5\"]}, {\"pci_dss\": [\"10.5.3\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.9\", \"AU.4\"]}, {\"tsc\": [\"CC5.2\", \"CC7.2\"]}]'),(5130,'Ensure journald is configured to compress large log files','The journald system includes the capability of compressing overly large files to avoid filling up the system with logs or making the logs unmanageably large.','Uncompressed large files may unexpectedly fill a filesystem leading to resource unavailability. Compressing logs prior to write can prevent sudden, unexpected filesystem impacts.','','Edit the /etc/systemd/journald.conf file and add the following line: Compress=yes','[{\"cis\": [\"4.2.2.2\"]}, {\"cis_csc\": [\"6.4\"]}, {\"pci_dss\": [\"10.7\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.4\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5131,'Ensure journald is configured to write logfiles to persistent disk','Data from journald may be stored in volatile memory or persisted locally on the server. Logs in memory will be lost upon a system reboot. By persisting logs to local disk on the server they are protected from loss.','Writing log data to disk will provide the ability to forensically reconstruct events which may have impacted the operations or security of a system even after a system crash or reboot.','','Edit the /etc/systemd/journald.conf file and add the following line: Compress=yes','[{\"cis\": [\"4.2.2.3\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.7\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.4\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5132,'Ensure permissions on all logfiles are configured','Log files stored in /var/log/ contain logged information from many services on the system, or on log hosts others as well.','It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected.','','Run the following command to set permissions on all existing log files: # find /var/log -type f -exec chmod g-wx,o-rwx {} +','[{\"cis\": [\"4.2.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.5.1\", \"10.5.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AU.9\"]}, {\"tsc\": [\"CC5.2\", \"CC7.2\"]}]'),(5133,'Ensure cron daemon is enabled','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.','','Run the following command to enable cron : # systemctl --now enable crond','[{\"cis\": [\"5.1.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5134,'Ensure permissions on /etc/crontab are configured','The /etc/crontab file is used by cron to control its own jobs. The commands in this item make sure that root is the user and group owner of the file and that only the owner can access the file.','This file contains information on what system jobs are run by cron. Write access to these files could provide unprivileged users with the ability to elevate their privileges. Read access to these files could provide users with the ability to gain insight on system jobs that run on the system and could provide them a way to gain unauthorized privileged access.','','Run the following commands to set ownership and permissions on /etc/crontab : # chown root:root /etc/crontab # chmod og-rwx /etc/crontab','[{\"cis\": [\"5.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5135,'Ensure permissions on /etc/cron.hourly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.hourly : # chown root:root /etc/cron.hourly # chmod og-rwx /etc/cron.hourly','[{\"cis\": [\"5.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5136,'Ensure permissions on /etc/cron.daily are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.daily : # chown root:root /etc/cron.daily # chmod og-rwx /etc/cron.daily','[{\"cis\": [\"5.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5137,'Ensure permissions on /etc/cron.weekly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.weekly : # chown root:root /etc/cron.weekly # chmod og-rwx /etc/cron.weekly','[{\"cis\": [\"5.1.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5138,'Ensure permissions on /etc/cron.monthly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.monthly : # chown root:root /etc/cron.monthly # chmod og-rwx /etc/cron.monthly','[{\"cis\": [\"5.1.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5139,'Ensure permissions on /etc/cron.d are configured','Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow , cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs.','On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.','','Run the following commands to set ownership and permissions on /etc/cron.d : # chown root:root /etc/cron.d # chmod og-rwx /etc/cron.d','[{\"cis\": [\"5.1.7\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5140,'Ensure at/cron is restricted to authorized users','Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow , cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs.','On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.','','Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow : # rm /etc/cron.deny # rm /etc/at.deny # touch /etc/cron.allow # touch /etc/at.allow # chmod og-rwx /etc/cron.allow # chmod og-rwx /etc/at.allow # chown root:root /etc/cron.allow','[{\"cis\": [\"5.1.8\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5141,'Ensure permissions on /etc/ssh/sshd_config are configured','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-privileged users.','','Run the following commands to set ownership and permissions on /etc/ssh/sshd_config : # chown root:root /etc/ssh/sshd_config # chmod og-rwx /etc/ssh/sshd_config','[{\"cis\": [\"5.2.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5142,'Ensure SSH access is limited','There are several options available to limit which users and group can access the system via SSH. It is recommended that at least one of the following options be leveraged: AllowUsers The AllowUsers variable gives the system administrator the option of allowing specific users to ssh into the system. The list consists of space separated user names. Numeric user IDs are not recognized with this variable. If a system administrator wants to restrict user access further by only allowing the allowed users to log in from a particular host, the entry can be specified in the form of user@host. AllowGroups The AllowGroups variable gives the system administrator the option of allowing specific groups of users to ssh into the system. The list consists of space separated group names. Numeric group IDs are not recognized with this variable. DenyUsers The DenyUsers variable gives the system administrator the option of denying specific users to ssh into the system. The list consists of space separated user names. Numeric user IDs are not recognized with this variable. If a system administrator wants to restrict user access further by specifically denying a user's access from a particular host, the entry can be specified in the form of user@host. DenyGroups The DenyGroups variable gives the system administrator the option of denying specific groups of users to ssh into the system. The list consists of space separated group names. Numeric group IDs are not recognized with this variable.','Restricting which users can remotely access the system via SSH will help ensure that only authorized users access the system.','','Edit the /etc/ssh/sshd_config file to set one or more of the parameter as follows: AllowUsers <userlist>; AllowGroups <grouplist>; DenyUsers <userlist> and DenyGroups <grouplist>','[{\"cis\": [\"5.2.2\"]}, {\"cis_csc\": [\"4.3\"]}, {\"pci_dss\": [\"8.1\"]}, {\"tsc\": [\"CC6.1\"]}]'),(5143,'Ensure permissions on SSH private host key files are configured','An SSH private key is one of two files used in SSH public key authentication. In this authentication method, The possession of the private key is proof of identity. Only a private key that corresponds to a public key will be able to authenticate successfully. The private keys need to be stored and handled carefully, and no copies of the private key should be distributed.','If an unauthorized user obtains the private SSH host key file, the host could be impersonated','','Run the following commands to set ownership and permissions on the private SSH host key files: # find /etc/ssh -xdev -type f -name 'ssh_host_*_key' -exec chown root:root {} ; # find /etc/ssh -xdev -type f -name 'ssh_host_*_key' -exec chmod 0600 {} ;','[{\"cis\": [\"5.2.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5144,'Ensure permissions on SSH public host key files are configured','An SSH public key is one of two files used in SSH public key authentication. In this authentication method, a public key is a key that can be used for verifying digital signatures generated using a corresponding private key. Only a public key that corresponds to a private key will be able to authenticate successfully.','If a public host key file is modified by an unauthorized user, the SSH service may be compromised.','','Run the following commands to set permissions and ownership on the SSH host public key files: # find /etc/ssh -xdev -type f -name 'ssh_host_*_key.pub' -exec chmod 0644 {} ; #find /etc/ssh -xdev -type f -name 'ssh_host_*_key.pub' -exec chown root:root {} ;','[{\"cis\": [\"5.2.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5145,'Ensure SSH LogLevel is appropriate','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. VERBOSE level specifies that login and logout activity as well as the key fingerprint for any SSH key used for login will be logged. This information is important for SSH key management, especially in legacy environments.','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel VERBOSE or LogLevel INFO','[{\"cis\": [\"5.2.5\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(5146,'Ensure SSH X11 forwarding is disabled','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: X11Forwarding no','[{\"cis\": [\"5.2.6\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5147,'Ensure SSH MaxAuthTries is set to 4 or less','The MaxAuthTries parameter specifies the maximum number of authentication attempts permitted per connection. When the login failure count reaches half the number, error messages will be written to the syslog file detailing the login failure.','Setting the MaxAuthTries parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. While the recommended setting is 4, set the number based on site policy.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4','[{\"cis\": [\"5.2.7\"]}, {\"cis_csc\": [\"16.13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5148,'Ensure SSH IgnoreRhosts is enabled','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: Ignorerhosts yes','[{\"cis\": [\"5.2.8\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(5149,'Ensure SSH HostbasedAuthentication is disabled','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.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no','[{\"cis\": [\"5.2.9\"]}, {\"cis_csc\": [\"16.3\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(5150,'Ensure SSH root login is disabled','The PermitRootLogin parameter specifies if the root user can log in using ssh. The default is no.','Disallowing root logins over SSH requires system admins to authenticate using their own individual account, then escalating to root via sudo or su . This in turn limits opportunity for non-repudiation and provides a clear audit trail in the event of a security incident.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no','[{\"cis\": [\"5.2.10\"]}, {\"cis_csc\": [\"4.3\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(5151,'Ensure SSH PermitEmptyPasswords is disabled','The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts with empty password strings.','Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no','[{\"cis\": [\"5.2.11\"]}, {\"cis_csc\": [\"16.3\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(5152,'Ensure SSH PermitUserEnvironment is disabled','The PermitUserEnvironment option allows users to present environment options to the ssh daemon.','Permitting users the ability to set environment variables through the SSH daemon could potentially allow users to bypass security controls (e.g. setting an execution path that has ssh executing trojan'd programs)','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitUserEnvironment no','[{\"cis\": [\"5.2.12\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(5153,'Ensure SSH Idle Timeout Interval is configured','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.','','Edit the /etc/ssh/sshd_config file to set the parameters according to site policy: ClientAliveInterval 300 and ClientAliveCountMax 0','[{\"cis\": [\"5.2.13\"]}, {\"cis_csc\": [\"16.11\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(5154,'Ensure SSH LoginGraceTime is set to one minute or less','The LoginGraceTime parameter specifies the time allowed for successful authentication to the SSH server. The longer the Grace period is the more open unauthenticated connections can exist. Like other session controls in this session the Grace Period should be limited to appropriate organizational limits to ensure the service is available for needed access.','Setting the LoginGraceTime parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. It will also limit the number of concurrent unauthenticated connections While the recommended setting is 60 seconds (1 Minute), set the number based on site policy.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: LoginGraceTime 60','[{\"cis\": [\"5.2.14\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"8.1\"]}, {\"tsc\": [\"CC6.1\"]}]'),(5155,'Ensure SSH warning banner is configured','The Banner parameter specifies a file whose contents must be sent to the remote user before authentication is permitted. By default, no banner is displayed.','Banners are used to warn connecting users of the particular site's policy regarding connection. Presenting a warning message prior to the normal user login may assist the prosecution of trespassers on the computer system.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: Banner /etc/issue.net','[{\"cis\": [\"5.2.15\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5156,'Ensure SSH PAM is enabled','UsePAM Enables the Pluggable Authentication Module interface. If set to “yes” this will enable PAM authentication using ChallengeResponseAuthentication and PasswordAuthentication in addition to PAM account and session module processing for all authentication types.','When usePAM is set to yes, PAM runs through account and session types properly. This is important if you want to restrict access to services based off of IP, time or other factors of the account. Additionally, you can make sure users inherit certain environment variables on login or disallow access to the server.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: UsePAM yes','[{\"cis\": [\"5.2.16\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5157,'Ensure SSH AllowTcpForwarding is disabled','SSH port forwarding is a mechanism in SSH for tunneling application ports from the client to the server, or servers to clients. It can be used for adding encryption to legacy applications, going through firewalls, and some system administrators and IT professionals use it for opening backdoors into the internal network from their home machines.','Leaving port forwarding enabled can expose the organization to security risks and back-doors. SSH connections are protected with strong encryption. This makes their contents invisible to most deployed network monitoring and traffic filtering solutions. This invisibility carries considerable risk potential if it is used for malicious purposes such as data exfiltration. Cybercriminals or malware could exploit SSH to hide their unauthorized communications, or to exfiltrate stolen data from the target network.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: AllowTcpForwarding no','[{\"cis\": [\"5.2.17\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(5158,'Ensure SSH MaxSessions is set to 4 or less','The MaxSessions parameter specifies the maximum number of open sessions permitted from a given connection.','To protect a system from denial of service due to a large number of concurrent sessions, use the rate limiting function of MaxSessions to protect availability of sshd logins and prevent overwhelming the daemon.','','Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxSessions 4','[{\"cis\": [\"5.2.19\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5159,'Ensure system-wide crypto policy is not over-ridden','System-wide Crypto policy can be over-ridden or opted out of for openSSH','Over-riding or opting out of the system-wide crypto policy could allow for the use of less secure Ciphers, MACs, KexAlgoritms and GSSAPIKexAlgorithsm','','Run the following commands: # sed -ri "s/^s*(CRYPTO_POLICYs*=.*)$/# 1/" /etc/sysconfig/sshd; # systemctl reload sshd','[{\"cis\": [\"5.2.20\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"4.1\"]}, {\"hipaa\": [\"164.312.a.2.IV\", \"164.312.e.1\", \"164.312.e.2.I\", \"164.312.e.2.II\"]}, {\"nist_800_53\": [\"SC.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\", \"CC7.2\"]}]'),(5160,'Create custom authselect profile','A custom profile can be created by copying and customizing one of the default profiles. The default profiles include: sssd, winbind, or the nis.','A custom profile is required to customize many of the pam options','','Run the following command to create a custom authselect profile: # authselect create-profile <custom-profile name> -b <default profile to copy> .Example: # authselect create-profile custom-profile -b sssd --symlink-meta','[{\"cis\": [\"5.3.1\"]}, {\"pci_dss\": [\"8.1\"]}, {\"tsc\": [\"CC6.1\"]}]'),(5161,'Ensure authselect includes with-faillock','The pam_faillock.so module maintains a list of failed authentication attempts per user during a specified interval and locks the account in case there were more than deny consecutive failed authentications. It stores the failure records into per-user files in the tally directory.','Locking out user IDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems.','','Run the following command to include the with-faillock option: # authselect select <PROFILE NAME> with-faillock Example: # authselect select custom/custom-profile with-sudo with-faillock without-nullok','[{\"cis\": [\"5.3.3\"]}, {\"pci_dss\": [\"8.1\"]}, {\"tsc\": [\"CC6.1\"]}]'),(5162,'Ensure password creation requirements are configured','The pam_pwquality.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more. The following are definitions of the pam_pwquality.so options. try_first_pass - retrieve the password from a previous stacked PAM module. If not available, then prompt the user for a password. retry=3 - Allow 3 tries before sending back a failure. minlen=14 - password must be 14 characters or more Either of the following can be used to enforce complex passwords: minclass=4 - provide at least four classes of characters for the new password OR dcredit=-1 - provide at least one digit ucredit=-1 - provide at least one uppercase character ocredit=-1 - provide at least one special character lcredit=-1 - provide at least one lowercase character The settings shown above are one possible policy. Alter these values to conform to your own organization's password policies','Strong passwords protect systems from being hacked through brute force methods.','','Edit the file /etc/security/pwquality.conf and add or modify the following line for password length to conform to site policy: minlen = 14 Edit the file /etc/security/pwquality.conf and add or modify the following line for password complexity to conform to site policy: minclass = 4 OR dcredit = -1 ucredit = -1 ocredit = -1 -1 = -1 Run the following to update the system-auth and password-auth files: CP=$(authselect current | awk 'NR == 1 {print $3}' | grep custom/) for FN in system-auth password-auth; do [[ -n $CP ]] && PTF=/etc/authselect/$CP/$FN || PTF=/etc/authselect/$FN [[ -z $(grep -E '^s*passwords+requisites+pam_pwquality.sos+.*enforce-for-roots*.*$' $PTF) ]] && sed -ri 's/^s*(passwords+requisites+pam_pwquality.sos+)(.*)$/12 enforce-for-root/' $PTF [[ -n $(grep -E '^s*passwords+requisites+pam_pwquality.sos+.*s+retry=S+s*.*$' $PTF) ]] && sed -ri '/pwquality/s/retry=S+/retry=3/' $PTF || sed -ri 's/^s*(passwords+requisites+pam_pwquality.sos+)(.*)$/12 retry=3/' $PTF done authselect apply-changes','[{\"cis\": [\"5.4.1\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2.3\"]}, {\"tsc\": [\"CC6.1\"]}]'),(5163,'Ensure lockout for failed password attempts is configured','Lock out users after n unsuccessful consecutive login attempts. deny= - Number of attempts before the account is locked. unlock_time= - Time in seconds before the account is unlocked. Set the lockout number and unlock time to follow local site policy.','Locking out user IDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems.','','Set password lockouts and unlock times to conform to site policy. Run the following to update the system-auth and password-auth files. This script will update/add the deny=5 and unlock_time=900 options. This script should be modified as needed to follow local site policy.CP=$(authselect current | awk "NR == 1 {print $3}" | grep custom/) for FN in system-auth password-auth; do [[ -n $CP ]] && PTF=/etc/authselect/$CP/$FN || PTF=/etc/authselect/$FN [[ -n $(grep -E "^s*auths+requireds+pam_faillock.sos+.*deny=S+s*.*$" $PTF) ]] && sed -ri "/pam_faillock.so/s/deny=S+/deny=5/g" $PTF || sed -ri "s/^^s*(auths+requireds+pam_faillock.sos+)(.*[^{}])({.*}|)$/12 deny=5 3/" $PTF [[ -n $(grep -E "^s*auths+requireds+pam_faillock.sos+.*unlock_time=S+s*.*$" $PTF) ]] && sed -ri "/pam_faillock.so/s/unlock_time=S+/unlock_time=900/g" $PTF || sed -ri "s/^s*(auths+requireds+pam_faillock.sos+)(.*[^{}])({.*}|)$/12 unlock_time=900 3/" $PTF done authselect apply-changes','[{\"cis\": [\"5.4.2\"]}, {\"cis_csc\": [\"16.7\"]}, {\"pci_dss\": [\"8.2.5\"]}, {\"tsc\": [\"CC6.1\"]}]'),(5164,'Ensure password reuse is limited','The /etc/security/opasswd file stores the users" old passwords and can be checked to ensure that users are not recycling recent passwords. remember=<5> - Number of old passwords to remember','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.','','Set remembered password history to conform to site policy. Run the following script to add or modify the pam_pwhistory.so and pam_unix.so lines to include the remember option: CP=$(authselect current | awk "NR == 1 {print $3}" | grep custom/) [[ -n $CP ]] && PTF=/etc/authselect/$CP/system-auth || PTF=/etc/authselect/system-auth [[ -n $(grep -E "^s*passwords+(sufficients+pam_unix|requi(red|site)s+pam_pwhistory).sos+ ([^#]+s+)*remember=S+s*.*$" $PTF) ]] && sed -ri "s/^s*(passwords+(requisite|sufficient)s+(pam_pwquality.so|pam_unix.so)s+)(.*)(remember=S+s*)(.*)$/14 remember=5 6/" $PTF || sed -ri "s/^s*(passwords+(requisite|sufficient)s+(pam_pwquality.so|pam_unix.so)s+)(.*)$/14 remember=5/" $PTF authselect apply-changes','[{\"cis\": [\"5.4.3\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2.5\"]}, {\"tsc\": [\"CC6.1\"]}]'),(5165,'Ensure password hashing algorithm is SHA-512','The commands below change password encryption from md5 to sha512 (a much stronger hashing algorithm). All existing accounts will need to perform a password change to upgrade the stored hashes to the new algorithm.','The SHA-512 algorithm provides much stronger hashing than MD5, thus providing additional protection to the system by increasing the level of effort for an attacker to successfully determine passwords. Note that these change only apply to accounts configured on the local system.','','Set password hashing algorithm to sha512. Run the following script to dd or modify the pam_unix.so lines in the password-auth and system-auth files to include the sha512 option: CP=$(authselect current | awk 'NR == 1 {print $3}' | grep custom/) for FN in system-auth password-auth; do [[ -z $(grep -E '^s*passwords+sufficients+pam_unix.sos+.*sha512s*.*$' $PTF) ]] && sed -ri 's/^s*(passwords+sufficients+pam_unix.sos+)(.*)$/12 sha512/' $PTF done authselect apply-changes','[{\"cis\": [\"5.4.4\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"3.6.1\", \"8.2.1\"]}, {\"tsc\": [\"CC6.1\", \"CC6.7\"]}]'),(5166,'Ensure password expiration is 365 days or less','The PASS_MAX_DAYS parameter in /etc/login.defs allows an administrator to force passwords to expire once they reach a defined age. It is recommended that the PASS_MAX_DAYS parameter be set to less than or equal to 365 days.','The window of opportunity for an attacker to leverage compromised credentials or successfully compromise credentials via an online brute force attack is limited by the age of the password. Therefore, reducing the maximum age of a password also reduces an attacker's window of opportunity.','','Set the PASS_MAX_DAYS parameter to conform to site policy in /etc/login.defs : PASS_MAX_DAYS 90 and modify user parameters for all users with a password set to match: chage --maxdays 90 <user>','[{\"cis\": [\"5.5.1.1\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2.4\"]}, {\"tsc\": [\"CC6.1\"]}]'),(5167,'Ensure minimum days between password changes is 7 or more','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.','','Set the PASS_MIN_DAYS parameter to 7 in /etc/login.defs: PASS_MIN_DAYS 7 and modify user parameters for all users with a password set to match: chage --mindays 7 <user>','[{\"cis\": [\"5.5.1.2\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(5168,'Ensure minimum days between password changes is 7 or more','The PASS_WARN_AGE parameter in /etc/login.defs allows an administrator to notify users that their password will expire in a defined number of days. It is recommended that the PASS_WARN_AGE parameter be set to 7 or more days.','Providing an advance warning that a password will be expiring gives users time to think of a secure password. Users caught unaware may choose a simple password or write it down where it may be discovered.','','Set the PASS_WARN_AGE parameter to 7 in /etc/login.defs: PASS_WARN_AGE 7 and modify user parameters for all users with a password set to match: chage --warndays 7 <user>','[{\"cis\": [\"5.5.1.3\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(5169,'Ensure inactive password lock is 30 days or less','User accounts that have been inactive for over a given period of time can be automatically disabled. It is recommended that accounts that are inactive for 30 days after password expiration be disabled.','Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies.','','Run the following command to set the default password inactivity period to 30 days: useradd -D -f 30 and modify user parameters for all users with a password set to match: chage --inactive 30 <user>','[{\"cis\": [\"5.4.1.4\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(5170,'Ensure default user shell timeout is 900 seconds or less','The default TMOUT determines the shell timeout for users. The TMOUT value is measured in seconds.','Having no timeout value associated with a shell could allow an unauthorized user access to another user's shell 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.','','Edit the /etc/bashrc , /etc/profile and /etc/profile.d/*.sh files (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: readonly TMOUT=900 ; export TMOUT . Note that setting the value to readonly prevents unwanted modification during runtime.','[{\"cis\": [\"5.5.3\"]}, {\"cis_csc\": [\"16.11\"]}, {\"pci_dss\": [\"12.3.8\"]}]'),(5171,'Ensure default group for the root account is GID 0','The usermod command can be used to specify which group the root user belongs to. This affects permissions of files that are created by the root user.','Using GID 0 for the root account helps prevent root -owned files from accidentally becoming accessible to non-privileged users.','','Run the following command to set the root user default group to GID 0: usermod -g 0 root','[{\"cis\": [\"5.5.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(5172,'Ensure default user umask is 027 or more restrictive','The default umask determines the permissions of files created by users. The user creating the file has the discretion of making their files and directories readable by others via the chmod command. Users who wish to allow their files and directories to be readable by others by default may choose a different default umask by inserting the umask command into the standard shell configuration files ( .profile , .bashrc , etc.) in their home directories.','Setting a very secure default value for umask ensures that users make a conscious choice about their file permissions. A default umask setting of 077 causes files and directories created by users to not be readable by any other user on the system. A umask of 027 would make files and directories readable by users in the same Unix group, while a umask of 022 would make files readable by every user on the system.','','Edit the /etc/bashrc , /etc/profile and /etc/profile.d/*.sh files (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: umask 027','[{\"cis\": [\"5.5.5\"]}, {\"cis_csc\": [\"5.1\", \"13\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(5173,'Ensure access to the su command is restricted.','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.','','Add the following line to the /etc/pam.d/su file: auth required pam_wheel.so use_uid','[{\"cis\": [\"5.7\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5174,'Ensure permissions on /etc/passwd are configured','The /etc/passwd file contains user account information that is used by many system utilities and therefore must be readable for these utilities to operate.','It is critical to ensure that the /etc/passwd file is protected from unauthorized write access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/passwd: # chown root:root /etc/passwd # chmod 644 /etc/passwd','[{\"cis\": [\"6.1.2\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5175,'Ensure permissions on /etc/shadow are configured','The /etc/shadow file is used to store the information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information.','If attackers can gain read access to the /etc/shadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/shadow file (such as expiration) could also be useful to subvert the user accounts.','','Run the following command to set permissions on /etc/ shadow: # chown root:root /etc/shadow # chown root:shadow /etc/shadow # chmod o-rwx,g-wx /etc/shadow','[{\"cis\": [\"6.1.4\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5176,'Ensure permissions on /etc/group are configured','The /etc/group file contains a list of all the valid groups defined in the system. The command below allows read/write access for root and read access for everyone else.','The /etc/group file needs to be protected from unauthorized changes by non-privileged users, but needs to be readable as this information is used with many non-privileged programs.','','Run the following command to set permissions on /etc/group: # chown root:root /etc/group # chmod 644 /etc/group','[{\"cis\": [\"6.1.8\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5177,'Ensure permissions on /etc/gshadow are configured','The /etc/gshadow file is used to store the information about groups that is critical to the security of those accounts, such as the hashed password and other security information.','If attackers can gain read access to the /etc/gshadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/gshadow file (such as group administrators) could also be useful to subvert the group','','Run the following command to set permissions on /etc/gshadow: # chown root:root /etc/gshadow # chown root:shadow /etc/gshadow # chmod o-rwx,g-rw /etc/gshadow','[{\"cis\": [\"6.1.6\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5178,'Ensure permissions on /etc/passwd- are configured','The /etc/passwd- file contains backup user account information.','It is critical to ensure that the /etc/passwd- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/passwd-: # chown root:root /etc/passwd- # chmod 600 /etc/passwd-','[{\"cis\": [\"6.1.3\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5179,'Ensure permissions on /etc/shadow- are configured','The /etc/shadow- file is used to store backup information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information.','It is critical to ensure that the /etc/shadow- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/shadow-: # chown root:shadow /etc/shadow- # chmod u-x,go-rwx /etc/shadow-','[{\"cis\": [\"6.1.5\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5180,'Ensure permissions on /etc/group- are configured','The /etc/group- file contains a backup list of all the valid groups defined in the system.','It is critical to ensure that the /etc/group- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the following command to set permissions on /etc/group-: # chown root:root /etc/group- # chmod 644 /etc/group-','[{\"cis\": [\"6.1.9\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5181,'Ensure permissions on /etc/gshadow- are configured','The /etc/gshadow- file is used to store backup information about groups that is critical to the security of those accounts, such as the hashed password and other security information.','It is critical to ensure that the /etc/gshadow- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.','','Run the one of the following chown commands as appropriate and the chmod to set permissions on /etc/gshadow- : # chown root:root /etc/gshadow- # chown root:shadow /etc/gshadow- # chmod o-rwx,g-rw /etc/gshadow-','[{\"cis\": [\"6.1.7\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5182,'Ensure password fields are not empty','An account with an empty password field means that anybody may log in as that user without providing a password.','All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user.','','If any accounts in the /etc/shadow file do not have a password, run the following command to lock the account until it can be determined why it does not have a password: passwd -l <username> || Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off.','[{\"cis\": [\"6.2.1\"]}, {\"cis_csc\": [\"4.4\"]}, {\"pci_dss\": [\"8.2\"]}, {\"tsc\": [\"CC6.1\"]}]'),(5183,'Ensure no legacy "+" entries exist in /etc/passwd','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Remove any legacy '+' entries from /etc/passwd if they exist.','[{\"cis\": [\"6.2.2\"]}, {\"cis_csc\": [\"16.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5184,'Ensure no legacy "+" entries exist in /etc/shadow','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Remove any legacy '+' entries from /etc/shadow if they exist.','[{\"cis\": [\"6.2.4\"]}, {\"cis_csc\": [\"16.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5185,'Ensure no legacy "+" entries exist in /etc/group','The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms.','These entries may provide an avenue for attackers to gain privileged access on the system.','','Remove any legacy '+' entries from /etc/group if they exist.','[{\"cis\": [\"6.2.5\"]}, {\"cis_csc\": [\"16.2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5186,'Ensure root is the only UID 0 account','Any account with UID 0 has superuser privileges on the system.','This access must be limited to only the default root account and only from the system console. Administrative access must be through an unprivileged account using an approved mechanism as noted in Item 5.6 Ensure access to the su command is restricted.','','Remove any users other than root with UID 0 or assign them a new UID if appropriate.','[{\"cis\": [\"6.2.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5500,'Ensure mounting of cramfs filesystems is disabled','The cramfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems. A cramfs image can be used without having to first decompress the image.','Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install cramfs /bin/true. Run the following command to unload the cramfs module: rmmod cramfs','[{\"cis\": [\"1.1.1.1\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(5501,'Ensure mounting of freevxfs filesystems is disabled','The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the primary filesystem type for HP-UX operating systems.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install freevxfs /bin/true. Run the following command to unload the freevxfs module: rmmod freevxfs','[{\"cis\": [\"1.1.1.2\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(5502,'Ensure mounting of jffs2 filesystems is disabled','The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install jffs2 /bin/true. Run the following command to unload the jffs2 module: rmmod jffs2','[{\"cis\": [\"1.1.1.3\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(5503,'Ensure mounting of hfs filesystems is disabled','The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS filesystems.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfs /bin/true. Run the following command to unload the hfs module: rmmod hfs','[{\"cis\": [\"1.1.1.4\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(5504,'Ensure mounting of hfsplus filesystems is disabled','The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfsplus /bin/true. Run the following command to unload the hfsplus module: rmmod hfsplus','[{\"cis\": [\"1.1.1.5\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(5505,'Ensure mounting of squashfs filesystems is disabled','The squashfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems (similar to cramfs ). A squashfs image can be used without having to first decompress the image.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install squashfs /bin/true. Run the following command to unload the squashfs module: rmmod squashfs','[{\"cis\": [\"1.1.1.6\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(5506,'Ensure mounting of udf filesystems is disabled','The udf filesystem type is the universal disk format used to implement ISO/IEC 13346 and ECMA-167 specifications. This is an open vendor filesystem type for data storage on a broad range of media. This filesystem type is necessary to support writing DVDs and newer optical disc formats.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install udf /bin/true. Run the following command to unload the udf module: rmmod udf','[{\"cis\": [\"1.1.1.7\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(5507,'Ensure mounting of FAT filesystems is disabled','The FAT filesystem format is primarily used on older windows systems and portable USB drives or flash modules. It comes in three types FAT12 , FAT16 , and FAT32 all of which are supported by the vfat kernel module.','Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install vfat /bin/true. Run the following command to unload the vfat module: rmmod vfat','[{\"cis\": [\"1.1.1.8\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.5\"]}, {\"tsc\": [\"CC6.3\"]}]'),(5508,'Ensure separate partition exists for /tmp','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /tmp. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5509,'Ensure nodev option set on /tmp partition','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.','','Edit the /etc/fstabfile and add nodev to the fourth field (mounting options) for the /tmp partition. See the fstab(5)manual page for more information. Run the following command to remount /tmp:# mount -o remount,nodev /tmp','[{\"cis\": [\"1.1.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5510,'Ensure nosuid option set on /tmp partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /tmp.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /tmp partition. See the fstab(5)manual page for more information. Run the following command to remount /tmp: # mount -o remount,nosuid /tmp','[{\"cis\": [\"1.1.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5511,'Ensure noexec option set on /tmp partition','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.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /tmp partition. See the fstab(5)manual page for more information. Run the following command to remount /tmp: # mount -o remount,noexec /tmp','[{\"cis\": [\"1.1.5\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5512,'Ensure separate partition exists for /var','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5513,'Ensure separate partition exists for /var/tmp','The /var/tmp directory is a world-writable directory used for temporary storage by all users and some applications.','Since the /var/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 /var/tmp its own file system allows an administrator to set the noexec option on the mount, making /var/tmp useless for an attacker to install executable code.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var/tmp. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.7\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5514,'Ensure nodev option set on /var/tmp partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the /var/tmp filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices in /var/tmp .','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information.','[{\"cis\": [\"1.1.8\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5515,'Ensure nosuid option set on /var/tmp partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /var/tmp.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information.','[{\"cis\": [\"1.1.9\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5516,'Ensure noexec option set on /var/tmp partition','The noexec mount option specifies that the filesystem cannot contain executable binaries.','Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /var/tmp.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information.','[{\"cis\": [\"1.1.10\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5517,'Ensure separate partition exists for /var/log','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /var/log. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.11\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"2.2.4\", \"10.7\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5518,'Ensure separate partition exists for /var/log/audit','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.','','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, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.12\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"2.2.4\", \"10.7\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5519,'Ensure separate partition exists for /home','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.','','For new installations, during installation create a custom partition setup and specify a separate partition for /home. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate.','[{\"cis\": [\"1.1.13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5520,'Ensure nodev option set on /home partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the user partitions are not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /home partition. # mount -o remount,nodev /home','[{\"cis\": [\"1.1.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5521,'Ensure nodev option set on /dev/shm partition','The nodev mount option specifies that the filesystem cannot contain special devices.','Since the /dev/shm filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create special devices in /dev/shm partitions.','','Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /dev/shm partition. Run the following command to remount /dev/shm: # mount -o remount,nodev /dev/shm','[{\"cis\": [\"1.1.15\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5522,'Ensure nosuid option set on /dev/shm partition','The nosuid mount option specifies that the filesystem cannot contain setuid files.','Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them.','','Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /dev/shm partition. Run the following command to remount /dev/shm: # mount -o remount,nosuid /dev/shm','[{\"cis\": [\"1.1.16\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5523,'Ensure noexec option set on /dev/shm partition','The noexec mount option specifies that the filesystem cannot contain executable binaries.','Setting this option on a file system prevents users from executing programs from shared memory. This deters users from introducing potentially malicious software on the system.','','Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /dev/shm partition. Run the following command to remount /dev/shm: # mount -o remount,noexec /dev/shm','[{\"cis\": [\"1.1.17\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5524,'Disable Automounting','autofs allows automatic mounting of devices, typically including CD/DVDs and USB drives.','With automounting enabled anyone with physical access could attach a USB drive or disc and have its contents available in system even if they lacked permissions to mount it themselves.','','Run the following command to disable autofs: # chkconfig autofs off','[{\"cis\": [\"1.1.22\"]}, {\"cis_csc\": [\"8.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5525,'Ensure gpgcheck is globally activated','The gpgcheck option, found in the main section of the /etc/yum.conf and individual /etc/yum/repos.d/* files determines if an RPM package's signature is checked prior to its installation.','It is important to ensure that an RPM's package signature is always checked prior to installation to ensure that the software is obtained from a trusted source.','','Edit /etc/yum.conf and set ' gpgcheck=1 ' in the [main] section. Edit any failing files in /etc/yum.repos.d/* and set all instances of gpgcheck to ' 1 '.','[{\"cis\": [\"1.2.3\"]}, {\"cis_csc\": [\"4.5\"]}, {\"pci_dss\": [\"6.2\"]}, {\"nist_800_53\": [\"SI.2\", \"SA.11\", \"SI.4\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"A1.2\", \"CC6.8\"]}]'),(5526,'Ensure AIDE is installed','AIDE takes a snapshot of filesystem state including modification times, permissions, and file hashes which can then be used to compare against the current state of the filesystem to detect modifications to the system.','By monitoring the filesystem state compromised files can be detected to prevent or limit the exposure of accidental or malicious misconfigurations or modified binaries.','','Run the following command to install aide: yum install aide // Configure AIDE as appropriate for your environment. Consult the AIDE documentation for options. Initialize AIDE: aide --init && mv /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz','[{\"cis\": [\"1.3.1\"]}, {\"cis_csc\": [\"3.5\"]}, {\"pci_dss\": [\"11.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5527,'Ensure filesystem integrity is regularly checked','Periodic checking of the filesystem integrity is needed to detect changes to the filesystem.','Periodic file checking allows the system administrator to determine on a regular basis if critical files have been changed in an unauthorized fashion.','','Run the following command: crontab -u root -e // Add the following line to the crontab: 0 5 * * * /usr/sbin/aide --check // Notes: The checking in this recommendation occurs every day at 5am. Alter the frequency and time of the checks in compliance with site policy. ','[{\"cis\": [\"1.3.2\"]}, {\"cis_csc\": [\"3.5\"]}, {\"pci_dss\": [\"11.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5528,'Ensure permissions on bootloader config are configured','The grub configuration file contains information on boot settings and passwords for unlocking boot options. The grub configuration is usually located at /boot/grub/grub.conf and linked as /boot/grub/menu.lst and /etc/grub.conf .','Setting the permissions to read and write for root only prevents non-root users from seeing the boot parameters or changing them. Non-root users who read the boot parameters may be able to identify weaknesses in security upon boot and be able to exploit them.','','Run the following commands to set permissions on your grub configuration: # chown root:root /boot/grub/grub.conf # chmod og-rwx /boot/grub/grub.conf','[{\"cis\": [\"1.4.1\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5529,'Ensure bootloader password is set','Setting the boot loader password will require that anyone rebooting the system must enter a password before being able to set command line boot parameters.','Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off SELinux at boot time).','','Create an encrypted password with grub-md5-crypt: # grub-md5-crypt Password: <password> Retype Password: <password> <encrypted-password> Copy and paste the <encrypted-password> into the global section of /boot/grub/grub.conf : password --md5 <encrypted-password>','[{\"cis\": [\"1.4.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5530,'Ensure authentication required for single user mode','Single user mode is used for recovery when the system detects an issue during boot or by manual selection from the bootloader.','Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials.','','Edit /etc/sysconfig/init and set SINGLE to ' /sbin/sulogin': SINGLE=/sbin/sulogin','[{\"cis\": [\"1.4.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5531,'Ensure interactive boot is not enabled','Interactive boot allows console users to interactively select which services start on boot. The PROMPT option provides console users the ability to interactively boot the system and select which services to start on boot . ','Turn off the PROMPT option on the console to prevent console users from potentially overriding established security settings. ','','Edit the /etc/sysconfig/init file and set PROMPT to ' no ': PROMPT=no','[{\"cis\": [\"1.4.4\"]}, {\"cis_csc\": [\"5.1\"]}]'),(5532,'Ensure core dumps are restricted','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.','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). In addition, setting the fs.suid_dumpable variable to 0 will prevent setuid programs from dumping core.','','Add the following line to /etc/security/limits.conf or a /etc/security/limits.d/* file: * hard core 0. Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: fs.suid_dumpable = 0 and Run the following command to set the active kernel parameter: # sysctl -w fs.suid_dumpable=0','[{\"cis\": [\"1.5.1\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5533,'Ensure XD/NX support is enabled','Recent processors in the x86 family support the ability to prevent code execution on a per memory page basis. Generically and on AMD processors, this ability is called No Execute (NX), while on Intel processors it is called Execute Disable (XD). This ability can help prevent exploitation of buffer overflow vulnerabilities and should be activated whenever possible. Extra steps must be taken to ensure that this protection is enabled, particularly on 32-bit x86 systems. Other processors, such as Itanium and POWER, have included such support since inception and the standard kernel for those platforms supports the feature.','Enabling any feature that can protect against buffer overflow attacks enhances the security of the system.','','On 32 bit systems install a kernel with PAE support, no installation is required on 64 bit systems: If necessary configure your bootloader to load the new kernel and reboot the system. You may need to enable NX or XD support in your bios.','[{\"cis\": [\"1.5.2\"]}, {\"cis_csc\": [\"8.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5534,'Ensure address space layout randomization (ASLR) is enabled','Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process.','Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: kernel.randomize_va_space = 2. Run the following command to set the active kernel parameter: # sysctl -w kernel.randomize_va_space=2','[{\"cis\": [\"1.5.3\"]}, {\"cis_csc\": [\"8.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5535,'Ensure prelink is disabled','prelink is a program that modifies ELF shared libraries and ELF dynamically linked binaries in such a way that the time needed for the dynamic linker to perform relocations at startup significantly decreases.','The prelinking feature can interfere with the operation of AIDE, because it changes binaries. Prelinking can also increase the vulnerability of the system if a malicious user is able to compromise a common library such as libc.','','Run the following commands to restore binaries to normal and uninstall prelink: prelink -ua && yum remove prelink','[{\"cis\": [\"1.5.4\"]}, {\"cis_csc\": [\"3.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5536,'Ensure SELinux is not disabled in bootloader configuration','Configure SELINUX to be enabled at boot time and verify that it has not been overwritten by the grub boot parameters.','SELinux must be enabled at boot time in your grub configuration to ensure that the controls it provides are not overridden.','','Edit /boot/grub/grub.conf and remove all instances of selinux=0 and enforcing=0 on all kernel lines','[{\"cis\": [\"1.6.1.1\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5537,'Ensure the SELinux state is enforcing','Set SELinux to enable when the system is booted.','SELinux must be enabled at boot time in to ensure that the controls it provides are in effect at all times.','','Edit the /etc/selinux/config file to set the SELINUX parameter: SELINUX=enforcing','[{\"cis\": [\"1.6.1.2\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5538,'Ensure SELinux policy is configured','Configure SELinux to meet or exceed the default targeted policy, which constrains daemons and system software only.','Security configuration requirements vary from site to site. Some sites may mandate a policy that is stricter than the default policy, which is perfectly acceptable. This item is intended to ensure that at least the default recommendations are met.','','Edit the /etc/selinux/config file to set the SELINUXTYPE parameter: SELINUXTYPE=targeted','[{\"cis\": [\"1.6.1.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5539,'Ensure SETroubleshoot is not installed','The SETroubleshoot service notifies desktop users of SELinux denials through a user-friendly interface. The service provides important information around configuration errors, unauthorized intrusions, and other potential errors.','The SETroubleshoot service is an unnecessary daemon to have running on a server, especially if X Windows is disabled.','','Run the following command to uninstall setroubleshoot: # yum remove setroubleshoot','[{\"cis\": [\"1.6.1.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5540,'Ensure the MCS Translation Service (mcstrans) is not installed','The mcstransd daemon provides category label information to client processes requesting information. The label translations are defined in /etc/selinux/targeted/setrans.conf','Since this service is not used very often, remove it to reduce the amount of potentially vulnerable code running on the system.','','Run the following command to uninstall mcstrans: # yum remove mcstrans','[{\"cis\": [\"1.6.1.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5541,'Ensure no unconfined daemons exist','Daemons that are not defined in SELinux policy will inherit the security context of their parent process.','Since daemons are launched and descend from the init process, they will inherit the security context label initrc_t . This could cause the unintended consequence of giving the process more permission than it requires.','','Investigate any unconfined daemons found during the audit action. They may need to have an existing security context assigned to them or a policy built for them.','[{\"cis\": [\"1.6.1.6\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5542,'Ensure SELinux is installed','SELinux provides Mandatory Access Controls.','Without a Mandatory Access Control system installed only the default Discretionary Access Control system will be available.','','Run the following command to install libselinux: yum install libselinux','[{\"cis\": [\"1.6.2\"]}, {\"cis_csc\": [\"14.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5543,'Ensure message of the day is configured properly','The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/motd file with the appropriate contents according to your site policy, remove any instances of m , , s , or v.','[{\"cis\": [\"1.7.1.1\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(5544,'Ensure local login warning banner is configured properly','The contents of the /etc/issue file are displayed to users prior to login for local terminals. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/issue file with the appropriate contents according to your site policy, remove any instances of m , , s , or v: # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue','[{\"cis\": [\"1.7.1.2\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(5545,'Ensure remote login warning banner is configured properly','The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture - operating system release s - operating system name v - operating system version','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.','','Edit the /etc/issue.net file with the appropriate contents according to your site policy, remove any instances of m , , s , or v: # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue.net','[{\"cis\": [\"1.7.1.3\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(5546,'Ensure permissions on /etc/motd are configured','The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users.','If the /etc/motd file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/motd: # chown root:root /etc/motd # chmod 644 /etc/motd','[{\"cis\": [\"1.7.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5547,'Ensure permissions on /etc/issue are configured','The contents of the /etc/issue file are displayed to users prior to login for local terminals.','If the /etc/issue file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/issue: # chown root:root /etc/issue # chmod 644 /etc/issue','[{\"cis\": [\"1.7.1.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5548,'Ensure permissions on /etc/issue.net are configured','The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services.','If the /etc/issue.net file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.','','Run the following commands to set permissions on /etc/issue.net: # chown root:root /etc/issue.net # chmod 644 /etc/issue.net','[{\"cis\": [\"1.7.1.6\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5549,'Ensure GDM login banner is configured','GDM is the GNOME Display Manager which handles graphical login for GNOME based systems.','Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place.','','Create the /etc/dconf/profile/gdm file with the following contents: user-db:user system-db:gdm file-db:/usr/share/gdm/greeter-dconf-defaults || Create or edit the banner-message-enable and banner-message-text options in /etc/dconf/db/gdm.d/01-banner-message : [org/gnome/login-screen] banner-message-enable=true banner-message-text='Authorized uses only. All activity may be monitored and reported.' || Run the following command to update the system databases: dconf update','[{\"cis\": [\"1.7.2\"]}, {\"pci_dss\": [\"7.1\"]}, {\"tsc\": [\"CC6.4\"]}]'),(5550,'Ensure updates, patches, and additional security software are installed','Periodically patches are released for included software either due to security flaws or to include additional functionality.','Newer patches may contain security enhancements that would not be available through the latest full update. As a result, it is recommended that the latest software patches be used to take advantage of the latest functionality. As with any software installation, organizations need to determine if a given update meets their requirements and verify the compatibility and supportability of any additional software against the update revision that is selected.','','Site policy may mandate a testing period before install onto production systems for available updates. The audit and remediation here only cover security updates. Non-security updates can be audited with and comparing against site policy: # yum check-update','[{\"cis\": [\"1.8\"]}, {\"cis_csc\": [\"4.5\"]}, {\"pci_dss\": [\"5.2\"]}, {\"nist_800_53\": [\"AU.6\", \"SI.4\"]}, {\"gpg_13\": [\"4.2\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"A1.2\"]}]'),(5551,'Ensure chargen services are not enabled','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.','','Run the following commands to disable chargen-dgram and chargen-stream: # chkconfig chargen-dgram off; # chkconfig chargen-stream off','[{\"cis\": [\"2.1.1\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5552,'Ensure daytime services are not enabled','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.','','Run the following commands to disable daytime-dgram and daytime-stream: # chkconfig daytime-dgram off; # chkconfig daytime-stream off','[{\"cis\": [\"2.1.2\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5553,'Ensure discard services are not enabled','discardis 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.','','Run the following commands to disable discard-dgram and discard-stream: # chkconfig discard-dgram off; # chkconfig discard-stream off','[{\"cis\": [\"2.1.3\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5554,'Ensure echo services are not enabled','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.','','Run the following commands to disable echo-dgram and echo-stream: # chkconfig echo-dgram off; # chkconfig echo-stream off','[{\"cis\": [\"2.1.4\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5555,'Ensure time services are not enabled','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.','','Run the following commands to disable time-dgram and time-stream: # chkconfig time-dgram off; # chkconfig time-stream off','[{\"cis\": [\"2.1.5\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5556,'Ensure rsh server is not enabled','The Berkeley rsh-server ( rsh , rlogin , rexec ) package contains legacy services that exchange credentials in clear-text.','These legacy services contain numerous security exposures and have been replaced with the more secure SSH package.','','Run the following commands to disable rsh, rlogin, and rexec: # chkconfig rsh off # chkconfig rlogin off # chkconfig rexec off','[{\"cis\": [\"2.1.6\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5557,'Ensure talk server is not enabled','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.','','Run the following command to disable talk: # chkconfig talk off','[{\"cis\": [\"2.1.7\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5558,'Ensure telnet server is not enabled','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.','','Run the following command to disable telnet: # chkconfig telnet off','[{\"cis\": [\"2.1.8\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5559,'Ensure tftp server is not enabled','Trivial File Transfer Protocol (TFTP) is a simple file transfer protocol, typically used to automatically transfer configuration or boot machines from a boot server. The package tftp-server is 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.','','Run the following command to disable tftp: # chkconfig tftp off','[{\"cis\": [\"2.1.9\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\", \"AC.4\", \"SC.7\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5560,'Ensure rsync service is not enabled','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.','','Run the following command to disable rsync: # chkconfig rsyncd off','[{\"cis\": [\"2.1.10\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5561,'Ensure xinetd is not enabled','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.','','Run the following command to disable xinetd: # chkconfig xinetd off','[{\"cis\": [\"2.1.11\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5562,'Ensure time synchronization is in use','System time should be synchronized between all systems in an environment. This is typically done by establishing an authoritative time server or set of servers and having all systems synchronize their clocks to them.','Time synchronization is important to support time sensitive security mechanisms like Kerberos and also ensures log files have consistent time records across the enterprise, which aids in forensic investigations.','','On physical systems or virtual systems where host based time synchronization is not available run the following commands and verify either ntp or chrony is installed: # rpm -q ntp # rpm -q chrony On virtual systems where host based time synchronization is available consult your virtualization software documentation and verify that host based synchronization is in use.','[{\"cis\": [\"2.2.2.1\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"10.4\"]}, {\"nist_800_53\": [\"AU.8\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5563,'Ensure ntp is configured','ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at https://www.ntp.org. ntp can be configured to be a client and/or a server.','If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly.','','1) Add or edit restrict lines in /etc/ntp.conf to match the following: - restrict -4 default kod nomodify notrap nopeer noquery and - restrict -4 default kod nomodify notrap nopeer noquery. 2) Add or edit server or pool lines to /etc/ntp.conf as appropriate: server <remote-server>. 3) Add or edit the OPTIONS in /etc/sysconfig/ntpd to include ' -u ntp:ntp ': - OPTIONS='-u ntp:ntp'','[{\"cis\": [\"2.2.1.2\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5564,'Ensure chrony is configured','chrony is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at https://www.ntp.org. ntp can be configured to be a client and/or a server.','If chrony is in use on the system proper configuration is vital to ensuring time synchronization is working properly.','','1) Add or edit restrict lines in /etc/chrony.conf to match the following: - 1) Add or edit server or pool lines to /etc/chrony.conf as appropriate: server <remote-server>. 3) Add or edit the OPTIONS in /etc/sysconfig/chronyd to include: - OPTIONS='-u chronyd'','[{\"cis\": [\"2.2.1.3\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5565,'Ensure X Window System is not installed','The X Window System provides a Graphical User Interface (GUI) where users can have multiple windows in which to run programs and various add on. The X Windows system is typically used on workstations where users login, but not on servers where users typically do not login.','Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface.','','Run the following command to remove the X Windows System packages: # yum remove xorg-x11*','[{\"cis\": [\"2.2.2\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5566,'Ensure Avahi Server is not enabled','Avahi is a free zeroconf implementation, including a system for multicast DNS/DNS-SD service discovery. Avahi allows programs to publish and discover services and hosts running on a local network with no specific configuration. For example, a user can plug a computer into a network and Avahi automatically finds printers to print to, files to look at and people to talk to, as well as network services running on the machine.','Automatic discovery of network services is not normally required for system functionality. It is recommended to disable the service to reduce the potential attack surface.','','Run the following command to disable avahi-daemon: # chkconfig avahi-daemon off','[{\"cis\": [\"2.2.3\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5567,'Ensure CUPS is not enabled','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.','','Run the following command to disable cups : # chkconfig cups off','[{\"cis\": [\"2.2.4\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5568,'Ensure DHCP Server is not enabled','The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses.','Unless a system is specifically set up to act as a DHCP server, it is recommended that this service be disabled to reduce the potential attack surface.','','Run the following command to disable dhcpd: # chkconfig dhcpd off','[{\"cis\": [\"2.2.5\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5569,'Ensure LDAP Server is not enabled','The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.','If the system will not need to act as an LDAP server, it is recommended that the software be disabled to reduce the potential attack surface.','','Run the following command to disable slapd: # chkconfig slapd off','[{\"cis\": [\"2.2.6\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5570,'Ensure NFS and RPC are not enabled','The Network File System (NFS) is one of the first and most widely distributed file systems in the UNIX environment. It provides the ability for systems to mount file systems of other servers through the network.','If the system does not export NFS shares or act as an NFS client, it is recommended that these services be disabled to reduce remote attack surface.','','Run the following commands to disable nfs, nfs-server and rpcbind: # chkconfig nfs off; # chkconfig rpcbind off','[{\"cis\": [\"2.2.7\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5571,'Ensure DNS Server is not enabled','The Domain Name System (DNS) is a hierarchical naming system that maps names to IP addresses for computers, services and other resources connected to a network.','Unless a system is specifically designated to act as a DNS server, it is recommended that the service be disabled to reduce the potential attack surface.','','Run the following command to disable named : # chkconfig named off','[{\"cis\": [\"2.2.8\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5572,'Ensure FTP Server is not enabled','The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files.','FTP does not protect the confidentiality of data or authentication credentials. It is recommended sftp be used if file transfer is required. Unless there is a need to run the system as a FTP server (for example, to allow anonymous downloads), it is recommended that the service be disabled to reduce the potential attack surface.','','Run the following command to disable vsftpd: # chkconfig vsftpd off','[{\"cis\": [\"2.2.9\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5573,'Ensure HTTP server is not enabled','HTTP or web servers provide the ability to host web site content.','Unless there is a need to run the system as a web server, it is recommended that the service be disabled to reduce the potential attack surface.','','Run the following command to disable httpd: # chkconfig httpd off','[{\"cis\": [\"2.2.10\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5574,'Ensure IMAP and POP3 server is not enabled','dovecot is an open source IMAP and POP3 server for Linux based systems.','Unless POP3 and/or IMAP servers are to be provided by this system, it is recommended that the service be disabled to reduce the potential attack surface.','','Run the following command to disable dovecot: # chkconfig dovecot off','[{\"cis\": [\"2.2.11\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5575,'Ensure Samba is not enabled','The Samba daemon allows system administrators to configure their Linux systems to share file systems and directories with Windows desktops. Samba will advertise the file systems and directories via the Small Message Block (SMB) protocol. Windows desktop users will be able to mount these directories and file systems as letter drives on their systems.','If there is no need to mount directories and file systems to Windows systems, then this service can be disabled to reduce the potential attack surface.','','Run the following command to disable smb: # chkconfig smb off','[{\"cis\": [\"2.2.12\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5576,'Ensure HTTP Proxy Server is not enabled','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 disabled to reduce the potential attack surface.','','Run the following command to disable squid: # chkconfig squid off','[{\"cis\": [\"2.2.13\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5577,'Ensure SNMP Server is not enabled','The Simple Network Management Protocol (SNMP) server is used to listen for SNMP commands from an SNMP management system, execute the commands or collect the information and then send results back to the requesting system.','The SNMP server can communicate using SNMP v1, which transmits data in the clear and does not require authentication to execute commands. Unless absolutely necessary, it is recommended that the SNMP service not be used. If SNMP is required the server should be configured to disallow SNMP v1.','','Run the following command to disable snmpd: # chkconfig snmpd off','[{\"cis\": [\"2.2.14\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5578,'Ensure mail transfer agent is configured for local-only mode','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.','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.','','Edit /etc/postfix/main.cf and add the following line to the RECEIVING MAIL section. If the line already exists, change it to look like the line below: inet_interfaces = loopback-only Restart postfix: # service postfix restart','[{\"cis\": [\"2.2.15\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\", \"AC.4\", \"SC.7\"]}, {\"tsc\": [\"CC5.2\", \"CC6.4\", \"CC6.6\", \"CC6.7\"]}]'),(5579,'Ensure NIS Server is not enabled','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','','Run the following command to disable ypserv: # chkconfig ypserv off','[{\"cis\": [\"2.2.16\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5580,'Ensure NIS Client is not installed','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.','','Run the following command to uninstall ypbind: # yum remove ypbind','[{\"cis\": [\"2.3.1\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5581,'Ensure rsh client is not installed','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 .','','Run the following command to uninstall rsh : # yum remove rsh','[{\"cis\": [\"2.3.2\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5582,'Ensure talk client is not installed','The talk software makes it possible for users to send and receive messages across systems through a terminal session. The talk client, which allows initialization of talk sessions, is installed by default.','The software presents a security risk as it uses unencrypted protocols for communication.','','Run the following command to uninstall talk : # yum remove talk','[{\"cis\": [\"2.3.3\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5583,'Ensure telnet client is not installed','The telnet package contains the telnet client, which allows users to start connections to other systems via the telnet protocol.','The telnet protocol is insecure and unencrypted. The use of an unencrypted transmission medium could allow an unauthorized user to steal credentials. The ssh package provides an encrypted session and stronger security and is included in most Linux distributions.','','Run the following command to uninstall telnet : # yum remove telnet','[{\"cis\": [\"2.3.4\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5584,'Ensure LDAP client is not installed','The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.','If the system will not need to act as an LDAP client, it is recommended that the software be removed to reduce the potential attack surface.','','Run the following command to uninstall openldap-clients : # yum remove openldap-clients','[{\"cis\": [\"2.3.5\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5585,'Ensure IP forwarding is disabled','The net.ipv4.ip_forward flag is used to tell the system whether it can forward packets or not.','Setting the flag to 0 ensures that a system with multiple interfaces (for example, a hard proxy), will never be able to forward packets, and therefore, never serve as a router.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.ip_forward = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.ip_forward=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.1.1\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5586,'Ensure packet redirect sending is disabled','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.send_redirects = 0; net.ipv4.conf.default.send_redirects = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.send_redirects=0; # sysctl -w net.ipv4.conf.default.send_redirects=0; # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.1.2\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5587,'Ensure source routed packets are not accepted','In networking, source routing allows a sender to partially or fully specify the route packets take through a network. In contrast, non-source routed packets travel a path determined by routers in the network. In some cases, systems may not be routable or reachable from some locations (e.g. private addresses vs. Internet routable), and so source routed packets would need to be used.','Setting net.ipv4.conf.all.accept_source_route and net.ipv4.conf.default.accept_source_route to 0 disables the system from accepting source routed packets. Assume this system was capable of routing packets to Internet routable addresses on one interface and private addresses on another interface. Assume that the private addresses were not routable to the Internet routable addresses and vice versa. Under normal routing circumstances, an attacker from the Internet routable addresses could not use the system as a way to reach the private address systems. If, however, source routed packets were allowed, they could be used to gain access to the private address systems as the route could be specified, rather than rely on routing protocols that did not allow this routing.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_source_route = 0; net.ipv4.conf.default.accept_source_route = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_source_route=0 # sysctl -w net.ipv4.conf.default.accept_source_route=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.1\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5588,'Ensure ICMP redirects are not accepted','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.','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_redirects = 0; net.ipv4.conf.default.accept_redirects = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_redirects=0 # sysctl -w net.ipv4.conf.default.accept_redirects=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.2\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5589,'Ensure secure ICMP redirects are not accepted','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.secure_redirects = 0; net.ipv4.conf.default.secure_redirects = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.secure_redirects=0 # sysctl -w net.ipv4.conf.default.secure_redirects=0 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.3\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5590,'Ensure suspicious packets are logged','When enabled, this feature logs packets with un-routable source addresses to the kernel log.','Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.log_martians = 1; net.ipv4.conf.default.log_martians = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.log_martians=1 # sysctl -w net.ipv4.conf.default.log_martians=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.4\"]}, {\"cis_csc\": [\"6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5591,'Ensure broadcast ICMP requests are ignored','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.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_echo_ignore_broadcasts = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.5\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5592,'Ensure bogus ICMP responses are ignored','Setting icmp_ignore_bogus_error_responses to 1 prevents the kernel from logging bogus responses (RFC-1122 non-compliant) from broadcast reframes, keeping file systems from filling up with useless log messages.','Some routers (and some attackers) will send responses that violate RFC-1122 and attempt to fill up a log file system with many useless error messages.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_ignore_bogus_error_responses = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.6\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5593,'Ensure Reverse Path Filtering is enabled','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 would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your system, you will not be able to enable this feature without breaking the routing.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.rp_filter = 1; net.ipv4.conf.default.rp_filter = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.rp_filter=1 # sysctl -w net.ipv4.conf.default.rp_filter=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.7\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5594,'Ensure TCP SYN Cookies is enabled','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.','Attackers use SYN flood attacks to perform a denial of service attacked on a system by sending many SYN packets without completing the three way handshake. This will quickly use up slots in the kernel's half-open connection queue and prevent legitimate connections from succeeding. SYN cookies allow the system to keep accepting valid connections, even if under a denial of service attack.','','Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.tcp_syncookies = 1. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.tcp_syncookies=1 # sysctl -w net.ipv4.route.flush=1','[{\"cis\": [\"3.2.8\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5595,'Ensure IPv6 router advertisements are not accepted','This setting disables the system's ability to accept IPv6 router advertisements.','It is recommended that systems not accept router advertisements as they could be tricked into routing traffic to compromised machines. Setting hard routes within the system (usually a single default route to a trusted router) protects the system from bad routes.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_ra = 0 and net.ipv6.conf.default.accept_ra = 0 Then, run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_ra=0 # sysctl -w net.ipv6.conf.default.accept_ra=0 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.3.1\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5596,'Ensure IPv6 redirects are not accepted','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.','','Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_redirects = 0 || net.ipv6.conf.default.accept_redirects = 0 Then, run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_redirects=0 # sysctl -w net.ipv6.conf.default.accept_redirects=0 # sysctl -w net.ipv6.route.flush=1','[{\"cis\": [\"3.3.2\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5597,'Ensure IPv6 is disabled','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.','','Edit /boot/grub/grub.conf to include ipv6.disable=1 on all kernel lines.','[{\"cis\": [\"3.3.3\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5598,'Ensure TCP Wrappers is installed','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.','','Run the following command to install tcp_wrappers: yum install tcp_wrappers','[{\"cis\": [\"3.4.1\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(5599,'Ensure /etc/hosts.deny is configured','The /etc/hosts.deny file specifies which IP addresses are not permitted to connect to the host. It is intended to be used in conjunction with the /etc/hosts.allow file.','The /etc/hosts.allow file supports access control by IP and helps ensure that only authorized systems can connect to the system.','','Run the following command to create /etc/hosts.deny: echo 'ALL: ALL' >> /etc/hosts.deny','[{\"cis\": [\"3.4.3\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(5600,'Ensure permissions on /etc/hosts.allow are configured.','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.','','Run the following commands to set permissions on /etc/hosts.allow : chown root:root /etc/hosts.allow and chmod 644 /etc/hosts.allow','[{\"cis\": [\"3.4.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"1.3.5\"]}]'),(5601,'Ensure permissions on /etc/hosts.deny are configured.','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.','','Run the following commands to set permissions on /etc/hosts.deny : chown root:root /etc/hosts.deny and chmod 644 /etc/hosts.deny','[{\"cis\": [\"3.4.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5602,'Ensure DCCP is disabled','The Datagram Congestion Control Protocol (DCCP) is a transport layer protocol that supports streaming media and telephony. DCCP provides a way to gain access to congestion control, without having to do it at the application layer, but does not provide in-sequence delivery.','If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install dccp /bin/true','[{\"cis\": [\"3.5.1\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5603,'Ensure SCTP is disabled','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.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install sctp /bin/true','[{\"cis\": [\"3.5.2\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5604,'Ensure RDS is disabled','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.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install rds /bin/true','[{\"cis\": [\"3.5.3\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5605,'Ensure TIPC is disabled','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.','','Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install tipc /bin/true','[{\"cis\": [\"3.5.4\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"gpg_13\": [\"4.3\"]}, {\"gdpr_IV\": [\"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5606,'Ensure iptables is installed','iptables allows configuration of the IPv4 tables in the linux kernel and the rules stored within them. Most firewall configuration utilities operate as a front end to iptables .','iptables is required for firewall management and configuration.','','Run the following command to install iptables : yum install iptables','[{\"cis\": [\"3.6.1\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.1\"]}]'),(5607,'Ensure default deny firewall policy','A default deny all policy on connections ensures that any unconfigured network usage will be rejected.','With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.','','Run the following commands to implement a default DROP policy: iptables -P INPUT DROP; iptables -P OUTPUT DROP and iptables -P FORWARD DROP','[{\"cis\": [\"3.6.2\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(5608,'Ensure loopback traffic is configured','Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (127.0.0.0/8).','Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (127.0.0.0/8) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.','','Run the following commands to implement the loopback rules: # iptables -A INPUT -i lo -j ACCEPT # iptables -A OUTPUT -o lo -j ACCEPT # iptables -A INPUT -s 127.0.0.0/8 -j DROP','[{\"cis\": [\"3.6.3\"]}, {\"cis_csc\": [\"9.2\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}]'),(5609,'Ensure audit log storage size is configured','Configure the maximum size of the audit log file. Once the log reaches the maximum size, it will be rotated and a new log file will be started.','It is important that an appropriate size is determined for log files so that they do not impact the system and audit data is not lost.','','Set the following parameter in /etc/audit/auditd.conf in accordance with site policy: max_log_file = <MB>','[{\"cis\": [\"4.1.1.1\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"10.7\"]}]'),(5610,'Ensure system is disabled when audit logs are full','The auditd daemon can be configured to halt the system when the audit logs are full.','In high security contexts, the risk of detecting unauthorized access or nonrepudiation exceeds the benefit of the system's availability.','','Set the following parameters in /etc/audit/auditd.conf: space_left_action = email action_mail_acct = root admin_space_left_action = halt','[{\"cis\": [\"4.1.1.2\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"10.7\"]}]'),(5611,'Ensure audit logs are not automatically deleted','The max_log_file_action setting determines how to handle the audit log file reaching the max file size. A value of keep_logs will rotate the logs but never delete old logs.','In high security contexts, the benefits of maintaining a long audit history exceed the cost of storing the audit history.','','Set the following parameter in /etc/audit/auditd.conf: max_log_file_action = keep_logs','[{\"cis\": [\"4.1.1.3\"]}, {\"cis_csc\": [\"6.3\"]}, {\"pci_dss\": [\"10.7\"]}]'),(5612,'Ensure auditd service is enabled','Turn on the auditd daemon to record system events.','The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring.','','Run the following command to enable auditd : # chkconfig auditd on','[{\"cis\": [\"4.1.2\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.1\", \"10.7\"]}, {\"tsc\": [\"CC6.1\", \"CC6.2\", \"CC6.3\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5613,'Ensure auditing for processes that start prior to auditd is enabled','Configure grub so that processes that are capable of being audited can be audited even if they start up prior to auditd startup.','Audit events need to be captured on processes that start up prior to auditd, so that potential malicious activity cannot go undetected.','','Edit /boot/grub/grub.conf to include audit=1 on all kernel lines. Notes: This recommendation is designed around the grub bootloader, if LILO or another bootloader is in use in your environment enact equivalent settings.','[{\"cis\": [\"4.1.3\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.2.6\", \"10.7\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"35.7.d\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5614,'Ensure events that modify date and time information are collected','Capture events where the system date and/or time has been modified. The parameters in this section are set to determine if the adjtimex (tune kernel clock), settimeofday (Set time, using timeval and timezone structures) stime (using seconds since 1/1/1970) or clock_settime (allows for the setting of several internal clocks and timers) system calls have been executed and always write an audit record to the /var/log/audit.log file upon exit, tagging the records with the identifier "time-change".','Unexpected changes in system date and/or time could be a sign of malicious activity on the system.','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change -a always,exit -F arch=b32 -S clock_settime -k time-change -w /etc/localtime -p wa -k time-change For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change -a always,exit -F arch=b64 -S clock_settime -k time-change -a always,exit -Farch=b32 -S clock_settime -k time-change -w /etc/localtime -p wa -k time-change','[{\"cis\": [\"4.1.4\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.4.2\", \"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5615,'Ensure events that modify user/group information are collected','Record events affecting the group , passwd (user IDs), shadow and gshadow (passwords) or /etc/security/opasswd (old passwords, based on remember parameter in the PAM configuration) files. The parameters in this section will watch the files to see if they have been opened for write or have had attribute changes (e.g. permissions) and tag them with the identifier "identity" in the audit log file.','Unexpected changes to these files could be an indication that the system has been compromised and that an unauthorized user is attempting to hide their activities or compromise additional accounts.','','Add the following lines to the /etc/audit/audit.rules file: -w /etc/group -p wa -k identity -w /etc/passwd -p wa -k identity -w /etc/gshadow -p wa -k identity -w /etc/shadow -p wa -k identity -w /etc/security/opasswd -p wa -k identity','[{\"cis\": [\"4.1.5\"]}, {\"cis_csc\": [\"5.4\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5616,'Ensure events that modify the system's network environment are collected','Record changes to network environment files or system calls. The below parameters monitor the sethostname (set the systems host name) or setdomainname (set the systems domainname) system calls, and write an audit event on system call exit. The other parameters monitor the /etc/issue and /etc/issue.net files (messages displayed pre-login), /etc/hosts (file containing host names and associated IP addresses), /etc/sysconfig/network file and /etc/sysconfig/network-scripts/ directory (containing network interface scripts and configurations).','Monitoring sethostname and setdomainname will identify potential unauthorized changes to host and domainname of a system. The changing of these names could potentially break security parameters that are set based on those names. The /etc/hosts file is monitored for changes in the file that can indicate an unauthorized intruder is trying to change machine associations with IP addresses and trick users and processes into connecting to unintended machines. Monitoring /etc/issue and /etc/issue.net is important, as intruders could put disinformation into those files and trick users into providing information to the intruder. Monitoring /etc/sysconfig/network and /etc/sysconfig/network-scripts/ is important as it can show if network interfaces or scripts are being modified in a way that can lead to the machine becoming unavailable or compromised. All audit records will be tagged with the identifier "system-locale."','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S sethostname -S setdomainname -k system-locale -w /etc/issue -p wa -k system-locale -w /etc/issue.net -p wa -k system-locale -w /etc/hosts -p wa -k system-locale -w /etc/sysconfig/network -p wa -k system-locale -w /etc/sysconfig/network-scripts/ -p wa -k system-locale For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S sethostname -S setdomainname -k system-locale -a always,exit -F arch=b32 -S sethostname -S setdomainname -k system-locale -w /etc/issue -p wa -k system-locale -w /etc/issue.net -p wa -k system-locale -w /etc/hosts -p wa -k system-locale -w /etc/sysconfig/network -p wa -k system-locale -w /etc/sysconfig/network-scripts/ -p wa -k system-locale','[{\"cis\": [\"4.1.6\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5617,'Ensure events that modify the system's Mandatory Access Controls are collected','Monitor SELinux mandatory access controls. The parameters below monitor any write access (potential additional, deletion or modification of files in the directory) or attribute changes to the /etc/selinux or directory.','Changes to files in these directories could indicate that an unauthorized user is attempting to modify access controls and change security contexts, leading to a compromise of the system.','','Add the following lines to the /etc/audit/audit.rules file: -w /etc/selinux/ -p wa -k MAC-policy -w /usr/share/selinux/ -p wa -k MAC-policy','[{\"cis\": [\"4.1.7\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5618,'Ensure login and logout events are collected','Monitor login and logout events. The parameters below track changes to files associated with login/logout events. The file /var/log/lastlog maintain records of the last time a user successfully logged in. The /var/run/failock directory maintains records of login failures via the pam_faillock module.','Monitoring login/logout events could provide a system administrator with information associated with brute force attacks against user logins.','','Add the following lines to the /etc/audit/audit.rules file: -w /var/log/lastlog -p wa -k logins -w /var/run/faillock/ -p wa -k logins','[{\"cis\": [\"4.1.8\"]}, {\"cis_csc\": [\"5.5\", \"16.10\", \"16.4\"]}, {\"pci_dss\": [\"10.2.1\", \"10.2.4\", \"10.3\"]}, {\"nist_800_53\": [\"AC.7\", \"AU.14\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5619,'Ensure session initiation information is collected','Monitor session initiation events. The parameters in this section track changes to the files associated with session events. The file /var/run/utmp file tracks all currently logged in users. All audit records will be tagged with the identifier "session." The /var/log/wtmp file tracks logins, logouts, shutdown, and reboot events. The file /var/log/btmp keeps track of failed login attempts and can be read by entering the command /usr/bin/last -f /var/log/btmp . All audit records will be tagged with the identifier "logins.".','Monitoring these files for changes could alert a system administrator to logins occurring at unusual hours, which could indicate intruder activity (i.e. a user logging in at a time when they do not normally log in).','','Add the following lines to the /etc/audit/audit.rules file: -w /var/run/utmp -p wa -k session -w /var/log/wtmp -p wa -k logins -w /var/log/btmp -p wa -k logins','[{\"cis\": [\"4.1.8\"]}, {\"cis_csc\": [\"5.5\", \"16.10\", \"16.4\"]}, {\"pci_dss\": [\"10.3\"]}]'),(5620,'Ensure discretionary access control permission modification events are collected','Monitor changes to file permissions, attributes, ownership and group. The parameters in this section track changes for system calls that affect file permissions and attributes. The chmod , fchmod and fchmodat system calls affect the permissions associated with a file. The chown , fchown , fchownat and lchown system calls affect owner and group attributes on a file. The setxattr , lsetxattr , fsetxattr (set extended file attributes) and removexattr , lremovexattr , fremovexattr (remove extended file attributes) control extended file attributes. In all cases, an audit record will only be written for non-system user ids (auid >= 500) and will ignore Daemon events (auid = 4294967295). All audit records will be tagged with the identifier "perm_mod."','Monitoring for changes in file attributes could alert a system administrator to activity that could indicate intruder activity or policy violation.','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lrem','[{\"cis\": [\"4.1.10\"]}, {\"cis_csc\": [\"3.6\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5621,'Ensure unsuccessful unauthorized file access attempts are collected','Monitor for unsuccessful attempts to access files. The parameters below are associated with system calls that control creation ( creat ), opening ( open , openat ) and truncation ( truncate , ftruncate ) of files. An audit log record will only be written if the user is a non- privileged user (auid > = 500), is not a Daemon event (auid=4294967295) and if the system call returned EACCES (permission denied to the file) or EPERM (some other permanent error associated with the specific system call). All audit records will be tagged with the identifier "access."','Failed attempts to open, create or truncate files could be an indication that an individual or process is trying to gain unauthorized access to the system.','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access','[{\"cis\": [\"4.1.11\"]}, {\"cis_csc\": [\"14.6\"]}, {\"pci_dss\": [\"10.2.4\"]}, {\"nist_800_53\": [\"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5622,'Ensure successful file system mounts are collected','Monitor the use of the mount system call. The mount (and umount ) system call controls the mounting and unmounting of file systems. The parameters below configure the system to create an audit record when the mount system call is used by a non-privileged user.','It is highly unusual for a non privileged user to mount file systems to the system. While tracking mount commands gives the system administrator evidence that external media may have been mounted (based on a review of the source of the mount and confirming it's an external media type), it does not conclusively indicate that data was exported to the media. System administrators who wish to determine if data were exported, would also have to track successful open , creat and truncate system calls requiring write access to a file under the mount point of the external media file system. This could give a fair indication that a write occurred. The only way to truly prove it, would be to track successful writes to the external media. Tracking write system calls could quickly fill up the audit log and is not recommended. Recommendations on configuration options to track data export to media is beyond the scope of this document.','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S mount -F auid>=500 -F auid!=4294967295 -k mounts For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S mount -F auid>=500 -F auid!=4294967295 -k mounts -a always,exit -F arch=b32 -S mount -F auid>=500 -F auid!=4294967295 -k mounts','[{\"cis\": [\"4.1.13\"]}, {\"cis_csc\": [\"13\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5623,'Ensure file deletion events by users are collected','Monitor the use of system calls associated with the deletion or renaming of files and file attributes. This configuration statement sets up monitoring for the unlink (remove a file), unlinkat (remove a file attribute), rename (rename a file) and renameat (rename a file attribute) system calls and tags them with the identifier "delete".','Monitoring these calls from non-privileged users could provide a system administrator with evidence that inappropriate removal of files and file attributes associated with protected files is occurring. While this audit option will look at all events, system administrators will want to look for specific privileged files that are being deleted or altered.','','For 32 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k delete For 64 bit systems add the following lines to the /etc/audit/audit.rules file: -a always,exit -F arch=b64 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k delete -a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k delete','[{\"cis\": [\"4.1.14\"]}, {\"pci_dss\": [\"10.5.5\"]}, {\"tsc\": [\"PI1.4\", \"PI1.5\", \"CC7.1\", \"CC7.2\", \"CC7.3\", \"CC8.1\"]}]'),(5624,'Ensure changes to system administration scope (sudoers) is collected','Monitor scope changes for system administrations. If the system has been properly configured to force system administrators to log in as themselves first and then use the sudo command to execute privileged commands, it is possible to monitor changes in scope. The file /etc/sudoers will be written to when the file or its attributes have changed. The audit records will be tagged with the identifier "scope."','Changes in the /etc/sudoers file can indicate that an unauthorized change has been made to scope of system administrator activity.','','Add the following line to the /etc/audit/audit.rules file: -w /etc/sudoers -p wa -k scope -w /etc/sudoers.d/ -p wa -k scope','[{\"cis\": [\"4.1.15\"]}, {\"cis_csc\": [\"5.4\"]}, {\"pci_dss\": [\"10.2.5\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"35.7\", \"32.2\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5625,'Ensure system administrator actions (sudolog) are collected','Monitor the sudo log file. If the system has been properly configured to disable the use of the su command and force all administrators to have to log in first and then use sudo to execute privileged commands, then all administrator commands will be logged to /var/log/sudo.log . Any time a command is executed, an audit event will be triggered as the /var/log/sudo.log file will be opened for write and the executed administration command will be written to the log.','Changes in /var/log/sudo.log indicate that an administrator has executed a command or the log file itself has been tampered with. Administrators will want to correlate the events written to the audit trail with the records written to /var/log/sudo.log to verify if unauthorized commands have been executed.','','Add the following line to the /etc/audit/audit.rules file: -w /var/log/sudo.log -p wa -k actions','[{\"cis\": [\"4.1.16\"]}, {\"cis_csc\": [\"5.1\", \"5.5\"]}, {\"pci_dss\": [\"10.2.2\"]}, {\"nist_800_53\": [\"AU.14\", \"AC.6\", \"AC.7\"]}, {\"gpg_13\": [\"7.8\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5626,'Ensure kernel module loading and unloading is collected','Monitor the loading and unloading of kernel modules. The programs insmod (install a kernel module), rmmod (remove a kernel module), and modprobe (a more sophisticated program to load and unload modules, as well as some other features) control loading and unloading of modules. The init_module (load a module) and delete_module (delete a module) system calls control loading and unloading of modules. Any execution of the loading and unloading module programs and system calls will trigger an audit record with an identifier of "modules".','Monitoring the use of insmod , rmmod and modprobe could provide system administrators with evidence that an unauthorized user loaded or unloaded a kernel module, possibly compromising the security of the system. Monitoring of the init_module and delete_module system calls would reflect an unauthorized user attempting to use a different program to load and unload modules.','','Add the following line to the /etc/audit/audit.rules file: -w /var/log/sudo.log -p wa -k actions','[{\"cis\": [\"4.1.17\"]}, {\"cis_csc\": [\"3\"]}, {\"pci_dss\": [\"10.2.7\"]}, {\"nist_800_53\": [\"AU.14\", \"AU.6\"]}, {\"gpg_13\": [\"7.9\"]}, {\"gdpr_IV\": [\"32.2\", \"35.7.d\"]}, {\"hipaa\": [\"164.312.b\"]}, {\"tsc\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5627,'Ensure the audit configuration is immutable','Set system audit so that audit rules cannot be modified with auditctl . Setting the flag "-e 2" forces audit to be put in immutable mode. Audit changes can only be made on system reboot.','In immutable mode, unauthorized users cannot execute changes to the audit system to potentially hide malicious activity and then put the audit rules back. Users would most likely notice a system reboot and that could alert administrators of an attempt to make unauthorized audit changes.','','Add the following line to the end of the /etc/audit/audit.rules file. -e 2','[{\"cis\": [\"4.1.18\"]}, {\"cis_csc\": [\"3\", \"6\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5628,'Ensure rsyslog Service is enabled','Once the rsyslog package is installed it needs to be activated.','If the rsyslog service is not activated the system may default to the syslogd service or lackblogging instead.','','Run the following command to enable rsyslog : # chkconfig rsyslog on','[{\"cis\": [\"4.2.1.1\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5629,'Ensure rsyslog default file permissions configured','rsyslog will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files.','It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected.','','Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and set $FileCreateMode to 0640 or more restrictive: $FileCreateMode 0640','[{\"cis\": [\"4.2.1.3\"]}, {\"cis_csc\": [\"5.1\"]}]'),(5630,'Ensure rsyslog is configured to send logs to a remote log host','The rsyslog utility supports the ability to send logs it gathers to a remote log host running syslogd(8) or to receive messages from remote hosts, reducing administrative overhead.','Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.','','Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and add the following line (where loghost.example.com is the name of your central log host). *.* @@loghost.example.com Run the following command to reload the rsyslogd configuration: # pkill -HUP rsyslogd','[{\"cis\": [\"4.2.1.4\"]}, {\"cis_csc\": [\"6.6\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5631,'Ensure syslog-ng service is enabled','Once the syslog-ng package is installed it needs to be activated.','If the syslog-ng service is not activated the system may default to the syslogd service or lack logging instead.','','Run the following command to enable syslog-ng : # chkconfig syslog-ng on','[{\"cis\": [\"4.2.2.1\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5632,'Ensure syslog-ng default file permissions configured','syslog-ng will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files.','It is important to ensure that log files have the correct permissions to ensure that sensitive syslog-ng data is archived and protected.','','Edit the /etc/syslog-ng/syslog-ng.conf and set perm option to 0640 or more restrictive: options { chain_hostnames(off); flush_lines(0); perm(0640); stats_freq(3600); threaded(yes); };','[{\"cis\": [\"4.2.2.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5633,'Ensure syslog-ng is configured to send logs to a remote log host','The syslog-ng utility supports the ability to send logs it gathers to a remote log host or to receive messages from remote hosts, reducing administrative overhead.','Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.','','Edit the /etc/syslog-ng/syslog-ng.conf file and add the following lines (where logfile.example.com is the name of your central log host). destination logserver { tcp("logfile.example.com" port(514)); }; log { source(src); destination(logserver); }; Run the following command to reload the rsyslogd configuration: # pkill -HUP syslog-ng','[{\"cis\": [\"4.2.2.4\"]}, {\"cis_csc\": [\"6.6\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5634,'Ensure rsyslog or syslog-ng is installed','The rsyslog and syslog-ng software are recommended replacements to the original syslogd daemon which provide improvements over syslogd , such as connection-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server.','The security enhancements of rsyslog and syslog-ng such as connection-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server) justify installing and configuring the package.','','Install rsyslog or syslog-ng using one of the following commands: # yum install rsyslog # yum install syslog-ng','[{\"cis\": [\"4.2.3\"]}, {\"cis_csc\": [\"6.2\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5635,'Ensure permissions on all logfiles are configured','Log files stored in /var/log/ contain logged information from many services on the system, or on log hosts others as well.','It is important to ensure that log files have the correct permissions to ensure that sensitivebdata is archived and protected.','','Run the following command to set permissions on all existing log files: # find /var/log -type f -exec chmod g-wx,o-rwx {} +','[{\"cis\": [\"4.2.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(5636,'Ensure cron daemon is enabled','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.','','Run the following command to enable cron : # chkconfig crond on','[{\"cis\": [\"5.1.1\"]}, {\"cis_csc\": [\"6\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5637,'Ensure permissions on /etc/crontab are configured','The /etc/crontab file is used by cron to control its own jobs. The commands in this item make sure that root is the user and group owner of the file and that only the owner can access the file.','This file contains information on what system jobs are run by cron. Write access to these files could provide unprivileged users with the ability to elevate their privileges. Read access to these files could provide users with the ability to gain insight on system jobs that run on the system and could provide them a way to gain unauthorized privileged access.','','Run the following commands to set ownership and permissions on /etc/crontab : chown root:root /etc/crontab and chmod og-rwx /etc/crontab','[{\"cis\": [\"5.1.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5638,'Ensure permissions on /etc/cron.hourly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.hourly : chown root:root /etc/cron.hourly and chmod og-rwx /etc/cron.hourly','[{\"cis\": [\"5.1.3\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5639,'Ensure permissions on /etc/cron.daily are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.daily : chown root:root /etc/cron.daily and chmod og-rwx /etc/cron.daily','[{\"cis\": [\"5.1.4\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(5640,'Ensure permissions on /etc/cron.weekly are configured','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.','','Run the following commands to set ownership and permissions on /etc/cron.weekly : chown root:root /etc/cron.weekly and chmod og-rwx /etc/cron.weekly','[{\"cis\": [\"5.1.5\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]');