diff --git a/pandora_agents/pc/Win32/scripts/install_service_restart.bat b/pandora_agents/pc/Win32/scripts/install_service_restart.bat index 78d2b5e2cd..a3cd46191e 100644 --- a/pandora_agents/pc/Win32/scripts/install_service_restart.bat +++ b/pandora_agents/pc/Win32/scripts/install_service_restart.bat @@ -1,2 +1,3 @@ -@at 00:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 "%CD%\restart_pandora_agent.bat" +@at 00:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 "'%CD%\restart_pandora_agent.bat'" +schtasks /change /tn pandora_agent_restart /tr "'%CD%\restart_pandora_agent.bat'" \ No newline at end of file diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 476638a9a5..131c396ef8 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.773.3-230929 +Version: 7.0NG.773.3-231004 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index f5c9d960bb..dd779f8f15 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.773.3-230929" +pandora_version="7.0NG.773.3-231004" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 3a22258ee0..b9d6e9ada8 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1031,7 +1031,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.773.3'; -use constant AGENT_BUILD => '230929'; +use constant AGENT_BUILD => '231004'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index a07bf70cfb..4df66d18ca 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.773.3 -%define release 230929 +%define release 231004 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index d964b57451..88fd76aa64 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.773.3 -%define release 230929 +%define release 231004 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index dcf73ffc22..de935859b3 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.773.3 -%define release 230929 +%define release 231004 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 923a2eb1f7..1f1792f353 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.773.3" -PI_BUILD="230929" +PI_BUILD="231004" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 9b735ea8b3..e439ec2e23 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{230929} +{231004} ViewReadme {Yes} diff --git a/pandora_agents/win32/installer/scripts/install_service_restart.bat b/pandora_agents/win32/installer/scripts/install_service_restart.bat index 78d2b5e2cd..a3cd46191e 100644 --- a/pandora_agents/win32/installer/scripts/install_service_restart.bat +++ b/pandora_agents/win32/installer/scripts/install_service_restart.bat @@ -1,2 +1,3 @@ -@at 00:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 "%CD%\restart_pandora_agent.bat" +@at 00:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 "'%CD%\restart_pandora_agent.bat'" +schtasks /change /tn pandora_agent_restart /tr "'%CD%\restart_pandora_agent.bat'" \ No newline at end of file diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 7ce821fb81..634ef5b8bd 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.773.3 Build 230929") +#define PANDORA_VERSION ("7.0NG.773.3 Build 231004") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 10f53c4bfc..7921369578 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.773.3(Build 230929))" + VALUE "ProductVersion", "(7.0NG.773.3(Build 231004))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index b6c1b8ecc7..840b01e089 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.773.3-230929 +Version: 7.0NG.773.3-231004 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 580913f13f..b7b3d69db2 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.773.3-230929" +pandora_version="7.0NG.773.3-231004" package_pear=0 package_pandora=1 diff --git a/pandora_console/extras/mr/66.sql b/pandora_console/extras/mr/66.sql index 261d0fb9d2..606bcea909 100644 --- a/pandora_console/extras/mr/66.sql +++ b/pandora_console/extras/mr/66.sql @@ -14,6 +14,14 @@ CREATE TABLE IF NOT EXISTS `tgraph_analytics_filter` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `tconfig_os_version` ( + `id_os_version` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `product` TEXT, + `version` TEXT, + `end_of_support` VARCHAR(10) DEFAULT NULL, + PRIMARY KEY (`id_os_version`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + ALTER TABLE `tusuario` MODIFY COLUMN `integria_user_level_pass` TEXT; DROP TABLE `tincidencia`; @@ -88,6 +96,10 @@ ADD COLUMN `time_init` VARCHAR(45) NULL AFTER `date_init`, ADD COLUMN `date_end` VARCHAR(45) NULL AFTER `time_init`, ADD COLUMN `time_end` VARCHAR(45) NULL AFTER `date_end`; +INSERT INTO `tconfig_os_version` (`id_os_version`, `product`, `version`, `end_of_support`) VALUES (1,'Windows.*','7.*','2020/01/14'); +INSERT INTO `tconfig_os_version` (`id_os_version`, `product`, `version`, `end_of_support`) VALUES (2,'Cisco.*','IOS 3.4.3','2017/05/12'); +INSERT INTO `tconfig_os_version` (`id_os_version`, `product`, `version`, `end_of_support`) VALUES (3,'Linux.*','Centos 7.*','2022/01/01'); + UPDATE `tdiscovery_apps` SET `version` = '1.1' WHERE `short_name` = 'pandorafms.vmware'; -- Insert new Proxmox APP @@ -105,6 +117,86 @@ INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES -- Insert into tdiscovery_apps_executions INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' -g '__taskGroup__' --host '_host_' --port '_port_' --user '_user_' --password '_password_' --vm '_scanVM_' --lxc '_scanLXC_' --backups '_scanBackups_' --nodes '_scanNodes_' --transfer_mode tentacle --tentacle_address '_tentacleIP_' --tentacle_port '_tentaclePort_' --as_discovery_plugin 1'); +-- Insert new EC2 APP +SET @short_name = 'pandorafms.aws.ec2'; +SET @name = 'Amazon EC2'; +SET @section = 'cloud'; +SET @description = 'Monitor AWS EC2 instances'; +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_aws_ec2'); +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec2_', 'bin/aws_ec2'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileEC2_''); + +-- Insert new RDS APP +SET @short_name = 'pandorafms.aws.rds'; +SET @name = 'Amazon RDS'; +SET @section = 'cloud'; +SET @description = 'Monitor AWS RDS instances'; +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_aws_rds'); +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec2_', 'bin/aws_rds'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileRDS_''); + +-- Insert new S3 APP +SET @short_name = 'pandorafms.aws.s3'; +SET @name = 'Amazon S3'; +SET @section = 'cloud'; +SET @description = 'Monitor AWS S3 buckets'; +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_aws_s3'); +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec2_', 'bin/aws_s3'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileS3_''); + +-- Insert new Azure APP +SET @short_name = 'pandorafms.azure.mc'; +SET @name = 'Azure Microsoft Compute'; +SET @section = 'cloud'; +SET @description = 'Monitor Azure Microsoft Compute VMs'; +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_azure_mc'); +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec2_', 'bin/azure_vm'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileAzureMC_''); + +-- Insert new Google APP +SET @short_name = 'pandorafms.gcp.ce'; +SET @name = 'Google Cloud Compute Engine'; +SET @section = 'cloud'; +SET @description = 'Monitor Google Cloud Platform Compute Engine VMs'; +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_gcp_ce'); +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec2_', 'bin/google_instances'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileGoogleCE_''); + ALTER TABLE `treport_content` ADD COLUMN `cat_security_hardening` INT NOT NULL DEFAULT 0; ALTER TABLE `treport_content` ADD COLUMN `ignore_skipped` INT NOT NULL DEFAULT 0; ALTER TABLE `treport_content` ADD COLUMN `status_of_check` TINYTEXT; diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 70c2b1cf60..54392630fc 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -548,6 +548,21 @@ $tableAgent->data['os'][0] .= html_print_div( true ); +$tableAgent->data['caption_os_version'][0] = __('OS version'); +$tableAgent->rowclass['os_version'] = 'w540px'; +$tableAgent->data['os_version'][0] = html_print_input_text( + 'os_version', + $os_version, + '', + 16, + 100, + true, + false, + false, + '', + 'w540px' +); + $tableAgent->data['caption_server'][0] = __('Server'); $tableAgent->rowclass['server'] = 'w540px'; $tableAgent->data['server'][0] = html_print_select( diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 91d911ae24..b78b98f3c7 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -216,6 +216,7 @@ if ($create_agent) { $id_parent = (int) get_parameter_post('id_agent_parent'); $server_name = (string) get_parameter_post('server_name'); $id_os = (int) get_parameter_post('id_os'); + $os_version = (string) get_parameter_post('os_version'); $disabled = (int) get_parameter_post('disabled'); $custom_id_safe_output = strip_tags(io_safe_output(get_parameter('custom_id', ''))); $custom_id = io_safe_input(trim(preg_replace('/[\/\\\|%#&$]/', '', $custom_id_safe_output))); @@ -284,6 +285,7 @@ if ($create_agent) { 'comentarios' => $comentarios, 'modo' => $modo, 'id_os' => $id_os, + 'os_version' => $os_version, 'disabled' => $disabled, 'cascade_protection' => $cascade_protection, 'cascade_protection_module' => $cascade_protection_module, @@ -982,6 +984,7 @@ if ($update_agent) { $modo = (int) get_parameter_post('modo', 0); // Mode: Learning, Normal or Autodisabled. $id_os = (int) get_parameter_post('id_os'); + $os_version = (string) get_parameter_post('os_version'); $disabled = (bool) get_parameter_post('disabled'); $server_name = (string) get_parameter_post('server_name', ''); $id_parent = (int) get_parameter_post('id_agent_parent'); @@ -1107,6 +1110,7 @@ if ($update_agent) { 'disabled' => $disabled, 'id_parent' => $id_parent, 'id_os' => $id_os, + 'os_version' => $os_version, 'modo' => $modo, 'alias' => $alias, 'alias_as_name' => $alias_as_name, @@ -1268,6 +1272,7 @@ if ($id_agente) { $server_name = $agent['server_name']; $modo = $agent['modo']; $id_os = $agent['id_os']; + $os_version = $agent['os_version']; $disabled = $agent['disabled']; $id_parent = $agent['id_parent']; $custom_id = $agent['custom_id']; diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 786ad13d0e..291e0a1f01 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -880,6 +880,16 @@ switch ($action) { $idAgentModule = $module; break; + case 'end_of_life': + $es = json_decode($item['external_source'], true); + + $text_os_version = $es['os_version']; + $end_of_life_date = $es['end_of_life_date']; + $os_selector = $es['os_selector']; + $group = $es['group']; + $recursion = $es['recursion']; + break; + case 'alert_report_actions': $description = $item['description']; $es = json_decode($item['external_source'], true); @@ -1238,6 +1248,88 @@ $class = 'databox filters'; + + + + + + + + + + + + + + + + + + + + 'end_of_life_date', + 'style' => '', + 'content' => html_print_div( + [ + 'class' => '', + 'content' => html_print_input_text( + 'end_of_life_date', + $end_of_life_date, + '', + 10, + 10, + true + ), + ], + true + ), + ], + true + ); + + echo implode('', $timeInputs); + ?> + + + 'form_action']); echo ''; echo ''; +ui_require_css_file('datepicker'); +ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/'); ui_include_time_picker(); ui_require_javascript_file('pandora'); @@ -5216,6 +5310,8 @@ $(document).ready (function () { chooseType(); chooseSQLquery(); + $("#text-end_of_life_date").datepicker({dateFormat: "", showButtonPanel: true}); + $("#id_agents").change(agent_changed_by_multiple_agents); // Load selected modules by default @@ -6529,7 +6625,11 @@ function addGeneralRow() { function loadGeneralAgents(agent_group) { var params = []; - var group = ; + var group = ; + if (group < 0) { + return; + } + group = agent_group || group; params.push("get_agents=1"); @@ -6796,6 +6896,9 @@ function chooseType() { $("#row_group_by").hide(); $("#row_type_show").hide(); $("#row_use_prefix_notation").hide(); + $("#row_os_selector").hide(); + $("#row_os_version_regexp").hide(); + $("#row_os_end_of_life").hide(); $("#row_cat_security_hardening").hide(); $("#row_ignore_skipped").hide(); $("#row_status_check").hide(); @@ -7379,6 +7482,13 @@ function chooseType() { }); break; + case 'end_of_life': + $("#row_os_selector").show(); + $("#row_os_version_regexp").show(); + $("#row_group").show(); + $("#row_os_end_of_life").show(); + break; + case 'inventory_changes': $("#row_description").show(); $("#row_period").show(); diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index a294a7b939..095f79b14a 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -1759,6 +1759,17 @@ switch ($action) { $good_format = true; break; + case 'end_of_life': + $es['end_of_life_date'] = get_parameter('end_of_life_date'); + $es['os_selector'] = get_parameter('os_selector'); + $es['os_version'] = get_parameter('text_os_version', ''); + $es['group'] = get_parameter('combo_group', ''); + $es['recursion'] = get_parameter('recursion', 0); + + $values['external_source'] = json_encode($es); + $good_format = true; + break; + case 'alert_report_actions': $alert_templates_to_report = get_parameter('alert_templates'); $alert_actions_to_report = get_parameter('alert_actions'); @@ -2747,6 +2758,17 @@ switch ($action) { $good_format = true; break; + case 'end_of_life': + $es['end_of_life_date'] = get_parameter('end_of_life_date'); + $es['os_selector'] = get_parameter('os_selector'); + $es['os_version'] = get_parameter('text_os_version', ''); + $es['group'] = get_parameter('combo_group', ''); + $es['recursion'] = get_parameter('recursion', 0); + + $values['external_source'] = json_encode($es); + $good_format = true; + break; + case 'alert_report_actions': $alert_templates_to_report = get_parameter('alert_templates'); $alert_actions_to_report = get_parameter('alert_actions'); diff --git a/pandora_console/godmode/setup/gis_step_2.php b/pandora_console/godmode/setup/gis_step_2.php index f2dac0bf20..f2e9182a07 100644 --- a/pandora_console/godmode/setup/gis_step_2.php +++ b/pandora_console/godmode/setup/gis_step_2.php @@ -312,7 +312,7 @@ if ($mapConnectionData != null) { $mapConnectionDataUrl, '', 45, - 90, + false, true ).''; diff --git a/pandora_console/godmode/setup/os.builder.php b/pandora_console/godmode/setup/os.builder.php index afe3982d8c..d8a2f47d00 100644 --- a/pandora_console/godmode/setup/os.builder.php +++ b/pandora_console/godmode/setup/os.builder.php @@ -40,6 +40,191 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user return; } +if ($idOS > 0) { + $os = db_get_row_filter('tconfig_os', ['id_os' => $idOS]); + $name = $os['name']; + $description = $os['description']; + $icon = $os['icon_name']; +} else { + $name = io_safe_input(strip_tags(io_safe_output((string) get_parameter('name')))); + $description = io_safe_input(strip_tags(io_safe_output((string) get_parameter('description')))); + $icon = get_parameter('icon', 0); +} + +$icon_upload = get_parameter('icon_upload', null); + +$message = ''; +if ($is_management_allowed === true) { + switch ($action) { + case 'edit': + if ($idOS > 0) { + $actionHidden = 'update'; + $textButton = __('Update'); + $classButton = ['icon' => 'wand']; + } else { + $actionHidden = 'save'; + $textButton = __('Create'); + $classButton = ['icon' => 'next']; + } + break; + + case 'save': + if ($icon_upload !== null && $icon_upload['name'] !== '') { + if (isset($_FILES['icon_upload']) === true) { + $file_name = $_FILES['icon_upload']['name']; + $file_tmp = $_FILES['icon_upload']['tmp_name']; + $file_type = $_FILES['icon_upload']['type']; + $file_ext = strtolower(end(explode('.', $_FILES['icon_upload']['name']))); + + $allowed_extensions = [ + 'jpeg', + 'jpg', + 'png', + 'svg', + ]; + + $tab = 'manage_os'; + + if (in_array($file_ext, $allowed_extensions) === false) { + $message = 9; + } else { + $message = 8; + move_uploaded_file($file_tmp, $config['homedir'].'/images/os_icons/'.$file_name); + } + } + } else { + $values = []; + $values['name'] = $name; + $values['description'] = $description; + + if (($icon !== 0) && ($icon != '')) { + $values['icon_name'] = $icon; + } + + $resultOrId = false; + if ($name != '') { + $resultOrId = db_process_sql_insert('tconfig_os', $values); + } + + if ($resultOrId === false) { + $message = 2; + $tab = 'builder'; + $actionHidden = 'save'; + $textButton = __('Create'); + $classButton = ['icon' => 'wand']; + } else { + $tab = 'manage_os'; + $message = 1; + } + } + + if (is_metaconsole() === true) { + header('Location:'.$config['homeurl'].'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2=list&message='.$message); + } else { + header('Location:'.$config['homeurl'].'index.php?sec=gsetup&sec2=godmode/setup/os&tab='.$tab.'&message='.$message); + } + break; + + case 'update': + if ($icon_upload !== null && $icon_upload['name'] !== '') { + if (isset($_FILES['icon_upload']) === true) { + $file_name = $_FILES['icon_upload']['name']; + $file_tmp = $_FILES['icon_upload']['tmp_name']; + $file_type = $_FILES['icon_upload']['type']; + $file_ext = strtolower(end(explode('.', $_FILES['icon_upload']['name']))); + + $allowed_extensions = [ + 'jpeg', + 'jpg', + 'png', + 'svg', + ]; + + $tab = 'manage_os'; + + if (in_array($file_ext, $allowed_extensions) === false) { + $message = 9; + } else { + $message = 8; + move_uploaded_file($file_tmp, $config['homedir'].'/images/os_icons/'.$file_name); + } + } + } else { + $name = io_safe_input(strip_tags(io_safe_output((string) get_parameter('name')))); + $description = io_safe_input(strip_tags(io_safe_output((string) get_parameter('description')))); + $icon = get_parameter('icon', 0); + + $values = []; + $values['name'] = $name; + $values['description'] = $description; + // Only for Metaconsole. Save the previous name for synchronizing. + if (is_metaconsole() === true) { + $values['previous_name'] = db_get_value('name', 'tconfig_os', 'id_os', $idOS); + } + + if (($icon !== 0) && ($icon != '')) { + $values['icon_name'] = $icon; + } + + $result = false; + if ($name != '') { + $result = db_process_sql_update('tconfig_os', $values, ['id_os' => $idOS]); + } + + if ($result !== false) { + $message = 3; + $tab = 'manage_os'; + } else { + $message = 4; + $tab = 'builder'; + $os = db_get_row_filter('tconfig_os', ['id_os' => $idOS]); + $name = $os['name']; + } + + $actionHidden = 'update'; + $textButton = __('Update'); + $classButton = ['icon' => 'wand']; + } + + if (is_metaconsole() === true) { + header('Location:'.$config['homeurl'].'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2='.$tab.'&message='.$message); + } else { + header('Location:'.$config['homeurl'].'index.php?sec=gsetup&sec2=godmode/setup/os&tab='.$tab.'&message='.$message); + } + break; + + case 'delete': + $sql = 'SELECT COUNT(id_os) AS count FROM tagente WHERE id_os = '.$idOS; + $count = db_get_all_rows_sql($sql); + $count = $count[0]['count']; + + if ($count > 0) { + $message = 5; + } else { + $result = (bool) db_process_sql_delete('tconfig_os', ['id_os' => $idOS]); + if ($result) { + $message = 6; + } else { + $message = 7; + } + } + + if (is_metaconsole() === true) { + header('Location:'.$config['homeurl'].'index.php?sec=advanced&sec2=advanced/component_management&tab=list&tab2='.$tab.'&message='.$message); + } else { + header('Location:'.$config['homeurl'].'index.php?sec=gsetup&sec2=godmode/setup/os&tab='.$tab.'&message='.$message); + } + break; + + default: + case 'new': + $actionHidden = 'save'; + $textButton = __('Create'); + $classButton = ['icon' => 'next']; + break; + } +} + $icons = get_list_os_icons_dir(); $iconData = []; @@ -62,12 +247,11 @@ $iconData[] = html_print_div( true ); -echo '
'; +echo ''; $table = new stdClass(); $table->width = '100%'; $table->class = 'databox filter-table-adv'; -// $table->style[0] = 'width: 15%'; $table->data[0][] = html_print_label_input_block( __('Name'), html_print_input_text('name', $name, __('Name'), 20, 30, true, false, false, '', 'w250px') @@ -89,6 +273,11 @@ $table->data[1][] = html_print_label_input_block( html_print_textarea('description', 5, 20, $description, '', true, 'w250px') ); +$table->data[1][] = html_print_label_input_block( + '', + html_print_input_file('icon_upload', true, ['caption' => __('Upload icon')], 'form_setup') +); + html_print_table($table); html_print_input_hidden('id_os', $idOS); @@ -101,7 +290,6 @@ html_print_action_buttons( echo '
'; - function get_list_os_icons_dir() { global $config; diff --git a/pandora_console/godmode/setup/os.list.php b/pandora_console/godmode/setup/os.list.php index 330071353f..1ce9756cc0 100644 --- a/pandora_console/godmode/setup/os.list.php +++ b/pandora_console/godmode/setup/os.list.php @@ -45,7 +45,7 @@ if (is_management_allowed() === false) { $is_management_allowed = false; if (is_metaconsole() === false) { $url = ''.__('metaconsole').''; } else { $url = __('any node'); @@ -59,115 +59,68 @@ if (is_management_allowed() === false) { ); } -$table = new stdClass(); -$table->class = 'info_table'; -$table->head[0] = __('ID'); -$table->head[1] = __('Icon'); -$table->head[2] = __('Name'); -$table->head[3] = __('Description'); -if ($is_management_allowed === true) { - $table->head[4] = __('Actions'); -} +// Datatables list. +try { + $columns = [ + 'id_os', + 'icon_img', + 'name', + 'description', + 'options', + ]; -if ($is_management_allowed === true) { - $table->align[4] = 'center'; -} + $column_names = [ + [ + 'text' => __('ID'), + 'class' => 'w50px table_action_buttons', + ], + [ + 'text' => __('Icon'), + 'class' => 'w10px table_action_buttons', + ], + __('Name'), + __('Description'), + [ + 'text' => __('Options'), + 'class' => 'w20px table_action_buttons', + ], + ]; -$table->size[0] = '5%'; -if ($is_management_allowed === true) { - $table->size[4] = '20px'; -} - -// Prepare pagination. -$offset = (int) get_parameter('offset'); -$limit = $config['block_size']; -$count_osList = db_get_value('count(*)', 'tconfig_os'); - -$osList = db_get_all_rows_filter( - 'tconfig_os', - [ - 'offset' => $offset, - 'limit' => $limit, - ] -); - -if ($osList === false) { - $osList = []; -} - -$table->data = []; -foreach ($osList as $os) { - $data = []; - $data[] = $os['id_os']; - $data[] = ui_print_os_icon($os['id_os'], false, true); - if ($is_management_allowed === true) { - if (is_metaconsole() === true) { - $osNameUrl = 'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&action=edit&tab2=builder&id_os='.$os['id_os']; - } else { - $osNameUrl = 'index.php?sec=gsetup&sec2=godmode/setup/os&action=edit&tab=builder&id_os='.$os['id_os']; - } - - $data[] = html_print_anchor( - [ - 'href' => $osNameUrl, - 'content' => io_safe_output($os['name']), + $tableId = 'os_table'; + // Load datatables user interface. + ui_print_datatable( + [ + 'id' => $tableId, + 'class' => 'info_table', + 'style' => 'width: 100%', + 'columns' => $columns, + 'column_names' => $column_names, + 'ajax_url' => 'include/ajax/os', + 'ajax_data' => ['method' => 'drawOSTable'], + 'ajax_postprocess' => 'process_datatables_item(item)', + 'no_sortable_columns' => [-1, 1], + 'order' => [ + 'field' => 'id', + 'direction' => 'asc', ], - true - ); - } else { - $data[] = io_safe_output($os['name']); - } - - $data[] = ui_print_truncate_text(io_safe_output($os['description']), 'description', true, true); - - if ($is_management_allowed === true) { - $table->cellclass[][4] = 'table_action_buttons'; - if ($os['id_os'] > 16) { - if (is_metaconsole() === true) { - $hrefDelete = 'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&action=delete&tab2=list&id_os='.$os['id_os']; - } else { - $hrefDelete = 'index.php?sec=gsetup&sec2=godmode/setup/os&action=delete&tab=list&id_os='.$os['id_os']; - } - - $data[] = html_print_anchor( - [ - 'href' => $hrefDelete, - 'content' => html_print_image( - 'images/delete.svg', - true, - [ - 'alt' => __('Delete'), - 'title' => __('Delete'), - 'class' => 'main_menu_icon invert_filter', - ] - ), + 'search_button_class' => 'sub filter float-right', + 'form' => [ + 'inputs' => [ + [ + 'label' => __('Free search'), + 'type' => 'text', + 'class' => 'w25p', + 'id' => 'free_search', + 'name' => 'free_search', + ], ], - true - ); - } else { - // The original icons of pandora don't delete. - $data[] = ''; - } - } - - $table->data[] = $data; -} - -$tablePagination = ''; -if (isset($data) === true) { - html_print_table($table); - $tablePagination = ui_pagination( - $count_osList, - ui_get_url_refresh(['message' => false]), - $offset, - 0, - true, - 'offset', - false, - '' + ], + 'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar', + 'dom_elements' => 'lftpB', + ] ); -} else { - ui_print_info_message(['no_close' => true, 'message' => __('There are no defined operating systems') ]); +} catch (Exception $e) { + echo $e->getMessage(); } $buttons = ''; @@ -191,3 +144,76 @@ html_print_action_buttons( 'right_content' => $tablePagination, ] ); + +echo ''; + +echo '
'; + +html_print_action_buttons( + html_print_submit_button(__('Create OS'), 'update_button', false, ['icon' => 'next'], true), + ['type' => 'form_action'] +); + +echo '
'; + +?> + diff --git a/pandora_console/godmode/setup/os.php b/pandora_console/godmode/setup/os.php index 539189f88d..99402ff30a 100644 --- a/pandora_console/godmode/setup/os.php +++ b/pandora_console/godmode/setup/os.php @@ -40,24 +40,13 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user return; } -$action = get_parameter('action', 'new'); +$action = get_parameter('action', ''); $idOS = get_parameter('id_os', 0); $id_message = get_parameter('message', 0); if (is_metaconsole() === true) { $tab = get_parameter('tab2', 'list'); } else { - $tab = get_parameter('tab', 'list'); -} - -if ($idOS) { - $os = db_get_row_filter('tconfig_os', ['id_os' => $idOS]); - $name = $os['name']; - $description = $os['description']; - $icon = $os['icon_name']; -} else { - $name = io_safe_input(strip_tags(io_safe_output((string) get_parameter('name')))); - $description = io_safe_input(strip_tags(io_safe_output((string) get_parameter('description')))); - $icon = get_parameter('icon', 0); + $tab = get_parameter('tab', 'manage_os'); } $is_management_allowed = true; @@ -65,150 +54,60 @@ if (is_management_allowed() === false) { $is_management_allowed = false; } -$message = ''; -if ($is_management_allowed === true) { - switch ($action) { - case 'edit': - $actionHidden = 'update'; - $textButton = __('Update'); - $classButton = ['icon' => 'wand']; - break; - - case 'save': - $values = []; - $values['name'] = $name; - $values['description'] = $description; - - if (($icon !== 0) && ($icon != '')) { - $values['icon_name'] = $icon; - } - - $resultOrId = false; - if ($name != '') { - $resultOrId = db_process_sql_insert('tconfig_os', $values); - } - - if ($resultOrId === false) { - $message = 2; - $tab = 'builder'; - $actionHidden = 'save'; - $textButton = __('Create'); - $classButton = ['icon' => 'wand']; - } else { - $tab = 'list'; - $message = 1; - } - - if (is_metaconsole() === true) { - header('Location:'.$config['homeurl'].'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2='.$tab.'&message='.$message); - } else { - header('Location:'.$config['homeurl'].'index.php?sec=gsetup&sec2=godmode/setup/os&tab='.$tab.'&message='.$message); - } - break; - - case 'update': - $name = io_safe_input(strip_tags(io_safe_output((string) get_parameter('name')))); - $description = io_safe_input(strip_tags(io_safe_output((string) get_parameter('description')))); - $icon = get_parameter('icon', 0); - - $values = []; - $values['name'] = $name; - $values['description'] = $description; - // Only for Metaconsole. Save the previous name for synchronizing. - if (is_metaconsole() === true) { - $values['previous_name'] = db_get_value('name', 'tconfig_os', 'id_os', $idOS); - } - - if (($icon !== 0) && ($icon != '')) { - $values['icon_name'] = $icon; - } - - $result = false; - if ($name != '') { - $result = db_process_sql_update('tconfig_os', $values, ['id_os' => $idOS]); - } - - if ($result !== false) { - $message = 3; - $tab = 'list'; - } else { - $message = 4; - $tab = 'builder'; - $os = db_get_row_filter('tconfig_os', ['id_os' => $idOS]); - $name = $os['name']; - } - - $actionHidden = 'update'; - $textButton = __('Update'); - $classButton = ['icon' => 'wand']; - if (is_metaconsole() === true) { - header('Location:'.$config['homeurl'].'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2='.$tab.'&message='.$message); - } else { - header('Location:'.$config['homeurl'].'index.php?sec=gsetup&sec2=godmode/setup/os&tab='.$tab.'&message='.$message); - } - break; - - case 'delete': - $sql = 'SELECT COUNT(id_os) AS count FROM tagente WHERE id_os = '.$idOS; - $count = db_get_all_rows_sql($sql); - $count = $count[0]['count']; - - if ($count > 0) { - $message = 5; - } else { - $result = (bool) db_process_sql_delete('tconfig_os', ['id_os' => $idOS]); - if ($result) { - $message = 6; - } else { - $message = 7; - } - } - - if (is_metaconsole() === true) { - header('Location:'.$config['homeurl'].'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2='.$tab.'&message='.$message); - } else { - header('Location:'.$config['homeurl'].'index.php?sec=gsetup&sec2=godmode/setup/os&tab='.$tab.'&message='.$message); - } - break; - - default: - case 'new': - $actionHidden = 'save'; - $textButton = __('Create'); - $classButton = ['icon' => 'next']; - break; - } -} - $buttons = []; -$buttons['list'] = [ + +$buttons['manage_os'] = [ 'active' => false, - 'text' => ''.html_print_image( - 'images/logs@svg.svg', + 'text' => ''.html_print_image( + 'images/os@svg.svg', true, [ - 'title' => __('List OS'), + 'title' => __('Manage OS types'), + 'class' => 'invert_filter main_menu_icon', + ] + ).'', +]; + +$buttons['manage_version'] = [ + 'active' => false, + 'text' => ''.html_print_image( + 'images/os_version@svg.svg', + true, + [ + 'title' => __('Manage version expiration dates'), 'class' => 'invert_filter main_menu_icon', ] ).'', ]; -if ($is_management_allowed === true) { - $buttons['builder'] = [ - 'active' => false, - 'text' => ''.html_print_image( - 'images/edit.svg', - true, - [ - 'title' => __('Builder OS'), - 'class' => 'invert_filter main_menu_icon', - ] - ).'', - ]; -} $buttons[$tab]['active'] = true; -$headerTitle = ($tab === 'builder') ? __('Edit OS') : __('List of Operating Systems'); +switch ($tab) { + case 'builder': + $headerTitle = __('Edit OS'); + break; + + case 'manage_os': + case 'list': + if ($action === 'edit') { + $headerTitle = __('Edit OS'); + } else { + $headerTitle = __('List of Operating Systems'); + } + break; + + case 'manage_version': + if ($action === 'edit') { + $headerTitle = __('Edit OS version expiration date'); + } else { + $headerTitle = __('List of version expiration dates'); + } + break; + + default: + // Default. + break; +} if (is_metaconsole() === false) { // Header. @@ -262,6 +161,14 @@ if (empty($id_message) === false) { echo ui_print_error_message(__('Error deleting'), '', true); break; + case 8: + echo ui_print_success_message(__('Icon successfuly uploaded'), '', true); + break; + + case 9: + echo ui_print_error_message(__('File must be of type JPG, JPEG, PNG or SVG'), '', true); + break; + default: // Default. break; @@ -269,12 +176,21 @@ if (empty($id_message) === false) { } switch ($tab) { + case 'manage_os': case 'list': - include_once $config['homedir'].'/godmode/setup/os.list.php'; + if (in_array($action, ['edit', 'save', 'update']) && is_management_allowed() === true) { + include_once $config['homedir'].'/godmode/setup/os.builder.php'; + } else { + include_once $config['homedir'].'/godmode/setup/os.list.php'; + } break; - case 'builder': - include_once $config['homedir'].'/godmode/setup/os.builder.php'; + case 'manage_version': + if (in_array($action, ['edit', 'save', 'update']) && is_management_allowed() === true) { + include_once $config['homedir'].'/godmode/setup/os_version.builder.php'; + } else { + include_once $config['homedir'].'/godmode/setup/os_version.list.php'; + } break; default: diff --git a/pandora_console/godmode/setup/os_version.builder.php b/pandora_console/godmode/setup/os_version.builder.php new file mode 100644 index 0000000000..caf968e5be --- /dev/null +++ b/pandora_console/godmode/setup/os_version.builder.php @@ -0,0 +1,211 @@ + 0) { + $os_version = db_get_row_filter('tconfig_os_version', ['id_os_version' => $idOS]); + $product = $os_version['product']; + $version = $os_version['version']; + $end_of_life_date = $os_version['end_of_support']; +} else { + $product = io_safe_input(strip_tags(io_safe_output((string) get_parameter('product')))); + $version = io_safe_input(strip_tags(io_safe_output((string) get_parameter('version')))); + $end_of_life_date = get_parameter('end_of_life_date', date("Y/m/d")); +} + +$message = ''; +if ($is_management_allowed === true) { + switch ($action) { + case 'edit': + if ($idOS > 0) { + $actionHidden = 'update'; + $textButton = __('Update'); + $classButton = ['icon' => 'wand']; + } else { + $actionHidden = 'save'; + $textButton = __('Create'); + $classButton = ['icon' => 'next']; + } + break; + + case 'save': + $values = []; + // Product and version must be stored with no entities to be able to use REGEXP in queries. + // CAREFUL! output of these fields must be encoded to avoid scripting vulnerabilities. + $values['product'] = io_safe_output($product); + $values['version'] = io_safe_output($version); + $values['end_of_support'] = $end_of_life_date; + + $result = db_process_sql_insert('tconfig_os_version', $values); + + if ($result === false) { + $message = 2; + } else { + $message = 1; + } + + $tab = 'manage_version'; + + header('Location:'.$config['homeurl'].'index.php?sec=gsetup&sec2=godmode/setup/os&tab='.$tab.'&message='.$message); + break; + + case 'update': + $product = io_safe_output(get_parameter('product')); + $version = io_safe_output(get_parameter('version')); + $end_of_life_date = get_parameter('end_of_life_date', 0); + $values = []; + $values['product'] = $product; + $values['version'] = $version; + $values['end_of_support'] = $end_of_life_date; + $result = db_process_sql_update('tconfig_os_version', $values, ['id_os_version' => $idOS]); + + if ($result === false) { + $message = 4; + } else { + $message = 3; + } + + $tab = 'manage_version'; + + header('Location:'.$config['homeurl'].'index.php?sec=gsetup&sec2=godmode/setup/os&tab='.$tab.'&message='.$message); + break; + + case 'delete': + $sql = 'SELECT COUNT(id_os) AS count FROM tagente WHERE id_os = '.$idOS; + $count = db_get_all_rows_sql($sql); + $count = $count[0]['count']; + + if ($count > 0) { + $message = 5; + } else { + $result = (bool) db_process_sql_delete('tconfig_os', ['id_os' => $idOS]); + if ($result) { + $message = 6; + } else { + $message = 7; + } + } + + if (is_metaconsole() === true) { + header('Location:'.$config['homeurl'].'index.php?sec=advanced&sec2=advanced/component_management&tab=list&tab2='.$tab.'&message='.$message); + } else { + header('Location:'.$config['homeurl'].'index.php?sec=gsetup&sec2=godmode/setup/os&tab='.$tab.'&message='.$message); + } + break; + + default: + case 'new': + $actionHidden = 'save'; + $textButton = __('Create'); + $classButton = ['icon' => 'next']; + break; + } +} + +echo '
'; +$table = new stdClass(); +$table->width = '100%'; +$table->class = 'databox filter-table-adv'; + +// $table->style[0] = 'width: 15%'; +$table->data[0][] = html_print_label_input_block( + __('Product'), + html_print_input_text('product', io_safe_input($product), __('Product'), 20, 300, true, false, false, '', 'w250px') +); + +$table->data[0][] = html_print_label_input_block( + __('Version'), + html_print_input_text('version', io_safe_input($version), __('Version'), 20, 300, true, false, false, '', 'w250px') +); + +$timeInputs = []; + +$timeInputs[] = html_print_div( + [ + 'id' => 'end_of_life_date', + 'style' => '', + 'content' => html_print_div( + [ + 'class' => '', + 'content' => html_print_input_text( + 'end_of_life_date', + $end_of_life_date, + '', + 10, + 10, + true + ), + ], + true + ), + ], + true +); + +$table->data[1][] = html_print_label_input_block( + __('End of life date'), + implode('', $timeInputs) +); + +html_print_table($table); + +html_print_input_hidden('id_os', $idOS); +html_print_input_hidden('action', $actionHidden); + +html_print_action_buttons( + html_print_submit_button($textButton, 'update_button', false, $classButton, true), + ['type' => 'form_action'] +); + +echo '
'; + +?> + \ No newline at end of file diff --git a/pandora_console/godmode/setup/os_version.list.php b/pandora_console/godmode/setup/os_version.list.php new file mode 100644 index 0000000000..3e15725793 --- /dev/null +++ b/pandora_console/godmode/setup/os_version.list.php @@ -0,0 +1,198 @@ + __('Options'), + 'class' => 'w100px table_action_buttons', + ], + ]; + + $tableId = 'os_version_table'; + // Load datatables user interface. + ui_print_datatable( + [ + 'id' => $tableId, + 'class' => 'info_table', + 'style' => 'width: 100%', + 'columns' => $columns, + 'column_names' => $column_names, + 'ajax_url' => 'include/ajax/os', + 'ajax_data' => ['method' => 'drawOSVersionTable'], + 'ajax_postprocess' => 'process_datatables_item(item)', + 'no_sortable_columns' => [-1], + 'order' => [ + 'field' => 'id', + 'direction' => 'asc', + ], + 'search_button_class' => 'sub filter float-right', + 'form' => [ + 'inputs' => [ + [ + 'label' => __('Free search'), + 'type' => 'text', + 'class' => 'w25p', + 'id' => 'free_search', + 'name' => 'free_search', + ], + ], + ], + 'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar', + 'dom_elements' => 'lftpB', + ] + ); +} catch (Exception $e) { + echo $e->getMessage(); +} + +echo ''; + +echo '
'; + +html_print_action_buttons( + html_print_submit_button(__('Create OS version'), 'update_button', false, ['icon' => 'next'], true), + ['type' => 'form_action'] +); + +echo '
'; + +echo '
'; +html_print_input_hidden('os_type_regex', ''); +html_print_input_hidden('os_version_regex', ''); + +echo '
'; + +?> + + \ No newline at end of file diff --git a/pandora_console/godmode/setup/os_version.php b/pandora_console/godmode/setup/os_version.php new file mode 100644 index 0000000000..ec5d27beae --- /dev/null +++ b/pandora_console/godmode/setup/os_version.php @@ -0,0 +1,285 @@ + $id_os_version]); + $product = $os_version['product']; + $version = $os_version['version']; + $end_of_life_date = $os_version['end_of_life_date']; +} else { + $product = io_safe_input(strip_tags(io_safe_output((string) get_parameter('product')))); + $version = io_safe_input(strip_tags(io_safe_output((string) get_parameter('version')))); + $end_of_life_date = get_parameter('end_of_life_date', 0); +} + +$is_management_allowed = true; +if (is_management_allowed() === false) { + $is_management_allowed = false; +} + +$message = ''; +if ($is_management_allowed === true) { + switch ($action) { + case 'edit': + $action_hidden = 'update'; + $text_button = __('Update'); + $class_button = ['icon' => 'wand']; + break; + + case 'save': + $values = []; + $values['product'] = $product; + $values['version'] = $version; + $values['end_of_life_date'] = $end_of_life_date; + + $result_or_id = false; + if ($product !== '') { + $result_or_id = db_process_sql_insert('tconfig_os_version', $values); + } + + if ($result_or_id === false) { + $message = 2; + $tab = 'builder'; + $actionHidden = 'save'; + $textButton = __('Create'); + $classButton = ['icon' => 'wand']; + } else { + $tab = 'list'; + $message = 1; + } + + if (is_metaconsole() === true) { + header('Location:'.$config['homeurl'].'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2='.$tab.'&message='.$message); + } else { + header('Location:'.$config['homeurl'].'index.php?sec=gsetup&sec2=godmode/setup/os&tab='.$tab.'&message='.$message); + } + break; + + case 'update': + $product = io_safe_input(strip_tags(io_safe_output((string) get_parameter('product')))); + $version = io_safe_input(strip_tags(io_safe_output((string) get_parameter('version')))); + $end_of_life_date = get_parameter('end_of_life_date', 0); + + $values = []; + $values['product'] = $product; + $values['version'] = $version; + + $result = false; + $result = db_process_sql_update('tconfig_os_version', $values, ['id_os' => $id_os_version]); + + if ($result !== false) { + $message = 3; + $tab = 'list'; + } else { + $message = 4; + $tab = 'builder'; + $os = db_get_row_filter('tconfig_os', ['id_os' => $idOS]); + $name = $os['name']; + } + + $actionHidden = 'update'; + $textButton = __('Update'); + $classButton = ['icon' => 'wand']; + if (is_metaconsole() === true) { + header('Location:'.$config['homeurl'].'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2='.$tab.'&message='.$message); + } else { + header('Location:'.$config['homeurl'].'index.php?sec=gsetup&sec2=godmode/setup/os_version&tab='.$tab.'&message='.$message); + } + break; + + case 'delete': + $sql = 'SELECT COUNT(id_os) AS count FROM tagente WHERE id_os = '.$idOS; + $count = db_get_all_rows_sql($sql); + $count = $count[0]['count']; + + if ($count > 0) { + $message = 5; + } else { + $result = (bool) db_process_sql_delete('tconfig_os', ['id_os' => $idOS]); + if ($result) { + $message = 6; + } else { + $message = 7; + } + } + + if (is_metaconsole() === true) { + header('Location:'.$config['homeurl'].'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2='.$tab.'&message='.$message); + } else { + header('Location:'.$config['homeurl'].'index.php?sec=gsetup&sec2=godmode/setup/os&tab='.$tab.'&message='.$message); + } + break; + + default: + case 'new': + $actionHidden = 'save'; + $textButton = __('Create'); + $classButton = ['icon' => 'next']; + break; + } +} + +$buttons = []; +$buttons['list'] = [ + 'active' => false, + 'text' => ''.html_print_image( + 'images/logs@svg.svg', + true, + [ + 'title' => __('List OS'), + 'class' => 'invert_filter main_menu_icon', + ] + ).'', +]; +if ($is_management_allowed === true) { + $buttons['builder'] = [ + 'active' => false, + 'text' => ''.html_print_image( + 'images/edit.svg', + true, + [ + 'title' => __('Builder OS'), + 'class' => 'invert_filter main_menu_icon', + ] + ).'', + ]; + + $buttons['version_exp_date_editor'] = [ + 'active' => false, + 'text' => ''.html_print_image( + 'images/edit.svg', + true, + [ + 'title' => __('Version expiration date editor'), + 'class' => 'invert_filter main_menu_icon', + ] + ).'', + ]; +} + +$buttons[$tab]['active'] = true; + +switch ($tab) { + case 'builder': + $headerTitle = __('Edit OS'); + break; + + case 'manage_version': + $headerTitle = __('Version expiration date editor'); + break; + + case 'list': + $headerTitle = __('List of Operating Systems'); + break; + + default: + // Default. + break; +} + +if (is_metaconsole() === false) { + // Header. + ui_print_standard_header( + $headerTitle, + '', + false, + '', + true, + $buttons, + [ + [ + 'link' => '', + 'label' => __('Servers'), + ], + [ + 'link' => '', + 'label' => __('Edit OS'), + ], + ] + ); +} + +if (empty($id_message) === false) { + switch ($id_message) { + case 1: + echo ui_print_success_message(__('Success creating OS'), '', true); + break; + + case 2: + echo ui_print_error_message(__('Fail creating OS'), '', true); + break; + + case 3: + echo ui_print_success_message(__('Success updating OS'), '', true); + break; + + case 4: + echo ui_print_error_message(__('Error updating OS'), '', true); + break; + + case 5: + echo ui_print_error_message(__('There are agents with this OS.'), '', true); + break; + + case 6: + echo ui_print_success_message(__('Success deleting'), '', true); + break; + + case 7: + echo ui_print_error_message(__('Error deleting'), '', true); + break; + + default: + // Default. + break; + } +} + +include_once $config['homedir'].'/godmode/setup/os_version.list.php'; diff --git a/pandora_console/images/os@svg.svg b/pandora_console/images/os@svg.svg new file mode 100644 index 0000000000..80f8caf194 --- /dev/null +++ b/pandora_console/images/os@svg.svg @@ -0,0 +1,7 @@ + + + os@svg + + + + \ No newline at end of file diff --git a/pandora_console/images/os_version@svg.svg b/pandora_console/images/os_version@svg.svg new file mode 100644 index 0000000000..1274ccc3f8 --- /dev/null +++ b/pandora_console/images/os_version@svg.svg @@ -0,0 +1,15 @@ + + + os version@svg + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index f9bf50b7ae..593fa9a975 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -2059,7 +2059,7 @@ if ($table_events) { include_once 'include/functions_graph.php'; $id_agente = (int) get_parameter('id_agente'); - $all_events_24h = (int) get_parameter('all_events_24h'); + $all_events_24h = (int) get_parameter('all_events_24h', 0); // Fix: for tag functionality groups have to be all user_groups // (propagate ACL funct!). diff --git a/pandora_console/include/ajax/os.php b/pandora_console/include/ajax/os.php new file mode 100644 index 0000000000..058fe75578 --- /dev/null +++ b/pandora_console/include/ajax/os.php @@ -0,0 +1,376 @@ + false]); + return; + } + + if (db_process_sql_delete( + 'tconfig_os', + ['id_os' => $id_os] + ) === false + ) { + echo json_encode(['deleted' => false]); + } else { + echo json_encode(['deleted' => true]); + } +} + +if ($method === 'deleteOSVersion') { + global $config; + + $id_os_version = get_parameter('id_os_version', null); + + if (empty($id_os_version) === true || $id_os_version < 1) { + echo json_encode(['deleted' => false]); + } + + if (db_process_sql_delete( + 'tconfig_os_version', + ['id_os_version' => $id_os_version] + ) === false + ) { + echo json_encode(['deleted' => false]); + } else { + echo json_encode(['deleted' => true]); + } +} + +if ($method === 'drawOSTable') { + // Datatables offset, limit and order. + $filter = get_parameter('filter', []); + $start = get_parameter('start', 0); + $length = get_parameter('length', $config['block_size']); + $orderBy = get_datatable_order(true); + + $sort_field = $orderBy['field']; + $order = $orderBy['direction']; + + $pagination = ''; + + $pagination = sprintf( + ' LIMIT %d OFFSET %d ', + $length, + $start + ); + + try { + ob_start(); + + $fields = ['*']; + $sql_filters = []; + + if (isset($filter['free_search']) === true + && empty($filter['free_search']) === false + ) { + $sql_filters[] = sprintf( + ' AND (`name` like "%%%s%%" OR `description` like "%%%s%%") ', + $filter['free_search'], + $filter['free_search'] + ); + } + + if (isset($order) === true) { + $dir = 'asc'; + if ($order == 'desc') { + $dir = 'desc'; + }; + + if (in_array( + $sort_field, + [ + 'id_os', + 'name', + 'description', + ] + ) === true + ) { + $order_by = sprintf( + 'ORDER BY `%s` %s', + $sort_field, + $dir + ); + } + } + + // Retrieve data. + $sql = sprintf( + 'SELECT %s + FROM tconfig_os + WHERE 1=1 + %s + %s + %s', + join(',', $fields), + join(' ', $sql_filters), + $order_by, + $pagination + ); + + $count_sql = sprintf( + 'SELECT id_os + FROM tconfig_os + WHERE 1=1 + %s', + join(' ', $sql_filters) + ); + + $return = db_get_all_rows_sql($sql); + if ($return === false) { + $data = []; + } else { + $data = $return; + } + + $data = array_map( + function ($item) { + $item['icon_img'] = ui_print_os_icon($item['id_os'], false, true); + + if (is_management_allowed() === true) { + if (is_metaconsole() === true) { + $osNameUrl = 'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&action=edit&tab2=list&id_os='.$item['id_os']; + } else { + $osNameUrl = 'index.php?sec=gsetup&sec2=godmode/setup/os&action=edit&tab=manage_os&id_os='.$item['id_os']; + } + + $item['name'] = html_print_anchor( + [ + 'href' => $osNameUrl, + 'content' => $item['name'], + ], + true + ); + } else { + $item['name'] = $item['name']; + } + + $item['description'] = ui_print_truncate_text( + $item['description'], + 'description', + true, + true + ); + + if (is_management_allowed() === true) { + $item['enable_delete'] = false; + + if ($item['id_os'] > 16) { + $item['enable_delete'] = true; + } + } + + return $item; + }, + $data + ); + + // Retrieve counter. + $count = db_get_value('count(*)', '('.$count_sql.') t'); + + // Datatables format: RecordsTotal && recordsfiltered. + echo json_encode( + [ + 'data' => $data, + 'recordsTotal' => $count, + 'recordsFiltered' => $count, + ] + ); + // Capture output. + $response = ob_get_clean(); + } catch (Exception $e) { + echo json_encode(['error' => $e->getMessage()]); + exit; + } + + // If not valid, show error with issue. + json_decode($response); + if (json_last_error() == JSON_ERROR_NONE) { + // If valid dump. + echo $response; + } else { + echo json_encode( + ['error' => $response] + ); + } + + exit; +} + +if ($method === 'drawOSVersionTable') { + // Datatables offset, limit and order. + $filter = get_parameter('filter', []); + $start = get_parameter('start', 0); + $length = get_parameter('length', $config['block_size']); + $orderBy = get_datatable_order(true); + + $sort_field = $orderBy['field']; + $order = $orderBy['direction']; + + $pagination = ''; + + $pagination = sprintf( + ' LIMIT %d OFFSET %d ', + $length, + $start + ); + + try { + ob_start(); + + $fields = ['*']; + $sql_filters = []; + + if (isset($filter['free_search']) === true + && empty($filter['free_search']) === false + ) { + $sql_filters[] = sprintf( + ' AND (`product` like "%%%s%%" OR `version` like "%%%s%%") ', + $filter['free_search'], + $filter['free_search'] + ); + } + + if (isset($order) === true) { + $dir = 'asc'; + if ($order == 'desc') { + $dir = 'desc'; + }; + + if (in_array( + $sort_field, + [ + 'product', + 'version', + 'end_of_support', + ] + ) === true + ) { + $order_by = sprintf( + 'ORDER BY `%s` %s', + $sort_field, + $dir + ); + } + } + + // Retrieve data. + $sql = sprintf( + 'SELECT %s + FROM tconfig_os_version + WHERE 1=1 + %s + %s + %s', + join(',', $fields), + join(' ', $sql_filters), + $order_by, + $pagination + ); + + $count_sql = sprintf( + 'SELECT id_os_version + FROM tconfig_os_version + WHERE 1=1 + %s', + join(' ', $sql_filters) + ); + + $return = db_get_all_rows_sql($sql); + + if ($return === false) { + $data = []; + } else { + // Format end of life date. + $return = array_map( + function ($item) { + $date_string = date_w_fixed_tz($item['end_of_support']); + $timestamp = strtotime($date_string); + $date_without_time = date('F j, Y', $timestamp); + $item['end_of_support'] = $date_without_time; + return $item; + }, + $return + ); + + $data = $return; + } + + // Retrieve counter. + $count = db_get_value('count(*)', '('.$count_sql.') t'); + + // Datatables format: RecordsTotal && recordsfiltered. + echo json_encode( + [ + 'data' => $data, + 'recordsTotal' => $count, + 'recordsFiltered' => $count, + ] + ); + // Capture output. + $response = ob_get_clean(); + } catch (Exception $e) { + echo json_encode(['error' => $e->getMessage()]); + exit; + } + + // If not valid, show error with issue. + json_decode($response); + if (json_last_error() == JSON_ERROR_NONE) { + // If valid dump. + echo $response; + } else { + echo json_encode( + ['error' => $response] + ); + } + + exit; +} diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index d6e17232d0..990c2bbd74 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC230929'; +$build_version = 'PC231004'; $pandora_version = 'v7.0NG.773.3'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/db/mysql.php b/pandora_console/include/db/mysql.php index 66510a1898..e8e7a6b020 100644 --- a/pandora_console/include/db/mysql.php +++ b/pandora_console/include/db/mysql.php @@ -80,8 +80,13 @@ function mysql_connect_db( // If you want persistent connections change it to mysql_pconnect(). if ($config['mysqli']) { if (empty($ssl)) { - $connect_id = mysqli_connect($host, $user, $pass, $db, $port); - if (mysqli_connect_errno() > 0) { + try { + $connect_id = mysqli_connect($host, $user, $pass, $db, $port); + if (mysqli_connect_errno() > 0) { + include 'general/mysqlerr.php'; + return false; + } + } catch (\mysqli_sql_exception $e) { include 'general/mysqlerr.php'; return false; } diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index f1cb4e1f0e..720b0e6e55 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -497,7 +497,8 @@ function agents_get_agents( ], $return=false, $disabled_agent=0, - $use_meta_table=false + $use_meta_table=false, + $join_os_table=false ) { global $config; @@ -710,6 +711,18 @@ function agents_get_agents( ON tpolicy_agents.id_agent=tagente.id_agente'; } + if ($join_os_table === true) { + $os_version_join = ' + INNER JOIN tconfig_os + ON tagente.id_os = tconfig_os.id_os + INNER JOIN tconfig_os_version + ON tconfig_os.name REGEXP tconfig_os_version.product + '; + unset($filter['os_version_end_of_life']); + } else { + $os_version_join = ''; + } + if ($extra) { $where = sprintf( '(%s OR (%s)) AND (%s) AND (%s) %s AND %s %s %s %s', @@ -744,11 +757,12 @@ function agents_get_agents( FROM `%s` tagente LEFT JOIN tagent_secondary_group ON tagent_secondary_group.id_agent=tagente.id_agente - %s + %s %s WHERE %s %s', implode(',', $fields), $table_name, $policy_join, + $os_version_join, $where, $order ); diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 9dfe1c0801..f6d1674022 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -1528,6 +1528,7 @@ function api_set_update_agent($id_agent, $thrash2, $other, $thrash3) $learningMode = $other['data'][10]; $disabled = $other['data'][11]; $description = $other['data'][12]; + $osVersion = $other['data'][13]; // Check parameters. if ($idGroup == 0) { @@ -1623,6 +1624,7 @@ function api_set_update_agent($id_agent, $thrash2, $other, $thrash3) 'server_name' => $nameServer, 'id_parent' => $idParent, 'custom_id' => $customId, + 'os_version' => $osVersion, ], ['id_agente' => $id_agent] ); diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 7c8113310f..f709fe2b4c 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -2404,14 +2404,11 @@ function events_print_event_table( $filter = '1 = 1'; } - $secondary_join = 'LEFT JOIN tagent_secondary_group tasg ON tevento.id_agente = tasg.id_agent'; - $sql = sprintf( 'SELECT DISTINCT tevento.* - FROM tevento %s + FROM tevento WHERE %s %s ORDER BY utimestamp DESC LIMIT %d', - $secondary_join, $agent_condition, $filter, $limit diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index f0368cf79e..2552fbcdc1 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -4867,7 +4867,7 @@ function html_print_header_logo_image(bool $menuCollapsed, bool $return=false) * Key disabled: Whether to disable the input or not. * Key class: HTML class */ -function html_print_input_file($name, $return=false, $options=false) +function html_print_input_file($name, $return=false, $options=false, $inline_upload_anchor_to_form='') { $output = ''; // Start to build the input. @@ -4914,11 +4914,45 @@ function html_print_input_file($name, $return=false, $options=false) $output .= ($options['caption'] ?? __('Select a file')); $output .= ''; + + if ($inline_upload_anchor_to_form !== '') { + // Add script to submit targeted form. + $output .= ''; + $output .= '
'; + } + $output .= ' '; + + if ($inline_upload_anchor_to_form !== '') { + $output .= '
'; + $output .= html_print_button( + __('Upload'), + 'upload-icon-btn', + false, + sprintf( + 'javascript:submitForm("%s")', + $inline_upload_anchor_to_form + ), + [ + 'mode' => 'link', + 'style' => 'min-width: initial;', + ], + true, + ); + $output .= '
'; + $output .= '
'; + } + // Add script. $output .= ''; @@ -7318,6 +7353,7 @@ function html_print_select_date_range( $fields[SECONDS_1MONTH] = __('Last 30 days'); $fields['custom'] = __('Custom'); $fields['chose_range'] = __('Chose start/end date period'); + $fields['none'] = __('None'); $output = html_print_input_hidden('custom_date', $custom_date, true); $output .= '
'; @@ -7611,5 +7647,4 @@ function html_print_wizard_diagnosis( } else { echo $output; } - -} \ No newline at end of file +} diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index eab4e761d3..ce15b4b626 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -778,6 +778,13 @@ function reporting_make_reporting_data( ); break; + case 'end_of_life': + $report['contents'][] = reporting_end_of_life( + $report, + $content + ); + break; + case 'alert_report_actions': $report['contents'][] = reporting_alert_report_actions( $report, @@ -3618,6 +3625,112 @@ function reporting_agent_module_status($report, $content) } +/** + * OS Version End of Life + * + * @param array $report Info Report. + * @param array $content Info content. + * + * @return array + */ +function reporting_end_of_life($report, $content) +{ + global $config; + + $return['type'] = 'end_of_life'; + + if (empty($content['name'])) { + $content['name'] = __('End of life'); + } + + $return['title'] = io_safe_output($content['name']); + $return['landscape'] = $content['landscape']; + $return['pagebreak'] = $content['pagebreak']; + $return['subtitle'] = __('End of life report'); + $return['description'] = io_safe_output($content['description']); + $return['date'] = reporting_get_date_text($report, $content); + $return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : ''; + + $return['data'] = []; + + $external_source = json_decode( + $content['external_source'], + true + ); + + $servers_ids = [0]; + + if (is_metaconsole() === true) { + $servers_ids = array_column(metaconsole_get_servers(), 'id'); + } + + foreach ($servers_ids as $server_id) { + if (is_metaconsole() === true) { + $connection = metaconsole_get_connection_by_id($server_id); + if (metaconsole_connect($connection) != NOERR) { + continue; + } + } + + $agents = agents_get_agents( + [], + [ + 'alias', + 'direccion', + 'name', + 'os_version', + ], + 'AR', + [ + 'field' => 'nombre', + 'order' => 'ASC', + ], + false, + 0, + false, + true + ); + + $es_os_version = $external_source['os_version']; + + $es_limit_eol_datetime = DateTime::createFromFormat('Y/m/d', $external_source['end_of_life_date']); + + // Post-process returned agents to filter agents using correctly formatted fields. + foreach ($agents as $idx => $agent) { + // Must perform this query and subsequent operations in each iteration (note this is costly) since OS version field may contain HTML entities in BD and decoding can't be fully handled with mysql methods when doing a REGEXP. + $result_end_of_life = db_get_value_sql('SELECT end_of_support FROM tconfig_os_version WHERE "'.io_safe_output($agent['os_version']).'" REGEXP version AND "'.io_safe_output($agent['name']).'" REGEXP product'); + $agent_eol_datetime = DateTime::createFromFormat('Y/m/d', $result_end_of_life); + + if ((preg_match('/'.$es_os_version.'/i', $agent['os_version']) || $es_os_version === '') && $result_end_of_life !== false && ($es_limit_eol_datetime === false || $es_limit_eol_datetime >= $agent_eol_datetime)) { + // Agent matches an existing OS version. + $agents[$idx]['end_of_life'] = $result_end_of_life; + } else { + // Set agent to be filtered out. + $agents[$idx] = null; + } + } + + if ($agents !== false) { + $agents = array_filter($agents); + } + + if (is_metaconsole() === true) { + $res[$connection['server_name']] = $agents; + + metaconsole_restore_db(); + } + } + + if (is_metaconsole() === true) { + $return['data'] = $res; + } else { + $return['data'] = $agents; + } + + return reporting_check_structure_content($return); +} + + function reporting_exception( $report, $content, diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 0715b2f3f2..99f3af63ad 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -403,6 +403,10 @@ function reporting_html_print_report($report, $mini=false, $report_info=1, $cust reporting_html_agent_module_status($table, $item); break; + case 'end_of_life': + reporting_html_end_of_life($table, $item); + break; + case 'alert_report_actions': reporting_html_alert_report_actions($table, $item); break; @@ -2754,6 +2758,123 @@ function reporting_html_agent_module_status($table, $item, $pdf=0) } +/** + * Html report end of life. + * + * @param object $table Head table or false if it comes from pdf. + * @param array $item Items data. + * @param integer $pdf Pdf output. + * + * @return mixed + */ +function reporting_html_end_of_life($table, $item, $pdf=0) +{ + global $config; + + $return_pdf = ''; + + if (empty($item['data']) === true) { + if ($pdf !== 0) { + $return_pdf .= __('No items'); + } else { + $table->colspan['group_report']['cell'] = 3; + $table->cellstyle['group_report']['cell'] = 'text-align: center;'; + $table->data['group_report']['cell'] = __('No items'); + } + } else { + $table_info = new stdClass(); + $table_info->width = '99%'; + + $table_info->align = []; + + if (is_metaconsole() === true) { + $table_info->align['server'] = 'left'; + } + + $table_info->align['agent_alias'] = 'left'; + $table_info->align['ip'] = 'left'; + $table_info->align['os_type'] = 'left'; + $table_info->align['os_version'] = 'left'; + $table_info->align['end_of_life'] = 'left'; + + $table_info->headstyle = []; + + if (is_metaconsole() === true) { + $table_info->headstyle['server'] = 'text-align: left'; + } + + $table_info->headstyle['agent_alias'] = 'text-align: left'; + $table_info->headstyle['ip'] = 'text-align: left'; + $table_info->headstyle['os_type'] = 'text-align: left'; + $table_info->headstyle['os_version'] = 'text-align: left'; + $table_info->headstyle['end_of_life'] = 'text-align: left'; + + $table_info->head = []; + if (is_metaconsole() === true) { + $table_info->head['server'] = __('Server'); + } + + $table_info->head['agent_alias'] = __('Agent alias'); + $table_info->head['ip'] = __('IP'); + $table_info->head['os_type'] = __('OS Type'); + $table_info->head['os_version'] = __('OS Version'); + $table_info->head['end_of_life'] = __('End of life'); + + $table_info->data = []; + + if (is_metaconsole() === true) { + foreach ($item['data'] as $server_name => $agents_per_server) { + foreach ($agents_per_server as $agent) { + $row = []; + + $row['server'] = $server_name; + $row['agent_alias'] = $agent['alias']; + $row['ip'] = $agent['direccion']; + $row['os_type'] = $agent['name']; + $row['os_version'] = $agent['os_version']; + $date_string = date_w_fixed_tz($agent['end_of_life']); + $timestamp = strtotime($date_string); + $date_without_time = date('F j, Y', $timestamp); + $row['end_of_life'] = $date_without_time; + + $table_info->data[] = $row; + } + } + } else { + foreach ($item['data'] as $data) { + $row = []; + + $row['agent_alias'] = $data['alias']; + $row['ip'] = $data['direccion']; + $row['os_type'] = $data['name']; + $row['os_version'] = $data['os_version']; + $date_string = date_w_fixed_tz($data['end_of_life']); + $timestamp = strtotime($date_string); + $date_without_time = date('F j, Y', $timestamp); + $row['end_of_life'] = $date_without_time; + + $table_info->data[] = $row; + } + } + + if ($pdf !== 0) { + $table_info->title = $item['title']; + $table_info->titleclass = 'title_table_pdf'; + $table_info->titlestyle = 'text-align:left;'; + $return_pdf .= html_print_table($table_info, true); + } else { + $table->colspan['data']['cell'] = 3; + $table->cellstyle['data']['cell'] = 'text-align: center;'; + $table->data['data']['cell'] = html_print_table($table_info, true); + } + } + + if ($pdf !== 0) { + return $return_pdf; + } +} + + /** * Function to print to HTML Exception report. * diff --git a/pandora_console/include/functions_reports.php b/pandora_console/include/functions_reports.php index 1fe85aa92b..3da9993933 100755 --- a/pandora_console/include/functions_reports.php +++ b/pandora_console/include/functions_reports.php @@ -814,6 +814,11 @@ function reports_get_report_types($template=false, $not_editor=false) 'name' => __('Agents/Modules status'), ]; + $types['end_of_life'] = [ + 'optgroup' => __('Grouped'), + 'name' => __('End of life'), + ]; + // Only pandora managers have access to the whole database. if (check_acl($config['id_user'], 0, 'PM')) { $types['sql'] = [ diff --git a/pandora_console/install.php b/pandora_console/install.php index ae0f024382..335e6374e2 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
0) { $user_groups_fl = users_get_groups( $config['id_user'], @@ -402,6 +408,18 @@ $table->data[1][0] = html_print_label_input_block( html_print_select($fields, 'os', $os, '', 'All', 0, true) ); +$table->data[1][1] = html_print_label_input_block( + __('Operating System version').ui_print_help_tip(__('Case insensitive regular expression, e.g. Rocky.* will match the following OS version: Rocky Linux 8.7'), true), + html_print_input_text( + 'os_version_regex', + $os_version_regex, + '', + 35, + 255, + true + ) +); + if (function_exists('policies_get_policies') === true) { $pre_fields = policies_get_policies(false, ['id', 'name']); $fields = []; @@ -410,7 +428,7 @@ if (function_exists('policies_get_policies') === true) { } } -$table->data[1][1] = html_print_label_input_block( +$table->data[2][0] = html_print_label_input_block( __('Policies'), html_print_select($fields, 'policies[]', $policies, '', 'All', 0, true, true) ); @@ -452,8 +470,8 @@ foreach ($custom_fields as $custom_field) { $div_custom_fields .= '
'; } -$table->colspan[2][0] = 2; -$table->data[2][0] = ui_toggle( +$table->colspan[3][0] = 2; +$table->data[3][0] = ui_toggle( $div_custom_fields, __('Agent custom fields'), '', @@ -881,6 +899,10 @@ if ($os > 0) { $id_os_sql = ' AND id_os = '.$os; } +if ($os_version_regex !== '') { + $id_os_sql .= ' AND os_version REGEXP \''.$os_version_regex.'\''; +} + if ($all_policies === false && is_array($policies) && count($policies) > 0) { $policies_sql = ' AND tpolicy_agents.id_policy IN ('.implode(',', $policies).')'; } diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 5300bf109a..e7a20b8642 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -518,7 +518,7 @@ if (is_ajax() === true) { $tmp->evento = ui_print_truncate_text( $tmp->evento, - $config['item_title_size_text'], + 'description', false, true, false, diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index e3e07590ba..cc42d7e6ac 100755 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -58,7 +58,7 @@ $datetime_end = strtotime($date_end.' '.$time_end); // Calculate new inteval for all reports. $custom_date = get_parameter('custom_date', 0); -$date = get_parameter('date', SECONDS_1DAY); +$date = get_parameter('date', 'none'); $date_text = get_parameter('date_text', SECONDS_1DAY); $custom_date_end = ''; @@ -111,6 +111,9 @@ if ($custom_date === '1') { $first_of_week = date('Y-m-d', strtotime('monday', strtotime('last week'))); $period = (strtotime($date_end) - strtotime($first_of_week)); } +} else if ($date === 'none') { + // Prioritize the report item period based on the current local date/time. + $date_end = date('Y/m/d H:i:s'); } else { $date_end = date('Y/m/d H:i:s'); $date_start = date('Y/m/d H:i:s', (strtotime($date_end) - $date)); @@ -315,12 +318,12 @@ if ($html_menu_export === ENTERPRISE_NOT_HOOK) { if ((bool) is_metaconsole() === true) { $table2->data[0][2] = html_print_label_input_block( __('Date').' ', - html_print_select_date_range('date', true, get_parameter('date', SECONDS_1DAY), $date_init, $time_init, date('Y/m/d'), date('H:i:s'), $date_text), + html_print_select_date_range('date', true, get_parameter('date', 'none'), $date_init, $time_init, date('Y/m/d'), date('H:i:s'), $date_text), ); } else { $table2->data[0][2] = html_print_label_input_block( __('Date').' ', - html_print_select_date_range('date', true, get_parameter('date', SECONDS_1DAY), $date_init, $time_init, date('Y/m/d'), date('H:i:s'), $date_text), + html_print_select_date_range('date', true, get_parameter('date', 'none'), $date_init, $time_init, date('Y/m/d'), date('H:i:s'), $date_text), ['label_class' => 'filter_label_position_before'] ); } @@ -451,7 +454,6 @@ $(document).ready (function () { $("#string_to").show(); $('#string_from').show(); $("#string_items").hide(); - console.log($(".filter_label_position_before").html()); } else { $("#string_to").hide(); $('#string_from').hide(); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 3b3d9650e9..238b00136d 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.773.3 -%define release 230929 +%define release 231004 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 0efd967993..cad0eca679 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.773.3 -%define release 230929 +%define release 231004 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 41948dfb7e..f85963e8be 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.773.3 -%define release 230929 +%define release 231004 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index b44fb54e92..f3828b3204 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -647,6 +647,17 @@ CREATE TABLE IF NOT EXISTS `tconfig_os` ( PRIMARY KEY (`id_os`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +-- ----------------------------------------------------- +-- Table `tconfig_os_version` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `tconfig_os_version` ( + `id_os_version` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `product` TEXT, + `version` TEXT, + `end_of_support` VARCHAR(10) DEFAULT NULL, + PRIMARY KEY (`id_os_version`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + -- ----------------------------------------------------- -- Table `tcontainer` -- ----------------------------------------------------- diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 728ed3518e..22db03654e 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -2727,6 +2727,86 @@ INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES -- Insert into tdiscovery_apps_executions INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' -g '__taskGroup__' --host '_host_' --port '_port_' --user '_user_' --password '_password_' --vm '_scanVM_' --lxc '_scanLXC_' --backups '_scanBackups_' --nodes '_scanNodes_' --transfer_mode tentacle --tentacle_address '_tentacleIP_' --tentacle_port '_tentaclePort_' --as_discovery_plugin 1'); +-- Insert new EC2 APP +SET @short_name = 'pandorafms.aws.ec2'; +SET @name = 'Amazon EC2'; +SET @section = 'cloud'; +SET @description = 'Monitor AWS EC2 instances'; +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_aws_ec2'); +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec2_', 'bin/aws_ec2'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileEC2_''); + +-- Insert new RDS APP +SET @short_name = 'pandorafms.aws.rds'; +SET @name = 'Amazon RDS'; +SET @section = 'cloud'; +SET @description = 'Monitor AWS RDS instances'; +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_aws_rds'); +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec2_', 'bin/aws_rds'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileRDS_''); + +-- Insert new S3 APP +SET @short_name = 'pandorafms.aws.s3'; +SET @name = 'Amazon S3'; +SET @section = 'cloud'; +SET @description = 'Monitor AWS S3 buckets'; +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_aws_s3'); +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec2_', 'bin/aws_s3'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileS3_''); + +-- Insert new Azure APP +SET @short_name = 'pandorafms.azure.mc'; +SET @name = 'Azure Microsoft Compute'; +SET @section = 'cloud'; +SET @description = 'Monitor Azure Microsoft Compute VMs'; +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_azure_mc'); +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec2_', 'bin/azure_vm'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileAzureMC_''); + +-- Insert new Google APP +SET @short_name = 'pandorafms.gcp.ce'; +SET @name = 'Google Cloud Compute Engine'; +SET @section = 'cloud'; +SET @description = 'Monitor Google Cloud Platform Compute Engine VMs'; +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_gcp_ce'); +INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec2_', 'bin/google_instances'); + +-- Insert into tdiscovery_apps_executions +INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileGoogleCE_''); + 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\"]}]'); INSERT INTO `tsca` VALUES (5641,'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\"]}]'),(5642,'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\"]}]'),(5643,'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\"]}]'),(5644,'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\"]}]'),(5645,'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\"]}]'),(5646,'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\"]}]'),(5647,'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\"]}]'),(5648,'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\"]}]'),(5649,'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\"]}]'),(5650,'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\"]}]'),(5651,'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\"]}]'),(5652,'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\"]}]'),(5653,'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\"]}]'),(5654,'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\"]}]'),(5655,'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\"]}]'),(5656,'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\"]}]'),(5657,'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\"]}]'),(5658,'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\"]}]'),(5659,'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\"]}]'),(5660,'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\"]}]'),(5661,'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\"]}]'),(5662,'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\"]}]'),(5663,'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\"]}]'),(5664,'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\"]}]'),(5665,'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\"]}]'),(5666,'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\"]}]'),(5667,'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\"]}]'),(5668,'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\"]}]'),(5669,'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\"]}]'),(5670,'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\"]}]'),(5671,'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\"]}]'),(5672,'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\"]}]'),(5673,'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\"]}]'),(5674,'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\"]}]'),(5675,'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\"]}]'),(5676,'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\"]}]'),(5677,'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\"]}]'),(5678,'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\"]}]'),(5679,'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\"]}]'),(5680,'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\"]}]'),(6000,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6001,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6002,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6003,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6004,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6005,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6006,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6007,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6008,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6009,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6010,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6011,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6012,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6013,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6014,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6015,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6016,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6017,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6018,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6019,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6020,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6021,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6022,'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.24\"]}, {\"cis_csc\": [\"8.4\", \"8.5\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"cis_level\": [\"1\"]}]'),(6023,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6024,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6025,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6026,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6027,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6028,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6029,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6030,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6031,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6032,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6033,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6034,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6035,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6036,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6037,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6038,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6039,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6040,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6041,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6042,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6043,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6044,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6045,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6046,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6047,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6048,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6049,'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 ','[{\"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\"]}, {\"cis_level\": [\"1\"]}]'),(6050,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6051,'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.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\"]}, {\"cis_level\": [\"1\"]}]'),(6052,'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.','','Run One of the following commands to 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\"]}, {\"cis_level\": [\"1\"]}]'),(6053,'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.2\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"cis_level\": [\"1\"]}]'),(6054,'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.3\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}, {\"cis_level\": [\"1\"]}]'),(6055,' 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\"]}, {\"cis_level\": [\"1\"]}]'),(6056,' 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\"]}, {\"cis_level\": [\"1\"]}]'),(6057,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6058,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6059,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6060,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6061,'Ensure rpcbind is not installed or the rpcbind services are 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\"]}, {\"cis_level\": [\"1\"]}]'),(6062,' 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\"]}, {\"cis_level\": [\"1\"]}]'),(6063,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6064,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6065,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6066,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6067,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6068,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6069,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6070,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6071,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6072,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6073,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6074,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6075,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6076,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6077,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6078,'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.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\"]}, {\"cis_level\": [\"1\"]}]'),(6079,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6080,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6081,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6082,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6083,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6084,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6085,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6086,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6087,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6088,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6089,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6090,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6091,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6092,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6093,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6094,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6095,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6096,'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.2.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.1\"]}, {\"tsc\": [\"CC8.1\"]}, {\"cis_level\": [\"1\"]}]'),(6097,'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.2.3\", \"3.5.3.1.2\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.1\"]}, {\"tsc\": [\"CC8.1\"]}, {\"cis_level\": [\"1\"]}]'),(6098,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6099,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6100,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6101,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6102,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6103,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6104,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6105,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6106,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6107,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6108,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6109,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6110,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6111,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6112,'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.6\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2.1\"]}, {\"tsc\": [\"CC8.1\"]}, {\"cis_level\": [\"1\"]}]'),(6113,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6114,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6115,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6116,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6117,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6118,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6119,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6120,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6121,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6122,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6123,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6124,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6125,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6126,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6127,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6128,'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.12\"]}, {\"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\"]}, {\"cis_level\": [\"2\"]}]'),(6129,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6130,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6131,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6132,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6133,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6134,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6135,'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.2\"]}, {\"cis_csc\": [\"6.2\", \"6.3\"]}, {\"pci_dss\": [\"10.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}, {\"cis_level\": [\"1\"]}]'),(6136,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6137,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6138,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6139,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6140,'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.5\"]}, {\"tsc\": [\"CC6.1\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}, {\"cis_level\": [\"1\"]}]'),(6141,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6142,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6143,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6144,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6145,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6146,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6147,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6148,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6149,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6150,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6151,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6152,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6153,'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: # 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\"]}, {\"cis_level\": [\"1\"]}]'),(6154,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6155,'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.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.1\", \"CC6.7\", \"CC7.2\"]}, {\"cis_level\": [\"1\"]}]'),(6156,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6157,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6158,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6159,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6160,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6161,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6162,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6163,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6164,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6165,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6166,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6167,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6168,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6169,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6170,'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\"]}, {\"cis_level\": [\"2\"]}]'),(6171,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6172,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6173,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6174,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6175,'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.4\"]}, {\"cis_csc\": [\"16\"]}, {\"pci_dss\": [\"8.2.5\"]}, {\"tsc\": [\"CC6.1\"]}, {\"cis_level\": [\"1\"]}]'),(6176,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6177,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6178,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6179,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6180,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6181,' 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\"]}, {\"cis_level\": [\"1\"]}]'),(6182,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6183,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6184,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6185,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6186,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6187,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6188,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6189,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6190,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6191,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6192,'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.','','If any accounts in the /etc/passwd file 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\"]}, {\"cis_level\": [\"1\"]}]'),(6193,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6194,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6195,'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\"]}, {\"cis_level\": [\"1\"]}]'),(6500,'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\"]}]'),(6501,'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\"]}]'),(6502,'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\"]}]'),(6503,'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\"]}]'),(6504,'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\"]}]'),(6505,'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\"]}]'),(6506,'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\"]}]'),(6507,'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\"]}]'),(6508,'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\"]}]'),(6509,'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\"]}]'),(6510,'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\"]}]'),(6511,'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\"]}]'),(6512,'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\"]}]'),(6513,'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\"]}]'),(6514,'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\"]}]'),(6515,'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\"]}]'),(6516,'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\"]}]'),(6517,'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\"]}]'),(6518,'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\"]}]'),(6519,'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\"]}]'),(6520,'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\"]}]'),(6521,'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\"]}]'),(6522,'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.2\"]}, {\"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\"]}]'),(6523,'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\"]}]'),(6524,'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\"]}]'),(6525,'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\"]}]'),(6526,'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\"]}]'),(6527,'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\"]}]'),(6528,'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\"]}]'),(6529,'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\"]}]'),(6530,'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\"]}]'),(6531,'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\"]}]'),(6532,'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\"]}]'),(6533,'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\"]}]'),(6534,'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\"]}]'),(6535,'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\"]}]'),(6536,'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\"]}]'),(6537,'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\"]}]'),(6538,'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\"]}]'),(6539,'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\"]}]'),(6540,'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\"]}]'),(6541,'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\"]}]'),(6542,'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\"]}]'),(6543,'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\"]}]'),(6544,'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\"]}]'),(6545,'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\"]}]'),(6546,'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\"]}]'),(6547,'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\"]}]'),(6548,'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\"]}]'),(6549,'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\"]}]'),(6550,'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\"]}]'),(6551,'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\"]}]'),(6552,'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\"]}]'),(6553,'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\"]}]'),(6554,'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\"]}]'),(6555,'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\"]}]'),(6556,'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\"]}]'),(6557,'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\"]}]'),(6558,'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\"]}]'),(6559,'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\"]}]'),(6560,'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\"]}]'),(6561,'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\"]}]'),(6562,'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\"]}]'),(6563,'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\"]}]'),(6564,'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\"]}]'),(6565,'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\"]}]'),(6566,'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\"]}]'),(6567,'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\"]}]'),(6568,'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\"]}]'),(6569,'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\"]}]'),(6570,'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\"]}]'),(6571,'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\"]}]'),(6572,'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\"]}]'),(6573,'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\"]}]'),(6574,'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\"]}]'),(6575,'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\"]}]'),(6576,'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\"]}]'),(6577,'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\"]}]'),(6578,'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\"]}]'),(6579,'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\"]}]'),(6580,'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\"]}]'),(6581,'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\"]}]'),(6582,'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\"]}]'),(6583,'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\"]}]'),(6584,'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\"]}]'),(6585,'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\"]}]'),(6586,'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\"]}]'),(6587,'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\"]}]'),(6588,'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\"]}]'),(6589,'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\"]}]'),(6590,'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\"]}]'),(6591,'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\"]}]'),(6592,'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.6\"]}, {\"cis_csc\": [\"9.4\"]}, {\"pci_dss\": [\"1.2\"]}, {\"tsc\": [\"CC6.6\"]}]'),(6593,'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\"]}]'),(6594,'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\"]}]'),(6595,'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\"]}]'),(6596,'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\"]}]'),(6597,'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\"]}]'),(6598,'Configure IPv4 iptables','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\"]}]'),(6599,'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\"]}]'),(6600,'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\"]}]'),(6601,'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\"]}]'),(6602,'Ensure wireless interfaces are disabled','Wireless networking is used when wired networks are unavailable. CentOS 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\"]}]'),(6603,'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\"]}]'),(6604,'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\"]}]'),(6605,'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\"]}]'),(6606,'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\"]}]'),(6607,'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\"]}]'),(6608,'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\"]}]'),(6609,'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\"]}]'),(6610,'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\"]}]'),(6611,'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\"]}]'),(6612,'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\"]}]'),(6613,'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\"]}]'),(6614,'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\"]}]'),(6615,'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\"]}]'),(6616,'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\"]}]'),(6617,'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\"]}]'),(6618,'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\"]}]'),(6619,'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\"]}]'),(6620,'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\"]}]'),(6621,'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\"]}]'),(6622,'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\"]}]'),(6623,'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\"]}]'),(6624,'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\"]}]'),(6625,'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\"]}]'),(6626,'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\"]}]'),(6627,'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\"]}]'),(6628,'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\"]}]'),(6629,'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\"]}]'),(6630,'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\"]}]'),(6631,'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.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\"]}]'),(6632,'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\"]}]'),(6633,'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\"]}]'),(6634,'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\"]}]'),(6635,'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\"]}]'),(6636,'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\"]}]'),(6637,'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\"]}]'),(6638,'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\"]}]'),(6639,'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\"]}]'),(6640,'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\"]}]'),(6641,'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\"]}]'),(6642,'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\"]}]'),(6643,'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\"]}]'),(6644,'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\"]}]'),(6645,'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\"]}]'),(6646,'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\"]}]'),(6647,'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\"]}]'),(6648,'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\"]}]'),(6649,'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\"]}]'),(6650,'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\"]}]'),(6651,'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\"]}]'),(6652,'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\"]}]'),(6653,'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\"]}]'),(6654,'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\"]}]'),(6655,'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\"]}]'),(6656,'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\"]}]'),(6657,'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\"]}]'),(6658,'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\"]}]'),(6659,'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\"]}]'),(6660,'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\"]}]'),(6661,'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\"]}]'),(6662,'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\"]}]'),(6663,'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\"]}]'),(6664,'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\"]}]'),(6665,'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\"]}]'),(6666,'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\"]}]'),(6667,'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\"]}]'),(6668,'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\"]}]'),(6669,'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\"]}]'),(6670,'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\"]}]'),(6671,'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\"]}]'),(6672,'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\"]}]'),(6673,'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\"]}]'),(6674,'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.3\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(6675,'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.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(6676,'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.5\"]}, {\"cis_csc\": [\"16.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(6677,'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.6\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(6678,'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.7\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(6679,'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.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(6680,'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.9\"]}, {\"cis_csc\": [\"16.4\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}, {\"tsc\": [\"CC5.2\"]}]'),(6681,'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\"]}]'),(6682,'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\"]}]'),(6683,'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\"]}]'),(6684,'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\"]}]'),(6685,'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\"]}]'),(7000,'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\"]}]'),(7001,'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','[{\"cis\": [\"1.1.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7002,'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\"]}]'),(7003,'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\"]}]'),(7004,'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\"]}]'),(7005,'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\"]}]'),(7006,'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.3\"]}]'),(7007,'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\"]}]'),(7008,'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. See the fstab(5) manual page for more information. # mount -o remount,nodev /home. Notes: The actions in this recommendation refer to the /home partition, which is the default user partition that is defined. If you have created other user partitions, it is recommended that the Remediation and Audit steps be applied to these partitions as well.','[{\"cis\": [\"1.1.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7009,'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\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7010,'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\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7011,'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\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7012,'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. The result is an <encrypted-password>. Copy and paste the <encrypted-password> into the global section of /boot/grub/menu.lst: password --md5 <encrypted-password> 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.4.2\"]}, {\"cis_csc\": [\"5.1\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7013,'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. 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\"]}]'),(7014,'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\"]}]'),(7015,'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 and chargen-udp : # chkconfig chargen off # chkconfig chargen-udp off','[{\"cis\": [\"2.1.1\"]}, {\"cis_csc\": [\"9.1\"]}]'),(7016,'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 - and daytime-udp: # chkconfig daytime-off # chkconfig daytime-udp off','[{\"cis\": [\"2.1.2\"]}, {\"cis_csc\": [\"9.1\"]}]'),(7017,'Ensure discard services are 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.','','Run the following commands to disable discard and discard-udp: # chkconfig discard off # chkconfig discard-udp off','[{\"cis\": [\"2.1.3\"]}, {\"cis_csc\": [\"9.1\"]}]'),(7018,'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 and echo-udp: # chkconfig echo off # chkconfig echo-udp off','[{\"cis\": [\"2.1.4\"]}, {\"cis_csc\": [\"9.1\"]}]'),(7019,'Ensure time services are not enabled','timeis 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 and time-udp: # chkconfig time off # chkconfig time-udp off','[{\"cis\": [\"2.1.5\"]}, {\"cis_csc\": [\"9.1\"]}]'),(7020,'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 rexec off # chkconfig rlogin off # chkconfig rsh off','[{\"cis\": [\"2.1.6\"]}, {\"cis_csc\": [\"3.4\", \"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7021,'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\"]}]'),(7022,'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\": [\"3.4\", \"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7023,'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 atftp 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\"]}]'),(7024,'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 rsyncd : # chkconfig rsyncd off','[{\"cis\": [\"2.1.10\", \"2.2.17\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7025,'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://tools.ietf.org/html/rfc958. 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 limited nomodify notrap nopeer noquery restrict -6 default kod limited nomodify notrap nopeer noquery Add or edit server or pool lines to /etc/ntp.conf as appropriate: server <remote-server> Add or edit the NTPD_OPTIONS in /etc/sysconfig/ntp to include '-u ntp:ntp': NTPD_OPTIONS='-u ntp:ntp'','[{\"cis\": [\"2.2.1.2\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7026,'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: # zypper remove xorg-x11*','[{\"cis\": [\"2.2.2\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7027,'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\"]}]'),(7028,'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\"]}]'),(7029,'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 : # chkconfig nfs off # chkconfig rpcbind off','[{\"cis\": [\"2.2.7\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7030,'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\"]}]'),(7031,'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 Notes: Additional FTP servers also exist and should be audited.','[{\"cis\": [\"2.2.9\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7032,'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. Notes: Several httpd servers exist and can use other service names. apache, apache2, lighttpd, and nginx are example services that provide an HTTP server. These and other services should also be audited.','','Run the following command to disable apache2 : # chkconfig apache2 off','[{\"cis\": [\"2.2.10\"]}, {\"cis_csc\": [\"9.1\"]}]'),(7033,'Ensure IMAP and POP3 server is not enabled','cyrus is an open source IMAP and POP3 server for Linux based systems.','Unless POP3 and/or IMAP servers are to be provided by this system, it is recommended that the service be disabled to reduce the potential attack surface.','','Run the following command to disable cyrus : # chkconfig cyrus off Notes: Several IMAP/POP3 servers exist and can use other service names. dovecot is an example service that provides an IMAP/POP3 server. These and other services should also be audited.','[{\"cis\": [\"2.2.11\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7034,'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\"]}]'),(7035,'Ensure HTTP Proxy Server is not enabled','Squid is a standard proxy server used in many environments.','If there is no need for a proxy server, it is recommended that the squid proxy be disabled to reduce the potential attack surface.','','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\"]}]'),(7036,'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 Notes: Additional methods of disabling a service exist. Consult your distribution documentation for appropriate methods.','[{\"cis\": [\"2.2.14\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7037,'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\"]}]'),(7038,'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 : # zypper remove ypbind','[{\"cis\": [\"2.3.1\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7039,'Ensure IPv4 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\"]}]'),(7040,'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\"]}]'),(7041,'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\"]}]'),(7042,'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.','[{\"cis\": [\"3.2.2\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7043,'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\"]}]'),(7044,'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\"]}]'),(7045,'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 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\"]}]'),(7046,'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\"]}]'),(7047,'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\"]}]'),(7048,'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 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\"]}]'),(7049,'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\"]}]'),(7050,'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. 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\": [\"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\"]}]'),(7051,'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\"]}]'),(7052,'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\"]}]'),(7053,'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\"]}]'),(7054,'Ensure SSH root login is disabled','The PermitRootLogin parameter specifies if the root user can log in using ssh(1). The default is no.','The PermitRootLogin parameter specifies if the root user can log in using ssh(1). The default is no. Rationale: 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\"]}]'),(7055,'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\"]}]'),(7056,'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\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(7057,'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\": [\"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\"]}]'),(7500,'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 or the systemd tmp.mount service as appropriate.','[{\"cis\": [\"1.1.2\"]}]'),(7501,'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','[{\"cis\": [\"1.1.3\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7502,'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\"]}]'),(7503,'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\"]}]'),(7504,'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\"]}]'),(7505,'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\"]}]'),(7506,'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.3\"]}]'),(7507,'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\"]}]'),(7508,'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. See the fstab(5) manual page for more information. # mount -o remount,nodev /home. Notes: The actions in this recommendation refer to the /home partition, which is the default user partition that is defined. If you have created other user partitions, it is recommended that the Remediation and Audit steps be applied to these partitions as well.','[{\"cis\": [\"1.1.14\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7509,'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 Notes: /dev/shm is not specified in /etc/fstab despite being mounted by default. The following line will implement the recommended /dev/shm mount options in /etc/fstab: tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0. Notes: /dev/shm is not specified in /etc/fstab despite being mounted by default. The following line will implement the recommended /dev/shm mount options in /etc/fstab: tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0','[{\"cis\": [\"1.1.15\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7510,'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 Notes: /dev/shm is not specified in /etc/fstab despite being mounted by default. The following line will implement the recommended /dev/shm mount options in /etc/fstab: tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0. Notes: /dev/shm is not specified in /etc/fstab despite being mounted by default. The following line will implement the recommended /dev/shm mount options in /etc/fstab: tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0','[{\"cis\": [\"1.1.16\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7511,'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 Notes: /dev/shm is not specified in /etc/fstab despite being mounted by default. The following line will implement the recommended /dev/shm mount options in /etc/fstab: tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0. Notes: /dev/shm is not specified in /etc/fstab despite being mounted by default. The following line will implement the recommended /dev/shm mount options in /etc/fstab: tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0','[{\"cis\": [\"1.1.17\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7512,'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\"]}]'),(7513,'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\"]}]'),(7514,'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 and chargen-udp : # chkconfig chargen off # chkconfig chargen-udp off','[{\"cis\": [\"2.1.1\"]}, {\"cis_csc\": [\"9.1\"]}]'),(7515,'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 and daytime-udp: # chkconfig daytime off # chkconfig daytime-udp off','[{\"cis\": [\"2.1.2\"]}, {\"cis_csc\": [\"9.1\"]}]'),(7516,'Ensure discard services are 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.','','Run the following commands to disable discard and discard-udp: # chkconfig discard off # chkconfig discard-udp off','[{\"cis\": [\"2.1.3\"]}, {\"cis_csc\": [\"9.1\"]}]'),(7517,'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 and echo-udp: # chkconfig echo off # chkconfig echo-udp off','[{\"cis\": [\"2.1.4\"]}, {\"cis_csc\": [\"9.1\"]}]'),(7518,'Ensure time services are not enabled','timeis 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 and time-udp: # chkconfig time off # chkconfig time-udp off','[{\"cis\": [\"2.1.5\"]}, {\"cis_csc\": [\"9.1\"]}]'),(7519,'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 rexec off # chkconfig rlogin off # chkconfig rsh off','[{\"cis\": [\"2.1.6\"]}, {\"cis_csc\": [\"3.4\", \"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7520,'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\"]}]'),(7521,'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\": [\"3.4\", \"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7522,'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 atftp 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: # systemctl disable atftpd','[{\"cis\": [\"2.1.9\", \"2.2.17\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7523,'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 rsyncd: # systemctl disable rsyncd','[{\"cis\": [\"2.1.10\", \"2.2.18\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7524,'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 : # systemctl disable xinetd','[{\"cis\": [\"2.1.11\"]}, {\"cis_csc\": [\"9.1\"]}]'),(7525,'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://tools.ietf.org/html/rfc958. 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 limited nomodify notrap nopeer noquery restrict -6 default kod limited nomodify notrap nopeer noquery Add or edit server or pool lines to /etc/ntp.conf as appropriate: server <remote-server> Add or edit the NTPD_OPTIONS in /etc/sysconfig/ntp to include '-u ntp:ntp': NTPD_OPTIONS='-u ntp:ntp'','[{\"cis\": [\"2.2.1.2\"]}, {\"cis_csc\": [\"6.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7526,'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: # zypper remove xorg-x11*','[{\"cis\": [\"2.2.2\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7527,'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 disable avahi-daemon','[{\"cis\": [\"2.2.3\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7528,'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 disable dhcpd','[{\"cis\": [\"2.2.5\"]}, {\"cis_csc\": [\"9.1\"]}]'),(7529,'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 # systemctl disable rpcbind','[{\"cis\": [\"2.2.7\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7530,'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 disable named','[{\"cis\": [\"2.2.8\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7531,'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 disable vsftpd Notes: Additional FTP servers also exist and should be audited.','[{\"cis\": [\"2.2.9\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7532,'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 apache2 : # systemctl disable apache2 Notes: Several httpd servers exist and can use other service names. apache, apache2, lighttpd, and nginx are example services that provide an HTTP server. These and other services should also be audited.','[{\"cis\": [\"2.2.10\"]}, {\"cis_csc\": [\"9.1\"]}]'),(7533,'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 disable dovecot Notes: Several IMAP/POP3 servers exist and can use other service names. cyrus-imap is an example service that provides an IMAP/POP3 server. These and other services should also be audited.','[{\"cis\": [\"2.2.11\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7534,'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 disable smb','[{\"cis\": [\"2.2.12\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7535,'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 disable squid Notes: Several HTTP proxy servers exist. These and other services should be checked.','[{\"cis\": [\"2.2.13\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7536,'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 Notes: Additional methods of disabling a service exist. Consult your distribution documentation for appropriate methods.','[{\"cis\": [\"2.2.14\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.2\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7537,'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 disable ypserv','[{\"cis\": [\"2.2.16\"]}, {\"cis_csc\": [\"9.1\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7538,'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 : # zypper remove ypbind','[{\"cis\": [\"2.3.1\"]}, {\"cis_csc\": [\"2\"]}, {\"pci_dss\": [\"2.2.3\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7539,'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\"]}]'),(7540,'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\"]}]'),(7541,'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\"]}]'),(7542,'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.','[{\"cis\": [\"3.2.2\"]}, {\"cis_csc\": [\"3\", \"11\"]}, {\"pci_dss\": [\"2.2.4\"]}, {\"nist_800_53\": [\"CM.1\"]}]'),(7543,'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\"]}]'),(7544,'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\"]}]'),(7545,'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 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\"]}]'),(7546,'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\"]}]'),(7547,'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\"]}]'),(7548,'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 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\"]}]'),(7549,'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\"]}]'),(7550,'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. 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\": [\"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\"]}]'),(7551,'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\"]}]'),(7552,'Ensure SSH IgnoreRhosts is enabled','The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication.','Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes','','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\"]}]'),(7553,'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\"]}]'),(7554,'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\"]}]'),(7555,'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\"]}]'),(7556,'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\": [\"CC6.1\", \"CC6.8\", \"CC7.2\", \"CC7.3\", \"CC7.4\"]}]'),(7557,'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\": [\"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\"]}]'),(8000,'Disable Local-only Graphical Login Environment','The graphical login service provides the capability of logging into the system using an X- windows type interface from the console. If graphical login access for the console is required, leave the service in local-only mode.','This service should be disabled if it is not required.','','To disable this service, run the following command: # svcadm disable svc:/application/graphical-login/gdm:default','[{\"cis\": [\"2.1\"]}]'),(8001,'Configure sendmail Service for Local-Only Mode','In Solaris 11, the sendmail service is set to local only mode by default. This means that users on remote systems cannot connect to the sendmail service, eliminating the possibility of a remote exploit attack against some future sendmail vulnerability. Leaving sendmail in local-only mode permits mail to be sent out from the local system. If the local system will not be processing or sending any mail, this service can be disabled. However, if sendmail is disabled completely, email messages sent to the root account (such as cron job output or audit service warnings) will fail to be delivered. An alternative approach is to disable the sendmail service and create a cron job to process all mail that is queued on the local system, sending it to a relay host defined in the sendmail.cf file. It is recommended that sendmail be left in local-only mode unless there is a specific requirement to completely disable it.','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.','','Run the following to set sendmail to listen only local interfaces: # svccfg -v -s svc:/network/smtp:sendmail setprop config/local_only=false # svcadm refresh sendmail # svcadm restart sendmail','[{\"cis\": [\"2.2\"]}]'),(8002,'Disable RPC Encryption Key','The keyserv service is only required for sites that are using the Secure RPC mechanism. The most common use for Secure RPC on Solaris machines is "secure NFS", which uses the Secure RPC mechanism to provide higher levels of security than the standard NFS protocols. ("Secure NFS" is unrelated to Kerberos authentication as a mechanism for providing higher levels of NFS security. "Kerberized" NFS does not require the keyserv service to be running.)','This service should be disabled if it is not required.','','To disable this service, run the following command: # svcadm disable svc:/network/rpc/keyserv','[{\"cis\": [\"2.3\"]}]'),(8003,'Disable NIS Server Services','The NIS server software is not installed by default and is only required on systems that are acting as an NIS server for the local site. Typically there are only a small number of NIS servers on any given network. These services are disabled by default unless the system has been previously configured to act as a NIS server.','As RPC-based services such as NIS may use non-secure authentication and share sensitive network object information with systems and applications using RPC-based services, this service should be disabled. Users are encouraged to use LDAP as a name service in place of NIS.','','To disable this service, run the following commands: # svcadm disable svc:/network/nis/server # svcadm disable svc:/network/nis/domain','[{\"cis\": [\"2.4\"]}]'),(8004,'Disable NIS Client Services','If the local site is not using the NIS naming service to distribute system and user configuration information, this service may be disabled. This service is disabled by default unless the NIS service has been installed and configured on the system.','As RPC-based services such as NIS may use non-secure authentication and share sensitive network object information with systems and applications using RPC-based service, NIS client daemons should be disabled. Users are encouraged to use LDAP as a name service in place of NIS.','','To disable this service, run the following commands: # svcadm disable svc:/network/nis/client # svcadm disable svc:/network/nis/domain','[{\"cis\": [\"2.5\"]}]'),(8005,'Disable Kerberos TGT Expiration Warning','The Kerberos TGT warning service is used to warn users when their Kerberos tickets are about expire or to renew those tickets before they expire. This service is not used if Kerberos has not been configured. This service is configured to be "local only" by default.','This service should be disabled if it is not required.','','To disable this service, run the following command: # svcadm disable svc:/network/security/ktkt_warn','[{\"cis\": [\"2.6\"]}]'),(8006,'Disable Generic Security Services (GSS)','The GSS API is a security abstraction layer that is designed to make it easier for developers to integrate with different authentication schemes. It is most commonly used in applications for sites that use Kerberos for network authentication, though it can also allow applications to interoperate with other authentication schemes.','GSS does not expose anything external to the system as it is configured to use TLI (protocol = ticotsord) by default. This service should be disabled if it is not required.','','To disable this service, run the following command: # svcadm disable svc:/network/rpc/gss','[{\"cis\": [\"2.7\"]}]'),(8007,'Disable Removable Volume Manager','The HAL-aware removable volume manager in the Solaris 11 OS automatically mounts external devices for users whenever the device is attached to the system. These devices include CD-R, CD-RW, floppies, DVD, USB and 1394 mass storage devices. See the rmvolmgr(1M) manual page for more details.','Allowing users to mount and access data from removable media devices makes it easier for malicious programs and data to be imported onto the network. It also introduces the risk that sensitive data may be transferred off the system without a log record. By adding rmvolmgr to the .xinitrc file, user-isolated instances of rmvolmgr can be run via a session startup script. In such cases, the rmvolmgr instance will not allow management of volumes that belong to other than the owner of the startup script. When a user logs onto the workstation console (/dev/console), any instance of user-initiated rmvolmgr will only own locally connected devices, such as CD-ROMs or flash memory hardware, locally connected to USB or FireWire ports.','','To disable this service, run the following commands: # svcadm disable svc:/system/filesystem/rmvolmgr # svcadm disable svc:/network/rpc/smserver','[{\"cis\": [\"2.8\"]}]'),(8008,'Disable automount Service','The automount daemon is normally used to automatically mount NFS file systems from remote file servers when needed. However, the automount daemon can also be configured to mount local (loopback) file systems as well, which may include local user home directories, depending on the system configuration.','This service should be disabled if it is not required.','','To disable this service, run the following command: # svcadm disable svc:/system/filesystem/autofs','[{\"cis\": [\"2.9\"]}]'),(8009,'Disable Apache Service','The Apache service provides an instance of the Apache web server.','This service should be disabled if it is not required.','','To disable this service, run the following command: # svcadm disable svc:/network/http:apache22','[{\"cis\": [\"2.10\"]}]'),(8010,'Disable Local-only RPC Port Mapping Service','Remote Procedure Call (RPC) is used by many services within the Solaris 11 operating system. Some of these services allow external connections to use the service (e.g. NFS, NIS). By default, the Solaris 11 OS configures this service to be local only.','RPC-based services typically have weak or non-existent authentication and yet may share very sensitive information, which is vulnerable to network traffic sniffers. Unless one of these services is required on this host, RPC-based tools should be fully disabled.','','To disable this service, run the following command: # svcadm disable svc:/network/rpc/bind. If the goal is to restrict access to this service, but not disable it completely, consider using a host-based firewall such as ipfilter(5) to control what hosts are allowed to access this service. Alternatively, TCP Wrappers support, which controls host access and connection auditing, can be enabled. TCP Wrappers is discussed in the next section.','[{\"cis\": [\"2.11\"]}]'),(8011,'Configure TCP Wrappers','TCP Wrappers is a host-based access control system that allows administrators to control who has access to various network services based on the IP address of the remote end of the connection. TCP Wrappers also provide logging information via syslog about both successful and unsuccessful connections.','TCP Wrappers provides granular control over what services can be accessed over the network. Its logs show attempted access to services from non-authorized systems, which can help identify unauthorized access attempts.','','To enable TCP Wrappers, run the following commands: 1. Create and customize your policy in /etc/hosts.allow: # echo "ALL: <net>/<mask>, <net/<mask>, ..." > /etc/hosts.allow. Where each <net>/<mask> combination (for example, the Class C address block "192.168.1.0/255.255.255.0") can represent one network block in use by your organization that requires access to this system. 2) Create a default deny policy in /etc/hosts.deny: # echo "ALL: ALL" >/etc/hosts.deny. 3) Enable TCP Wrappers for all services started by inetd: # inetadm -M tcp_wrappers=TRUE - To protect only specific inetd services, use the command: # inetadm -m [FMRI] tcp_wrappers=TRUE. To enable TCP Wrappers for the RPC port mapping service, use the commands: # svccfg -s rpc/bind setprop config/enable_tcpwrappers=true # svcadm refresh rpc/bind. The versions of SSH and sendmail that ship with Solaris 11 will automatically use TCP Wrappers to filter access if a hosts.allow or hosts.deny file exists. To protect UDP and RPC-based services that are spawned from inetd, consider implementing a host-based firewall such as Solaris IP Filter. See ipfilter(5) for more information.','[{\"cis\": [\"2.12\"]}]'),(8012,'Disable Telnet Service','The telnet daemon, which accepts connections from users from other systems via the telnet protocol and can be used for remote shell access.','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 protocol provides an encrypted session and stronger security.','','Disable telnet server if enabled: # svcadm disable svc:/network/telnet','[{\"cis\": [\"2.13\"]}]'),(8013,'Restrict Core Dumps to Protected Directory','The action described in this section creates a protected directory to store core dumps and also causes the system to create a log entry whenever a regular process dumps core.','Core dumps, particularly those from set-UID and set-GID processes, may contain sensitive data.','','To implement the recommendation, run the commands: # chmod 700 /var/cores # coreadm -g /var/cores/core_%n_%f_%u_%g_%t_%p -e log -e global -e global-setid -d process -d proc-setid If the local site chooses, dumping of core files can be completely disabled with the following command: # coreadm -d global -d global-setid -d process -d proc-setid','[{\"cis\": [\"3.1\"]}]'),(8014,'Enable Stack Protection','Buffer overflow exploits have been the basis for many highly publicized compromises and defacements of large numbers of Internet connected systems. Many of the automated tools in use by system attackers exploit well-known buffer overflow problems in vendor- supplied and third party software.','Enabling stack protection prevents certain classes of buffer overflow attacks and is a significant security enhancement. However, this does not protect against buffer overflow attacks that do not execute code on the stack (such as return-to-libc exploits). While most of the Solaris OS is already configured to employ a non-executable stack, this setting is still recommended to provide a more comprehensive solution for both Solaris and other software that may be installed.','','To enable stack protection and block stack-smashing attacks, run the following to edit the /etc/system file: # if [ ! "`grep noexec_user_stack= /etc/system`" ]; then cat <<END_CFG >>/etc/system set noexec_user_stack=1 set noexec_user_stack_log=1 END_CFG fi','[{\"cis\": [\"3.2\"]}]'),(8015,'Enable Strong TCP Sequence Number Generation','The variable TCP_STRONG_ISS defines the mechanism used for TCP initial sequence number generation. If an attacker can predict the next sequence number, it is possible to inject fraudulent packets into the data stream to hijack the session.','The RFC 1948 method is widely accepted as the strongest mechanism for TCP packet generation. This makes remote session hijacking attacks more difficult, as well as any other network-based attack that relies on predicting TCP sequence number information. It is theoretically possible that there may be a small performance hit in connection setup time when this setting is used, but there are no publicly available benchmarks that establish this.','','Run the following commands to set the TCP_STRONG_ISS parameter to use RFC 1948 sequence number generation in the /etc/default/inetinit file: # cd /etc/default # awk '/TCP_STRONG_ISS=/ { $1 = "TCP_STRONG_ISS=2" }; { print }' inetinit > inetinit.CIS # mv inetinit.CIS inetinit To set the TCP_STRONG_ISS parameter on a running system, use the command: # ipadm set-prop -p _strong_iss=2 tcp','[{\"cis\": [\"3.3\"]}]'),(8016,'Create CIS Audit Class','To group a set of related audit events, the Solaris Audit service provides the ability for sites to define their own audit classes that contain just those events that the site wants to audit.','To simplify administration, a CIS specific audit class should be created.','','To create the CIS audit class, edit the /etc/security/audit_class file and add the following entry before the last line of the file: 0x0100000000000000:cis:CIS Solaris Benchmark','[{\"cis\": [\"4.1\"]}]'),(8017,'Enable Auditing of Incoming Network Connections','The Solaris Audit service can be configured to record incoming network connections to any listening service running on the system.','This recommendation will provide an audit trail that contains information related to incoming network connections. While this functionality can be enabled using service- specific mechanisms, using the Solaris Audit service provides a more centralized and complete window into incoming network activity.','','To enforce this setting, edit the /etc/security/audit_event file and add the cis audit class to the following audit events: AUE_ACCEPT AUE_CONNECT AUE_SOCKACCEPT AUE_SOCKCONNECT AUE_inetd_connect','[{\"cis\": [\"4.2\"]}]'),(8018,'Enable Auditing of File Metadata Modification Events','The Solaris Audit service can be configured to record file metadata modification events for every process running on the system. This will allow the auditing service to determine when file ownership, permissions and related information is changed.','This recommendation will provide an audit trail that contains information related to changes of file metadata. The Solaris Audit service is used to provide a more centralized and complete window into activities such as these.','','To enforce this setting, edit the /etc/security/audit_event file and add the cis audit class to the following audit events: AUE_CHMOD AUE_CHOWN AUE_FCHOWN AUE_FCHMOD AUE_LCHOWN AUE_ACLSET AUE_FACLSET','[{\"cis\": [\"4.3\"]}]'),(8019,'Enable Auditing of Process and Privilege Events','The Solaris Audit service can be configured to record the use of privileges by processes running on the system. This will capture events such as the setting of UID and GID values, setting of privileges, as well as the use of functionality such as chroot(2).','This recommendation will provide an audit trail that contains information related to the use of privileges by processes running on the system. The Solaris Audit service is used to provide a more centralized and complete window into activities such as these.','','To enforce this setting, edit the /etc/security/audit_event file and add the cis audit class to the following audit events: AUE_CHROOT AUE_SETREUID AUE_SETREGID AUE_FCHROOT AUE_PFEXEC AUE_SETUID AUE_NICE AUE_SETGID AUE_PRIOCNTLSYS AUE_SETEGID AUE_SETEUID AUE_SETPPRIV AUE_SETSID AUE_SETPGID','[{\"cis\": [\"4.4\"]}]'),(8020,'Configure Solaris Auditing','Solaris auditing service keeps a record of how a system is being used. Solaris auditing can be configured to record different classes of events based upon site policy. This recommendation will set and verify a consensus-developed auditing policy. That said, all organizations are encouraged to tailor this policy based upon their specific needs. For more information on the Solaris auditing service including how to filter and view events, see the Oracle Solaris product documentation. The "cis" class is a "custom class" that CIS recommends creating that includes specifically those events that are of interest (defined in the sections above). In addition to those events, this recommendation also includes auditing of login and logout (lo) events, administrative (ad) events, file transfer (ft) events, and command execution (ex) events. This recommendation also configures the Solaris auditing service to capture and report command line arguments (for command execution events) and the zone name in which a command was executed (for global and non-global zones). Further, this recommendation sets a disk utilization threshold of 1%. If this threshold is crossed (for the volume that includes /var/audit), then a warning e-mail will be sent to advise the system administrators that audit events may be lost if the disk becomes full. Finally, this recommendation will also ensure that new audit trails are created at the start of each new day (to help keep the size of the files small to facilitate analysis).','The consensus settings described in this section are an effort to log interesting system events without consuming excessive amounts of resources logging significant but usually uninteresting system calls.','','To enforce this setting, use the command: # auditconfig -conf # auditconfig -setflags lo,ad,ft,ex,cis # auditconfig -setnaflags lo # auditconfig -setpolicy cnt,argv,zonename # auditconfig -setplugin audit_binfile active p_minfree=1 # audit -s # rolemod -K audit_flags=lo,ad,ft,ex,cis:no root # EDITOR=ed crontab -e root << END_CRON $ a 0 * * * * /usr/sbin/audit -n . w q END_CRON # chown root:root /var/audit # chmod 750 /var/audit','[{\"cis\": [\"4.5\"]}]'),(8021,'Default Service File Creation Mask','The default system file creation mask applies to processes that are started by init - including most system services. To ensure that files are not created with write access to anyone other than their owner, the default file creation mask should be set to 022. Some sites with more stringent security requirements may prefer to set this value to 077 to eliminate all permissions for group and world. Note that changing this value from the Solaris default of 022 may negatively impact services that may not be able to operate with a stricter setting.','The default file creation mask should be set to 022 to avoid unnecessarily giving files write access to group or world.','','Perform the following to implement the recommended state: # svccfg -s svc:/system/environment:init setprop umask/umask = astring: "022"','[{\"cis\": [\"5.1\"]}]'),(8022,'Disable "nobody" Access for RPC Encryption Key Storage Service','This action listed prevents keyserv from using default keys for the nobody user, effectively stopping the nobody user from accessing information via Secure RPC.','If login by the user nobody is allowed for secure RPC, there is an increased risk of system compromise. If keyserv holds a private key for the nobody user, it will be used by key_encryptsession to compute a magic phrase which can be easily recovered by a malicious user.','','Perform the following to implement the recommended state: # cd /etc/default # awk '/ENABLE_NOBODY_KEYS=/ { $1 = "ENABLE_NOBODY_KEYS=NO" } { print }' keyserv > keyserv.CIS # mv keyserv.CIS keyserv','[{\"cis\": [\"6.2\"]}]'),(8023,'Disable X11 Forwarding for SSH','The 'X11 Forwarding' parameter defined within the /etc/ssh/sshd_config file specifies whether or not X11 Forwarding via SSH is enabled on the server: The Secure Shell service provides an encrypted 'tunnel' for the data traffic passing through it. While commonly used to substitute for clear-text, CLI-based remote connections such as telnet, Secure Shell can be used to forward an 'X Window' session through the encrypted tunnel, allowing the remote user to have a GUI interface.','As enabling X11Forwarding on the host can permit a malicious user to secretly open another X11 connection to another remote client during the session and perform unobtrusive activities such as keystroke monitoring, if the X11 services are not required for the system's intended function, it should be disabled or restricted as appropriate to the user's needs.','','Perform the following to implement the recommended state: # awk '/^X11Forwarding / { $2 = "no" } { print }' /etc/ssh/sshd_config > /etc/ssh/sshd_config.CIS # mv /etc/ssh/sshd_config.CIS /etc/ssh/sshd_config # svcadm restart svc:/network/ssh','[{\"cis\": [\"6.3\"]}]'),(8024,'Limit Consecutive Login Attempts for SSH','The 'MaxAuthTries' parameter in the /etc/ssh/sshd_config file specifies the maximum number of authentication attempts permitted per connection. By restricting the number of failed authentication attempts before the server terminates the connection, malicious users are blocked from gaining access to the host by using repetitive brute-force login exploits.','By setting the authentication login limit to a low value this will disconnect the attacker and force a reconnect, which severely limits the speed of such brute force attacks.','','Perform the following to implement the recommended state: # awk '/^MaxAuthTries/ { $2 = "3" } { print }' /etc/ssh/sshd_config > /etc/ssh/sshd_config.CIS # mv /etc/ssh/sshd_config.CIS /etc/ssh/sshd_config # svcadm restart svc:/network/ssh','[{\"cis\": [\"6.4\"]}]'),(8025,'Disable Rhost-based Authentication for SSH','The IgnoreRhosts parameter specifies that existing .rhosts and .shosts files, which may apply to application rather than user logins, will not be used in RhostsRSAAuthentication or HostbasedAuthentication.','Setting this parameter forces users to enter a password when authenticating with SSH.','','Perform the following to implement the recommended state: # awk '/^IgnoreRhosts/ { $2 = "yes" } { print }' /etc/ssh/sshd_config > /etc/ssh/sshd_config.CIS # mv /etc/ssh/sshd_config.CIS /etc/ssh/sshd_config # svcadm restart svc:/network/ssh This action will only set the IgnoreRhosts line if it already exists in the file to ensure that it is set to the proper value. If the IgnoreRhosts line does not exist in the file, the default setting of Yes is automatically used, so no additional changes are needed.','[{\"cis\": [\"6.5\"]}]'),(8026,'Disable root login for SSH','The PermitRootLogin value (in /etc/ssh/sshd_config) allows for direct root login by a remote user/application to resources on the local host.','By default, it is not possible for the root account to log directly into the system console because the account is configured as a role. This setting therefore does not significantly alter the security posture of the system unless the root account is changed from this default and configured to be a normal user.','','Perform the following to implement the recommended state: # awk '/^PermitRootLogin/ { $2 = "no" } { print }' /etc/ssh/sshd_config > /etc/ssh/sshd_config.CIS # mv /etc/ssh/sshd_config.CIS /etc/ssh/sshd_config # svcadm restart svc:/network/ssh','[{\"cis\": [\"6.6\"]}]'),(8027,'Blocking Authentication Using Empty/Null Passwords for SSH','The PermitEmptyPasswords value allows for direct login through SSH without a password by a remote user/application to resources on the local host in the same way a standard remote login would.','Permitting login without a password is inherently risky.','','Perform the following to implement the recommended state: # awk '/^PermitEmptyPasswords/ { $2 = "no" } { print }' /etc/ssh/sshd_config > /etc/ssh/sshd_config.CIS # mv /etc/ssh/sshd_config.CIS /etc/ssh/sshd_config # svcadm restart svc:/network/ssh','[{\"cis\": [\"6.7\"]}]'),(8028,'Disable Host-based Authentication for Login-based Services','The .rhosts files are used for automatic login to remote hosts and contain username and hostname combinations. The .rhosts files are unencrypted (usually group- or world- readable) and present a serious risk in that a malicious user could use the information within to gain access to a remote host with the privileges of the original application or user.','The use of .rhosts authentication is an old and insecure protocol and can be replaced with public-key authentication using Secure Shell. As automatic authentication settings in the .rhosts files can provide a malicious user with sensitive system credentials, the use of .rhosts files should be disabled. It should be noted that by default the Solaris services that use this file, including rsh and rlogin, are disabled by default.','','Perform the following to implement the recommended state: # cd /etc # cp pam.conf pam.conf.pre-CIS # sed -e 's/^.*pam_rhosts_auth/#&/' < /etc/pam.conf > pam.conf.CIS # mv pam.conf.CIS pam.conf','[{\"cis\": [\"6.8\"]}]'),(8029,'Set Delay between Failed Login Attempts to 4','The SLEEPTIME variable in the /etc/default/login file controls the number of seconds to wait before printing the "login incorrect" message when a bad password is provided.','As an immediate return of an error message, coupled with the capability to try again may facilitate automatic and rapid-fire brute-force password attacks by a malicious user, this delay time should be set as appropriate to the needs of the user.','','Perform the following to implement the recommended state: # cd /etc/default # awk '/SLEEPTIME=/ { $1 = "SLEEPTIME=4" } { print }' login > login.CIS # mv login.CIS login','[{\"cis\": [\"6.10\"]}]'),(8030,'Remove Autologin Capabilities from the GNOME desktop','The GNOME Display Manager is used for login session management. See the manual page gdm(1) for more information. By default, GNOME automatic login is defined in pam.conf(4) to allow users to access the system without a password.','As automatic logins are a known security risk for other than "kiosk" types of systems, GNOME automatic login should be disabled in pam.conf(4).','','Perform the following to implement the recommended state: # cd /etc # awk '/^gdm-autologin/ { $1=" #gdm-autologin" } { print }' /etc/pam.conf > /etc/pam.conf.CIS # mv pam.conf.CIS pam.conf','[{\"cis\": [\"6.11\"]}]'),(8031,'Set Default Screen Lock for GNOME Users','The timeout parameter dictates the invocation of a password-protected screen saver after a specified time of keyboard and mouse inactivity, specific to the xscreensaver application used in the GNOME windowing environment.','As a screensaver timeout provides protection for a desktop that has not been locked by the user upon his/her departure, to help prevent session hijacking, this value should be set as appropriate to the needs of the user.','','Perform the following to implement the recommended state: # cd /usr/share/X11/app-defaults # cp XScreenSaver XScreenSaver.orig # awk '/^*timeout:/ { $2 = "0:10:00" } /^*lockTimeout:/ { $2 = "0:00:00" } /^*lock:/ { $2 = "True" } { print }' xScreenSaver > xScreenSaver.CIS # mv xScreenSaver.CIS xScreenSaver','[{\"cis\": [\"6.12\"]}]'),(8032,'Restrict at/cron to Authorized Users','The cron.allow and at.allow files contain a list of users who are allowed to run the crontab and at commands to submit jobs to be run at scheduled intervals.','On many systems, only the system administrator needs the ability to schedule jobs. 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. Much more effective access controls for the cron system can be obtained by using Role-Based Access Controls (RBAC).','','Perform the following to implement the recommended state: # cd /etc/cron.d # mv cron.deny cron.deny.cis # mv at.deny at.deny.cis # echo root > cron.allow # cp /dev/null at.allow # chown root:root cron.allow at.allow # chmod 400 cron.allow at.allow','[{\"cis\": [\"6.13\"]}]'),(8033,'Restrict root Login to System Console','Privileged access to the system via root must be accountable to a particular user.','Use an authorized mechanism such as RBAC and the su command to provide administrative access to unprivileged accounts. These mechanisms provide an audit trail in the event of problems.','','Perform the following to implement the recommended state: # cd /etc/default # awk '/CONSOLE=/ { print "CONSOLE=/dev/console"; next }; { print }' login > login.CIS # mv login.CIS login','[{\"cis\": [\"6.14\"]}]'),(8034,'Set Retry Limit for Account Lockout','The RETRIES parameter is the number of failed login attempts a user is allowed before being disconnected from the system and forced to reconnect. When LOCK_AFTER_RETRIES is set in /etc/security/policy.conf, then the user's account is locked after this many failed retries (the account can only be unlocked by the administrator using the command: passwd -u <username>). The account lockout threshold (RETRIES parameter) restricts the number of failed login attempts allowed before requiring the offending account be locked. The lockout requirement will help block malicious users from gaining access to the host via automated, repetitive brute-force login exploits--trying different passwords until one fits a user name.','Setting the failed login limit to an appropriate value locks the user account, which will severely limit the speed of such attacks, making it much more likely that the attacker's pattern will be noticed and the offending source address and/or port blocked, so this should be set according to the needs of the user.','','Perform the following to implement the recommended state: # cd /etc/default # awk '/RETRIES=/ { $1 = "RETRIES=3" } { print }' login >login.CIS # mv login.CIS login # cd /etc/security # awk '/LOCK_AFTER_RETRIES=/ { $1 = "LOCK_AFTER_RETRIES=YES" } { print }' policy.conf > policy.conf.CIS # mv policy.conf.CIS policy.conf # svcadm restart svc:/system/name-service/cache Be careful when enabling these settings as they can create a denial-of-service situation for legitimate users and applications. Account lockout can be disabled for specific users via the usermod command. For example, the following command disables account lock specifically for the oracle account: # usermod -K lock_after_retries=no oracle','[{\"cis\": [\"6.15\"]}]'),(8035,'Secure the GRUB Menu (Intel)','GRUB is a boot loader for x64 based systems that permits loading an OS image from any location. Oracle x64 systems support the use of a GRUB Menu password for the console.','The flexibility that GRUB provides creates a security risk if its configuration is modified by an unauthorized user. The failsafe menu entry needs to be secured in the same environments that require securing the systems firmware to avoid unauthorized removable media boots. Setting the GRUB Menu password helps prevent attackers with physical access to the system console from booting off some external device (such as a CD- ROM or floppy) and subverting the security of the system. The actions described in this section will ensure you cannot get to failsafe or any of the GRUB command line options without first entering the password.','','Perform the following to implement the recommended state: # /boot/grub/bin/grub grub> md5crypt Password: [enter desired boot loader password] Encrypted: [enter md5 password string] grub> [enter control-C (^C)] The actual menu.lst file for Solaris 11 x64 is the /rpool/boot/grub/menu.lst. First, ensure the menu.lst file can only be read by the root user: # chmod 600 /rpool/boot/grub/menu.lst Next, add the following line to the menu.lst file above the entries added by bootadm: password --md5 [enter md5 password string generated above] Finally, add the keyword lock to the Solaris failsafe boot entry as in the following example (as well as to any other entries that you want to protect): title Solaris failsafe lock','[{\"cis\": [\"6.17\"]}]'),(8036,'Set Password Expiration Parameters on Active Accounts','The characteristics of an operating system that make 'user identification' via password a secure and workable solution is the combination of settings chosen. By requiring that a series of password-choices be security-centric, it reduces the risk of a malicious user breaking the password through dictionary/brute force attacks or fortuitous guessing based upon 'social engineering.' A basic password security strategy is requiring a new password to be chosen every 45-90 days, so that repeated attempts to gain entry by brute-force tactics will fail when a new password is chosen, which requires starting over again to break the new password.','The commands for this item set all active accounts (except the root account) to force password changes every 91 days (13 weeks), and then prevent password changes for seven days (one week), thereafter. Users will begin receiving warnings 28 days (4 weeks) before their password expires. Sites also have the option of expiring idle accounts after a certain number of days (see the on-line manual page for the usermod command, particularly the -f option).','','Perform the following to implement the recommended state: # logins -ox | awk -F: '($1 == "root" || $8 == "LK" || $8 == "NL") { next } ; { $cmd = "passwd" } ; ($11 91) { $cmd = $cmd " -x 91" } ($10 < 7) { $cmd = $cmd " -n 7" } ($12 < 28) { $cmd = $cmd " -w 28" } ($cmd != "passwd") { print $cmd " " $1 }' > /etc/CISupd_accounts # /sbin/sh /etc/CISupd_accounts # rm -f /etc/CISupd_accounts # cd /etc/default # grep -v WEEKS passwd > passwd.CIS # cat <<EODefaults >> passwd.CIS MAXWEEKS=13 MINWEEKS=1 WARNWEEKS=4 EODefaults # mv passwd.CIS passwd','[{\"cis\": [\"7.1\"]}]'),(8037,'Set Strong Password Creation Policies','The variables in the /etc/default/passwd file indicate various strategies for creating differences required between an old and a new password. As requiring users to select a specific numbers of differences between the characters in the existing password and the new one can strengthen the password by increasing the symbol-set space, to further increase the difficulty of breaking any password by brute-force attacks, these values should be set as appropriate to the needs of the user.','Administrators may wish to add site-specific dictionaries to the DICTIONLIST parameter. Warning: Sites often have differing opinions on the optimal value of the HISTORY parameter (how many previous passwords to remember per user in order to prevent re- use). The values specified here are in compliance with NSA/DISA requirements. If this is too restrictive for your site, you may wish to set a HISTORY value of 4 and a MAXREPEATS of 2. Consult your local security rules for guidance.','','Perform the following to implement the recommended state: # cd /etc/default # awk '/PASSLENGTH=/ { $1 = "PASSLENGTH=8" }; /NAMECHECK=/ { $1 = "NAMECHECK=YES" }; /HISTORY=/ { $1 = "HISTORY=10" }; /MINDIFF=/ { $1 = "MINDIFF=3" }; /MINALPHA=/ { $1 = "MINALPHA=2" }; /MINUPPER=/ { $1 = "MINUPPER=1" }; /MINLOWER=/ { $1 = "MINLOWER=1" }; /MINNONALPHA=/ { $1 = "MINNONALPHA=1" }; /MAXREPEATS=/ { $1 = "MAXREPEATS=0" }; /WHITESPACE=/ { $1 = "WHITESPACE=YES" }; /DICTIONDBDIR=/ { $1 = "DICTIONDBDIR=/var/passwd" }; /DICTIONLIST=/ { $1 = "DICTIONLIST=/usr/share/lib/dict/words" }; { print }' passwd > passwd.CIS # mv passwd.CIS passwd','[{\"cis\": [\"7.2\"]}]'),(8038,'Set Default umask for users','The default umask(1) 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(1) command. Users who wish to allow their files and directories to be readable by others by default may choose a different default umask by inserting the umask command into the standard shell configuration files (.profile, .cshrc, etc.) in their home directories.','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 allow 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.','','Perform the following to implement the recommended state: # cd /etc/default # awk '/#UMASK=/ { $1 = "UMASK=027" } { print }' login > login.CIS # mv login.CIS login','[{\"cis\": [\"7.3\"]}]'),(8039,'Set Default File Creation Mask for FTP Users','If FTP is permitted, set a strong, default file creation mask to apply to files created by the FTP server.','Many users assume that the FTP server will use their system file creation mask; generally it does not. This setting ensures that files transmitted over FTP use a strong file creation mask.','','Perform the following to implement the recommended state: # cd /etc # if [ "`grep '^Umask' proftpd.conf`" ]; then awk '/^Umask/ { $2 = "027" } { print }' proftpd.conf > proftpd.conf.CIS mv proftpd.conf.CIS proftpd.conf else echo "Umask 027" >> proftpd.conf fi','[{\"cis\": [\"7.4\"]}]'),(8040,'Set "mesg n" as Default for All Users','The "mesg n" command blocks attempts to use the write or talk commands to contact users at their terminals, but has the side effect of slightly strengthening permissions on the user's tty device.','Since write and talk are no longer widely used at most sites, the incremental security increase is worth the loss of functionality.','','Perform the following to implement the recommended state: # cd /etc # for file in profile .login ; do if [ "`grep mesg $file`" ]; then awk '$1 == "mesg" { $2 = "n" } { print }' $file > $file.CIS mv $file.CIS $file else echo mesg n >> $file fi done','[{\"cis\": [\"7.5\"]}]'),(8041,'Create Warnings 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 and Secure Shell. The contents of the /etc/motd file are generally displayed after all successful logins, regardless from where the user is logging in.','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. As implementing a logon banner to deter inappropriate use and can provide a foundation for legal action against abuse, this warning content should be set as appropriate. Consult with your organization's legal counsel for the appropriate wording as the examples below are for demonstration purposes only.','','Perform the following to implement the recommended state: # echo "Authorized users only. All activity may be monitored and reported." > /etc/motd # echo "Authorized users only. All activity may be monitored and reported." > /etc/issue # chown root:root /etc/issue # chmod 644 /etc/issue','[{\"cis\": [\"8.1\"]}]'),(8042,'Enable a Warning Banner for the SSH Service','The contents of the Banner string in the /etc/ssh/sshd_config file are sent to the remote user before authentication is allowed, requiring that the user read the legal caution.','','','Perform the following to implement the recommended state: # awk '/^#Banner/ { $1 = "Banner" } { print }' /etc/ssh/sshd_config > /etc/ssh/sshd_config.CIS # mv /etc/ssh/sshd_config.CIS /etc/ssh/sshd_config # svcadm restart svc:/network/ssh','[{\"cis\": [\"8.2\"]}]'),(8043,'Enable a Warning Banner for the GNOME Service','The GNOME Display Manager is used for login session management. See the manual page gdm(1) for more information on configuration of the settings, which can be user- or group specific.','The remediation action for this item sets a pre-login warning message for GDM users. Additional methods can be employed to display a similar message to a user post- authentication. For more information, see the Oracle Solaris 11 Security Guidelines document.','','Perform the following to implement the recommended state: Edit the /etc/gdm/Init/Default file to add the following content before the last line of the file. /usr/bin/zenity --text-info --width=800 --height=300 --title="Security Message" --filename=/etc/issue','[{\"cis\": [\"8.3\"]}]'),(8044,'Enable a Warning Banner for the FTP service','The action for this item sets a warning message for FTP users before they log in.','Warning Banners inform users who are attempting to access the system of their legal status regarding using the system. The text below is a generic sample only, so consult with your organization's legal counsel for the appropriate wording.','','Perform the following to implement the recommended state: # echo "DisplayConnect /etc/issue" >> /etc/proftpd.conf # svcadm restart ftp','[{\"cis\": [\"8.4\"]}]'),(8045,'Check that the Banner Setting for telnet is Null','The BANNER variable in the file /etc/default/telnetd can be used to display text before the telnet login prompt. Traditionally, it has been used to display the OS level of the target system.','The warning banner provides information that can be used in reconnaissance for an attack. By default, this file is distributed with the BANNER variable set to null. It is not necessary to create a separate warning banner for telnet if a warning is set in the /etc/issue file. As telnet is an insecure protocol, it is strongly recommend that it be disabled and all remote administrative/user connections take place by Secure Shell.','','Perform the following to implement the recommended state: # cd /etc/default # awk '/^BANNER=/ { $1 = "BANNER=" }; { print }' telnetd > telnetd.CIS # mv telnetd.CIS telnetd','[{\"cis\": [\"8.5\"]}]'),(8046,'Verify System Account Default Passwords','There are a number of accounts provided with the Solaris OS that are used to manage applications and are not intended to provide an interactive shell. These accounts are delivered either in a locked or non-login state. Oracle does not support nor recommend changing the passwords associated with these accounts.','System accounts, such as bin, lpd, and sys have special purposes and privileges. By default, these accounts are configured as either locked or non-login. This status should be verified to ensure that these accounts have not accidentally or intentionally been enabled.','','To lock a single account, use the command: # passwd -d [username] # passwd -l [username] To configure a single account to be non-login, use the command: # passwd -d [username] # passwd -N [username]','[{\"cis\": [\"9.3\"]}]'),(8047,'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 at all (assuming that the value PASSREQ=NO is set in /etc/default/login).','All accounts must have passwords, be configured as "Non-login," or be locked.','','Use the passwd -l command to lock accounts that are not permitted to execute commands . Use the passwd -N command to set accounts to be non-logini.','[{\"cis\": [\"9.4\"]}]'),(8048,'Verify No UID 0 Accounts Exist Other than root','Any account with UID 0 has superuser rights on the system.','This access must be limited to only the default root role and be made accessible from the system console only. Administrative access granted to an unprivileged account should use an approved mechanism such as RBAC.','','Disable or delete any other 0 UID entries that are displayed; there should be only one root account. Finer granularity access control for administrative access can be obtained by using the Solaris Role-Based Access Control (RBAC) mechanism. RBAC configurations should be monitored via user_attr(4) to make sure that privileges are managed appropriately.','[{\"cis\": [\"9.5\"]}]'),(8049,'Ensure root PATH Integrity','The root user can execute any command on the system and could be tricked into executing programs if the PATH is not set correctly.','Including the current working directory (.) or any other writable directory in root's executable path makes it likely that an attacker can gain superuser access by forcing an administrator operating as root to execute a malcode, such as a Trojan horse program.','','Correct or justify any items discovered in the Audit step.','[{\"cis\": [\"9.6\"]}]'),(8050,'Check That Users Are Assigned Home Directories','passwd(4) defines a home directory that each user is placed in upon login. If there is no defined home directory, a user will be placed in / and will not be able to write any files or have local environment variables set.','All users must be assigned a home directory in passwd(4).','','Correct or justify any items discovered in the Audit step. Determine if there exists any users who are in passwd(4) but do not have a home directory, and work with those users to determine the best course of action in accordance with site policy.','[{\"cis\": [\"9.12\"]}]'),(8500,'Verify all Apple provided software is current','Software vendors release security patches and software updates for their products when security vulnerabilities are discovered. There is no simple way to complete this action without a network connection to an Apple software repository. Please ensure appropriate access for this control. This check is only for what Apple provides through software update.','It is important that these updates be applied in a timely manner to prevent unauthorized persons from exploiting the identified vulnerabilities.','','1. In Terminal, run the following: softwareupdate -l 2. In Terminal, run the following for any packages that show up in step 1: sudo softwareupdate -i packagename','[{\"cis\": [\"1.1\"]}]'),(8501,'Enable Auto Update','Auto Update verifies that your system has the newest security patches and software updates. If "Automatically check for updates" is not selected background updates for new malware definition files from Apple for XProtect and Gatekeeper will not occur.','It is important that a system has the newest updates applied so as to prevent unauthorized persons from exploiting identified vulnerabilities.','','Open a terminal session and enter the following command to enable the auto update feature: sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -int 1','[{\"cis\": [\"1.2\"]}]'),(8502,'Enable app update installs','Ensure that application updates are installed after they are available from Apple. These updates do not require reboots or admin privileges for end users.','Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited','','Open a terminal session and enter the following command to enable the auto update feature: sudo defaults write /Library/Preferences/com.apple.commerce AutoUpdate -bool TRUE The remediation requires a log out and log in to show in the GUI. Please note that.','[{\"cis\": [\"1.3\"]}]'),(8503,'Enable system data files and security update installs','Ensure that system and security updates are installed after they are available from Apple. This setting enables definition updates for XProtect and Gatekeeper, with this setting in place new malware and adware that Apple has added to the list of malware or untrusted software will not execute. These updates do not require reboots or end user admin rights.','Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited','','Open a terminal session and enter the following command to enable install system data files and security updates: sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate ConfigDataInstall -bool true && sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CriticalUpdateInstall -bool true','[{\"cis\": [\"1.4\"]}]'),(8504,'Enable OS X update installs','Ensure that OS X updates are installed after they are available from Apple. This setting enables OS X updates to be automatically installed. Some environments will want to approve and test updates before they are delivered. It is best practice to test first where updates can and have caused disruptions to operations. Automatic updates should be turned off where changes are tightly controlled and there are mature testing and approval processes. Automatic updates should not be turned off so the admin can call the users first to let them know it's ok to install. A dependable repeatable process involving a patch agent or remote management tool should be in place before auto-updates are turned off.','Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited','','Open a terminal session and enter the following command to enable install system data files and security updates: sudo defaults write /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired -bool TRUE','[{\"cis\": [\"1.5\"]}]'),(8505,'Enable "Set time and date automatically"','Correct date and time settings are required for authentication protocols, file creation, modification dates and log entries. Apple's automatic time update solution will enable an NTP server that is not controlled by the Application Firewall. Turning on "Set time and date automatically" allows other computers to connect to set their time and allows for exploit attempts against ntpd. It also allows for more accurate network detection and OS fingerprinting.','Kerberos may not operate correctly if the time on the Mac is off by more than 5 minutes. This in turn can affect Apple's single sign-on feature, Active Directory logons, and other features.','','Run the following commands: sudo systemsetup -setnetworktimeserver <timeserver> sudo systemsetup -setusingnetworktime on','[{\"cis\": [\"2.2.1\"]}]'),(8506,'Restrict NTP server to loopback interface','The Apple System Preference setting to "Set date and time automatically" enables both an NTP client that can synchronize the time from known time server(s) and an open listening NTP server that can be used by any other computer that can connect to port 123 on the time syncing computer. This open listening service can allow for both exploits of future NTP vulnerabilities and allow for open ports that can be used for fingerprinting to target exploits. Access to this port should be restricted. Editing the /etc/ntp-restrict.conf file by adding a control on the loopback interface limits external access.','Mobile workstations on untrusted networks should not have open listening services available to other nodes on the network.','','1. Run the following command in Terminal: sudo vim /etc/ntp-restrict.conf 2. Add the following lines to the file: restrict lo interface ignore wildcard interface listen lo','[{\"cis\": [\"2.2.3\"]}]'),(8507,'Disable Remote Apple Events','Apple Events is a technology that allows one program to communicate with other programs. Remote Apple Events allows a program on one computer to communicate with a program on a different computer.','Disabling Remote Apple Events mitigates the risk of an unauthorized program gaining access to the system.','','Run the following command in Terminal: sudo systemsetup -setremoteappleevents off','[{\"cis\": [\"2.4.1\"]}]'),(8508,'Disable Printer Sharing','By enabling Printer sharing the computer is set up as a print server to accept print jobs from other computers. Dedicated print servers or direct IP printing should be used instead.','Disabling Printer Sharing mitigates the risk of attackers attempting to exploit the print server to gain access to the system.','','Perform the following to implement the prescribed state: 1. Open System Preferences 2. Select Sharing 3. Uncheck Printer Sharing','[{\"cis\": [\"2.4.4\"]}]'),(8509,'Disable Remote Login','Remote Login allows an interactive terminal connection to a computer.','Disabling Remote Login mitigates the risk of an unauthorized person gaining access to the system via Secure Shell (SSH). While SSH is an industry standard to connect to posix servers, the scope of the benchmark is for Apple OSX clients, not servers.','','Run the following command in Terminal: sudo systemsetup -setremotelogin off','[{\"cis\": [\"2.4.5\"]}]'),(8510,'Disable File Sharing','Apple's File Sharing uses a combination of SMB (Windows sharing) and AFP (Mac sharing)','By disabling file sharing, the remote attack surface and risk of unauthorized access to files stored on the system is reduced.','','Run the following command in Terminal to turn off AFP from the command line: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist - Run the following command in Terminal to turn off SMB sharing from the CLI: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.smbd.plist','[{\"cis\": [\"2.4.8\"]}]'),(8511,'Disable "Wake for network access"','This feature allows other users to be able to access your computer's shared resources, such as shared printers or iTunes playlists, even when your computer is in sleep mode.','Disabling this feature mitigates the risk of an attacker remotely waking the system and gaining access.','','Run the following command in Terminal: sudo pmset -a womp 0 Note: The -c flag means "wall power." Different settings must be used for other power sources.','[{\"cis\": [\"2.5.1\"]}]'),(8512,'Enable FileVault','FileVault secures a system's data by automatically encrypting its boot volume and requiring a password or recovery key to access it.','Encrypting sensitive data minimizes the likelihood of unauthorized users gaining access to it.','','Perform the following to implement the prescribed state: 1. Open System Preferences 2. Select Security & Privacy 3. Select FileVault 4. Select Turn on FileVault','[{\"cis\": [\"2.6.1\"]}]'),(8513,'Enable Gatekeeper','Gatekeeper is Apple's application white-listing control that restricts downloaded applications from launching. It functions as a control to limit applications from unverified sources from running without authorization.','Disallowing unsigned software will reduce the risk of unauthorized or malicious applications from running on the system.','','Run the following command in Terminal: sudo spctl --master-enable','[{\"cis\": [\"2.6.2\"]}]'),(8514,'Enable Firewall','A firewall is a piece of software that blocks unwanted incoming connections to a system. Apple has posted general documentation about the application firewall.','A firewall minimizes the threat of unauthorized users from gaining access to your system while connected to a network or the Internet.','','Run the following command in Terminal: defaults write /Library/Preferences/com.apple.alf globalstate - int <value> Where <value> is: - 1 = on for specific services - 2 = on for essential services','[{\"cis\": [\"2.6.3\"]}]'),(8515,'Enable Firewall Stealth Mode','While in Stealth mode the computer will not respond to unsolicited probes, dropping that traffic.','Stealth mode on the firewall minimizes the threat of system discovery tools while connected to a network or the Internet.','','Run the following command in Terminal: sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on','[{\"cis\": [\"2.6.4\"]}]'),(8516,'Enable Secure Keyboard Entry in terminal.app','Secure Keyboard Entry prevents other applications on the system and/or network from detecting and recording what is typed into Terminal.','Enabling Secure Keyboard Entry minimizes the risk of a key logger from detecting what is entered in Terminal.','','Perform the following to implement the prescribed state: 1. Open Terminal 2. Select Terminal 3. Select Secure Keyboard Entry','[{\"cis\": [\"2.10\"]}]'),(8517,'Java 6 is not the default Java runtime','Apple had made Java part of the core Operating System for OS X. Apple is no longer providing Java updates for OS X and updated JREs and JDK are made available by Oracle. The latest version of Java 6 made available by Apple has many unpatched vulnerabilities and should not be the default runtime for Java applets that request one from the Operating System','Java is one of the most exploited environments and is no longer maintained by Apple, old versions may still be installed and should be removed from the computer or not be in the default path.','','Java 6 can be removed completely or, if necessary Java applications will only work with Java 6, a custom path can be used.','[{\"cis\": [\"2.11\"]}]'),(8518,'Enable security auditing','OSX's audit facility, auditd, receives notifications from the kernel when certain system calls, such as open, fork, and exit, are made. These notifications are captured and written to an audit log.','Logs generated by auditd may be useful when investigating a security incident as they may help reveal the vulnerable application and the actions taken by a malicious actor.','','Run the following command in Terminal: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.auditd.plist','[{\"cis\": [\"3.2\"]}]'),(8519,'Configure Security Auditing Flags','Auditing is the capture and maintenance of information about security-related events.','Maintaining an audit trail of system activity logs can help identify configuration errors, troubleshoot service disruptions, and analyze compromises or attacks that have occurred, have begun, or are about to begin. Audit logs are necessary to provide a trail of evidence in case the system or network is compromised.','','1. Open a terminal session and edit the /etc/security/audit_control file 2. Find the line beginning with "flags" 3. Add the following flags: lo, ad, fd, fm, -all. 4. Save the file.','[{\"cis\": [\"3.3\"]}]'),(8520,'Disable Bonjour advertising service','Bonjour is an auto-discovery mechanism for TCP/IP devices which enumerate devices and services within a local subnet. DNS on Mac OS X is integrated with Bonjour and should not be turned off, but the Bonjour advertising service can be disabled.','Bonjour can simplify device discovery from an internal rogue or compromised host. An attacker could use Bonjour's multicast DNS feature to discover a vulnerable or poorly- configured service or additional information to aid a targeted attack. Implementing this control disables the continuous broadcasting of "I'm here!" messages. Typical end-user endpoints should not have to advertise services to other computers. This setting does not stop the computer from sending out service discovery messages when looking for services on an internal subnet, if the computer is looking for a printer or server and using service discovery. To block all Bonjour traffic except to approved devices the pf or other firewall would be needed.','','Run the following command in Terminal: defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements','[{\"cis\": [\"4.1\"]}]'),(8521,'Ensure http server is not running','Mac OS X used to have a graphical front-end to the embedded Apache web server in the Operating System. Personal web sharing could be enabled to allow someone on another computer to download files or information from the user's computer. Personal web sharing from a user endpoint has long been considered questionable and Apple has removed that capability from the GUI. Apache however is still part of the Operating System and can be easily turned on to share files and provide remote connectivity to an end user computer. Web sharing should only be done through hardened web servers and appropriate cloud services.','Web serving should not be done from a user desktop. Dedicated webservers or appropriate cloud storage should be used. Open ports make it easier to exploit the computer.','','Ensure that the Web Server is not running and is not set to start at boot Stop the Web Server: sudo apachectl stop Ensure that the web server will not auto-start at boot: sudo defaults write /System/Library/LaunchDaemons/org.apache.httpd Disabled -bool true','[{\"cis\": [\"4.4\"]}]'),(8522,'Ensure ftp server is not running','Mac OS X used to have a graphical front-end to the embedded ftp server in the Operating System. Ftp sharing could be enabled to allow someone on another computer to download files or information from the user's computer. Running an Ftp server from a user endpoint has long been considered questionable and Apple has removed that capability from the GUI. The Ftp server however is still part of the Operating System and can be easily turned on to share files and provide remote connectivity to an end user computer. Ftp servers meet a specialized need to distribute files without strong authentication and should only be done through hardened servers. Cloud services or other distribution methods should be considered','Ftp servers should not be run on an end user desktop. Dedicated servers or appropriate cloud storage should be used. Open ports make it easier to exploit the computer.','','Ensure that the FTP Server is not running and is not set to start at boot. Stop the ftp Server: sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist','[{\"cis\": [\"4.5\"]}]'),(8523,'Ensure nfs server is not running','Mac OS X can act as an NFS fileserver. NFS sharing could be enabled to allow someone on another computer to mount shares and gain access to information from the user's computer. File sharing from a user endpoint has long been considered questionable and Apple has removed that capability from the GUI. NFSD is still part of the Operating System and can be easily turned on to export shares and provide remote connectivity to an end user computer.','File serving should not be done from a user desktop, dedicated servers should be used. Open ports make it easier to exploit the computer.','','Stop the NFS Server: sudo nfsd disable Remove the exported Directory listing: rm /etc/export','[{\"cis\": [\"4.6\"]}]'),(8524,'Do not enable the "root" account','The root account is a superuser account that has access privileges to perform any actions and read/write to any file on the computer. In the UNIX/Linux world, the system administrator commonly uses the root account to perform administrative functions.','Enabling and using the root account puts the system at risk since any successful exploit or mistake while the root account is in use could have unlimited access privileges within the system. Using the sudo command allows users to perform functions as a root user while limiting and password protecting the access privileges. By default the root account is not enabled on a Mac OS X client computer. It is enabled on Mac OS X Server. An administrator can escalate privileges using the sudo command (use -s or -i to get a root shell).','','Open System Preferences, Uses & Groups. Click the lock icon to unlock it. In the Network Account Server section, click Join or Edit. Click Open Directory Utility. Click the lock icon to unlock it. Select the Edit menu > Disable Root User.','[{\"cis\": [\"5.7\"]}]'),(8525,'Disable automatic login','The automatic login feature saves a user's system access credentials and bypasses the login screen, instead the system automatically loads to the user's desktop screen.','Disabling automatic login decreases the likelihood of an unauthorized person gaining access to a system.','','Run the following command in Terminal: sudo defaults delete /Library/Preferences/com.apple.loginwindow autoLoginUser','[{\"cis\": [\"5.8\"]}]'),(8526,'Require a password to wake the computer from sleep or screen saver','Sleep and screensaver modes are low power modes that reduces electrical consumption while the system is not in use.','Prompting for a password when waking from sleep or screensaver mode mitigates the threat of an unauthorized person gaining access to a system in the user's absence.','','1. Run the following command in Terminal: The current user will need to log off and on for changes to take effect. defaults write com.apple.screensaver askForPassword -int 1 2. The current user will need to log off and on for changes to take effect.','[{\"cis\": [\"5.9\"]}]'),(8527,'Disable ability to login to another user's active and locked session','OSX has a privilege that can be granted to any user that will allow that user to unlock active user's sessions.','Disabling the admins and/or user's ability to log into another user's active and locked session prevents unauthorized persons from viewing potentially sensitive and/or personal information.','','1. Run the following command in Terminal: sudo vi /etc/pam.d/screensaver 2. Locate "account required pam_group.so no_warn group=admin,wheel fail_safe" 3. Remove "admin," 4. Save','[{\"cis\": [\"5.11\"]}]'),(8528,'System Integrity Protection status','System Integrity Protection is a new security feature introduced in OS X 10.11 El Capitan. System Integrity Protection restricts access to System domain locations and restricts runtime attachment to system processes. Any attempt to attempt to inspect or attach to a system process will fail. Kernel Extensions are now restricted to /Library/Extensions and are required to be signed with a Developer ID.','Running without System Integrity Protection on a production system runs the risk of the modification of system binaries or code injection of system processes that would otherwise be protected by SIP.','','Perform the following while booted in OS X Recovery Partition. 1. Select Terminal from the Utilities menu 2. Run the following command in Terminal: /usr/bin/csrutil enable 3. The output should be: Successfully enabled System Integrity Protection. Please restart the machine for the changes to take effect. 4. Reboot.','[{\"cis\": [\"5.18\"]}]'),(8529,'Disable guest account login','The guest account allows users access to the system without having to create an account or password. Guest users are unable to make setting changes, cannot remotely login to the system and all created files, caches, and passwords are deleted upon logging out.','Disabling the guest account mitigates the risk of an untrusted user doing basic reconnaissance and possibly using privilege escalation attacks to take control of the system.','','Run the following command in Terminal: sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled - bool NO','[{\"cis\": [\"6.1.3\"]}]'),(8530,'Remove Guest home folder','The guest account login should have been disabled, so there is no need for the legacy Guest home folder to remain in the file system. When normal user accounts are removed you have the option to archive it, leave it in place or delete. In the case of the guest folder the folder remains in place without a GUI option to remove it. If at some point in the future a Guest account is needed it will be re-created. The presence of the Guest home folder can cause automated audits to fail when looking for compliant settings within all User folders as well. Rather than ignoring the folders continued existence it is best removed.','The Guest home folders are unneeded after the Guest account is disabled and could be used inappropriately.','','1. Run the following command in Terminal: rm -R /Users/Guest 2. Make sure there is no output','[{\"cis\": [\"6.1.5\"]}]'),(8531,'Turn on filename extensions','A filename extension is a suffix added to a base filename that indicates the base filename's file format.','Visible filename extensions allows the user to identify the file type and the application it is associated with which leads to quick identification of misrepresented malicious files.','','Perform the following to implement the prescribed state: 1. Select Finder 2. Select Preferences 3. Check Show all filename extensions Alternatively, use the following command: defaults write NSGlobalDomain AppleShowAllExtensions -bool true','[{\"cis\": [\"6.2\"]}]'),(8532,'Disable the automatic run of safe files in Safari','Safari will automatically run or execute what it considers safe files. This can include installers and other files that execute on the operating system. Safari bases file safety by using a list of filetypes maintained by Apple. The list of files include text, image, video and archive formats that would be run in the context of the OS rather than the browser.','Hackers have taken advantage of this setting via drive-by attacks. These attacks occur when a user visits a legitimate website that has been corrupted. The user unknowingly downloads a malicious file either by closing an infected pop-up or hovering over a malicious banner. An attacker can create a malicious file that will fall within Safari's safe file list that will download and execute without user input.','','Perform the following to implement the prescribed state: 1. Open Safari 2. Select Safari from the menu bar 3. Select Preferences 4. Select General 5. Uncheck Open "safe" files after downloading Alternatively run the following command in Terminal: defaults write com.apple.Safari AutoOpenSafeDownloads -boolean no','[{\"cis\": [\"6.3\"]}]'),(9000,'Verify all Apple provided software is current','Software vendors release security patches and software updates for their products when security vulnerabilities are discovered. There is no simple way to complete this action without a network connection to an Apple software repository. Please ensure appropriate access for this control. This check is only for what Apple provides through software update.','It is important that these updates be applied in a timely manner to prevent unauthorized persons from exploiting the identified vulnerabilities.','','1. In Terminal, run the following: softwareupdate -l 2. In Terminal, run the following for any packages that show up in step 1: sudo softwareupdate -i packagename','[{\"cis\": [\"1.1\"]}]'),(9001,'Enable Auto Update','Auto Update verifies that your system has the newest security patches and software updates. If "Automatically check for updates" is not selected background updates for new malware definition files from Apple for XProtect and Gatekeeper will not occur.','It is important that a system has the newest updates applied so as to prevent unauthorized persons from exploiting identified vulnerabilities.','','Open a terminal session and enter the following command to enable the auto update feature: sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -int 1','[{\"cis\": [\"1.2\"]}]'),(9002,'Enable app update installs','Ensure that application updates are installed after they are available from Apple. These updates do not require reboots or admin privileges for end users.','Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited','','Open a terminal session and enter the following command to enable the auto update feature: sudo defaults write /Library/Preferences/com.apple.commerce AutoUpdate -bool TRUE The remediation requires a log out and log in to show in the GUI. Please note that.','[{\"cis\": [\"1.3\"]}]'),(9003,'Enable system data files and security update installs','Ensure that system and security updates are installed after they are available from Apple. This setting enables definition updates for XProtect and Gatekeeper, with this setting in place new malware and adware that Apple has added to the list of malware or untrusted software will not execute. These updates do not require reboots or end user admin rights.','Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited','','Open a terminal session and enter the following command to enable install system data files and security updates: sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate ConfigDataInstall -bool true && sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CriticalUpdateInstall -bool true','[{\"cis\": [\"1.4\"]}]'),(9004,'Enable macOS update installs','Ensure that macOS updates are installed after they are available from Apple. This setting enables macOS updates to be automatically installed. Some environments will want to approve and test updates before they are delivered. It is best practice to test first where updates can and have caused disruptions to operations. Automatic updates should be turned off where changes are tightly controlled and there are mature testing and approval processes. Automatic updates should not be turned off so the admin can call the users first to let them know it's ok to install. A dependable repeatable process involving a patch agent or remote management tool should be in place before auto-updates are turned off.','Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited','','Open a terminal session and enter the following command to enable install system data files and security updates: sudo defaults write /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired -bool TRUE','[{\"cis\": [\"1.5\"]}]'),(9005,'Enable "Set time and date automatically"','Correct date and time settings are required for authentication protocols, file creation, modification dates and log entries. Note: If your organization has internal time servers, enter them here. Enterprise mobile devices may need to use a mix of internal and external time servers. If multiple servers are required use the Date & Time System Preference with each server separated by a space.','Kerberos may not operate correctly if the time on the Mac is off by more than 5 minutes. This in turn can affect Apple's single sign-on feature, Active Directory logons, and other features.','','Run the following commands: sudo systemsetup -setnetworktimeserver <timeserver> sudo systemsetup -setusingnetworktime on','[{\"cis\": [\"2.2.1\"]}]'),(9006,'Disable Remote Apple Events','Apple Events is a technology that allows one program to communicate with other programs. Remote Apple Events allows a program on one computer to communicate with a program on a different computer.','Disabling Remote Apple Events mitigates the risk of an unauthorized program gaining access to the system.','','Run the following command in Terminal: sudo systemsetup -setremoteappleevents off','[{\"cis\": [\"2.4.1\"]}]'),(9007,'Disable Printer Sharing','By enabling Printer sharing the computer is set up as a print server to accept print jobs from other computers. Dedicated print servers or direct IP printing should be used instead.','Disabling Printer Sharing mitigates the risk of attackers attempting to exploit the print server to gain access to the system.','','Perform the following to implement the prescribed state: 1. Open System Preferences 2. Select Sharing 3. Uncheck Printer Sharing','[{\"cis\": [\"2.4.4\"]}]'),(9008,'Disable Remote Login','Remote Login allows an interactive terminal connection to a computer.','Disabling Remote Login mitigates the risk of an unauthorized person gaining access to the system via Secure Shell (SSH). While SSH is an industry standard to connect to posix servers, the scope of the benchmark is for Apple macOS clients, not servers.','','Run the following command in Terminal: sudo systemsetup -setremotelogin off','[{\"cis\": [\"2.4.5\"]}]'),(9009,'Disable File Sharing','Apple's File Sharing uses a combination of SMB (Windows sharing) and AFP (Mac sharing)','By disabling file sharing, the remote attack surface and risk of unauthorized access to files stored on the system is reduced.','','Run the following command in Terminal to turn off AFP from the command line: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist - Run the following command in Terminal to turn off SMB sharing from the CLI: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.smbd.plist','[{\"cis\": [\"2.4.8\"]}]'),(9010,'Disable "Wake for network access"','This feature allows other users to be able to access your computer's shared resources, such as shared printers or iTunes playlists, even when your computer is in sleep mode. In a closed network when only authorized devices could wake a computer it could be valuable to wake computers in order to do management push activity. Where mobile workstations and agents exist the device will more likely check in to receive updates when already awake. Mobile devices should not be listening for signals on unmanaged network where untrusted devices could send wake signals.','Disabling this feature mitigates the risk of an attacker remotely waking the system and gaining access.','','Run the following command in Terminal: sudo pmset -a womp 0 Note: The -c flag means "wall power." Different settings must be used for other power sources.','[{\"cis\": [\"2.5.1\"]}]'),(9011,'Enable FileVault','FileVault secures a system's data by automatically encrypting its boot volume and requiring a password or recovery key to access it.','Encrypting sensitive data minimizes the likelihood of unauthorized users gaining access to it.','','Perform the following to implement the prescribed state: 1. Open System Preferences 2. Select Security & Privacy 3. Select FileVault 4. Select Turn on FileVault','[{\"cis\": [\"2.6.1.1\"]}]'),(9012,'Enable Gatekeeper','Gatekeeper is Apple's application white-listing control that restricts downloaded applications from launching. It functions as a control to limit applications from unverified sources from running without authorization.','Disallowing unsigned software will reduce the risk of unauthorized or malicious applications from running on the system.','','Run the following command in Terminal: sudo spctl --master-enable','[{\"cis\": [\"2.6.2\"]}]'),(9013,'Enable Firewall','A firewall is a piece of software that blocks unwanted incoming connections to a system. Apple has posted general documentation about the application firewall.','A firewall minimizes the threat of unauthorized users from gaining access to your system while connected to a network or the Internet.','','Run the following command in Terminal: defaults write /Library/Preferences/com.apple.alf globalstate - int <value> Where <value> is: - 1 = on for specific services - 2 = on for essential services','[{\"cis\": [\"2.6.3\"]}]'),(9014,'Enable Firewall Stealth Mode','While in Stealth mode the computer will not respond to unsolicited probes, dropping that traffic.','Stealth mode on the firewall minimizes the threat of system discovery tools while connected to a network or the Internet.','','Run the following command in Terminal: sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on','[{\"cis\": [\"2.6.4\"]}]'),(9015,'Enable Secure Keyboard Entry in terminal.app','Secure Keyboard Entry prevents other applications on the system and/or network from detecting and recording what is typed into Terminal.','Enabling Secure Keyboard Entry minimizes the risk of a key logger from detecting what is entered in Terminal.','','Perform the following to implement the prescribed state: 1. Open Terminal 2. Select Terminal 3. Select Secure Keyboard Entry','[{\"cis\": [\"2.10\"]}]'),(9016,'Java 6 is not the default Java runtime','Apple had made Java part of the core Operating System for macOS. Apple is no longer providing Java updates for macOS and updated JREs and JDK are made available by Oracle. The latest version of Java 6 made available by Apple has many unpatched vulnerabilities and should not be the default runtime for Java applets that request one from the Operating System','Java has been one of the most exploited environments and Java 6, which was provided as an OS component by Apple, is no longer maintained by Apple or Oracle. The old versions provided by Apple are both unsupported and missing the more modern security controls that have limited current exploits. The EOL version may still be installed and should be removed from the computer or not be in the default path.','','Java 6 can be removed completely or, if required Java applications will only work with Java 6, a custom path can be used. Apple is likely to finally pull the plug on Java 6 in upcoming macOS versions so any applications that still require Java 6 will likely soon be unavailable.','[{\"cis\": [\"2.11\"]}]'),(9017,'Enable security auditing','macOS's audit facility, auditd, receives notifications from the kernel when certain system calls, such as open, fork, and exit, are made. These notifications are captured and written to an audit log.','Logs generated by auditd may be useful when investigating a security incident as they may help reveal the vulnerable application and the actions taken by a malicious actor.','','Run the following command in Terminal: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.auditd.plist','[{\"cis\": [\"3.1\"]}]'),(9018,'Configure Security Auditing Flags','Auditing is the capture and maintenance of information about security-related events.','Maintaining an audit trail of system activity logs can help identify configuration errors, troubleshoot service disruptions, and analyze compromises or attacks that have occurred, have begun, or are about to begin. Audit logs are necessary to provide a trail of evidence in case the system or network is compromised.','','1. Open a terminal session and edit the /etc/security/audit_control file 2. Find the line beginning with "flags" 3. Add the following flags: lo, ad, fd, fm, -all. 4. Save the file.','[{\"cis\": [\"3.2\"]}]'),(9019,'Disable Bonjour advertising service','Bonjour is an auto-discovery mechanism for TCP/IP devices which enumerate devices and services within a local subnet. DNS on macOS is integrated with Bonjour and should not be turned off, but the Bonjour advertising service can be disabled.','Bonjour can simplify device discovery from an internal rogue or compromised host. An attacker could use Bonjour's multicast DNS feature to discover a vulnerable or poorly- configured service or additional information to aid a targeted attack. Implementing this control disables the continuous broadcasting of "I'm here!" messages. Typical end-user endpoints should not have to advertise services to other computers.','','Run the following command in Terminal: defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements','[{\"cis\": [\"4.1\"]}]'),(9020,'Ensure http server is not running','macOS used to have a graphical front-end to the embedded Apache web server in the Operating System. Personal web sharing could be enabled to allow someone on another computer to download files or information from the user's computer. Personal web sharing from a user endpoint has long been considered questionable and Apple has removed that capability from the GUI. Apache however is still part of the Operating System and can be easily turned on to share files and provide remote connectivity to an end user computer. Web sharing should only be done through hardened web servers and appropriate cloud services.','Web serving should not be done from a user desktop. Dedicated webservers or appropriate cloud storage should be used. Open ports make it easier to exploit the computer.','','Stop the Web Server sudo apachectl stop Ensure that the web server will not auto-start at boot sudo defaults write /System/Library/LaunchDaemons/org.apache.httpd Disabled - bool true','[{\"cis\": [\"4.4\"]}]'),(9021,'Ensure FTP server is not running','macOS used to have a graphical front-end to the embedded FTP server in the Operating System. FTP sharing could be enabled to allow someone on another computer to download files or information from the user's computer. Running an FTP server from a user endpoint has long been considered questionable and Apple has removed that capability from the GUI. The FTP server however is still part of the Operating System and can be easily turned on to share files and provide remote connectivity to an end user computer. FTP servers meet a specialized need to distribute files without strong authentication and should only be done through hardened servers. Cloud services or other distribution methods should be considered','FTP servers should not be run on an end user desktop. Dedicated servers or appropriate cloud storage should be used. Open ports make it easier to exploit the computer.','','Stop the ftp Server sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist','[{\"cis\": [\"4.5\"]}]'),(9022,'Ensure nfs server is not running','macOS can act as an NFS fileserver. NFS sharing could be enabled to allow someone on another computer to mount shares and gain access to information from the user's computer. File sharing from a user endpoint has long been considered questionable and Apple has removed that capability from the GUI. NFSD is still part of the Operating System and can be easily turned on to export shares and provide remote connectivity to an end user computer.','File serving should not be done from a user desktop, dedicated servers should be used. Open ports make it easier to exploit the computer.','','Stop the NFS Server sudo nfsd disable Remove the exported Directory listing rm /etc/export','[{\"cis\": [\"4.6\"]}]'),(9023,'Do not enable the "root" account','The root account is a superuser account that has access privileges to perform any actions and read/write to any file on the computer. With some Linux distros the system administrator may commonly uses the root account to perform administrative functions.','Enabling and using the root account puts the system at risk since any successful exploit or mistake while the root account is in use could have unlimited access privileges within the system. Using the sudo command allows users to perform functions as a root user while limiting and password protecting the access privileges. By default the root account is not enabled on a macOS computer. An administrator can escalate privileges using the sudo command (use -s or -i to get a root shell).','','Open System Preferences, Uses & Groups. Click the lock icon to unlock it. In the Network Account Server section, click Join or Edit. Click Open Directory Utility. Click the lock icon to unlock it. Select the Edit menu > Disable Root User.','[{\"cis\": [\"5.8\"]}]'),(9024,'Disable automatic login','The automatic login feature saves a user's system access credentials and bypasses the login screen, instead the system automatically loads to the user's desktop screen.','Disabling automatic login decreases the likelihood of an unauthorized person gaining access to a system.','','Run the following command in Terminal: sudo defaults delete /Library/Preferences/com.apple.loginwindow autoLoginUser','[{\"cis\": [\"5.9\"]}]'),(9025,'System Integrity Protection status','System Integrity Protection is a security feature introduced in OS X 10.11 El Capitan. System Integrity Protection restricts access to System domain locations and restricts runtime attachment to system processes. Any attempt to attempt to inspect or attach to a system process will fail. Kernel Extensions are now restricted to /Library/Extensions and are required to be signed with a Developer ID.','Running without System Integrity Protection on a production system runs the risk of the modification of system binaries or code injection of system processes that would otherwise be protected by SIP.','','Perform the following while booted in macOS Recovery Partition. 1. Select Terminal from the Utilities menu 2. Run the following command in Terminal: /usr/bin/csrutil enable 3. The output should be: Successfully enabled System Integrity Protection. Please restart the machine for the changes to take effect. 4. Reboot.','[{\"cis\": [\"5.20\"]}]'),(9026,'Disable guest account login','The guest account allows users access to the system without having to create an account or password. Guest users are unable to make setting changes, cannot remotely login to the system and all created files, caches, and passwords are deleted upon logging out.','Disabling the guest account mitigates the risk of an untrusted user doing basic reconnaissance and possibly using privilege escalation attacks to take control of the system.','','Run the following command in Terminal: sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled - bool NO','[{\"cis\": [\"6.1.3\"]}]'),(9027,'Remove Guest home folder','The guest account login should have been disabled, so there is no need for the legacy Guest home folder to remain in the file system. When normal user accounts are removed you have the option to archive it, leave it in place or delete. In the case of the guest folder the folder remains in place without a GUI option to remove it. If at some point in the future a Guest account is needed it will be re-created. The presence of the Guest home folder can cause automated audits to fail when looking for compliant settings within all User folders as well. Rather than ignoring the folders continued existence it is best removed.','The Guest home folders are unneeded after the Guest account is disabled and could be used inappropriately.','','1. Run the following command in Terminal: rm -R /Users/Guest 2. Make sure there is no output','[{\"cis\": [\"6.1.5\"]}]'),(9028,'Turn on filename extensions','A filename extension is a suffix added to a base filename that indicates the base filename's file format.','Visible filename extensions allows the user to identify the file type and the application it is associated with which leads to quick identification of misrepresented malicious files.','','Perform the following to implement the prescribed state: 1. Select Finder 2. Select Preferences 3. Check Show all filename extensions Alternatively, use the following command: defaults write NSGlobalDomain AppleShowAllExtensions -bool true','[{\"cis\": [\"6.2\"]}]'),(9029,'Disable the automatic run of safe files in Safari','Safari will automatically run or execute what it considers safe files. This can include installers and other files that execute on the operating system. Safari bases file safety by using a list of filetypes maintained by Apple. The list of files include text, image, video and archive formats that would be run in the context of the OS rather than the browser.','Hackers have taken advantage of this setting via drive-by attacks. These attacks occur when a user visits a legitimate website that has been corrupted. The user unknowingly downloads a malicious file either by closing an infected pop-up or hovering over a malicious banner. An attacker can create a malicious file that will fall within Safari's safe file list that will download and execute without user input.','','Perform the following to implement the prescribed state: 1. Open Safari 2. Select Safari from the menu bar 3. Select Preferences 4. Select General 5. Uncheck Open "safe" files after downloading Alternatively run the following command in Terminal: defaults write com.apple.Safari AutoOpenSafeDownloads -boolean no','[{\"cis\": [\"6.3\"]}]'),(9500,'Verify all Apple provided software is current','Software vendors release security patches and software updates for their products when security vulnerabilities are discovered. There is no simple way to complete this action without a network connection to an Apple software repository. Please ensure appropriate access for this control. This check is only for what Apple provides through software update.','It is important that these updates be applied in a timely manner to prevent unauthorized persons from exploiting the identified vulnerabilities.','','1. In Terminal, run the following: softwareupdate -l 2. In Terminal, run the following for any packages that show up in step 1: sudo softwareupdate -i packagename','[{\"cis\": [\"1.1\"]}]'),(9501,'Enable Auto Update','Auto Update verifies that your system has the newest security patches and software updates. If "Automatically check for updates" is not selected background updates for new malware definition files from Apple for XProtect and Gatekeeper will not occur.','It is important that a system has the newest updates applied so as to prevent unauthorized persons from exploiting identified vulnerabilities.','','Open a terminal session and enter the following command to enable the auto update feature: sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -int 1','[{\"cis\": [\"1.2\"]}]'),(9502,'Enable app update installs','Ensure that application updates are installed after they are available from Apple. These updates do not require reboots or admin privileges for end users.','Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited','','Open a terminal session and enter the following command to enable the auto update feature: sudo defaults write /Library/Preferences/com.apple.commerce AutoUpdate -bool TRUE The remediation requires a log out and log in to show in the GUI. Please note that.','[{\"cis\": [\"1.3\"]}]'),(9503,'Enable system data files and security update installs','Ensure that system and security updates are installed after they are available from Apple. This setting enables definition updates for XProtect and Gatekeeper, with this setting in place new malware and adware that Apple has added to the list of malware or untrusted software will not execute. These updates do not require reboots or end user admin rights.','Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited','','Open a terminal session and enter the following command to enable install system data files and security updates: sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate ConfigDataInstall -bool true && sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CriticalUpdateInstall -bool true','[{\"cis\": [\"1.4\"]}]'),(9504,'Enable macOS update installs','Ensure that macOS updates are installed after they are available from Apple. This setting enables macOS updates to be automatically installed. Some environments will want to approve and test updates before they are delivered. It is best practice to test first where updates can and have caused disruptions to operations. Automatic updates should be turned off where changes are tightly controlled and there are mature testing and approval processes. Automatic updates should not be turned off so the admin can call the users first to let them know it's ok to install. A dependable repeatable process involving a patch agent or remote management tool should be in place before auto-updates are turned off.','Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited','','Open a terminal session and enter the following command to enable install system data files and security updates: sudo defaults write /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired -bool TRUE','[{\"cis\": [\"1.5\"]}]'),(9505,'Enable "Set time and date automatically"','Correct date and time settings are required for authentication protocols, file creation, modification dates and log entries.','Kerberos may not operate correctly if the time on the Mac is off by more than 5 minutes. This in turn can affect Apple's single sign-on feature, Active Directory logons, and other features.','','Run the following commands: sudo systemsetup -setnetworktimeserver <timeserver> sudo systemsetup -setusingnetworktime on','[{\"cis\": [\"2.2.1\"]}]'),(9506,'Disable Remote Apple Events','Apple Events is a technology that allows one program to communicate with other programs. Remote Apple Events allows a program on one computer to communicate with a program on a different computer.','Disabling Remote Apple Events mitigates the risk of an unauthorized program gaining access to the system.','','Run the following command in Terminal: sudo systemsetup -setremoteappleevents off','[{\"cis\": [\"2.4.1\"]}]'),(9507,'Disable Printer Sharing','By enabling Printer sharing the computer is set up as a print server to accept print jobs from other computers. Dedicated print servers or direct IP printing should be used instead.','Disabling Printer Sharing mitigates the risk of attackers attempting to exploit the print server to gain access to the system.','','Perform the following to implement the prescribed state: 1. Open System Preferences 2. Select Sharing 3. Uncheck Printer Sharing','[{\"cis\": [\"2.4.4\"]}]'),(9508,'Disable Remote Login','Remote Login allows an interactive terminal connection to a computer.','Disabling Remote Login mitigates the risk of an unauthorized person gaining access to the system via Secure Shell (SSH). While SSH is an industry standard to connect to posix servers, the scope of the benchmark is for Apple macOS clients, not servers.','','Run the following command in Terminal: sudo systemsetup -setremotelogin off','[{\"cis\": [\"2.4.5\"]}]'),(9509,'Disable File Sharing','Apple's File Sharing uses a combination of SMB (Windows sharing) and AFP (Mac sharing)','By disabling file sharing, the remote attack surface and risk of unauthorized access to files stored on the system is reduced.','','Run the following command in Terminal to turn off AFP from the command line: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist - Run the following command in Terminal to turn off SMB sharing from the CLI: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.smbd.plist','[{\"cis\": [\"2.4.8\"]}]'),(9510,'Disable "Wake for network access"','This feature allows other users to be able to access your computer's shared resources, such as shared printers or iTunes playlists, even when your computer is in sleep mode. In a closed network when only authorized devices could wake a computer it could be valuable to wake computers in order to do management push activity. Where mobile workstations and agents exist the device will more likely check in to receive updates when already awake. Mobile devices should not be listening for signals on unmanaged network where untrusted devices could send wake signals.','Disabling this feature mitigates the risk of an attacker remotely waking the system and gaining access.','','Run the following command in Terminal: sudo pmset -a womp 0','[{\"cis\": [\"2.5.1\"]}]'),(9511,'Enable FileVault','FileVault secures a system's data by automatically encrypting its boot volume and requiring a password or recovery key to access it.','Encrypting sensitive data minimizes the likelihood of unauthorized users gaining access to it.','','1. Open System Preferences 2. Select Security & Privacy 3. Select FileVault 4. Select Turn on FileVault','[{\"cis\": [\"2.6.1.1\"]}]'),(9512,'Enable Gatekeeper','Gatekeeper is Apple's application white-listing control that restricts downloaded applications from launching. It functions as a control to limit applications from unverified sources from running without authorization.','Disallowing unsigned software will reduce the risk of unauthorized or malicious applications from running on the system.','','Run the following command in Terminal: sudo spctl --master-enable','[{\"cis\": [\"2.6.2\"]}]'),(9513,'Enable Firewall','A firewall is a piece of software that blocks unwanted incoming connections to a system. Apple has posted general documentation about the application firewall.','A firewall minimizes the threat of unauthorized users from gaining access to your system while connected to a network or the Internet.','','Run the following command in Terminal: defaults write /Library/Preferences/com.apple.alf globalstate - int <value> Where <value> is: - 1 = on for specific services - 2 = on for essential services ','[{\"cis\": [\"2.6.3\"]}]'),(9514,'Enable Firewall Stealth Mode','While in Stealth mode the computer will not respond to unsolicited probes, dropping that traffic.','Stealth mode on the firewall minimizes the threat of system discovery tools while connected to a network or the Internet.','','Run the following command in Terminal: sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on','[{\"cis\": [\"2.6.4\"]}]'),(9515,'Enable Secure Keyboard Entry in terminal.app','Secure Keyboard Entry prevents other applications on the system and/or network from detecting and recording what is typed into Terminal.','Enabling Secure Keyboard Entry minimizes the risk of a key logger from detecting what is entered in Terminal.','','Perform the following to implement the prescribed state: 1. Open Terminal 2. Select Terminal 3. Select Secure Keyboard Entry','[{\"cis\": [\"2.10\"]}]'),(9516,'Java 6 is not the default Java runtime','Apple had made Java part of the core Operating System for macOS. Apple is no longer providing Java updates for macOS and updated JREs and JDK are made available by Oracle. The latest version of Java 6 made available by Apple has many unpatched vulnerabilities and should not be the default runtime for Java applets that request one from the Operating System','Java has been one of the most exploited environments and Java 6, which was provided as an OS component by Apple, is no longer maintained by Apple or Oracle. The old versions provided by Apple are both unsupported and missing the more modern security controls that have limited current exploits. The EOL version may still be installed and should be removed from the computer or not be in the default path.','','Java 6 can be removed completely or, if required Java applications will only work with Java 6, a custom path can be used. Apple is likely to finally pull the plug on Java 6 in upcoming macOS versions so any applications that still require Java 6 will likely soon be unavailable.','[{\"cis\": [\"2.11\"]}]'),(9517,'Ensure EFI version is valid and being regularly checked','In order to mitigate firmware attacks Apple has created a automated Firmware check to ensure that the EFI version running is a known good version from Apple. There is also an automated process to check it every seven days.','If the Firmware of a computer has been compromised the Operating System that the Firmware loads cannot be trusted either.','','If EFI does not pass the integrity check you may send a report to Apple. Backing up files and clean installing a known good Operating System and Firmware is recommended.','[{\"cis\": [\"2.13\"]}]'),(9518,'Enable security auditing','macOS's audit facility, auditd, receives notifications from the kernel when certain system calls, such as open, fork, and exit, are made. These notifications are captured and written to an audit log.','Logs generated by auditd may be useful when investigating a security incident as they may help reveal the vulnerable application and the actions taken by a malicious actor.','','Run the following command in Terminal: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.auditd.plist','[{\"cis\": [\"3.1\"]}]'),(9519,'Configure Security Auditing Flags','Auditing is the capture and maintenance of information about security-related events.','Maintaining an audit trail of system activity logs can help identify configuration errors, troubleshoot service disruptions, and analyze compromises or attacks that have occurred, have begun, or are about to begin. Audit logs are necessary to provide a trail of evidence in case the system or network is compromised.','','1. Open a terminal session and edit the /etc/security/audit_control file 2. Find the line beginning with "flags" 3. Add the following flags: lo, ad, fd, fm, -all. 4. Save the file.','[{\"cis\": [\"3.2\"]}]'),(9520,'Disable Bonjour advertising service','Bonjour is an auto-discovery mechanism for TCP/IP devices which enumerate devices and services within a local subnet. DNS on macOS is integrated with Bonjour and should not be turned off, but the Bonjour advertising service can be disabled.','Bonjour can simplify device discovery from an internal rogue or compromised host. An attacker could use Bonjour's multicast DNS feature to discover a vulnerable or poorly- configured service or additional information to aid a targeted attack. Implementing this control disables the continuous broadcasting of "I'm here!" messages. Typical end-user endpoints should not have to advertise services to other computers.','','Run the following command in Terminal: defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements','[{\"cis\": [\"4.1\"]}]'),(9521,'Ensure http server is not running','macOS used to have a graphical front-end to the embedded Apache web server in the Operating System. Personal web sharing could be enabled to allow someone on another computer to download files or information from the user's computer. Personal web sharing from a user endpoint has long been considered questionable and Apple has removed that capability from the GUI. Apache however is still part of the Operating System and can be easily turned on to share files and provide remote connectivity to an end user computer. Web sharing should only be done through hardened web servers and appropriate cloud services.','Web serving should not be done from a user desktop. Dedicated webservers or appropriate cloud storage should be used. Open ports make it easier to exploit the computer.','','Ensure that the Web Server is not running and is not set to start at boot Stop the Web Server: sudo apachectl stop Ensure that the web server will not auto-start at boot sudo: defaults write /System/Library/LaunchDaemons/org.apache.httpd Disabled - bool true','[{\"cis\": [\"4.4\"]}]'),(9522,'Ensure nfs server is not running','macOS can act as an NFS fileserver. NFS sharing could be enabled to allow someone on another computer to mount shares and gain access to information from the user's computer. File sharing from a user endpoint has long been considered questionable and Apple has removed that capability from the GUI. NFSD is still part of the Operating System and can be easily turned on to export shares and provide remote connectivity to an end user computer.','File serving should not be done from a user desktop, dedicated servers should be used. Open ports make it easier to exploit the computer.','','Ensure that the NFS Server is not running and is not set to start at boot Stop the NFS Server: sudo nfsd disable Remove the exported Directory listing: rm /etc/export','[{\"cis\": [\"4.5\"]}]'),(9523,'Do not enable the "root" account','The root account is a superuser account that has access privileges to perform any actions and read/write to any file on the computer. With some Linux distros the system administrator may commonly uses the root account to perform administrative functions.','Enabling and using the root account puts the system at risk since any successful exploit or mistake while the root account is in use could have unlimited access privileges within the system. Using the sudo command allows users to perform functions as a root user while limiting and password protecting the access privileges. By default the root account is not enabled on a macOS computer. An administrator can escalate privileges using the sudo command (use -s or -i to get a root shell).','','Open System Preferences, Uses & Groups. Click the lock icon to unlock it. In the Network Account Server section, click Join or Edit. Click Open Directory Utility. Click the lock icon to unlock it. Select the Edit menu > Disable Root User.','[{\"cis\": [\"5.11\"]}]'),(9524,'Disable automatic login','The automatic login feature saves a user's system access credentials and bypasses the login screen, instead the system automatically loads to the user's desktop screen.','Disabling automatic login decreases the likelihood of an unauthorized person gaining access to a system.','','Run the following command in Terminal: sudo defaults delete /Library/Preferences/com.apple.loginwindow autoLoginUser','[{\"cis\": [\"5.12\"]}]'),(9525,'System Integrity Protection status','System Integrity Protection is a security feature introduced in OS X 10.11 El Capitan. System Integrity Protection restricts access to System domain locations and restricts runtime attachment to system processes. Any attempt to attempt to inspect or attach to a system process will fail. Kernel Extensions are now restricted to /Library/Extensions and are required to be signed with a Developer ID.','Running without System Integrity Protection on a production system runs the risk of the modification of system binaries or code injection of system processes that would otherwise be protected by SIP.','','Perform the following while booted in macOS Recovery Partition. 1. Select Terminal from the Utilities menu 2. Run the following command in Terminal: /usr/bin/csrutil enable 3. The output should be: Successfully enabled System Integrity Protection. Please restart the machine for the changes to take effect. 4. Reboot.','[{\"cis\": [\"5.23\"]}]'),(9526,'Disable guest account login','The guest account allows users access to the system without having to create an account or password. Guest users are unable to make setting changes, cannot remotely login to the system and all created files, caches, and passwords are deleted upon logging out.','Disabling the guest account mitigates the risk of an untrusted user doing basic reconnaissance and possibly using privilege escalation attacks to take control of the system.','','Run the following command in Terminal: sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled - bool NO','[{\"cis\": [\"6.1.3\"]}]'),(9527,'Remove Guest home folder','The guest account login should have been disabled, so there is no need for the legacy Guest home folder to remain in the file system. When normal user accounts are removed you have the option to archive it, leave it in place or delete. In the case of the guest folder the folder remains in place without a GUI option to remove it. If at some point in the future a Guest account is needed it will be re-created. The presence of the Guest home folder can cause automated audits to fail when looking for compliant settings within all User folders as well. Rather than ignoring the folders continued existence it is best removed.','The Guest home folders are unneeded after the Guest account is disabled and could be used inappropriately.','','1. Run the following command in Terminal: rm -R /Users/Guest 2. Make sure there is no output','[{\"cis\": [\"6.1.5\"]}]'),(9528,'Turn on filename extensions','A filename extension is a suffix added to a base filename that indicates the base filename's file format.','Visible filename extensions allows the user to identify the file type and the application it is associated with which leads to quick identification of misrepresented malicious files.','','Perform the following to implement the prescribed state: 1. Select Finder 2. Select Preferences 3. Check Show all filename extensions Alternatively, use the following command: defaults write NSGlobalDomain AppleShowAllExtensions -bool true','[{\"cis\": [\"6.2\"]}]'),(9529,'Disable the automatic run of safe files in Safari','Safari will automatically run or execute what it considers safe files. This can include installers and other files that execute on the operating system. Safari bases file safety by using a list of filetypes maintained by Apple. The list of files include text, image, video and archive formats that would be run in the context of the OS rather than the browser.','Hackers have taken advantage of this setting via drive-by attacks. These attacks occur when a user visits a legitimate website that has been corrupted. The user unknowingly downloads a malicious file either by closing an infected pop-up or hovering over a malicious banner. An attacker can create a malicious file that will fall within Safari's safe file list that will download and execute without user input.','','Perform the following to implement the prescribed state: 1. Open Safari 2. Select Safari from the menu bar 3. Select Preferences 4. Select General 5. Uncheck Open "safe" files after downloading Alternatively run the following command in Terminal: defaults write com.apple.Safari AutoOpenSafeDownloads -boolean no','[{\"cis\": [\"6.3\"]}]'),(10000,'Ensure the WebDAV Modules Are Disabled','The Apache mod_dav and mod_dav_fs modules support WebDAV (Web-based Distributed Authoring and Versioning) functionality for Apache. WebDAV is an extension to the HTTP protocol which allows clients to create, move, and delete files and resources on the web server.','Disabling WebDAV modules will improve the security posture of the web server by reducing the amount of potentially vulnerable code paths exposed to the network and reducing potential for unauthorized access to files via misconfigured WebDAV access controls.','','Perform either one of the following to disable WebDAV module: 1. For source builds with static modules run the Apache ./configure script without including the mod_dav, and mod_dav_fs in the --enable-modules=configure script options. $ cd $DOWNLOAD_HTTPD $ ./configure 2. For dynamically loaded modules comment out or remove the LoadModule directive for mod_dav, and mod_dav_fs modules from the httpd.conf file. ##LoadModule dav_module modules/mod_dav.so ##LoadModule dav_fs_module modules/mod_dav_fs.so','[{\"cis\": [\"2.3\"]}, {\"cis_csc\": [\"9.1\", \"9.2\"]}]'),(10001,'Ensure the Status Module Is Disabled','The Apache mod_status module provides current server performance statistics.','When mod_status is loaded into the server, its handler capability is available in all configuration files, including per-directory files (e.g., .htaccess). The mod_status module may provide an adversary with information that can be used to refine exploits that depend on measuring server load.','','Perform either one of the following to disable the mod_status module: 1) For source builds with static modules, run the Apache ./configure script with the --disable-status configure script options. 2) For dynamically loaded modules, comment out or remove the LoadModule directive for the mod_status module from the httpd.conf file. ##LoadModule status_module modules/mod_status.so','[{\"cis\": [\"2.4\"]}, {\"cis_csc\": [\"9.1\", \"9.2\"]}]'),(10002,'Ensure the Autoindex Module Is Disabled','The Apache mod_autoindex module automatically generates a web page listing the contents of directories on the server, typically used so an index.html does not have to be generated.','Automated directory listings should not be enabled because they will reveal information helpful to an attacker such as naming conventions and directory paths. They may also reveal files that were not intended to be revealed.','','Perform either one of the following to disable the mod_autoindex module: 1. For source builds with static modules, run the Apache ./configure script with the --disable-autoindex configure script options. $ cd $DOWNLOAD_HTTPD $ ./configure -disable-autoindex. 2. For dynamically loaded modules, comment out or remove the LoadModule directive for mod_autoindex from the httpd.conf file. ## LoadModule autoindex_module modules/mod_autoindex.so','[{\"cis\": [\"2.5\"]}, {\"cis_csc\": [\"18\", \"5.1\"]}]'),(10003,'Ensure the Proxy Modules Are Disabled','The Apache proxy modules allow the server to act as a proxy (either forward or reverse proxy) of HTTP and other protocols with additional proxy modules loaded. If the Apache installation is not intended to proxy requests to or from another network then the proxy module should not be loaded.','Proxy servers can act as an important security control when properly configured, however a secure proxy server is not within the scope of this benchmark. A web server should be primarily a web server or a proxy server but not both, for the same reasons that other multi-use servers are not recommended. Scanning for web servers that will also proxy requests is a very common attack, as proxy servers are useful for anonymizing attacks on other servers, or possibly proxying requests into an otherwise protected network.','','Perform either one of the following to disable the proxy module: 1. For source builds with static modules, run the Apache ./configure script without including the mod_proxy in the --enable-modules=configure script options. $ cd $DOWNLOAD_HTTPD $ ./configure 2. For dynamically loaded modules, comment out or remove the LoadModule directive for mod_proxy module and all other proxy modules from the httpd.conf file. ##LoadModule proxy_module modules/mod_proxy.so ##LoadModule proxy_connect_module modules/mod_proxy_connect.so ##LoadModule proxy_ftp_module modules/mod_proxy_ftp.so ##LoadModule proxy_http_module modules/mod_proxy_http.so ##LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so ##LoadModule proxy_scgi_module modules/mod_proxy_scgi.so ##LoadModule proxy_ajp_module modules/mod_proxy_ajp.so ##LoadModule proxy_balancer_module modules/mod_proxy_balancer.so ##LoadModule proxy_express_module modules/mod_proxy_express.so ##LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so ##LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so','[{\"cis\": [\"2.6\"]}, {\"cis_csc\": [\"9.1\", \"9.2\"]}]'),(10004,'Ensure the User Directories Module Is Disabled','The UserDir directive must be disabled so that user home directories are not accessed via the web site with a tilde (~) preceding the username. The directive also sets the path name of the directory that will be accessed.','The user directories should not be globally enabled since that allows anonymous access to anything users may want to share with other users on the network. Also consider that every time a new account is created on the system, there is potentially new content available via the web site.','','Perform either one of the following to disable the user directories module: 1. For source builds with static modules, run the Apache ./configure script with the --disable-userdir configure script options. $ cd $DOWNLOAD_HTTPD $ ./configure --disable-userdir 2. For dynamically loaded modules, comment out or remove the LoadModule directive for mod_userdir module from the httpd.conf file. ##LoadModule userdir_module modules/mod_userdir.so','[{\"cis\": [\"2.7\"]}, {\"cis_csc\": [\"18\", \"5.1\"]}]'),(10005,'Ensure the Info Module Is Disabled','The Apache mod_info module provides information on the server configuration via access to a /server-info URL location.','While having server configuration information available as a web page may be convenient it is recommended that this module NOT be enabled. Once mod_info is loaded into the server, its handler capability is available in per-directory .htaccess files and can leak sensitive information from the configuration directives of other Apache modules such as system paths, usernames/passwords, database names, etc.','','Perform either one of the following to disable the mod_info module: 1. For source builds with static modules, run the Apache ./configure script without including the mod_info in the --enable-modules=configure script options. $ cd $DOWNLOAD_HTTPD $ ./configure 2. For dynamically loaded modules, comment out or remove the LoadModule directive for the mod_info module from the httpd.conf file. ##LoadModule info_module modules/mod_info.so','[{\"cis\": [\"2.8\"]}, {\"cis_csc\": [\"9.1\", \"9.2\"]}]'),(10006,'Ensure the Apache User Account Has an Invalid Shell','The apache account must not be used as a regular login account, so it should be assigned an invalid or nologin shell to ensure it cannot be used to login.','Service accounts such as the apache account are a risk if they can be used to get a login shell to the system.','','Change the apache account to use the nologin shell or an invalid shell such as /dev/null: # chsh -s /sbin/nologin apache','[{\"cis\": [\"3.2\"]}, {\"cis_csc\": [\"16\", \"4.3\"]}]'),(10007,'Ensure the Apache User Account Is Locked','The user account under which Apache runs should not have a valid password, but should be locked.','As a defense-in-depth measure the Apache user account should be locked to prevent logins, and to prevent a user from suing to apache using the password. In general, there should not be a need for anyone to have to su as apache, and when there is a need, then sudo should be used instead, which would not require the apache account password.','','Use the passwd command to lock the apache account: # passwd -l apache','[{\"cis\": [\"3.3\"]}, {\"cis_csc\": [\"16\", \"16.8\"]}]'),(10008,'Ensure OverRide Is Disabled for All Directories','The Apache AllowOverride directive and the new AllowOverrideList directive allow for .htaccess files to be used to override much of the configuration, including authentication, handling of document types, auto generated indexes, access control, and options. When the server finds an .htaccess file (as specified by AccessFileName) it needs to know which directives declared in that file can override earlier access information. When this directive is set to None, then .htaccess files are completely ignored. In this case, the server will not even attempt to read .htaccess files in the filesystem. When this directive is set to All, then any directive which has the .htaccess context is allowed in .htaccess files.','.htaccess files decentralizes access control and increases the risk of server configuration being changed inappropriately.','','Perform the following to implement the recommended state: 1. Search the Apache configuration files (httpd.conf and any included configuration files) to find AllowOverride directives. 2. Set the value for all AllowOverride directives to None. 3. Remove any AllowOverrideList directives found.','[{\"cis\": [\"4.4\"]}, {\"cis_csc\": [\"14.4\", \"14.6\"]}]'),(10009,'Ensure Options for Other Directories Are Minimized','The Apache Options directive allows for specific configuration of options, including execution of CGI, following symbolic links, server side includes, and content negotiation.','Likewise, the options for other directories and hosts needs to be restricted to the minimal options required. A setting of None is recommended, however it is recognized that other options may be needed in some cases: Multiviews, FollowSymbolicLinks & SymLinksIfOwnerMatch, ExecCGI, Includes & IncludesNOEXEC, & Indexes.','','Perform the following to implement the recommended state: 1. Search the Apache configuration files (httpd.conf and any included configuration files) to find all <Directory> elements. 2. Add or modify any existing Options directive to NOT have a value of Includes. Other options may be set if necessary and appropriate as described above.','[{\"cis\": [\"5.3\"]}, {\"cis_csc\": [\"18\", \"5.1\"]}]'),(10010,'Ensure Default HTML Content Is Removed','Apache installations have default content that is not needed or appropriate for production use. The primary function for the sample content is to provide a default web site, provide user manuals, or demonstrate special features of the web server. All content that is not needed should be removed.','Historically, sample content and features have been remotely exploited and can provide different levels of access to the server. Usually these routines are not written for production use and consequently little thought was given to security in their development.','','Review all pre-installed content and remove content which is not required. In particular look for the unnecessary content which may be found in the document root directory, a configuration directory such as conf/extra directory, or as a Unix/Linux package. 1. Remove the default index.html or welcome page if it is a separate package. If it is part of main Apache httpd package such as it is on Red Hat Linux, then comment out the configuration as shown below. Removing a file such as the welcome.conf, is not recommended as it may get replaced if the package is updated. 2. Remove the Apache user manual content or comment out configurations referencing the manual. # yum erase httpd-manual 3. Remove or comment out any Server Information handler configuration. 4. Remove or comment out any other handler configuration such as perl-status.','[{\"cis\": [\"5.4\"]}, {\"cis_csc\": [\"18.9\", \"5.1\"]}]'),(10011,'Ensure the Default CGI Content printenv Script Is Removed','Most Web Servers, including Apache installations have default CGI content which is not needed or appropriate for production use. The primary function for these sample programs is to demonstrate the capabilities of the web server. One common default CGI content for Apache installations is the script printenv. This script will print back to the requester all of the CGI environment variables which includes many server configuration details and system paths.','CGI programs have a long history of security bugs and problems associated with improperly accepting user-input. Since these programs are often targets of attackers, we need to make sure that there are no unnecessary CGI programs that could potentially be used for malicious purposes. Usually these programs are not written for production use and consequently little thought was given to security in their development. The printenv script in particular will disclose inappropriate information about the web server including directory paths and detailed version and configuration information.','','Perform the following to implement the recommended state: 1. Locate cgi-bin files and directories enabled in the Apache configuration via Script, ScriptAlias, ScriptAliasMatch, or ScriptInterpreterSource directives. 2. Remove the printenvdefault CGI in cgi-bin directory if it is installed. # rm $APACHE_PREFIX/cgi-bin/printenv','[{\"cis\": [\"5.5\"]}, {\"cis_csc\": [\"18\", \"4.7\"]}]'),(10012,'Ensure the Default CGI Content test-cgi Script Is Removed','Most Web Servers, including Apache installations have default CGI content which is not needed or appropriate for production use. The primary function for these sample programs is to demonstrate the capabilities of the web server. A common default CGI content for Apache installations is the script test-cgi. This script will print back to the requester CGI environment variables which includes many server configuration details.','CGI programs have a long history of security bugs and problems associated with improperly accepting user-input. Since these programs are often targets of attackers, we need to make sure that there are no unnecessary CGI programs that could potentially be used for malicious purposes. Usually these programs are not written for production use and consequently little thought was given to security in their development. The test-cgi script in particular will disclose inappropriate information about the web server including directory paths and detailed version and configuration information.','','Perform the following to implement the recommended state: 1. Locate cgi-bin files and directories enabled in the Apache configuration via Script, ScriptAlias, ScriptAliasMatch, or ScriptInterpreterSource directives. 2. Remove the test-cgi default CGI in cgi-bin directory if it is installed. # rm $APACHE_PREFIX/cgi-bin/test-cgi','[{\"cis\": [\"5.6\"]}, {\"cis_csc\": [\"18.9\", \"4.7\"]}]'),(10013,'Ensure the HTTP TRACE Method Is Disabled','Use the Apache TraceEnable directive to disable the HTTP TRACE request method.','The HTTP 1.1 protocol requires support for the TRACE request method which reflects the request back as a response and was intended for diagnostics purposes. The TRACE method is not needed and is easily subjected to abuse and should be disabled.','','Perform the following to implement the recommended state: 1. Locate the main Apache configuration file such as httpd.conf. 2. Add a TraceEnable directive to the server level configuration with a value of off. Server level configuration is the top-level configuration, not nested within any other directives like <Directory> or <Location>.','[{\"cis\": [\"5.8\"]}, {\"cis_csc\": [\"9.1\", \"9.2\"]}]'),(10014,'Ensure the IP Addresses for Listening for Requests Are Specified','The Apache Listen directive specifies the IP addresses and port numbers the Apache web server will listen for requests. Rather than be unrestricted to listen on all IP addresses available to the system, the specific IP address or addresses intended should be explicitly specified. Specifically, a Listen directive with no IP address specified, or with an IP address of zeros should not be used.','Having multiple interfaces on web servers is fairly common, and without explicit Listen directives, the web server is likely to be listening on an inappropriate IP address / interface that was not intended for the web server. Single homed system with a single IP addressed are also required to have an explicit IP address in the Listen directive, in case additional interfaces are added to the system at a later date.','','Perform the following to implement the recommended state: 1. Find any Listen directives in the Apache configuration file with no IP address specified, or with an IP address of all zeros similar to the examples below. Keep in mind there may be both IPv4 and IPv6 addresses on the system. 2. Modify the Listen directives in the Apache configuration file to have explicit IP addresses according to the intended usage. Multiple Listen directives may be specified for each IP address & Port.','[{\"cis\": [\"5.13\"]}, {\"cis_csc\": [\"9.1\", \"9.2\"]}]'),(10015,'Ensure Browser Framing Is Restricted','The Header directive allows server HTTP response headers to be added, replaced or merged. We will use the directive to add a server HTTP response header to tell browsers to restrict all of the web pages from being framed by other web sites.','Using iframes and regular web frames to embed malicious content along with expected web content has been a favored attack vector for attacking web clients for a long time. This can happen when the attacker lures the victim to a malicious web site, which using frames to include the expected content from the legitimate site. The attack can also be performed via XSS (either reflected, DOM or stored XSS) to add the malicious content to the legitimate web site. To combat this vector, an HTTP Response header, X-Frame-Options, has been introduced that allows a server to specify whether a web page may be loaded in any frame (DENY) or those frames that share the pages origin (SAMEORIGIN).','','Perform the following to implement the recommended state: Add or modify the Header directive for the X-Frames-Options header in the Apache configuration to have the condition always, an action of append and a value of SAMEORIGIN or DENY, as shown below. Header always append X-Frame-Options SAMEORIGIN','[{\"cis\": [\"5.14\"]}, {\"cis_csc\": [\"18\", \"5.1\"]}]'),(10016,'Ensure Insecure SSL Renegotiation Is Not Enabled','A man-in-the-middle renegotiation attack was discovered in SSLv3 and TLSv1 in November, 2009 (CVE-2009-3555). First, a work around and then a fix was approved as an Internet Standard as RFC 574, Feb 2010. The work around, which removes the renegotiation, is available from OpenSSL as of version 0.9.8l and newer versions. For details: https://www.openssl.org/news/secadv_20091111.txt The SSLInsecureRenegotiation directive was added in Apache 2.2.15, for web servers linked with OpenSSL version 0.9.8m or later, to provide backward compatibility to clients with the older, unpatched SSL implementations.','Enabling the SSLInsecureRenegotiation directive leaves the server vulnerable to man-in- the-middle renegotiation attack. Therefore, the SSLInsecureRenegotiation directive should not be enabled.','','Perform the following to implement the recommended state: Search the Apache configuration files for the SSLInsecureRenegotiation directive. If the directive is present modify the value to be off. If the directive is not present then no action is required. SSLInsecureRenegotiation off','[{\"cis\": [\"7.6\"]}, {\"cis_csc\": [\"14.2\", \"14.4\"]}]'),(10017,'Ensure SSL Compression is Not Enabled','The SSLCompression directive controls whether SSL compression is used by Apache when serving content over HTTPS. It is recommended that the SSLCompression directive be set to off.','If SSL compression is enabled, HTTPS communication between the client and the server may be at increased risk to the CRIME attack. The CRIME attack increases a malicious actor's ability to derive the value of a session cookie, which commonly contains an authenticator. If the authenticator in a session cookie is derived, it can be used to impersonate the account associated with the authenticator.','','Perform the following to implement the recommended state: 1. Search the Apache configuration files for the SSLCompression directive. 2. If the directive is present, set it to off.','[{\"cis\": [\"7.7\"]}, {\"cis_csc\": [\"14.2\", \"14.4\"]}]'),(10018,'Ensure ServerTokens is Set to 'Prod' or 'ProductOnly'','Configure the Apache ServerTokens directive to provide minimal information. By setting the value to Prod or ProductOnly. The only version information given in the server HTTP response header will be Apache rather than details on modules and versions installed.','Information is power and identifying web server details greatly increases the efficiency of any attack, as security vulnerabilities are extremely dependent upon specific software versions and configurations. Excessive probing and requests may cause too much 'noise' being generated and may tip off an administrator. If an attacker can accurately target their exploits, the chances of successful compromise prior to detection increase dramatically. Script Kiddies are constantly scanning the Internet and documenting the version information openly provided by web servers. The purpose of this scanning is to accumulate a database of software installed on those hosts, which can then be used when new vulnerabilities are released.','','Perform the following to implement the recommended state: Add or modify the ServerTokens directive as shown below to have the value of Prod or ProductOnly: ServerTokens Prod','[{\"cis\": [\"8.1\"]}, {\"cis_csc\": [\"18.9\", \"14.7\"]}]'),(10019,'Ensure ServerSignature Is Not Enabled','Disable the server signatures which generates a signature line as a trailing footer at the bottom of server generated documents such as error pages.','Server signatures are helpful when the server is acting as a proxy, since it helps the user distinguish errors from the proxy rather than the destination server, however in this context there is no need for the additional information.','','Perform the following to implement the recommended state: Add or modify the ServerSignature directive to have the value of Off: ServerSignature Off','[{\"cis\": [\"8.2\"]}, {\"cis_csc\": [\"18\", \"13.2\"]}]'),(10020,'Ensure the TimeOut Is Set to 10 or Less','Denial of Service (DoS) is an attack technique with the intent of preventing a web site from serving normal user activity. DoS attacks, which are normally applied to the network layer, are also possible at the application layer. These malicious attacks can succeed by starving a system of critical resources, vulnerability exploit, or abuse of functionality. Although there is no 100% solution for preventing DoS attacks, the following recommendation uses the Timeout directive to mitigate some of the risk, by requiring more effort for a successful DoS attack. Of course, DoS attacks can happen in rather unintentional ways as well as intentional and these directives will help in many of those situations as well.','One common technique for DoS is to initiate many connections to the server. By decreasing the timeout for old connections and we allow the server to free up resources more quickly and be more responsive. By making the server more efficient, it will be more resilient to DoS conditions. The Timeout directive affects several timeout values for Apache, so review the Apache document carefully.','','Perform the following to implement the recommended state: Add or modify the Timeout directive in the Apache configuration to have a value of 10 seconds or shorter. Timeout 10','[{\"cis\": [\"9.1\"]}, {\"cis_csc\": [\"9\", \"5.1\"]}]'),(10021,'Ensure KeepAlive Is Enabled','The KeepAlive directive controls whether Apache will reuse the same TCP connection per client to process subsequent HTTP requests from that client. It is recommended that the KeepAlive directive be set to On.','Allowing per-client reuse of TCP sockets reduces the amount of system and network resources required to serve requests. This efficiency gain may improve a server resiliency to DoS attacks.','','Perform the following to implement the recommended state: Add or modify the KeepAlive directive in the Apache configuration to have a value of On, so that KeepAlive connections are enabled. KeepAlive On','[{\"cis\": [\"9.2\"]}, {\"cis_csc\": [\"9\", \"5.1\"]}]'),(10022,'Ensure MaxKeepAliveRequests is Set to a Value of 100 or Greater','The MaxKeepAliveRequests directive limits the number of requests allowed per connection when KeepAlive is on. If it is set to 0, unlimited requests will be allowed.','The MaxKeepAliveRequests directive is important to be used to mitigate the risk of Denial of Service (DoS) attack technique by reducing the overhead imposed on the server. The KeepAlive directive must be enabled before it is effective. Enabling KeepAlives allows for multiple HTTP requests to be sent while keeping the same TCP connection alive. This reduces the overhead of having to setup and tear down TCP connections for each request. By making the server more efficient, it will be more resilient to DoS conditions.','','Perform the following to implement the recommended state: Add or modify the MaxKeepAliveRequests directive in the Apache configuration to have a value of 100 or more. MaxKeepAliveRequests 100','[{\"cis\": [\"9.3\"]}, {\"cis_csc\": [\"9\", \"5.1\"]}]'),(10023,'Ensure KeepAliveTimeout is Set to a Value of 15 or Less','The KeepAliveTimeout directive specifies the number of seconds Apache will wait for a subsequent request before closing a connection that is being kept alive.','The KeepAliveTimeout directive is used mitigate some of the risk, by requiring more effort for a successful DoS attack. By enabling KeepAlive and keeping the timeout relatively low for old connections and we allow the server to free up resources more quickly and be more responsive.','','Perform the following to implement the recommended state: Add or modify the KeepAliveTimeout directive in the Apache configuration to have a value of 15 or less. KeepAliveTimeout 15','[{\"cis\": [\"9.4\"]}, {\"cis_csc\": [\"9\", \"5.1\"]}]'),(10024,'Ensure the Timeout Limits for Request Headers is Set to 40 or Less','The RequestReadTimeout directive allows configuration of timeout limits for client requests. The header portion of the directive provides for an initial timeout value, a maximum timeout and a minimum rate. The minimum rate specifies that after the initial timeout, the server will wait an additional 1 second for each N bytes received. The recommended setting is to have a maximum timeout of 40 seconds or less. Keep in mind that for SSL/TLS virtual hosts the time for the TLS handshake must fit within the timeout.','Setting a request header timeout is vital for mitigating Denial of Service attacks based on slow requests. The slow request attacks are particularly lethal and relative easy to perform, because they require very little bandwidth and can easily be done through anonymous proxies. Starting in June 2009 with the Slow Loris DoS attack, which used a slow GET request as published by Robert Hansen (RSnake) on his blog http://ha.ckers.org/slowloris/. Later in November 2010 at the OWASP App Sec DC conference Wong Onn Chee demonstrated a slow POST request attack which was even more effective.','','Perform the following to implement the recommended state: 1. Load the mod_requesttimeout module in the Apache configuration with the following configuration. LoadModule reqtimeout_module modules/mod_reqtimeout.so 2. Add a RequestReadTimeout directive similar to the one below with the maximum request header timeout value of 40 seconds or less. RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500','[{\"cis\": [\"9.5\"]}, {\"cis_csc\": [\"9\", \"5.1\"]}]'),(10025,'Ensure Timeout Limits for the Request Body is Set to 20 or Less','The RequestReadTimeout directive also allows setting timeout values for the body portion of a request. The directive provides for an initial timeout value, and a maximum timeout and minimum rate. The minimum rate specifies that after the initial timeout, the server will wait an additional 1 second for each N bytes are received. The recommended setting is to have a maximum timeout of 20 seconds or less. The default value is body=20,MinRate=500.','It is not sufficient to timeout only on the header portion of the request, as the server will still be vulnerable to attacks like the OWASP Slow POST attack, which provide the body of the request very slowly. Therefore, the body portion of the request must have a timeout as well. A timeout of 20 seconds or less is recommended.','','Perform the following to implement the recommended state: 1. Load the mod_requesttimeout module in the Apache configuration with the following configuration. LoadModule reqtimeout_module modules/mod_reqtimeout.so 2. Add a RequestReadTimeout directive similar to the one below with the maximum request body timeout value of 20 seconds or less. RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500','[{\"cis\": [\"9.6\"]}, {\"cis_csc\": [\"9\", \"5.1\"]}]'),(10026,'Ensure the LimitRequestLine directive is Set to 512 or less','Buffer Overflow attacks attempt to exploit an application by providing more data than the application buffer can contain. If the application allows copying data to the buffer to overflow the boundaries of the buffer, then the application is vulnerable to a buffer overflow. The results of Buffer overflow vulnerabilities vary, and may result in the application crashing, or may allow the attacker to execute instructions provided in the data. The Apache LimitRequest* directives allow the Apache web server to limit the sizes of requests and request fields and can be used to help protect programs and applications processing those requests. Specifically, the LimitRequestLine directive limits the allowed size of a client's HTTP request-line, which consists of the HTTP method, URI, and protocol version.','The limiting of the size of the request line is helpful so that the web server can prevent an unexpectedly long or large request from being passed to a potentially vulnerable CGI program, module or application that would have attempted to process the request. Of course, the underlying dependency is that we need to set the limits high enough to not interfere with any one application on the server, while setting them low enough to be of value in protecting the applications. Since the configuration directive is available only at the server configuration level, it is not possible to tune the value for different portions of the same web server. Please read the Apache documentation carefully, as these requests may interfere with the expected functionality of some web applications.','','Perform the following to implement the recommended state: Add or modify the LimitRequestline directive in the Apache configuration to have a value of 512 or shorter. LimitRequestline 512','[{\"cis\": [\"10.1\"]}, {\"cis_csc\": [\"9\", \"5.1\"]}]'),(10027,'Ensure the LimitRequestFields Directive is Set to 100 or Less','The LimitRequestFields directive limits the number of fields allowed in an HTTP request.','The limiting of the number of fields is helpful so that the web server can prevent an unexpectedly high number of fields from being passed to a potentially vulnerable CGI program, module or application that would have attempted to process the request. Of course, the underlying dependency is that we need to set the limits high enough to not interfere with any one application on the server, while setting them low enough to be of value in protecting the applications. Since the configuration directives are available only at the server configuration level, it is not possible to tune the value for different portions of the same web server. Please read the Apache documentation carefully, as these requests may interfere with the expected functionality of some web applications.','','Perform the following to implement the recommended state: Add or modify the LimitRequestFields directive in the Apache configuration to have a value of 100 or less. If the directive is not present the default depends on a compile time configuration, but defaults to a value of 100. LimitRequestFields 100','[{\"cis\": [\"10.2\"]}, {\"cis_csc\": [\"9\", \"5.1\"]}]'),(10028,'Ensure the LimitRequestFieldsize Directive is Set to 1024 or Less','The LimitRequestFieldSize limits the number of bytes that will be allowed in an HTTP request header. It is recommended that the LimitRequestFieldSize directive be set to 1024 or less.','By limiting of the size of request headers is helpful so that the web server can prevent an unexpectedly long or large value from being passed to exploit a potentially vulnerable program. Of course, the underlying dependency is that we need to set the limits high enough to not interfere with any one application on the server, while setting them low enough to be of value in protecting the applications. Since the configuration directives are available only at the server configuration level, it is not possible to tune the value for different portions of the same web server. Please read the Apache documentation carefully, as these requests may interfere with the expected functionality of some web applications.','','Perform the following to implement the recommended state: Add or modify the LimitRequestFieldsize directive in the Apache configuration to have a value of 1024 or less. LimitRequestFieldsize 1024','[{\"cis\": [\"10.3\"]}, {\"cis_csc\": [\"9\", \"5.1\"]}]'),(10029,'Ensure the LimitRequestBody Directive is Set to 102400 or Less','The LimitRequestBody directive limits the number of bytes that are allowed in a request body. Size of requests may vary greatly; for example, during a file upload the size of the file must fit within this limit.','The limiting of the size of the request body is helpful so that the web server can prevent an unexpectedly long or large request from being passed to a potentially vulnerable program. Of course, the underlying dependency is that we need to set the limits high enough to not interfere with any one application on the server, while setting them low enough to be of value in protecting the applications. The LimitRequestBody may be configured on a per directory, or per location context. Please read the Apache documentation carefully, as these requests may interfere with the expected functionality of some web applications.','','Perform the following to implement the recommended state: Add or modify the LimitRequestBody directive in the Apache configuration to have a value of 102400 (100K) or less. Please read the Apache documentation so that it is understood that this directive will limit the size of file up-loads to the web server. LimitRequestBody 102400','[{\"cis\": [\"10.4\"]}, {\"cis_csc\": [\"9\", \"5.1\"]}]'),(10500,'Disable MySQL Command History','On Linux/UNIX, the MySQL client logs statements executed interactively to a history file. By default, this file is named .mysql_history in the user's home directory. Most interactive commands run in the MySQL client application are saved to a history file. The MySQL command history should be disabled.','Disabling the MySQL command history reduces the probability of exposing sensitive information, such as passwords and encryption keys.','','Perform the following steps: 1. Remove .mysql_history if it exists. And 2. Set the MYSQL_HISTFILE environment variable to /dev/null. This will need to be placed in the shell's startup script. Or Create $HOME/.mysql_history as a symbolic to /dev/null.','[{\"cis\": [\"1.3\"]}]'),(10501,'Disable Interactive Login','When created, the MySQL user may have interactive access to the operating system, which means that the MySQL user could login to the host as any other user would.','Preventing the MySQL user from logging in interactively may reduce the impact of a compromised MySQL account. There is also more accountability as accessing the operating system where the MySQL server lies will require the user's own account. Interactive access by the MySQL user is unnecessary and should be disabled.','','Execute one of the following commands in a terminal: 'usermod -s /bin/false mysql' or 'usermod -s /sbin/nologin mysql'','[{\"cis\": [\"1.5\"]}]'),(10502,'Verify That 'MYSQL_PWD' Is Not Set In Users' Profiles','MySQL can read a default database password from an environment variable called MYSQL_PWD.','The use of the MYSQL_PWD environment variable implies the clear text storage of MySQL credentials. Avoiding this may increase assurance that the confidentiality of MySQL credentials is preserved.','','Check which users and/or scripts are setting MYSQL_PWD and change them to use a more secure method.','[{\"cis\": [\"1.6\"]}]'),(10503,'Ensure 'allow-suspicious-udfs' Is Set to 'FALSE'','This option prevents attaching arbitrary shared library functions as user-defined functions by checking for at least one corresponding method named _init, _deinit, _reset, _clear, or _add.','Preventing shared libraries that do not contain user-defined functions from loading will reduce the attack surface of the server.','','Remove '--allow-suspicious-udfs' from the 'mysqld' start up command line. Or Remove 'allow-suspicious-udfs' from the MySQL option file.','[{\"cis\": [\"4.3\"]}]'),(10504,'Ensure 'local_infile' is Disabled','The 'local_infile' parameter dictates whether files located on the MySQL client's computer can be loaded or selected via 'LOAD DATA INFILE' or 'SELECT local_file'.','Disabling 'local_infile' reduces an attacker's ability to read sensitive files off the affected server via a SQL injection vulnerability.','','Add a line local-infile=0 in the [mysqld] section of the MySQL configuration file and restart the MySQL service.','[{\"cis\": [\"4.4\"]}]'),(10505,'Ensure 'mysqld' Is Not Started with '--skip-grant-tables'','This option causes mysqld to start without using the privilege system.','If this option is used, all clients of the affected server will have unrestricted access to all databases.','','Open the MySQL configuration (e.g. my.cnf) file and set: skip-grant-tables = FALSE','[{\"cis\": [\"4.5\"]}]'),(10506,'Ensure '--skip-symbolic-links' Is Enabled','The symbolic-links and skip-symbolic-links options for MySQL determine whether symbolic link support is available. When use of symbolic links are enabled, they have different effects depending on the host platform. When symbolic links are disabled, then symbolic links stored in files or entries in tables are not used by the database. ','Prevents sym links being used for data base files. This is especially important when MySQL is executing as root as arbitrary files may be overwritten. The symbolic-links option might allow someone to direct actions by to MySQL server to other files and/or directories.','','Open the MySQL configuration file (my.cnf), locate 'skip_symbolic_links' and set it to YES. If the option does not exist, create it in the 'mysqld' section.','[{\"cis\": [\"4.6\"]}]'),(10507,'Ensure 'secure_file_priv' is not empty','The secure_file_priv option restricts to paths used by LOAD DATA INFILE or SELECT local_file. It is recommended that this option be set to a file system location that contains only resources expected to be loaded by MySQL.','Setting secure_file_priv reduces an attacker's ability to read sensitive files off the affected server via a SQL injection vulnerability. ','','Add the line secure_file_priv=<path_to_load_directory> to the [mysqld] section of the MySQL configuration file and restart the MySQL service.','[{\"cis\": [\"4.8\"]}]'),(10508,'Ensure 'sql_mode' Contains 'STRICT_ALL_TABLES'','When data changing statements are made (i.e. INSERT, UPDATE), MySQL can handle invalid or missing values differently depending on whether strict SQL mode is enabled. When strict SQL mode is enabled, data may not be truncated or otherwise 'adjusted' to make the data changing statement work.','Without strict mode the server tries to do proceed with the action when an error might have been a more secure choice. For example, by default MySQL will truncate data if it does not fit in a field, which can lead to unknown behavior, or be leveraged by an attacker to circumvent data validation. ','','Add STRICT_ALL_TABLES to the sql_mode in the server's configuration file.','[{\"cis\": [\"4.9\"]}]'),(10509,'Ensure 'log_error' is not empty','The error log contains information about events such as mysqld starting and stopping, when a table needs to be checked or repaired, and, depending on the host operating system, stack traces when mysqld fails','Enabling error logging may increase the ability to detect malicious attempts against MySQL, and other critical messages, such as if the error log is not enabled then connection error might go unnoticed.','','Set the log-error option to the path for the error log in the MySQL configuration file (my.cnf or my.ini).','[{\"cis\": [\"6.1\"]}]'),(10510,'Ensure Log Files are not Stored on a non-system partition','MySQL log files can be set in the MySQL configuration to exist anywhere on the filesystem. It is common practice to ensure that the system filesystem is left uncluttered by application logs. System filesystems include the root, /var, or /usr.','Moving the MySQL logs off the system partition will reduce the probability of denial of service via the exhaustion of available disk space to the operating system.','','In the MySQL configuration file (my.cnf), locate the log-bin entry and set it to a file not on root ('/'), /var, or /usr.','[{\"cis\": [\"6.2\"]}]'),(10511,'Ensure 'log_warning' is set to 2','The log_warnings system variable, enabled by default, provides additional information to the MySQL log. A value of 1 enables logging of warning messages, and higher integer values tend to enable more logging.','This might help to detect malicious behavior by logging communication errors and aborted connections.','','Ensure a line containing log-warnings = 2 is found in the mysqld section of the MySQL configuration file (my.cnf).','[{\"cis\": [\"6.3\"]}]'),(10512,'Ensure 'log_raw' is set to 'OFF'','The log-raw MySQL option determines whether passwords are rewritten by the server so as not to appear in log files as plain text. If log-raw is enabled, then passwords are written to the various log files (general query log, slow query log, and binary log) in plain text. ','With raw logging of passwords enabled someone with access to the log files might see plain text passwords.','','IN the MySQL configuration file (my.cnf), locate and set the value of this option: log-raw = OFF','[{\"cis\": [\"6.4\"]}]'); @@ -2743,3 +2823,15 @@ INSERT INTO `tsca` VALUES (29673,'Ensure sudo log file exist INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (41,1,'Security','Hardening plugin for security compliance analysis','','ID;STATUS','',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (42,9,'Security','Hardening plugin for security compliance analysis','','ID;STATUS','',0,2); + + +-- +-- Dumping data for table `tconfig_os_version` +-- + +LOCK TABLES `tconfig_os_version` WRITE; +INSERT INTO `tconfig_os_version` (`id_os_version`, `product`, `version`, `end_of_support`) VALUES +(1,'Windows.*','7.*','2020/01/14'), +(2,'Cisco.*','IOS 3.4.3','2017/05/12'), +(3,'Linux.*','Centos 7.*','2022/01/01'); +UNLOCK TABLES; diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index b3283d4ef1..3c666e4647 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.773.3-230929 +Version: 7.0NG.773.3-231004 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index a4f30e0505..ac7bd1b382 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.773.3-230929" +pandora_version="7.0NG.773.3-231004" package_cpan=0 package_pandora=1 diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index 816fcc4244..7aba09011f 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -220,6 +220,9 @@ icmp_checks 1 # Number of ICMP packets to send per request. icmp_packets 2 +# If set to 1 (the default), when the executions of certain checks fail (not the checks themselves) the modules go to critical. If set to 0, they will end up going to unknown. +critical_on_error 1 + # tcp specific options : # tcp_checks: number of tcp retries if first attempt fails. # tcp_timeout: specific timeout for tcp connections diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 8e6417807f..3fadae2f17 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -46,7 +46,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.773.3"; -my $pandora_build = "230929"; +my $pandora_build = "231004"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash @@ -265,6 +265,7 @@ sub pandora_load_config { $pa_config->{"keepalive_orig"} = $pa_config->{"keepalive"}; $pa_config->{"icmp_checks"} = 1; # Introduced on 1.3.1 $pa_config->{"icmp_packets"} = 1; # > 5.1SP2 + $pa_config->{"critical_on_error"} = 1; # > 7.0.774 $pa_config->{"alert_recovery"} = 0; # Introduced on 1.3.1 $pa_config->{"snmp_checks"} = 1; # Introduced on 1.3.1 $pa_config->{"snmp_timeout"} = 8; # Introduced on 1.3.1 @@ -830,6 +831,9 @@ sub pandora_load_config { elsif ($parametro =~ m/^icmp_packets\s+([0-9]*)/i) { $pa_config->{"icmp_packets"} = clean_blank($1); } + elsif ($parametro =~ m/^critical_on_error\s+([0-1])/i) { + $pa_config->{"critical_on_error"} = clean_blank($1); + } elsif ($parametro =~ m/^snmpconsole\s+([0-9]*)/i) { $pa_config->{"snmpconsole"} = clean_blank($1); } diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index ed4e127ade..7050fce514 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -4073,17 +4073,21 @@ Create a new entry in B optionaly with position information =cut ########################################################################## -sub pandora_create_agent ($$$$$$$$$$;$$$$$$$$$$) { +sub pandora_create_agent ($$$$$$$$$$;$$$$$$$$$$$) { # If parameter event_id is not undef, then create an extended event # related to it instead launch new event. my ($pa_config, $server_name, $agent_name, $address, $group_id, $parent_id, $os_id, $description, $interval, $dbh, $timezone_offset, $longitude, $latitude, $altitude, $position_description, - $custom_id, $url_address, $agent_mode, $alias, $event_id) = @_; + $custom_id, $url_address, $agent_mode, $alias, $event_id, $os_version) = @_; logger ($pa_config, "Server '$server_name' creating agent '$agent_name' address '$address'.", 10); + if (!defined $os_version) { + $os_version = ''; + } + if (!defined($group_id)) { $group_id = pandora_get_agent_group($pa_config, $dbh, $agent_name); if ($group_id <= 0) { @@ -4109,9 +4113,10 @@ sub pandora_create_agent ($$$$$$$$$$;$$$$$$$$$$) { 'url_address' => $url_address, 'timezone_offset' => $timezone_offset, 'alias' => safe_input($alias), - 'update_module_count' => 1, # Force to replicate in metaconsole - }); - + 'os_version' => $os_version, + 'update_module_count' => 1, # Force to replicate in metaconsole + }); + my $agent_id = db_insert ($dbh, 'id_agente', "INSERT INTO tagente $columns", @{$values}); # Save GIS data diff --git a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm index 2703f65113..0239decd60 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -788,8 +788,8 @@ sub get_recon_credential_macro($$$) { ################################################################################ # Guess the OS using xprobe2 or nmap. ################################################################################ -sub PandoraFMS::Recon::Base::guess_os($$;$) { - my ($self, $device, $string_flag) = @_; +sub PandoraFMS::Recon::Base::guess_os($$;$$$) { + my ($self, $device, $string_flag, $return_version_only) = @_; return $self->{'os_id'}{$device} if defined($self->{'os_id'}{$device}); @@ -810,15 +810,32 @@ sub PandoraFMS::Recon::Base::guess_os($$;$) { if (-x $self->{'pa_config'}->{'nmap'}) { my $return = `"$self->{pa_config}->{nmap}" -sSU -T5 -F -O --osscan-limit $device 2>$DEVNULL`; return OS_OTHER if ($? != 0); - my $str_os; + my ($str_os, $os_version); if ($return =~ /Aggressive OS guesses:(.*?)(?>\(\d+%\),)|^OS details:(.*?)$/mi) { if(defined($1) && $1 ne "") { $str_os = $1; } else { $str_os = $2; } + + my $pandora_os = pandora_get_os($self->{'dbh'}, $str_os); + my $pandora_os_name = pandora_get_os_by_id($self->{'dbh'}, $pandora_os); + + if ($return_version_only == 1) { + if ($str_os =~ /$pandora_os_name/i) { + $os_version = $'; # Get string after matched found OS name. + $os_version =~ s/^\s+//; # Remove leading spaces. + $os_version =~ s/\s+$//; # Remove trailing spaces. + } else { + $os_version = ''; + } + + return $os_version; + + } + return $str_os if is_enabled($string_flag); - return pandora_get_os($self->{'dbh'}, $str_os); + return $pandora_os; } } @@ -1640,6 +1657,10 @@ sub PandoraFMS::Recon::Base::report_scanned_agents($;$) { $os_id = $self->guess_os($data->{'agent'}{'direccion'}); } + if (is_empty($data->{'agent'}{'os_version'})) { + $data->{'agent'}{'os_version'} = $self->guess_os($data->{'agent'}{'direccion'}, undef, 1); + } + $self->call('message', "Agent accepted: ".$data->{'agent'}{'nombre'}, 5); # Agent creation. @@ -1681,7 +1702,7 @@ sub PandoraFMS::Recon::Base::report_scanned_agents($;$) { $os_id, $data->{'agent'}->{'description'}, $data->{'agent'}{'interval'}, $self->{'dbh'}, $data->{'agent'}{'timezone_offset'}, undef, undef, undef, undef, - undef, undef, 1, $data->{'agent'}{'alias'} + undef, undef, 1, $data->{'agent'}{'alias'}, undef, $data->{'agent'}{'os_version'} ); # Add found IP addresses to the agent. diff --git a/pandora_server/lib/PandoraFMS/PluginServer.pm b/pandora_server/lib/PandoraFMS/PluginServer.pm index 370cd2c2b9..9751372d04 100644 --- a/pandora_server/lib/PandoraFMS/PluginServer.pm +++ b/pandora_server/lib/PandoraFMS/PluginServer.pm @@ -272,6 +272,7 @@ sub data_consumer ($$) { $module_data = `$command`; if ($? < 0) { logger($pa_config, "Error executing command from module # $module_id. Probably out of memory.", 10); + pandora_timed_event(300, $pa_config, "Cannot process monitoring data. plug-in module \#$module_id failed to execute on server " . $pa_config->{'servername'}, 0, 0, 6, 0, 0, 'system', 0, $dbh); } }; diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index abca861f48..6c3288f358 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.773.3"; -my $pandora_build = "230929"; +my $pandora_build = "231004"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index e03ae323c3..f2c276898b 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.773.3 -%define release 230929 +%define release 231004 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index ca11a57e05..9fe0f3d864 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.773.3 -%define release 230929 +%define release 231004 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 75458bbb4c..9ad5cb68f4 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.773.3" -PI_BUILD="230929" +PI_BUILD="231004" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index b6a4ab3092..1557f7ece8 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.773.3 Build 230929"; +my $version = "7.0NG.773.3 Build 231004"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index c32ebc9bb3..d7edaf89c3 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.773.3 Build 230929"; +my $version = "7.0NG.773.3 Build 231004"; # save program name for logging my $progname = basename($0); @@ -6671,6 +6671,19 @@ sub cli_set_event_storm_protection () { db_do ($dbh, 'UPDATE tconfig SET value=? WHERE token=?', $value, 'event_storm_protection'); } +############################################################################## +# Set existing OS and OS version for a specific agent +# Related option: --agent_set_os +############################################################################## +sub cli_agent_set_os() { + my ($id_agente,$id_os,$os_version) = @ARGV[2..4]; + + my $os_name = get_db_value($dbh, 'SELECT name FROM tconfig_os WHERE id_os = ?',$id_os); + exist_check($id_os,'tconfig_os',$os_name); + + db_process_update($dbh, 'tagente', {'id_os' => $id_os, 'os_version' => $os_version}, {'id_agente' => $id_agente}); +} + ############################################################################## # Return event name given a event id ############################################################################## @@ -8147,7 +8160,11 @@ sub pandora_manage_main ($$$) { elsif ($param eq '--set_event_storm_protection') { param_check($ltotal, 1); cli_set_event_storm_protection(); - } + } + elsif ($param eq '--agent_set_os') { + param_check($ltotal, 3, 1); + cli_agent_set_os(); + } elsif ($param eq '--create_custom_graph') { param_check($ltotal, 11); cli_create_custom_graph();