diff --git a/sca/applications/cis_apache2224_rcl.yml b/sca/applications/cis_apache2224_rcl.yml deleted file mode 100644 index 0d77d86af..000000000 --- a/sca/applications/cis_apache2224_rcl.yml +++ /dev/null @@ -1,920 +0,0 @@ -# Security Configuration assessment -# CIS Checks for Apache -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# Center for Internet Security Benchmark for Apache 2.2 v3.5.0 - 06-08-2018 -# Center for Internet Security Benchmark for Apache 2.4 v1.4.0 - 07-13-2018 - -policy: - id: "cis_apache" - file: "cis_apache2224_rcl.yml" - name: "CIS Apache HTTP Server 2.2/2.4 Benchmark" - description: "This document provides prescriptive guidance for establishing a secure configuration posture for Apache Web Server versions 2.2 and 2.4 running on Linux." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check that Apache is installed on the system" - description: "Requirements for running the SCA scan against the Apache policy." - condition: "all required" - rules: - - 'f:/etc/apache2/apache2.conf;' - -variables: - $main-conf: /etc/apache2/apache2.conf,/etc/httpd/conf/httpd.conf; - $conf-dirs: /etc/apache2/conf-enabled,/etc/apache2/mods-enabled,/etc/apache2/sites-enabled,/etc/httpd/conf.d,/etc/httpd/modsecurity.d; - $ssl-confs: /etc/apache2/mods-enabled/ssl.conf,/etc/httpd/conf.d/ssl.conf; - $mods-en: /etc/apache2/mods-enabled; - $request-confs: /etc/httpd/conf/httpd.conf,/etc/apache2/mods-enabled/reqtimeout.conf; - $traceen: /etc/apache2/apache2.conf,/etc/httpd/conf/httpd.conf,/etc/apache2/conf-enabled/security.conf; - -#2.3 Disable WebDAV Modules -checks: - - id: 3500 - title: "Ensure the WebDAV Modules Are Disabled" - description: "The Apache mod_dav and mod_dav_fs modules support WebDAV functionality for Apache, which is an extension to the HTTP protocol which allows clients to create, move, and delete files and resources on the web server." - rationale: "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." - remediation: "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. For dynamically loaded modules comment out the LoadModule directive for mod_dav, and mod_dav_fs modules from the httpd.conf file." - compliance: - - cis: "2.3" - - cis_csc: "9.1" - references: - - https://httpd.apache.org/docs/2.2/mod/mod_dav.html - - https://httpd.apache.org/docs/2.4/mod/mod_dav.html - condition: any - rules: - - 'd:$conf-dirs -> conf -> IN !r:^# && r:loadmodule\sdav;' - - 'd:$conf-dirs -> load -> IN !r:^# && r:loadmodule\sdav;' - - 'f:/etc/httpd/conf.d -> IN !r:^# && r:loadmodule\sdav;' - - 'd:$mods-en -> dav.load;' -#2.4 Disable Status Module - - id: 3501 - title: "Ensure the Status Module Is Disabled" - description: "The Apache mod_status module provides current server performance statistics." - rationale: "While having server performance status information available as a web page may be convenient, it's recommended that this module be disabled. When it is enabled, its handler capability is available in all configuration files, including per-directory files." - remediation: "For source builds with static modules, run the Apache ./configure script with the --disable-status configure script options. For dynamically loaded modules, comment out or remove the LoadModule directive for the mod_status module from the httpd.conf file." - compliance: - - cis: "2.4" - - cis_csc: "9.1" - references: - - https://httpd.apache.org/docs/2.2/mod/mod_status.html - - https://httpd.apache.org/docs/2.4/mod/mod_status.html - condition: any - rules: - - 'd:$conf-dirs -> conf -> IN !r:^# && r:loadmodule\sstatus;' - - 'd:$conf-dirs -> load -> IN !r:^# && r:loadmodule\sstatus;' - - 'f:/etc/httpd/conf.d -> IN !r:^# && r:loadmodule\sstatus;' - - 'd:$mods-en -> status.load;' -#2.5 Disable Autoindex Module - - id: 3502 - title: "Ensure the Autoindex Module Is Disabled" - description: "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." - rationale: "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." - remediation: "For source builds with static modules, run the Apache ./configure script with the - -disable-autoindex configure script options. For dynamically loaded modules, comment out or remove the LoadModule directive for the mod_autoindex module from the httpd.conf file." - compliance: - - cis: "2.5" - - cis_csc: "18" - references: - - https://httpd.apache.org/docs/2.2/mod/mod_autoindex.html - - https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html - condition: any - rules: - - 'd:$conf-dirs -> conf -> IN !r:^# && r:loadmodule\sautoindex;' - - 'd:$conf-dirs -> load -> IN !r:^# && r:loadmodule\sautoindex;' - - 'f:/etc/httpd/conf.d -> IN !r:^# && r:loadmodule\sautoindex;' - - 'd:$mods-en -> autoindex.load;' -#2.6 Disable Proxy Modules - - id: 3503 - title: "Ensure the Proxy Modules Are Disabled" - description: "The Apache proxy modules allow the server to act as a proxy for HTTP and other protocols with additional proxy modules loaded. If the Apache installation is not intended to proxy requests to or from another network, the proxy module should not be loaded." - rationale: "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." - remediation: "For source builds with static modules, run the Apache ./configure script without including the mod_proxy and all other proxy modules in the --enable- modules=configure script options. For dynamically loaded modules, comment out or remove the LoadModule directive for the mod_proxy module and all other proxy modules from the httpd.conf file." - compliance: - - cis: "2.6" - - cis_csc: "9.1" - references: - - https://httpd.apache.org/docs/2.2/mod/mod_proxy.html - - https://httpd.apache.org/docs/2.4/mod/mod_proxy.html - condition: any - rules: - - 'd:$conf-dirs -> conf -> IN !r:^# && r:loadmodule\sproxy;' - - 'd:$conf-dirs -> load -> IN !r:^# && r:loadmodule\sproxy;' - - 'f:/etc/httpd/conf.d -> IN !r:^# && r:loadmodule\sproxy;' - - 'd:$mods-en -> proxy.load;' -#2.7 Disable User Directories Modules - - id: 3504 - title: "Ensure the User Directories Module Is Disabled" - description: "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." - rationale: "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." - remediation: "For source builds with static modules, run the Apache ./configure script with the --disable-userdir configure script option. For dynamically loaded modules, comment out or remove the LoadModule directive for the mod_userdir module from the httpd.conf file." - compliance: - - cis: "2.7" - - cis_csc: "18" - references: - - https://httpd.apache.org/docs/2.2/mod/mod_userdir.html - - https://httpd.apache.org/docs/2.4/mod/mod_userdir.html - condition: any - rules: - - 'd:$conf-dirs -> conf -> IN !r:^# && r:loadmodule\suserdir;' - - 'd:$conf-dirs -> load -> IN !r:^# && r:loadmodule\suserdir;' - - 'f:/etc/httpd/conf.d -> IN !r:^# && r:loadmodule\suserdir;' - - 'd:$mods-en -> userdir.load;' -#2.8 Disable Info Module - - id: 3505 - title: "Ensure the Info Module Is Disabled" - description: "The Apache mod_info module provides information on the server configuration via access to a /server-info URL location." - rationale: "Although having server configuration information available as a web page may be convenient, it's recommended that this module be disabled. Once the module is loaded into the server, its handler capability is available in per-directory .htaccess files. This can leak sensitive information from the configuration directives of other Apache modules." - remediation: "For source builds with static modules, run the Apache ./configure script without including mod_info in the --enable-modules= configure script options. For dynamically loaded modules, comment out or remove the LoadModule directive for the mod_info module from the httpd.conf file." - compliance: - - cis: "2.8" - - cis_csc: "9.1" - references: - - https://httpd.apache.org/docs/2.2/mod/mod_info.html - - https://httpd.apache.org/docs/2.4/mod/mod_info.html - condition: any - rules: - - 'd:$conf-dirs -> conf -> IN !r:^# && r:loadmodule\sinfo;' - - 'd:$conf-dirs -> load -> IN !r:^# && r:loadmodule\sinfo;' - - 'd:$conf-dirs -> conf -> IN !r:^# && r:loadmodule\sinfo;' - - 'd:$mods-en -> info.load;' -#3.2 Give the Apache User Account an Invalid Shell - - id: 3506 - title: "Ensure the Apache User Account Has an Invalid Shell" - description: "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 log in." - rationale: "Service accounts such as the apache account are a risk if they can be used to get a login shell to the system." - remediation: "Change the apache account to use the nologin shell or an invalid shell such as /dev/null: # chsh -s /sbin/nologin apache" - compliance: - - cis: "3.2" - - cis_csc: "16" - condition: any - rules: - - 'f:/etc/passwd -> NIN r:/var/www && r:\.*/bin/false$|/sbin/nologin$;' -#3.3 Lock the Apache User Account - - id: 3507 - title: "Ensure the Apache User Account Is Locked" - description: "The user account under which Apache runs should not have a valid password, but should be locked." - rationale: "As a defense-in-depth measure, the Apache user account should be locked to prevent logins and to prevent a user from su-ing to apache using the password." - remediation: "Use the passwd command to lock the apache account: # passwd -l apache" - compliance: - - cis: "3.3" - - cis_csc: "16" - condition: any - rules: - - 'f:/etc/shadow -> NIN r:^daemon|^wwwrun|^www-data|^apache && r:\p!\.*$;' -#4.4 Restrict Override for All Directories - - id: 3508 - title: "Ensure OverRide Is Disabled for All Directories" - description: "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, .htaccess files are completely ignored. When this directive is set to All, any directive which has the .htaccess Context is allowed in .htaccess files." - rationale: "While the functionality of htaccess files is sometimes convenient, usage decentralizes the access controls and increases the risk of configurations being changed or viewed inappropriately by an unintended or rogue .htaccess file. Consider also that some of the more common vulnerabilities in web servers and web applications allow the web files to be viewed or to be modified." - remediation: "Search the Apache configuration files ( httpd.conf and any included configuration files) to find AllowOverride directives. Set the value for all AllowOverride directives to None." - compliance: - - cis: "4.4" - - cis_csc: "14.4" - references: - - https://httpd.apache.org/docs/2.2/mod/core.html#allowoverride - - https://httpd.apache.org/docs/2.4/mod/core.html#allowoverride - - https://httpd.apache.org/docs/2.4/mod/core.html#allowoverridelist - condition: any - rules: - - 'd:$conf-dirs -> conf -> NIN !r:^# && r:\w+ && r:allowoverride && r:none$;' - - 'd:$conf-dirs -> conf -> NIN !r:^# && r:\w+ && r:allowoverridelist;' - - 'f:$main-conf -> NIN !r:^# && r:\w+ && r:allowoverride && r:none$;' - - 'f:$main-conf -> NIN !r:^# && r:\w+ && r:allowoverridelist;' -#5.3 Minimize Options for Other Directories - - id: 3509 - title: "Ensure Options for Other Directories Are Minimized" - description: "The Apache Options directive allows for specific configuration of options, including execution of CGI, following symbolic links, server side includes, and content negotiation." - rationale: "The options for other directories and hosts should be restricted to the minimal options required. A setting of None is recommended; however, other options may be needed in some cases: Multiviews, FollowSymbolicLinks & SymLinksIfOwnerMatch, ExecCGI, Includes & IncludesNOEXEC, Indexes." - remediation: "Search the Apache configuration files (httpd.conf and any included configuration files) to find all elements. 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." - compliance: - - cis: "5.3" - - cis_csc: "18" - references: - - https://httpd.apache.org/docs/2.2/mod/mod_include.html - - https://httpd.apache.org/docs/2.2/mod/core.html#options - - https://httpd.apache.org/docs/2.4/mod/core.html#options - - https://httpd.apache.org/docs/2.4/mod/mod_include.html - condition: any - rules: - - 'd:$conf-dirs -> conf -> IN !r:^# && r:options\sincludes;' - - 'f:$main-conf -> IN !r:^# && r:options\sincludes;' -#5.4.1 Remove default index.html sites - - id: 3510 - title: "Ensure Default HTML Content Is Removed (index.html)" - description: "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." - rationale: "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." - remediation: "Review all pre-installed content and remove content which is not required. In particular, look for unnecessary content in the document root directory, in a configuration directory such as conf/extra directory, or as a Unix/Linux package." - compliance: - - cis: "5.4" - - cis_csc: "18.9" - condition: any - rules: - - 'd:/var/www -> index.html;' - - 'd:/var/www/html -> index.html;' -#5.4.2 Remove the Apache user manual - - id: 3511 - title: "Ensure Default HTML Content Is Removed (Apache user manual)" - description: "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." - rationale: "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." - remediation: "Review all pre-installed content and remove content which is not required. In particular, look for unnecessary content in the document root directory, in a configuration directory such as conf/extra directory, or as a Unix/Linux package." - compliance: - - cis: "5.4" - - cis_csc: "18.9" - condition: any - rules: - - 'd:/etc/httpd/conf.d -> manual.conf;' - - 'd:/etc/apache2/conf-enabled -> apache2-doc.conf;' -#5.4.5 Verify that no Handler is enabled - - id: 3512 - title: "Ensure Default HTML Content Is Removed (Handler)" - description: "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." - rationale: "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." - remediation: "Review all pre-installed content and remove content which is not required. In particular, look for unnecessary content in the document root directory, in a configuration directory such as conf/extra directory, or as a Unix/Linux package." - compliance: - - cis: "5.4" - - cis_csc: "18.9" - condition: any - rules: - - 'd:$conf-dirs -> conf -> IN !r:^# && r:/wsethandler;' - - 'f:$main-conf -> IN !r:^# && r:/wsethandler;' -#5.5 Remove default CGI content printenv - - id: 3513 - title: "Ensure the Default CGI Content printenv Script Is Removed" - description: "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 that will print back to the requester all of the CGI environment variables, which include many server configuration details and system paths." - rationale: "Since CGI programs are often targets of attackers, we need to make sure there are no unnecessary CGI programs that could potentially be used for malicious purposes. The printenv script in particular will disclose inappropriate information about the web server, including directory paths and detailed version and configuration information." - remediation: "Locate cgi-bin files and directories enabled in the Apache configuration via the Script , ScriptAlias , ScriptAliasMatch , or ScriptInterpreterSource directives. Remove the printenv default CGI in the cgi-bin directory if it is installed." - compliance: - - cis: "5.5" - - cis_csc: "18" - condition: any - rules: - - 'd:/var/www/cgi-bin -> printenv;' - - 'd:/usr/lib/cgi-bin -> printenv;' -#5.6 Remove default CGI content test-cgi - - id: 3514 - title: "Ensure the Default CGI Content test-cgi Script Is Removed" - description: "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 that will print back to the requester CGI environment variables, which includes many server configuration details." - rationale: "Since CGI programs are often targets of attackers, we need to make sure there are no unnecessary CGI programs that could potentially be used for malicious purposes. The test-cgi script in particular will disclose inappropriate information about the web server, including directory paths and detailed version and configuration information." - remediation: "Locate cgi-bin files and directories enabled in the Apache configuration via Script, ScriptAlias, ScriptAliasMatch, or ScriptInterpreterSource directives. Remove the test-cgi default CGI in the cgi-bin directory if it is installed." - compliance: - - cis: "5.6" - - cis_csc: "18.9" - condition: any - rules: - - 'd:/var/www/cgi-bin -> test-cgi;' - - 'd:/usr/lib/cgi-bin -> test-cgi;' -#5.7 Limit HTTP Request Method - - id: 3515 - title: "Ensure HTTP Request Methods Are Restricted" - description: "Use the Apache directive to restrict unnecessary HTTP request methods of the web server so it only accepts and processes the GET, HEAD, POST and OPTIONS HTTP request methods." - rationale: "The HTTP 1.1 protocol supports several request methods which are rarely used and potentially high risk. For normal web server operation, you will typically need to allow only the GET, HEAD and POST request methods." - remediation: "Search for the directive on the document root directory, ensure that the access control order within the directive is deny, allow. Add a directive within the group of document root directives and search in other Apache configuration files in places other than de root directory." - compliance: - - cis: "5.7" - - cis_csc: "9.1" - references: - - https://httpd.apache.org/docs/2.2/mod/core.html#limitexcept - - https://www.ietf.org/rfc/rfc2616.txt - - https://httpd.apache.org/docs/2.4/mod/core.html#limitexcept - condition: any - rules: - - 'f:$main-conf -> !r:;' -#5.8 Disable HTTP Trace Method - - id: 3516 - title: "Ensure the HTTP TRACE Method Is Disabled" - description: "Use the Apache TraceEnable directive to disable the HTTP TRACE request method." - rationale: "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, so it should be disabled." - remediation: "Locate the main Apache configuration file such as httpd.conf. 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 or ." - compliance: - - cis: "5.8" - - cis_csc: "9.1" - references: - - https://www.ietf.org/rfc/rfc2616.txt - - https://httpd.apache.org/docs/2.2/mod/core.html#traceenable - - https://httpd.apache.org/docs/2.4/mod/core.html#traceenable - condition: any - rules: - - 'f:$traceen -> IN !r:^# && r:traceenable\s+on\s*$;' -#5.9 Restrict HTTP Protocol Versions - - id: 3517 - title: "Ensure Old HTTP Versions Are Disallowed" - description: "The Apache modules mod_rewrite and mod_security can be used to disallow old and invalid HTTP versions. The HTTP version 1.1 RFC is dated June 1999 and has been supported by Apache since version 1.2, so it should no longer be necessary to allow ancient versions of HTTP prior to 1.1." - rationale: "Many malicious automated programs, vulnerability scanners, and fingerprinting tools send requests using old HTTP versions to see how the web server responds. These requests are usually part of the attacker's enumeration process." - remediation: "Load the mod_rewrite module, add the RewriteEngine directive to the configuration within the global server context with the value of on so the rewrite engine is enabled. Locate the main Apache configuration file such as httpd.conf and add a condition to match HTTP/1.1 and the rewrite rule to the top server level configuration to disallow other protocol versions." - compliance: - - cis: "5.9" - - cis_csc: "9.1" - references: - - https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html - - https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html - condition: any - rules: - - 'f:/etc/httpd/conf/httpd.conf -> !r:loadmodule\srewrite;' - - 'd:$mods-en -> !f:rewrite.load;' - - 'f:$main-conf -> !r:rewriteengine\son;' - - 'f:$main-conf -> NIN r:rewritecond && r:%{THE_REQUEST} && r:!HTTP/1\\.1\$;' - - 'f:$main-conf -> NIN r:rewriterule && r:.* - [F];' -#5.12 Deny IP Address Based Requests - - id: 3518 - title: "Ensure IP Address Based Requests Are Disallowed" - description: "The Apache module mod_rewrite should disallow access for requests that use an IP address instead of a host name for the URL. Most normal access to the website from browsers and automated software will use a hostname, and will therefore include the hostname in the HTTP HOST header." - rationale: "A common malware propagation and automated network scanning technique is to use IP addresses rather than hostnames for web requests, since it's simpler to automate. By denying IP-based web requests, these automated techniques will be denied access to the website." - remediation: "Load the mod_rewrite module for Apache. Add the RewriteEngine directive to the configuration within the global server context with the value of on. Locate the Apache configuration file such as httdp.conf and add a condition to match the expected host name of the top server level configuration." - compliance: - - cis: "5.12" - - cis_csc: "9.1" - references: - - https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html - - https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html - condition: any - rules: - - 'f:/etc/httpd/conf/httpd.conf -> !r:loadmodule\srewrite;' - - 'd:$mods-en -> !f:rewrite.load;' - - 'f:$main-conf -> !r:rewriteengine\son;' - - 'f:$main-conf -> NIN r:rewritecond && r:%{HTTP_HOST} && r:www\\.\w+\\.\w+ [NC]$;' - - 'f:$main-conf -> NIN r:rewritecond && r:%{REQUEST_URI} && r:/error [NC]$;' - - 'f:$main-conf -> NIN r:rewriterule && r:.\(.*\) - [L,F]$;' -#5.13 Restrict Listen Directive - - id: 3519 - title: "Ensure the IP Addresses for Listening for Requests Are Specified" - description: "The Apache Listen directive specifies the IP addresses and port numbers the Apache web server will listen on 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 all zeroes should not be used." - rationale: "Having multiple interfaces on web servers is fairly common, and without explicit Listen directives, the web server is likely to be listening on an IP address or interface that was not intended for the web server." - remediation: "Find any Listen directives in the Apache configuration file with no IP address specified or with an IP address of all zeroes similar to the examples below. Keep in mind there may be both IPv4 and IPv6 addresses on the system. 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 and port." - compliance: - - cis: "5.13" - - cis_csc: "9.1" - references: - - https://httpd.apache.org/docs/2.2/mod/mpm_common.html#listen - - https://httpd.apache.org/docs/2.4/mod/mpm_common.html#listen - condition: any - rules: - - 'd:$conf-dirs -> conf -> IN !r:^# && r:listen\s80$;' - - 'd:$conf-dirs -> conf -> IN !r:^# && r:listen\s0.0.0.0\p80;' - - 'd:$conf-dirs -> conf -> IN !r:^# && r:listen\s[\p\pffff\p0.0.0.0]\p80;' - - 'f:$main-conf -> IN !r:^# && r:listen\s80$;' - - 'f:$main-conf -> IN !r:^# && r:listen\s0.0.0.0\p\d*;' - - 'f:$main-conf -> IN !r:^# && r:listen\s[\p\pffff\p0.0.0.0]\p\d*;' - - 'f:/etc/apache2/sites-enabled/000-default.conf -> IN !r:^# && r:listen\s80$;' - - 'f:/etc/apache2/sites-enabled/000-default.conf -> IN !r:^# && r:listen\s0.0.0.0\p\d*;' - - 'f:/etc/apache2/sites-enabled/000-default.conf -> IN !r:^# && r:listen\s[\p\pffff\p0.0.0.0]\p\d*;' - - 'f:/etc/apache2/ports.conf -> IN !r:^# && r:listen\s80$;' - - 'f:/etc/apache2/ports.conf -> IN !r:^# && r:listen\s0.0.0.0\p\d*;' - - 'f:/etc/apache2/ports.conf -> IN !r:^# && r:listen\s[\p\pffff\p0.0.0.0]\p\d*;' -#5.14 Restrict Browser Frame Options - - id: 3520 - title: "Ensure Browser Framing Is Restricted" - description: "The Header directive allows server HTTP response headers to be added, replaced, or merged. Use the directive to add a server HTTP response header to tell browsers to restrict all the web pages from being framed by other web sites." - rationale: "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 uses frames to include the expected content from the legitimate site." - remediation: "Perform the following to implement the recommended state: Add or modify the Header directive for the X-Frame-Options header in the Apache configuration to have the condition always , an action of append , and a value of SAMEORIGIN , as shown: Header always append X-Frame-Options SAMEORIGIN" - compliance: - - cis: "5.14" - - cis_csc: "18" - references: - - https://httpd.apache.org/docs/2.2/mod/mod_headers.html#header - - https://httpd.apache.org/docs/2.4/mod/mod_headers.html#header - - https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header - - https://blogs.msdn.com/b/ie/archive/2009/01/27/ie8-security-part-vii-clickjacking-defenses.aspx - condition: any - rules: - - 'f:$main-conf -> NIN r:header\salways\sappend\sx-frame-options && r:sameorigin|deny;' -#6.1 Configure the Error Log to notice at least - - id: 3521 - title: "Ensure the Error Log Filename and Severity Level Are Configured Correctly" - description: "The LogLevel directive is used to configure the severity level for the error logs, while the ErrorLog directive configures the error log filename. The log level values are the standard syslog levels of emerg , alert , crit , error , warn , notice , info and debug . The recommended level is notice , so that all errors from the emerg level through the notice level will be logged." - rationale: "The server error logs are invaluable because they can be used to spot potential problems before they become serious. Most importantly, they can be used to watch for anomalous behavior such as numerous 'not found' or 'unauthorized' errors that may be an indication an attack is pending or has occurred." - remediation: "Add or modify the LogLevel in the Apache configuration to have a value of info or lower for the core module and notice or lower for all other modules. The recommended value is notice core:info. Add an ErrorLog and a similar one for each virtual host configuredif the virtual host will have different people responsible for the web site." - compliance: - - cis: "6.1" - - cis_csc: "6.2" - references: - - https://httpd.apache.org/docs/2.2/logs.html - - https://httpd.apache.org/docs/2.2/mod/core.html#loglevel - - https://httpd.apache.org/docs/2.2/mod/core.html#errorlog - - https://httpd.apache.org/docs/2.4/logs.html - - https://httpd.apache.org/docs/2.4/mod/core.html#loglevel - - https://httpd.apache.org/docs/2.4/mod/core.html#errorlog - condition: any - rules: - - 'f:$main-conf -> IN !r:^# && r:loglevel\snotice\score\p && r:warn|emerg|alert|crit|error|notice;' - - 'f:$main-conf -> NIN r:loglevel\snotice\score\p && r:info|debug;' -#6.2 Configure a Syslog facility for Error Log - - id: 3522 - title: "Ensure a Syslog Facility Is Configured for Error Logging" - description: "The ErrorLog directive should be configured to send web server error logs to a syslog facility so the logs can be processed and monitored along with the system logs." - rationale: "It is easy for web server error logs to be overlooked in the log monitoring process, yet application-level attacks have become the most common and are extremely important for detecting attacks early, as well as detecting non-malicious problems such as a broken link or internal errors." - remediation: "Add an ErrorLog directive if not already configured. Any appropriate syslog facility may be used in place of local1. Add a similar ErrorLog directive for each virtual host if necessary." - compliance: - - cis: "6.2" - - cis_csc: "6.6" - references: - - https://httpd.apache.org/docs/2.2/logs.html - - https://httpd.apache.org/docs/2.2/mod/core.html#loglevel - - https://httpd.apache.org/docs/2.2/mod/core.html#errorlog - - https://httpd.apache.org/docs/2.4/logs.html - - https://httpd.apache.org/docs/2.4/mod/core.html#loglevel - - https://httpd.apache.org/docs/2.4/mod/core.html#errorlog - condition: any - rules: - - 'f:$main-conf -> !r:errorlog\s+\p*syslog\p\.*\p*;' -#7.6 Disable SSL Insecure Renegotiation - - id: 3523 - title: "Ensure Insecure SSL Renegotiation Is Not Enabled" - description: "The SSLInsecureRenegotiation directive was added in Apache 2.2.15 for web servers linked with OpenSSL version 0.9.8m or later, to allow the insecure renegotiation to provide backward compatibility to clients with the older unpatched SSL implementations. Enabling this directive also leaves the server vulnerable to man-in-the-middle renegotiation attack, therefore, it should not be enabled." - rationale: "The seriousness and ramification of this attack warrants that servers and clients be upgraded to support the improved SSL/TLS protocols. Therefore, the recommendation is to not enable the insecure renegotiation." - remediation: "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, no action is required: SSLInsecureRenegotiation off" - compliance: - - cis: "7.6" - - cis_csc: "14.2" - references: - - https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslinsecurerenegotiation - - https://httpd.apache.org/docs/2.4/mod/mod_ssl.html#sslinsecurerenegotiation - - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2009-3555 - - https://azure.microsoft.com/en-us/services/multi-factor-authentication/ - condition: any - rules: - - 'f:$ssl-confs -> IN !r:^\t*\s*# && r:sslinsecurerenegotiation\s+on\s*;' - - 'f:$ssl-confs -> IN !r:^\t*\s*# && r:sslinsecurerenegotiation\s*$;' -#7.7 Ensure SSL Compression is not enabled - - id: 3524 - title: "Ensure SSL Compression is Not Enabled" - description: "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." - rationale: "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 that can be used to impersonate the account associated with the authenticator." - remediation: "Verify the Apache version is 2.2.24 or later with httpd -v. Search the Apache configuration files for the SSLCompression directive. Update the directive to have a value of off." - compliance: - - cis: "7.7" - - cis_csc: "14.2" - references: - - https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslcompression - - https://httpd.apache.org/docs/2.4/mod/mod_ssl.html#sslcompression - - https://en.wikipedia.org/wiki/CRIME_(security_exploit) - - condition: any - rules: - - 'f:$ssl-confs -> IN !r:^\t*\s*# && r:sslcompression\s+on\s*;' - - 'f:$ssl-confs -> IN !r:^\t*\s*# && r:sslcompression\s*$;' -#7.8 Disable SSL TLS v1.0 Protocol - - id: 3525 - title: "Ensure Medium Strength SSL/TLS Ciphers Are Disabled" - description: "The SSLCipherSuite directive specifies which ciphers are allowed in the negotiation with the client. Disable the medium strength ciphers such as Triple DES (3DES) and IDEA by adding !3DES and !IDEA in the SSLCipherSuite directive." - rationale: "Although Triple DES was a trusted standard in the past, several vulnerabilities for it have been published over the years and it is no longer considered secure." - remediation: "Add or modify the following line in the Apache server level configuration and every virtual host that is SSL/TLS enabled: SSLCipherSuite ALL:!EXP:!NULL:!LOW:!SSLv2:!MD5:!RC4:!aNULL:!3DES:!IDEA" - compliance: - - cis: "7.8" - - cis_csc: "14.2" - references: - - https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslciphersuite - - https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslhonorcipherorder - - https://httpd.apache.org/docs/2.4/mod/mod_ssl.html#sslciphersuite - - https://httpd.apache.org/docs/2.4/mod/mod_ssl.html#sslhonorcipherorder - - https://sweet32.info/ - - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2183 - - https://github.com/rbsec/sslscan - - https://www.openssl.org/ - condition: any - rules: - - 'f:$ssl-confs -> !r:^\t*\s*sslprotocol;' - - 'f:$ssl-confs -> IN !r:^\t*\s*# && r:sslprotocol\s+all;' - - 'f:$ssl-confs -> IN !r:^\t*\s*# && r:sslprotocol\s+\.*tlsv1\P\s*;' - - 'f:$ssl-confs -> IN !r:^\t*\s*# && r:sslprotocol\s+\.*sslv2\P\s*;' - - 'f:$ssl-confs -> IN !r:^\t*\s*# && r:sslprotocol\s+\.*sslv3\P\s*;' -#7.9 Enable OCSP Stapling - - id: 3526 - title: "Enable OCSP Stapling" - description: "The OCSP (Online Certificate Status Protocol) provides the current revocation status of an X.509 certificate and allows for a certificate authority to revoke the validity of a signed certificate before its expiration date." - rationale: "The OCSP protocol is a big improvement over CRLs (certificate revocation lists) for checking if a certificate has been revoked. The OCSP stapling improves the situation by having the SSL server 'staple' an OCSP response, signed by the OCSP server, to the certificate it presents to the client. This obviates the need for the client to ask the OCSP server for status information on the server certificate." - remediation: "Add or modify the SSLUseStapling directive to have a value of on in the Apache server level configuration and every virtual host that is SSL enabled." - compliance: - - cis: "7.10" - - cis_csc: "14.2" - references: - - https://en.wikipedia.org/wiki/OCSP_stapling - - https://httpd.apache.org/docs/2.4/mod/mod_ssl.html- - condition: any - rules: - - 'f:/etc/httpd/conf/httpd.conf -> !r:^loadmodule\s+ssl;' - - 'd:$mods-en -> !f:ssl.load;' - - 'f:$ssl-confs -> IN !r:\t*\s*# && r:sslusestapling\s+off;' - - 'f:$ssl-confs -> !r:\t*\s*sslusestapling\s+on;' - - 'f:$ssl-confs -> !r:\t*\s*sslstaplingcache\s+\.+;' -#7.10 Enable HTTP Strict Transport Security - - id: 3527 - title: "Ensure HTTP Strict Transport Security Is Enabled" - description: "HTTP Strict Transport Security (HSTS) is an optional web server security policy mechanism specified by an HTTP Server header." - rationale: "Usage of HTTP Strict Transport Security (HSTS) helps protect HSTS-compliant browsers and other agents from HTTP downgrade attacks. Downgrade attacks include a variety of man-in-the-middle attacks which leave the web communication vulnerable to disclosure and modification by forcing the usage of HTTP rather than HTTPS communication." - remediation: "Add a Header directive as shown below in the Apache server level configuration and every virtual host that is SSL enabled. The includeSubDomains and preload flags may be included in the header, but are not required." - compliance: - - cis: "7.10" - - cis_csc: "14.2" - references: - - https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security - - https://www.owasp.org/index.php/HTTP_Strict_Transport_Security - - https://moxie.org/software/sslstrip/ - - https://developer.mozilla.org/en-US/docs/Web/Security/HTTP_strict_transport_security - - https://hstspreload.appspot.com/ - condition: any - rules: - - 'f:/etc/apache2/apache2.conf -> !r:Header\salways\sset\sStrict-Transport-Security\s"max-age=\d\d\d\d*";' - - 'f:/etc/apache2/apache2.conf -> IN !r:^# && r:Header\salways\sset\sStrict-Transport-Security\s"max-age=1\d\d";' - - 'f:/etc/apache2/apache2.conf -> IN !r:^# && r:Header\salways\sset\sStrict-Transport-Security\s"max-age=2\d\d";' - - 'f:/etc/apache2/apache2.conf -> IN !r:^# && r:Header\salways\sset\sStrict-Transport-Security\s"max-age=3\d\d";' - - 'f:/etc/apache2/apache2.conf -> IN !r:^# && r:Header\salways\sset\sStrict-Transport-Security\s"max-age=4\d\d";' - - 'f:/etc/apache2/apache2.conf -> IN !r:^# && r:Header\salways\sset\sStrict-Transport-Security\s"max-age=5\d\d";' -#8.1 Set ServerToken to Prod or ProductOnly - - id: 3528 - title: "Ensure ServerTokens Provides Minimal Information" - description: "Configure the Apache ServerTokens directive to provide minimal information by setting the value to Prod or ProductOnly." - rationale: "Excessive probing and requests may cause too much 'noise' being generated and may tip off an administrator. If an attacker can accurately target exploits, the chances of successful compromise prior to detection increase dramatically." - remediation: "Add or modify the ServerTokens directive as shown below to have the value of Prod or ProductOnly: ServerTokens Prod" - compliance: - - cis: "8.1" - - cis_csc: "18.9" - references: - - https://httpd.apache.org/docs/2.2/mod/core.html#servertokens - condition: any - rules: - - 'd:$conf-dirs -> conf -> IN !r:^# && r:servertokens\s+major;' - - 'd:$conf-dirs -> conf -> IN !r:^# && r:servertokens\s+minor;' - - 'd:$conf-dirs -> conf -> IN !r:^# && r:servertokens\s+min;' - - 'd:$conf-dirs -> conf -> IN !r:^# && r:servertokens\s+minimal;' - - 'd:$conf-dirs -> conf -> IN !r:^# && r:servertokens\s+os;' - - 'd:$conf-dirs -> conf -> IN !r:^# && r:servertokens\s+full;' -#8.2: Set ServerSignature to Off - - id: 3529 - title: "Ensure ServerSignature Is Not Enabled" - description: "Disable the server signatures, which is the generation of a signature line as a trailing footer at the bottom of server-generated documents such as error pages." - rationale: "Server signatures are helpful when the server is acting as a proxy because they help the user distinguish errors from the proxy rather than the destination server. However, in this context there is no need for the additional information." - remediation: "Add or modify the ServerSignature directive to have the value of Off: ServerSignature Off" - compliance: - - cis: "8.2" - - cis_csc: "18" - references: - - https://httpd.apache.org/docs/2.2/mod/core.html#serversignature - - https://httpd.apache.org/docs/2.4/mod/core.html#serversignature - condition: any - rules: - - 'd:$conf-dirs -> conf -> IN !r:^# && r:serversignature\s+email;' - - 'd:$conf-dirs -> conf -> IN !r:^# && r:serversignature\s+on;' -#8.3: Prevent Information Leakage via Default Apache Content - - id: 3530 - title: "Ensure All Default Apache Content Is Removed" - description: "If you want to further restrict information leakage about the web server, it is important that default content such as icons are not left on the web server." - rationale: "To identify the type of web servers and versions software installed, it is common for attackers to scan for icons or special content specific to the server type and version. Many icons are used primarily for auto indexing, which is recommended to be disabled." - remediation: "The default source build places the auto-index and icon configurations in the extra/httpd-autoindex.conf file, so it can be disabled by leaving the include line commented out in the main httpd.conf file. Alternatively, the icon alias directive and the directory access control configuration can be commented out." - compliance: - - cis: "8.4" - - cis_csc: "18.9" - condition: any - rules: - - 'd:$conf-dirs -> conf -> IN !r:^\t*\s*# && r:include\s*\w*httpd-autoindex.conf;' - - 'd:$conf-dirs -> conf -> IN !r:^\t*\s*# && r:alias\s*/icons/\s*\.*;' -#9.1:Set TimeOut to 10 or less - - id: 3531 - title: "Ensure the TimeOut Is Set Properly" - description: "The TimeOut directive controls the maximum time in seconds that Apache HTTP server will wait for an Input/Output call to complete. It is recommended that the TimeOut directive be set to 10 or less." - rationale: "One common technique for DoS is to initiate many connections to the server. By decreasing the timeout for old connections, the server can free resources more quickly and be more responsive." - remediation: "Add or modify the Timeout directive in the Apache configuration files to have a value of 10 seconds or less." - compliance: - - cis: "9.1" - - cis_csc: "9" - references: - - https://httpd.apache.org/docs/2.2/mod/core.html#timeout - - https://httpd.apache.org/docs/2.4/mod/core.html#timeout - condition: any - rules: - - 'f:$main-conf -> IN !r:^# && r:timeout\s+9\d;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+8\d;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+7\d;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+6\d;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+5\d;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+4\d;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+3\d;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+2\d;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+11;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+12;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+13;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+14;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+15;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+16;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+17;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+18;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+19;' - - 'f:$main-conf -> !r:^timeout\s+\d\d*;' - - 'f:$main-conf -> IN !r:^# && r:timeout\s+\d\d\d+;' -#9.2:Set the KeepAlive directive to On - - id: 3532 - title: "Ensure KeepAlive Is Enabled" - description: "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." - rationale: "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's resiliency to DoS attacks." - remediation: "Add or modify the KeepAlive directive in the Apache configuration to have a value of On." - compliance: - - cis: "9.2" - - cis_csc: "9" - references: - - https://httpd.apache.org/docs/2.2/mod/core.html#keepalive - - https://httpd.apache.org/docs/2.4/mod/core.html#keepalive - condition: any - rules: - - 'f:$main-conf -> IN !r:^# && r:keepalive\s+off;' - - 'f:$main-conf -> !r:keepalive\s+on;' -#9.3:Set MaxKeepAliveRequests to 100 or greater - - id: 3533 - title: "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. It is recommended that the MaxKeepAliveRequests directive be set to 100 or greater." - description: "Set MaxKeepAliveRequest to 100 or greater" - rationale: "Limiting the number of requests per connection may improve a server's resiliency to DoS attacks." - remediation: "Add or modify the MaxKeepAliveRequests directive in the Apache configuration to have a value of 100 or more." - compliance: - - cis: "9.3" - - cis_csc: "9" - references: - - https://httpd.apache.org/docs/2.2/mod/core.html#maxkeepaliverequests - - https://httpd.apache.org/docs/2.4/mod/core.html#maxkeepaliverequests - condition: any - rules: - - 'f:$main-conf -> !r:^maxkeepaliverequests\s+\d\d\d+;' -#9.4: Set KeepAliveTimeout Low to Mitigate Denial of Service - - id: 3534 - title: "Ensure the KeepAliveTimeout Is Set Properly" - description: "The KeepAliveTimeout directive specifies the number of seconds Apache will wait for a subsequent request before closing a connection that is being kept alive." - rationale: "Reducing the number of seconds that Apache HTTP server will keep unused resources allocated will increase the availability of resources to serve other requests. This efficiency gain may improve a server's resiliency to DoS attacks." - remediation: "Add or modify the KeepAliveTimeout directive in the Apache configuration to have a value of 15 or less." - compliance: - - cis: "9.4" - - cis_csc: "9" - references: - - https://httpd.apache.org/docs/2.2/mod/core.html#keepalivetimeout - - https://httpd.apache.org/docs/2.4/mod/core.html#keepalivetimeout - condition: any - rules: - - 'f:$main-conf -> !r:keepalivetimeout\s+\d\d*;' - - 'f:$main-conf -> IN !r:^# && r:keepalivetimeout\s+16;' - - 'f:$main-conf -> IN !r:^# && r:keepalivetimeout\s+17;' - - 'f:$main-conf -> IN !r:^# && r:keepalivetimeout\s+18;' - - 'f:$main-conf -> IN !r:^# && r:keepalivetimeout\s+19;' - - 'f:$main-conf -> IN !r:^# && r:keepalivetimeout\s+2\d;' - - 'f:$main-conf -> IN !r:^# && r:keepalivetimeout\s+3\d;' - - 'f:$main-conf -> IN !r:^# && r:keepalivetimeout\s+4\d;' - - 'f:$main-conf -> IN !r:^# && r:keepalivetimeout\s+5\d;' - - 'f:$main-conf -> IN !r:^# && r:keepalivetimeout\s+6\d;' - - 'f:$main-conf -> IN !r:^# && r:keepalivetimeout\s+7\d;' - - 'f:$main-conf -> IN !r:^# && r:keepalivetimeout\s+8\d;' - - 'f:$main-conf -> IN !r:^# && r:keepalivetimeout\s+9\d;' - - 'f:$main-conf -> IN !r:^# && r:keepalivetimeout\s+\d\d\d+;' -#9.5 Set Timeout Limits for Request Headers - - id: 3535 - title: "Ensure Timeout Limits for Request Headers Are Set Properly" - description: "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." - rationale: "Setting a request header timeout is vital for mitigating DoS 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." - remediation: "Load the mod_requesttimeout module in the Apache configuration. Add a RequestReadTimeout directive similar to the one below with the maximum request header timeout value of 40 seconds or less." - compliance: - - cis: "9.5" - - cis_csc: "9" - references: - - https://ha.ckers.org/slowloris/ - - https://www.owasp.org/index.php/H.....t.....t....p.......p....o....s....t - - https://httpd.apache.org/docs/2.2/mod/mod_reqtimeout.html - - https://httpd.apache.org/docs/2.4/mod/mod_reqtimeout.html - condition: any - rules: - - 'f:/etc/httpd/conf/httpd.conf -> !r:^loadmodule\s+reqtimeout;' - - 'd:$mods-en -> !f:reqtimeout.load;' - - 'f:$request-confs -> !r:^\t*\s*requestreadtimeout\.+header\p\d\d*\D\d\d*;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+header\p\d\d\D41;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+header\p\d\d\D42;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+header\p\d\d\D43;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+header\p\d\d\D44;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+header\p\d\d\D45;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+header\p\d\d\D46;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+header\p\d\d\D47;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+header\p\d\d\D48;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+header\p\d\d\D49;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+header\p\d\d\D5\d;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+header\p\d\d\D6\d;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+header\p\d\d\D7\d;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+header\p\d\d\D8\d;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+header\p\d\d\D9\d;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+header\p\d\d\D\d\d\d+;' -#9.6 Set Timeout Limits for Request Body - - id: 3536 - title: "Ensure Timeout Limits for the Request Body Are Set Properly" - description: "The RequestReadTimeout directive allows setting timeout values for the body portion of a request. The directive provides for an initial timeout value, a maximum timeout, and a minimum rate." - rationale: "It is not sufficient to timeout only on the header portion of the request, as the server will still be vulnerable to attacks." - remediation: "Load the mod_requesttimeout module in the Apache configuration and add a RequestReadTimeout directive similar to the one below with the maximum request body timeout value of 20 seconds or less." - compliance: - - cis: "9.6" - - cis_csc: "9" - references: - - https://httpd.apache.org/docs/2.2/mod/mod_reqtimeout.html - - https://httpd.apache.org/docs/2.4/mod/mod_reqtimeout.html - condition: any - rules: - - 'f:/etc/httpd/conf/httpd.conf -> !r:^loadmodule\s+reqtimeout;' - - 'd:$mods-en -> !f:reqtimeout.load;' - - 'f:$request-confs -> !r:\t*\s*requestreadtimeout\.+body\p\d\d*;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p21;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p22;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p23;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p24;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p25;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p26;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p27;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p28;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p29;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p4\d;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p5\d;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p6\d;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p7\d;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p8\d;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p9\d;' - - 'f:$request-confs -> IN !r:^\t*\s*# && r:\t*\s*requestreadtimeout\.+body\p\d\d\d+;' -#10.1 Set the LimitRequestLine directive to 512 or less - - id: 3537 - title: "Ensure the Maximum Request Line Length Is Set Properly" - description: "The LimitRequestLine directive sets the maximum number of bytes that Apache will read for each line of an HTTP request. It is recommended that the LimitRequestLine be set to 512 or less." - rationale: "Limiting request line size may reduce the exposure of a buffer-related vulnerability potentially present in a code base hosted by Apache HTTP server." - remediation: "Add or modify the LimitRequestLine directive in the Apache configuration to have a value of 512 or less." - compliance: - - cis: "10.1" - - cis_csc: "9" - references: - - https://httpd.apache.org/docs/2.2/mod/core.html#limitrequestline - - https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestline - condition: any - rules: - - 'f:$main-conf -> !r:^limitrequestline\s+\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+5\13;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+5\14;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+5\15;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+5\16;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+5\17;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+5\18;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+5\19;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+5\2\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+5\3\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+5\4\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+5\5\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+5\6\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+5\7\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+5\8\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+5\9\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+6\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+7\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+8\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+9\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestline\s+\d\d\d\d+;' -#10.2 Set the LimitRequestFields directive to 100 or less - - id: 3538 - title: "Ensure the Maximum Request Headers Per Request Is Set Properly" - description: "The LimitRequestFields directive sets the maximum limit on the number of HTTP request headers allowed per request. It is recommended that the LimitRequestFields directive be set to 100 or less." - rationale: "Limiting the number of headers per request may reduce the exposure of a buffer-related vulnerability potentially present in a code base hosted by Apache HTTP server." - remediation: "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." - compliance: - - cis: "10.2" - - cis_csc: "9" - references: - - https://httpd.apache.org/docs/2.2/mod/core.html#limitrequestfields - - https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestfields - condition: any - rules: - - 'f:$main-conf -> !r:^limitrequestfields\s\d\d*;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+1\d1;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+1\d2;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+1\d3;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+1\d4;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+1\d5;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+1\d6;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+1\d7;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+1\d8;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+1\d9;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+11\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+12\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+13\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+14\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+15\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+16\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+17\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+18\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+19\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+2\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+3\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+4\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+5\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+6\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+7\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+8\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+9\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfields\s+\d\d\d\d+;' -#10.3 Set the LimitRequestFieldsize directive to 1024 or less - - id: 3539 - title: "Ensure the Maximum Request Header Field Size Is Set Properly" - description: "The LimitRequestFieldSize directive sets the maximum size of an HTTP request header field. It is recommended that the LimitRequestFieldSize directive be set to 1024 or less." - rationale: "Limiting header field size may reduce the exposure of a buffer-related vulnerability potentially present in a code base hosted by Apache HTTP server." - remediation: "Add or modify the LimitRequestFieldSize directive in the Apache configuration to have a value of 1024 or less." - compliance: - - cis: "10.3" - - cis_csc: "9" - references: - - https://httpd.apache.org/docs/2.2/mod/core.html#limitrequestfieldsize - - https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestfieldsize - condition: any - rules: - - 'f:$main-conf -> !r:^limitrequestfieldsize\s+\d\d*;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+1\d25;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+1\d26;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+1\d27;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+1\d28;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+1\d29;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+1\d3\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+1\d4\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+1\d5\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+1\d6\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+1\d7\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+1\d8\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+1\d9\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+11\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+12\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+13\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+14\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+15\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+16\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+17\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+18\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+19\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+2\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+3\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+4\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+5\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+6\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+7\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+8\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+9\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestfieldsize\s+\d\d\d\d\d+;' -#10.4 Set the LimitRequestBody directive to 102400 or less - - id: 3540 - title: "Ensure the Maximum Request Body Size Is Set Properly" - description: "The LimitRequestBody directive sets the maximum size of an HTTP request body. It is recommended that the LimitRequestBody directive be set to 102400 or less." - rationale: "Limiting request body size may reduce the exposure of a buffer-related vulnerability potentially present in a code base hosted by Apache HTTP server." - remediation: "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 it is understood this directive will limit the size of file uploads to the web server." - compliance: - - cis: "10.4" - - cis_csc: "9" - references: - - https://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody - - https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestbody - condition: any - rules: - - 'f:$main-conf -> !r:^limitrequestbody\s+\d\d*;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+0\s*$;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d24\d1;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d24\d2;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d24\d3;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d24\d4;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d24\d5;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d24\d6;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d24\d7;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d24\d8;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d24\d9;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d241\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d242\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d243\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d244\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d245\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d246\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d247\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d248\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d249\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d25\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d26\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d27\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d28\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d29\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d3\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d4\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d5\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d6\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d7\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d8\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+1\d9\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+11\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+12\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+13\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+14\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+15\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+16\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+17\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+18\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+19\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+2\d\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+3\d\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+4\d\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+5\d\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+6\d\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+7\d\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+8\d\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+9\d\d\d\d\d;' - - 'f:$main-conf -> IN !r:^# && r:limitrequestbody\s+\d\d\d\d\d\d\d+;' diff --git a/sca/applications/cis_apache_24.yml b/sca/applications/cis_apache_24.yml new file mode 100644 index 000000000..c6b583e25 --- /dev/null +++ b/sca/applications/cis_apache_24.yml @@ -0,0 +1,518 @@ +# Security Configuration Assessment +# CIS Checks for Apache +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Benchmark for Apache 2.4 v1.5.0 - 06-12-2019 +# +# RPM based distributions locate its Apache configuration files under /etc/httpd +# Otherwise, Debian-based distros do it under /etc/apache2 +# Adapt this policy to each case by commuting the commented block of variables as well as the requirement rules + +policy: + id: "cis_apache" + file: "cis_apache_24.yml" + name: "CIS Apache HTTP Server 2.4 Benchmark" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for Apache Web Server version 2.4 running on Linux." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check that Apache is installed on the system. If your Apache installation is located at /etc/apache2, review the policy file" + description: "Requirements for running the SCA scan against the Apache policy." + condition: any + rules: + - 'f:/etc/httpd/conf/httpd.conf' +# - 'f:/etc/apache2/apache2.conf' + +variables: + $main-conf: /etc/httpd/conf/httpd.conf + $conf-dirs: /etc/httpd/conf.d,/etc/httpd/modsecurity.d + $ssl-confs: /etc/httpd/conf.d/ssl.conf + $request-confs: /etc/httpd/conf/httpd.conf + $traceen: /etc/httpd/conf/httpd.conf + $enabled-modules: httpd -M + +# In case your installation is located in: /etc/apache2 use this block of variables +#variables: +# $main-conf: /etc/apache2/apache2.conf +# $conf-dirs: /etc/apache2/conf-enabled,/etc/apache2/mods-enabled,/etc/apache2/sites-enabled +# $ssl-confs: /etc/apache2/mods-enabled/ssl.conf +# $request-confs: /etc/apache2/mods-enabled/reqtimeout.conf +# $traceen: /etc/apache2/apache2.conf,/etc/apache2/conf-enabled/security.conf +# $enabled-modules: apachectl -M + +#2.3 Disable WebDAV Modules +checks: + - id: 9000 + title: "Ensure the WebDAV Modules Are Disabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["2.3"] + - cis_csc: ["9.1", "9.2"] + references: + - https://httpd.apache.org/docs/2.4/mod/mod_dav.html + condition: none + rules: + - 'c:$enabled-modules -> r:dav_\.+module' + +#2.4 Disable Status Module + - id: 9001 + title: "Ensure the Status Module Is Disabled" + description: "The Apache mod_status module provides current server performance statistics." + rationale: "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." + remediation: "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" + compliance: + - cis: ["2.4"] + - cis_csc: ["9.1", "9.2"] + references: + - https://httpd.apache.org/docs/2.4/mod/mod_status.html + condition: none + rules: + - 'c:$enabled-modules -> r:status_module' + +#2.5 Disable Autoindex Module + - id: 9002 + title: "Ensure the Autoindex Module Is Disabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["2.5"] + - cis_csc: ["18", "5.1"] + references: + - https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html + condition: none + rules: + - 'c:$enabled-modules -> r:autoindex_module' + +#2.6 Disable Proxy Modules + - id: 9003 + title: "Ensure the Proxy Modules Are Disabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["2.6"] + - cis_csc: ["9.1", "9.2"] + references: + - https://httpd.apache.org/docs/2.4/mod/mod_proxy.html + condition: none + rules: + - 'c:$enabled-modules -> r:proxy_' + +#2.7 Disable User Directories Modules + - id: 9004 + title: "Ensure the User Directories Module Is Disabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["2.7"] + - cis_csc: ["18", "5.1"] + references: + - https://httpd.apache.org/docs/2.4/mod/mod_userdir.html + condition: none + rules: + - 'c:$enabled-modules -> userdir_' + +#2.8 Disable Info Module + - id: 9005 + title: "Ensure the Info Module Is Disabled" + description: "The Apache mod_info module provides information on the server configuration via access to a /server-info URL location." + rationale: "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." + remediation: "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" + compliance: + - cis: ["2.8"] + - cis_csc: ["9.1", "9.2"] + references: + - https://httpd.apache.org/docs/2.4/mod/mod_info.html + condition: none + rules: + - 'c:$enabled-modules -> r:info_module' + +#3.2 Give the Apache User Account an Invalid Shell + - id: 9006 + title: "Ensure the Apache User Account Has an Invalid Shell" + description: "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." + rationale: "Service accounts such as the apache account are a risk if they can be used to get a login shell to the system." + remediation: "Change the apache account to use the nologin shell or an invalid shell such as /dev/null: # chsh -s /sbin/nologin apache" + compliance: + - cis: ["3.2"] + - cis_csc: ["16", "4.3"] + condition: all + rules: + - 'f:/etc/passwd -> r:apache && r:/sbin/nologin$|/dev/null$' + +#3.3 Lock the Apache User Account + - id: 9007 + title: "Ensure the Apache User Account Is Locked" + description: "The user account under which Apache runs should not have a valid password, but should be locked." + rationale: "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." + remediation: "Use the passwd command to lock the apache account: # passwd -l apache" + compliance: + - cis: ["3.3"] + - cis_csc: ["16", "16.8"] + condition: any + rules: + - 'c:passwd -S apache -> r:apache && r:\s*\t*L|\s*\t*LK' + - 'c:passwd -S apache -> r:apache && r:Password locked' + +#4.4 Restrict Override for All Directories + - id: 9008 + title: "Ensure OverRide Is Disabled for All Directories" + description: "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." + rationale: ".htaccess files decentralizes access control and increases the risk of server configuration being changed inappropriately." + remediation: "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." + compliance: + - cis: ["4.4"] + - cis_csc: ["14.4", "14.6"] + references: + - https://httpd.apache.org/docs/2.4/mod/core.html#allowoverride + - https://httpd.apache.org/docs/2.4/mod/core.html#allowoverridelist + condition: all + rules: + - 'd:$conf-dirs -> conf -> !r:^# && r:allowoverride|AllowOverride && r:none|None' + - 'not d:$conf-dirs -> conf -> r:allowoverridelist|AllowOverrideList' + - 'f:$main-conf -> !r:^# && r:allowoverride|AllowOverride && r:none|None' + - 'f:$main-conf -> r:allowoverridelist|AllowOverrideList' + +#5.3 Minimize Options for Other Directories + - id: 9009 + title: "Ensure Options for Other Directories Are Minimized" + description: "The Apache Options directive allows for specific configuration of options, including execution of CGI, following symbolic links, server side includes, and content negotiation." + rationale: "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." + remediation: "Perform the following to implement the recommended state: 1. Search the Apache configuration files (httpd.conf and any included configuration files) to find all 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." + compliance: + - cis: ["5.3"] + - cis_csc: ["18", "5.1"] + references: + - https://httpd.apache.org/docs/2.4/mod/core.html#options + - https://httpd.apache.org/docs/2.4/mod/mod_include.html + condition: none + rules: + - 'd:$conf-dirs -> conf -> !r:^# && r:options && r:includes|Includes' + - 'f:$main-conf -> !r:^# && r:options && r:includes|Includes' + +#5.4.2 Remove the Apache user manual + - id: 9010 + title: "Ensure Default HTML Content Is Removed" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["5.4"] + - cis_csc: ["18.9", "5.1"] + condition: none + rules: + - 'd:/var/www -> index.html' + - 'd:/var/www/html -> index.html' + - 'd:$conf-dirs -> r:manual.conf|apache2-doc.conf' + - 'd:$conf-dirs -> conf -> !r:^# && r:sethandler|SetHandler && r:server' + - 'f:$main-conf -> !r:^# && r:sethandler|SetHandler && r:server' + - 'd:$conf-dirs -> conf -> !r:^# && r:sethandler|SetHandler && r:perl' + - 'f:$main-conf -> !r:^# && r:sethandler|SetHandler && r:perl' + +#5.5 Remove default CGI content printenv + - id: 9011 + title: "Ensure the Default CGI Content printenv Script Is Removed" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["5.5"] + - cis_csc: ["18", "4.7"] + condition: none + rules: + - 'd:/var/www/cgi-bin -> printenv' + - 'd:/usr/lib/cgi-bin -> printenv' + +#5.6 Remove default CGI content test-cgi + - id: 9012 + title: "Ensure the Default CGI Content test-cgi Script Is Removed" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["5.6"] + - cis_csc: ["18.9", "4.7"] + condition: none + rules: + - 'd:/var/www/cgi-bin -> test-cgi' + - 'd:/usr/lib/cgi-bin -> test-cgi' + +#5.8 Disable HTTP Trace Method + - id: 9013 + title: "Ensure the HTTP TRACE Method Is Disabled" + description: "Use the Apache TraceEnable directive to disable the HTTP TRACE request method." + rationale: "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." + remediation: "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 or ." + compliance: + - cis: ["5.8"] + - cis_csc: ["9.1", "9.2"] + references: + - https://www.ietf.org/rfc/rfc2616.txt + - https://httpd.apache.org/docs/2.4/mod/core.html#traceenable + condition: all + rules: + - 'f:$traceen -> !r:^# && r:TraceEnable && r:off' + +#5.13 Restrict Listen Directive + - id: 9014 + title: "Ensure the IP Addresses for Listening for Requests Are Specified" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["5.13"] + - cis_csc: ["9.1", "9.2"] + references: + - https://httpd.apache.org/docs/2.4/mod/mpm_common.html#listen + condition: none + rules: + - 'd:$conf-dirs -> conf -> !r:^# && r:listen\s*\t*\d+$|Listen\s*\t*\d+$' + - 'd:$conf-dirs -> conf -> !r:^# && r:listen|Listen && r:0.0.0.0' + - 'f:$main-conf -> !r:^# && r:listen\s*\t*\d+$|Listen\s*\t*\d+$' + - 'f:$main-conf -> !r:^# && r:listen|Listen && r:0.0.0.0' + +#5.14 Restrict Browser Frame Options + - id: 9015 + title: "Ensure Browser Framing Is Restricted" + description: "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." + rationale: "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)." + remediation: "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" + compliance: + - cis: ["5.14"] + - cis_csc: ["18", "5.1"] + references: + - https://httpd.apache.org/docs/2.4/mod/mod_headers.html#header + - https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header + - https://blogs.msdn.com/b/ie/archive/2009/01/27/ie8-security-part-vii-clickjacking-defenses.aspx + condition: all + rules: + - 'f:$main-conf -> r:Header && r:always && r:append && r:X-Frame-Options && r:SAMEORIGIN|DENY' + +#7.6 Disable SSL Insecure Renegotiation + - id: 9016 + title: "Ensure Insecure SSL Renegotiation Is Not Enabled" + description: "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." + rationale: "Enabling the SSLInsecureRenegotiation directive leaves the server vulnerable to man-in- the-middle renegotiation attack. Therefore, the SSLInsecureRenegotiation directive should not be enabled." + remediation: "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" + compliance: + - cis: ["7.6"] + - cis_csc: ["14.2", "14.4"] + references: + - https://httpd.apache.org/docs/2.4/mod/mod_ssl.html#sslinsecurerenegotiation + - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2009-3555 + - https://azure.microsoft.com/en-us/services/multi-factor-authentication/ + condition: none + rules: + - 'f:$ssl-confs -> !r:^# && r:sslinsecurerenegotiation|SSLInsecureRenegotiation && r:\s+on$' + +#7.7 Ensure SSL Compression is not enabled + - id: 9017 + title: "Ensure SSL Compression is Not Enabled" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["7.7"] + - cis_csc: ["14.2", "14.4"] + references: + - https://httpd.apache.org/docs/2.4/mod/mod_ssl.html#sslcompression + - https://en.wikipedia.org/wiki/CRIME + + condition: none + rules: + - 'f:$ssl-confs -> !r:^# && r:sslcompression|SSLCompression && r:\s+on$' + +#8.1 Set ServerToken to Prod or ProductOnly + - id: 9018 + title: "Ensure ServerTokens is Set to 'Prod' or 'ProductOnly'" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["8.1"] + - cis_csc: ["18.9", "14.7"] + references: + - https://httpd.apache.org/docs/2.4/mod/core.html#servertokens + condition: any + rules: + - 'd:$conf-dirs -> conf -> !r:^# && r:servertokens|ServerTokens && r:\s+Prod|\s+ProductOnly' + +#8.2: Set ServerSignature to Off + - id: 9019 + title: "Ensure ServerSignature Is Not Enabled" + description: "Disable the server signatures which generates a signature line as a trailing footer at the bottom of server generated documents such as error pages." + rationale: "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." + remediation: "Perform the following to implement the recommended state: Add or modify the ServerSignature directive to have the value of Off: ServerSignature Off" + compliance: + - cis: ["8.2"] + - cis_csc: ["18", "13.2"] + references: + - https://httpd.apache.org/docs/2.4/mod/core.html#serversignature + condition: none + rules: + - 'd:$conf-dirs -> conf -> !r:^# && r:serversignature|ServerSignature && r:\s+on|\s+On' + +#9.1:Set TimeOut to 10 or less + - id: 9020 + title: "Ensure the TimeOut Is Set to 10 or Less" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["9.1"] + - cis_csc: ["9", "5.1"] + references: + - https://httpd.apache.org/docs/2.4/mod/core.html#timeout + condition: all + rules: + - 'f:$main-conf -> !r:^# && && r:timeout|Timeout && n:\s+(\d+) compare <= 10' + +#9.2:Set the KeepAlive directive to On + - id: 9021 + title: "Ensure KeepAlive Is Enabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["9.2"] + - cis_csc: ["9", "5.1"] + references: + - https://httpd.apache.org/docs/2.4/mod/core.html#keepalive + condition: none + rules: + - 'f:$main-conf -> !r:^# && r:keepalive|KeepAlive && r:\s+off|\s+Off' + +#9.3:Set MaxKeepAliveRequests to 100 or greater + - id: 9022 + title: "Ensure MaxKeepAliveRequests is Set to a Value of 100 or Greater" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["9.3"] + - cis_csc: ["9", "5.1"] + references: + - https://httpd.apache.org/docs/2.4/mod/core.html#maxkeepaliverequests + condition: none + rules: + - 'f:$main-conf -> !r:^# && r:maxkeepaliverequests|MaxKeepAliveRequests && n:\s+(\d+) compare < 100' + +#9.4: Set KeepAliveTimeout Low to Mitigate Denial of Service + - id: 9023 + title: "Ensure KeepAliveTimeout is Set to a Value of 15 or Less" + description: "The KeepAliveTimeout directive specifies the number of seconds Apache will wait for a subsequent request before closing a connection that is being kept alive." + rationale: "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." + remediation: "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" + compliance: + - cis: ["9.4"] + - cis_csc: ["9", "5.1"] + references: + - https://httpd.apache.org/docs/2.4/mod/core.html#keepalivetimeout + condition: all + rules: + - 'f:$main-conf -> !r:^# && r:keepalivetimeout|KeepAliveTimeout && n:\s+(\d+) compare <= 15' + +#9.5 Set Timeout Limits for Request Headers + - id: 9024 + title: "Ensure the Timeout Limits for Request Headers is Set to 40 or Less" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["9.5"] + - cis_csc: ["9", "5.1"] + references: + - https://ha.ckers.org/slowloris/ + - https://www.owasp.org/index.php/H.....t.....t....p.......p....o....s....t + - https://httpd.apache.org/docs/2.4/mod/mod_reqtimeout.html + condition: any + rules: + - 'f:$main-conf -> !r:^# && r:loadmodule|LoadModule && r:\s+mod_reqtimeout' + - 'f:$request-confs -> !r:^# && r:requestreadtimeout|RequestReadTimeout && n:header=\d+\p(\d+) compare <= 40' + +#9.6 Set Timeout Limits for Request Body + - id: 9025 + title: "Ensure Timeout Limits for the Request Body is Set to 20 or Less" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["9.6"] + - cis_csc: ["9", "5.1"] + references: + - https://httpd.apache.org/docs/2.4/mod/mod_reqtimeout.html + condition: any + rules: + - 'f:$main-conf -> !r:^# && r:loadmodule|LoadModule && r:\s+mod_reqtimeout' + - 'f:$request-confs -> !r:^# && r:requestreadtimeout|RequestReadTimeout && n:body=(\d+) compare <= 20' + +#10.1 Set the LimitRequestLine directive to 512 or less + - id: 9026 + title: "Ensure the LimitRequestLine directive is Set to 512 or less" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["10.1"] + - cis_csc: ["9", "5.1"] + references: + - https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestline + condition: all + rules: + - 'f:$main-conf -> !r:^# && r:limitrequestline|LimitRequestLine && n:\s(\d+) compare <= 512' + +#10.2 Set the LimitRequestFields directive to 100 or less + - id: 9027 + title: "Ensure the LimitRequestFields Directive is Set to 100 or Less" + description: "The LimitRequestFields directive limits the number of fields allowed in an HTTP request." + rationale: "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." + remediation: "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" + compliance: + - cis: ["10.2"] + - cis_csc: ["9", "5.1"] + references: + - https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestfields + condition: all + rules: + - 'f:$main-conf -> !r:^# && r:limitrequestfields|LimitRequestFields && n:\s(\d+) compare <= 100' + +#10.3 Set the LimitRequestFieldsize directive to 1024 or less + - id: 9028 + title: "Ensure the LimitRequestFieldsize Directive is Set to 1024 or Less" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["10.3"] + - cis_csc: ["9", "5.1"] + references: + - https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestfieldsize + condition: all + rules: + - 'f:$main-conf -> !r:^# && r:limitrequestfieldsize|LimitRequestFieldSize && n:\s(\d+) compare <= 1024' + +#10.4 Set the LimitRequestBody directive to 102400 or less + - id: 9029 + title: "Ensure the LimitRequestBody Directive is Set to 102400 or Less" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["10.4"] + - cis_csc: ["9", "5.1"] + references: + - https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestbody + condition: all + rules: + - 'f:$main-conf -> !r:^# && r:limitrequestbody|LimitRequestBody && n:\s(\d+) compare <= 102400' diff --git a/sca/applications/cis_mysql5-6_community.yml b/sca/applications/cis_mysql5-6_community.yml new file mode 100644 index 000000000..3399905e2 --- /dev/null +++ b/sca/applications/cis_mysql5-6_community.yml @@ -0,0 +1,290 @@ +# Security Configuration Assessment +# CIS Checks for Oracle MySQL Community Edition 5.6 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Benchmark for Oracle MySQL Community Edition 5.6 v1.1.0 - 08-15-2016 + +policy: + id: "cis_mysql_community" + file: "cis_mysql5-6_community.yml" + name: "CIS benchmark for Oracle MySQL Community Server 5.6" + description: "This document, CIS Oracle MySQL Community Server 5.6 Benchmark, provides prescriptive guidance for establishing a secure configuration posture for MySQL Community Server 5.6. This guide was tested against MySQL Community Server 5.6 running on Ubuntu Linux 14.04, but applies to other linux distributions as well." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check that MySQL is installed on the system" + description: "Requirements for running the SCA scan against the MySQL policy." + condition: all + rules: + - 'd:/etc/mysql' + +checks: +#1 Operating System Level Configuration + - id: 9500 + title: "Disable MySQL Command History" + description: "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." + rationale: "Disabling the MySQL command history reduces the probability of exposing sensitive information, such as passwords and encryption keys." + remediation: "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." + compliance: + - cis: ["1.3"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/mysql-logging.html + - https://bugs.mysql.com/bug.php?id=72158 + condition: none + rules: + - 'd:/home -> ^.mysql_history$' + - 'd:/root -> ^.mysql_history$' + + - id: 9501 + title: "Disable Interactive Login" + description: "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." + rationale: "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." + remediation: "Execute one of the following commands in a terminal: 'usermod -s /bin/false mysql' or 'usermod -s /sbin/nologin mysql'" + compliance: + - cis: ["1.5"] + condition: all + rules: + - 'c:getent passwd mysql -> r:/bin/false|/sbin/nologin' + + - id: 9502 + title: "Verify That 'MYSQL_PWD' Is Not Set In Users' Profiles" + description: "MySQL can read a default database password from an environment variable called MYSQL_PWD." + rationale: "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." + remediation: "Check which users and/or scripts are setting MYSQL_PWD and change them to use a more secure method." + compliance: + - cis: ["1.6"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/environment-variables.html + condition: none + rules: + - 'c:find /home -maxdepth 2 -type f -exec grep MYSQL_PWD {} + -> r:.profile|.bashrc|.bash_profile && r:$MYSQL_PWD' + +#4 General + - id: 9503 + title: "Ensure 'allow-suspicious-udfs' Is Set to 'FALSE'" + description: "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." + rationale: "Preventing shared libraries that do not contain user-defined functions from loading will reduce the attack surface of the server." + remediation: "Remove '--allow-suspicious-udfs' from the 'mysqld' start up command line. Or Remove 'allow-suspicious-udfs' from the MySQL option file." + compliance: + - cis: ["4.3"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/udf-security.html + - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_allow-suspicious-udfs + condition: none + rules: + - 'c:my_print_defaults mysqld -> r:allow-suspicious-udfs' + + - id: 9504 + title: "Ensure 'local_infile' is Disabled" + description: "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'." + rationale: "Disabling 'local_infile' reduces an attacker's ability to read sensitive files off the affected server via a SQL injection vulnerability." + remediation: "Add a line local-infile=0 in the [mysqld] section of the MySQL configuration file and restart the MySQL service." + compliance: + - cis: ["4.4"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/string-functions.html#function_load-file + - https://dev.mysql.com/doc/refman/5.6/en/load-data.html + condition: all + rules: + - 'c:grep -Rh local-infile /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:local-infile\s*=\s*0' + + - id: 9505 + title: "Ensure 'mysqld' Is Not Started with '--skip-grant-tables'" + description: "This option causes mysqld to start without using the privilege system." + rationale: "If this option is used, all clients of the affected server will have unrestricted access to all databases." + remediation: "Open the MySQL configuration (e.g. my.cnf) file and set: skip-grant-tables = FALSE" + compliance: + - cis: ["4.5"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_skip-grant-tables + condition: all + rules: + - 'c:grep -Rh skip-grant-tables /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:skip-grant-tables\s*=\s*FALSE|skip-grant-tables\s*=\s*false' + + - id: 9506 + title: "Ensure '--skip-symbolic-links' Is Enabled" + description: "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. " + rationale: "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." + remediation: "Open the MySQL configuration file (my.cnf), locate 'skip_symbolic_links' and set it to YES. If the option does not existe, create it in the 'mysqld' section." + compliance: + - cis: ["4.6"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/symbolic-links.html + - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_symbolic-links + condition: all + rules: + - 'c:grep -Rh skip_symbolic_links /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:skip_symbolic_links\s*=\s*YES|skip_symbolic_links\s*=\s*yes' + + - id: 9507 + title: "Ensure 'secure_file_priv' is not empty" + description: "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." + rationale: "Setting secure_file_priv reduces an attacker's ability to read sensitive files off the affected server via a SQL injection vulnerability. " + remediation: "Add the line secure_file_priv= to the [mysqld] section of the MySQL configuration file and restart the MySQL service." + compliance: + - cis: ["4.8"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_secure_file_priv + condition: all + rules: + - 'c:grep -Rh secure_file_priv /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:secure_file_priv\s*=\s*\.' + + - id: 9508 + title: "Ensure 'sql_mode' Contains 'STRICT_ALL_TABLES'" + description: "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." + rationale: "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. " + remediation: "Add STRICT_ALL_TABLES to the sql_mode in the server's configuration file." + compliance: + - cis: ["4.9"] + condition: all + rules: + - 'c:grep -Rh strict_all_tables /etc/mysql/my.cnf /etc/mysql/my.ini /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:strict_all_tables' + +#6 Auditing and Logging + - id: 9509 + title: "Ensure 'log_error' is not empty" + description: "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" + rationale: "nabling 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." + remediation: "Set the log-error option to the path for the error log in the MySQL configuration file (my.cnf or my.ini)." + compliance: + - cis: ["6.1"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/error-log.html + condition: all + rules: + - 'c:grep -Rh log_error /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:log_error\s*=\s*\S+\s*' + + - id: 9510 + title: "Ensure Log Files are not Stored on a non-system partition" + description: "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." + rationale: "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." + remediation: "In the MySQL configuration file (my.cnf), locate the log-bin entry and set it to a file not on root ('/'), /var, or /usr." + compliance: + - cis: ["6.2"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/binary-log.html + - https://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html + condition: none + rules: + - 'c:grep -Rh log_bin /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:log_bin\s*\t*/+$|log_bin\s*\t*/+var/*$|log_bin\s*\t*/+usr/*$' + + - id: 9511 + title: "Ensure 'log_warning' is set to 2" + description: "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." + rationale: "This might help to detect malicious behavior by logging communication errors and aborted connections." + remediation: "Ensure a line containing log-warnings = 2 is found in the mysqld section of the MySQL configuration file (my.cnf)." + compliance: + - cis: ["6.3"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_log-warnings + condition: all + rules: + - 'c:grep -Rh log_warnings /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:log_warnings\s*=\s*2' + + - id: 9512 + title: "Ensure 'log_raw' is set to 'OFF'" + description: "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. " + rationale: "With raw logging of passwords enabled someone with access to the log files might see plain text passwords." + remediation: "IN the MySQL configuration file (my.cnf), locate and set the value of this option: log-raw = OFF" + compliance: + - cis: ["6.4"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/password-logging.html + - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_log-raw + condition: all + rules: + - 'c:grep -Rh log-raw /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:log-raw\s*OFF$|log-raw\s*off$' + +#7 Authentication + - id: 9513 + title: "Ensure 'old_passwords' Is Not Set to '1' or 'ON'" + description: "This variable controls the password hashing method used by the PASSWORD() function and for the IDENTIFIED BY clause of the CREATE USER and GRANT statements. Before 5.6.6, the value can be 0 (or OFF), or 1 (or ON). As of 5.6.6, the following value can be one of the following: 0 - authenticate with the mysql_native_password plugin; 1 - authenticate with the mysql_old_password plugin; 2 - authenticate with the sha256_password plugin" + rationale: "The mysql_old_password plugin leverages an algorithm that can be quickly brute forced using an offline dictionary attack. See CVE-2003-1480 for additional details." + remediation: "Configure mysql to leverage the mysql_native_password or sha256_password plugin." + compliance: + - cis: ["7.1"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/password-hashing.html + - https://dev.mysql.com/doc/refman/5.6/en/sha256-authentication-plugin.html + - https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_old_passwords + - https://www.cvedetails.com/cve/CVE-2003-1480/ + condition: none + rules: + - 'c:grep -Rh old_passwords /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:old_passwords\s*=\s*1' + - 'c:grep -Rh old_passwords /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:old_passwords\s*=\s*ON|old_passwords\s*=\s*on' + + - id: 9514 + title: "Ensure 'secure_auth' is set to 'ON'" + description: "This option dictates whether the server will deny connections by clients that attempt to use accounts that have their password stored in the mysql_old_password format." + rationale: "Enabling this option will prevent all use of passwords employing the old format (and hence insecure communication over the network)." + remediation: "Add a line secure_auth=ON to the [mysqld] section of the MySQL option file." + compliance: + - cis: ["7.2"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_secure-auth + condition: all + rules: + - 'c:grep -Rh secure_auth /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:secure_auth\s*=\s*ON|secure_auth\s*=\s*on' + + - id: 9515 + title: "Ensure Passwords Are Not Stored in the Global Configuration" + description: "The [client] section of the MySQL configuration file allows setting a user and password to be used. Verify the password option is not used in the global configuration file (my.cnf)." + rationale: "The use of the password parameter may negatively impact the confidentiality of the user's password." + remediation: "Use the mysql_config_editor to store authentication credentials in .mylogin.cnf in encrypted form. If not possible, use the user-specific options file, .my.cnf., and restricting file access permissions to the user identity. " + compliance: + - cis: ["7.3"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/mysql-config-editor.html + condition: none + rules: + - 'c:grep -Rh password /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:^\s*password\.*' + + - id: 9516 + title: "Ensure 'sql_mode' Contains 'NO_AUTO_CREATE_USER'" + description: "NO_AUTO_CREATE_USER is an option for sql_mode that prevents a GRANT statement from automatically creating a user when authentication information is not provided." + rationale: "Blank passwords negate the benefits provided by authentication mechanisms. Without this setting an administrative user might accidentally create a user without a password." + remediation: "In the MySQL configuration file (my.cnf), find the sql_mode setting in the [mysqld] area, and add the NO_AUTO_CREATE_USER to the sql_mode setting." + compliance: + - cis: ["7.4"] + condition: all + rules: + - 'c:grep -Rh no_auto_create_user /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:\s*no_auto_create_user\s*$' + + - id: 9517 + title: "Ensure Password Policy is in Place" + description: "Password complexity includes password characteristics such as length, case, length, and character sets." + rationale: "Complex passwords help mitigate dictionary, brute forcing, and other password attacks. This recommendation prevents users from choosing weak passwords which can easily be guessed." + remediation: "Add to the global configuration: plugin-load=validate_password.so validate-password=FORCE_PLUS_PERMANENT validate_password_length=14 validate_password_mixed_case_count=1 validate_password_number_count=1 validate_password_special_char_count=1 validate_password_policy=MEDIUM. And change passwords for users which have passwords which are identical to their username. Restarting the server is required." + compliance: + - cis: ["7.6"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/validate-password-plugin.html + condition: all + rules: + - 'c:grep -Rh plugin-load /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:plugin-load\s*=\s*validate_password.so\s*$' + - 'c:grep -Rh validate-password /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:validate-password\s*=\s*force_plus_permanent\s*$' + - 'c:grep -Rh validate_password_length /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> n:validate_password_length\s*=\s*(\d+)\s$ compare >= 14' + - 'c:grep -Rh validate_password_mixed_case_count /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> n:validate_password_mixed_case_count\s*=\s*(\d+)\s*$ compare >= 1' + - 'c:grep -Rh validate_password_number_count /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> n:validate_password_number_count\s*=\s*(\d+)\s*$ compare >= 1' + - 'c:grep -Rh validate_password_special_char_count /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> n:validate_password_special_char_count\s*=\s*(\d+) compare >= 1' + - 'c:grep -Rh validate_password_policy /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:validate_password_policy\s*=\s*MEDIUM\s*|validate_password_policy\s*=\s*STRONG\s*|validate_password_policy\s*=\s*medium\s*|validate_password_policy\s*=\s*strong\s*' + +#9 Replication + - id: 9518 + title: "Ensure 'master_info_repositrory' is set to 'TABLE'" + description: "The master_info_repository setting determines to where a slave logs master status and connection information. The options are FILE or TABLE. Note also that this setting is associated with the sync_master_info setting as well." + rationale: "The password which the client uses is stored in the master info repository, which by default is a plaintext file. The TABLE master info repository is a bit safer, but with filesystem access it's still possible to gain access to the password the slave is using." + remediation: "Open the MySQL configuration file (my.cnf); locate master_info_repository; set the master_info_repository value to TABLE. Add the option if it does not exist." + compliance: + - cis: ["9.2"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#sysvar_master_info_repository + condition: all + rules: + - 'c:grep -Rh master_info_repository /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:master_info_repository\s*=\s*TABLE|master_info_repository\s*=\s*table' diff --git a/sca/applications/cis_mysql5-6_community_rcl.yml b/sca/applications/cis_mysql5-6_community_rcl.yml deleted file mode 100644 index ac0f2ae1d..000000000 --- a/sca/applications/cis_mysql5-6_community_rcl.yml +++ /dev/null @@ -1,300 +0,0 @@ -# Security Configuration assessment -# CIS Checks for Oracle MySQL Community Edition 5.6 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# Center for Internet Security Benchmark for Oracle MySQL Community Edition 5.6 v1.1.0 - 08-15-2016 - -policy: - id: "cis_mysql_community" - file: "cis_mysql5-6_community.yml" - name: "CIS benchmark for Oracle MySQL Community Server 5.6" - description: "This document, CIS Oracle MySQL Community Server 5.6 Benchmark, provides prescriptive guidance for establishing a secure configuration posture for MySQL Community Server 5.6. This guide was tested against MySQL Community Server 5.6 running on Ubuntu Linux 14.04, but applies to other linux distributions as well." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check that MySQL is installed on the system" - description: "Requirements for running the SCA scan against the MySQL policy." - condition: "all required" - rules: - - 'd:/etc/mysql;' - -variables: - $home_dirs: /usr2/home/*,/home/*,/home,/*/home/*,/*/home,/; - $enviroment_files: /*/home/*/\.bashrc,/*/home/*/\.profile,/*/home/*/\.bash_profile,/home/*/\.bashrc,/home/*/\.profile,/home/*/\.bash_profile; - $mysql-cnfs: /etc/mysql/my.cnf,/etc/mysql/mariadb.cnf,/etc/mysql/conf.d/*.cnf,/etc/mysql/mariadb.conf.d/*.cnf,~/.my.cnf; - -checks: -#1 Operating System Level Configuration - - id: 4000 - title: "Disable MySQL Command History" - description: "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." - rationale: "Disabling the MySQL command history reduces the probability of exposing sensitive information, such as passwords and encryption keys." - remediation: "Perform the folowwing 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." - compliance: - - cis: "1.3" - references: - - https://dev.mysql.com/doc/refman/5.6/en/mysql-logging.html - - https://bugs.mysql.com/bug.php?id=72158 - condition: any - rules: - - 'd:$home_dirs -> ^.mysql_history$;' - - id: 4001 - title: "Disable Interactive Login" - description: "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." - rationale: "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." - remediation: "Execute one of the following commands in a terminal: 'usermod -s /bin/false mysql' or 'usermod -s /sbin/nologin mysql'" - compliance: - - cis: "1.5" - condition: any - rules: - - 'f:/etc/passwd -> NIN r:^mysql && r:\.*/bin/false$|/sbin/nologin$;' - - id: 4002 - title: "Verify That 'MYSQL_PWD' Is Not Set In Users' Profiles" - description: "MySQL can read a default database password from an environment variable called MYSQL_PWD." - rationale: "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." - remediation: "Check which users and/or scripts are setting MYSQL_PWD and change them to use a more secure method." - compliance: - - cis: "1.6" - references: - - https://dev.mysql.com/doc/refman/5.6/en/environment-variables.html - condition: any - rules: - - 'f:$enviroment_files -> r:\.*MYSQL_PWD\.*;' -#4 General - - id: 4003 - title: "Ensure 'allow-suspicious-udfs' Is Set to 'FALSE'" - description: "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." - rationale: "Preventing shared libraries that do not contain user-defined functions from loading will reduce the attack surface of the server." - remediation: "Remove '--allow-suspicious-udfs' from the 'mysqld' start up command line. Or Remove 'allow-suspicious-udfs' from the MySQL option file." - compliance: - - cis: "4.3" - references: - - https://dev.mysql.com/doc/refman/5.6/en/udf-security.html - - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_allow-suspicious-udfs - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:allow-suspicious-udfs\.+true;' - - 'f:$mysql-cnfs -> r:allow-suspicious-udfs\s*$;' - - id: 4004 - title: "Ensure 'local_infile is Disabled" - description: "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'." - rationale: "Disabling 'local_infile' reduces an attacker's ability to read sensitive files off the affected server via a SQL injection vulnerability." - remediation: "Add a line local-infile=0 in the [mysqld] section of the MySQL configuration file and restart the MySQL service." - compliance: - - cis: "4.4" - references: - - https://dev.mysql.com/doc/refman/5.6/en/string-functions.html#function_load-file - - https://dev.mysql.com/doc/refman/5.6/en/load-data.html - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:local-infile\s*=\s*1;' - - 'f:$mysql-cnfs -> r:local-infile\s*$;' - - id: 4005 - title: "Ensure 'mysqld' Is Not Started with '--skip-grant-tables'" - description: "This option causes mysqld to start without using the privilege system." - rationale: "If this option is used, all clients of the affected server will have unrestricted access to all databases." - remediation: "Open the MySQL configuration (e.g. my.cnf) file and set: skip-grant-tables = FALSE" - compliance: - - cis: "4.5" - references: - - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_skip-grant-tables - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:skip-grant-tables\s*=\s*true;' - - 'f:$mysql-cnfs -> !r:skip-grant-tables\s*=\s*false;' - - 'f:$mysql-cnfs -> r:skip-grant-tables\s*$;' - - id: 4006 - title: "Ensure '--skip-symbolic-links' Is Enabled" - description: "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. " - rationale: "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." - remediation: "Open the MySQL configuration file (my.cnf), locate 'skip_symbolic_links' and set it to YES. If the option does not existe, create it in the 'mysqld' section." - compliance: - - cis: "4.6" - references: - - https://dev.mysql.com/doc/refman/5.6/en/symbolic-links.html - - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_symbolic-links - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:skip_symbolic_links\s*=\s*no;' - - 'f:$mysql-cnfs -> !r:skip_symbolic_links\s*=\s*yes;' - - 'f:$mysql-cnfs -> r:skip_symbolic_links\s*$;' - - id: 4007 - title: "Ensure 'secure_file_priv' is not empty" - description: "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." - rationale: "Setting secure_file_priv reduces an attacker's ability to read sensitive files off the affected server via a SQL injection vulnerability. " - remediation: "Add the line secure_file_priv= to the [mysqld] section of the MySQL configuration file and restart the MySQL service." - compliance: - - cis: "4.8" - references: - - https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_secure_file_priv - condition: any - rules: - - 'f:$mysql-cnfs -> IN r:^# && r:secure_file_priv=\s*\S+\s*;' - - 'f:$mysql-cnfs -> !r:secure_file_priv=\s*\S+\s*;' - - 'f:$mysql-cnfs -> r:secure_file_priv\s*$;' - - id: 4008 - title: "Ensure 'sql_mode' Contains 'STRICT_ALL_TABLES'" - description: "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." - rationale: "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. " - remediation: "Add STRICT_ALL_TABLES to the sql_mode in the server's configuration file." - compliance: - - cis: "4.9" - condition: any - rules: - - 'f:$mysql-cnfs -> !r:strict_all_tables\s*$;' -#6 Auditing and Logging - - id: 4009 - title: "Ensure 'log_error' is not empty" - description: "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" - rationale: "nabling 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." - remediation: "Set the log-error option to the path for the error log in the MySQL configuration file (my.cnf or my.ini)." - compliance: - - cis: "6.1" - references: - - https://dev.mysql.com/doc/refman/5.6/en/error-log.html - condition: any - rules: - - 'f:$mysql-cnfs -> IN r:^# && r:log_error\s*=\s*\S+\s*;' - - 'f:$mysql-cnfs -> !r:log_error\s*=\s*\S+\s*;' - - 'f:$mysql-cnfs -> r:log_error\s*$;' - - id: 4010 - title: "Ensure Log Files are not Stored on a non-system partition" - description: "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." - rationale: "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." - remediation: "In the MySQL configuration file (my.cnf), locate the log-bin entry and set it to a file not on root ('/'), /var, or /usr." - compliance: - - cis: "6.2" - references: - - https://dev.mysql.com/doc/refman/5.6/en/binary-log.html - - https://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html - condition: any - rules: - - 'f:$mysql-cnfs -> NIN r:^# && r:log_bin= && !r:\s*/\S*\s*;' - - 'f:$mysql-cnfs -> NIN r:^# && r:log_bin= && !r:\s*/var/\S*\s*;' - - 'f:$mysql-cnfs -> NIN r:^# && r:log_bin= && !r:\s*/usr/\S*\s*;' - - 'f:$mysql-cnfs -> r:log_bin\s*$;' - - id: 4011 - title: "Ensure 'log_warning' is set to 2" - description: "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." - rationale: "This might help to detect malicious behavior by logging communication errors and aborted connections." - remediation: "Ensure a line containing log-warnings = 2 is found in the mysqld section of the MySQL configuration file (my.cnf)." - compliance: - - cis: "6.3" - references: - - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_log-warnings - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:log_warnings\s*=\s*0;' - - 'f:$mysql-cnfs -> IN !r:^# && r:log_warnings\s*=\s*1;' - - 'f:$mysql-cnfs -> !r:log_warnings\s*=\s*\d+;' - - 'f:$mysql-cnfs -> r:log_warnings\s*$;' - - id: 4012 - title: "Ensure 'log_raw' is set to 'OFF'" - description: "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. " - rationale: "With raw logging of passwords enabled someone with access to the log files might see plain text passwords." - remediation: "IN the MySQL configuration file (my.cnf), locate and set the value of this option: log-raw = OFF" - compliance: - - cis: "6.5" - references: - - https://dev.mysql.com/doc/refman/5.6/en/password-logging.html - - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_log-raw - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:log-raw\s*=\s*on;' - - 'f:$mysql-cnfs -> r:log-raw\s*$;' -#7 Authentication - - id: 4013 - title: "Ensure 'old_passwords' Is Not Set to '1' or 'ON'" - description: "This variable controls the password hashing method used by the PASSWORD() function and for the IDENTIFIED BY clause of the CREATE USER and GRANT statements. Before 5.6.6, the value can be 0 (or OFF), or 1 (or ON). As of 5.6.6, the following value can be one of the following: 0 - authenticate with the mysql_native_password plugin; 1 - authenticate with the mysql_old_password plugin; 2 - authenticate with the sha256_password plugin" - rationale: "The mysql_old_password plugin leverages an algorithm that can be quickly brute forced using an offline dictionary attack. See CVE-2003-1480 for additional details." - remediation: "Configure mysql to leverage the mysql_native_password or sha256_password plugin." - compliance: - - cis: "7.1" - references: - - https://dev.mysql.com/doc/refman/5.6/en/password-hashing.html - - https://dev.mysql.com/doc/refman/5.6/en/sha256-authentication-plugin.html - - https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_old_passwords - - https://www.cvedetails.com/cve/CVE-2003-1480/ - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:old_passwords\s*=\s*1;' - - 'f:$mysql-cnfs -> IN !r:^# && r:old_passwords\s*=\s*on;' - - 'f:$mysql-cnfs -> !r:old_passwords\s*=\s*2;' - - 'f:$mysql-cnfs -> r:old_passwords\s*$;' - - id: 4014 - title: "Ensure 'secure_auth' is set to 'ON'" - description: "This option dictates whether the server will deny connections by clients that attempt to use accounts that have their password stored in the mysql_old_password format." - rationale: "Enabling this option will prevent all use of passwords employing the old format (and hence insecure communication over the network)." - remediation: "Add a line secure_auth=ON to the [mysqld] section of the MySQL option file." - compliance: - - cis: "7.2" - references: - - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_secure-auth - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:secure_auth\s*=\s*off;' - - 'f:$mysql-cnfs -> !r:secure_auth\s*=\s*on;' - - 'f:$mysql-cnfs -> r:secure_auth\s*$;' - - id: 4015 - title: "Ensure Passwords Are Not Stored in the Global Configuration" - description: "The [client] section of the MySQL configuration file allows setting a user and password to be used. Verify the password option is not used in the global configuration file (my.cnf)." - rationale: "The use of the password parameter may negatively impact the confidentiality of the user's password." - remediation: "Use the mysql_config_editor to store authentication credentials in .mylogin.cnf in encrypted form. If not possible, use the user-specific options file, .my.cnf., and restricting file access permissions to the user identity. " - compliance: - - cis: "7.3" - references: - - https://dev.mysql.com/doc/refman/5.6/en/mysql-config-editor.html - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:^\s*password\.*;' - - id: 4016 - title: "Ensure 'sql_mode' Contains 'NO_AUTO_CREATE_USER'" - description: "NO_AUTO_CREATE_USER is an option for sql_mode that prevents a GRANT statement from automatically creating a user when authentication information is not provided." - rationale: "Blank passwords negate the benefits provided by authentication mechanisms. Without this setting an administrative user might accidentally create a user without a password." - remediation: "In the MySQL configuration file (my.cnf), find the sql_mode setting in the [mysqld] area, and add the NO_AUTO_CREATE_USER to the sql_mode setting." - compliance: - - cis: "7.4" - condition: any - rules: - - 'f:$mysql-cnfs -> !r:no_auto_create_user\s*$;' - - 'f:$mysql-cnfs -> IN r:^# && r:\s*no_auto_create_user\s*$;' - - id: 4017 - title: "Ensure Password Policy is in Place" - description: "Password complexity includes password characteristics such as length, case, length, and character sets." - rationale: "Complex passwords help mitigate dictionary, brute forcing, and other password attacks. This recommendation prevents users from choosing weak passwords which can easily be guessed." - remediation: "Add to the global configuration: plugin-load=validate_password.so validate-password=FORCE_PLUS_PERMANENT validate_password_length=14 validate_password_mixed_case_count=1 validate_password_number_count=1 validate_password_special_char_count=1 validate_password_policy=MEDIUM. And change passwords for users which have passwords which are identical to their username. Restarting the server is required." - compliance: - - cis: "7.6" - references: - - https://dev.mysql.com/doc/refman/5.6/en/validate-password-plugin.html - condition: any - rules: - - 'f:$mysql-cnfs -> !r:plugin-load\s*=\s*validate_password.so\s*$;' - - 'f:$mysql-cnfs -> !r:validate-password\s*=\s*force_plus_permanent\s*$;' - - 'f:$mysql-cnfs -> !r:validate_password_length\s*=\s*14\s$;' - - 'f:$mysql-cnfs -> !r:validate_password_mixed_case_count\s*=\s*1\s*$;' - - 'f:$mysql-cnfs -> !r:validate_password_number_count\s*=\s*1\s*$;' - - 'f:$mysql-cnfs -> !r:validate_password_special_char_count\s*=\s*1;' - - 'f:$mysql-cnfs -> !r:validate_password_policy\s*=\s*medium\s*;' -#9 Replication - - id: 4018 - title: "Ensure 'master_info_repositrory' is set to 'TABLE'" - description: "The master_info_repository setting determines to where a slave logs master status and connection information. The options are FILE or TABLE. Note also that this setting is associated with the sync_master_info setting as well." - rationale: "The password which the client uses is stored in the master info repository, which by default is a plaintext file. The TABLE master info repository is a bit safer, but with filesystem access it's still possible to gain access to the password the slave is using." - remediation: "Open the MySQL configuration file (my.cnf); locate master_info_repository; set the master_info_repository value to TABLE. Add the option if it does not exist." - compliance: - - cis: "9.2" - references: - - https://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#sysvar_master_info_repository - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:master_info_repository\s*=\s*file;' - - 'f:$mysql-cnfs -> !r:master_info_repository\s*=\s*table;' - - 'f:$mysql-cnfs -> r:master_info_repository\s*$;' diff --git a/sca/applications/cis_mysql5-6_enterprise.yml b/sca/applications/cis_mysql5-6_enterprise.yml new file mode 100644 index 000000000..2bc54874f --- /dev/null +++ b/sca/applications/cis_mysql5-6_enterprise.yml @@ -0,0 +1,368 @@ +# Security Configuration Assessment +# CIS Checks for Oracle MySQL Entreprise Edition 5.6 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Benchmark for Oracle MySQL Entreprise Edition 5.6 v1.1.0 - 08-15-2016 + +policy: + id: "cis_mysql_enterprise" + file: "cis_mysql5-6_enterprise.yml" + name: "CIS benchmark for Oracle MySQL Enterprise 5.6" + description: "This document, CIS Oracle MySQL Enterprise Edition 5.6 Benchmark, provides prescriptive guidance for establishing a secure configuration posture for MySQL Enterprise Edition 5.6. The tests were carried out against MySQL Enterprise Edition 5.6 running on Ubuntu Linux 14.04, but applies to other linux distributions as well." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check that MySQL is installed on the system" + description: "Requirements for running the SCA scan against the MySQL policy." + condition: all + rules: + - 'd:/etc/mysql' + +checks: +#1 Operating System Level Configuration + - id: 10000 + title: "Disable MySQL Command History" + description: "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." + rationale: "Disabling the MySQL command history reduces the probability of exposing sensitive information, such as passwords and encryption keys." + remediation: "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." + compliance: + - cis: ["1.3"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/mysql-logging.html + - https://bugs.mysql.com/bug.php?id=72158 + condition: none + rules: + - 'd:/home -> ^.mysql_history$' + - 'd:/root -> ^.mysql_history$' + + - id: 10001 + title: "Disable Interactive Login" + description: "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." + rationale: "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." + remediation: "Execute one of the following commands in a terminal: 'usermod -s /bin/false mysql' or 'usermod -s /sbin/nologin mysql'" + compliance: + - cis: ["1.5"] + condition: all + rules: + - 'c:getent passwd mysql -> r:/bin/false|/sbin/nologin' + + - id: 10002 + title: "Verify That 'MYSQL_PWD' Is Not Set In Users' Profiles" + description: "MySQL can read a default database password from an environment variable called MYSQL_PWD." + rationale: "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." + remediation: "Check which users and/or scripts are setting MYSQL_PWD and change them to use a more secure method." + compliance: + - cis: ["1.6"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/environment-variables.html + condition: none + rules: + - 'c:find /home -maxdepth 2 -type f -exec grep MYSQL_PWD {} + -> r:.profile|.bashrc|.bash_profile && r:$MYSQL_PWD' + +#4 General + - id: 10003 + title: "Ensure 'allow-suspicious-udfs' Is Set to 'FALSE'" + description: "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." + rationale: "Preventing shared libraries that do not contain user-defined functions from loading will reduce the attack surface of the server." + remediation: "Remove '--allow-suspicious-udfs' from the 'mysqld' start up command line. Or Remove 'allow-suspicious-udfs' from the MySQL option file." + compliance: + - cis: ["4.3"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/udf-security.html + - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_allow-suspicious-udfs + condition: none + rules: + - 'c:my_print_defaults mysqld -> r:allow-suspicious-udfs' + + - id: 10004 + title: "Ensure 'local_infile' is Disabled" + description: "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'." + rationale: "Disabling 'local_infile' reduces an attacker's ability to read sensitive files off the affected server via a SQL injection vulnerability." + remediation: "Add a line local-infile=0 in the [mysqld] section of the MySQL configuration file and restart the MySQL service." + compliance: + - cis: ["4.4"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/string-functions.html#function_load-file + - https://dev.mysql.com/doc/refman/5.6/en/load-data.html + condition: all + rules: + - 'c:grep -Rh local-infile /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:local-infile\s*=\s*0' + + - id: 10005 + title: "Ensure 'mysqld' Is Not Started with '--skip-grant-tables'" + description: "This option causes mysqld to start without using the privilege system." + rationale: "If this option is used, all clients of the affected server will have unrestricted access to all databases." + remediation: "Open the MySQL configuration (e.g. my.cnf) file and set: skip-grant-tables = FALSE" + compliance: + - cis: ["4.5"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_skip-grant-tables + condition: all + rules: + - 'c:grep -Rh skip-grant-tables /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:skip-grant-tables\s*=\s*FALSE|skip-grant-tables\s*=\s*false' + + - id: 10006 + title: "Ensure '--skip-symbolic-links' Is Enabled" + description: "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. " + rationale: "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." + remediation: "Open the MySQL configuration file (my.cnf), locate 'skip_symbolic_links' and set it to YES. If the option does not existe, create it in the 'mysqld' section." + compliance: + - cis: ["4.6"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/symbolic-links.html + - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_symbolic-links + condition: all + rules: + - 'c:grep -Rh skip_symbolic_links /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:skip_symbolic_links\s*=\s*YES|skip_symbolic_links\s*=\s*yes' + + - id: 10007 + title: "Ensure 'secure_file_priv' is not empty" + description: "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." + rationale: "Setting secure_file_priv reduces an attacker's ability to read sensitive files off the affected server via a SQL injection vulnerability. " + remediation: "Add the line secure_file_priv= to the [mysqld] section of the MySQL configuration file and restart the MySQL service." + compliance: + - cis: ["4.8"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_secure_file_priv + condition: all + rules: + - 'c:grep -Rh secure_file_priv /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:secure_file_priv\s*=\s*\.' + + - id: 10008 + title: "Ensure 'sql_mode' Contains 'STRICT_ALL_TABLES'" + description: "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." + rationale: "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. " + remediation: "Add STRICT_ALL_TABLES to the sql_mode in the server's configuration file." + compliance: + - cis: ["4.9"] + condition: all + rules: + - 'c:grep -Rh strict_all_tables /etc/mysql/my.cnf /etc/mysql/my.ini /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:strict_all_tables' + +#6 Auditing and Logging + - id: 10009 + title: "Ensure 'log_error' is not empty" + description: "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" + rationale: "nabling 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." + remediation: "Set the log-error option to the path for the error log in the MySQL configuration file (my.cnf or my.ini)." + compliance: + - cis: ["6.1"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/error-log.html + condition: all + rules: + - 'c:grep -Rh log_error /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:log_error\s*=\s*\S+\s*' + + - id: 10010 + title: "Ensure Log Files are not Stored on a non-system partition" + description: "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." + rationale: "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." + remediation: "In the MySQL configuration file (my.cnf), locate the log-bin entry and set it to a file not on root ('/'), /var, or /usr." + compliance: + - cis: ["6.2"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/binary-log.html + - https://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html + condition: none + rules: + - 'c:grep -Rh log_bin /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:log_bin\s*\t*/+$|log_bin\s*\t*/+var/*$|log_bin\s*\t*/+usr/*$' + + - id: 10011 + title: "Ensure 'log_warning' is set to 2" + description: "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." + rationale: "This might help to detect malicious behavior by logging communication errors and aborted connections." + remediation: "Ensure a line containing log-warnings = 2 is found in the mysqld section of the MySQL configuration file (my.cnf)." + compliance: + - cis: ["6.3"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_log-warnings + condition: all + rules: + - 'c:grep -Rh log_warnings /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:log_warnings\s*=\s*2' + + - id: 10012 + title: "Ensure 'log_raw' is set to 'OFF'" + description: "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. " + rationale: "With raw logging of passwords enabled someone with access to the log files might see plain text passwords." + remediation: "IN the MySQL configuration file (my.cnf), locate and set the value of this option: log-raw = OFF" + compliance: + - cis: ["6.4"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/password-logging.html + - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_log-raw + condition: all + rules: + - 'c:grep -Rh log-raw /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:log-raw\s*OFF$|log-raw\s*off$' + +#7 Authentication + - id: 10013 + title: "Ensure 'old_passwords' Is Not Set to '1' or 'ON'" + description: "This variable controls the password hashing method used by the PASSWORD() function and for the IDENTIFIED BY clause of the CREATE USER and GRANT statements. Before 5.6.6, the value can be 0 (or OFF), or 1 (or ON). As of 5.6.6, the following value can be one of the following: 0 - authenticate with the mysql_native_password plugin; 1 - authenticate with the mysql_old_password plugin; 2 - authenticate with the sha256_password plugin" + rationale: "The mysql_old_password plugin leverages an algorithm that can be quickly brute forced using an offline dictionary attack. See CVE-2003-1480 for additional details." + remediation: "Configure mysql to leverage the mysql_native_password or sha256_password plugin." + compliance: + - cis: ["7.1"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/password-hashing.html + - https://dev.mysql.com/doc/refman/5.6/en/sha256-authentication-plugin.html + - https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_old_passwords + - https://www.cvedetails.com/cve/CVE-2003-1480/ + condition: none + rules: + - 'c:grep -Rh old_passwords /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:old_passwords\s*=\s*1' + - 'c:grep -Rh old_passwords /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:old_passwords\s*=\s*ON|old_passwords\s*=\s*on' + + - id: 10014 + title: "Ensure 'secure_auth' is set to 'ON'" + description: "This option dictates whether the server will deny connections by clients that attempt to use accounts that have their password stored in the mysql_old_password format." + rationale: "Enabling this option will prevent all use of passwords employing the old format (and hence insecure communication over the network)." + remediation: "Add a line secure_auth=ON to the [mysqld] section of the MySQL option file." + compliance: + - cis: ["7.2"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_secure-auth + condition: all + rules: + - 'c:grep -Rh secure_auth /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:secure_auth\s*=\s*ON|secure_auth\s*=\s*on' + + - id: 10015 + title: "Ensure Passwords Are Not Stored in the Global Configuration" + description: "The [client] section of the MySQL configuration file allows setting a user and password to be used. Verify the password option is not used in the global configuration file (my.cnf)." + rationale: "The use of the password parameter may negatively impact the confidentiality of the user's password." + remediation: "Use the mysql_config_editor to store authentication credentials in .mylogin.cnf in encrypted form. If not possible, use the user-specific options file, .my.cnf., and restricting file access permissions to the user identity. " + compliance: + - cis: ["7.3"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/mysql-config-editor.html + condition: none + rules: + - 'c:grep -Rh password /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:^\s*password\.*' + + - id: 10016 + title: "Ensure 'sql_mode' Contains 'NO_AUTO_CREATE_USER'" + description: "NO_AUTO_CREATE_USER is an option for sql_mode that prevents a GRANT statement from automatically creating a user when authentication information is not provided." + rationale: "Blank passwords negate the benefits provided by authentication mechanisms. Without this setting an administrative user might accidentally create a user without a password." + remediation: "In the MySQL configuration file (my.cnf), find the sql_mode setting in the [mysqld] area, and add the NO_AUTO_CREATE_USER to the sql_mode setting." + compliance: + - cis: ["7.4"] + condition: all + rules: + - 'c:grep -Rh no_auto_create_user /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:\s*no_auto_create_user\s*$' + + - id: 10017 + title: "Ensure Password Policy is in Place" + description: "Password complexity includes password characteristics such as length, case, length, and character sets." + rationale: "Complex passwords help mitigate dictionary, brute forcing, and other password attacks. This recommendation prevents users from choosing weak passwords which can easily be guessed." + remediation: "Add to the global configuration: plugin-load=validate_password.so validate-password=FORCE_PLUS_PERMANENT validate_password_length=14 validate_password_mixed_case_count=1 validate_password_number_count=1 validate_password_special_char_count=1 validate_password_policy=MEDIUM. And change passwords for users which have passwords which are identical to their username. Restarting the server is required." + compliance: + - cis: ["7.6"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/validate-password-plugin.html + condition: all + rules: + - 'c:grep -Rh plugin-load /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:plugin-load\s*=\s*validate_password.so\s*$' + - 'c:grep -Rh validate-password /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:validate-password\s*=\s*force_plus_permanent\s*$' + - 'c:grep -Rh validate_password_length /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> n:validate_password_length\s*=\s*(\d+)\s$ compare >= 14' + - 'c:grep -Rh validate_password_mixed_case_count /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> n:validate_password_mixed_case_count\s*=\s*(\d+)\s*$ compare >= 1' + - 'c:grep -Rh validate_password_number_count /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> n:validate_password_number_count\s*=\s*(\d+)\s*$ compare >= 1' + - 'c:grep -Rh validate_password_special_char_count /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> n:validate_password_special_char_count\s*=\s*(\d+) compare >= 1' + - 'c:grep -Rh validate_password_policy /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:validate_password_policy\s*=\s*MEDIUM\s*|validate_password_policy\s*=\s*STRONG\s*|validate_password_policy\s*=\s*medium\s*|validate_password_policy\s*=\s*strong\s*' + +#9 Replication + - id: 10018 + title: "Ensure 'master_info_repositrory' is set to 'TABLE'" + description: "The master_info_repository setting determines to where a slave logs master status and connection information. The options are FILE or TABLE. Note also that this setting is associated with the sync_master_info setting as well." + rationale: "The password which the client uses is stored in the master info repository, which by default is a plaintext file. The TABLE master info repository is a bit safer, but with filesystem access it's still possible to gain access to the password the slave is using." + remediation: "Open the MySQL configuration file (my.cnf); locate master_info_repository; set the master_info_repository value to TABLE. Add the option if it does not exist." + compliance: + - cis: ["9.2"] + references: + - https://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#sysvar_master_info_repository + condition: all + rules: + - 'c:grep -Rh master_info_repository /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:master_info_repository\s*=\s*TABLE|master_info_repository\s*=\s*table' + +#10 Enterprise rules + - id: 10019 + title: "Ensure audit_log_connection_policy is not set to 'NONE'" + description: "The audit_log_connection_policy variable controls how the audit plugin writes connection events to the audit log file. " + rationale: "The audit_log_connection_policy offers three options: NONE, ERRORS, and ALL. Each option determines whether connection events are logged and the type of connection events that are logged. Setting a non 'NONE' value for audit_log_connection_policy ensures at a minimum, failed connection events are being logged. The ERRORS setting will log failed connection events and the ALL setting will log all connection events. For MySQL versions => 5.6.20, the audit_log_policy variable can override the audit_log_connection_policy, potentially invalidating this benchmark recommendation, therefore enforcing a setting for audit_log_connection_policy ensures the integrity of this recommendation." + remediation: "Set the audit_log_connection_policy option to ERRORS or ALL in the MySQL configuration file." + compliance: + - cis: ["6.5"] + condition: none + rules: + - 'c:grep -Rh audit_log_connection_policy /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:audit_log_connection_policy\s*=\s* && r:none|NONE' + + - id: 10020 + title: "Ensure audit_log_exclude_account is set to NULL" + description: "The audit_log_exclude_accounts variable enables the administrator to set accounts for which events will not be logged in the audit log." + rationale: "The audit_log_exclude_accounts variable has two permitted values, either NULL or a list of MySQL accounts. Setting this variable correctly ensures no single user is able to unintentionally evade being logged. Particular attention should be made to privileged accounts, as such accounts will generally be bestowed with more privileges than normal users, and should not be listed against this variable." + remediation: "Set audit_log_exclude_accounts=NULL in my.cnf." + compliance: + - cis: ["6.6"] + condition: all + rules: + - 'c:grep -Rh audit_log_exclude_accounts /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:audit_log_exclude_accounts\s*=\s* && r:null\s*$|NULL\s*$' + + - id: 10021 + title: "Ensure audit_log_include_accounts is set to NULL" + description: "The audit_log_include_accounts variable enables the administrator to set accounts for which events should be logged in the audit log." + rationale: "The audit_log_include_accounts variable has two permitted values, either NULL or a list of MySQL accounts. Setting this variable correctly ensures all MySQL users are being logged in the audit log." + remediation: "Set audit_log_include_accounts=NULL in my.cnf." + compliance: + - cis: ["6.7"] + condition: all + rules: + - 'c:grep -Rh audit_log_include_accounts /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:audit_log_include_accounts\s*=\s* && r:null\s*$|NULL\s*$' + + - id: 10022 + title: "Ensure audit_log_policy is set to log logins and connections" + description: "With the audit_log_policy setting the amount of information which is sent to the audit log is controlled. It must be set to log logins and connections." + rationale: "If this setting is set to QUERIES, CONNECTIONS or NONE then either connections or queries are not written to the audit log file." + remediation: "Set audit_log_policy='ALL' in the MySQL configuration file and activate the setting by restarting the server or executing SET GLOBAL audit_log_policy='ALL';" + compliance: + - cis: ["6.9"] + condition: all + rules: + - 'c:grep -Rh audit_log_policy /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> !r:^\s*\t*# && r:audit_log_policy\s*=\s* && r:ALL|LOGINS|all|logins' + + - id: 10023 + title: "Ensure audit_log_statement_policy is set to ALL" + description: "This setting controls whether statements are written to the audit log." + rationale: "This setting must be set to ALL to ensure all statement information is written to the audit log." + remediation: "Add the option audit_log_statement_policy='ALL' to the mysqld section of the MySQL configuration file and restart the server." + compliance: + - cis: ["6.10"] + condition: all + rules: + - 'c:grep -Rh audit_log_statement_policy /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:audit_log_statement_policy\s*=\s* && r:all$|ALL$' + + - id: 10024 + title: "Set audit_log_strategy to SYNCHRONOUS or SEMISYNCRONOUS" + description: "The audit_log_strategy must be set to SYNCHRONOUS or SEMISYNCHRONOUS." + rationale: "This setting controls how information is written to the audit log. It can be set to SYNCHRONOUS to make it fully durable or other settings which are less durable but have less performance overhead." + remediation: "Set audit_log_strategy='SEMISYNCHRONOUS' (or SYNCHRONOUS) in the mysqld section of the configuration file (my.cnf)." + compliance: + - cis: ["6.11"] + condition: all + rules: + - 'c:grep -Rh audit_log_strategy /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:audit_log_strategy\s*=\s* && r:semisynchronous|synchronous|SEMISYNCHRONOUS|SYNCHRONOUS' + + - id: 10025 + title: "Make sure the audit plugin can't be unloaded" + description: "Set audit_log to FORCE_PLUS_PERMANENT." + rationale: "This makes disables unloading on the plugin." + remediation: "Ensure a line audit_log = 'FORCE_PLUS_PERMANENT' is found in the mysqld section of the MySQL configuration file (my.cnf)." + compliance: + - cis: ["6.12"] + condition: all + rules: + - 'c:grep -Rh force_plus_permanent /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/conf.d /etc/mysql/mariadb.conf.d -> r:^audit_log\s*=\s*force_plus_permanent|^audit_log\s*=\s*FORCE_PLUS_PERMANENT' diff --git a/sca/applications/cis_mysql5-6_enterprise_rcl.yml b/sca/applications/cis_mysql5-6_enterprise_rcl.yml deleted file mode 100644 index 904acd998..000000000 --- a/sca/applications/cis_mysql5-6_enterprise_rcl.yml +++ /dev/null @@ -1,386 +0,0 @@ -# Security Configuration assessment -# CIS Checks for Oracle MySQL Entreprise Edition 5.6 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# Center for Internet Security Benchmark for Oracle MySQL Entreprise Edition 5.6 v1.1.0 - 08-15-2016 - -policy: - id: "cis_mysql_enterprise" - file: "cis_mysql5-6_enterprise_rcl.yml" - name: "CIS benchmark for Oracle MySQL Enterprise 5.6" - description: "This document, CIS Oracle MySQL Enterprise Edition 5.6 Benchmark, provides prescriptive guidance for establishing a secure configuration posture for MySQL Enterprise Edition 5.6. The tests were carried out against MySQL Enterprise Edition 5.6 running on Ubuntu Linux 14.04, but applies to other linux distributions as well." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check that MySQL is installed on the system" - description: "Requirements for running the SCA scan against the MySQL policy." - condition: "all required" - rules: - - 'd:/etc/mysql;' - -variables: - $home_dirs: /usr2/home/*,/home/*,/home,/*/home/*,/*/home,/; - $enviroment_files: /*/home/*/\.bashrc,/*/home/*/\.profile,/*/home/*/\.bash_profile,/home/*/\.bashrc,/home/*/\.profile,/home/*/\.bash_profile; - $mysql-cnfs: /etc/mysql/my.cnf,/etc/mysql/mariadb.cnf,/etc/mysql/conf.d/*.cnf,/etc/mysql/mariadb.conf.d/*.cnf,~/.my.cnf; - -checks: -#1 Operating System Level Configuration - - id: 4500 - title: "Disable MySQL Command History" - description: "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." - rationale: "Disabling the MySQL command history reduces the probability of exposing sensitive information, such as passwords and encryption keys." - remediation: "Perform the folowwing 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." - compliance: - - cis: "1.3" - references: - - https://dev.mysql.com/doc/refman/5.6/en/mysql-logging.html - - https://bugs.mysql.com/bug.php?id=72158 - condition: any - rules: - - 'd:$home_dirs -> ^.mysql_history$;' - - id: 4501 - title: "Disable Interactive Login" - description: "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." - rationale: "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." - remediation: "Execute one of the following commands in a terminal: 'usermod -s /bin/false mysql' or 'usermod -s /sbin/nologin mysql'" - compliance: - - cis: "1.5" - condition: any - rules: - - 'f:/etc/passwd -> NIN r:^mysql && r:\.*/bin/false$|/sbin/nologin$;' - - id: 4502 - title: "Verify That 'MYSQL_PWD' Is Not Set In Users' Profiles" - description: "MySQL can read a default database password from an environment variable called MYSQL_PWD." - rationale: "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." - remediation: "Check which users and/or scripts are setting MYSQL_PWD and change them to use a more secure method." - compliance: - - cis: "1.6" - references: - - https://dev.mysql.com/doc/refman/5.6/en/environment-variables.html - condition: any - rules: - - 'f:$enviroment_files -> r:\.*MYSQL_PWD\.*;' -#4 General - - id: 4503 - title: "Ensure 'allow-suspicious-udfs' Is Set to 'FALSE'" - description: "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." - rationale: "Preventing shared libraries that do not contain user-defined functions from loading will reduce the attack surface of the server." - remediation: "Remove '--allow-suspicious-udfs' from the 'mysqld' start up command line. Or Remove 'allow-suspicious-udfs' from the MySQL option file." - compliance: - - cis: "4.3" - references: - - https://dev.mysql.com/doc/refman/5.6/en/udf-security.html - - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_allow-suspicious-udfs - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:allow-suspicious-udfs\.+true;' - - 'f:$mysql-cnfs -> r:allow-suspicious-udfs\s*$;' - - id: 4504 - title: "Ensure 'local_infile is Disabled" - description: "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'." - rationale: "Disabling 'local_infile' reduces an attacker's ability to read sensitive files off the affected server via a SQL injection vulnerability." - remediation: "Add a line local-infile=0 in the [mysqld] section of the MySQL configuration file and restart the MySQL service." - compliance: - - cis: "4.4" - references: - - https://dev.mysql.com/doc/refman/5.6/en/string-functions.html#function_load-file - - https://dev.mysql.com/doc/refman/5.6/en/load-data.html - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:local-infile\s*=\s*1;' - - 'f:$mysql-cnfs -> r:local-infile\s*$;' - - id: 4505 - title: "Ensure 'mysqld' Is Not Started with '--skip-grant-tables'" - description: "This option causes mysqld to start without using the privilege system." - rationale: "If this option is used, all clients of the affected server will have unrestricted access to all databases." - remediation: "Open the MySQL configuration (e.g. my.cnf) file and set: skip-grant-tables = FALSE" - compliance: - - cis: "4.5" - references: - - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_skip-grant-tables - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:skip-grant-tables\s*=\s*true;' - - 'f:$mysql-cnfs -> !r:skip-grant-tables\s*=\s*false;' - - 'f:$mysql-cnfs -> r:skip-grant-tables\s*$;' - - id: 4506 - title: "Ensure '--skip-symbolic-links' Is Enabled" - description: "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. " - rationale: "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." - remediation: "Open the MySQL configuration file (my.cnf), locate 'skip_symbolic_links' and set it to YES. If the option does not existe, create it in the 'mysqld' section." - compliance: - - cis: "4.6" - references: - - https://dev.mysql.com/doc/refman/5.6/en/symbolic-links.html - - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_symbolic-links - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:skip_symbolic_links\s*=\s*no;' - - 'f:$mysql-cnfs -> !r:skip_symbolic_links\s*=\s*yes;' - - 'f:$mysql-cnfs -> r:skip_symbolic_links\s*$;' - - id: 4507 - title: "Ensure 'secure_file_priv' is not empty" - description: "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." - rationale: "Setting secure_file_priv reduces an attacker's ability to read sensitive files off the affected server via a SQL injection vulnerability. " - remediation: "Add the line secure_file_priv= to the [mysqld] section of the MySQL configuration file and restart the MySQL service." - compliance: - - cis: "4.8" - references: - - https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_secure_file_priv - condition: any - rules: - - 'f:$mysql-cnfs -> IN r:^# && r:secure_file_priv=\s*\S+\s*;' - - 'f:$mysql-cnfs -> !r:secure_file_priv=\s*\S+\s*;' - - 'f:$mysql-cnfs -> r:secure_file_priv\s*$;' - - id: 4508 - title: "Ensure 'sql_mode' Contains 'STRICT_ALL_TABLES'" - description: "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." - rationale: "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. " - remediation: "Add STRICT_ALL_TABLES to the sql_mode in the server's configuration file." - compliance: - - cis: "4.9" - condition: any - rules: - - 'f:$mysql-cnfs -> !r:strict_all_tables\s*$;' -#6 Auditing and Logging - - id: 4509 - title: "Ensure 'log_error' is not empty" - description: "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" - rationale: "nabling 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." - remediation: "Set the log-error option to the path for the error log in the MySQL configuration file (my.cnf or my.ini)." - compliance: - - cis: "6.1" - references: - - https://dev.mysql.com/doc/refman/5.6/en/error-log.html - condition: any - rules: - - 'f:$mysql-cnfs -> IN r:^# && r:log_error\s*=\s*\S+\s*;' - - 'f:$mysql-cnfs -> !r:log_error\s*=\s*\S+\s*;' - - 'f:$mysql-cnfs -> r:log_error\s*$;' - - id: 4510 - title: "Ensure Log Files are not Stored on a non-system partition" - description: "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." - rationale: "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." - remediation: "In the MySQL configuration file (my.cnf), locate the log-bin entry and set it to a file not on root ('/'), /var, or /usr." - compliance: - - cis: "6.2" - references: - - https://dev.mysql.com/doc/refman/5.6/en/binary-log.html - - https://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html - condition: any - rules: - - 'f:$mysql-cnfs -> NIN !r:^# && r:log_bin= && r:\s*/\S*\s*;' - - 'f:$mysql-cnfs -> NIN !r:^# && r:log_bin= && r:\s*/var/\S*\s*;' - - 'f:$mysql-cnfs -> NIN !r:^# && r:log_bin= && r:\s*/usr/\S*\s*;' - - 'f:$mysql-cnfs -> r:log_bin\s*$;' - - id: 4511 - title: "Ensure 'log_warning' is set to 2" - description: "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." - rationale: "This might help to detect malicious behavior by logging communication errors and aborted -connections." - remediation: "Ensure a line containing log-warnings = 2 is found in the mysqld section of the MySQL configuration file (my.cnf)." - compliance: - - cis: "6.3" - references: - - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_log-warnings - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:log_warnings\s*=\s*0;' - - 'f:$mysql-cnfs -> IN !r:^# && r:log_warnings\s*=\s*1;' - - 'f:$mysql-cnfs -> !r:log_warnings\s*=\s*\d+;' - - 'f:$mysql-cnfs -> r:log_warnings\s*$;' - - id: 4512 - title: "Ensure 'log_raw' is set to 'OFF'" - description: "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. " - rationale: "With raw logging of passwords enabled someone with access to the log files might see plain text passwords." - remediation: "IN the MySQL configuration file (my.cnf), locate and set the value of this option: log-raw = OFF" - compliance: - - cis: "6.4" - references: - - https://dev.mysql.com/doc/refman/5.6/en/password-logging.html - - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_log-raw - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:log-raw\s*=\s*on;' - - 'f:$mysql-cnfs -> r:log-raw\s*$;' - - id: 4513 - title: "Ensure audit_log_connection_policy is not set to 'NONE'" - description: "The audit_log_connection_policy variable controls how the audit plugin writes connection events to the audit log file. " - rationale: "The audit_log_connection_policy offers three options: NONE, ERRORS, and ALL. Each option determines whether connection events are logged and the type of connection events that are logged. Setting a non 'NONE' value for audit_log_connection_policy ensures at a minimum, failed connection events are being logged. The ERRORS setting will log failed connection events and the ALL setting will log all connection events. For MySQL versions => 5.6.20, the audit_log_policy variable can override the audit_log_connection_policy, potentially invalidating this benchmark recommendation, therefore enforcing a setting for audit_log_connection_policy ensures the integrity of this recommendation." - remediation: "Set the audit_log_connection_policy option to ERRORS or ALL in the MySQL configuration file." - compliance: - - cis: "6.5" - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r^# && r::audit_log_connection_policy\s*=\s*none;' - - 'f:$mysql-cnfs -> r:audit_log_connection_policy\s*$;' - - id: 4514 - title: "Ensure audit_log_exclude_account is set to NULL" - description: "The audit_log_exclude_accounts variable enables the administrator to set accounts for which events will not be logged in the audit log." - rationale: "The audit_log_exclude_accounts variable has two permitted values, either NULL or a list of MySQL accounts. Setting this variable correctly ensures no single user is able to unintentionally evade being logged. Particular attention should be made to privileged accounts, as such accounts will generally be bestowed with more privileges than normal users, and should not be listed against this variable." - remediation: "Set audit_log_exclude_accounts=NULL in my.cnf." - compliance: - - cis: "6.6" - condition: any - rules: - - 'f:$mysql-cnfs -> NIN !r:^# && r:audit_log_exclude_accounts\s*=\s* && r:null\s*$;' - - 'f:$mysql-cnfs -> r:audit_log_exclude_accounts\s*$;' - - id: 4515 - title: "Ensure audit_log_include_accounts is set to NULL" - description: "The audit_log_include_accounts variable enables the administrator to set accounts for which events should be logged in the audit log." - rationale: "The audit_log_include_accounts variable has two permitted values, either NULL or a list of MySQL accounts. Setting this variable correctly ensures all MySQL users are being logged in the audit log." - remediation: "Set audit_log_include_accounts=NULL in my.cnf." - compliance: - - cis: "6.7" - condition: any - rules: - - 'f:$mysql-cnfs -> NIN !r:^# && r:audit_log_include_accounts\s*=\s* && r:null\s*$;' - - 'f:$mysql-cnfs -> r:audit_log_include_accounts\s*$;' - - id: 4516 - title: "Ensure audit_log_policy is set to log logins and connections" - description: "With the audit_log_policy setting the amount of information which is sent to the audit log is controlled. It must be set to log logins and connections." - rationale: "If this setting is set to QUERIES, CONNECTIONS or NONE then either connections or queries are not written to the audit log file." - remediation: "Set audit_log_policy='ALL' in the MySQL configuration file and activate the setting by restarting the server or executing SET GLOBAL audit_log_policy='ALL';" - compliance: - - cis: "6.9" - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:audit_log_policy\s*=\s*queries;' - - 'f:$mysql-cnfs -> IN !r:^# && r:audit_log_policy\s*=\s*none;' - - 'f:$mysql-cnfs -> IN !r:^# && r:audit_log_policy\s*=\s*logins;' - - 'f:$mysql-cnfs -> r:audit_log_policy\s*$;' - - id: 4517 - title: "Ensure audit_log_statement_policy is set to ALL" - description: "This setting controls whether statements are written to the audit log." - rationale: "This setting must be set to ALL to ensure all statement information is written to the audit log." - remediation: "Add the option audit_log_statement_policy='ALL' to the mysqld section of the MySQL configuration file and restart the server." - compliance: - - cis: "6.10" - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:audit_log_statement_policy\.+errors;' - - 'f:$mysql-cnfs -> IN !r:^# && r:audit_log_statement_policy\.+none;' - - 'f:$mysql-cnfs -> r:audit_log_statement_policy\s*$;' - - id: 4518 - title: "Set audit_log_strategy to SYNCHRONOUS or SEMISYNCRONOUS" - description: "The audit_log_strategy must be set to SYNCHRONOUS or SEMISYNCHRONOUS." - rationale: "This setting controls how information is written to the audit log. It can be set to SYNCHRONOUS to make it fully durable or other settings which are less durable but have less performance overhead." - remediation: "Set audit_log_strategy='SEMISYNCHRONOUS' (or SYNCHRONOUS) in the mysqld section of the configuration file (my.cnf)." - compliance: - - cis: "6.11" - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:audit_log_strategy\.+asynchronous;' - - 'f:$mysql-cnfs -> IN !r:^# && r:audit_log_strategy\.+performance;' - - 'f:$mysql-cnfs -> IN !r:audit_log_strategy\s*=\s* && r:semisynchronous|synchronous;' - - 'f:$mysql-cnfs -> r:audit_log_strategy\s*$;' - - id: 4519 - title: "Make sure the audit plugin can't be unloaded" - description: "Set audit_log to FORCE_PLUS_PERMANENT." - rationale: "This makes disables unloading on the plugin." - remediation: "Ensure a line audit_log = 'FORCE_PLUS_PERMANENT' is found in the mysqld section of the MySQL configuration file (my.cnf)." - compliance: - - cis: "6.12" - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:^audit_log\s*=\s*on\s*;' - - 'f:$mysql-cnfs -> IN !r:^# && r:^audit_log\s*=\s*off\s*;' - - 'f:$mysql-cnfs -> IN !r:^# && r:^audit_log\s*=\s*force\s*;' - - 'f:$mysql-cnfs -> !r:^audit_log\s*=\s*force_plus_permanent\s*;' - - 'f:$mysql-cnfs -> r:^audit_log\s$;' -#7 Authentication - - id: 4520 - title: "Ensure 'old_passwords' Is Not Set to '1' or 'ON'" - description: "This variable controls the password hashing method used by the PASSWORD() function and for the IDENTIFIED BY clause of the CREATE USER and GRANT statements. Before 5.6.6, the value can be 0 (or OFF), or 1 (or ON). As of 5.6.6, the following value can be one of the following: 0 - authenticate with the mysql_native_password plugin; 1 - authenticate with the mysql_old_password plugin; 2 - authenticate with the sha256_password plugin" - rationale: "The mysql_old_password plugin leverages an algorithm that can be quickly brute forced using an offline dictionary attack. See CVE-2003-1480 for additional details." - remediation: "Configure mysql to leverage the mysql_native_password or sha256_password plugin." - compliance: - - cis: "7.1" - references: - - https://dev.mysql.com/doc/refman/5.6/en/password-hashing.html - - https://dev.mysql.com/doc/refman/5.6/en/sha256-authentication-plugin.html - - https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_old_passwords - - https://www.cvedetails.com/cve/CVE-2003-1480/ - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:old_passwords\s*=\s*1;' - - 'f:$mysql-cnfs -> IN !r:^# && r:old_passwords\s*=\s*on;' - - 'f:$mysql-cnfs -> !r:old_passwords\s*=\s*2;' - - 'f:$mysql-cnfs -> r:old_passwords\s*$;' - - id: 4521 - title: "Ensure 'secure_auth' is set to 'ON'" - description: "This option dictates whether the server will deny connections by clients that attempt to use accounts that have their password stored in the mysql_old_password format." - rationale: "Enabling this option will prevent all use of passwords employing the old format (and hence insecure communication over the network)." - remediation: "Add a line secure_auth=ON to the [mysqld] section of the MySQL option file." - compliance: - - cis: "7.2" - references: - - https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_secure-auth - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:secure_auth\s*=\s*off;' - - 'f:$mysql-cnfs -> !r:secure_auth\s*=\s*on;' - - 'f:$mysql-cnfs -> r:secure_auth\s*$;' - - id: 4522 - title: "Ensure Passwords Are Not Stored in the Global Configuration" - description: "The [client] section of the MySQL configuration file allows setting a user and password to be used. Verify the password option is not used in the global configuration file (my.cnf)." - rationale: "The use of the password parameter may negatively impact the confidentiality of the user's password." - remediation: "Use the mysql_config_editor to store authentication credentials in .mylogin.cnf in encrypted form. If not possible, use the user-specific options file, .my.cnf., and restricting file access permissions to the user identity. " - compliance: - - cis: "7.3" - references: - - https://dev.mysql.com/doc/refman/5.6/en/mysql-config-editor.html - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:^\s*password\.*;' - - id: 4523 - title: "Ensure 'sql_mode' Contains 'NO_AUTO_CREATE_USER'" - description: "NO_AUTO_CREATE_USER is an option for sql_mode that prevents a GRANT statement from automatically creating a user when authentication information is not provided." - rationale: "Blank passwords negate the benefits provided by authentication mechanisms. Without this setting an administrative user might accidentally create a user without a password." - remediation: "In the MySQL configuration file (my.cnf), find the sql_mode setting in the [mysqld] area, and add the NO_AUTO_CREATE_USER to the sql_mode setting." - compliance: - - cis: "7.4" - condition: any - rules: - - 'f:$mysql-cnfs -> !r:no_auto_create_user\s*$;' - - 'f:$mysql-cnfs -> IN r:^# && r:\s*no_auto_create_user\s*$;' - - id: 4524 - title: "Ensure Password Policy is in Place" - description: "Password complexity includes password characteristics such as length, case, length, and character sets." - rationale: "Complex passwords help mitigate dictionary, brute forcing, and other password attacks. This recommendation prevents users from choosing weak passwords which can easily be guessed." - remediation: "Add to the global configuration: plugin-load=validate_password.so validate-password=FORCE_PLUS_PERMANENT validate_password_length=14 validate_password_mixed_case_count=1 validate_password_number_count=1 validate_password_special_char_count=1 validate_password_policy=MEDIUM. And change passwords for users which have passwords which are identical to their username. Restarting the server is required." - compliance: - - cis: "7.6" - references: - - https://dev.mysql.com/doc/refman/5.6/en/validate-password-plugin.html - condition: any - rules: - - 'f:$mysql-cnfs -> !r:plugin-load\s*=\s*validate_password.so\s*$;' - - 'f:$mysql-cnfs -> !r:validate-password\s*=\s*force_plus_permanent\s*$;' - - 'f:$mysql-cnfs -> !r:validate_password_length\s*=\s*14\s$;' - - 'f:$mysql-cnfs -> !r:validate_password_mixed_case_count\s*=\s*1\s*$;' - - 'f:$mysql-cnfs -> !r:validate_password_number_count\s*=\s*1\s*$;' - - 'f:$mysql-cnfs -> !r:validate_password_special_char_count\s*=\s*1;' - - 'f:$mysql-cnfs -> !r:validate_password_policy\s*=\s*medium\s*;' -#9 Replication - - id: 4525 - title: "Ensure 'master_info_repositrory' is set to 'TABLE'" - description: "The master_info_repository setting determines to where a slave logs master status and connection information. The options are FILE or TABLE. Note also that this setting is associated with the sync_master_info setting as well." - rationale: "The password which the client uses is stored in the master info repository, which by default is a plaintext file. The TABLE master info repository is a bit safer, but with filesystem access it's still possible to gain access to the password the slave is using." - remediation: "Open the MySQL configuration file (my.cnf); locate master_info_repository; set the master_info_repository value to TABLE. Add the option if it does not exist." - compliance: - - cis: "9.2" - references: - - https://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#sysvar_master_info_repository - condition: any - rules: - - 'f:$mysql-cnfs -> IN !r:^# && r:master_info_repository\s*=\s*file;' - - 'f:$mysql-cnfs -> !r:master_info_repository\s*=\s*table;' - - 'f:$mysql-cnfs -> r:master_info_repository\s*$;' diff --git a/sca/applications/web_vulnerabilities.yml b/sca/applications/web_vulnerabilities.yml new file mode 100644 index 000000000..e8f0993be --- /dev/null +++ b/sca/applications/web_vulnerabilities.yml @@ -0,0 +1,170 @@ +# Security Configuration Assessment +# Checks for web-related vulnerabilities on Linux systems +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation + +policy: + id: "web_vulnerabilities" + file: "web_vulnerabilities.yml" + name: "System audit for web-related vulnerabilities" + description: "Guidance for establishing a secure configuration for web-related vulnerabilities." + +requirements: + title: Check if web-server files are present + description: "Requirements for running the SCA scan against the web-vulnerability policy." + condition: any + rules: + - 'f:$php.ini' + - 'd:$web_dirs' + +# In case your configuration files are not located on these paths, set the variables to match your php.ini file and your web directory +# Other possible default locations for php.ini: /var/www/conf/php.ini,/etc/php5/apache2/php.ini +# Other possible default locations for web directory: /var/htdocs,/home/httpd,/usr/local/apache,/usr/local/apache2,/usr/local/www +variables: + $php.ini: /etc/php.ini + $web_dirs: /var/www + +# PHP checks +checks: + - id: 10500 + title: "PHP - Ensure 'Register globals' are not enabled" + condition: all + rules: + - 'f:$php.ini -> r:^register_globals\s*\t*=\s*\t*Off|register_globals\s*\t*=\s*\t*off' + + - id: 10501 + title: "PHP - Ensure 'Expose PHP' is not enabled" + condition: all + rules: + - 'f:$php.ini -> r:^expose_php\s*\t*=\s*\t*Off|^expose_php\s*\t*=\s*\t*off' + + - id: 10502 + title: "PHP - Ensure 'Allow URL fopen' is not enabled" + condition: all + rules: + - 'f:$php.ini -> r:^allow_url_fopen\s*\t*=\s*\t*Off|^allow_url_fopen\s*\t*=\s*\t*off' + + - id: 10503 + title: "PHP - Ensure 'Displaying of errors' is not enabled" + condition: all + rules: + - 'f:$php.ini -> r:^display_errors\s*\t*=\s*\t*Off|^display_errors\s*\t*=\s*\t*off' + +# WEB checks + - id: 10504 + title: "Web exploits: '.yop' is an uncommon file name inside htdocs - Possible compromise" + compliance: + - pci_dss: ["6.5", "6.6", "11.4"] + - nist_800_53: ["SA.11", "SC.5", "SI.3", "SI.4"] + condition: none + rules: + - 'd:$web_dirs -> ^.yop$' + + - id: 10505 + title: "Web exploits: 'id' is an uncommon file name inside htdocs - Possible compromise" + compliance: + - pci_dss: ["6.5", "6.6", "11.4"] + - nist_800_53: ["SA.11", "SC.5", "SI.3", "SI.4"] + condition: none + rules: + - 'd:$web_dirs -> ^id$' + + - id: 10506 + title: "Web exploits: '.ssh' is an uncommon file name inside htdocs" + compliance: + - pci_dss: ["6.5", "6.6", "11.4"] + - nist_800_53: ["SA.11", "SC.5", "SI.3", "SI.4"] + condition: none + rules: + - 'd:$web_dirs -> ^.ssh$' + + - id: 10507 + title: "Web exploits: '...' is an uncommon file name inside htdocs - Possible compromise" + compliance: + - pci_dss: ["6.5", "6.6", "11.4"] + - nist_800_53: ["SA.11", "SC.5", "SI.3", "SI.4"] + condition: none + rules: + - 'd:$web_dirs -> ^...$' + + - id: 10508 + title: "Web exploits: '.shell' is an uncommon file name inside htdocs - Possible compromise" + compliance: + - pci_dss: ["6.5", "6.6", "11.4"] + - nist_800_53: ["SA.11", "SC.5", "SI.3", "SI.4"] + condition: none + rules: + - 'd:$web_dirs -> ^.shell$' + +# Outdated Web applications + - id: 10509 + title: "Web vulnerability - Outdated WordPress installation" + compliance: + - pci_dss: ["6.5", "6.6", "11.4"] + - nist_800_53: ["SA.11", "SC.5", "SI.3", "SI.4"] + condition: none + rules: + - 'd:$web_dirs -> ^version.php$ -> r:^\.wp_version && r:4.4.2' + + - id: 10510 + title: "Web vulnerability - Outdated Joomla installation" + compliance: + - pci_dss: ["6.5", "6.6", "11.4"] + - nist_800_53: ["SA.11", "SC.5", "SI.3", "SI.4"] + condition: none + rules: + - 'd:$web_dirs -> ^version.php$ -> r:var \.RELEASE && r:3.4.8' + + - id: 10511 + title: "Web vulnerability - Outdated osCommerce (v2.2) installation" + compliance: + - pci_dss: ["6.5", "6.6", "11.4"] + - nist_800_53: ["SA.11", "SC.5", "SI.3", "SI.4"] + condition: none + rules: + - 'd:$web_dirs -> ^application_top.php$ -> r:osCommerce && r:2.2-' + +# Known backdoors + - id: 10512 + title: "Web vulnerability - Backdoors / Web based malware found - eval(base64_decode)" + compliance: + - pci_dss: ["6.5", "6.6", "11.4"] + - nist_800_53: ["SA.11", "SC.5", "SI.3", "SI.4"] + condition: none + rules: + - 'd:$web_dirs -> .php$ -> r:eval\(base64_decode\(\paWYo' + + - id: 10513 + title: "Web vulnerability - Backdoors / Web based malware found - eval(base64_decode(POST))" + compliance: + - pci_dss: ["6.5", "6.6", "11.4"] + - nist_800_53: ["SA.11", "SC.5", "SI.3", "SI.4"] + condition: none + rules: + - 'd:$web_dirs -> .php$ -> r:eval\(base64_decode\(\S_POST' + + - id: 10514 + title: "Web vulnerability - .htaccess file compromised" + compliance: + - pci_dss: ["6.5", "6.6", "11.4"] + - nist_800_53: ["SA.11", "SC.5", "SI.3", "SI.4"] + references: + - https://blog.sucuri.net/2011/05/understanding-htaccess-attacks-part-1.html + condition: none + rules: + - 'd:$web_dirs -> ^.htaccess$ -> r:RewriteCond\s+\S+HTTP_REFERERS\s+\S+google' + + - id: 10515 + title: "Web vulnerability - .htaccess file compromised - auto append" + compliance: + - pci_dss: ["6.5", "6.6", "11.4"] + - nist_800_53: ["SA.11", "SC.5", "SI.3", "SI.4"] + references: + - https://blog.sucuri.net/2011/05/understanding-htaccess-attacks-part-1.html + condition: none + rules: + - 'd:$web_dirs -> ^.htaccess$ -> r:^php_value\s*auto_append_file' diff --git a/sca/darwin/15/cis_apple_macOS_10.11.yml b/sca/darwin/15/cis_apple_macOS_10.11.yml index fda798ca0..ce7568071 100644 --- a/sca/darwin/15/cis_apple_macOS_10.11.yml +++ b/sca/darwin/15/cis_apple_macOS_10.11.yml @@ -1,8 +1,8 @@ -# Security Configuration assessment +# Security Configuration Assessment # CIS Checks for MacOS 10.11 # Copyright (C) 2015-2019, Wazuh Inc. # -# This program is a free software; you can redistribute it +# This program is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public # License (version 2) as published by the FSF - Free Software # Foundation @@ -13,415 +13,430 @@ policy: id: "cis_apple_macos_10_11" file: "cis_apple_macOS_10.11.yml" - name: "CIS Apple OSX 10.11 Benchmark" - description: "This document, CIS Apple OSX 10.11 Benchmark, provides prescriptive guidance for establishing a secure configuration posture for Apple OSX 10.11. This guide was tested against Apple OSX 10.11. To obtain the latest version of this guide, please visit https://benchmarks.cisecurity.org. If you have questions, comments, or have identified ways to improve this guide, please write us at feedback@cisecurity.org." + name: "CIS Apple macOS 10.11 Benchmark" + description: "This document, CIS Apple macOS 10.11 Benchmark, provides prescriptive guidance for establishing a secure configuration posture for Apple macOS 10.11. This guide was tested against Apple macOS 10.11." references: - https://www.cisecurity.org/cis-benchmarks/ requirements: title: "Check MacOS version" description: "Requirements for running the SCA scan against MacOS 10.11 (El Capitan)." - condition: "any required" + condition: any rules: - - 'c:defaults read loginwindow SystemVersionStampAsString -> r:^\s*10\p11;' - - 'c:sw_vers -> r:^ProductVersion:\t*10\p11;' - - 'c:system_profiler SPSoftwareDataType -> r:^\s*System Version:.*10\p11;' + - 'c:sw_vers -> r:^ProductVersion:\t*\s*10\p11' + - 'c:system_profiler SPSoftwareDataType -> r:System Version:.*10\p11' + - 'c:defaults read loginwindow SystemVersionStampAsString -> r:^\s*10\p11' checks: # 1.1 Verify all Apple provided software is current (Scored) - - id: 3000 - title: "Verify all Apple provided software is current (Scored)" - description: "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." - rationale: "It is important that these updates be applied in a timely manner to prevent unauthorized persons from exploiting the identified vulnerabilities." - remediation: "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" - compliance: - - cis: "1.1" - condition: any - rules: - - 'c:softwareupdate -l -> !r:^\s*No new software available;' + - id: 7500 + title: "Verify all Apple provided software is current" + description: "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." + rationale: "It is important that these updates be applied in a timely manner to prevent unauthorized persons from exploiting the identified vulnerabilities." + remediation: "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" + compliance: + - cis: ["1.1"] + condition: all + rules: + - 'c:softwareupdate -l -> r:No new software available' + # 1.2 Enable Auto Update (Scored) - - id: 3001 - title: "Enable Auto Update (Scored)" - description: "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." - rationale: "It is important that a system has the newest updates applied so as to prevent unauthorized persons from exploiting identified vulnerabilities." - remediation: "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" - compliance: - - cis: "1.2" - references: - - https://macops.ca/os-x-admins-your-clients-are-not-getting-background-security-updates/ - - https://derflounder.wordpress.com/2014/12/17/forcing-xprotect-blacklist-updates-on-mavericks-and-yosemite/ - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -> r:^\s*0$;' + - id: 7501 + title: "Enable Auto Update" + description: "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." + rationale: "It is important that a system has the newest updates applied so as to prevent unauthorized persons from exploiting identified vulnerabilities." + remediation: "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" + compliance: + - cis: ["1.2"] + references: + - https://macops.ca/os-x-admins-your-clients-are-not-getting-background-security-updates/ + - https://derflounder.wordpress.com/2014/12/17/forcing-xprotect-blacklist-updates-on-mavericks-and-yosemite/ + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -> 1' + # 1.3 Enable app update installs (Scored) - - id: 3002 - title: "Enable app update installs (Scored)" - description: "Ensure that application updates are installed after they are available from Apple. These updates do not require reboots or admin privileges for end users." - rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" - remediation: "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." - compliance: - - cis: "1.3" - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.commerce AutoUpdate -> r:^\s*0$;' + - id: 7502 + title: "Enable app update installs" + description: "Ensure that application updates are installed after they are available from Apple. These updates do not require reboots or admin privileges for end users." + rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" + remediation: "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." + compliance: + - cis: ["1.3"] + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.commerce AutoUpdate -> 1' + # 1.4 Enable system data files and security update installs (Scored) - - id: 3003 - title: "Enable system data files and security update installs (Scored)" - description: "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." - rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" - remediation: "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" - compliance: - - cis: "1.4" - references: - - https://www.thesafemac.com/tag/xprotect/ - - https://support.apple.com/en-us/HT202491 - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate -> IN r:^\s*ConfigDataInstall\s*= && !r:\s*1;' - - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate -> IN r:^\s*CriticalUpdateInstall\s*= && !r:\s*1;' + - id: 7503 + title: "Enable system data files and security update installs" + description: "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." + rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" + remediation: "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" + compliance: + - cis: ["1.4"] + references: + - https://www.thesafemac.com/tag/xprotect/ + - https://support.apple.com/en-us/HT202491 + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate ConfigDataInstall -> 1' + - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate CriticalUpdateInstall -> 1' + # 1.5 Enable OS X update installs (Scored) - - id: 3004 - title: "Enable OS X update installs (Scored)" - description: "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." - rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" - remediation: "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" - compliance: - - cis: "1.5" - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired -> r:^\s*0$;' -# 2.1.2 Turn off Bluetooth "Discoverable" mode when not pairing devices (Scored) - - id: 3005 - title: "Turn off Bluetooth \"Discoverable\" mode when not pairing devices (Scored)" - description: "When Bluetooth is set to discoverable mode, the Mac sends a signal indicating that it's available to pair with another Bluetooth device. When a device is \"discoverable\" it broadcasts information about itself and its location. Starting with OS X 10.9 Discoverable mode is enabled while the Bluetooth System Preference is open and turned off once closed. Systems that have the Bluetooth System Preference open at the time of audit will show as Discoverable." - rationale: "When in the discoverable state an unauthorized user could gain access to the system by pairing it with a remote device." - remediation: "Starting with OS X (10.9) Bluetooth is only set to Discoverable when the Bluetooth System Preference is selected. To ensure that the computer is not Discoverable do not leave that preference open." - compliance: - - cis: "2.1.2" - condition: any - rules: - - 'c:/usr/sbin/system_profiler SPBluetoothDataType -> !r:^\s*[Dd]iscoverable:\s*Off;' + - id: 7504 + title: "Enable OS X update installs" + description: "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." + rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" + remediation: "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" + compliance: + - cis: ["1.5"] + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired -> 1' + # 2.2.1 Enable "Set time and date automatically" (Not Scored) - - id: 3006 - title: "Enable \"Set time and date automatically\" (Not Scored)" - description: "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." - rationale: "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." - remediation: "Run the following commands: sudo systemsetup -setnetworktimeserver sudo systemsetup -setusingnetworktime on" - compliance: - - cis: "2.2.1" - condition: any - rules: - - 'c:systemsetup -getusingnetworktime -> !r:^\s*Network Time:\s*On;' + - id: 7505 + title: "Enable \"Set time and date automatically\"" + description: "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." + rationale: "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." + remediation: "Run the following commands: sudo systemsetup -setnetworktimeserver sudo systemsetup -setusingnetworktime on" + compliance: + - cis: ["2.2.1"] + condition: all + rules: + - 'c:systemsetup -getusingnetworktime -> r:Network Time:\s*\t*On' + # 2.2.3 Restrict NTP server to loopback interface (Scored) - - id: 3007 - title: "Restrict NTP server to loopback interface (Scored)" - description: "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." - rationale: "Mobile workstations on untrusted networks should not have open listening services available to other nodes on the network." - remediation: "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" - compliance: - - cis: "2.2.3" - condition: any - rules: - - 'f:/etc/ntp-restrict.conf -> !r:restrict lo;' + - id: 7506 + title: "Restrict NTP server to loopback interface" + description: "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." + rationale: "Mobile workstations on untrusted networks should not have open listening services available to other nodes on the network." + remediation: "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" + compliance: + - cis: ["2.2.3"] + condition: all + rules: + - 'f:/etc/ntp-restrict.conf -> r:restrict lo' + # 2.4.1 Disable Remote Apple Events (Scored) - - id: 3008 - title: "Disable Remote Apple Events (Scored)" - description: "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." - rationale: "Disabling Remote Apple Events mitigates the risk of an unauthorized program gaining access to the system." - remediation: "Run the following command in Terminal: sudo systemsetup -setremoteappleevents off" - compliance: - - cis: "2.4.1" - condition: any - rules: - - 'c:systemsetup -getremoteappleevents -> !r:^Remote Apple Events:\s*Off;' + - id: 7507 + title: "Disable Remote Apple Events" + description: "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." + rationale: "Disabling Remote Apple Events mitigates the risk of an unauthorized program gaining access to the system." + remediation: "Run the following command in Terminal: sudo systemsetup -setremoteappleevents off" + compliance: + - cis: ["2.4.1"] + condition: all + rules: + - 'c:systemsetup -getremoteappleevents -> r:Remote Apple Events:\s*\t*Off' + # 2.4.4 Disable Printer Sharing (Scored) - - id: 3009 - title: "Disable Printer Sharing (Scored)" - description: "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." - rationale: "Disabling Printer Sharing mitigates the risk of attackers attempting to exploit the print server to gain access to the system." - remediation: "Perform the following to implement the prescribed state: 1. Open System Preferences 2. Select Sharing 3. Uncheck Printer Sharing" - compliance: - - cis: "2.4.4" - condition: any - rules: - - 'c:system_profiler SPPrintersDataType -> r:Shared:\s*Yes;' + - id: 7508 + title: "Disable Printer Sharing" + description: "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." + rationale: "Disabling Printer Sharing mitigates the risk of attackers attempting to exploit the print server to gain access to the system." + remediation: "Perform the following to implement the prescribed state: 1. Open System Preferences 2. Select Sharing 3. Uncheck Printer Sharing" + compliance: + - cis: ["2.4.4"] + condition: none + rules: + - 'c:system_profiler SPPrintersDataType -> r:Shared:\s*\t*Yes' + # 2.4.5 Disable Remote Login (Scored) - - id: 3010 - title: "Disable Remote Login (Scored)" - description: "Remote Login allows an interactive terminal connection to a computer." - rationale: "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." - remediation: "Run the following command in Terminal: sudo systemsetup -setremotelogin off" - compliance: - - cis: "2.4.5" - condition: any - rules: - - 'c:systemsetup -getremotelogin -> r:^Remote Login:\s*On;' + - id: 7509 + title: "Disable Remote Login" + description: "Remote Login allows an interactive terminal connection to a computer." + rationale: "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." + remediation: "Run the following command in Terminal: sudo systemsetup -setremotelogin off" + compliance: + - cis: ["2.4.5"] + condition: all + rules: + - 'c:systemsetup -getremotelogin -> r:Remote Login:\s*\t*Off' + # 2.4.8 Disable File Sharing (Scored) - - id: 3011 - title: "Disable File Sharing (Scored)" - description: "Apple's File Sharing uses a combination of SMB (Windows sharing) and AFP (Mac sharing)" - rationale: "By disabling file sharing, the remote attack surface and risk of unauthorized access to files stored on the system is reduced." - remediation: "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" - compliance: - - cis: "2.4.8" - condition: any - rules: - - 'c:launchctl list -> r:AppleFileServer;' + - id: 7510 + title: "Disable File Sharing" + description: "Apple's File Sharing uses a combination of SMB (Windows sharing) and AFP (Mac sharing)" + rationale: "By disabling file sharing, the remote attack surface and risk of unauthorized access to files stored on the system is reduced." + remediation: "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" + compliance: + - cis: ["2.4.8"] + condition: none + rules: + - 'c:launchctl list -> r:AppleFileServer' + - 'f:/Library/Preferences/SystemConfiguration/com.apple.smb.server.plist -> r:\ r:^\s*womp\s+1$;' - - 'c:pmset -b -g -> r:^\s*womp\s+1$;' + - id: 7511 + title: "Disable \"Wake for network access\"" + description: "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." + rationale: "Disabling this feature mitigates the risk of an attacker remotely waking the system and gaining access." + remediation: "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." + compliance: + - cis: ["2.5.1"] + condition: none + rules: + - 'c:pmset -c -g -> r:womp && !r:\s0$' + - 'c:pmset -b -g -> r:womp && !r:\s0$' + # 2.6.1 Enable FileVault (Scored) - - id: 3013 - title: "Enable FileVault (Scored)" - description: "FileVault secures a system's data by automatically encrypting its boot volume and requiring a password or recovery key to access it." - rationale: "Encrypting sensitive data minimizes the likelihood of unauthorized users gaining access to it." - remediation: "Perform the following to implement the prescribed state: 1. Open System Preferences 2. Select Security & Privacy 3. Select FileVault 4. Select Turn on FileVault" - compliance: - - cis: "2.6.1" - condition: any - rules: - - 'c:diskutil cs list -> r:[Ee]ncryption [Ss]tatus: -> !r:[Uu]nlocked;' - - 'c:diskutil cs list -> !r:[Ee]ncryption [Tt]ype:;' + - id: 7512 + title: "Enable FileVault" + description: "FileVault secures a system's data by automatically encrypting its boot volume and requiring a password or recovery key to access it." + rationale: "Encrypting sensitive data minimizes the likelihood of unauthorized users gaining access to it." + remediation: "Perform the following to implement the prescribed state: 1. Open System Preferences 2. Select Security & Privacy 3. Select FileVault 4. Select Turn on FileVault" + compliance: + - cis: ["2.6.1"] + condition: all + rules: + - 'c:diskutil cs list -> r:^Encryption Status && r:Unlocked' + - 'c:diskutil cs list -> r:^Encryption Type && r:AES-XTS' + # 2.6.2 Enable Gatekeeper (Scored) - - id: 3014 - title: "Enable Gatekeeper (Scored)" - description: "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." - rationale: "Disallowing unsigned software will reduce the risk of unauthorized or malicious applications from running on the system." - remediation: "Run the following command in Terminal: sudo spctl --master-enable" - compliance: - - cis: "2.6.2" - condition: any - rules: - - 'c:spctl --status -> !r:^assessments enabled;' + - id: 7513 + title: "Enable Gatekeeper" + description: "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." + rationale: "Disallowing unsigned software will reduce the risk of unauthorized or malicious applications from running on the system." + remediation: "Run the following command in Terminal: sudo spctl --master-enable" + compliance: + - cis: ["2.6.2"] + condition: all + rules: + - 'c:spctl --status -> r:^assessments\s*\t*enabled$' + # 2.6.3 Enable Firewall (Scored) - - id: 3015 - title: "Enable Firewall (Scored)" - description: "A firewall is a piece of software that blocks unwanted incoming connections to a system. Apple has posted general documentation about the application firewall." - rationale: "A firewall minimizes the threat of unauthorized users from gaining access to your system while connected to a network or the Internet." - remediation: "Run the following command in Terminal: defaults write /Library/Preferences/com.apple.alf globalstate - int Where is: 1 = on for specific services 2 = on for essential services" - compliance: - - cis: "2.6.3" - references: - - https://support.apple.com/en-us/HT201642 - condition: all - rules: - - 'c:defaults read /Library/Preferences/com.apple.alf globalstate -> !r:^\s*1$;' - - 'c:defaults read /Library/Preferences/com.apple.alf globalstate -> !r:^\s*2$;' + - id: 7514 + title: "Enable Firewall" + description: "A firewall is a piece of software that blocks unwanted incoming connections to a system. Apple has posted general documentation about the application firewall." + rationale: "A firewall minimizes the threat of unauthorized users from gaining access to your system while connected to a network or the Internet." + remediation: "Run the following command in Terminal: defaults write /Library/Preferences/com.apple.alf globalstate - int Where is: - 1 = on for specific services - 2 = on for essential services" + compliance: + - cis: ["2.6.3"] + references: + - https://support.apple.com/en-us/HT201642 + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.alf globalstate -> r:^1$|^2$' + # 2.6.4 Enable Firewall Stealth Mode (Scored) - - id: 3016 - title: "Enable Firewall Stealth Mode (Scored)" - description: "While in Stealth mode the computer will not respond to unsolicited probes, dropping that traffic." - rationale: "Stealth mode on the firewall minimizes the threat of system discovery tools while connected to a network or the Internet." - remediation: "Run the following command in Terminal: sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on" - compliance: - - cis: "2.6.4" - references: - - https://support.apple.com/en-us/HT201642 - condition: any - rules: - - 'c:/usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode -> !r:^\s*Stealth mode enabled;' + - id: 7515 + title: "Enable Firewall Stealth Mode" + description: "While in Stealth mode the computer will not respond to unsolicited probes, dropping that traffic." + rationale: "Stealth mode on the firewall minimizes the threat of system discovery tools while connected to a network or the Internet." + remediation: "Run the following command in Terminal: sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on" + compliance: + - cis: ["2.6.4"] + references: + - https://support.apple.com/en-us/HT201642 + condition: all + rules: + - 'c:/usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode -> r:^Stealth mode enabled' + # 2.10 Enable Secure Keyboard Entry in terminal.app (Scored) - - id: 3017 - title: "Enable Secure Keyboard Entry in terminal.app (Scored)" - description: "Secure Keyboard Entry prevents other applications on the system and/or network from detecting and recording what is typed into Terminal." - rationale: "Enabling Secure Keyboard Entry minimizes the risk of a key logger from detecting what is entered in Terminal." - remediation: "Perform the following to implement the prescribed state: 1. Open Terminal 2. Select Terminal 3. Select Secure Keyboard Entry" - compliance: - - cis: "2.10" - condition: any - rules: - - 'c:defaults read -app Terminal SecureKeyboardEntry -> r:^\s*0$;' + - id: 7516 + title: "Enable Secure Keyboard Entry in terminal.app" + description: "Secure Keyboard Entry prevents other applications on the system and/or network from detecting and recording what is typed into Terminal." + rationale: "Enabling Secure Keyboard Entry minimizes the risk of a key logger from detecting what is entered in Terminal." + remediation: "Perform the following to implement the prescribed state: 1. Open Terminal 2. Select Terminal 3. Select Secure Keyboard Entry" + compliance: + - cis: ["2.10"] + condition: all + rules: + - 'c:defaults read -app Terminal SecureKeyboardEntry -> 1' + # 2.11 Java 6 is not the default Java runtime (Scored) - - id: 3018 - title: "Java 6 is not the default Java runtime (Scored)" - description: "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" - rationale: "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." - remediation: "Java 6 can be removed completely or, if necessary Java applications will only work with Java 6, a custom path can be used." - compliance: - - cis: "2.11" - condition: any - rules: - - 'c:java -version -> r:version.*1.6.0;' - - 'c:java -version -> r:Runtime Environment.*build.*1.6.0;' + - id: 7517 + title: "Java 6 is not the default Java runtime" + description: "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" + rationale: "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." + remediation: "Java 6 can be removed completely or, if necessary Java applications will only work with Java 6, a custom path can be used." + compliance: + - cis: ["2.11"] + condition: none + rules: + - 'c:java -version -> r:1.6.0' + # 3.2 Enable security auditing (Scored) - - id: 3019 - title: "Enable security auditing (Scored)" - description: "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." - rationale: "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." - remediation: "Run the following command in Terminal: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.auditd.plist" - compliance: - - cis: "3.2" - condition: any - rules: - - 'c:launchctl list -> !r:com.apple.auditd;' + - id: 7518 + title: "Enable security auditing" + description: "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." + rationale: "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." + remediation: "Run the following command in Terminal: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.auditd.plist" + compliance: + - cis: ["3.2"] + condition: all + rules: + - 'c:launchctl list -> r:com.apple.auditd' + # 3.3 Configure Security Auditing Flags (Scored) - - id: 3020 - title: "Configure Security Auditing Flags (Scored)" - description: "Auditing is the capture and maintenance of information about security-related events." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.3" - condition: any - rules: - - 'f:/etc/security/audit_control -> NIN r:^flags && r:lo;' - - 'f:/etc/security/audit_control -> NIN r:^flags && r:ad;' - - 'f:/etc/security/audit_control -> NIN r:^flags && r:fd;' - - 'f:/etc/security/audit_control -> NIN r:^flags && r:fm;' - - 'f:/etc/security/audit_control -> NIN r:^flags && r:-all;' + - id: 7519 + title: "Configure Security Auditing Flags" + description: "Auditing is the capture and maintenance of information about security-related events." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.3"] + condition: all + rules: + - 'f:/etc/security/audit_control -> r:^flags && r:lo && r:ad && r:fd && r:fm && r:-all' + # 4.1 Disable Bonjour advertising service (Scored) - - id: 3021 - title: "Disable Bonjour advertising service (Scored)" - description: "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." - rationale: "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." - remediation: "Run the following command in Terminal: defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements" - compliance: - - cis: "4.1" - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements -> r:^\s*0$;' + - id: 7520 + title: "Disable Bonjour advertising service" + description: "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." + rationale: "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." + remediation: "Run the following command in Terminal: defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements" + compliance: + - cis: ["4.1"] + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements -> 1' + # 4.4 Ensure http server is not running (Scored) - - id: 3022 - title: "Ensure http server is not running (Scored)" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "4.4" - condition: any - rules: - - 'p:httpd;' - - 'p:/usr/sbin/httpd;' - - 'p:/usr/sbin/httpd -D FOREGROUND;' + - id: 7521 + title: "Ensure http server is not running" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["4.4"] + condition: none + rules: + - 'p:httpd' + - 'p:/usr/sbin/httpd' + # 4.5 Ensure ftp server is not running (Scored) - - id: 3023 - title: "Ensure ftp server is not running (Scored)" - description: "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" - rationale: "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." - remediation: "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" - compliance: - - cis: "4.5" - condition: any - rules: - - 'c:launchctl list -> r:ftp;' + - id: 7522 + title: "Ensure ftp server is not running" + description: "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" + rationale: "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." + remediation: "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" + compliance: + - cis: ["4.5"] + condition: none + rules: + - 'c:launchctl list -> r:com.apple.ftpd' + # 4.6 Ensure nfs server is not running (Scored) - - id: 3024 - title: "Ensure nfs server is not running (Scored)" - description: "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." - rationale: "File serving should not be done from a user desktop, dedicated servers should be used. Open ports make it easier to exploit the computer." - remediation: "Stop the NFS Server: sudo nfsd disable Remove the exported Directory listing: rm /etc/export" - compliance: - - cis: "4.6" - condition: any - rules: - - 'p:nfsd;' - - 'f:/etc/exports;' + - id: 7523 + title: "Ensure nfs server is not running" + description: "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." + rationale: "File serving should not be done from a user desktop, dedicated servers should be used. Open ports make it easier to exploit the computer." + remediation: "Stop the NFS Server: sudo nfsd disable Remove the exported Directory listing: rm /etc/export" + compliance: + - cis: ["4.6"] + condition: none + rules: + - 'p:nfsd' + - 'p:/sbin/nfsd' + - 'f:/etc/exports' + # 5.7 Do not enable the "root" account (Scored) - - id: 3025 - title: "Do not enable the \"root\" account (Scored)" - description: "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." - rationale: "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)." - remediation: "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." - compliance: - - cis: "5.7" - condition: any - rules: - - 'c:dscl . -read /Users/root AuthenticationAuthority -> !r:^No such key: AuthenticationAuthority;' + - id: 7524 + title: "Do not enable the \"root\" account" + description: "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." + rationale: "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)." + remediation: "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." + compliance: + - cis: ["5.7"] + condition: all + rules: + - 'c:dscl . -read /Users/root AuthenticationAuthority -> r:^No such key: AuthenticationAuthority' + # 5.8 Disable automatic login (Scored) - - id: 3026 - title: "Disable automatic login (Scored)" - description: "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." - rationale: "Disabling automatic login decreases the likelihood of an unauthorized person gaining access to a system." - remediation: "Run the following command in Terminal: sudo defaults delete /Library/Preferences/com.apple.loginwindow autoLoginUser" - compliance: - - cis: "5.8" - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.loginwindow -> r:autoLoginUser;' + - id: 7525 + title: "Disable automatic login" + description: "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." + rationale: "Disabling automatic login decreases the likelihood of an unauthorized person gaining access to a system." + remediation: "Run the following command in Terminal: sudo defaults delete /Library/Preferences/com.apple.loginwindow autoLoginUser" + compliance: + - cis: ["5.8"] + condition: none + rules: + - 'c:defaults read /Library/Preferences/com.apple.loginwindow -> r:autoLoginUser' + # 5.9 Require a password to wake the computer from sleep or screen saver (Scored) - - id: 3027 - title: "Require a password to wake the computer from sleep or screen saver (Scored)" - description: "Sleep and screensaver modes are low power modes that reduces electrical consumption while the system is not in use." - rationale: "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." - remediation: "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." - compliance: - - cis: "5.9" - condition: any - rules: - - 'c:defaults read com.apple.screensaver askForPassword -> r:^\s*0$;' + - id: 7526 + title: "Require a password to wake the computer from sleep or screen saver" + description: "Sleep and screensaver modes are low power modes that reduces electrical consumption while the system is not in use." + rationale: "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." + remediation: "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." + compliance: + - cis: ["5.9"] + condition: all + rules: + - 'c:defaults read com.apple.screensaver askForPassword -> 1' + # 5.11 Disable ability to login to another user's active and locked session (Scored) - - id: 3028 - title: "Disable ability to login to another user's active and locked session (Scored)" - description: "OSX has a privilege that can be granted to any user that will allow that user to unlock active user's sessions." - rationale: "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." - remediation: "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" - compliance: - - cis: "5.11" - condition: any - rules: - - 'f:/etc/pam.d/screensaver -> r:group=admin,wheel fail_safe;' + - id: 7527 + title: "Disable ability to login to another user's active and locked session" + description: "OSX has a privilege that can be granted to any user that will allow that user to unlock active user's sessions." + rationale: "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." + remediation: "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" + compliance: + - cis: ["5.11"] + condition: none + rules: + - 'f:/etc/pam.d/screensaver -> r:group=admin,wheel|group=wheel,admin && r:fail_safe' + # 5.18 System Integrity Protection status (Scored) - - id: 3029 - title: "System Integrity Protection status (Scored)" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "5.18" - condition: any - rules: - - 'c:/usr/bin/csrutil status -> !r:^\s*System Integrity Protection status: enabled;' + - id: 7528 + title: "System Integrity Protection status" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["5.18"] + condition: all + rules: + - 'c:/usr/bin/csrutil status -> r:^System Integrity Protection status: enabled' + # 6.1.3 Disable guest account login (Scored) - - id: 3030 - title: "Disable guest account login (Scored)" - description: "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." - rationale: "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." - remediation: "Run the following command in Terminal: sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled - bool NO" - compliance: - - cis: "6.1.3" - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.loginwindow.plist GuestEnabled -> !r:^\s*0$;' + - id: 7529 + title: "Disable guest account login" + description: "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." + rationale: "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." + remediation: "Run the following command in Terminal: sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled - bool NO" + compliance: + - cis: ["6.1.3"] + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.loginwindow.plist GuestEnabled -> 0' + # 6.1.5 Remove Guest home folder (Scored) - - id: 3031 - title: "Remove Guest home folder (Scored)" - description: "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." - rationale: "The Guest home folders are unneeded after the Guest account is disabled and could be used inappropriately." - remediation: "1. Run the following command in Terminal: rm -R /Users/Guest 2. Make sure there is no output" - compliance: - - cis: "6.1.5" - condition: any - rules: - - 'd:/Users/Guest;' + - id: 7530 + title: "Remove Guest home folder" + description: "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." + rationale: "The Guest home folders are unneeded after the Guest account is disabled and could be used inappropriately." + remediation: "1. Run the following command in Terminal: rm -R /Users/Guest 2. Make sure there is no output" + compliance: + - cis: ["6.1.5"] + condition: none + rules: + - 'd:/Users/Guest' + # 6.2 Turn on filename extensions (Scored) - - id: 3032 - title: "Turn on filename extensions (Scored)" - description: "A filename extension is a suffix added to a base filename that indicates the base filename's file format." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.2" - condition: any - rules: - - 'c:defaults read NSGlobalDomain AppleShowAllExtensions -> r:^\s*0$;' -# 6.3 Disable the automatic run of safe files in Safari (Scored) - - id: 3033 - title: "Disable the automatic run of safe files in Safari (Scored)" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.3" - condition: any - rules: - - 'c:defaults read com.apple.Safari AutoOpenSafeDownloads -> r:^1$;' + - id: 7531 + title: "Turn on filename extensions" + description: "A filename extension is a suffix added to a base filename that indicates the base filename's file format." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.2"] + condition: all + rules: + - 'c:defaults read NSGlobalDomain AppleShowAllExtensions -> 1' +# 6.3 Disable the automatic run of safe files in Safari (Scored) + - id: 7532 + title: "Disable the automatic run of safe files in Safari" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.3"] + condition: all + rules: + - 'c:defaults read com.apple.Safari AutoOpenSafeDownloads -> 0' diff --git a/sca/darwin/16/cis_apple_macOS_10.12.yml b/sca/darwin/16/cis_apple_macOS_10.12.yml index af0f1b3e1..99001adf6 100644 --- a/sca/darwin/16/cis_apple_macOS_10.12.yml +++ b/sca/darwin/16/cis_apple_macOS_10.12.yml @@ -1,8 +1,8 @@ -# Security Configuration assessment +# Security Configuration Assessment # CIS Checks for MacOS 10.12 # Copyright (C) 2015-2019, Wazuh Inc. # -# This program is a free software; you can redistribute it +# This program is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public # License (version 2) as published by the FSF - Free Software # Foundation @@ -14,379 +14,392 @@ policy: id: "cis_apple_macos_10_12" file: "cis_apple_macOS_10.12.yml" name: "CIS Apple macOS 10.12 Benchmark" - description: "This document, CIS Apple macOS 10.12 Benchmark, provides prescriptive guidance for establishing a secure configuration posture for Apple macOS 10.12. This guide was tested against Apple macOS 10.12. To obtain the latest version of this guide, please visit https://benchmarks.cisecurity.org. If you have questions, comments, or have identified ways to improve this guide, please write us at feedback@cisecurity.org." + description: "This document, CIS Apple macOS 10.12 Benchmark, provides prescriptive guidance for establishing a secure configuration posture for Apple macOS 10.12. This guide was tested against Apple macOS 10.12." references: - https://www.cisecurity.org/cis-benchmarks/ requirements: title: "Check MacOS version" description: "Requirements for running the SCA scan against MacOS 10.12 (Sierra)." - condition: "any required" + condition: any rules: - - 'c:defaults read loginwindow SystemVersionStampAsString -> r:^\s*10\p12;' - - 'c:sw_vers -> r:^ProductVersion:\t*10\p12;' - - 'c:system_profiler SPSoftwareDataType -> r:^\s*System Version:\.*10\p12;' + - 'c:sw_vers -> r:^ProductVersion:\t*\s*10\p12' + - 'c:system_profiler SPSoftwareDataType -> r:System Version:\.*10\p12' + - 'c:defaults read loginwindow SystemVersionStampAsString -> r:^\s*10\p12' checks: # 1.1 Verify all Apple provided software is current (Scored) - - id: 13500 - title: "Verify all Apple provided software is current (Scored)" - description: "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." - rationale: "It is important that these updates be applied in a timely manner to prevent unauthorized persons from exploiting the identified vulnerabilities." - remediation: "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 " - compliance: - - cis: "1.1" - condition: any - rules: - - 'c:softwareupdate -l -> !r:^\s*No new software available;' + - id: 8000 + title: "Verify all Apple provided software is current" + description: "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." + rationale: "It is important that these updates be applied in a timely manner to prevent unauthorized persons from exploiting the identified vulnerabilities." + remediation: "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" + compliance: + - cis: ["1.1"] + condition: all + rules: + - 'c:softwareupdate -l -> r:No new software available' + # 1.2 Enable Auto Update (Scored) - - id: 13501 - title: "Enable Auto Update (Scored)" - description: "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." - rationale: "It is important that a system has the newest updates applied so as to prevent unauthorized persons from exploiting identified vulnerabilities." - remediation: "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" - compliance: - - cis: "1.2" - references: - - https://macops.ca/os-x-admins-your-clients-are-not-getting-background-security-updates/ - - https://derflounder.wordpress.com/2014/12/17/forcing-xprotect-blacklist-updates-on-mavericks-and-yosemite/ - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -> !r:^\s*1;' + - id: 8001 + title: "Enable Auto Update" + description: "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." + rationale: "It is important that a system has the newest updates applied so as to prevent unauthorized persons from exploiting identified vulnerabilities." + remediation: "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" + compliance: + - cis: ["1.2"] + references: + - https://macops.ca/os-x-admins-your-clients-are-not-getting-background-security-updates/ + - https://derflounder.wordpress.com/2014/12/17/forcing-xprotect-blacklist-updates-on-mavericks-and-yosemite/ + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -> 1' + # 1.3 Enable app update installs (Scored) - - id: 13502 - title: "Enable app update installs (Scored)" - description: "Ensure that application updates are installed after they are available from Apple. These updates do not require reboots or admin privileges for end users." - rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" - remediation: "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." - compliance: - - cis: "1.3" - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.commerce AutoUpdate -> r:^\s*0$;' + - id: 8002 + title: "Enable app update installs" + description: "Ensure that application updates are installed after they are available from Apple. These updates do not require reboots or admin privileges for end users." + rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" + remediation: "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." + compliance: + - cis: ["1.3"] + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.commerce AutoUpdate -> 1' + # 1.4 Enable system data files and security update installs (Scored) - - id: 13503 - title: "Enable system data files and security update installs (Scored)" - description: "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." - rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" - remediation: "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" - compliance: - - cis: "1.4" - references: - - https://www.thesafemac.com/tag/xprotect/ - - https://support.apple.com/en-us/HT202491 - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate -> NIN r:^\s*ConfigDataInstall\s*= && r:\s*1;' - - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate -> NIN r:^\s*CriticalUpdateInstall\s*= && r:\s*1;' + - id: 8003 + title: "Enable system data files and security update installs" + description: "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." + rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" + remediation: "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" + compliance: + - cis: ["1.4"] + references: + - https://www.thesafemac.com/tag/xprotect/ + - https://support.apple.com/en-us/HT202491 + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate ConfigDataInstall -> 1' + - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate CriticalUpdateInstall -> 1' + # 1.5 Enable macOS update installs (Scored) - - id: 13504 - title: "Enable macOS update installs (Scored)" - description: "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." - rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" - remediation: "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" - compliance: - - cis: "1.5" - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired -> r:^\s*0$;' -# 2.1.2 Turn off Bluetooth "Discoverable" mode when not pairing devices (Scored) - - id: 13505 - title: "Turn off Bluetooth \"Discoverable\" mode when not pairing devices (Scored)" - description: "When Bluetooth is set to discoverable mode, the Mac sends a signal indicating that it's available to pair with another Bluetooth device. When a device is \"discoverable\" it broadcasts information about itself and its location. Starting with OS X 10.9 Discoverable mode is enabled while the Bluetooth System Preference is open and turned off once closed. Systems that have the Bluetooth System Preference open at the time of audit will show as Discoverable" - rationale: "When in the discoverable state an unauthorized user could gain access to the system by pairing it with a remote device." - remediation: "Starting with OS X (10.9) Bluetooth is only set to Discoverable when the Bluetooth System Preference is selected. To ensure that the computer is not Discoverable do not leave that preference open." - compliance: - - cis: "2.1.2" - condition: any - rules: - - 'c:/usr/sbin/system_profiler SPBluetoothDataType -> !r:^\s*[Dd]iscoverable:\s*Off;' + - id: 8004 + title: "Enable macOS update installs" + description: "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." + rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" + remediation: "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" + compliance: + - cis: ["1.5"] + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired -> 1' + # 2.2.1 Enable "Set time and date automatically" (Scored) - - id: 13506 - title: "Enable \"Set time and date automatically\" (Scored)" - description: "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." - rationale: "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." - remediation: "Run the following commands: sudo systemsetup -setnetworktimeserver sudo systemsetup -setusingnetworktime on" - compliance: - - cis: "2.2.1" - condition: any - rules: - - 'c:systemsetup -getusingnetworktime -> !r:^\s*Network Time:\s*On;' + - id: 8005 + title: "Enable \"Set time and date automatically\"" + description: "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." + rationale: "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." + remediation: "Run the following commands: sudo systemsetup -setnetworktimeserver sudo systemsetup -setusingnetworktime on" + compliance: + - cis: ["2.2.1"] + condition: all + rules: + - 'c:systemsetup -getusingnetworktime -> r:Network Time:\s*\t*On' + # 2.4.1 Disable Remote Apple Events (Scored) - - id: 13507 - title: "Disable Remote Apple Events (Scored)" - description: "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." - rationale: "Disabling Remote Apple Events mitigates the risk of an unauthorized program gaining access to the system." - remediation: "Run the following command in Terminal: sudo systemsetup -setremoteappleevents off" - compliance: - - cis: "2.4.1" - condition: any - rules: - - 'c:systemsetup -getremoteappleevents -> !r:^Remote Apple Events:\s*Off;' + - id: 8006 + title: "Disable Remote Apple Events" + description: "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." + rationale: "Disabling Remote Apple Events mitigates the risk of an unauthorized program gaining access to the system." + remediation: "Run the following command in Terminal: sudo systemsetup -setremoteappleevents off" + compliance: + - cis: ["2.4.1"] + condition: all + rules: + - 'c:systemsetup -getremoteappleevents -> r:Remote Apple Events:\s*\t*Off' + # 2.4.4 Disable Printer Sharing (Scored) - - id: 13508 - title: "Disable Printer Sharing (Scored)" - description: "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." - rationale: "Disabling Printer Sharing mitigates the risk of attackers attempting to exploit the print server to gain access to the system." - remediation: "Perform the following to implement the prescribed state: 1. Open System Preferences 2. Select Sharing 3. Uncheck Printer Sharing" - compliance: - - cis: "2.4.4" - condition: any - rules: - - 'c:system_profiler SPPrintersDataType -> r:Shared:\s*Yes;' + - id: 8007 + title: "Disable Printer Sharing" + description: "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." + rationale: "Disabling Printer Sharing mitigates the risk of attackers attempting to exploit the print server to gain access to the system." + remediation: "Perform the following to implement the prescribed state: 1. Open System Preferences 2. Select Sharing 3. Uncheck Printer Sharing" + compliance: + - cis: ["2.4.4"] + condition: none + rules: + - 'c:system_profiler SPPrintersDataType -> r:Shared:\s*\t*Yes' + # 2.4.5 Disable Remote Login (Scored) - - id: 13509 - title: "Disable Remote Login (Scored)" - description: "Remote Login allows an interactive terminal connection to a computer." - rationale: "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." - remediation: "Run the following command in Terminal: sudo systemsetup -setremotelogin off" - compliance: - - cis: "2.4.5" - condition: any - rules: - - 'c:systemsetup -getremotelogin -> r:^Remote Login:\s*On;' + - id: 8008 + title: "Disable Remote Login" + description: "Remote Login allows an interactive terminal connection to a computer." + rationale: "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." + remediation: "Run the following command in Terminal: sudo systemsetup -setremotelogin off" + compliance: + - cis: ["2.4.5"] + condition: all + rules: + - 'c:systemsetup -getremotelogin -> r:Remote Login:\s*\t*Off' + # 2.4.8 Disable File Sharing (Scored) - - id: 13510 - title: "Disable File Sharing (Scored)" - description: "Apple's File Sharing uses a combination of SMB (Windows sharing) and AFP (Mac sharing)" - rationale: "By disabling file sharing, the remote attack surface and risk of unauthorized access to files stored on the system is reduced." - remediation: "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" - compliance: - - cis: "2.4.8" - condition: any - rules: - - 'c:launchctl list -> r:AppleFileServer;' + - id: 8009 + title: "Disable File Sharing" + description: "Apple's File Sharing uses a combination of SMB (Windows sharing) and AFP (Mac sharing)" + rationale: "By disabling file sharing, the remote attack surface and risk of unauthorized access to files stored on the system is reduced." + remediation: "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" + compliance: + - cis: ["2.4.8"] + condition: none + rules: + - 'c:launchctl list -> r:AppleFileServer' + - 'f:/Library/Preferences/SystemConfiguration/com.apple.smb.server.plist -> r:\ r:^\s*womp\s+1$;' + - id: 8010 + title: "Disable \"Wake for network access\"" + description: "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." + rationale: "Disabling this feature mitigates the risk of an attacker remotely waking the system and gaining access." + remediation: "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." + compliance: + - cis: ["2.5.1"] + condition: none + rules: + - 'c:pmset -g -> r:womp && !r:\s0$' + # 2.6.1.1 Enable FileVault (Scored) - - id: 13512 - title: "Enable FileVault (Scored)" - description: "FileVault secures a system's data by automatically encrypting its boot volume and requiring a password or recovery key to access it." - rationale: "Encrypting sensitive data minimizes the likelihood of unauthorized users gaining access to it." - remediation: "Perform the following to implement the prescribed state: 1. Open System Preferences 2. Select Security & Privacy 3. Select FileVault 4. Select Turn on FileVault" - compliance: - - cis: "2.6.1.1" - condition: any - rules: - - 'c:fdesetup status -> r:^FileVault is\s*Off\p;' + - id: 8011 + title: "Enable FileVault" + description: "FileVault secures a system's data by automatically encrypting its boot volume and requiring a password or recovery key to access it." + rationale: "Encrypting sensitive data minimizes the likelihood of unauthorized users gaining access to it." + remediation: "Perform the following to implement the prescribed state: 1. Open System Preferences 2. Select Security & Privacy 3. Select FileVault 4. Select Turn on FileVault" + compliance: + - cis: ["2.6.1.1"] + condition: all + rules: + - 'c:fdesetup status -> r:^FileVault\s*\t*is\s*\t*On$' + # 2.6.2 Enable Gatekeeper (Scored) - - id: 13513 - title: "Enable Gatekeeper (Scored)" - description: "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." - rationale: "Disallowing unsigned software will reduce the risk of unauthorized or malicious applications from running on the system." - remediation: "Run the following command in Terminal: sudo spctl --master-enable" - compliance: - - cis: "2.6.2" - condition: any - rules: - - 'c:spctl --status -> !r:^assessments enabled;' + - id: 8012 + title: "Enable Gatekeeper" + description: "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." + rationale: "Disallowing unsigned software will reduce the risk of unauthorized or malicious applications from running on the system." + remediation: "Run the following command in Terminal: sudo spctl --master-enable" + compliance: + - cis: ["2.6.2"] + condition: all + rules: + - 'c:spctl --status -> r:^assessments\s*\t*enabled$' + # 2.6.3 Enable Firewall (Scored) - - id: 13514 - title: "Enable Firewall (Scored)" - description: "A firewall is a piece of software that blocks unwanted incoming connections to a system. Apple has posted general documentation about the application firewall." - rationale: "A firewall minimizes the threat of unauthorized users from gaining access to your system while connected to a network or the Internet." - remediation: "Run the following command in Terminal: defaults write /Library/Preferences/com.apple.alf globalstate - int Where is: - 1 = on for specific services - 2 = on for essential services" - compliance: - - cis: "2.6.3" - references: - - https://support.apple.com/en-us/HT201642 - condition: all - rules: - - 'c:defaults read /Library/Preferences/com.apple.alf globalstate -> !r:^\s*1$;' - - 'c:defaults read /Library/Preferences/com.apple.alf globalstate -> !r:^\s*2$;' + - id: 8013 + title: "Enable Firewall" + description: "A firewall is a piece of software that blocks unwanted incoming connections to a system. Apple has posted general documentation about the application firewall." + rationale: "A firewall minimizes the threat of unauthorized users from gaining access to your system while connected to a network or the Internet." + remediation: "Run the following command in Terminal: defaults write /Library/Preferences/com.apple.alf globalstate - int Where is: - 1 = on for specific services - 2 = on for essential services" + compliance: + - cis: ["2.6.3"] + references: + - https://support.apple.com/en-us/HT201642 + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.alf globalstate -> r:^1$|^2$' + # 2.6.4 Enable Firewall Stealth Mode (Scored) - - id: 13515 - title: "Enable Firewall Stealth Mode (Scored)" - description: "While in Stealth mode the computer will not respond to unsolicited probes, dropping that traffic." - rationale: "Stealth mode on the firewall minimizes the threat of system discovery tools while connected to a network or the Internet." - remediation: "Run the following command in Terminal: sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on" - compliance: - - cis: "2.6.4" - references: - - https://support.apple.com/en-us/HT201642 - condition: any - rules: - - 'c:/usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode -> !r:^\s*Stealth mode enabled;' + - id: 8014 + title: "Enable Firewall Stealth Mode" + description: "While in Stealth mode the computer will not respond to unsolicited probes, dropping that traffic." + rationale: "Stealth mode on the firewall minimizes the threat of system discovery tools while connected to a network or the Internet." + remediation: "Run the following command in Terminal: sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on" + compliance: + - cis: ["2.6.4"] + references: + - https://support.apple.com/en-us/HT201642 + condition: all + rules: + - 'c:/usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode -> r:^Stealth mode enabled' + # 2.10 Enable Secure Keyboard Entry in terminal.app (Scored) - - id: 13516 - title: "Enable Secure Keyboard Entry in terminal.app (Scored)" - description: "Secure Keyboard Entry prevents other applications on the system and/or network from detecting and recording what is typed into Terminal." - rationale: "Enabling Secure Keyboard Entry minimizes the risk of a key logger from detecting what is entered in Terminal." - remediation: "Perform the following to implement the prescribed state: 1. Open Terminal 2. Select Terminal 3. Select Secure Keyboard Entry" - compliance: - - cis: "2.10" - condition: any - rules: - - 'c:defaults read -app Terminal SecureKeyboardEntry -> r:^\s*0$;' + - id: 8015 + title: "Enable Secure Keyboard Entry in terminal.app" + description: "Secure Keyboard Entry prevents other applications on the system and/or network from detecting and recording what is typed into Terminal." + rationale: "Enabling Secure Keyboard Entry minimizes the risk of a key logger from detecting what is entered in Terminal." + remediation: "Perform the following to implement the prescribed state: 1. Open Terminal 2. Select Terminal 3. Select Secure Keyboard Entry" + compliance: + - cis: ["2.10"] + condition: all + rules: + - 'c:defaults read -app Terminal SecureKeyboardEntry -> 1' + # 2.11 Java 6 is not the default Java runtime (Scored) - - id: 13517 - title: "Java 6 is not the default Java runtime (Scored)" - description: "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" - rationale: "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." - remediation: "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." - compliance: - - cis: "2.11" - condition: any - rules: - - 'c:java -version -> r:version.*1.6.0;' - - 'c:java -version -> r:Runtime Environment.*build.*1.6.0;' + - id: 8016 + title: "Java 6 is not the default Java runtime" + description: "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" + rationale: "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." + remediation: "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." + compliance: + - cis: ["2.11"] + condition: none + rules: + - 'c:java -version -> r:1.6.0' + # 3.1 Enable security auditing (Scored) - - id: 13518 - title: "Enable security auditing (Scored)" - description: "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." - rationale: "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." - remediation: "Run the following command in Terminal: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.auditd.plist" - compliance: - - cis: "3.1" - condition: any - rules: - - 'c:launchctl list -> !r:com.apple.auditd;' + - id: 8017 + title: "Enable security auditing" + description: "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." + rationale: "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." + remediation: "Run the following command in Terminal: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.auditd.plist" + compliance: + - cis: ["3.1"] + condition: all + rules: + - 'c:launchctl list -> r:com.apple.auditd' + # 3.2 Configure Security Auditing Flags (Scored) - - id: 13519 - title: "Configure Security Auditing Flags (Scored)" - description: "Auditing is the capture and maintenance of information about security-related events." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.2" - condition: any - rules: - - 'f:/etc/security/audit_control -> NIN r:^flags && r:lo;' - - 'f:/etc/security/audit_control -> NIN r:^flags && r:ad;' - - 'f:/etc/security/audit_control -> NIN r:^flags && r:fd;' - - 'f:/etc/security/audit_control -> NIN r:^flags && r:fm;' - - 'f:/etc/security/audit_control -> NIN r:^flags && r:-all;' + - id: 8018 + title: "Configure Security Auditing Flags" + description: "Auditing is the capture and maintenance of information about security-related events." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2"] + condition: all + rules: + - 'f:/etc/security/audit_control -> r:^flags && r:lo && r:ad && r:fd && r:fm && r:-all' + # 4.1 Disable Bonjour advertising service (Scored) - - id: 13520 - title: "Disable Bonjour advertising service (Scored)" - description: "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." - rationale: "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." - remediation: "Run the following command in Terminal: defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements" - compliance: - - cis: "4.1" - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements -> r:^\s*0$;' + - id: 8019 + title: "Disable Bonjour advertising service" + description: "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." + rationale: "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." + remediation: "Run the following command in Terminal: defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements" + compliance: + - cis: ["4.1"] + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements -> 1' + # 4.4 Ensure http server is not running (Scored) - - id: 13521 - title: "Ensure http server is not running (Scored)" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "4.4" - condition: any - rules: - - 'p:httpd;' - - 'p:/usr/sbin/httpd;' - - 'p:/usr/sbin/httpd -D FOREGROUND;' + - id: 8020 + title: "Ensure http server is not running" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["4.4"] + condition: none + rules: + - 'p:httpd' + - 'p:/usr/sbin/httpd' + # 4.5 Ensure FTP server is not running (Scored) - - id: 13522 - title: "Ensure FTP server is not running (Scored)" - description: "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" - rationale: "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." - remediation: "Stop the ftp Server sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist" - compliance: - - cis: "4.5" - condition: any - rules: - - 'c:launchctl list -> r:ftp;' + - id: 8021 + title: "Ensure FTP server is not running" + description: "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" + rationale: "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." + remediation: "Stop the ftp Server sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist" + compliance: + - cis: ["4.5"] + condition: none + rules: + - 'c:launchctl list -> r:com.apple.ftpd' + # 4.6 Ensure nfs server is not running (Scored) - - id: 13523 - title: "Ensure nfs server is not running (Scored)" - description: "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." - rationale: "File serving should not be done from a user desktop, dedicated servers should be used. Open ports make it easier to exploit the computer." - remediation: "Stop the NFS Server sudo nfsd disable Remove the exported Directory listing rm /etc/export" - compliance: - - cis: "4.6" - condition: any - rules: - - 'p:nfsd;' - - 'f:/etc/exports;' + - id: 8022 + title: "Ensure nfs server is not running" + description: "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." + rationale: "File serving should not be done from a user desktop, dedicated servers should be used. Open ports make it easier to exploit the computer." + remediation: "Stop the NFS Server sudo nfsd disable Remove the exported Directory listing rm /etc/export" + compliance: + - cis: ["4.6"] + condition: none + rules: + - 'p:nfsd' + - 'p:/sbin/nfsd' + - 'f:/etc/exports' + # 5.8 Do not enable the "root" account (Scored) - - id: 13524 - title: "Do not enable the \"root\" account (Scored)" - description: "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." - rationale: "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)." - remediation: "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." - compliance: - - cis: "5.8" - condition: any - rules: - - 'c:dscl . -read /Users/root AuthenticationAuthority -> !r:^No such key: AuthenticationAuthority;' + - id: 8023 + title: "Do not enable the \"root\" account" + description: "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." + rationale: "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)." + remediation: "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." + compliance: + - cis: ["5.8"] + condition: all + rules: + - 'c:dscl . -read /Users/root AuthenticationAuthority -> r:^No such key: AuthenticationAuthority' + # 5.9 Disable automatic login (Scored) - - id: 13525 - title: "Disable automatic login (Scored)" - description: "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." - rationale: "Disabling automatic login decreases the likelihood of an unauthorized person gaining access to a system." - remediation: "Run the following command in Terminal: sudo defaults delete /Library/Preferences/com.apple.loginwindow autoLoginUser" - compliance: - - cis: "5.9" - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.loginwindow -> r:autoLoginUser;' + - id: 8024 + title: "Disable automatic login" + description: "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." + rationale: "Disabling automatic login decreases the likelihood of an unauthorized person gaining access to a system." + remediation: "Run the following command in Terminal: sudo defaults delete /Library/Preferences/com.apple.loginwindow autoLoginUser" + compliance: + - cis: ["5.9"] + condition: none + rules: + - 'c:defaults read /Library/Preferences/com.apple.loginwindow -> r:autoLoginUser' + + # 5.20 System Integrity Protection status (Scored) - - id: 13526 - title: "System Integrity Protection status (Scored)" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "5.20" - condition: any - rules: - - 'c:/usr/bin/csrutil status -> !r:^\s*System Integrity Protection status: enabled;' + - id: 8025 + title: "System Integrity Protection status" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["5.20"] + condition: all + rules: + - 'c:/usr/bin/csrutil status -> r:^System Integrity Protection status: enabled' + # 6.1.3 Disable guest account login (Scored) - - id: 13527 - title: "Disable guest account login (Scored)" - description: "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." - rationale: "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." - remediation: "Run the following command in Terminal: sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled - bool NO" - compliance: - - cis: "6.1.3" - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.loginwindow.plist GuestEnabled -> !r:^\s*0$;' + - id: 8026 + title: "Disable guest account login" + description: "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." + rationale: "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." + remediation: "Run the following command in Terminal: sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled - bool NO" + compliance: + - cis: ["6.1.3"] + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.loginwindow.plist GuestEnabled -> 0' + # 6.1.5 Remove Guest home folder (Scored) - - id: 13528 - title: "Remove Guest home folder (Scored)" - description: "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." - rationale: "The Guest home folders are unneeded after the Guest account is disabled and could be used inappropriately." - remediation: "1. Run the following command in Terminal: rm -R /Users/Guest 2. Make sure there is no output" - compliance: - - cis: "6.1.5" - condition: any - rules: - - 'd:/Users/Guest;' + - id: 8027 + title: "Remove Guest home folder" + description: "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." + rationale: "The Guest home folders are unneeded after the Guest account is disabled and could be used inappropriately." + remediation: "1. Run the following command in Terminal: rm -R /Users/Guest 2. Make sure there is no output" + compliance: + - cis: ["6.1.5"] + condition: none + rules: + - 'd:/Users/Guest' + # 6.2 Turn on filename extensions (Scored) - - id: 13529 - title: "Turn on filename extensions (Scored)" - description: "A filename extension is a suffix added to a base filename that indicates the base filename's file format." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.2" - condition: any - rules: - - 'c:defaults read NSGlobalDomain AppleShowAllExtensions -> r:^\s*0$;' -# 6.3 Disable the automatic run of safe files in Safari (Scored) - - id: 13530 - title: "Disable the automatic run of safe files in Safari (Scored)" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.3" - condition: any - rules: - - 'c:defaults read com.apple.Safari AutoOpenSafeDownloads -> r:^1$;' + - id: 8028 + title: "Turn on filename extensions" + description: "A filename extension is a suffix added to a base filename that indicates the base filename's file format." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.2"] + condition: all + rules: + - 'c:defaults read NSGlobalDomain AppleShowAllExtensions -> 1' +# 6.3 Disable the automatic run of safe files in Safari (Scored) + - id: 8029 + title: "Disable the automatic run of safe files in Safari" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.3"] + condition: all + rules: + - 'c:defaults read com.apple.Safari AutoOpenSafeDownloads -> 0' diff --git a/sca/darwin/17/cis_apple_macOS_10.13.yml b/sca/darwin/17/cis_apple_macOS_10.13.yml index 6fb13cd9d..adb6c49b3 100644 --- a/sca/darwin/17/cis_apple_macOS_10.13.yml +++ b/sca/darwin/17/cis_apple_macOS_10.13.yml @@ -1,8 +1,8 @@ -# Security Configuration assessment +# Security Configuration Assessment # CIS Checks for MacOS 10.13 # Copyright (C) 2015-2019, Wazuh Inc. # -# This program is a free software; you can redistribute it +# This program is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public # License (version 2) as published by the FSF - Free Software # Foundation @@ -14,368 +14,393 @@ policy: id: "cis_apple_macos_10_13" file: "cis_apple_macOS_10.13.yml" name: "CIS Apple macOS 10.13 Benchmark" - description: "This document, CIS Apple macOS 10.13 Benchmark, provides prescriptive guidance for establishing a secure configuration posture for Apple macOS 10.13. This guide was tested against Apple macOS 10.13. To obtain the latest version of this guide, please visit https://benchmarks.cisecurity.org. If you have questions, comments, or have identified ways to improve this guide, please write us at feedback@cisecurity.org" + description: "This document, CIS Apple macOS 10.13 Benchmark, provides prescriptive guidance for establishing a secure configuration posture for Apple macOS 10.13. This guide was tested against Apple macOS 10.13." references: - https://www.cisecurity.org/cis-benchmarks/ requirements: - title: "Check MacOS version" + title: "Check MacOS version (is 10.13 or higher?)" description: "Requirements for running the SCA scan against MacOS 10.13 (High Sierra)." - condition: "any required" + condition: any rules: - - 'c:defaults read loginwindow SystemVersionStampAsString -> r:^\s*10\p13;' - - 'c:sw_vers -> r:^ProductVersion:\t*10\p13;' - - 'c:system_profiler SPSoftwareDataType -> r:^\s*System Version:\.*10\p13;' + - 'c:sw_vers -> r:^ProductVersion:\t*\s*10\p\d+' + - 'c:system_profiler SPSoftwareDataType -> r:System Version:\.*10\p\d+' + - 'c:defaults read loginwindow SystemVersionStampAsString -> r:^\t*\s*10\p\d+' checks: # 1.1 Verify all Apple provided software is current (Scored) - - id: 14000 - title: "Verify all Apple provided software is current (Scored)" - description: "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." - rationale: "It is important that these updates be applied in a timely manner to prevent unauthorized persons from exploiting the identified vulnerabilities." - remediation: "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" - compliance: - - cis: "1.1" - condition: any - rules: - - 'c:softwareupdate -l -> !r:^\s*No new software available;' + - id: 8500 + title: "Verify all Apple provided software is current" + description: "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." + rationale: "It is important that these updates be applied in a timely manner to prevent unauthorized persons from exploiting the identified vulnerabilities." + remediation: "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" + compliance: + - cis: ["1.1"] + condition: all + rules: + - 'c:softwareupdate -l -> r:No new software available' + # 1.2 Enable Auto Update (Scored) - - id: 14001 - title: "Enable Auto Update (Scored)" - description: "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." - rationale: "It is important that a system has the newest updates applied so as to prevent unauthorized persons from exploiting identified vulnerabilities." - remediation: "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" - compliance: - - cis: "1.2" - references: - - https://macops.ca/os-x-admins-your-clients-are-not-getting-background-security-updates/ - - https://derflounder.wordpress.com/2014/12/17/forcing-xprotect-blacklist-updates-on-mavericks-and-yosemite/ - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -> r:^\s*0$;' + - id: 8501 + title: "Enable Auto Update" + description: "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." + rationale: "It is important that a system has the newest updates applied so as to prevent unauthorized persons from exploiting identified vulnerabilities." + remediation: "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" + compliance: + - cis: ["1.2"] + references: + - https://macops.ca/os-x-admins-your-clients-are-not-getting-background-security-updates/ + - https://derflounder.wordpress.com/2014/12/17/forcing-xprotect-blacklist-updates-on-mavericks-and-yosemite/ + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -> 1' + # 1.3 Enable app update installs (Scored) - - id: 14002 - title: "Enable app update installs (Scored)" - description: "Ensure that application updates are installed after they are available from Apple. These updates do not require reboots or admin privileges for end users." - rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" - remediation: "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." - compliance: - - cis: "1.3" - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.commerce AutoUpdate -> r:^\s*0$;' + - id: 8502 + title: "Enable app update installs" + description: "Ensure that application updates are installed after they are available from Apple. These updates do not require reboots or admin privileges for end users." + rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" + remediation: "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." + compliance: + - cis: ["1.3"] + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.commerce AutoUpdate -> 1' + # 1.4 Enable system data files and security update installs (Scored) - - id: 14003 - title: "Enable system data files and security update installs (Scored)" - description: "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." - rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" - remediation: "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" - compliance: - - cis: "1.4" - references: - - https://www.thesafemac.com/tag/xprotect/ - - https://support.apple.com/en-us/HT202491 - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate -> NIN r:^\s*ConfigDataInstall\s*= && r:\s*1;' - - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate -> NIN r:^\s*CriticalUpdateInstall\s*= && r:\s*1;' + - id: 8503 + title: "Enable system data files and security update installs" + description: "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." + rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" + remediation: "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" + compliance: + - cis: ["1.4"] + references: + - https://www.thesafemac.com/tag/xprotect/ + - https://support.apple.com/en-us/HT202491 + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate ConfigDataInstall -> 1' + - 'c:defaults read /Library/Preferences/com.apple.SoftwareUpdate CriticalUpdateInstall -> 1' + # 1.5 Enable macOS update installs (Scored) - - id: 14004 - title: "Enable macOS update installs (Scored)" - description: "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." - rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" - remediation: "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" - compliance: - - cis: "1.5" - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired -> r:^\s*0$;' + - id: 8504 + title: "Enable macOS update installs" + description: "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." + rationale: "Patches need to be applied in a timely manner to reduce the risk of vulnerabilities being exploited" + remediation: "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" + compliance: + - cis: ["1.5"] + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired -> 1' + + # 2.2.1 Enable "Set time and date automatically" (Scored) - - id: 14005 - title: "Enable \"Set time and date automatically\" (Scored)" - description: "Correct date and time settings are required for authentication protocols, file creation, modification dates and log entries." - rationale: "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." - remediation: "Run the following commands: sudo systemsetup -setnetworktimeserver sudo systemsetup -setusingnetworktime on" - compliance: - - cis: "2.2.1" - condition: any - rules: - - 'c:systemsetup -getusingnetworktime -> !r:^\s*Network Time:\s*On;' + - id: 8505 + title: "Enable \"Set time and date automatically\"" + description: "Correct date and time settings are required for authentication protocols, file creation, modification dates and log entries." + rationale: "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." + remediation: "Run the following commands: sudo systemsetup -setnetworktimeserver sudo systemsetup -setusingnetworktime on" + compliance: + - cis: ["2.2.1"] + condition: all + rules: + - 'c:systemsetup -getusingnetworktime -> r:Network Time:\s*\t*On' + # 2.4.1 Disable Remote Apple Events (Scored) - - id: 14006 - title: "Disable Remote Apple Events (Scored)" - description: "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." - rationale: "Disabling Remote Apple Events mitigates the risk of an unauthorized program gaining access to the system." - remediation: "Run the following command in Terminal: sudo systemsetup -setremoteappleevents off" - compliance: - - cis: "2.4.1" - condition: any - rules: - - 'c:systemsetup -getremoteappleevents -> !r:^Remote Apple Events:\s*Off;' + - id: 8506 + title: "Disable Remote Apple Events" + description: "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." + rationale: "Disabling Remote Apple Events mitigates the risk of an unauthorized program gaining access to the system." + remediation: "Run the following command in Terminal: sudo systemsetup -setremoteappleevents off" + compliance: + - cis: ["2.4.1"] + condition: all + rules: + - 'c:systemsetup -getremoteappleevents -> r:Remote Apple Events:\s*\t*Off' + # 2.4.4 Disable Printer Sharing (Scored) - - id: 14007 - title: "Disable Printer Sharing (Scored)" - description: "y 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." - rationale: "Disabling Printer Sharing mitigates the risk of attackers attempting to exploit the print server to gain access to the system." - remediation: "Perform the following to implement the prescribed state: 1. Open System Preferences 2. Select Sharing 3. Uncheck Printer Sharing" - compliance: - - cis: "2.4.4" - condition: any - rules: - - 'c:system_profiler SPPrintersDataType -> r:Shared:\s*Yes;' + - id: 8507 + title: "Disable Printer Sharing" + description: "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." + rationale: "Disabling Printer Sharing mitigates the risk of attackers attempting to exploit the print server to gain access to the system." + remediation: "Perform the following to implement the prescribed state: 1. Open System Preferences 2. Select Sharing 3. Uncheck Printer Sharing" + compliance: + - cis: ["2.4.4"] + condition: none + rules: + - 'c:system_profiler SPPrintersDataType -> r:Shared:\s*\t*Yes' + # 2.4.5 Disable Remote Login (Scored) - - id: 14008 - title: "Disable Remote Login (Scored)" - description: "Remote Login allows an interactive terminal connection to a computer." - rationale: "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." - remediation: "Run the following command in Terminal: sudo systemsetup -setremotelogin off" - compliance: - - cis: "2.4.5" - condition: any - rules: - - 'c:systemsetup -getremotelogin -> r:^Remote Login:\s*On;' + - id: 8508 + title: "Disable Remote Login" + description: "Remote Login allows an interactive terminal connection to a computer." + rationale: "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." + remediation: "Run the following command in Terminal: sudo systemsetup -setremotelogin off" + compliance: + - cis: ["2.4.5"] + condition: all + rules: + - 'c:systemsetup -getremotelogin -> r:Remote Login:\s*\t*Off' + # 2.4.8 Disable File Sharing (Scored) - - id: 14009 - title: "Disable File Sharing (Scored)" - description: "Apple's File Sharing uses a combination of SMB (Windows sharing) and AFP (Mac sharing)" - rationale: "By disabling file sharing, the remote attack surface and risk of unauthorized access to files stored on the system is reduced." - remediation: "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" - compliance: - - cis: "2.4.8" - condition: any - rules: - - 'c:launchctl list -> r:AppleFileServer;' + - id: 8509 + title: "Disable File Sharing" + description: "Apple's File Sharing uses a combination of SMB (Windows sharing) and AFP (Mac sharing)" + rationale: "By disabling file sharing, the remote attack surface and risk of unauthorized access to files stored on the system is reduced." + remediation: "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" + compliance: + - cis: ["2.4.8"] + condition: none + rules: + - 'c:launchctl list -> r:AppleFileServer' + - 'f:/Library/Preferences/SystemConfiguration/com.apple.smb.server.plist -> r:\ r:^\s*womp\s+1$;' + - id: 8510 + title: "Disable \"Wake for network access\"" + description: "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." + rationale: "Disabling this feature mitigates the risk of an attacker remotely waking the system and gaining access." + remediation: "Run the following command in Terminal: sudo pmset -a womp 0" + compliance: + - cis: ["2.5.1"] + condition: none + rules: + - 'c:pmset -g -> r:womp && !r:\s0$' + # 2.6.1.1 Enable FileVault (Scored) - - id: 14011 - title: "Enable FileVault (Scored)" - description: "FileVault secures a system's data by automatically encrypting its boot volume and requiring a password or recovery key to access it." - rationale: "Encrypting sensitive data minimizes the likelihood of unauthorized users gaining access to it." - remediation: "1. Open System Preferences 2. Select Security & Privacy 3. Select FileVault 4. Select Turn on FileVault" - compliance: - - cis: "2.6.1.1" - condition: any - rules: - - 'c:fdesetup status -> r:^FileVault is\s*Off\p;' + - id: 8511 + title: "Enable FileVault" + description: "FileVault secures a system's data by automatically encrypting its boot volume and requiring a password or recovery key to access it." + rationale: "Encrypting sensitive data minimizes the likelihood of unauthorized users gaining access to it." + remediation: "1. Open System Preferences 2. Select Security & Privacy 3. Select FileVault 4. Select Turn on FileVault" + compliance: + - cis: ["2.6.1.1"] + condition: all + rules: + - 'c:fdesetup status -> r:^FileVault\s*\t*is\s*\t*On$' + # 2.6.2 Enable Gatekeeper (Scored) - - id: 14012 - title: "Enable Gatekeeper (Scored)" - description: "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." - rationale: "Disallowing unsigned software will reduce the risk of unauthorized or malicious applications from running on the system." - remediation: "Run the following command in Terminal: sudo spctl --master-enable" - compliance: - - cis: "2.6.2" - condition: any - rules: - - 'c:spctl --status -> !r:^assessments enabled;' + - id: 8512 + title: "Enable Gatekeeper" + description: "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." + rationale: "Disallowing unsigned software will reduce the risk of unauthorized or malicious applications from running on the system." + remediation: "Run the following command in Terminal: sudo spctl --master-enable" + compliance: + - cis: ["2.6.2"] + condition: all + rules: + - 'c:spctl --status -> r:^assessments\s*\t*enabled$' + # 2.6.3 Enable Firewall (Scored) - - id: 14013 - title: "Enable Firewall (Scored)" - description: "A firewall is a piece of software that blocks unwanted incoming connections to a system. Apple has posted general documentation about the application firewall." - rationale: "A firewall minimizes the threat of unauthorized users from gaining access to your system while connected to a network or the Internet." - remediation: "Run the following command in Terminal: defaults write /Library/Preferences/com.apple.alf globalstate - int Where is: - 1 = on for specific services - 2 = on for essential services " - compliance: - - cis: "2.6.3" - references: - - https://support.apple.com/en-us/HT201642 - condition: all - rules: - - 'c:defaults read /Library/Preferences/com.apple.alf globalstate -> !r:^\s*1$;' - - 'c:defaults read /Library/Preferences/com.apple.alf globalstate -> !r:^\s*2$;' + - id: 8513 + title: "Enable Firewall" + description: "A firewall is a piece of software that blocks unwanted incoming connections to a system. Apple has posted general documentation about the application firewall." + rationale: "A firewall minimizes the threat of unauthorized users from gaining access to your system while connected to a network or the Internet." + remediation: "Run the following command in Terminal: defaults write /Library/Preferences/com.apple.alf globalstate - int Where is: - 1 = on for specific services - 2 = on for essential services " + compliance: + - cis: ["2.6.3"] + references: + - https://support.apple.com/en-us/HT201642 + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.alf globalstate -> r:^1$|^2$' + # 2.6.4 Enable Firewall Stealth Mode (Scored) - - id: 14014 - title: "Enable Firewall Stealth Mode (Scored)" - description: "While in Stealth mode the computer will not respond to unsolicited probes, dropping that traffic." - rationale: "Stealth mode on the firewall minimizes the threat of system discovery tools while connected to a network or the Internet." - remediation: "Run the following command in Terminal: sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on" - compliance: - - cis: "2.6.4" - references: - - https://support.apple.com/en-us/HT201642 - condition: any - rules: - - 'c:/usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode -> !r:^\s*Stealth mode enabled;' + - id: 8514 + title: "Enable Firewall Stealth Mode" + description: "While in Stealth mode the computer will not respond to unsolicited probes, dropping that traffic." + rationale: "Stealth mode on the firewall minimizes the threat of system discovery tools while connected to a network or the Internet." + remediation: "Run the following command in Terminal: sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on" + compliance: + - cis: ["2.6.4"] + references: + - https://support.apple.com/en-us/HT201642 + condition: all + rules: + - 'c:/usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode -> r:^Stealth mode enabled' + # 2.10 Enable Secure Keyboard Entry in terminal.app (Scored) - - id: 14015 - title: "Enable Secure Keyboard Entry in terminal.app (Scored)" - description: "Secure Keyboard Entry prevents other applications on the system and/or network from detecting and recording what is typed into Terminal." - rationale: "Enabling Secure Keyboard Entry minimizes the risk of a key logger from detecting what is entered in Terminal." - remediation: "Perform the following to implement the prescribed state: 1. Open Terminal 2. Select Terminal 3. Select Secure Keyboard Entry" - compliance: - - cis: "2.10" - condition: any - rules: - - 'c:defaults read -app Terminal SecureKeyboardEntry -> r:^\s*0$;' + - id: 8515 + title: "Enable Secure Keyboard Entry in terminal.app" + description: "Secure Keyboard Entry prevents other applications on the system and/or network from detecting and recording what is typed into Terminal." + rationale: "Enabling Secure Keyboard Entry minimizes the risk of a key logger from detecting what is entered in Terminal." + remediation: "Perform the following to implement the prescribed state: 1. Open Terminal 2. Select Terminal 3. Select Secure Keyboard Entry" + compliance: + - cis: ["2.10"] + condition: all + rules: + - 'c:defaults read -app Terminal SecureKeyboardEntry -> 1' + # 2.11 Java 6 is not the default Java runtime (Scored) - - id: 14016 - title: "Java 6 is not the default Java runtime (Scored)" - description: "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" - rationale: "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." - remediation: "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." - compliance: - - cis: "2.11" - condition: any - rules: - - 'c:java -version -> r:version.*1.6.0;' - - 'c:java -version -> r:Runtime Environment.*build.*1.6.0;' + - id: 8516 + title: "Java 6 is not the default Java runtime" + description: "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" + rationale: "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." + remediation: "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." + compliance: + - cis: ["2.11"] + condition: none + rules: + - 'c:java -version -> r:1.6.0' + # 2.13 Ensure EFI version is valid and being regularly checked (Scored) - - id: 14017 - title: "Ensure EFI version is valid and being regularly checked (Scored)" - description: "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." - rationale: "If the Firmware of a computer has been compromised the Operating System that the Firmware loads cannot be trusted either." - remediation: "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." - compliance: - - cis: "2.13" - condition: any - rules: - - 'c:/usr/libexec/firmwarecheckers/eficheck/eficheck --integrity-check -> !r:Primary allowlist version match found\. No changes detected in primary hashes\.;' - - 'c:launchctl list -> !r:-\t*0\t*com.apple.driver.eficheck;' + - id: 8517 + title: "Ensure EFI version is valid and being regularly checked" + description: "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." + rationale: "If the Firmware of a computer has been compromised the Operating System that the Firmware loads cannot be trusted either." + remediation: "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." + compliance: + - cis: ["2.13"] + condition: all + rules: + - 'c:/usr/libexec/firmwarecheckers/eficheck/eficheck --integrity-check -> r:Primary allowlist version match found. No changes detected in primary hashes' + - 'c:launchctl list -> r:^-\s*\t*0\s*\t*com.apple.driver.eficheck$' + # 3.1 Enable security auditing (Scored) - - id: 14018 - title: "Enable security auditing (Scored)" - description: "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." - rationale: "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." - remediation: "Run the following command in Terminal: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.auditd.plist" - compliance: - - cis: "3.1" - condition: any - rules: - - 'c:launchctl list -> !r:com.apple.auditd;' + - id: 8518 + title: "Enable security auditing" + description: "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." + rationale: "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." + remediation: "Run the following command in Terminal: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.auditd.plist" + compliance: + - cis: ["3.1"] + condition: all + rules: + - 'c:launchctl list -> r:com.apple.auditd' + # 3.2 Configure Security Auditing Flags (Scored) - - id: 14019 - title: "Configure Security Auditing Flags (Scored)" - description: "Auditing is the capture and maintenance of information about security-related events." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.2" - condition: any - rules: - - 'f:/etc/security/audit_control -> NIN r:^flags && r:lo;' - - 'f:/etc/security/audit_control -> NIN r:^flags && r:ad;' - - 'f:/etc/security/audit_control -> NIN r:^flags && r:fd;' - - 'f:/etc/security/audit_control -> NIN r:^flags && r:fm;' - - 'f:/etc/security/audit_control -> NIN r:^flags && r:-all;' + - id: 8519 + title: "Configure Security Auditing Flags" + description: "Auditing is the capture and maintenance of information about security-related events." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2"] + condition: all + rules: + - 'f:/etc/security/audit_control -> r:^flags && r:lo && r:ad && r:fd && r:fm && r:-all' + # 4.1 Disable Bonjour advertising service (Scored) - - id: 14020 - title: "Disable Bonjour advertising service (Scored)" - description: "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." - rationale: "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." - remediation: "Run the following command in Terminal: defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements" - compliance: - - cis: "4.1" - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements -> r:^\s*0$;' + - id: 8520 + title: "Disable Bonjour advertising service" + description: "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." + rationale: "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." + remediation: "Run the following command in Terminal: defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements" + compliance: + - cis: ["4.1"] + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements -> 1' + # 4.4 Ensure http server is not running (Scored) - - id: 14021 - title: "Ensure http server is not running (Scored)" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "4.4" - condition: any - rules: - - 'p:httpd;' - - 'p:/usr/sbin/httpd;' - - 'p:/usr/sbin/httpd -D FOREGROUND;' + - id: 8521 + title: "Ensure http server is not running" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["4.4"] + condition: none + rules: + - 'p:httpd' + - 'p:/usr/sbin/httpd' + # 4.5 Ensure nfs server is not running (Scored) - - id: 14022 - title: "Ensure nfs server is not running (Scored)" - description: "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." - rationale: "File serving should not be done from a user desktop, dedicated servers should be used. Open ports make it easier to exploit the computer." - remediation: "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" - compliance: - - cis: "4.5" - condition: any - rules: - - 'p:nfsd;' - - 'f:/etc/exports;' + - id: 8522 + title: "Ensure nfs server is not running" + description: "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." + rationale: "File serving should not be done from a user desktop, dedicated servers should be used. Open ports make it easier to exploit the computer." + remediation: "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" + compliance: + - cis: ["4.5"] + condition: none + rules: + - 'p:nfsd' + - 'p:/sbin/nfsd' + - 'f:/etc/exports' + # 5.11 Do not enable the "root" account (Scored) - - id: 14023 - title: "Do not enable the \"root\" account (Scored)" - description: "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." - rationale: "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)." - remediation: "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." - compliance: - - cis: "5.11" - condition: any - rules: - - 'c:dscl . -read /Users/root AuthenticationAuthority -> !r:^No such key: AuthenticationAuthority;' + - id: 8523 + title: "Do not enable the \"root\" account" + description: "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." + rationale: "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)." + remediation: "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." + compliance: + - cis: ["5.11"] + condition: all + rules: + - 'c:dscl . -read /Users/root AuthenticationAuthority -> r:^No such key: AuthenticationAuthority' + # 5.12 Disable automatic login (Scored) - - id: 14024 - title: "Disable automatic login (Scored)" - description: "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." - rationale: "Disabling automatic login decreases the likelihood of an unauthorized person gaining access to a system." - remediation: "Run the following command in Terminal: sudo defaults delete /Library/Preferences/com.apple.loginwindow autoLoginUser" - compliance: - - cis: "5.12" - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.loginwindow -> r:autoLoginUser;' + - id: 8524 + title: "Disable automatic login" + description: "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." + rationale: "Disabling automatic login decreases the likelihood of an unauthorized person gaining access to a system." + remediation: "Run the following command in Terminal: sudo defaults delete /Library/Preferences/com.apple.loginwindow autoLoginUser" + compliance: + - cis: ["5.12"] + condition: none + rules: + - 'c:defaults read /Library/Preferences/com.apple.loginwindow -> r:autoLoginUser' + # 5.23 System Integrity Protection status (Scored) - - id: 14025 - title: "System Integrity Protection status (Scored)" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "5.23" - condition: any - rules: - - 'c:/usr/bin/csrutil status -> !r:^\s*System Integrity Protection status: enabled;' + - id: 8525 + title: "System Integrity Protection status" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["5.23"] + condition: all + rules: + - 'c:/usr/bin/csrutil status -> r:^System Integrity Protection status: enabled' + # 6.1.3 Disable guest account login (Scored) - - id: 14026 - title: "Disable guest account login (Scored)" - description: "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." - rationale: "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." - remediation: "Run the following command in Terminal: sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled - bool NO" - compliance: - - cis: "6.1.3" - condition: any - rules: - - 'c:defaults read /Library/Preferences/com.apple.loginwindow.plist GuestEnabled -> !r:^\s*0$;' + - id: 8526 + title: "Disable guest account login" + description: "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." + rationale: "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." + remediation: "Run the following command in Terminal: sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled - bool NO" + compliance: + - cis: ["6.1.3"] + condition: all + rules: + - 'c:defaults read /Library/Preferences/com.apple.loginwindow.plist GuestEnabled -> 0' + # 6.1.5 Remove Guest home folder (Scored) - - id: 14027 - title: "Remove Guest home folder (Scored)" - description: "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." - rationale: "The Guest home folders are unneeded after the Guest account is disabled and could be used inappropriately." - remediation: "1. Run the following command in Terminal: rm -R /Users/Guest 2. Make sure there is no output" - compliance: - - cis: "6.1.5" - condition: any - rules: - - 'd:/Users/Guest;' + - id: 8527 + title: "Remove Guest home folder" + description: "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." + rationale: "The Guest home folders are unneeded after the Guest account is disabled and could be used inappropriately." + remediation: "1. Run the following command in Terminal: rm -R /Users/Guest 2. Make sure there is no output" + compliance: + - cis: ["6.1.5"] + condition: none + rules: + - 'd:/Users/Guest' + # 6.2 Turn on filename extensions (Scored) - - id: 14028 - title: "Turn on filename extensions (Scored)" - description: "A filename extension is a suffix added to a base filename that indicates the base filename's file format." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.2" - condition: any - rules: - - 'c:defaults read NSGlobalDomain AppleShowAllExtensions -> !r:^\s*1$;' + - id: 8528 + title: "Turn on filename extensions" + description: "A filename extension is a suffix added to a base filename that indicates the base filename's file format." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.2"] + condition: all + rules: + - 'c:defaults read NSGlobalDomain AppleShowAllExtensions -> 1' + # 6.3 Disable the automatic run of safe files in Safari (Scored) - - id: 14029 - title: "Disable the automatic run of safe files in Safari (Scored)" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.3" - condition: any - rules: - - 'c:defaults read com.apple.Safari AutoOpenSafeDownloads -> r:^1$;' + - id: 8529 + title: "Disable the automatic run of safe files in Safari" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.3"] + condition: all + rules: + - 'c:defaults read com.apple.Safari AutoOpenSafeDownloads -> 0' diff --git a/sca/darwin/system_audit_rcl_mac.yml b/sca/darwin/system_audit_rcl_mac.yml deleted file mode 100644 index 38b17511c..000000000 --- a/sca/darwin/system_audit_rcl_mac.yml +++ /dev/null @@ -1,133 +0,0 @@ -# Security Configuration assessment -# Checks for auditing Mac systems -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation - -policy: - id: "system_audit_rcl_mac" - file: "system_audit_rcl_mac.yml" - name: "System audit for web-related vulnerabilities" - description: "Guidance for establishing a secure configuration for web-related vulnerabilities." - -variables: - $php.ini: /etc/php.ini,/var/www/conf/php.ini,/etc/php5/apache2/php.ini; - $web_dirs: /Library/WebServer/Documents,/usr/htdocs,/usr/local/var/htdocs,/usr/local/var/www; - - -# PHP checks -checks: - - id: 2000 - title: "PHP - Register globals are enabled" - condition: any - rules: - - 'f:$php.ini -> r:^register_globals = On;' - - id: 2001 - title: "PHP - Expose PHP is enabled" - condition: any - rules: - - 'f:$php.ini -> r:^expose_php = On;' - - id: 2002 - title: "PHP - Allow URL fopen is enabled" - condition: any - rules: - - 'f:$php.ini -> r:^allow_url_fopen = On;' - - id: 2003 - title: "PHP - Displaying of errors is enabled" - condition: any - rules: - - 'f:$php.ini -> r:^display_errors = On;' -# WEB checks - - id: 2004 - title: "Web exploits: '.yop' is an uncommon file name inside htdocs - Possible compromise" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> ^.yop$;' - - id: 2005 - title: "Web exploits: 'id' is an uncommon file name inside htdocs - Possible compromise" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> ^id$;' - - id: 2006 - title: "Web exploits: '.ssh' is an uncommon file name inside htdocs" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> ^.ssh$;' - - id: 2007 - title: "Web exploits: '...' is an uncommon file name inside htdocs - Possible compromise" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> ^...$;' - - id: 2008 - title: "Web exploits: '.shell' is an uncommon file name inside htdocs - Possible compromise" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> ^.shell$;' -# Outdated Web applications - - id: 2009 - title: "Web vulnerability - Outdated WordPress installation" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> ^version.php$ -> IN r:^\.wp_version && >:$wp_version = ''4.4.2'';' - - id: 2010 - title: "Web vulnerability - Outdated Joomla installation" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> ^version.php$ -> IN r:var \.RELEASE && r:''3.4.8'';' - - id: 2011 - title: "Web vulnerability - Outdated osCommerce (v2.2) installation" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - "d:$web_dirs -> ^application_top.php$ -> r:'osCommerce 2.2-;" -# Known backdoors - - id: 2012 - title: "Web vulnerability - Backdoors / Web based malware found - eval(base64_decode)" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> .php$ -> r:eval\(base64_decode\(\paWYo;' - - id: 2013 - title: "Web vulnerability - Backdoors / Web based malware found - eval(base64_decode(POST))" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> .php$ -> r:eval\(base64_decode\(\S_POST;' - - id: 2014 - title: "Web vulnerability - .htaccess file compromised" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - references: - - https://blog.sucuri.net/2011/05/understanding-htaccess-attacks-part-1.html - condition: any - rules: - - 'd:$web_dirs -> ^.htaccess$ -> r:RewriteCond \S+HTTP_REFERERS \S+google;' - - id: 2015 - title: "Web vulnerability - .htaccess file compromised - auto append" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - references: - - https://blog.sucuri.net/2011/05/understanding-htaccess-attacks-part-1.html - condition: any - rules: - - 'd:$web_dirs -> ^.htaccess$ -> r:php_value auto_append_file;' diff --git a/sca/debian/cis_debian7_L1.yml b/sca/debian/cis_debian7_L1.yml new file mode 100644 index 000000000..2df51be96 --- /dev/null +++ b/sca/debian/cis_debian7_L1.yml @@ -0,0 +1,1207 @@ +# Security Configuration Assessment +# Level 1 CIS Checks for Debian Linux 7 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Debian Linux 7 Benchmark v1.0.0 - 12-31-2015 + +policy: + id: "cis_debian7_L1" + file: "cis_debian7_L1.yml" + name: "CIS benchmark for Debian/Linux 7 L1" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for Debian Linux 7." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check Debian version" + description: "Requirements for running the SCA scan against Debian/Ubuntu." + condition: all + rules: + - 'f:/etc/debian_version' + - 'f:/proc/sys/kernel/ostype -> Linux' + +checks: + +# 2 Filesystem Configuration + + - id: 1000 + title: "Create Separate Partition for /tmp" + description: "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications." + rationale: "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." + remediation: "Configure /etc/fstab as appropiate 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." + compliance: + - cis: ["2.1"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/tmp\s' + + - id: 1001 + title: "Set nodev option for /tmp Partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "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" + compliance: + - cis: ["2.2"] + condition: all + rules: + - 'not c:mount -> r:\s/tmp\s' + - 'c:mount -> r:\s/tmp\s && r:nodev' + + - id: 1002 + title: "Set nosuid option for /tmp Partition" + description: "The nosuid mount option specifies that the filesystem cannot contain set userid files." + rationale: "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." + remediation: "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" + compliance: + - cis: ["2.3"] + condition: all + rules: + - 'not c:mount -> r:\s/tmp\s' + - 'c:mount -> r:\s/tmp\s && r:nosuid' + + - id: 1003 + title: "Set noexec option for /tmp partition" + description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." + rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /tmp." + remediation: "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" + compliance: + - cis: ["2.4"] + condition: all + rules: + - 'not c:mount -> r:\s/tmp\s' + - 'c:mount -> r:\s/tmp\s && r:noexec' + + - id: 1004 + title: "Create Separate Partition for /var" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["2.5"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var\s' + + - id: 1005 + title: "Bind mount the /var/tmp directory to /tmp" + description: "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." + rationale: "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." + remediation: "# mount --bind /tmp /var/tmp and edit the /etc/fstab file to contain the following line: /tmp /var/tmp none bind 0 0" + compliance: + - cis: ["2.6"] + condition: all + rules: + - 'c:findmnt -> r:/var/tmp && r:[/tmp]' + - 'f:/etc/fstab -> r:^/tmp && r:\s*/var/tmp\s* && r:bind' + + - id: 1006 + title: "Create Separate Partition for /var/log" + description: "The /var/log directory is used by system services to store log data." + rationale: "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." + remediation: "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." + compliance: + - cis: ["2.7"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var/log\s' + + - id: 1007 + title: "Create Separate Partition for /var/log/audit" + description: "The auditing daemon, auditd, stores log data in the /var/log/audit directory." + rationale: "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." + remediation: "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." + compliance: + - cis: ["2.8"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var/log/audit\s' + + - id: 1008 + title: "Create Separate Partition for /home" + description: "The /home directory is used to support disk storage needs of local users." + rationale: "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." + remediation: "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." + compliance: + - cis: ["2.9"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/home\s' + + - id: 1009 + title: "Add nodev Option to /home" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["2.10"] + condition: all + rules: + - 'not c:mount -> r:\s/home\s' + - 'c:mount -> r:\s/home\s && r:nodev' + + - id: 1010 + title: "Add nodev Option to /run/shm Partition" + description: "The nodev mount option specifies that the /run/shm (temporary filesystem stored in memory) cannot contain block or character special devices." + rationale: "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." + remediation: "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" + compliance: + - cis: ["2.14"] + condition: all + rules: + - 'not c:mount -> r:\s/run/shm\s' + - 'c:mount -> r:\s/run/shm\s && r:nodev' + + - id: 1011 + title: "Add nosuid Option to /run/shm Partition" + description: "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." + rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." + remediation: "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" + compliance: + - cis: ["2.15"] + condition: all + rules: + - 'not c:mount -> r:\s/run/shm\s' + - 'c:mount -> r:\s/run/shm\s && r:nosuid' + + - id: 1012 + title: "Add noexec Option to /run/shm Partition" + description: "Set noexec on the shared memory partition to prevent programs from executing from there." + rationale: "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." + remediation: "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" + compliance: + - cis: ["2.16"] + condition: all + rules: + - 'not c:mount -> r:\s/run/shm\s' + - 'c:mount -> r:\s/run/shm\s && r:noexec' + + - id: 1013 + title: "Disable Automounting" + description: "autofs allows automatic mounting of devices, typically including CD/DVDs and USB drives." + rationale: "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." + remediation: "Disable autofs: # update-rc.d autofs disable" + compliance: + - cis: ["2.25"] + condition: none + rules: + - 'c:find /etc/rc* -name *autofsc* -> r:S\.' + +# 3 Secure Boot Settings + + - id: 1014 + title: "Set Boot Loader Password" + description: "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" + rationale: "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)." + remediation: "Create an encrypted password with grub-md5-crypt: # grub-mkpasswd-pbkdf2 Enter password: Reenter password: Your PBKDF2 is Add the following into /etc/grub.d/00_header or a custom /etc/grub.d configuration file: cat <\" password_pbkdf2 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" + compliance: + - cis: ["3.3"] + condition: all + rules: + - 'f:/boot/grub/grub.cfg -> r:^\s*\t*set superusers' + - 'f:/boot/grub/grub.cfg -> r:^\s*\t*password' + + - id: 1015 + title: "Require authentication for Single-User mode" + description: "Setting a password for the root user will force authentication in single user mode." + rationale: "Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials." + remediation: "Run the following command and follow the prompts to set a password for the root user: # passwd root" + compliance: + - cis: ["3.4"] + condition: none + rules: + - 'f:/etc/shadow -> r:^root:*:|^root:!:' + +# 4 Additional Process Hardening + - id: 1016 + title: "Restrict Core Dumps" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["4.1"] + condition: all + rules: + - 'c:sysctl fs.suid_dumpable -> r:=\s*0$' + - 'c:grep -Rh ^*[[:space:]]*hard[[:space:]][[:space:]]*core[[:space:]][[:space:]]* /etc/security/limits.conf /etc/security/limits.d -> r:\s0$|\t0$' + + - id: 1017 + title: "Enable Randomized Virtual Memory Region Placement" + description: "Set the system flag to force randomized virtual memory region placement." + rationale: "Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting." + remediation: "Add the following line to the /etc/sysctl.conf file. kernel.randomize_va_space = 2" + compliance: + - cis: ["4.3"] + condition: all + rules: + - 'c:sysctl kernel.randomize_va_space -> r:^kernel.randomize_va_space\s*\t*=\s*\t*2' + +# 5 OS Services + + - id: 1018 + title: "Ensure NIS is not installed" + description: "The Network Information Service (NIS), formerly known as Yellow Pages, is a client-server directory service protocol used to distribute system configuration files." + rationale: "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." + remediation: "Uninstall the nis package: # apt-get purge nis" + compliance: + - cis: ["5.1.1"] + condition: none + rules: + - 'c:dpkg -s nis -> r:install ok installed' + + - id: 1019 + title: "Ensure rsh server is not enabled" + description: "The Berkeley rsh-server (rsh, rlogin, rcp) package contains legacy services that exchange credentials in clear-text." + rationale: "These legacy service contain numerous security exposures and have been replaced with the more secure SSH package." + remediation: "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" + compliance: + - cis: ["5.1.2"] + condition: none + rules: + - 'f:/etc/inetd.conf -> !r:^# && r:^shell|^login|^exec' + + - id: 1020 + title: "Ensure talk server is not enabled" + description: "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." + rationale: "The software presents a security risk as it uses unencrypted protocols for communication." + remediation: "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" + compliance: + - cis: ["5.1.4"] + condition: none + rules: + - 'f:/etc/inetd.conf -> !r:^# && r:^talk|^ntalk' + + - id: 1021 + title: "Ensure telnet server is not enabled" + description: "The telnet-server package contains the telnet daemon, which accepts connections from users from other systems via the telnet protocol." + rationale: "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." + remediation: "Remove or comment out any telnet lines in /etc/inetd.conf: #telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd" + compliance: + - cis: ["5.1.6"] + condition: none + rules: + - 'f:/etc/inetd.conf -> !r:^# && r:telnet' + + - id: 1022 + title: "Ensure tftp-server is not enabled" + description: "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." + rationale: "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." + remediation: "Remove or comment out any tftp lines in /etc/inetd.conf: #tftp stream tcp nowait root internal" + compliance: + - cis: ["5.1.7"] + condition: none + rules: + - 'f:/etc/inetd.conf -> !r:^# && r:tftp' + + - id: 1023 + title: "Ensure xinetd is not enabled" + description: "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." + rationale: "If there are no xinetd services required, it is recommended that the daemon be disabled." + remediation: "Disable xinetd: # update-rc.d xinetd disable" + compliance: + - cis: ["5.1.8"] + condition: none + rules: + - 'c:find /etc/rc* -name *xinetd* -> r:S\.' + + - id: 1024 + title: "Ensure chargen is not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Remove or comment out any chargen lines in /etc/inetd.conf: #chargen stream tcp nowait root internal" + compliance: + - cis: ["5.2"] + condition: none + rules: + - 'f:/etc/inetd.conf -> !r:^# && r:chargen' + + - id: 1025 + title: "Ensure daytime is not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Remove or comment out any daytime lines in /etc/inetd.conf: #daytime stream tcp nowait root internal" + compliance: + - cis: ["5.3"] + condition: none + rules: + - 'f:/etc/inetd.conf -> !r:^# && r:daytime' + + - id: 1026 + title: "Ensure echo is not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Remove or comment out any echo lines in /etc/inetd.conf: #echo stream tcp nowait root internal" + compliance: + - cis: ["5.4"] + condition: none + rules: + - 'f:/etc/inetd.conf -> !r:^# && r:echo' + + - id: 1027 + title: "Ensure discard is not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Remove or comment out any discard lines in /etc/inetd.conf: #discard stream tcp nowait root internal" + compliance: + - cis: ["5.5"] + condition: none + rules: + - 'f:/etc/inetd.conf -> !r:^# && r:discard' + + - id: 1028 + title: "Ensure time is not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Remove or comment out any time lines in /etc/inetd.conf: #time stream tcp nowait root internal" + compliance: + - cis: ["5.6"] + condition: none + rules: + - 'f:/etc/inetd.conf -> !r:^# && r:time' + +# 6 Special Purpose Services + + - id: 1029 + title: "Ensure Avahi Server is not enabled" + description: "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." + rationale: "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." + remediation: "Disable avahi-daemon: # update-rc.d avahi-daemon disable" + compliance: + - cis: ["6.2"] + condition: none + rules: + - 'c:find /etc/rc* -name *avahi-daemon* -> r:S\.' + + - id: 1030 + title: "Ensure print server is not enabled" + description: "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." + rationale: "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." + remediation: "Disable cups: # update-rc.d cups disable" + compliance: + - cis: ["6.3"] + condition: none + rules: + - 'c:find /etc/rc* -name *cups* -> r:S\.' + + - id: 1031 + title: "Ensure DHCP Server is not enabled" + description: "The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses." + rationale: "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." + remediation: "Disable isc-dhcp-server: # update-rc.d isc-dhcp-server disable" + references: + - "https://www.isc.org/dhcp/" + compliance: + - cis: ["6.4"] + condition: none + rules: + - 'c:find /etc/rc* -name *isc-dhcp-server* -> r:S\.' + + - id: 1032 + title: "Configure Network Time Protocol (NTP)" + description: "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." + rationale: "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." + remediation: "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 Note: is the IP address or hostname of a trusted time server. Configuring an NTP server is outside the scope of this benchmark." + compliance: + - cis: ["6.5"] + references: + - http://www.ntp.org/ + condition: all + rules: + - 'c:dpkg -s ntp -> r:install ok installed' + - 'f:/etc/ntp.conf -> r:^restrict -4 default && r:kod && r:nomodify && r:notrap && r:nopeer && r:noquery' + - 'f:/etc/ntp.conf -> r:^restrict -6 default && r:kod && r:nomodify && r:notrap && r:nopeer && r:noquery' + - 'f:/etc/ntp.conf -> r:^server\s\.+' + - 'f:/etc/ntp.conf -> r:^RUNASUSER\s*\t*=\s*\t*ntp' + + - id: 1033 + title: "Ensure LDAP is not enabled" + description: "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." + rationale: "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." + remediation: "Uninstall the slapd package: # apt-get purge slapd" + compliance: + - cis: ["6.6"] + references: + - http://www.openldap.org + condition: none + rules: + - 'c:dpkg -s slapd -> install ok installed' + + - id: 1034 + title: "Ensure NFS and RPC are not enabled" + description: "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." + rationale: "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." + remediation: "Disable rpcbind: # update-rc.d rpcbind disable Disable nfs-kernel-server: # update-rc.d nfs-kernel-server disable" + compliance: + - cis: ["6.7"] + condition: none + rules: + - 'c:find /etc/rc* -name *rpcbind* -> r:S\.' + - 'c:find /etc/rc* -name *nfs-kernel-server* -> r:S\.' + + - id: 1035 + title: "Ensure DNS Server is not enabled" + description: "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." + rationale: "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." + remediation: "Disable bind9: # update-rc.d bind9 disable" + compliance: + - cis: ["6.8"] + condition: none + rules: + - 'c:find /etc/rc* -name *bind9* -> r:S\.' + + - id: 1036 + title: "Ensure FTP Server is not enabled" + description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." + rationale: "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." + remediation: "Disable vsftpd: # update-rc.d vsftpd disable" + compliance: + - cis: ["6.9"] + condition: none + rules: + - 'c:find /etc/rc* -name *vsftpd* -> r:S\.' + + - id: 1037 + title: "Ensure HTTP Server is not enabled" + description: "HTTP or web servers provide the ability to host web site content." + rationale: "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." + remediation: "Disable apache2: # update-rc.d apache2 disable" + compliance: + - cis: ["6.10"] + condition: none + rules: + - 'c:find /etc/rc* -name *apache2* -> r:S\.' + + - id: 1038 + title: "Ensure IMAP and POP server is not enabled" + description: "Dovecot is an open source IMAP and POP3 server for Linux based systems." + rationale: "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." + remediation: "Disable dovecot: # update-rc.d dovecot disable" + compliance: + - cis: ["6.11"] + condition: none + rules: + - 'c:find /etc/rc* -name *dovecot* -> r:S\.' + + - id: 1039 + title: "Ensure Samba is not enabled" + description: "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." + rationale: "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." + remediation: "Disable samba: # update-rc.d samba disable" + compliance: + - cis: ["6.12"] + condition: none + rules: + - 'c:find /etc/rc* -name *smb* -> r:S\.' + + - id: 1040 + title: "Ensure HTTP Proxy Server is not enabled" + description: "Squid is a standard proxy server used in many distributions and environments." + rationale: "If there is no need for a proxy server, it is recommended that the squid proxy be deleted to reduce the potential attack surface." + remediation: "Disable squid3: # update-rc.d squid3 disable" + compliance: + - cis: ["6.13"] + condition: none + rules: + - 'c:find /etc/rc* -name *squid3* -> r:S\.' + + - id: 1041 + title: "Ensure SNMP Server is not enabled" + description: "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." + rationale: "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." + remediation: "Disable snmpd: # update-rc.d snmpd disable" + compliance: + - cis: ["6.14"] + condition: none + rules: + - 'c:find /etc/rc* -name *snmpd* -> r:S\.' + + - id: 1042 + title: "Configure Mail Transfer Agent for Local-Only Mode" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.15"] + condition: all + rules: + - 'f:/etc/exim4/update-exim4.conf.conf -> r:^dc_local_interfaces= && r:\p127.0.0.1\s*\p\s*::1\p$|\p::1\s*\p\s*127.0.0.1\p$|\p127.0.0.1\p$|\p::1\p$' + + - id: 1043 + title: "Ensure rsync service is not enabled" + description: "The rsyncd service can be used to synchronize files between systems over network links." + rationale: "The rsyncd service presents a security risk as it uses unencrypted protocols for communication." + remediation: "Set RSYNC_ENABLE to false in /etc/default/rsync: RSYNC_ENABLE=false" + compliance: + - cis: ["6.16"] + condition: none + rules: + - 'c:dpkg -s rsync -> install ok installed' + - 'not f:/etc/default/rsync -> !r:^# && r:RSYNC_ENABLE\s*\t*=\s*\t*false' + +# 7 Network Configuration and Firewall + + - id: 1044 + title: "Disable IP Forwarding" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["7.1.1"] + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.ip_forward -> r:=\s*\t*0$' + + - id: 1045 + title: "Disable Send Packet Redirects" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["7.1.2"] + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.conf.all.send_redirects -> r:=\s*\t*0$' + - 'c:/sbin/sysctl net.ipv4.conf.default.send_redirects -> r:=\s*\t*0$' + + - id: 1046 + title: "Disable Source Routed Packet Acceptance" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["7.2.1"] + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.conf.all.accept_source_route -> r:=\s*\t*0$' + - 'c:/sbin/sysctl net.ipv4.conf.default.accept_source_route -> r:=\s*\t*0$' + + - id: 1047 + title: "Disable ICMP Redirect Acceptance" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["7.2.2"] + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.conf.all.accept_redirects -> r:=\s*\t*0$' + - 'c:/sbin/sysctl net.ipv4.conf.default.accept_redirects -> r:=\s*\t*0$' + + - id: 1048 + title: "Disable Secure ICMP Redirect Acceptance" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["7.2.3"] + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.conf.all.secure_redirects -> r:=\s*\t*0$' + - 'c:/sbin/sysctl net.ipv4.conf.default.secure_redirects -> r:=\s*\t*0$' + + - id: 1049 + title: "Log Suspicious Packets" + description: "When enabled, this feature logs packets with un-routable source addresses to the kernel log." + rationale: "Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their server." + remediation: "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" + compliance: + - cis: ["7.2.4"] + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.conf.all.log_martians -> r:=\s*\t*1$' + - 'c:/sbin/sysctl net.ipv4.conf.default.log_martians -> r:=\s*\t*1$' + + - id: 1050 + title: "Enable Ignore Broadcast Requests" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["7.2.5"] + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.icmp_echo_ignore_broadcasts -> r:=\s*\t*1$' + + - id: 1051 + title: "Enable Bad Error Message Protection" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["7.2.6"] + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.icmp_ignore_bogus_error_responses -> r:=\s*\t*1$' + + - id: 1052 + title: "Enable RFC-recommended Source Route Validation" + description: "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)." + rationale: "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." + remediation: "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" + compliance: + - cis: ["7.2.7"] + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.conf.all.rp_filter -> r:=\s*\t*1$' + - 'c:/sbin/sysctl net.ipv4.conf.default.rp_filter -> r:=\s*\t*1$' + + - id: 1053 + title: "Enable TCP SYN Cookies" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["7.2.8"] + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.tcp_syncookies -> r:=\s*\t*1$' + + - id: 1054 + title: "Disable IPv6 Router Advertisements" + description: "This setting disables the systems ability to accept router advertisements" + rationale: "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." + remediation: "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" + compliance: + - cis: ["7.3.1"] + condition: all + rules: + - 'c:/sbin/sysctl net.ipv6.conf.all.accept_ra -> r:=\s*\t*0$' + - 'c:/sbin/sysctl net.ipv6.conf.default.accept_ra -> r:=\s*\t*0$' + + - id: 1055 + title: "Disable IPv6 Redirect Acceptance" + description: "This setting prevents the system from accepting ICMP redirects. ICMP redirects tell the system about alternate routes for sending traffic." + rationale: "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." + remediation: "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" + compliance: + - cis: ["7.3.2"] + condition: all + rules: + - 'c:/sbin/sysctl net.ipv6.conf.all.accept_redirects -> r:=\s*\t*0$' + - 'c:/sbin/sysctl net.ipv6.conf.default.accept_redirects -> r:=\s*\t*0$' + + - id: 1056 + title: "Disable IPv6" + description: "Although IPv6 has many advantages over IPv4, few organizations have implemented IPv6." + rationale: "If IPv6 is not to be used, it is recommended that it be disabled to reduce the attack surface of the system." + remediation: "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" + compliance: + - cis: ["7.3.3"] + condition: all + rules: + - 'c:sysctl net.ipv6.conf.all.disable_ipv6 -> r:=\s*\t*1$' + - 'c:sysctl net.ipv6.conf.default.disable_ipv6 -> r:=\s*\t*1$' + - 'c:sysctl net.ipv6.conf.lo.disable_ipv6 -> r:=\s*\t*1$' + - 'f:/etc/sysctl.conf -> r:^net.ipv6.conf.all.disable_ipv6\s*\t*=\s*\t*1' + - 'f:/etc/sysctl.conf -> r:^net.ipv6.conf.default.disable_ipv6\s*\t*=\s*\t*1' + - 'f:/etc/sysctl.conf -> r:^net.ipv6.conf.lo.disable_ipv6\s*\t*=\s*\t*1' + + - id: 1057 + title: "Create /etc/hosts.allow" + description: "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." + rationale: "The /etc/hosts.allow file supports access control by IP and helps ensure that only authorized systems can connect to the server." + remediation: "Create /etc/hosts.allow: # echo \"ALL: /, /, ...\" >/etc/hosts.allow where each / combination (for example, \"192.168.1.0/255.255.255.0\") represents one network block in use by your organization that requires access to this system." + compliance: + - cis: ["7.4.2"] + condition: all + rules: + - 'f:/etc/hosts.allow' + + - id: 1058 + title: "Create /etc/hosts.deny" + description: "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." + rationale: "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." + remediation: "Create /etc/hosts.deny: # echo \"ALL: ALL\" >> /etc/hosts.deny" + compliance: + - cis: ["7.4.4"] + condition: all + rules: + - 'f:/etc/hosts.deny' + - 'f:/etc/hosts.deny -> r:^ALL:\s*ALL' + + - id: 1059 + title: "Disable DCCP" + description: "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." + rationale: "If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface." + remediation: "# echo \"install dccp /bin/true\" >> /etc/modprobe.d/CIS.conf" + compliance: + - cis: ["7.5.1"] + condition: none + rules: + - 'c:lsmod -> r:dccp' + + - id: 1060 + title: "Disable SCTP" + description: "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." + rationale: "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." + remediation: "# echo \"install sctp /bin/true\" >> /etc/modprobe.d/CIS.conf" + compliance: + - cis: ["7.5.2"] + condition: none + rules: + - 'c:lsmod -> r:sctp' + + - id: 1061 + title: "Disable RDS" + description: "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." + rationale: "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." + remediation: "# echo \"install rds /bin/true\" >> /etc/modprobe.d/CIS.conf" + compliance: + - cis: ["7.5.3"] + condition: none + rules: + - 'c:lsmod -> r:rds' + + - id: 1062 + title: "Disable TIPC" + description: "The Transparent Inter-Process Communication (TIPC) protocol is designed to provide communication between cluster nodes." + rationale: "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." + remediation: "# echo \"install tipc /bin/true\" >> /etc/modprobe.d/CIS.conf" + compliance: + - cis: ["7.5.4"] + condition: none + rules: + - 'c:lsmod -> r:tipc' + + - id: 1063 + title: "Ensure Firewall is active" + description: "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." + rationale: "IPtables provides extra protection for the Linux system by limiting communications in and out of the box to specific IPv4 addresses and ports." + remediation: "Install the iptables and iptables-persistent packages: # apt-get install iptables iptables-persistent Enable the iptables-persistent service: # update-rc.d iptables-persistent enable" + compliance: + - cis: ["7.7"] + condition: all + rules: + - 'c:dpkg -s iptables -> r:install ok installed' + - 'c:dpkg -s iptables-persistent -> r:install ok installed' + - 'c:find /etc/rc* -name *iptables-persistent* -> r:S\.' + +# 8 Logging and Auditing + + - id: 1064 + title: "Ensure the rsyslog Service is activated" + description: "Once the rsyslog package is installed it needs to be activated." + rationale: "If the rsyslog service is not activated the system will not have a syslog service running." + remediation: "Enable rsyslog: # update-rc.d rsyslog enable" + compliance: + - cis: ["8.2.2"] + condition: all + rules: + - 'c:find /etc/rc* -name *rsyslog* -> r:S\.' + + - id: 1065 + title: "Configure rsyslog to Send Logs to a Remote Log Host" + description: "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." + rationale: "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" + remediation: "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." + compliance: + - cis: ["8.2.5"] + references: + - rsyslog.conf(5) man page + condition: all + rules: + - 'c:grep -Rh ^*.*[^I][^I]*@ /etc/rsyslog.conf /etc/rsyslog.d/ -> r:^*.* @@\.+' + + - id: 1066 + title: "Accept Remote rsyslog Messages Only on Designated Log Hosts" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["8.2.6"] + references: + - rsyslog.conf(8) man page + condition: all + rules: + - 'c:grep -Rh ^\$ModLoad[[:space:]][[:space:]]*imtcp.so /etc/rsyslog.conf /etc/rsyslog.d/ -> r:^$ModLoad\s*\t*imtcp.so' + - 'c:grep -Rh ^\$InputTCPServerRun[[:space:]][[:space:]]*514 /etc/rsyslog.conf /etc/rsyslog.d/ -> r:^$InputTCPServerRun\s*\t*514' + +# 9 System Access, Authentication and Authorization + + - id: 1067 + title: "Enable cron Daemon" + description: "The cron daemon is used to execute batch jobs on the system." + rationale: "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." + remediation: "Enable cron: # update-rc.d cron enable Enable anacron: # update-rc.d anacron enable" + compliance: + - cis: ["9.1.1"] + condition: all + rules: + - 'c:find /etc/rc* -name *cron* -> r:S\.' + - 'c:find /etc/rc* -name *anacron* -> r:S\.' + + - id: 1068 + title: "Restrict at/cron to Authorized Users" + description: "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." + rationale: "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." + remediation: "# /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" + compliance: + - cis: ["9.1.8"] + condition: all + rules: + - 'f:/etc/cron.allow' + - 'f:/etc/at.allow' + - 'not f:/etc/cron.deny' + - 'not f:/etc/at.deny' + - 'c:stat -c%u-%g-%a /etc/cron.allow -> r:^0-0-600' + - 'c:stat -c%u-%g-%a /etc/at.allow -> r:^0-0-600' + + - id: 1069 + title: "Set Password Creation Requirement Parameters Using pam_cracklib" + description: "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." + rationale: "Strong passwords protect systems from being hacked through brute force methods." + remediation: "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" + compliance: + - cis: ["9.2.1"] + condition: all + rules: + - 'c:dpkg -s libpam-cracklib -> install ok installed' + - 'f:/etc/pam.d/common-password -> !r:^# && r:password\s*\t*required\s*\t*pam_cracklib.so && r:retry=\d && n:minlen=(\d+) compare >= 14 && r:dcredit=-\d+ && r:ucredit=-\d+ && r:ocredit=-\d+ && r:lcredit=-\d+' + + - id: 1070 + title: "Set Lockout for Failed Password Attempts" + description: "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." + rationale: "Locking out userIDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems." + remediation: "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 --reset. This command sets the failed count to 0, effectively unlocking the user." + compliance: + - cis: ["9.2.2"] + condition: all + rules: + - 'f:/etc/pam.d/login -> !r:^# && r:auth\s*\t*required\s*\t*pam_tally2.so && r:onerr=fail && r:audit && r:silent && r:deny=\d && r:unlock_time=\d\d\d+' + + - id: 1071 + title: "Limit Password Reuse" + description: "The /etc/security/opasswd file stores the users' old passwords and can be checked to ensure that users are not recycling recent passwords." + rationale: "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." + remediation: "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." + compliance: + - cis: ["9.2.3"] + condition: all + rules: + - 'f:/etc/pam.d/common-password -> !r:^# && r:password && r:pam_unix.so && n:remember\s*\t*=\s*\t*(\d+) compare >= 5' + + - id: 1072 + title: "Set SSH Protocol to 2" + description: "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." + rationale: "SSH v1 suffers from insecurities that do not affect SSH v2." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" + compliance: + - cis: ["9.3.1"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:Protocol\s*\t*2' + + - id: 1073 + title: "Set LogLevel to INFO" + description: "The INFO parameter specifices that record login and logout activity will be logged." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel INFO" + compliance: + - cis: ["9.3.2"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:^\s*\t*LogLevel\s+INFO' + + - id: 1074 + title: "Disable SSH X11 Forwarding" + description: "The X11Forwarding parameter provides the ability to tunnel X11 traffic through the connection to enable remote graphic connections." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: X11Forwarding no" + compliance: + - cis: ["9.3.4"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> r:^X11Forwarding\s+no' + + - id: 1075 + title: "Set SSH MaxAuthTries to 4 or Less" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4" + compliance: + - cis: ["9.3.5"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> n:^MaxAuthTries\s*\t*(\d+) compare <= 4' + + - id: 1076 + title: "Set SSH IgnoreRhosts to Yes" + description: "The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication." + rationale: "Setting this parameter forces users to enter a password when authenticating with ssh." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" + compliance: + - cis: ["9.3.6"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:IgnoreRhosts\s+yes' + + - id: 1077 + title: "Set SSH HostbasedAuthentication to No" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" + compliance: + - cis: ["9.3.7"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:HostbasedAuthentication\s+no' + + - id: 1078 + title: "Disable SSH Root Login" + description: "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 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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" + compliance: + - cis: ["9.3.8"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:PermitRootLogin\s+no' + + - id: 1079 + title: "Set SSH PermitEmptyPasswords to No" + description: "The PermitEmptyPasswords parameter specifies if the server allows login to accounts with empty password strings." + rationale: "Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" + compliance: + - cis: ["9.3.9"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:PermitEmptyPasswords\s+no' + + - id: 1080 + title: "Do Not Allow Users to Set Environment Options" + description: "The PermitUserEnvironment option allows users to present environment options to the ssh daemon." + rationale: "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)" + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitUserEnvironment no" + compliance: + - cis: ["9.3.10"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:PermitUserEnvironment\s+no' + + - id: 1081 + title: "Set Idle Timeout Interval for User Login" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: ClientAliveInterval 300 ClientAliveCountMax 0" + compliance: + - cis: ["9.3.12"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && n:ClientAliveInterval\s*\t*(\d+) compare <= 300' + - 'f:/etc/ssh/sshd_config -> !r:^# && r:ClientAliveCountMax\s+0' + + - id: 1082 + title: "Limit Access via SSH" + description: "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." + rationale: "Restricting which users can remotely access the system via SSH will help ensure that only authorized users access the system." + remediation: "Edit the /etc/ssh/sshd_config file to set one or more of the parameter as follows: AllowUsers AllowGroups DenyUsers DenyGroups " + compliance: + - cis: ["9.3.13"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:AllowUsers\s+\w+|AllowGroups\s+\w+|DenyUsers\s+\w+|DenyGroups\s+\w+' + + - id: 1083 + title: "Set SSH Banner" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Banner /etc/issue.net" + compliance: + - cis: ["9.3.14"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:Banner\s*\t*/etc/issue.net|^Banner\s\t*/etc/issue' + + - id: 1084 + title: "Restrict Access to the su Command" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["9.5"] + condition: all + rules: + - 'f:/etc/pam.d/su -> !r:^# && r:auth && r:required && r:pam_wheel.so && r:use_uid' + - 'f:/etc/group -> !r:^# && r:wheel:' + +# 10 User Accounts and Environment + + - id: 1085 + title: "Set Password Expiration Days" + description: "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." + rationale: "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." + remediation: "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 " + compliance: + - cis: ["10.1.1"] + condition: all + rules: + - 'f:/etc/login.defs -> n:^PASS_MAX_DAYS\s*\t*(\d+) compare <= 90' + + - id: 1086 + title: "Set Password Change Minimum Number of Days" + description: "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." + rationale: "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." + remediation: "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 " + compliance: + - cis: ["10.1.2"] + condition: all + rules: + - 'f:/etc/login.defs -> n:^PASS_MIN_DAYS\s*\t*(\d+) compare >= 7' + + - id: 1087 + title: "Set Password Expiring Warning Days" + description: "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." + rationale: "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." + remediation: "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 " + compliance: + - cis: ["10.1.3"] + condition: all + rules: + - 'f:/etc/login.defs -> n:^PASS_WARN_AGE\s*\t*(\d+) compare >= 7' + + - id: 1088 + title: "Set Default Group for root Account" + description: "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." + rationale: "Using GID 0 for the root account helps prevent root-owned files from accidentally becoming accessible to non-privileged users." + remediation: "# usermod -g 0 root" + compliance: + - cis: ["10.3"] + condition: all + rules: + - 'f:/etc/passwd -> !r:^# && r:root:\w+:\w+:0:' + + - id: 1089 + title: "Set Default umask for Users" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["10.4"] + condition: all + rules: + - 'c:grep -Rh ^umask[[:space:]][[:space:]]*077 /etc/profile.d/ -> !r:^# && r:umask\s*\t*077' + - 'f:/etc/bash.bashrc -> !r:^# && r:umask\s*\t*077' + + - id: 1090 + title: "Lock Inactive User Accounts" + description: "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." + rationale: "Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies." + remediation: "# useradd -D -f 35" + compliance: + - cis: ["10.5"] + condition: all + rules: + - 'f:/etc/default/useradd -> n:^INACTIVE=(\d+) compare <= 35' + +# 11 Warning Banners + - id: 1091 + title: "Set Warning Banner for Standard Login Services" + description: "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." + rationale: "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." + remediation: "# 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" + compliance: + - cis: ["11.1"] + condition: all + rules: + - 'f:/etc/motd' + - 'f:/etc/issue' + - 'f:/etc/issue.net' + - 'c:stat -c%u-%g-%a /etc/motd -> 0-0-644' + - 'c:stat -c%u-%g-%a /etc/issue -> 0-0-644' + - 'c:stat -c%u-%g-%a /etc/issue.net -> 0-0-644' + + - id: 1092 + title: "Remove OS Information from Login Warning Banners" + description: "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." + rationale: "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." + remediation: "Edit the /etc/motd, /etc/issue and /etc/issue.net files and remove any lines containing \\m, \\r, \\s or \\v." + compliance: + - cis: ["11.2"] + condition: none + rules: + - 'f:/etc/issue -> r:\v|\r|\m|\s' + - 'f:/etc/motd -> r:\v|\r|\m|\s' + - 'f:/etc/issue.net -> r:\v|\r|\m|\s' + +# 13 Review User and Group Settings + + - id: 1093 + title: "Ensure Password Fields are Not Empty" + description: "An account with an empty password field means that anybody may log in as that user without providing a password." + rationale: "All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user." + remediation: "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 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." + compliance: + - cis: ["13.1"] + condition: none + rules: + - 'f:/etc/shadow -> r:^\w+::' + + - id: 1094 + title: "Verify No Legacy \"+\" Entries Exist in /etc/passwd File" + description: "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." + rationale: "These entries may provide an avenue for attackers to gain privileged access on the system." + remediation: "Delete these entries if they exist." + compliance: + - cis: ["13.2"] + condition: none + rules: + - 'f:/etc/passwd -> !r:^# && r:^+:' + + - id: 1095 + title: "Verify No Legacy \"+\" Entries Exist in /etc/shadow File" + description: "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." + rationale: "These entries may provide an avenue for attackers to gain privileged access on the system." + remediation: "Delete these entries if they exist." + compliance: + - cis: ["13.3"] + condition: none + rules: + - 'f:/etc/shadow -> !r:^# && r:^+:' + - id: 1096 + title: "Verify No Legacy \"+\" Entries Exist in /etc/group File" + description: "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." + rationale: "These entries may provide an avenue for attackers to gain privileged access on the system." + remediation: "Delete these entries if they exist." + compliance: + - cis: ["13.4"] + condition: none + rules: + - 'f:/etc/group -> !r:^# && r:^+:' + + - id: 1097 + title: "Verify No UID 0 Accounts Exist Other Than root" + description: "Any account with UID 0 has superuser privileges on the system." + rationale: "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." + remediation: "Delete any other entries that are displayed." + compliance: + - cis: ["13.5"] + condition: none + rules: + - 'f:/etc/passwd -> !r:^# && !r:^\s*\t*root: && r:^\w+:\w+:0:' + + - id: 1098 + title: "Ensure shadow group is empty" + description: "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." + rationale: "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." + remediation: "Remove all users from the shadow group, and change the primary group of any users with shadow as their primary group." + compliance: + - cis: ["13.20"] + condition: none + rules: + - 'f:/etc/group -> !r:^# && r:shadow:\w*:\w*:\S+' diff --git a/sca/debian/cis_debian7_L2.yml b/sca/debian/cis_debian7_L2.yml new file mode 100644 index 000000000..eb70abcc1 --- /dev/null +++ b/sca/debian/cis_debian7_L2.yml @@ -0,0 +1,430 @@ +# Security Configuration Assessment +# Level 2 CIS Checks for Debian Linux 7 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Debian Linux 7 Benchmark v1.0.0 - 12-31-2015 + +policy: + id: "cis_debian7_L2" + file: "cis_debian7_L2.yml" + name: "CIS benchmark for Debian/Linux 7 L2" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for Debian Linux 7." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check Debian version" + description: "Requirements for running the SCA scan against Debian/Ubuntu." + condition: all + rules: + - 'f:/etc/debian_version' + - 'f:/proc/sys/kernel/ostype -> Linux' + +checks: + +# 2 Filesystem Configuration + + - id: 1500 + title: "Disable Mounting of cramfs Filesystems" + description: "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." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." + remediation: "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install cramfs /bin/true" + compliance: + - cis: ["2.18"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v cramfs -> r:^install /bin/true' + - 'not c:/sbin/lsmod -> r:cramfs' + + - id: 1501 + title: "Disable Mounting of freevxfs Filesystems" + description: "The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the primary filesystem type for HP-UX operating systems." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." + remediation: "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install freevxfs /bin/true" + compliance: + - cis: ["2.19"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v freevxfs -> r:^install /bin/true' + - 'not c:/sbin/lsmod -> r:freevxfs' + + - id: 1502 + title: "Disable Mounting of jffs2 Filesystems" + description: "The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." + remediation: "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install jffs2 /bin/true" + compliance: + - cis: ["2.20"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v jffs2 -> r:^install /bin/true' + - 'not c:/sbin/lsmod -> r:jffs2' + + - id: 1503 + title: "Disable Mounting of hfs Filesystems" + description: "The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS filesystems." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." + remediation: "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfs /bin/true" + compliance: + - cis: ["2.21"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v hfs -> r:^install /bin/true' + - 'not c:/sbin/lsmod -> r:hfs' + + - id: 1504 + title: "Disable Mounting of hfsplus Filesystems" + description: "The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." + remediation: "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfsplus /bin/true" + compliance: + - cis: ["2.22"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v hfsplus -> r:^install /bin/true' + - 'not c:/sbin/lsmod -> r:hfsplus' + + - id: 1505 + title: "Disable Mounting of squashfs Filesystems" + description: "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." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." + remediation: "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install squashfs /bin/true" + compliance: + - cis: ["2.23"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v squashfs -> r:^install /bin/true' + - 'not c:/sbin/lsmod -> r:squashfs' + + - id: 1506 + title: "Disable Mounting of udf Filesystems" + description: "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" + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." + remediation: "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install udf /bin/true" + compliance: + - cis: ["2.24"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v udf -> r:^install /bin/true' + - 'not c:/sbin/lsmod -> r:udf' + +# 4 Additional Process Hardening + + - id: 1507 + title: "Activate AppArmor" + description: "AppArmor provides a Mandatory Access Control (MAC) system that greatly augments the default Discretionary Access Control (DAC) model." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.5"] + condition: all + rules: + - 'c:apparmor_status -> n:^(\d+)\s*profiles are loaded compare > 0' + - 'c:apparmor_status -> r:^0\s*processes are in complain mode' + - 'c:apparmor_status -> r:^0\s*processes are unconfined' + +# 8.1 Configure System Accounting (auditd) + - id: 1508 + title: "Configure Audit Log Storage Size" + description: "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." + rationale: "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." + remediation: "Set the max_log_file parameter in /etc/audit/auditd.conf max_log_file = Note: MB is the number of MegaBytes the file can be." + compliance: + - cis: ["8.1.1.1"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/auditd.conf' + - 'f:/etc/audit/auditd.conf -> r:max_log_file\s*=\s*\d+' + + - id: 1509 + title: "Disable System on Audit Log Full" + description: "The auditd daemon can be configured to halt the system when the audit logs are full." + rationale: "In high security contexts, the risk of detecting unauthorized access or nonrepudiation exceeds the benefit of the system's availability." + remediation: "Add the following lines to the /etc/audit/auditd.conf file. space_left_action = email action_mail_acct = root admin_space_left_action = halt" + compliance: + - cis: ["8.1.1.2"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/auditd.conf' + - 'f:/etc/audit/auditd.conf -> r:^\s*\t*action_mail_acct\s*=\s*root' + - 'f:/etc/audit/auditd.conf -> r:^\s*\t*space_left_action\s*=\s*email' + - 'f:/etc/audit/auditd.conf -> r:^\s*\t*admin_space_left_action\s*=\s*halt' + + - id: 1510 + title: "Keep All Auditing Information" + description: "Normally, auditd will hold 4 logs of maximum log file size before deleting older log files." + rationale: "In high security contexts, the benefits of maintaining a long audit history exceed the cost of storing the audit history." + remediation: "Add the following line to the /etc/audit/auditd.conf file. max_log_file_action = keep_logs" + compliance: + - cis: ["8.1.1.3"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/auditd.conf' + - 'f:/etc/audit/auditd.conf -> r:^\s*\t*max_log_file_action\s*=\s*keep_logs' + + - id: 1511 + title: "Install and Enable auditd Service" + description: "Install and turn on the auditd daemon to record system events." + rationale: "The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring." + remediation: "Install auditd: # apt-get install auditd If needed enable auditd in /etc/rc*.d: # update-rc.d auditd enable" + compliance: + - cis: ["8.1.2"] + condition: all + rules: + - 'c:dpkg -s auditd -> r:install ok installed' + - 'c:find /etc/rc* -name *auditd* -> r:S\.' + + - id: 1512 + title: "Enable Auditing for Processes That Start Prior to auditd" + description: "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." + rationale: "Audit events need to be captured on processes that start up prior to auditd, so that potential malicious activity cannot go undetected." + remediation: "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" + compliance: + - cis: ["8.1.3"] + condition: all + rules: + - 'f:/etc/default/grub -> r:^GRUB_CMDLINE_LINUX\s*=\s*\p*audit\s*=\s*1\p*' + + - id: 1513 + title: "Record Events That Modify Date and Time Information" + description: "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\"" + rationale: "Unexpected changes in system date and/or time could be a sign of malicious activity on the system." + remediation: "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" + compliance: + - cis: ["8.1.4"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit && r:-F arch=b32 && r:-S adjtimex && r:-S settimeofday && r:-S stime && r:-k time-change' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit && r:-F arch=b32 && r:-S clock_settime && r:-k time-change' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit && r:-F arch=b64 && r:-S adjtimex && r:-S settimeofday && r:-S stime && r:-k time-change' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit && r:-F arch=b64 && r:-S clock_settime && r:-k time-change' + - 'f:/etc/audit/audit.rules -> r:^-w /etc/localtime && r:-p wa && r:-k time-change' + + - id: 1514 + title: "Record Events That Modify User/Group Information" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["8.1.5"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w /etc/group && r:-p wa && r:-k identity' + - 'f:/etc/audit/audit.rules -> r:^-w /etc/passwd && r:-p wa && r:-k identity' + - 'f:/etc/audit/audit.rules -> r:^-w /etc/gshadow && r:-p wa && r:-k identity' + - 'f:/etc/audit/audit.rules -> r:^-w /etc/shadow && r:-p wa && r:-k identity' + - 'f:/etc/audit/audit.rules -> r:^-w /etc/security/opasswd && r:-p wa && r:-k identity' + + - id: 1515 + title: "Record Events That Modify the System's Network Environment" + description: "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." + rationale: "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.\"" + remediation: "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" + compliance: + - cis: ["8.1.6"] + condition: all + rules: + - 'f:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:exit,always|always,exit && r:-F arch=b32 && r:-S sethostname && r:-S setdomainname -k system-locale' + - 'f:/etc/audit/audit.rules -> r:^-a exit,always|always,exit -F arch=b64 -S sethostname -S setdomainname -k system-locale' + - 'f:/etc/audit/audit.rules -> r:^-w /etc/issue && r:-p wa && r:-k system-locale' + - 'f:/etc/audit/audit.rules -> r:^-w /etc/issue.net && r:-p wa && r:-k system-locale' + - 'f:/etc/audit/audit.rules -> r:^-w /etc/hosts && r:-p wa && r:-k system-locale' + - 'f:/etc/audit/audit.rules -> r:^-w /etc/network && r:-p wa && r:-k system-locale' + + - id: 1516 + title: "Record Events That Modify the System's Mandatory Access Controls" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["8.1.7"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w /etc/selinux/ && r:-p wa && r:-k MAC-policy' + + - id: 1517 + title: "Collect Login and Logout Events" + description: "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" + rationale: "Monitoring login/logout events could provide a system administrator with information associated with brute force attacks against user logins." + remediation: "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" + compliance: + - cis: ["8.1.8"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w /var/log/faillog && r:-p wa && r:-k logins' + - 'f:/etc/audit/audit.rules -> r:^-w /var/log/lastlog && r:-p wa && r:-k logins' + - 'f:/etc/audit/audit.rules -> r:^-w /var/log/tallylog && r:-p wa && r:-k logins' + + - id: 1518 + title: "Collect Session Initiation Information" + description: "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.\"" + rationale: "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)." + remediation: "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)" + compliance: + - cis: ["8.1.9"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w /var/run/utmp && r:-p wa && r:-k session' + - 'f:/etc/audit/audit.rules -> r:^-w /var/log/wtmp && r:-p wa && r:-k session' + - 'f:/etc/audit/audit.rules -> r:^-w /var/log/btmp && r:-p wa && r:-k session' + + - id: 1519 + title: "Collect Discretionary Access Control Permission Modification Events" + description: "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.\"" + rationale: "Monitoring for changes in file attributes could alert a system administrator to activity that could indicate intruder activity or policy violation." + remediation: "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" + compliance: + - cis: ["8.1.10"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S chmod && r:-S fchmod && r:-S fchmodat && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S chmod && r:-S fchmod && r:-S fchmodat && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S chown && r:-S fchown && r:-S fchownat && r:-S lchown && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S chown && r:-S fchown && r:-S fchownat && r:-S lchown && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S setxattr && r:-S lsetxattr && r:-S fsetxattr && r:-S removexattr && r:-S lremovexattr && r:-S fremovexattr && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S setxattr && r:-S lsetxattr && r:-S fsetxattr && r:-S removexattr && r:-S lremovexattr && r:-S fremovexattr && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + + - id: 1520 + title: "Collect Unsuccessful Unauthorized Access Attempts to Files" + description: "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.\"" + rationale: "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." + remediation: "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" + compliance: + - cis: ["8.1.11"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S creat && r:-S open && r:-S openat && r:-S truncate && r:-F exit=-EACCES && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k access' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S creat && r:-S open && r:-S openat && r:-S truncate && r:-F exit=-EACCES && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k access' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S creat && r:-S open && r:-S openat && r:-S truncate && r:-F exit=-EPERM && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k access' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S creat && r:-S open && r:-S openat && r:-S truncate && r:-F exit=-EPERM && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k access' + + - id: 1521 + title: "Collect Successful File System Mounts" + description: "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" + rationale: "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." + remediation: "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" + compliance: + - cis: ["8.1.13"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S mount && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k mounts' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S mount && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k mounts' + + - id: 1522 + title: "Collect File Deletion Events by User" + description: "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\"." + rationale: "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." + remediation: "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" + compliance: + - cis: ["8.1.14"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S unlink && r:-S unlinkat && r:-S rename && r:-S renameat && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k delete' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S unlink && r:-S unlinkat && r:-S rename && r:-S renameat && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k delete' + + - id: 1523 + title: "Collect Changes to System Administration Scope (sudoers)" + description: "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.\"" + rationale: "Changes in the /etc/sudoers file can indicate that an unauthorized change has been made to scope of system administrator activity." + remediation: "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" + compliance: + - cis: ["8.1.15"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w /etc/sudoers && r:-p wa && r:-k scope' + + - id: 1524 + title: "Collect System Administrator Actions (sudolog)" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["8.1.16"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w /var/log/sudo.log && r:-p wa && r:-k actions' + + - id: 1525 + title: "Collect Kernel Module Loading and Unloading" + description: "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\"." + rationale: "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." + remediation: "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" + compliance: + - cis: ["8.1.17"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w /sbin/insmod && r:-p x && r:-k modules' + - 'f:/etc/audit/audit.rules -> r:^-w /sbin/rmmod && r:-p x && r:-k modules' + - 'f:/etc/audit/audit.rules -> r:^-w /sbin/modprobe && r:-p x && r:-k modules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64|-F arch=b32 && r:-S init_module && r:-S delete_module && r:-k modules' + + - id: 1526 + title: "Make the Audit Configuration Immutable" + description: "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" + rationale: "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." + remediation: "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" + compliance: + - cis: ["8.1.18"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-e 2$' + +# 8.3 Advanced Intrusion Detection Environment (AIDE) + - id: 1527 + title: "Install AIDE" + description: "In some installations, AIDE is not installed automatically" + rationale: "Install AIDE to make use of the file integrity features to monitor critical files for changes that could affect the security of the system." + remediation: "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." + compliance: + - cis: ["8.3.1"] + condition: all + rules: + - 'c:dpkg -s aide -> r:install ok installed' + + - id: 1528 + title: "Implement Periodic Execution of File Integrity" + description: "Implement periodic file checking, in compliance with site policy" + rationale: "Periodic file checking allows the system administrator to determine on a regular basis if critical files have been changed in an unauthorized fashion." + remediation: "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." + compliance: + - cis: ["8.3.2"] + condition: all + rules: + - 'f:/etc/crontab -> r:\s*\t*/usr/sbin/aide\s*\t*--check' diff --git a/sca/debian/cis_debian8_L1.yml b/sca/debian/cis_debian8_L1.yml new file mode 100644 index 000000000..575991659 --- /dev/null +++ b/sca/debian/cis_debian8_L1.yml @@ -0,0 +1,1362 @@ +# Security Configuration Assessment +# Level 1 CIS Checks for Debian Linux 8 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Debian Linux 8 Benchmark v2.0.0 - 12-28-2018 + +policy: + id: "cis_debian8_L1" + file: "cis_debian8_L1.yml" + name: "CIS benchmark for Debian/Linux 8 L1" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for Debian Linux 8." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check Debian version" + description: "Requirements for running the SCA scan against Debian/Ubuntu." + condition: all + rules: + - 'f:/etc/debian_version' + - 'f:/proc/sys/kernel/ostype -> Linux' + +checks: +# 1.1.1 Disable unused filesystems + - id: 2000 + title: "Ensure mounting of cramfs filesystems is disabled" + description: "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." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." + remediation: "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" + compliance: + - cis: ["1.1.1.1"] + - cis_csc: ["13"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v cramfs -> r:^install /bin/true' + - 'not c:lsmod -> r:cramfs' + + - id: 2001 + title: "Ensure mounting of freevxfs filesystems is disabled" + description: "The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the primary filesystem type for HP-UX operating systems." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." + remediation: "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" + compliance: + - cis: ["1.1.1.2"] + - cis_csc: ["13", "5.1"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v freevxfs -> r:^install /bin/true' + - 'not c:lsmod -> r:freevxfs' + + - id: 2002 + title: "Ensure mounting of jffs2 filesystems is disabled" + description: "The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." + remediation: "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" + compliance: + - cis: ["1.1.1.3"] + - cis_csc: ["13", "5.1"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v jffs2 -> r:^install /bin/true' + - 'not c:lsmod -> r:jffs2' + + - id: 2003 + title: "Ensure mounting of hfs filesystems is disabled" + description: "The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS filesystems." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." + remediation: "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" + compliance: + - cis: ["1.1.1.4"] + - cis_csc: ["13", "5.1"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v hfs -> r:^install /bin/true' + - 'not c:lsmod -> r:hfs' + + - id: 2004 + title: "Ensure mounting of hfsplus filesystems is disabled" + description: "The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." + remediation: "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" + compliance: + - cis: ["1.1.1.5"] + - cis_csc: ["13", "5.1"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v hfsplus -> r:^install /bin/true' + - 'not c:lsmod -> r:hfsplus' + + - id: 2005 + title: "Ensure mounting of squashfs filesystems is disabled" + description: "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." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." + remediation: "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" + compliance: + - cis: ["1.1.1.6"] + - cis_csc: ["13"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v squashfs -> r:^install /bin/true' + - 'not c:lsmod -> r:squashfs' + + - id: 2006 + title: "Ensure mounting of udf filesystems is disabled" + description: "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." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." + remediation: "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" + compliance: + - cis: ["1.1.1.7"] + - cis_csc: ["13", "5.1"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v udf -> r:^install /bin/true' + - 'not c:lsmod -> r:udf' + +# 2 Filesystem Configuration + - id: 2007 + title: "Ensure /tmp is configured" + description: "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications." + rationale: "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." + remediation: "Configure /etc/fstab as appropiate 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." + compliance: + - cis: ["1.1.2"] + - cis_csc: ["13", "5.1"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + - https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems/ + condition: all + rules: + - 'c:mount -> r:\s/tmp\s' + + - id: 2008 + title: "Ensure nodev option set on /tmp partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.3"] + - cis_csc: ["13", "5.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:nodev' + + - id: 2009 + title: "Ensure nosuid option set on /tmp partition" + description: "The nosuid mount option specifies that the filesystem cannot contain set userid files." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.4"] + - cis_csc: ["13", "5.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:nosuid' + + - id: 2010 + title: "Ensure nodev option set on /var/tmp partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.7"] + - cis_csc: ["13", "5.1"] + condition: all + rules: + - 'c:mount -> r:\s/var/tmp\s && r:nodev' + + - id: 2011 + title: "Ensure nosuid option set on /var/tmp partition" + description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.8"] + - cis_csc: ["13", "5.1"] + condition: all + rules: + - 'c:mount -> r:\s/var/tmp\s && r:nosuid' + + - id: 2012 + title: "Ensure noexec option set on /var/tmp partition" + description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.9"] + - cis_csc: ["2", "2.6"] + condition: all + rules: + - 'c:mount -> r:\s/var/tmp\s && r:noexec' + + - id: 2013 + title: "Ensure nodev option set on /home partition" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.13"] + - cis_csc: ["13", "15.1", "5.1"] + condition: all + rules: + - 'c:mount -> r:\s/home\s && r:nodev' + + - id: 2014 + title: "Ensure nodev option set on /dev/shm partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.14"] + - cis_csc: ["13", "5.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:nodev' + + - id: 2015 + title: "Ensure nosuid option set on /dev/shm partition" + description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." + rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." + remediation: "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" + compliance: + - cis: ["1.1.15"] + - cis_csc: ["13", "5.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:nosuid' + + - id: 2016 + title: "Ensure noexec option set on /dev/shm partition" + description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.16"] + - cis_csc: ["13", "5.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:noexec' + + - id: 2017 + title: "Disable Automounting" + description: "autofs allows automatic mounting of devices, typically including CD/DVDs and USB drives." + rationale: "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." + remediation: "Disable autofs: # update-rc.d autofs disable" + compliance: + - cis: ["1.1.21"] + - cis_csc: ["8.3", "8.4", "8.5"] + condition: none + rules: + - 'c:systemctl is-enabled autofs -> r:^enabled' + +# 1.3 Filesystem Integrity Checking + - id: 2018 + title: "Ensure AIDE is installed" + description: "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." + rationale: "By monitoring the filesystem state compromised files can be detected to prevent or limit the exposure of accidental or malicious misconfigurations or modified binaries." + remediation: "Install AIDE: # apt-get install aide aide-common. Configure AIDE as appropriate for your environment. Consult the AIDE documentation for options. Initialize AIDE: # aideinit" + compliance: + - cis: ["1.3.1"] + - cis_csc: ["3.5", "14.9"] + condition: all + rules: + - 'c:dpkg -s aide -> r:install ok installed' + + - id: 2019 + title: "Ensure filesystem integrity is regularly checked" + description: "Periodic checking of the filesystem integrity is needed to detect changes to the filesystem." + rationale: "Periodic file checking allows the system administrator to determine on a regular basis if critical files have been changed in an unauthorized fashion." + remediation: "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." + compliance: + - cis: ["1.3.2"] + - cis_csc: ["3.5", "14.9"] + condition: all + rules: + - 'c:grep -Rh aide /etc/cron.d /etc/cron.daily /etc/cron.hourly /etc/cron.monthly /etc/cron.weekly /etc/crontab -> r:\.+' + +# 1.4 Secure Boot Settings + - id: 2020 + title: "Ensure bootloader password is set" + description: "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." + rationale: "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)." + remediation: "1) Create an encrypted password with grub-md5-crypt: # grub-mkpasswd-pbkdf2 Enter password: Reenter password: Your PBKDF2 is 2) Add the following into /etc/grub.d/00_header or a custom /etc/grub.d configuration file: cat <\" password_pbkdf2 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" + compliance: + - cis: ["1.4.2"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'f:/boot/grub/grub.cfg -> r:^\s*\t*set superusers' + - 'f:/boot/grub/grub.cfg -> r:^\s*\t*password' + + - id: 2021 + title: "Ensure authentication required for single user mode" + description: "Single user mode is used for recovery when the system detects an issue during boot or by manual selection from the bootloader." + rationale: "Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials." + remediation: "Run the following command and follow the prompts to set a password for the root user: # passwd root" + compliance: + - cis: ["1.4.3"] + - cis_csc: ["5.1"] + condition: none + rules: + - 'f:/etc/shadow -> r:^root:*:|^root:!:' + +# 1.5 Additional Process Hardening + - id: 2022 + title: "Ensure core dumps are restricted" + description: "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." + rationale: "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." + remediation: "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 and set the active kernel parameter." + compliance: + - cis: ["1.5.1"] + - cis_csc: ["13"] + condition: all + rules: + - 'c:sysctl fs.suid_dumpable -> r:=\s*\t*0$' + - 'c:grep -Rh fs\.suid_dumpable /etc/sysctl.conf /etc/sysctl.d -> r:=\s*\t*0$' + - 'c:grep -Rh ^*[[:space:]]*hard[[:space:]][[:space:]]*core[[:space:]][[:space:]]* /etc/security/limits.conf /etc/security/limits.d -> r:\s*\t*0$' + + - id: 2023 + title: "Ensure address space layout randomization (ASLR) is enabled" + description: "Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process." + rationale: "Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting." + remediation: "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" + compliance: + - cis: ["1.5.3"] + - cis_csc: ["8.3", "8.4"] + condition: all + rules: + - 'c:grep -Rh ^kernel\.randomize_va_space /etc/sysctl.conf /etc/sysctl.d -> r:\s*\t*2$' + - 'c:sysctl kernel.randomize_va_space -> r:^kernel.randomize_va_space\s*\t*=\s*\t*2' + +# 1.7 Warning Banners + - id: 2024 + title: "Ensure local login warning banner is configured properly" + description: "The contents of the /etc/issue file are displayed to users prior to login for local terminals. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: \\m - machine architecture \\r - operating system release \\s - operating system name \\v - operating system version" + rationale: "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." + remediation: "Edit the /etc/issue file with the appropriate contents according to your site policy, remove any instances of \\m,\\r,\\s, or \\v: # echo \"Authorized uses only. All activity may be monitored and reported.\" > /etc/issue" + compliance: + - cis: ["1.7.1.2"] + - cis_csc: ["13", "5.1"] + condition: none + rules: + - 'f:/etc/issue -> r:\\v|\\r|\\m|\\s|Debian|Ubuntu' + + - id: 2025 + title: "Ensure GDM login banner is configured" + description: "GDM is the GNOME Display Manager which handles graphical login for GNOME based systems." + rationale: "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." + remediation: "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.'" + compliance: + - cis_csc: ["5.1"] + - cis: ["1.7.2"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:/etc/gdm3/greeter.dconf-defaults -> r:^[org/gnome/login-screen]' + - 'f:/etc/gdm3/greeter.dconf-defaults -> r:^banner-message-enable=true' + - 'f:/etc/gdm3/greeter.dconf-defaults -> r:^banner-message-text=\.+' + +# 2 Services + - id: 2026 + title: "Ensure xinetd is not installed" + description: "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." + rationale: "If there are no xinetdservices required, it is recommended that the daemon be disabled." + remediation: "Run the following command to disable xinetd: # apt-get remove xinetd" + compliance: + - cis: ["2.1.1"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'c:dpkg -s xinetd -> r:install ok installed' + + - id: 2027 + title: "Ensure inetd is not installed" + description: "The inetd daemon listens for well known services and dispatches the appropriate daemon to properly respond to service requests." + rationale: "If there are no inetd services required, it is recommended that the daemon be removed." + remediation: "Run the following commands to uninstall openbsd-inetd and inetutils-inetd: # apt-get remove openbsd-inetd # apt-get remove inetutils-inetd" + compliance: + - cis: ["2.1.2"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'c:dpkg -s openbsd-inetd -> r:install ok installed' + - 'c:dpkg -s inetutils-inetd -> r:install ok installed' + + - id: 2028 + title: "Ensure ntp is configured" + description: "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." + rationale: "If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly." + remediation: "Remediation: 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 Note: is the IP address or hostname of a trusted time server. Configuring an NTP server is outside the scope of this benchmark." + compliance: + - cis: ["2.2.1.2"] + - cis_csc: ["6.1"] + references: + - http://www.ntp.org/ + condition: all + rules: + - 'f:/etc/ntp.conf -> r:^restrict\s+-4\s+default|^restrict\s+default && r:\s+kod\s+ && r:\s+nomodify\s+ && r:\s+notrap\s+ && r:\s+nopeer\s+ && r:\s+noquery\s+' + - 'f:/etc/ntp.conf -> r:^restrict\s+-6\s+default && r:\s+kod\s+ && r:\s+nomodify\s+ && r:\s+notrap\s+ && r:\s+nopeer\s+ && r:\s+noquery\s+' + - 'f:/etc/ntp.conf -> r:^server\.+$|^pool\.+$' + - 'f:/etc/ntp.conf -> r:^server\s\.+' + - 'f:/etc/init.d/ntp -> r:^RUNASUSER\s*\t*=\s*\t*ntp' + + - id: 2029 + title: "Ensure chrony is configured" + description: "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." + rationale: "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." + remediation: "Add or edit server or pool lines to /etc/chrony/chrony.conf as appropriate: server " + compliance: + - cis: ["2.2.1.3"] + - cis_csc: ["6.1"] + condition: all + rules: + - 'f:/etc/chrony.conf -> r:^server\.+$|^pool\.+$' + + - id: 2030 + title: "Ensure Avahi Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable avahi-daemon: # systemctl disable avahi-daemon" + compliance: + - cis: ["2.2.3"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'c:systemctl is-enabled avahi-daemon -> r:^enabled' + + - id: 2031 + title: "Ensure CUPS is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable cups: # systemctl disable cups" + compliance: + - cis: ["2.2.4"] + - cis_csc: ["9.1", "9.2"] + references: + - https://www.cups.org + condition: none + rules: + - 'c:systemctl is-enabled cups -> r:^enabled' + + - id: 2032 + title: "Ensure DHCP Server is not enabled" + description: "The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses." + rationale: "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." + remediation: "Run the following commands to disable dhcpd: # systemctl disable isc-dhcp-server # systemctl disable isc-dhcp-server6" + references: + - https://www.isc.org/dhcp/ + compliance: + - cis: ["2.2.5"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'c:systemctl is-enabled isc-dhcp-server -> r:^enabled' + - 'c:systemctl is-enabled isc-dhcp-server6 -> r:^enabled' + + - id: 2033 + title: "Ensure LDAP server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable slapd: # systemctl disable slapd" + compliance: + - cis: ["2.2.6"] + - cis_csc: ["9.1", "9.2"] + references: + - https://www.openldap.org + condition: none + rules: + - 'c:systemctl is-enabled slapd -> r:^enabled' + + - id: 2034 + title: "Ensure NFS and RPC are not enabled" + description: "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." + rationale: "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." + remediation: "Run the following commands to disable nfs and rpcbind: # systemctl disable nfs-server # systemctl disable rpcbind" + compliance: + - cis: ["2.2.7"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'c:systemctl is-enabled nfs-server -> r:^enabled' + - 'c:systemctl is-enabled rpcbind -> r:^enabled' + + - id: 2035 + title: "Ensure DNS Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable named: # systemctl disable bind9" + compliance: + - cis: ["2.2.8"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'c:systemctl is-enabled bind9 -> r:^enabled' + + - id: 2036 + title: "Ensure FTP Server is not enabled" + description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." + rationale: "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." + remediation: "Run the following command to disable vsftpd: # systemctl disable vsftpd" + compliance: + - cis: ["2.2.9"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'c:systemctl is-enabled vsftpd -> r:^enabled' + + - id: 2037 + title: "Ensure HTTP Server is not enabled" + description: "HTTP or web servers provide the ability to host web site content." + rationale: "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." + remediation: "Run the following command to disable apache2: # systemctl disable apache2" + compliance: + - cis: ["2.2.10"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'c:systemctl is-enabled apache2 -> r:^enabled' + + - id: 2038 + title: "Ensure IMAP and POP3 server is not enabled" + description: "exim is an open source IMAP and POP3 server for Linux based systems." + rationale: "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." + remediation: "Run the following commands to remove exim: # apt-get remove exim4; # apt-get purge exim4" + compliance: + - cis_csc: ["9.2"] + - cis: ["2.2.11"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:dpkg -s exim4 -> install ok installed' + + - id: 2039 + title: "Ensure Samba is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable smbd: # systemctl disable smbd" + compliance: + - cis: ["2.2.12"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'c:systemctl is-enabled smbd -> r:^enabled' + + - id: 2040 + title: "Ensure HTTP Proxy Server is not enabled" + description: "Squid is a standard proxy server used in many distributions and environments." + rationale: "If there is no need for a proxy server, it is recommended that the squid proxy be deleted to reduce the potential attack surface." + remediation: "Run the following command to disable squid: # systemctl disable squid" + compliance: + - cis: ["2.2.13"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'c:systemctl is-enabled squid -> r:^enabled' + + - id: 2041 + title: "Ensure SNMP Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable snmpd: # systemctl disable snmpd" + compliance: + - cis: ["2.2.14"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'c:systemctl is-enabled snmpd -> r:^enabled' + + - id: 2042 + title: "Ensure rsync service is not enabled" + description: "The rsyncd service can be used to synchronize files between systems over network links." + rationale: "The rsyncd service presents a security risk as it uses unencrypted protocols for communication." + remediation: "Run the following command to disable rsync: # systemctl disable rsync" + compliance: + - cis: ["2.2.16"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'c:systemctl is-enabled rsync -> r:^enabled' + + - id: 2043 + title: "Ensure NIS Server is not enabled" + description: "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." + rationale: "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" + remediation: "Run the following command to disable nis: # systemctl disable nis" + compliance: + - cis_csc: ["9.2"] + - cis: ["2.2.17"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled nis -> r:^enabled' + + - id: 2044 + title: "Ensure NIS Client is not installed" + description: "The Network Information Service (NIS), formerly known as Yellow Pages, is a client-server directory service protocol used to distribute system configuration files." + rationale: "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." + remediation: "Uninstall the nis package: # apt-get remove nis" + compliance: + - cis: ["2.3.1"] + - cis_csc: ["2", "2.6"] + condition: none + rules: + - 'c:dpkg -s nis -> r:install ok installed' + + - id: 2045 + title: "Ensure rsh client is not installed" + description: "The rshpackage contains the client commands for the rsh services." + rationale: "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." + remediation: "Run the following command to uninstall rsh: apt-get remove rsh-client rsh-redone-client" + compliance: + - cis: ["2.3.2"] + - cis_csc: ["3.4", "4.5"] + condition: none + rules: + - 'c:dpkg -s rsh-client -> r:install ok installed' + - 'c:dpkg -s rsh-redone-client -> r:install ok installed' + + - id: 2046 + title: "Ensure talk client is not installed" + description: "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." + rationale: "The software presents a security risk as it uses unencrypted protocols for communication." + remediation: "Run the following command to uninstall talk: apt-get remove talk" + compliance: + - cis: ["2.3.3"] + - cis_csc: ["2", "2.6"] + condition: none + rules: + - 'c:dpkg -s talk -> r:install ok installed' + + - id: 2047 + title: "Ensure telnet client is not installed" + description: "The telnet package contains the telnet client, which allows users to start connections to other systems via the telnet protocol." + rationale: "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." + remediation: "Run the following command to uninstall telnet: # apt-get remove telnet" + compliance: + - cis: ["2.3.4"] + - cis_csc: ["3.4", "4.5"] + condition: none + rules: + - 'c:dpkg -s telnet -> r:install ok installed' + +# 3 Network Configuration + - id: 2048 + title: "Ensure IP forwarding is disabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.1.1"] + - cis_csc: ["3", "11", "5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.ip_forward -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv4\.ip_forward /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.ipv4_forward\s*=\s*0$' + - 'c:sysctl net.ipv6.conf.all.forwarding -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv6\.conf\.all\.forwarding /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv6.conf.all.forwarding\s*=\s*0$' + + - id: 2049 + title: "Ensure packet redirect sending is disabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.1.2"] + - cis_csc: ["3", "11", "5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.send_redirects -> r:=\s*\t*0$' + - 'c:sysctl net.ipv4.conf.default.send_redirects -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.send_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.send_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.send_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.send_redirects\s*=\s*0$' + + - id: 2050 + title: "Ensure source routed packets are not accepted" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.1"] + - cis_csc: ["3", "11", "5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.accept_source_route -> r:=\s*\t*0$' + - 'c:sysctl net.ipv4.conf.default.accept_source_route -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.accept_source_route\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.accept_source_route\s*=\s*0$' + - 'c:sysctl net.ipv6.conf.all.accept_source_route -> r:=\s*\t*0$' + - 'c:sysctl net.ipv6.conf.default.accept_source_route -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv6\.conf\.all\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv6.conf.all.accept_source_route\s*=\s*0$' + - 'c:grep -Rh net\.ipv6\.conf\.default\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv6.conf.default.accept_source_route\s*=\s*0$' + + - id: 2051 + title: "Ensure ICMP redirects are not accepted" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.2"] + - cis_csc: ["3", "11", "5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.accept_redirects -> r:=\s*\t*0$' + - 'c:sysctl net.ipv4.conf.default.accept_redirects -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.accept_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.accept_redirects\s*=\s*0$' + - 'c:sysctl net.ipv6.conf.all.accept_redirects -> r:=\s*\t*0$' + - 'c:sysctl net.ipv6.conf.default.accept_redirects -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv6\.conf\.all\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv6.conf.all.accept_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv6\.conf\.default\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv6.conf.default.accept_redirects\s*=\s*0$' + + - id: 2052 + title: "Ensure secure ICMP redirects are not accepted" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.3"] + - cis_csc: ["3", "11", "5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.secure_redirects -> r:=\s*\t*0$' + - 'c:sysctl net.ipv4.conf.default.secure_redirects -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.secure_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.secure_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.secure_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.secure_redirects\s*=\s*0$' + + - id: 2053 + title: "Ensure suspicious packets are logged" + description: "When enabled, this feature logs packets with un-routable source addresses to the kernel log." + rationale: "Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their server." + remediation: "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" + compliance: + - cis: ["3.2.4"] + - cis_csc: ["6", "6.2", "6.3"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.log_martians -> r:=\s*\t*1$' + - 'c:sysctl net.ipv4.conf.default.log_martians -> r:=\s*\t*1$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.log_martians /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.log_martians\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.log_martians /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.log_martians\s*=\s*1$' + + - id: 2054 + title: "Ensure broadcast ICMP requests are ignored" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.5"] + - cis_csc: ["3", "11", "5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.icmp_echo_ignore_broadcasts -> r:=\s*\t*1$' + - 'c:grep -Rh net\.ipv4\.icmp_echo_ignore_broadcasts /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.icmp_echo_ignore_broadcasts\s*=\s*1$' + + - id: 2055 + title: "Ensure bogus ICMP responses are ignored" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.6"] + - cis_csc: ["3", "11", "5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.icmp_ignore_bogus_error_responses -> r:=\s*\t*1$' + - 'c:grep -Rh net\.ipv4\.icmp_ignore_bogus_error_responses /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.icmp_ignore_bogus_error_responses\s*=\s*1$' + + - id: 2056 + title: "Ensure Reverse Path Filtering is enabled" + description: "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)." + rationale: 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. + remediation: "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" + compliance: + - cis: ["3.2.7"] + - cis_csc: ["3", "11", "5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.rp_filter -> r:=\s*\t*1$' + - 'c:sysctl net.ipv4.conf.default.rp_filter -> r:=\s*\t*1$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.rp_filter /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.rp_filter\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.rp_filter /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.rp_filter\s*=\s*1$' + + - id: 2057 + title: "Ensure TCP SYN Cookies is enabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.8"] + - cis_csc: ["3", "11", "5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.tcp_syncookies -> r:=\s*\t*1$' + - 'c:grep -Rh net\.ipv4\.tcp_syncookies /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.tcp_syncookies\s*=\s*1$' + + - id: 2058 + title: "Ensure IPv6 router advertisements are not accepted" + description: "This setting disables the systems ability to accept router advertisements" + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.9"] + - cis_csc: ["3", "11", "5.1"] + condition: all + rules: + - 'c:sysctl net.ipv6.conf.all.accept_ra -> r:=\s*\t*0$' + - 'c:sysctl net.ipv6.conf.default.accept_ra -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv6\.conf\.all\.accept_ra /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv6.conf.all.accept_ra\s*=\s*0$' + - 'c:grep -Rh net\.ipv6\.conf\.default\.accept_ra /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv6.conf.default.accept_ra\s*=\s*0$' + + - id: 2059 + title: "Ensure /etc/hosts.allow is configured" + description: "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." + rationale: "The /etc/hosts.allow file supports access control by IP and helps ensure that only authorized systems can connect to the system." + remediation: "Run the following command to create /etc/hosts.allow: # echo \"ALL: /, /, ...\" >/etc/hosts.allow. Where each / combination (for example, \"192.168.1.0/255.255.255.0\") represents one network block in use by your organization that requires access to this system." + compliance: + - cis: ["3.3.2"] + - cis_csc: ["9.2", "9.4"] + condition: all + rules: + - 'f:/etc/hosts.allow' + + - id: 2060 + title: "Ensure /etc/hosts.deny is configured" + description: "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." + rationale: "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." + remediation: "Run the following command to create /etc/hosts.deny: # echo \"ALL: ALL\" >> /etc/hosts.deny" + compliance: + - cis: ["3.3.3"] + - cis_csc: ["9.2", "9.4"] + condition: all + rules: + - 'f:/etc/hosts.deny' + - 'f:/etc/hosts.deny -> r:^ALL:\s*ALL' + + - id: 2061 + title: "Ensure DCCP is disabled" + description: "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." + rationale: "If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface." + remediation: "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" + compliance: + - cis: ["3.4.1"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'not c:modprobe -n -v dccp -> r:install /bin/true' + - 'c:lsmod -> r:dccp' + + - id: 2062 + title: "Ensure SCTP is disabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.4.2"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'not c:modprobe -n -v sctp -> r:install /bin/true' + - 'c:lsmod -> r:sctp' + + - id: 2063 + title: "Ensure RDS is disabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.4.3"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'not c:modprobe -n -v rds -> r:install /bin/true' + - 'c:lsmod -> r:rds' + + - id: 2064 + title: "Ensure TIPC is disabled" + description: "The Transparent Inter-Process Communication (TIPC) protocol is designed to provide communication between cluster nodes." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.4.4"] + - cis_csc: ["9.1", "9.2"] + condition: none + rules: + - 'not c:modprobe -n -v tipc -> r:install /bin/true' + - 'c:lsmod -> r:tipc' + +# 3.5 Firewall configuration + + - id: 2065 + title: "Ensure default deny firewall policy" + description: "A default deny all policy on connections ensures that any unconfigured network usage will be rejected." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.5.1.1"] + - cis_csc: ["9.1", "9.4"] + condition: all + rules: + - 'c:iptables -L -> r:^Chain INPUT && r:policy DROP' + - 'c:iptables -L -> r:^Chain FORWARD && r:policy DROP' + - 'c:iptables -L -> r:^Chain OUTPUT && r:policy DROP' + + - id: 2066 + title: "Ensure IPv6 default deny firewall policy" + description: "A default deny all policy on connections ensures that any unconfigured network usage will be rejected." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.5.2.1"] + - cis_csc: ["9.1", "9.4"] + condition: all + rules: + - 'c:ip6tables -L -> r:^Chain INPUT && r:policy DROP' + - 'c:ip6tables -L -> r:^Chain FORWARD && r:policy DROP' + - 'c:ip6tables -L -> r:^Chain OUTPUT && r:policy DROP' + + - id: 2067 + title: "Ensure iptables is installed" + description: "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." + rationale: "iptables is required for firewall management and configuration." + remediation: "Run the following command to install iptables: # apt-get install iptables" + compliance: + - cis: ["3.5.3"] + - cis_csc: ["9.2", "9.4"] + condition: all + rules: + - 'c:dpkg -s iptables -> r:install ok installed' + +# 4 Logging and Auditing + - id: 2068 + title: "Ensure rsyslog Service is enabled" + description: "Once the rsyslog package is installed it needs to be activated." + rationale: "If the rsyslog service is not activated the system will not have a syslog service running." + remediation: "Run the following command to enable rsyslog: # systemctl enable rsyslog" + compliance: + - cis: ["4.2.1.1"] + - cis_csc: ["6.2", "6.3"] + condition: all + rules: + - 'c:systemctl is-enabled rsyslog -> r:^enabled' + + - id: 2069 + title: "Ensure rsyslog is configured to send logs to a remote log host" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["4.2.1.4"] + - cis_csc: ["6.6", "6.8"] + references: + - rsyslog.conf(5) man page + condition: all + rules: + - 'c:grep -Rh ^*.*[^I][^I]*@ /etc/rsyslog.conf /etc/rsyslog.d/ -> r:^*.* @@\.+' + + - id: 2070 + title: "Ensure remote rsyslog messages are only accepted on designated log hosts" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["4.2.1.5"] + - cis_csc: ["9.1", "9.2"] + references: + - rsyslog.conf(8) man page + condition: all + rules: + - 'c:grep -Rh ^\$ModLoad[[:space:]]*imtcp /etc/rsyslog.conf /etc/rsyslog.d/ -> r:^\$ModLoad\s*\t*imtcp' + - 'c:grep -Rh ^\$InputTCPServerRun /etc/rsyslog.conf /etc/rsyslog.d/ -> r:^\$InputTCPServerRun\s*\t*514' + +# 5 Access, Authentication and Authorization + - id: 2071 + title: "Ensure cron daemon is enabled" + description: "The cron daemon is used to execute batch jobs on the system." + rationale: "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." + remediation: "Run the following command to enable cron: systemctl enable cron" + compliance: + - cis: ["5.1.1"] + - cis_csc: ["6", "5.1"] + condition: all + rules: + - 'c:systemctl is-enabled cron -> r:^enabled$' + + - id: 2072 + title: "Ensure at/cron is restricted to authorized users" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["5.1.8"] + - cis_csc: ["16"] + condition: all + rules: + - 'f:/etc/cron.allow' + - 'f:/etc/at.allow' + - 'not f:/etc/cron.deny' + - 'not f:/etc/at.deny' + - 'c:stat -c%u-%g-%a /etc/cron.allow -> r:^0-0-600' + - 'c:stat -c%u-%g-%a /etc/at.allow -> r:^0-0-600' + + - id: 2073 + title: "Ensure permissions on /etc/ssh/sshd_config are configured" + description: "The /etc/ssh/sshd_config file contains configuration specifications for sshd. The command below sets the owner and group of the file to root." + rationale: "The /etc/ssh/sshd_config file needs to be protected from unauthorized changes by non- privileged users." + remediation: "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" + compliance: + - cis: ["5.2.1"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:stat -c%u-%g-%a /etc/ssh/sshd_config -> r:^0-0-600' + + - id: 2074 + title: "Ensure SSH Protocol is set to 2" + description: "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." + rationale: "SSH v1 suffers from insecurities that do not affect SSH v2." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" + compliance: + - cis: ["5.2.4"] + - cis_csc: ["3.4", "4.5"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:Protocol\s*\t*2' + + - id: 2075 + title: "Ensure SSH LogLevel is appropriate" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel VERBOSE or LogLevel INFO" + references: + - https://www.ssh.com/ssh/sshd_config/ + compliance: + - cis: ["5.2.5"] + - cis_csc: ["16", "6.2", "6.3"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:LogLevel\s+INFO|LogLevel\s+VERBOSE' + + - id: 2076 + title: "Ensure SSH X11 forwarding is disabled" + description: "The X11Forwarding parameter provides the ability to tunnel X11 traffic through the connection to enable remote graphic connections." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_configfile to set the parameter as follows: X11Forwarding no" + compliance: + - cis: ["5.2.6"] + - cis_csc: ["16", "9.2"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:X11Forwarding\s+no' + + - id: 2077 + title: "Ensure SSH MaxAuthTries is set to 4 or less" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4" + compliance: + - cis: ["5.2.7"] + - cis_csc: ["16", "16.13"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && n:^MaxAuthTries\s*\t*(\d+) compare <= 4' + + - id: 2078 + title: "Ensure SSH IgnoreRhosts is enabled" + description: "The IgnoreRhosts parameter specifies that .rhostsand .shostsfiles will not be used in RhostsRSAAuthenticationor HostbasedAuthentication." + rationale: "Setting this parameter forces users to enter a password when authenticating with ssh." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" + compliance: + - cis: ["5.2.8"] + - cis_csc: ["9", "9.2"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:IgnoreRhosts\s+yes' + + - id: 2079 + title: "Ensure SSH HostbasedAuthentication is disabled" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" + compliance: + - cis: ["5.2.9"] + - cis_csc: ["9", "16.3"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:HostbasedAuthentication\s+no' + + - id: 2080 + title: "Ensure SSH root login is disabled" + description: "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 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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" + compliance: + - cis: ["5.2.10"] + - cis_csc: ["5.8", "4.3"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:PermitRootLogin\s+no' + +# 5.2 SSH Server Configuration + + - id: 2081 + title: "Ensure SSH PermitEmptyPasswords is disabled" + description: "The PermitEmptyPasswords parameter specifies if the server allows login to accounts with empty password strings." + rationale: "Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system" + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" + compliance: + - cis: ["5.2.11"] + - cis_csc: ["16", "16.3"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:PermitEmptyPasswords\s+no' + + - id: 2082 + title: "Ensure SSH PermitUserEnvironment is disabled" + description: "The PermitUserEnvironment option allows users to present environment options to the ssh daemon." + rationale: "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)" + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitUserEnvironment no" + compliance: + - cis: ["5.2.12"] + - cis_csc: ["16", "5.1"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:PermitUserEnvironment\s+no' + + - id: 2083 + title: "Ensure SSH Idle Timeout Interval is configured" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameters according to site policy: ClientAliveInterval 300 ClientAliveCountMax 0" + compliance: + - cis: ["5.2.16"] + - cis_csc: ["16.4", "16.11"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && n:ClientAliveInterval\s*\t*(\d+) compare <= 300 && n:ClientAliveInterval\s*\t*(\d+) compare != 0' + - 'f:/etc/ssh/sshd_config -> !r:^# && n:ClientAliveCountMax\s*\t*(\d+) compare <= 3' + + - id: 2084 + title: "Ensure SSH access is limited" + description: "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." + rationale: "Restricting which users can remotely access the system via SSH will help ensure that only authorized users access the system." + remediation: "Edit the /etc/ssh/sshd_config file to set one or more of the parameter as follows: AllowUsers AllowGroups DenyUsers DenyGroups " + compliance: + - cis: ["5.2.18"] + - cis_csc: ["5.1", "5.8", "4.3"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:AllowUsers\s+\w+|AllowGroups\s+\w+|DenyUsers\s+\w+|DenyGroups\s+\w+' + + - id: 2085 + title: "Ensure SSH warning banner is configured" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Banner /etc/issue.net" + compliance: + - cis: ["5.2.19"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:Banner\s*\t*/etc/issue.net|Banner\s\t*/etc/issue' + +# 5.3 Configure PAM + + - id: 2086 + title: "Ensure password creation requirements are configured" + description: "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.)" + rationale: "Strong passwords protect systems from being hacked through brute force methods." + remediation: "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." + compliance: + - cis: ["5.3.1"] + - cis_csc: ["5.7", "16.12", "4.4"] + condition: all + rules: + - 'c:dpkg -s libpam-pwquality -> r:install ok installed' + - 'f:/etc/pam.d/common-password -> !r:^# && r:password\s*\t*requisite\s*\t*pam_pwquality.so\s*\t*retry=\d' + - 'f:/etc/security/pwquality.conf -> !r:^# && n:minlen\s*\t*=\s*\t*(\d+) compare >= 14' + - 'f:/etc/security/pwquality.conf -> !r:^# && r:dcredit' + - 'f:/etc/security/pwquality.conf -> !r:^# && r:ucredit' + - 'f:/etc/security/pwquality.conf -> !r:^# && r:ocredit' + - 'f:/etc/security/pwquality.conf -> !r:^# && r:lcredit' + + - id: 2087 + title: "Ensure lockout for failed password attempts is configured" + description: "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." + rationale: "Locking out user IDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems." + remediation: "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 --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." + compliance: + - cis: ["5.3.2"] + - cis_csc: ["16.7"] + condition: all + rules: + - 'f:/etc/pam.d/common-auth -> !r:^# && r:auth\s*\t*required\s*\t*pam_tally2.so && r:onerr=fail && r:audit && r:silent && r:deny\s*=\s*\d && r:unlock_time\s*=\s*\d\d\d+' + + - id: 2088 + title: "Ensure password reuse is limited" + description: "The /etc/security/opasswd file stores the users' old passwords and can be checked to ensure that users are not recycling recent passwords." + rationale: "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." + remediation: "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." + compliance: + - cis: ["5.3.3"] + - cis_csc: ["16"] + condition: all + rules: + - 'f:/etc/pam.d/common-password -> !r:^# && r:password\s*\t*required\s*\t*pam_pwhistory.so && n:remember\s*\t*=\s*\t*(\d+) compare >= 5' + +# 5.4 User Accounts and Environment + + - id: 2089 + title: "Ensure password expiration is 365 days or less" + description: "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." + rationale: "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." + remediation: "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 . 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." + compliance: + - cis: ["5.4.1.1"] + - cis_csc: ["4.4", "16"] + condition: all + rules: + - 'f:/etc/login.defs -> n:^\s*\t*PASS_MAX_DAYS\s*\t*(\d+) compare <= 365' + + - id: 2090 + title: "Ensure minimum days between password changes is 7 or more" + description: "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." + rationale: "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." + remediation: "Set the PASS_MIN_DAYS parameter to 7 in /etc/login.defs: PASS_MIN_DAYS 7. Modify user parameters for all users with a password set to match: # chage --mindays 7 . Notes: You can also check this setting in /etc/shadow directly. The 4th field should be 7 or more for all users with a password." + compliance: + - cis: ["5.4.1.2"] + - cis_csc: ["4.4", "16"] + condition: all + rules: + - 'f:/etc/login.defs -> n:^\s*\t*PASS_MIN_DAYS\s*\t*(\d+) compare >= 7' + + - id: 2091 + title: "Ensure password expiration warning days is 7 or more" + description: "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." + rationale: "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." + remediation: "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 . 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." + compliance: + - cis: ["5.4.1.3"] + - cis_csc: ["4.4", "16"] + condition: all + rules: + - 'f:/etc/login.defs -> n:^\s*\t*PASS_WARN_AGE\s*\t*(\d+) compare >= 7' + + - id: 2092 + title: "Ensure inactive password lock is 30 days or less" + description: "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." + rationale: "Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies." + remediation: "Run the following command to set the default password inactivity period to 30 days: # useradd -D -f 30. Modify user parameters for all users with a password set to match: # chage --inactive 30 . Notes: You can also check this setting in /etc/shadow directly. The 7th field should be 30 or less for all users with a password. A value of -1 would disable this setting." + compliance: + - cis: ["5.4.1.4"] + - cis_csc: ["4.4", "16"] + condition: all + rules: + - 'c:useradd -D -> n:^INACTIVE=(\d+) compare <= 30' + + - id: 2093 + title: "Ensure default group for the root account is GID 0" + description: "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." + rationale: "Using GID 0 for the root account helps prevent root-owned files from accidentally becoming accessible to non-privileged users." + remediation: "Run the following command to set the root user default group to GID 0: # usermod -g 0 root" + compliance: + - cis: ["5.4.3"] + - cis_csc: ["5", "5.1"] + condition: all + rules: + - 'f:/etc/passwd -> !r:^# && r:root:\w+:\w+:0:' + + - id: 2094 + title: "Ensure access to the su command is restricted" + description: "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." + rationale: "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." + remediation: "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, 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." + compliance: + - cis: ["5.6"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'f:/etc/pam.d/su -> !r:^# && r:auth\s*\t*required\s*\t*pam_wheel.so' + - 'f:/etc/group -> !r:^# && r:sudo:\w+:\d+:\.' + +# 6.2 User and Group Settings + + - id: 2095 + title: "Ensure password fields are not empty" + description: "An account with an empty password field means that anybody may log in as that user without providing a password." + rationale: "All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user." + remediation: "If any accounts in the /etc/shadow file do not have a password, run the following command to lock the account until it can be determined why it does not have a password: # passwd -l . Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off." + compliance: + - cis: ["6.2.1"] + - cis_csc: ["16", "4.4"] + condition: none + rules: + - 'f:/etc/shadow -> r:^\w+::' + + - id: 2096 + title: "Ensure no legacy \"+\" entries exist in /etc/passwd" + description: "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." + rationale: "These entries may provide an avenue for attackers to gain privileged access on the system." + remediation: "Remove any legacy + entries from /etc/passwd if they exist." + compliance: + - cis: ["6.2.2"] + - cis_csc: ["16.9", "16.2"] + condition: none + rules: + - 'f:/etc/passwd -> !r:^# && r:^+:' + + - id: 2097 + title: "Ensure no legacy \"+\" entries exist in /etc/shadow" + description: "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." + rationale: "These entries may provide an avenue for attackers to gain privileged access on the system." + remediation: "Remove any legacy + entries from /etc/shadow if they exist." + compliance: + - cis: ["6.2.3"] + - cis_csc: ["16.9", "16.2"] + condition: none + rules: + - 'f:/etc/shadow -> !r:^# && r:^+:' + + - id: 2098 + title: "Ensure no legacy \"+\" entries exist in /etc/group" + description: "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." + rationale: "These entries may provide an avenue for attackers to gain privileged access on the system." + remediation: "Remove any legacy + entries from /etc/group if they exist." + compliance: + - cis: ["6.2.4"] + - cis_csc: ["16.9", "16.2"] + condition: none + rules: + - 'f:/etc/group -> !r:^# && r:^+:' + + - id: 2099 + title: "Ensure root is the only UID 0 account" + description: "Any account with UID 0 has superuser privileges on the system." + rationale: "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." + remediation: "Remove any users other than root with UID 0 or assign them a new UID if appropriate." + compliance: + - cis: ["6.2.5"] + - cis_csc: ["5.1"] + condition: none + rules: + - 'f:/etc/passwd -> !r:^# && !r:^root: && r:^\w+:\w+:0:' + + - id: 2100 + title: "Ensure shadow group is empty" + description: "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." + rationale: "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." + remediation: "Remove all users from the shadow group, and change the primary group of any users with shadow as their primary group." + compliance: + - cis: ["6.2.20"] + - cis_csc: ["5.1"] + condition: none + rules: + - 'f:/etc/group -> !r:^# && r:shadow:\w*:\w*:\S+' diff --git a/sca/debian/cis_debian8_L2.yml b/sca/debian/cis_debian8_L2.yml new file mode 100644 index 000000000..50dfd78dd --- /dev/null +++ b/sca/debian/cis_debian8_L2.yml @@ -0,0 +1,466 @@ +# Security Configuration Assessment +# Level 2 CIS Checks for Debian Linux 8 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Debian Linux 8 Benchmark v2.0.0 - 12-28-2018 + +policy: + id: "cis_debian8_L2" + file: "cis_debian8_L2.yml" + name: "CIS benchmark for Debian/Linux 8 L2" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for Debian Linux 8." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check Debian version" + description: "Requirements for running the SCA scan against Debian/Ubuntu." + condition: all + rules: + - 'f:/etc/debian_version' + - 'f:/proc/sys/kernel/ostype -> Linux' + +checks: + + - id: 2500 + title: "Ensure separate partition exists for /var" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.5"] + - cis_csc: ["13", "5.1"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var\s' + + - id: 2501 + title: "Ensure separate partition exists for /var/tmp" + description: "The /var/tmp directory is a world-writable directory used for temporary storage by all users and some applications." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.6"] + - cis_csc: ["13", "5.1"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var/tmp\s' + + - id: 2502 + title: "Ensure separate partition exists for /var/log" + description: "The /var/log directory is used by system services to store log data." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.10"] + - cis_csc: ["6.3", "6.4"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var/log\s' + + - id: 2503 + title: "Ensure separate partition exists for /var/log/audit" + description: "The auditing daemon, auditd, stores log data in the /var/log/audit directory." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.11"] + - cis_csc: ["6.3", "6.4"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var/log/audit\s' + + - id: 2504 + title: "Ensure separate partition exists for /home" + description: "The /home directory is used to support disk storage needs of local users." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.12"] + - cis_csc: ["13", "5.1"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/home\s' + + - id: 2505 + title: "Disable Automounting" + description: "autofs allows automatic mounting of devices, typically including CD/DVDs and USB drives." + rationale: "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." + remediation: "Disable autofs: # update-rc.d autofs disable" + compliance: + - cis: ["1.1.21"] + - cis_csc: ["8.3", "8.4", "8.5"] + condition: none + rules: + - 'c:systemctl is-enabled autofs -> r:^enabled' + +# 4 Additional Process Hardening + - id: 2506 + title: "Ensure SELinux or AppArmor are installed" + description: "SELinux and AppArmor provide Mandatory Access Controls." + rationale: "Without a Mandatory Access Control system installed only the default Discretionary Access Control system will be available." + remediation: "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" + compliance: + - cis: ["1.6.3"] + - cis_csc: ["14.4", "14.6"] + condition: any + rules: + - 'c:dpkg -s selinux-basics -> r:install ok installed' + - 'c:dpkg -s apparmor -> r:install ok installed' + +# 2 Services + + - id: 2507 + title: "Ensure CUPS is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable cups: # systemctl disable cups" + compliance: + - cis: ["2.2.4"] + - cis_csc: ["9.1", "9.2"] + references: + - 'https://www.cups.org' + condition: none + rules: + - 'c:systemctl is-enabled cups -> r:^enabled' + +# 4 Logging and Auditing + + - id: 2508 + title: "Ensure audit log storage size is configured" + description: "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." + rationale: "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." + remediation: "Set the following parameter in /etc/audit/auditd.conf in accordance with site policy: max_log_file = Notes: The max_log_file parameter is measured in megabytes." + compliance: + - cis: ["4.1.1.1"] + - cis_csc: ["6.3", "6.4"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/auditd.conf' + - 'f:/etc/audit/auditd.conf -> r:^\s*\t*max_log_file\s*\t*=\s*\t*\d+' + + - id: 2509 + title: "Ensure system is disabled when audit logs are full" + description: "The auditd daemon can be configured to halt the system when the audit logs are full." + rationale: "In high security contexts, the risk of detecting unauthorized access or nonrepudiation exceeds the benefit of the system's availability." + remediation: "Set the following parameters in /etc/audit/auditd.conf: space_left_action = email action_mail_acct = root admin_space_left_action = halt" + compliance: + - cis: ["4.1.1.2"] + - cis_csc: ["6.3", "6.4"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/auditd.conf' + - 'f:/etc/audit/auditd.conf -> r:^\s*\t*action_mail_acct\s*\t*=\s*\t*root' + - 'f:/etc/audit/auditd.conf -> r:^\s*\t*space_left_action\s*\t*=\s*\t*email' + - 'f:/etc/audit/auditd.conf -> r:^\s*\t*admin_space_left_action\s*\t*=\s*\t*halt' + + - id: 2510 + title: "Ensure audit logs are not automatically deleted" + description: "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." + rationale: "In high security contexts, the benefits of maintaining a long audit history exceed the cost of storing the audit history." + remediation: "Set the following parameter in /etc/audit/auditd.conf: max_log_file_action = keep_logs" + compliance: + - cis: ["4.1.1.3"] + - cis_csc: ["6.3", "6.4"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/auditd.conf' + - 'f:/etc/audit/auditd.conf -> r:^\s*\t*max_log_file_action\s*\t*=\s*\t*keep_logs' + + - id: 2511 + title: "Ensure auditd service is enabled" + description: "Turn on the auditd daemon to record system events." + rationale: "The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring." + remediation: "Run the following command to enable auditd: # systemctl enable auditd" + compliance: + - cis: ["4.1.2"] + - cis_csc: ["6.2", "6.3"] + condition: all + rules: + - 'c:systemctl is-enabled auditd -> r:^enabled' + + - id: 2512 + title: "Ensure auditing for processes that start prior to auditd is enabled" + description: "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." + rationale: "Audit events need to be captured on processes that start up prior to auditd, so that potential malicious activity cannot go undetected." + remediation: "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." + compliance: + - cis: ["4.1.3"] + - cis_csc: ["6.2", "6.3"] + condition: all + rules: + - 'f:/etc/default/grub -> r:^GRUB_CMDLINE_LINUX\s*=\s*\.*audit\s*=\s*1\.*' + + - id: 2513 + title: "Ensure events that modify date and time information are collected" + description: "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\"" + rationale: "Unexpected changes in system date and/or time could be a sign of malicious activity on the system." + remediation: "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" + compliance: + - cis: ["4.1.4"] + - cis_csc: ["3.6", "5.5"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S adjtimex && r:-S settimeofday && r:-S stime && r:-k time-change' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S clock_settime && r:-k time-change' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S adjtimex && r:-S settimeofday && r:-k time-change' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S clock_settime && r:-k time-change' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/localtime && r:-p wa && r:-k time-change' + + - id: 2514 + title: "Ensure events that modify user/group information are collected" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.1.5"] + - cis_csc: ["5.4", "4.8"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/group && r:-p wa && r:-k identity' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/passwd && r:-p wa && r:-k identity' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/gshadow && r:-p wa && r:-k identity' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/shadow && r:-p wa && r:-k identity' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/security/opasswd && r:-p wa && r:-k identity' + + - id: 2515 + title: "Ensure events that modify the system's network environment are collected" + description: "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." + rationale: "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.\"" + remediation: "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." + compliance: + - cis: ["4.1.6"] + - cis_csc: ["3.6", "5.5"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:exit,always|always,exit && r:-F arch=b32 && r:-S sethostname && r:-S setdomainname && r:-k system-locale' + - 'f:/etc/audit/audit.rules -> r:^-a && r:exit,always|always,exit && r:-F arch=b64 && r:-S sethostname && r:-S setdomainname && r:-k system-locale' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/issue && r:-p wa && r:-k system-locale' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/issue.net && r:-p wa && r:-k system-locale' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/hosts && r:-p wa && r:-k system-locale' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/sysconfig/network && r:-p wa && r:-k system-locale' + + - id: 2516 + title: "Ensure events that modify the system's Mandatory Access Controls are collected (SELinux)" + description: "Monitor SELinux 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/selinux directory." + rationale: "Changes to files in that directory could indicate that an unauthorized user is attempting to modify access controls and change security contexts, leading to a compromise of the system." + remediation: "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. Notes: Reloading the auditd config to set active settings may require a system reboot." + compliance: + - cis: ["4.1.7"] + - cis_csc: ["3.6", "5.5"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/selinux/ && r:-p wa && r:-k MAC-policy' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/usr/share/selinux/ && r:-p wa && r:-k MAC-policy' + + - id: 2517 + title: "Ensure events that modify the system's Mandatory Access Controls are collected (AppArmor)" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.1.7"] + - cis_csc: ["3.6", "5.5"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/apparmor/ && r:-p wa && r:-k MAC-policy' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/apparmor.d/ && r:-p wa && r:-k MAC-policy' + + - id: 2518 + title: "Ensure login and logout events are collected" + description: "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" + rationale: "Monitoring login/logout events could provide a system administrator with information associated with brute force attacks against user logins." + remediation: "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." + compliance: + - cis: ["4.1.8"] + - cis_csc: ["5.5", "16.10", "16.4", "4.9", "16.11", "16.13"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/var/log/faillog && r:-p wa && r:-k logins' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/var/log/lastlog && r:-p wa && r:-k logins' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/var/log/tallylog && r:-p wa && r:-k logins' + + - id: 2519 + title: "Ensure session initiation information is collected" + description: "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.\"" + rationale: "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)." + remediation: "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." + compliance: + - cis: ["4.1.9"] + - cis_csc: ["5.5", "16.10", "16.4", "4.9", "16.11", "16.13"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/var/run/utmp && r:-p wa && r:-k session' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/var/log/wtmp && r:-p wa && r:-k logins' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/var/log/btmp && r:-p wa && r:-k logins' + + - id: 2520 + title: "Ensure discretionary access control permission modification events are collected" + description: "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.\"" + rationale: "Monitoring for changes in file attributes could alert a system administrator to activity that could indicate intruder activity or policy violation." + remediation: "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." + compliance: + - cis: ["4.1.10"] + - cis_csc: ["3.6", "5.5"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S chmod && r:-S fchmod && r:-S fchmodat && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S chmod && r:-S fchmod && r:-S fchmodat && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S chown && r:-S fchown && r:-S fchownat && r:-S lchown && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S chown && r:-S fchown && r:-S fchownat && r:-S lchown && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S setxattr && r:-S lsetxattr && r:-S fsetxattr && r:-S removexattr && r:-S lremovexattr && r:-S fremovexattr && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S setxattr && r:-S lsetxattr && r:-S fsetxattr && r:-S removexattr && r:-S lremovexattr && r:-S fremovexattr && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + + - id: 2521 + title: "Ensure unsuccessful unauthorized file access attempts are collected" + description: "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.\"" + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.1.11"] + - cis_csc: ["14.6", "14.9"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S creat && r:-S open && r:-S openat && r:-S truncate && r:-F exit=-EACCES && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k access' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S creat && r:-S open && r:-S openat && r:-S truncate && r:-F exit=-EACCES && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k access' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S creat && r:-S open && r:-S openat && r:-S truncate && r:-F exit=-EPERM && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k access' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S creat && r:-S open && r:-S openat && r:-S truncate && r:-F exit=-EPERM && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k access' + + - id: 2522 + title: "Ensure successful file system mounts are collected" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.1.13"] + - cis_csc: ["13", "5.1"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S mount && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k mounts' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S mount && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k mounts' + + - id: 2523 + title: "Ensure file deletion events by users are collected" + description: "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\"." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.1.14"] + - cis_csc: ["13"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S unlink && r:-S unlinkat && r:-S rename && r:-S renameat && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k delete' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S unlink && r:-S unlinkat && r:-S rename && r:-S renameat && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k delete' + + - id: 2524 + title: "Ensure changes to system administration scope (sudoers) is collected" + description: "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.\"" + rationale: "Changes in the /etc/sudoers file can indicate that an unauthorized change has been made to scope of system administrator activity." + remediation: "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." + compliance: + - cis: ["4.1.15"] + - cis_csc: ["5.4", "4.8"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/sudoers && r:-p wa && r:-k scope' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/sudoers.d/ && r:-p wa && r:-k scope' + + - id: 2525 + title: "Ensure system administrator actions (sudolog) are collected" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.1.16"] + - cis_csc: ["5.1", "5.5", "4.9"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/var/log/sudo.log && r:-p wa && r:-k actions' + + - id: 2526 + title: "Ensure kernel module loading and unloading is collected" + description: "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\"." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.1.17"] + - cis_csc: ["3", "5.1"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/sbin/insmod && r:-p x && r:-k modules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/sbin/rmmod && r:-p x && r:-k modules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/sbin/modprobe && r:-p x && r:-k modules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S init_module && r:-S delete_module && r:-k modules' + + - id: 2527 + title: "Ensure the audit configuration is immutable" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.1.18"] + - cis_csc: ["3", "6", "6.2", "6.3"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^\s*\t*-e 2$' + + - id: 2528 + title: "Ensure SSH X11 forwarding is disabled" + description: "The X11Forwarding parameter provides the ability to tunnel X11 traffic through the connection to enable remote graphic connections." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_configfile to set the parameter as follows: X11Forwarding no" + compliance: + - cis: ["5.2.6"] + - cis_csc: ["16", "9.2"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:X11Forwarding\s+no' diff --git a/sca/debian/cis_debian9_L1.yml b/sca/debian/cis_debian9_L1.yml new file mode 100644 index 000000000..a592cc66c --- /dev/null +++ b/sca/debian/cis_debian9_L1.yml @@ -0,0 +1,1335 @@ +# Security Configuration Assessment +# Level 1 CIS Checks for Debian Linux 9 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Debian Linux 9 Benchmark v1.0.0 - 12-21-2018 + +policy: + id: "cis_debian9_L1" + file: "cis_debian9_L1.yml" + name: "CIS benchmark for Debian/Linux 9 L1" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for Debian Linux 9." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check Debian version" + description: "Requirements for running the SCA scan against Debian/Ubuntu." + condition: all + rules: + - 'f:/etc/debian_version' + - 'f:/proc/sys/kernel/ostype -> Linux' + +checks: +# 1.1.1 Disable unused filesystems + - id: 3000 + title: "Ensure mounting of freevxfs filesystems is disabled" + description: "The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the primary filesystem type for HP-UX operating systems." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." + remediation: "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" + compliance: + - cis: ["1.1.1.1"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v freevxfs -> r:^install /bin/true' + - 'not c:lsmod -> r:freevxfs' + + - id: 3001 + title: "Ensure mounting of jffs2 filesystems is disabled" + description: "The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." + remediation: "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" + compliance: + - cis: ["1.1.1.2"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v jffs2 -> r:^install /bin/true' + - 'not c:lsmod -> r:jffs2' + + - id: 3002 + title: "Ensure mounting of hfs filesystems is disabled" + description: "The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS filesystems." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." + remediation: "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" + compliance: + - cis: ["1.1.1.3"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v hfs -> r:^install /bin/true' + - 'not c:lsmod -> r:hfs' + + - id: 3003 + title: "Ensure mounting of hfsplus filesystems is disabled" + description: "The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." + remediation: "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" + compliance: + - cis: ["1.1.1.4"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v hfsplus -> r:^install /bin/true' + - 'not c:lsmod -> r:hfsplus' + + - id: 3004 + title: "Ensure mounting of udf filesystems is disabled" + description: "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." + rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." + remediation: "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" + compliance: + - cis: ["1.1.1.5"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:/sbin/modprobe -n -v udf -> r:^install /bin/true' + - 'not c:lsmod -> r:udf' + +# 2 Filesystem Configuration + - id: 3005 + title: "Ensure /tmp is configured" + description: "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.2"] + - cis_csc: ["5.1"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + - https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems/ + condition: all + rules: + - 'c:mount -> r:\s/tmp\s' + + - id: 3006 + title: "Ensure nodev option set on /tmp partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to configure the /tmp mount and run the following commands to enable systemd /tmp mounting: systemctl unmask tmp.mount systemctl enable tmp.mount" + compliance: + - cis: ["1.1.3"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:nodev' + + - id: 3007 + title: "Ensure nosuid option set on /tmp partition" + description: "The nosuid mount option specifies that the filesystem cannot contain set userid files." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.4"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:nosuid' + + - id: 3008 + title: "Ensure nodev option set on /var/tmp partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.8"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:mount -> r:\s/var/tmp\s && r:nodev' + + - id: 3009 + title: "Ensure nosuid option set on /var/tmp partition" + description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.9"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:mount -> r:\s/var/tmp\s && r:nosuid' + + - id: 3010 + title: "Ensure noexec option set on /var/tmp partition" + description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.10"] + - cis_csc: ["2.6"] + condition: all + rules: + - 'c:mount -> r:\s/var/tmp\s && r:noexec' + + - id: 3011 + title: "Ensure nodev option set on /home partition" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.14"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:mount -> r:\s/home\s && r:nodev' + + - id: 3012 + title: "Ensure nodev option set on /dev/shm partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.15"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:nodev' + + - id: 3013 + title: "Ensure nosuid option set on /dev/shm partition" + description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." + rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." + remediation: "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" + compliance: + - cis: ["1.1.16"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:nosuid' + + - id: 3014 + title: "Ensure noexec option set on /dev/shm partition" + description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.17"] + - cis_csc: ["2.6", "8"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:noexec' + + - id: 3015 + title: "Disable Automounting" + description: "autofs allows automatic mounting of devices, typically including CD/DVDs and USB drives." + rationale: "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." + remediation: "Run the following command to disable autofs: # systemctl disable autofs" + compliance: + - cis: ["1.1.21"] + - cis_csc: ["8.4", "8.5"] + condition: none + rules: + - 'c:systemctl is-enabled autofs -> r:^enabled' + +# 1.3 Filesystem Integrity Checking + - id: 3016 + title: "Ensure AIDE is installed" + description: "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." + rationale: "By monitoring the filesystem state compromised files can be detected to prevent or limit the exposure of accidental or malicious misconfigurations or modified binaries." + remediation: "Install AIDE: # apt-get install aide aide-common. Configure AIDE as appropriate for your environment. Consult the AIDE documentation for options. Initialize AIDE: # aideinit" + compliance: + - cis: ["1.3.1"] + - cis_csc: ["14.9"] + condition: all + rules: + - 'c:dpkg -s aide -> r:install ok installed' + + - id: 3017 + title: "Ensure filesystem integrity is regularly checked" + description: "Periodic checking of the filesystem integrity is needed to detect changes to the filesystem." + rationale: "Periodic file checking allows the system administrator to determine on a regular basis if critical files have been changed in an unauthorized fashion." + remediation: "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" + compliance: + - cis: ["1.3.2"] + - cis_csc: ["14.9"] + condition: all + rules: + - 'f:/etc/crontab -> r:\s*\t*/usr/sbin/aide\s*\t*|\s*\t*/usr/bin/aide\s*\t* && r:\s*\t*--check' + +# 1.4 Secure Boot Settings + - id: 3018 + title: "Ensure bootloader password is set" + description: "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." + rationale: "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)." + remediation: "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" + compliance: + - cis: ["1.4.2"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'f:/boot/grub/grub.cfg -> r:^\s*\t*set superusers' + - 'f:/boot/grub/grub.cfg -> r:^\s*\t*password' + + - id: 3019 + title: "Ensure authentication required for single user mode" + description: "Single user mode is used for recovery when the system detects an issue during boot or by manual selection from the bootloader." + rationale: "Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials." + remediation: "Run the following command and follow the prompts to set a password for the root user: # passwd root" + compliance: + - cis: ["1.4.3"] + - cis_csc: ["5.1"] + condition: none + rules: + - 'f:/etc/shadow -> r:^root:*:|^root:!:' + +# 1.5 Additional Process Hardening + - id: 3020 + title: "Ensure core dumps are restricted" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.5.1"] + - cis_csc: ["13"] + condition: all + rules: + - 'c:sysctl fs.suid_dumpable -> r:=\s*\t*0$' + - 'c:grep -Rh fs\.suid_dumpable /etc/sysctl.conf /etc/sysctl.d -> r:=\s*\t*0$' + - 'c:grep -Rh ^*[[:space:]]*hard[[:space:]][[:space:]]*core[[:space:]][[:space:]]* /etc/security/limits.conf /etc/security/limits.d -> r:\s*\t*0$' + + - id: 3021 + title: "Ensure address space layout randomization (ASLR) is enabled" + description: "Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process." + rationale: "Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting." + remediation: "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" + compliance: + - cis: ["1.5.3"] + - cis_csc: ["8.3"] + condition: all + rules: + - 'c:grep -Rh ^kernel\.randomize_va_space /etc/sysctl.conf /etc/sysctl.d -> r:\s*\t*2$' + - 'c:sysctl kernel.randomize_va_space -> r:^kernel.randomize_va_space\s*\t*=\s*\t*2' + +# 1.7 Warning Banners + - id: 3022 + title: "Ensure local login warning banner is configured properly" + description: "The contents of the /etc/issue file are displayed to users prior to login for local terminals. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: \\m - machine architecture \\r - operating system release \\s - operating system name \\v - operating system version" + rationale: "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." + remediation: "Edit the /etc/issue file with the appropriate contents according to your site policy, remove any instances of \\m , \\r , \\s , or \\v , or references to the OS platform # echo \"Authorized uses only. All activity may be monitored and reported.\" > /etc/issue" + compliance: + - cis: ["1.7.1.2"] + - cis_csc: ["5.1"] + condition: none + rules: + - 'f:/etc/issue -> r:\\v|\\r|\\m|\\s|Debian|Ubuntu' + + - id: 3023 + title: "Ensure GDM login banner is configured" + description: "GDM is the GNOME Display Manager which handles graphical login for GNOME based systems." + rationale: "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." + remediation: "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.'" + compliance: + - cis_csc: ["5.1"] + - cis: ["1.7.2"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:/etc/gdm3/greeter.dconf-defaults -> r:^[org/gnome/login-screen]' + - 'f:/etc/gdm3/greeter.dconf-defaults -> r:^banner-message-enable=true' + - 'f:/etc/gdm3/greeter.dconf-defaults -> r:^banner-message-text=\.+' + +# 2 Services + - id: 3024 + title: "Ensure xinetd is not installed" + description: "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." + rationale: "If there are no xinetdservices required, it is recommended that the daemon be disabled." + remediation: "Run the following commands to remove xinetd: # apt-get remove xinetd # apt-get purge xinetd" + compliance: + - cis: ["2.1.1"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'c:dpkg -s xinetd -> r:install ok installed' + + - id: 3025 + title: "Ensure openbsd-inetd is not installed" + description: "The inetd daemon listens for well known services and dispatches the appropriate daemon to properly respond to service requests." + rationale: "If there are no inetd services required, it is recommended that the daemon be removed." + remediation: "Run the following command to uninstall openbsd-inetd: apt-get remove openbsd-inetd" + compliance: + - cis: ["2.1.2"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'c:dpkg -s openbsd-inetd -> r:install ok installed' + - 'c:dpkg -s inetutils-inetd -> r:install ok installed' + + - id: 3026 + title: "Ensure ntp is configured" + description: "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." + rationale: "If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly." + remediation: "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 Configure ntp to run as the ntp user by adding or editing the /etc/init.d/ntp file: RUNASUSER=ntp" + compliance: + - cis: ["2.2.1.2"] + - cis_csc: ["6.1"] + references: + - http://www.ntp.org/ + condition: all + rules: + - 'f:/etc/ntp.conf -> r:^restrict\s+-4\s+default|^restrict\s+default && r:\s+kod\s+ && r:\s+nomodify\s+ && r:\s+notrap\s+ && r:\s+nopeer\s+ && r:\s+noquery\s+' + - 'f:/etc/ntp.conf -> r:^restrict\s+-6\s+default && r:\s+kod\s+ && r:\s+nomodify\s+ && r:\s+notrap\s+ && r:\s+nopeer\s+ && r:\s+noquery\s+' + - 'f:/etc/ntp.conf -> r:^server\.+$|^pool\.+$' + - 'f:/etc/ntp.conf -> r:^server\s\.+' + - 'f:/etc/init.d/ntp -> r:^RUNASUSER\s*\t*=\s*\t*ntp' + - id: 3027 + title: "Ensure chrony is configured" + description: "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." + rationale: "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." + remediation: "Add or edit server or pool lines to /etc/chrony/chrony.conf as appropriate: server " + compliance: + - cis: ["2.2.1.3"] + - cis_csc: ["6.1"] + condition: all + rules: + - 'f:/etc/chrony.conf -> r:^server\.+$|^pool\.+$' + + - id: 3028 + title: "Ensure Avahi Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable avahi-daemon: # systemctl disable avahi-daemon" + compliance: + - cis: ["2.2.3"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'c:systemctl is-enabled avahi-daemon -> r:^enabled' + + - id: 3029 + title: "Ensure CUPS is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable cups: # systemctl disable cups" + compliance: + - cis: ["2.2.4"] + - cis_csc: ["9.2"] + references: + - https://www.cups.org + condition: none + rules: + - 'c:systemctl is-enabled cups -> r:^enabled' + + - id: 3030 + title: "Ensure DHCP Server is not enabled" + description: "The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses." + rationale: "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." + remediation: "Run the following commands to disable dhcpd: # systemctl disable isc-dhcp-server # systemctl disable isc-dhcp-server6" + references: + - https://www.isc.org/dhcp/ + compliance: + - cis: ["2.2.5"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'c:systemctl is-enabled isc-dhcp-server -> r:^enabled' + - 'c:systemctl is-enabled isc-dhcp-server6 -> r:^enabled' + + - id: 3031 + title: "Ensure LDAP server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable slapd: # systemctl disable slapd" + compliance: + - cis: ["2.2.6"] + - cis_csc: ["9.2"] + references: + - https://www.openldap.org + condition: none + rules: + - 'c:systemctl is-enabled slapd -> r:^enabled' + + - id: 3032 + title: "Ensure NFS and RPC are not enabled" + description: "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." + rationale: "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." + remediation: "Run the following commands to disable nfs and rpcbind: # systemctl disable nfs-server # systemctl disable rpcbind" + compliance: + - cis: ["2.2.7"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'c:systemctl is-enabled nfs-server -> r:^enabled' + - 'c:systemctl is-enabled rpcbind -> r:^enabled' + + - id: 3033 + title: "Ensure DNS Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable named: # systemctl disable bind9" + compliance: + - cis: ["2.2.8"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'c:systemctl is-enabled bind9 -> r:^enabled' + + - id: 3034 + title: "Ensure FTP Server is not enabled" + description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." + rationale: "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." + remediation: "Run the following command to disable vsftpd: # systemctl disable vsftpd" + compliance: + - cis: ["2.2.9"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'c:systemctl is-enabled vsftpd -> r:^enabled' + + - id: 3035 + title: "Ensure HTTP Server is not enabled" + description: "HTTP or web servers provide the ability to host web site content." + rationale: "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." + remediation: "Run the following command to disable apache2: # systemctl disable apache2" + compliance: + - cis: ["2.2.10"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'c:systemctl is-enabled apache2 -> r:^enabled' + + - id: 3036 + title: "Ensure IMAP and POP3 server is not enabled" + description: "exim is an open source IMAP and POP3 server for Linux based systems." + rationale: "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." + remediation: "Run the following commands to remove exim: # apt-get remove exim4; # apt-get purge exim4" + compliance: + - cis_csc: ["9.2"] + - cis: ["2.2.11"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:dpkg -s exim4 -> install ok installed' + + - id: 3037 + title: "Ensure Samba is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable smbd: # systemctl disable smbd" + compliance: + - cis: ["2.2.12"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'c:systemctl is-enabled smbd -> r:^enabled' + + - id: 3038 + title: "Ensure HTTP Proxy Server is not enabled" + description: "Squid is a standard proxy server used in many distributions and environments." + rationale: "If there is no need for a proxy server, it is recommended that the squid proxy be deleted to reduce the potential attack surface." + remediation: "Run the following command to disable squid: # systemctl disable squid" + compliance: + - cis: ["2.2.13"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'c:systemctl is-enabled squid -> r:^enabled' + + - id: 3039 + title: "Ensure SNMP Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable snmpd: # systemctl disable snmpd" + compliance: + - cis: ["2.2.14"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'c:systemctl is-enabled snmpd -> r:^enabled' + + - id: 3040 + title: "Ensure rsync service is not enabled" + description: "The rsyncd service can be used to synchronize files between systems over network links." + rationale: "The rsyncd service presents a security risk as it uses unencrypted protocols for communication." + remediation: "Run the following command to disable rsync: # systemctl disable rsync" + compliance: + - cis: ["2.2.16"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'c:systemctl is-enabled rsync -> r:^enabled' + + - id: 3041 + title: "Ensure NIS Server is not enabled" + description: "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." + rationale: "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" + remediation: "Run the following command to disable nis: # systemctl disable nis" + compliance: + - cis_csc: ["9.2"] + - cis: ["2.2.17"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled nis -> r:^enabled' + + - id: 3042 + title: "Ensure NIS Client is not installed" + description: "The Network Information Service (NIS), formerly known as Yellow Pages, is a client-server directory service protocol used to distribute system configuration files." + rationale: "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." + remediation: "Uninstall the nis package: # apt-get remove nis" + compliance: + - cis: ["2.3.1"] + - cis_csc: ["2.6"] + condition: none + rules: + - 'c:dpkg -s nis -> r:install ok installed' + + - id: 3043 + title: "Ensure rsh client is not installed" + description: "The rshpackage contains the client commands for the rsh services." + rationale: "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." + remediation: "Run the following command to uninstall rsh: apt-get remove rsh-client rsh-redone-client" + compliance: + - cis: ["2.3.2"] + - cis_csc: ["2.6", "4.5"] + condition: none + rules: + - 'c:dpkg -s rsh-client -> r:install ok installed' + - 'c:dpkg -s rsh-redone-client -> r:install ok installed' + + - id: 3044 + title: "Ensure talk client is not installed" + description: "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." + rationale: "The software presents a security risk as it uses unencrypted protocols for communication." + remediation: "Run the following command to uninstall talk: apt-get remove talk" + compliance: + - cis: ["2.3.3"] + - cis_csc: ["2.6"] + condition: none + rules: + - 'c:dpkg -s talk -> r:install ok installed' + + - id: 3045 + title: "Ensure telnet client is not installed" + description: "The telnet package contains the telnet client, which allows users to start connections to other systems via the telnet protocol." + rationale: "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." + remediation: "Run the following command to uninstall telnet: # apt-get remove telnet" + compliance: + - cis: ["2.3.4"] + - cis_csc: ["2.6", "4.5"] + condition: none + rules: + - 'c:dpkg -s telnet -> r:install ok installed' + +# 3 Network Configuration + - id: 3046 + title: "Ensure IP forwarding is disabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.1.1"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.ip_forward -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv4\.ip_forward /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4_forward\s*=\s*0$' + - 'c:sysctl net.ipv6.conf.all.forwarding -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv6\.conf\.all\.forwarding /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv6.conf.all.forwarding\s*=\s*0$' + + - id: 3047 + title: "Ensure packet redirect sending is disabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.1.2"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.send_redirects -> r:=\s*\t*0$' + - 'c:sysctl net.ipv4.conf.default.send_redirects -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.send_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.send_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.send_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.send_redirects\s*=\s*0$' + + - id: 3048 + title: "Ensure source routed packets are not accepted" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.1"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.accept_source_route -> r:=\s*\t*0$' + - 'c:sysctl net.ipv4.conf.default.accept_source_route -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.accept_source_route\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.accept_source_route\s*=\s*0$' + - 'c:sysctl net.ipv6.conf.all.accept_source_route -> r:=\s*\t*0$' + - 'c:sysctl net.ipv6.conf.default.accept_source_route -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv6\.conf\.all\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv6.conf.all.accept_source_route\s*=\s*0$' + - 'c:grep -Rh net\.ipv6\.conf\.default\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv6.conf.default.accept_source_route\s*=\s*0$' + + - id: 3049 + title: "Ensure ICMP redirects are not accepted" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.2"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.accept_redirects -> r:=\s*\t*0$' + - 'c:sysctl net.ipv4.conf.default.accept_redirects -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.accept_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.accept_redirects\s*=\s*0$' + - 'c:sysctl net.ipv6.conf.all.accept_redirects -> r:=\s*\t*0$' + - 'c:sysctl net.ipv6.conf.default.accept_redirects -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv6\.conf\.all\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv6.conf.all.accept_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv6\.conf\.default\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv6.conf.default.accept_redirects\s*=\s*0$' + + - id: 3050 + title: "Ensure secure ICMP redirects are not accepted" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.3"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.secure_redirects -> r:=\s*\t*0$' + - 'c:sysctl net.ipv4.conf.default.secure_redirects -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.secure_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.secure_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.secure_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.secure_redirects\s*=\s*0$' + + - id: 3051 + title: "Ensure suspicious packets are logged" + description: "When enabled, this feature logs packets with un-routable source addresses to the kernel log." + rationale: "Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their server." + remediation: "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" + compliance: + - cis: ["3.2.4"] + - cis_csc: ["6.2", "6.3"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.log_martians -> r:=\s*\t*1$' + - 'c:sysctl net.ipv4.conf.default.log_martians -> r:=\s*\t*1$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.log_martians /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.log_martians\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.log_martians /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.log_martians\s*=\s*1$' + + - id: 3052 + title: "Ensure broadcast ICMP requests are ignored" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.5"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.icmp_echo_ignore_broadcasts -> r:=\s*\t*1$' + - 'c:grep -Rh net\.ipv4\.icmp_echo_ignore_broadcasts /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.icmp_echo_ignore_broadcasts\s*=\s*1$' + + - id: 3053 + title: "Ensure bogus ICMP responses are ignored" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.6"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.icmp_ignore_bogus_error_responses -> r:=\s*\t*1$' + - 'c:grep -Rh net\.ipv4\.icmp_ignore_bogus_error_responses /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.icmp_ignore_bogus_error_responses\s*=\s*1$' + + - id: 3054 + title: "Ensure Reverse Path Filtering is enabled" + description: "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)." + rationale: 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. + remediation: "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" + compliance: + - cis: ["3.2.7"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.rp_filter -> r:=\s*\t*1$' + - 'c:sysctl net.ipv4.conf.default.rp_filter -> r:=\s*\t*1$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.rp_filter /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.rp_filter\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.rp_filter /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.rp_filter\s*=\s*1$' + + - id: 3055 + title: "Ensure TCP SYN Cookies is enabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.8"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.tcp_syncookies -> r:=\s*\t*1$' + - 'c:grep -Rh net\.ipv4\.tcp_syncookies /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.tcp_syncookies\s*=\s*1$' + + - id: 3056 + title: "Ensure IPv6 router advertisements are not accepted" + description: "This setting disables the systems ability to accept router advertisements" + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.9"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:sysctl net.ipv6.conf.all.accept_ra -> r:=\s*\t*0$' + - 'c:sysctl net.ipv6.conf.default.accept_ra -> r:=\s*\t*0$' + - 'c:grep -Rh net\.ipv6\.conf\.all\.accept_ra /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv6.conf.all.accept_ra\s*=\s*0$' + - 'c:grep -Rh net\.ipv6\.conf\.default\.accept_ra /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv6.conf.default.accept_ra\s*=\s*0$' + + - id: 3057 + title: "Ensure /etc/hosts.allow is configured" + description: "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." + rationale: "The /etc/hosts.allow file supports access control by IP and helps ensure that only authorized systems can connect to the system." + remediation: "Run the following command to create /etc/hosts.allow: # echo \"ALL: /, /, ...\" >/etc/hosts.allow. Where each / combination (for example, \"192.168.1.0/255.255.255.0\") represents one network block in use by your organization that requires access to this system." + compliance: + - cis: ["3.3.2"] + - cis_csc: ["9.4"] + condition: all + rules: + - 'f:/etc/hosts.allow' + + - id: 3058 + title: "Ensure /etc/hosts.deny is configured" + description: "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." + rationale: "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." + remediation: "Run the following command to create /etc/hosts.deny: # echo \"ALL: ALL\" >> /etc/hosts.deny" + compliance: + - cis: ["3.3.3"] + - cis_csc: ["9.4"] + condition: all + rules: + - 'f:/etc/hosts.deny' + - 'f:/etc/hosts.deny -> r:^ALL:\s*ALL' + + - id: 3059 + title: "Ensure DCCP is disabled" + description: "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." + rationale: "If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface." + remediation: "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" + compliance: + - cis: ["3.4.1"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'not c:modprobe -n -v dccp -> r:install /bin/true' + - 'c:lsmod -> r:dccp' + + - id: 3060 + title: "Ensure SCTP is disabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.4.2"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'not c:modprobe -n -v sctp -> r:install /bin/true' + - 'c:lsmod -> r:sctp' + + - id: 3061 + title: "Ensure RDS is disabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.4.3"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'not c:modprobe -n -v rds -> r:install /bin/true' + - 'c:lsmod -> r:rds' + + - id: 3062 + title: "Ensure TIPC is disabled" + description: "The Transparent Inter-Process Communication (TIPC) protocol is designed to provide communication between cluster nodes." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.4.4"] + - cis_csc: ["9.2"] + condition: none + rules: + - 'not c:modprobe -n -v tipc -> r:install /bin/true' + - 'c:lsmod -> r:tipc' + +# 3.5 Firewall configuration + + - id: 3063 + title: "Ensure default deny firewall policy" + description: "A default deny all policy on connections ensures that any unconfigured network usage will be rejected." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.5.1.1"] + - cis_csc: ["9.4"] + condition: all + rules: + - 'c:iptables -L -> r:^Chain INPUT && r:policy DROP' + - 'c:iptables -L -> r:^Chain FORWARD && r:policy DROP' + - 'c:iptables -L -> r:^Chain OUTPUT && r:policy DROP' + + - id: 3064 + title: "Ensure IPv6 default deny firewall policy" + description: "A default deny all policy on connections ensures that any unconfigured network usage will be rejected." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.5.2.1"] + - cis_csc: ["9.4"] + condition: all + rules: + - 'c:ip6tables -L -> r:^Chain INPUT && r:policy DROP' + - 'c:ip6tables -L -> r:^Chain FORWARD && r:policy DROP' + - 'c:ip6tables -L -> r:^Chain OUTPUT && r:policy DROP' + + - id: 3065 + title: "Ensure iptables is installed" + description: "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." + rationale: "iptables is required for firewall management and configuration." + remediation: "Run the following command to install iptables: # apt-get install iptables" + compliance: + - cis: ["3.5.3"] + - cis_csc: ["9.4"] + condition: all + rules: + - 'c:dpkg -s iptables -> r:install ok installed' + +# 4 Logging and Auditing + - id: 3066 + title: "Ensure rsyslog Service is enabled" + description: "Once the rsyslog package is installed it needs to be activated." + rationale: "If the rsyslog service is not activated the system will not have a syslog service running." + remediation: "Run the following command to enable rsyslog: # systemctl enable rsyslog" + compliance: + - cis: ["4.2.1.1"] + - cis_csc: ["6.2", "6.3"] + condition: all + rules: + - 'c:systemctl is-enabled rsyslog -> r:^enabled' + + - id: 3067 + title: "Ensure rsyslog is configured to send logs to a remote log host" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["4.2.1.4"] + - cis_csc: ["6.6", "6.8"] + references: + - rsyslog.conf(5) man page + condition: all + rules: + - 'c:grep -Rh ^*.*[^I][^I]*@ /etc/rsyslog.conf /etc/rsyslog.d/ -> r:^*.* @@\.+' + + - id: 3068 + title: "Ensure remote rsyslog messages are only accepted on designated log hosts" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["4.2.1.5"] + - cis_csc: ["9.2"] + references: + - rsyslog.conf(8) man page + condition: all + rules: + - 'c:grep -Rh ^\$ModLoad[[:space:]]*imtcp /etc/rsyslog.conf /etc/rsyslog.d/ -> r:^\$ModLoad\s*\t*imtcp' + - 'c:grep -Rh ^\$InputTCPServerRun /etc/rsyslog.conf /etc/rsyslog.d/ -> r:^\$InputTCPServerRun\s*\t*514' + +# 5 Access, Authentication and Authorization + - id: 3069 + title: "Ensure cron daemon is enabled" + description: "The cron daemon is used to execute batch jobs on the system." + rationale: "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." + remediation: "Run the following command to enable cron: systemctl enable cron" + compliance: + - cis: ["5.1.1"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:systemctl is-enabled cron -> r:^enabled$' + + - id: 3070 + title: "Ensure at/cron is restricted to authorized users" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["5.1.8"] + - cis_csc: ["16"] + condition: all + rules: + - 'f:/etc/cron.allow' + - 'f:/etc/at.allow' + - 'not f:/etc/cron.deny' + - 'not f:/etc/at.deny' + - 'c:stat -c%u-%g-%a /etc/cron.allow -> r:^0-0-600' + - 'c:stat -c%u-%g-%a /etc/at.allow -> r:^0-0-600' + + - id: 3071 + title: "Ensure permissions on /etc/ssh/sshd_config are configured" + description: "The /etc/ssh/sshd_config file contains configuration specifications for sshd. The command below sets the owner and group of the file to root." + rationale: "The /etc/ssh/sshd_config file needs to be protected from unauthorized changes by non- privileged users." + remediation: "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" + compliance: + - cis: ["5.2.1"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:stat -c%u-%g-%a /etc/ssh/sshd_config -> r:^0-0-600' + + - id: 3072 + title: "Ensure SSH Protocol is set to 2" + description: "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." + rationale: "SSH v1 suffers from insecurities that do not affect SSH v2." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" + compliance: + - cis: ["5.2.4"] + - cis_csc: ["14.4"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:Protocol\s*\t*2' + + - id: 3073 + title: "Ensure SSH LogLevel is appropriate" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel VERBOSE or LogLevel INFO" + references: + - https://www.ssh.com/ssh/sshd_config/ + compliance: + - cis: ["5.2.5"] + - cis_csc: ["6.2", "6.3"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:LogLevel\s+INFO|LogLevel\s+VERBOSE' + + - id: 3074 + title: "Ensure SSH X11 forwarding is disabled" + description: "The X11Forwarding parameter provides the ability to tunnel X11 traffic through the connection to enable remote graphic connections." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_configfile to set the parameter as follows: X11Forwarding no" + compliance: + - cis: ["5.2.6"] + - cis_csc: ["9.2"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:X11Forwarding\s+no' + + - id: 3075 + title: "Ensure SSH MaxAuthTries is set to 4 or less" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4" + compliance: + - cis: ["5.2.7"] + - cis_csc: ["16.13"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && n:MaxAuthTries\s*\t*(\d+) compare <= 4' + + - id: 3076 + title: "Ensure SSH IgnoreRhosts is enabled" + description: "The IgnoreRhosts parameter specifies that .rhostsand .shostsfiles will not be used in RhostsRSAAuthenticationor HostbasedAuthentication." + rationale: "Setting this parameter forces users to enter a password when authenticating with ssh." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" + compliance: + - cis: ["5.2.8"] + - cis_csc: ["9.2"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:IgnoreRhosts\s+yes' + + - id: 3077 + title: "Ensure SSH HostbasedAuthentication is disabled" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" + compliance: + - cis: ["5.2.9"] + - cis_csc: ["16.3"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:HostbasedAuthentication\s+no' + + - id: 3078 + title: "Ensure SSH root login is disabled" + description: "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 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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" + compliance: + - cis: ["5.2.10"] + - cis_csc: ["4.3"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:PermitRootLogin\s+no' + +# 5.2 SSH Server Configuration + + - id: 3079 + title: "Ensure SSH PermitEmptyPasswords is disabled" + description: "The PermitEmptyPasswords parameter specifies if the server allows login to accounts with empty password strings." + rationale: "Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system" + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" + compliance: + - cis: ["5.2.11"] + - cis_csc: ["16.3"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:PermitEmptyPasswords\s+no' + + - id: 3080 + title: "Ensure SSH PermitUserEnvironment is disabled" + description: "The PermitUserEnvironment option allows users to present environment options to the ssh daemon." + rationale: "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)" + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitUserEnvironment no" + compliance: + - cis: ["5.2.12"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:PermitUserEnvironment\s+no' + + - id: 3081 + title: "Ensure SSH Idle Timeout Interval is configured" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameters according to site policy: ClientAliveInterval 300 ClientAliveCountMax 0" + compliance: + - cis: ["5.2.16"] + - cis_csc: ["16.11"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && n:ClientAliveInterval\s*\t*(\d+) compare <= 300 && n:ClientAliveInterval\s*\t*(\d+) compare != 0' + - 'f:/etc/ssh/sshd_config -> !r:^# && n:ClientAliveCountMax\s*\t*(\d+) compare <= 3' + + - id: 3082 + title: "Ensure SSH access is limited" + description: "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." + rationale: "Restricting which users can remotely access the system via SSH will help ensure that only authorized users access the system." + remediation: "Edit the /etc/ssh/sshd_config file to set one or more of the parameter as follows: AllowUsers AllowGroups DenyUsers DenyGroups " + compliance: + - cis: ["5.2.18"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:AllowUsers\s+\w+|AllowGroups\s+\w+|DenyUsers\s+\w+|DenyGroups\s+\w+' + + - id: 3083 + title: "Ensure SSH warning banner is configured" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Banner /etc/issue.net" + compliance: + - cis: ["5.2.19"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:Banner\s*\t*/etc/issue.net|Banner\s\t*/etc/issue' + +# 5.3 Configure PAM + + - id: 3084 + title: "Ensure password creation requirements are configured" + description: "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.)" + rationale: "Strong passwords protect systems from being hacked through brute force methods." + remediation: "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." + compliance: + - cis: ["5.3.1"] + - cis_csc: ["4.4"] + condition: all + rules: + - 'c:dpkg -s libpam-pwquality -> install ok installed' + - 'f:/etc/pam.d/common-password -> !r:^# && r:password\s*\t*requisite\s*\t*pam_pwquality.so\s*\t*retry=\d' + - 'f:/etc/security/pwquality.conf -> !r:^# && n:minlen\s*\t*=\s*\t*(\d+) compare >= 14' + - 'f:/etc/security/pwquality.conf -> !r:^# && r:dcredit' + - 'f:/etc/security/pwquality.conf -> !r:^# && r:ucredit' + - 'f:/etc/security/pwquality.conf -> !r:^# && r:ocredit' + - 'f:/etc/security/pwquality.conf -> !r:^# && r:lcredit' + + - id: 3085 + title: "Ensure lockout for failed password attempts is configured" + description: "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." + rationale: "Locking out user IDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems." + remediation: "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 --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." + compliance: + - cis: ["5.3.2"] + - cis_csc: ["16.7"] + condition: all + rules: + - 'f:/etc/pam.d/common-auth -> !r:^# && r:auth\s*\t*required\s*\t*pam_tally2.so && r:onerr=fail && r:audit && r:silent && r:deny\s*=\s*\d && r:unlock_time\s*=\s*\d\d\d+' + + - id: 3086 + title: "Ensure password reuse is limited" + description: "The /etc/security/opasswd file stores the users' old passwords and can be checked to ensure that users are not recycling recent passwords." + rationale: "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." + remediation: "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." + compliance: + - cis: ["5.3.3"] + - cis_csc: ["16"] + condition: all + rules: + - 'f:/etc/pam.d/common-password -> !r:^# && r:password\s*\t*required\s*\t*pam_pwhistory.so && n:remember\s*\t*=\s*\t*(\d+) compare >= 5' + +# 5.4 User Accounts and Environment + + - id: 3087 + title: "Ensure password expiration is 365 days or less" + description: "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." + rationale: "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." + remediation: "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 . 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." + compliance: + - cis: ["5.4.1.1"] + - cis_csc: ["4.4", "16"] + condition: all + rules: + - 'f:/etc/login.defs -> n:^\s*\t*PASS_MAX_DAYS\s*\t*(\d+) compare <= 365' + + - id: 3088 + title: "Ensure minimum days between password changes is 7 or more" + description: "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." + rationale: "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." + remediation: "Set the PASS_MIN_DAYS parameter to 7 in /etc/login.defs: PASS_MIN_DAYS 7. Modify user parameters for all users with a password set to match: # chage --mindays 7 . Notes: You can also check this setting in /etc/shadow directly. The 4th field should be 7 or more for all users with a password." + compliance: + - cis: ["5.4.1.2"] + - cis_csc: ["4.4", "16"] + condition: all + rules: + - 'f:/etc/login.defs -> n:^\s*\t*PASS_MIN_DAYS\s*\t*(\d+) compare >= 7' + + - id: 3089 + title: "Ensure password expiration warning days is 7 or more" + description: "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." + rationale: "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." + remediation: "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 . 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." + compliance: + - cis: ["5.4.1.3"] + - cis_csc: ["4.4", "16"] + condition: all + rules: + - 'f:/etc/login.defs -> n:^\s*\t*PASS_WARN_AGE\s*\t*(\d+) compare >= 7' + + - id: 3090 + title: "Ensure inactive password lock is 30 days or less" + description: "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." + rationale: "Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies." + remediation: "Run the following command to set the default password inactivity period to 30 days: # useradd -D -f 30. Modify user parameters for all users with a password set to match: # chage --inactive 30 . Notes: You can also check this setting in /etc/shadow directly. The 7th field should be 30 or less for all users with a password. A value of -1 would disable this setting." + compliance: + - cis: ["5.4.1.4"] + - cis_csc: ["4.4", "16"] + condition: all + rules: + - 'c:useradd -D -> n:^INACTIVE=(\d+) compare <= 30' + + - id: 3091 + title: "Ensure default group for the root account is GID 0" + description: "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." + rationale: "Using GID 0 for the root account helps prevent root-owned files from accidentally becoming accessible to non-privileged users." + remediation: "Run the following command to set the root user default group to GID 0: # usermod -g 0 root" + compliance: + - cis: ["5.4.3"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'f:/etc/passwd -> !r:^# && r:root:\w+:\w+:0:' + + - id: 3092 + title: "Ensure access to the su command is restricted" + description: "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." + rationale: "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." + remediation: "Add the following line to the /etc/pam.d/su file: auth required pam_wheel.so Create a comma separated list of users in the sudo statement in the /etc/group file: sudo:x:10:root," + compliance: + - cis: ["5.6"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'f:/etc/pam.d/su -> !r:^# && r:auth\s*\t*required\s*\t*pam_wheel.so' + - 'f:/etc/group -> !r:^# && r:sudo:\w+:\d+:\.' + +# 6.2 User and Group Settings + + - id: 3093 + title: "Ensure password fields are not empty" + description: "An account with an empty password field means that anybody may log in as that user without providing a password." + rationale: "All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user." + remediation: "If any accounts in the /etc/shadow file do not have a password, run the following command to lock the account until it can be determined why it does not have a password: # passwd -l . Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off." + compliance: + - cis: ["6.2.1"] + - cis_csc: ["4.4"] + condition: none + rules: + - 'f:/etc/shadow -> r:^\w+::' + + - id: 3094 + title: "Ensure no legacy \"+\" entries exist in /etc/passwd" + description: "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." + rationale: "These entries may provide an avenue for attackers to gain privileged access on the system." + remediation: "Remove any legacy + entries from /etc/passwd if they exist." + compliance: + - cis: ["6.2.2"] + - cis_csc: ["16.2"] + condition: none + rules: + - 'f:/etc/passwd -> !r:^# && r:^+:' + + - id: 3095 + title: "Ensure no legacy \"+\" entries exist in /etc/shadow" + description: "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." + rationale: "These entries may provide an avenue for attackers to gain privileged access on the system." + remediation: "Remove any legacy + entries from /etc/shadow if they exist." + compliance: + - cis: ["6.2.3"] + - cis_csc: ["16.2"] + condition: none + rules: + - 'f:/etc/shadow -> !r:^# && r:^+:' + + - id: 3096 + title: "Ensure no legacy \"+\" entries exist in /etc/group" + description: "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." + rationale: "These entries may provide an avenue for attackers to gain privileged access on the system." + remediation: "Remove any legacy + entries from /etc/group if they exist." + compliance: + - cis: ["6.2.4"] + - cis_csc: ["16.2"] + condition: none + rules: + - 'f:/etc/group -> !r:^# && r:^+:' + + - id: 3097 + title: "Ensure root is the only UID 0 account" + description: "Any account with UID 0 has superuser privileges on the system." + rationale: "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." + remediation: "Remove any users other than root with UID 0 or assign them a new UID if appropriate." + compliance: + - cis: ["6.2.5"] + - cis_csc: ["5.1"] + condition: none + rules: + - 'f:/etc/passwd -> !r:^# && !r:^root: && r:^\w+:\w+:0:' + + - id: 3098 + title: "Ensure shadow group is empty" + description: "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." + rationale: "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." + remediation: "Remove all users from the shadow group, and change the primary group of any users with shadow as their primary group." + compliance: + - cis: ["6.2.20"] + - cis_csc: ["5.1"] + condition: none + rules: + - 'f:/etc/group -> !r:^# && r:shadow:\w*:\w*:\S+' diff --git a/sca/debian/cis_debian9_L2.yml b/sca/debian/cis_debian9_L2.yml new file mode 100644 index 000000000..09157c062 --- /dev/null +++ b/sca/debian/cis_debian9_L2.yml @@ -0,0 +1,464 @@ +# Security Configuration Assessment +# Level 2 CIS Checks for Debian Linux 9 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Debian Linux 9 Benchmark v1.0.0 - 12-21-2018 + +policy: + id: "cis_debian9_L2" + file: "cis_debian9_L2.yml" + name: "CIS benchmark for Debian/Linux 9 L2" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for Debian Linux 9." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check Debian version" + description: "Requirements for running the SCA scan against Debian/Ubuntu." + condition: all + rules: + - 'f:/etc/debian_version' + - 'f:/proc/sys/kernel/ostype -> Linux' + +checks: + + - id: 3500 + title: "Ensure separate partition exists for /var" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.6"] + - cis_csc: ["5.1"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var\s' + + - id: 3501 + title: "Ensure separate partition exists for /var/tmp" + description: "The /var/tmp directory is a world-writable directory used for temporary storage by all users and some applications." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.7"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'c:mount -> r:\s/var/tmp\s' + + - id: 3502 + title: "Ensure separate partition exists for /var/log" + description: "The /var/log directory is used by system services to store log data." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.11"] + - cis_csc: ["6.4"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var/log\s' + + - id: 3503 + title: "Ensure separate partition exists for /var/log/audit" + description: "The auditing daemon, auditd, stores log data in the /var/log/audit directory." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.12"] + - cis_csc: ["6.4"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var/log/audit\s' + + - id: 3504 + title: "Ensure separate partition exists for /home" + description: "The /home directory is used to support disk storage needs of local users." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.13"] + - cis_csc: ["5.1"] + references: + - http://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/home\s' + + - id: 3505 + title: "Disable Automounting" + description: "autofs allows automatic mounting of devices, typically including CD/DVDs and USB drives." + rationale: "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." + remediation: "Run the following command to disable autofs: # systemctl disable autofs" + compliance: + - cis: ["1.1.22"] + - cis_csc: ["8.3", "8.5"] + condition: none + rules: + - 'c:systemctl is-enabled autofs -> r:^enabled' + +# 4 Additional Process Hardening + - id: 3506 + title: "Ensure SELinux or AppArmor are installed" + description: "SELinux and AppArmor provide Mandatory Access Controls." + rationale: "Without a Mandatory Access Control system installed only the default Discretionary Access Control system will be available." + remediation: "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" + compliance: + - cis: ["1.6.3"] + - cis_csc: ["14.6"] + condition: any + rules: + - 'c:dpkg -s selinux-basics -> r:install ok installed' + - 'c:dpkg -s apparmor -> r:install ok installed' + +# 2 Services + + - id: 3507 + title: "Ensure CUPS is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable cups: # systemctl disable cups" + compliance: + - cis: ["2.2.4"] + - cis_csc: ["9.2"] + references: + - 'http://www.cups.org' + condition: none + rules: + - 'c:systemctl is-enabled cups -> r:^enabled' + +# 4 Logging and Auditing + + - id: 3508 + title: "Ensure audit log storage size is configured" + description: "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." + rationale: "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." + remediation: "Set the following parameter in /etc/audit/auditd.conf in accordance with site policy: max_log_file = Notes: The max_log_file parameter is measured in megabytes." + compliance: + - cis: ["4.1.1.1"] + - cis_csc: ["6.4"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/auditd.conf' + - 'f:/etc/audit/auditd.conf -> r:^\s*\t*max_log_file\s*\t*=\s*\t*\d+' + + - id: 3509 + title: "Ensure system is disabled when audit logs are full" + description: "The auditd daemon can be configured to halt the system when the audit logs are full." + rationale: "In high security contexts, the risk of detecting unauthorized access or nonrepudiation exceeds the benefit of the system's availability." + remediation: "Set the following parameters in /etc/audit/auditd.conf: space_left_action = email action_mail_acct = root admin_space_left_action = halt" + compliance: + - cis: ["4.1.1.2"] + - cis_csc: ["6.4"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/auditd.conf' + - 'f:/etc/audit/auditd.conf -> r:^\s*\t*action_mail_acct\s*\t*=\s*\t*root' + - 'f:/etc/audit/auditd.conf -> r:^\s*\t*space_left_action\s*\t*=\s*\t*email' + - 'f:/etc/audit/auditd.conf -> r:^\s*\t*admin_space_left_action\s*\t*=\s*\t*halt' + + - id: 3510 + title: "Ensure audit logs are not automatically deleted" + description: "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." + rationale: "In high security contexts, the benefits of maintaining a long audit history exceed the cost of storing the audit history." + remediation: "Set the following parameter in /etc/audit/auditd.conf: max_log_file_action = keep_logs" + compliance: + - cis: ["4.1.1.3"] + - cis_csc: ["6.4"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/auditd.conf' + - 'f:/etc/audit/auditd.conf -> r:^\s*\t*max_log_file_action\s*\t*=\s*\t*keep_logs' + + - id: 3511 + title: "Ensure auditd service is enabled" + description: "Turn on the auditd daemon to record system events." + rationale: "The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring." + remediation: "Run the following command to enable auditd: # systemctl enable auditd" + compliance: + - cis: ["4.1.2"] + - cis_csc: ["6.2", "6.3"] + condition: all + rules: + - 'c:systemctl is-enabled auditd -> r:^enabled' + + - id: 3512 + title: "Ensure auditing for processes that start prior to auditd is enabled" + description: "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." + rationale: "Audit events need to be captured on processes that start up prior to auditd, so that potential malicious activity cannot go undetected." + remediation: "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." + compliance: + - cis: ["4.1.3"] + - cis_csc: ["6.2", "6.3"] + condition: all + rules: + - 'f:/etc/default/grub -> r:^GRUB_CMDLINE_LINUX\s*=\s*\.*audit\s*=\s*1\.*' + + - id: 3513 + title: "Ensure events that modify date and time information are collected" + description: "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\"" + rationale: "Unexpected changes in system date and/or time could be a sign of malicious activity on the system." + remediation: "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" + compliance: + - cis: ["4.1.4"] + - cis_csc: ["5.5"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S adjtimex && r:-S settimeofday && r:-S stime && r:-k time-change' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S clock_settime && r:-k time-change' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S adjtimex && r:-S settimeofday && r:-k time-change' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S clock_settime && r:-k time-change' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/localtime && r:-p wa && r:-k time-change' + + - id: 3514 + title: "Ensure events that modify user/group information are collected" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.1.5"] + - cis_csc: ["4.8"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/group && r:-p wa && r:-k identity' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/passwd && r:-p wa && r:-k identity' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/gshadow && r:-p wa && r:-k identity' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/shadow && r:-p wa && r:-k identity' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/security/opasswd && r:-p wa && r:-k identity' + + - id: 3515 + title: "Ensure events that modify the system's network environment are collected" + description: "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." + rationale: "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.\"" + remediation: "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." + compliance: + - cis: ["4.1.6"] + - cis_csc: ["5.5"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:exit,always|always,exit && r:-F arch=b32 && r:-S sethostname && r:-S setdomainname && r:-k system-locale' + - 'f:/etc/audit/audit.rules -> r:^-a && r:exit,always|always,exit && r:-F arch=b64 && r:-S sethostname && r:-S setdomainname && r:-k system-locale' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/issue && r:-p wa && r:-k system-locale' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/issue.net && r:-p wa && r:-k system-locale' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/hosts && r:-p wa && r:-k system-locale' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/sysconfig/network && r:-p wa && r:-k system-locale' + + - id: 3516 + title: "Ensure events that modify the system's Mandatory Access Controls are collected (SELinux)" + description: "Monitor SELinux 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/selinux directory." + rationale: "Changes to files in that directory could indicate that an unauthorized user is attempting to modify access controls and change security contexts, leading to a compromise of the system." + remediation: "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. Notes: Reloading the auditd config to set active settings may require a system reboot." + compliance: + - cis: ["4.1.7"] + - cis_csc: ["5.5"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/selinux/ && r:-p wa && r:-k MAC-policy' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/usr/share/selinux/ && r:-p wa && r:-k MAC-policy' + + - id: 3517 + title: "Ensure events that modify the system's Mandatory Access Controls are collected (AppArmor)" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.1.7"] + - cis_csc: ["5.5"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/apparmor/ && r:-p wa && r:-k MAC-policy' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/apparmor.d/ && r:-p wa && r:-k MAC-policy' + + - id: 3518 + title: "Ensure login and logout events are collected" + description: "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" + rationale: "Monitoring login/logout events could provide a system administrator with information associated with brute force attacks against user logins." + remediation: "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." + compliance: + - cis: ["4.1.8"] + - cis_csc: ["4.9, 16.11", "16.13"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/var/log/faillog && r:-p wa && r:-k logins' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/var/log/lastlog && r:-p wa && r:-k logins' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/var/log/tallylog && r:-p wa && r:-k logins' + + - id: 3519 + title: "Ensure session initiation information is collected" + description: "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.\"" + rationale: "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)." + remediation: "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." + compliance: + - cis: ["4.1.9"] + - cis_csc: ["4.9, 16.11", "16.13"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/var/run/utmp && r:-p wa && r:-k session' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/var/log/wtmp && r:-p wa && r:-k logins' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/var/log/btmp && r:-p wa && r:-k logins' + + - id: 3520 + title: "Ensure discretionary access control permission modification events are collected" + description: "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.\"" + rationale: "Monitoring for changes in file attributes could alert a system administrator to activity that could indicate intruder activity or policy violation." + remediation: "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." + compliance: + - cis: ["4.1.10"] + - cis_csc: ["5.5"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S chmod && r:-S fchmod && r:-S fchmodat && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S chmod && r:-S fchmod && r:-S fchmodat && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S chown && r:-S fchown && r:-S fchownat && r:-S lchown && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S chown && r:-S fchown && r:-S fchownat && r:-S lchown && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S setxattr && r:-S lsetxattr && r:-S fsetxattr && r:-S removexattr && r:-S lremovexattr && r:-S fremovexattr && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S setxattr && r:-S lsetxattr && r:-S fsetxattr && r:-S removexattr && r:-S lremovexattr && r:-S fremovexattr && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k perm_mod' + + - id: 3521 + title: "Ensure unsuccessful unauthorized file access attempts are collected" + description: "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.\"" + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.1.11"] + - cis_csc: ["14.9"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S creat && r:-S open && r:-S openat && r:-S truncate && r:-F exit=-EACCES && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k access' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S creat && r:-S open && r:-S openat && r:-S truncate && r:-F exit=-EACCES && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k access' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S creat && r:-S open && r:-S openat && r:-S truncate && r:-F exit=-EPERM && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k access' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S creat && r:-S open && r:-S openat && r:-S truncate && r:-F exit=-EPERM && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k access' + + - id: 3522 + title: "Ensure successful file system mounts are collected" + description: "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." + rationale: "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." + remediation: "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. 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." + compliance: + - cis: ["4.1.13"] + - cis_csc: ["13"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S mount && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k mounts' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S mount && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k mounts' + + - id: 3523 + title: "Ensure file deletion events by users are collected" + description: "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\"." + rationale: "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." + remediation: "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>=1000 -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>=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." + compliance: + - cis: ["4.1.14"] + - cis_csc: ["6.2", "13"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S unlink && r:-S unlinkat && r:-S rename && r:-S renameat && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k delete' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b32 && r:-S unlink && r:-S unlinkat && r:-S rename && r:-S renameat && r:-F auid>=1000 && r:-F auid!=4294967295 && r:-k delete' + + - id: 3524 + title: "Ensure changes to system administration scope (sudoers) is collected" + description: "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.\"" + rationale: "Changes in the /etc/sudoers file can indicate that an unauthorized change has been made to scope of system administrator activity." + remediation: "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." + compliance: + - cis: ["4.1.15"] + - cis_csc: ["4.8"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/sudoers && r:-p wa && r:-k scope' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/etc/sudoers.d/ && r:-p wa && r:-k scope' + + - id: 3525 + title: "Ensure system administrator actions (sudolog) are collected" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.1.16"] + - cis_csc: ["4.9"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/var/log/sudo.log && r:-p wa && r:-k actions' + + - id: 3526 + title: "Ensure kernel module loading and unloading is collected" + description: "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\"." + rationale: "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." + remediation: "For 32 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=b32 -S init_module -S delete_module -k 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." + compliance: + - cis: ["4.1.17"] + - cis_csc: ["5.1"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/sbin/insmod && r:-p x && r:-k modules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/sbin/rmmod && r:-p x && r:-k modules' + - 'f:/etc/audit/audit.rules -> r:^-w && r:/sbin/modprobe && r:-p x && r:-k modules' + - 'f:/etc/audit/audit.rules -> r:^-a && r:always,exit|exit,always && r:-F arch=b64 && r:-S init_module && r:-S delete_module && r:-k modules' + + - id: 3527 + title: "Ensure the audit configuration is immutable" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.1.18"] + - cis_csc: ["6.2", "6.3"] + condition: all + rules: + - 'd:/etc/audit' + - 'f:/etc/audit/audit.rules' + - 'f:/etc/audit/audit.rules -> r:^\s*\t*-e 2$' + + - id: 3528 + title: "Ensure SSH X11 forwarding is disabled" + description: "The X11Forwarding parameter provides the ability to tunnel X11 traffic through the connection to enable remote graphic connections." + rationale: "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." + remediation: "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." + compliance: + - cis: ["5.2.6"] + - cis_csc: ["9.2"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:X11Forwarding\s+no' diff --git a/sca/debian/cis_debian_linux_rcl.yml b/sca/debian/cis_debian_linux_rcl.yml deleted file mode 100644 index c14ddb3d2..000000000 --- a/sca/debian/cis_debian_linux_rcl.yml +++ /dev/null @@ -1,548 +0,0 @@ -# Security Configuration assessment -# CIS Checks for Debian/Ubuntu -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# Center for Internet Security Debian Linux 9 Benchmark v1.0.0 - 12-21-2018 -# Center for Internet Security Debian Linux 8 Benchmark v2.0.0 - 12-28-2018 -# Center for Internet Security Debian Linux 7 Benchmark v1.0.0 - 12-31-2015 - -policy: - id: "cis_debian" - file: "cis_debian_linux_rcl.yml" - name: "CIS benchmark for Debian/Linux" - description: "This document provides prescriptive guidance for establishing a secure configuration posture for Debian Linux systems running on x86 and x64 platforms. Many lists are included including filesystem types, services, clients, and network protocols. Not all items in these lists are guaranteed to exist on all distributions and additional similar items may exist which should be considered in addition to those explicitly mentioned." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check Debian version" - description: "Requirements for running the SCA scan against Debian/Ubuntu." - condition: "all required" - rules: - - 'f:/etc/debian_version;' - - 'f:/proc/sys/kernel/ostype -> Linux;' - -checks: -# Section 1.1 - Filesystem Configuration - - id: 5000 - title: "Ensure /tmp is configured" - description: "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications." - rationale: "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." - remediation: "Configure /etc/fstab as appropiate or enable systemd /tmp mounting and edit /etc/systemd/system/local-fs.target.wants/tmp.mount to configure the /tmp mount." - compliance: - - cis_csc: "5.1" - - cis: "1.1.2" - references: - - https://tldp.org/HOWTO/LVM-HOWTO/ - - https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems/ - condition: any - rules: - - 'f:/etc/fstab -> !r:/tmp;' - - id: 5001 - title: "Ensure nodev option set on /tmp partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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 ." - remediation: "Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to configure the /tmp and enable systemd /tmp mounting." - compliance: - - cis_csc: "5.1" - - cis: "1.1.3" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:ext2|ext3 && r:/tmp && r:nodev;' - - id: 5002 - title: "Ensure separate partition exists for /opt" - description: "The /opt directory is a world-writable directory used for temporary storage by all users and some applications." - rationale: "Since the /opt directory may contain world-writable files and directories, there is a risk of resource exhaustion if it is not bound to a separate partition." - remediation: "For new installations, during installation create a custom partition setup and specify a separate partition for /opt. For systems that were previously installed, create a new partition and configure /etc/fstab as appropriate." - compliance: - - cis_csc: "5.1" - - cis: "1.1.6" - references: - - https://tldp.org/HOWTO/LVM-HOWTO/ - condition: all - rules: - - 'f:/opt;' - - 'f:/etc/fstab -> !r:/opt;' - - id: 5003 - title: "Ensure separate partition exists for /var" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis_csc: "5.1" - - cis: "1.1.6" - references: - - https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> !r:/var;' - - id: 5004 - title: "Ensure separate partition exists for /var/tmp" - description: "The /var/tmp directory is a world-writable directory used for temporary storage by all users and some applications." - rationale: "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." - remediation: "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." - compliance: - - cis_csc: "5.1" - - cis: "1.1.7" - condition: all - rules: - - 'f:/etc/fstab -> !r:/var/tmp;' - - id: 5005 - title: "Ensure nodev option set on /var/tmp partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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 ." - remediation: "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" - compliance: - - cis_csc: "5.1" - - cis: "1.1.8" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:ext2|ext3 && r:/var/tmp && r:nodev;' - - id: 5006 - title: "Ensure nodev option set on /home partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "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" - compliance: - - cis_csc: "5.1" - - cis: "1.1.14" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:ext2|ext3 && r:/home && r:nodev ;' - - id: 5007 - title: "Ensure nodev option set on /dev/shm partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "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." - compliance: - - cis_csc: "5.1" - - cis: "1.1.14" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:nodev;' - - id: 5008 - title: "Ensure nosuid option set on /dev/shm partition" - description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." - rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." - remediation: "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." - compliance: - - cis_csc: "5.1" - - cis: "1.1.15" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:nosuid;' - - id: 5009 - title: "Ensure noexec option set on /dev/shm partition" - description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." - rationale: "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." - remediation: "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." - compliance: - - cis_csc: "5.1" - - cis: "1.1.16" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:noexec;' - - id: 5010 - title: "Ensure nodev option set on removable media partitions" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "Removable media containing character and block special devices could be used to circumvent security controls by allowing non-root users to access sensitive device files such as /dev/kmem or the raw disk partitions." - remediation: "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." - compliance: - - cis_csc: "5.1" - - cis: "1.1.18" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:nodev;' - - id: 5011 - title: "Ensure nosuid option set on removable media partitions" - description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." - rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." - remediation: "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." - compliance: - - cis_csc: "5.1" - - cis: "1.1.19" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:nosuid;' -# Section 1.4 - Secure boot settings - - id: 5012 - title: "Ensure bootloader password is set (GRUB)" - description: "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" - rationale: "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)." - remediation: "Create an encrypted password with grub-mkpasswd-pbkdf2, add user and password to the grub configuration file and update the grub2 configuration." - compliance: - - cis_csc: "5.1" - - cis: "1.4.2" - - pci_dss: "2.2.4" - references: - - https://help.ubuntu.com/community/Grub2/Passwords - condition: any - rules: - - 'f:/boot/grub/menu.lst -> NIN !r:^# && r:password;' - - id: 5013 - title: "Ensure bootloader password is set (LILO)" - description: "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" - rationale: "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)." - remediation: "Create an encrypted password with grub-mkpasswd-pbkdf2, add user and password to the grub configuration file and update the grub2 configuration." - compliance: - - cis_csc: "5.1" - - cis: "1.4.2" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/lilo.conf -> NIN !r:^# && r:restricted;' - - 'f:/etc/lilo.conf -> NIN !r:^# && r:password=;' -# Section 1.7 - Warning banners - - id: 5014 - title: "Ensure GDM login banner is configured" - description: "GDM is the GNOME Display Manager which handles graphical login for GNOME based systems." - rationale: "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." - remediation: "Edit or create the file /etc/gdm3/greeter.dconf-defaults and add: banner-message-enable=true, banner-message-text='Authorized uses only. All activity may be monitored and reported.'" - compliance: - - cis_csc: "5.1" - - cis: "1.7.2" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/inittab -> IN !r:^# && r:id:5;' -# Section 2 - Filesystem Configuration - Debian 7 - - id: 5015 - title: "Add nodev Option to /run/shm Partition" - description: "The nodev mount option specifies that the /run/shm (temporary filesystem stored in memory) cannot contain block or character special devices." - rationale: "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." - remediation: "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" - compliance: - - cis_csc: "5.1" - - cis: "2.14" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> IN !r:^# && r:ext2|ext3 && r:/run/shm && r:nodev;' - - id: 5016 - title: "Add nosuid Option to /run/shm Partition" - description: "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." - rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." - remediation: "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." - compliance: - - cis_csc: "5.1" - - cis: "2.15" - condition: any - rules: - - 'f:/etc/fstab -> IN !r:^# && r:/run/shm && r:nosuid;' - - id: 5017 - title: "Add noexec Option to /run/shm Partition" - description: "Set noexec on the shared memory partition to prevent programs from executing from there." - rationale: "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." - remediation: "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." - compliance: - - cis_csc: "5.1" - - cis: "2.16" - condition: any - rules: - - 'f:/etc/fstab -> IN !r:^# && r:/run/shm && r:noexec;' -# Section 2.1 - Inetd services - - id: 5018 - title: "Ensure inetd is not installed" - description: "The inetd daemon listens for well known services and dispatches the appropriate daemon to properly respond to service requests." - rationale: "If there are no inetd services required, it is recommended that the daemon be removed." - remediation: "Run the following commands to uninstall openbsd-inetd and inetutils-inetd: apt-get remove openbsd-inetd; apt-get remove inetutils-inetd" - compliance: - - cis_csc: "9.2" - - cis: "2.1.2" - - pci_dss: "2.2.2" - condition: all - rules: - - 'p:inetd;' - - 'f:!/etc/inetd.conf -> IN !r:^# && r:wait;' -# Section 2.2 - Special purpose services - - id: 5019 - title: "Ensure FTP Server is not enabled" - description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." - rationale: "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." - remediation: "Run the following command to disable vsftpd: # systemctl disable vsftpd" - compliance: - - cis_csc: "9.2" - - cis: "2.2.9" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/inetd.conf -> IN !r:^# && r:/ftp;' - - id: 5020 - title: "Ensure FTP Server is not enabled" - description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." - rationale: "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." - remediation: "Run the following command to disable vsftpd: # systemctl disable vsftpd" - compliance: - - cis_csc: "9.2" - - cis: "2.2.9" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/inetd.conf -> IN !r:^# && r:tftp;' - - id: 5021 - title: "Ensure IMAP and POP3 server is not enabled (IMAP)" - description: "exim is an open source IMAP and POP3 server for Linux based systems." - rationale: "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." - remediation: "Run the following commands to remove exim: # apt-get remove exim4; # apt-get purge exim4" - compliance: - - cis_csc: "9.2" - - cis: "2.2.11" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/inetd.conf -> IN !r:^# && r:imap;' - - id: 5022 - title: "Ensure IMAP and POP3 server is not enabled (POP3)" - description: "exim is an open source IMAP and POP3 server for Linux based systems." - rationale: "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." - remediation: "Run the following commands to remove exim: # apt-get remove exim4; # apt-get purge exim4" - compliance: - - cis_csc: "9.2" - - cis: "2.2.11" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/inetd.conf -> IN !r:^# && r:pop;' - - id: 5023 - title: "Ensure Samba is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable smbd: # systemctl disable smbd" - compliance: - - cis_csc: "9.2" - - cis: "2.2.12" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/init.d/samba;' - - id: 5024 - title: "Ensure NFS and RPC are not enabled" - description: "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." - rationale: "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." - remediation: "Run the following commands to disable nfs and rpcbind : # systemctl disable nfs-server; # systemctl disable rpcbind" - compliance: - - cis_csc: "9.2" - - cis: "2.2.7" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/init.d/nfs-common;' - - 'f:/etc/init.d/nfs-user-server;' - - 'f:/etc/init.d/nfs-kernel-server;' - - id: 5025 - title: "Ensure NIS Server is not enabled" - description: "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." - rationale: "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" - remediation: "Run the following command to disable nis: # systemctl disable nis" - compliance: - - cis_csc: "9.2" - - cis: "2.2.17" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/init.d/nis;' - - id: 5026 - title: "Ensure HTTP server is not enabled" - description: "HTTP or web servers provide the ability to host web site content." - rationale: "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." - remediation: "Run the following command to disable apache2: # systemctl disable apache2" - compliance: - - cis_csc: "9.2" - - cis: "2.2.10" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/init.d/apache;' - - 'f:/etc/init.d/apache2;' - - id: 5027 - title: "Ensure DNS Server is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable named: # systemctl disable bind9" - compliance: - - cis_csc: "9.2" - - cis: "2.2.8" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/init.d/bind;' - - id: 5028 - title: "Ensure HTTP Proxy Server is not enabled" - description: "Squid is a standard proxy server used in many distributions and environments." - rationale: "If there is no need for a proxy server, it is recommended that the squid proxy be deleted to reduce the potential attack surface." - remediation: "Run the following command to disable squid: # systemctl disable squid" - compliance: - - cis_csc: "9.2" - - cis: "2.2.13" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/init.d/squid;' -# Section 2.3 - Service clients - - id: 5029 - title: "Ensure rsh client is not installed" - description: "The rsh package contains the client commands for the rsh services." - rationale: "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 ." - remediation: "Run the following command to uninstall rsh: apt-get remove rsh-client rsh-redone-client" - compliance: - - cis_csc: "2.6, 4.5" - - cis: "2.3.2" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/inetd.conf -> IN !r:^# && r:shell|login;' - - id: 5030 - title: "Ensure telnet client is not installed" - description: "The telnet package contains the telnet client, which allows users to start connections to other systems via the telnet protocol." - rationale: "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." - remediation: "Run the following command to uninstall telnet: # apt-get remove telnet" - compliance: - - cis_csc: "2.6, 4.5" - - cis: "2.3.4" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/inetd.conf -> IN !r:^# && r:telnet;' -# Section 3.1 - Network Parameters (Host Only) - - id: 5031 - title: "Ensure IPv4 forwarding is disabled" - description: "The net.ipv4.ip_forward flag are used to tell the system whether it can forward packets or not." - rationale: "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." - remediation: "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.ip_forward = 0" - compliance: - - cis_csc: "5.1" - - cis: "3.1.1" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/ip_forward -> 1;' - - id: 5032 - title: "Ensure IPv6 forwarding is disabled" - description: "The net.ipv6.conf.all.forwarding flag are used to tell the system whether it can forward packets or not." - rationale: "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." - remediation: "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/*, net.ipv6.conf.all.forwarding = 0" - compliance: - - cis_csc: "5.1" - - cis: "3.1.1" - condition: any - rules: - - 'f:/proc/sys/net/ipv6/ip_forward -> 1;' -# Section 3.2 - Network Parameters (Host and Router) - - id: 5033 - title: "Ensure source routed packets are not accepted" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis_csc: "5.1" - - cis: "3.2.1" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/accept_source_route -> 1;' - - id: 5034 - title: "Ensure broadcast ICMP requests are ignored" - description: "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." - rationale: "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." - remediation: "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_echo_ignore_broadcasts = 1" - compliance: - - cis_csc: "5.1" - - cis: "3.2.5" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/icmp_echo_ignore_broadcasts -> 0;' -# Section 5.2 - SSH Server Configuration - - id: 5035 - title: "Ensure SSH Protocol is set to 2" - description: "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." - rationale: "SSH v1 suffers from insecurities that do not affect SSH v2." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" - compliance: - - cis_csc: "14.4" - - cis: "5.2.4" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> NIN !r:^# && r:Protocol\.+2;' - - id: 5036 - title: "Ensure SSH IgnoreRhosts is enabled" - description: "The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication ." - rationale: "Setting this parameter forces users to enter a password when authenticating with ssh." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" - compliance: - - cis_csc: "9.2" - - cis: "5.2.8" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:IgnoreRhosts\.+no;' - - id: 5037 - title: "Ensure SSH HostbasedAuthentication is disabled" - description: "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." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" - compliance: - - cis_csc: "16.3" - - cis: "5.2.9" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:HostbasedAuthentication\.+yes;' - - id: 5038 - title: "Ensure SSH root login is disabled" - description: "The PermitRootLogin parameter specifies if the root user can log in using ssh. 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" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" - compliance: - - cis_csc: "4.3" - - cis: "5.2.10" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:PermitRootLogin\.+yes;' - - id: 5039 - title: "Ensure SSH PermitEmptyPasswords is disabled" - description: "The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts with empty password strings." - rationale: "Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" - compliance: - - cis_csc: "16.3" - - cis: "5.2.11" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:^PermitEmptyPasswords\.+yes;' -# Section 6.2 - User and Group Settings - - id: 5040 - title: "Ensure password fields are not empty" - description: "An account with an empty password field means that anybody may log in as that user without providing a password." - rationale: "All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user." - remediation: "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 " - compliance: - - cis_csc: "4.4" - - cis: "6.2.1" - - pci_dss: "10.2.5" - condition: any - rules: - - 'f:/etc/shadow -> r:^\w+::;' - - id: 5041 - title: "Ensure root is the only UID 0 account" - description: "Any account with UID 0 has superuser privileges on the system." - rationale: "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." - remediation: "Remove any users other than root with UID 0 or assign them a new UID if appropriate." - compliance: - - cis_csc: "5.1" - - cis: "6.2.5" - - pci_dss: "10.2.5" - condition: any - rules: - - 'f:/etc/passwd -> IN !r:^# && !r:^root: && r:^\w+:\w+:0:;' diff --git a/sca/debian/cis_debianlinux7-8_L1_rcl.yml b/sca/debian/cis_debianlinux7-8_L1_rcl.yml deleted file mode 100755 index 2547833f0..000000000 --- a/sca/debian/cis_debianlinux7-8_L1_rcl.yml +++ /dev/null @@ -1,1250 +0,0 @@ -# Security Configuration assessment -# Level 1 CIS Checks for Debian Linux 7 and Debian Linux 8 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# Center for Internet Security Debian Linux 7 Benchmark v1.0.0 - 12-31-2015 -# Center for Internet Security Debian Linux 8 Benchmark v2.0.0 - 12-28-2018 - -policy: - id: "cis_debianlinux7-8_L1" - file: "cis_debianlinux7-8_L1_rcl.yml" - name: "CIS benchmark for Debian/Linux 7 and 8 L1" - description: "This document provides prescriptive guidance for establishing a secure configuration posture for Debian Linux 7 and 8." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check Debian version" - description: "Requirements for running the SCA scan against Debian/Ubuntu." - condition: "all required" - rules: - - 'f:/etc/debian_version;' - - 'f:/proc/sys/kernel/ostype -> Linux;' - -variables: - $rc_dirs: /etc/rc0.d,/etc/rc1.d,/etc/rc2.d,/etc/rc3.d,/etc/rc4.d,/etc/rc5.d,/etc/rc6.d,/etc/rc7.d,/etc/rc8.d,/etc/rc9.d,/etc/rca.d,/etc/rcb.d,/etc/rcc.d,/etc/rcs.d,/etc/rcS.d; - $rsyslog_files: /etc/rsyslog.conf,/etc/rsyslog.d/*; - $profiledfiles: /etc/profile.d/*; - $home_dirs: /usr2/home/*,/home/*,/home,/*/home/*,/*/home,/; - -checks: -# 2 Filesystem Configuration - - id: 10500 - title: "Create Separate Partition for /tmp" - description: "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications." - rationale: "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." - remediation: "For new installations, during installation create a custom partition setup and specify a separate partition for /tmp. For systems that were previously installed, use the Logical Volume Manager (LVM) to create partitions." - compliance: - - cis: "2.1" - references: - - http://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> !r:/tmp;' - - id: 10501 - title: "Set nodev option for /tmp Partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "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" - compliance: - - cis: "2.2" - condition: any - rules: - - 'f:/etc/fstab -> !r:/tmp\s+\w+\s+\.*nodev;' - - id: 10502 - title: "Set nosuid option for /tmp Partition" - description: "The nosuid mount option specifies that the filesystem cannot contain set userid files." - rationale: "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." - remediation: "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" - compliance: - - cis: "2.3" - condition: any - rules: - - 'f:/etc/fstab -> !r:/tmp\s+\w+\s+\.*nosuid;' - - id: 10503 - title: "Set noexec option for /tmp Partition" - description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." - rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /tmp." - remediation: "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" - compliance: - - cis: "2.4" - condition: any - rules: - - 'f:/etc/fstab -> !r:/tmp\s+\w+\s+\.*noexec;' - - id: 10504 - title: " Create Separate Partition for /var" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "2.5" - references: - - http://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> !r:/var;' - - id: 10505 - title: "Bind Mount the /var/tmp directory to /tmp" - description: "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." - rationale: "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." - remediation: "# mount --bind /tmp /var/tmp and edit the /etc/fstab file to contain the following line: /tmp /var/tmp none bind 0 0" - compliance: - - cis: "2.6" - condition: any - rules: - - 'f:/etc/fstab -> !r:/tmp\s+/var/tmp\s+none\s+\.*bind\.*0\s+0;' - - id: 10506 - title: "Create Separate Partition for /var/log" - description: "The /var/log directory is used by system services to store log data." - rationale: "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." - remediation: "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." - compliance: - - cis: "2.7" - references: - - http://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> !r:/var/log;' - - id: 10507 - title: "Create Separate Partition for /var/log/audit" - description: "The auditing daemon, auditd, stores log data in the /var/log/audit directory." - rationale: "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." - remediation: "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." - compliance: - - cis: "2.8" - references: - - http://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> !r:/var/log/audit;' - - id: 10508 - title: "Create Separate Partition for /home" - description: "The /home directory is used to support disk storage needs of local users." - rationale: "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." - remediation: "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." - compliance: - - cis: "2.9" - references: - - http://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> !r:/home;' - - id: 10509 - title: "Add nodev Option to /home" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "2.10" - condition: any - rules: - - 'f:/etc/fstab -> !r:/home\s+\w+\s+\.*nodev;' - - id: 10510 - title: "Add nodev Option to Removable Media Partitions" - description: "Set nodev on removable media to prevent character and block special devices that are present on the removable media from being treated as device files." - rationale: "Removable media containing character and block special devices could be used to circumvent security controls by allowing non-root users to access sensitive device files such as /dev/kmem or the raw disk partitions." - remediation: "Edit the /etc/fstab file and add \"nodev\" to the fourth field (mounting options). Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." - compliance: - - cis: "2.11" - condition: any - rules: - - 'f:/etc/fstab -> !r:/media\.*\s+\w+\s+\.*nodev;' - - id: 10511 - title: "Add noexec Option to Removable Media Partitions" - description: "Set noexec on removable media to prevent programs from executing from the removable media." - rationale: "Setting this option on a file system prevents users from executing programs from the removable media. This deters users from being able to introduce potentially malicious software on the system." - remediation: "Edit the /etc/fstab file and add noexec to the fourth field (mounting options). Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." - compliance: - - cis: "2.12" - condition: any - rules: - - 'f:/etc/fstab -> !r:/media\.*\s+\w+\s+\.*noexec;' - - id: 10512 - title: "Add nosuid Option to Removable Media Partitions" - description: "Set nosuid on removable media to prevent setuid and setgid executable files that are on that media from being executed as setuid and setgid." - rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." - remediation: "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options). Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." - compliance: - - cis: "2.13" - condition: any - rules: - - 'f:/etc/fstab -> !r:/media\.*\s+\w+\s+\.*nosuid;' - - id: 10513 - title: "Add nodev Option to /run/shm Partition" - description: "The nodev mount option specifies that the /run/shm (temporary filesystem stored in memory) cannot contain block or character special devices." - rationale: "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." - remediation: "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" - compliance: - - cis: "2.14" - condition: any - rules: - - 'f:/etc/fstab -> !r:/run/shm\s+\w+\s+\.*nodev;' - - id: 10514 - title: "Add nosuid Option to /run/shm Partition" - description: "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." - rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." - remediation: "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" - compliance: - - cis: "2.15" - condition: any - rules: - - 'f:/etc/fstab -> !r:/run/shm\s+\w+\s+\.*nosuid;' - - id: 10515 - title: "Add noexec Option to /run/shm Partition" - description: "Set noexec on the shared memory partition to prevent programs from executing from there." - rationale: "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." - remediation: "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" - compliance: - - cis: "2.16" - condition: any - rules: - - 'f:/etc/fstab -> !r:/run/shm\s+\w+\s+\.*noexec;' - - id: 10516 - title: "Disable Automounting" - description: "autofs allows automatic mounting of devices, typically including CD/DVDs and USB drives." - rationale: "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." - remediation: "Disable autofs: # update-rc.d autofs disable" - compliance: - - cis: "2.25" - condition: any - rules: - - 'd:$rc_dirs -> S -> r:autofsc;' -# 3 Secure Boot Settings - - id: 10517 - title: "Set Boot Loader Password" - description: "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" - rationale: "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)." - remediation: "Create an encrypted password with grub-md5-crypt: # grub-mkpasswd-pbkdf2 Enter password: Reenter password: Your PBKDF2 is Add the following into /etc/grub.d/00_header or a custom /etc/grub.d configuration file: cat <\" password_pbkdf2 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" - compliance: - - cis: "3.3" - condition: any - rules: - - 'f:/boot/grub/grub.cfg -> !r:^set superusers;' - - 'f:/boot/grub/grub.cfg -> !r:^password;' - - 'f:/etc/grub.d -> !r:^set superusers;' - - 'f:/etc/grub.d -> !r:^password;' - - id: 10518 - title: "Require Authentication for Single-User Mode" - description: "Setting a password for the root user will force authentication in single user mode." - rationale: "Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials." - remediation: "Run the following command and follow the prompts to set a password for the root user: # passwd root" - compliance: - - cis: "3.4" - condition: any - rules: - - 'f:/etc/shadow -> r:^root:!:;' - - 'f:/etc/shadow -> r:^root:*:;' - - 'f:/etc/shadow -> r:^root:*!:;' - - 'f:/etc/shadow -> r:^root:!*:;' -# 4 Additional Process Hardening - - id: 10519 - title: "Restrict Core Dumps" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "4.1" - condition: any - rules: - - 'f:/etc/security/limits.conf -> !r:^* hard core 0;' - - 'f:/etc/sysctl.conf -> !r:^fs.suid_dumpable = 0;' - - id: 10520 - title: "Enable Randomized Virtual Memory Region Placement" - description: "Set the system flag to force randomized virtual memory region placement." - rationale: "Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting." - remediation: "Add the following line to the /etc/sysctl.conf file. kernel.randomize_va_space = 2" - compliance: - - cis: "4.3" - condition: any - rules: - - 'f:/etc/sysctl.conf -> !r:^kernel.randomize_va_space = 2;' -# 5 OS Services - - id: 10521 - title: "Ensure NIS is not installed" - description: "The Network Information Service (NIS), formerly known as Yellow Pages, is a client-server directory service protocol used to distribute system configuration files." - rationale: "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." - remediation: "Uninstall the nis package: # apt-get purge nis" - compliance: - - cis: "5.1.1" - condition: any - rules: - - 'f:/etc/init.d/nis;' - - id: 10522 - title: "Ensure rsh server is not enabled" - description: "The Berkeley rsh-server (rsh, rlogin, rcp) package contains legacy services that exchange credentials in clear-text." - rationale: "These legacy service contain numerous security exposures and have been replaced with the more secure SSH package." - remediation: "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" - compliance: - - cis: "5.1.2" - condition: any - rules: - - 'f:/etc/inetd.conf -> IN !r:^# && r:shell|login|exec;' - - id: 10523 - title: "Ensure talk server is not enabled" - description: "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." - rationale: "The software presents a security risk as it uses unencrypted protocols for communication." - remediation: "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" - compliance: - - cis: "5.1.4" - condition: any - rules: - - 'f:/etc/inetd.conf -> IN !r:^# && r:talk|ntalk;' - - id: 10524 - title: "Ensure telnet server is not enabled" - description: "The telnet-server package contains the telnet daemon, which accepts connections from users from other systems via the telnet protocol." - rationale: "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." - remediation: "Remove or comment out any telnet lines in /etc/inetd.conf: #telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd" - compliance: - - cis: "5.1.6" - condition: any - rules: - - 'f:/etc/inetd.conf -> IN !r:^# && r:telnet;' - - id: 10525 - title: "Ensure tftp-server is not enabled" - description: "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." - rationale: "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." - remediation: "Remove or comment out any tftp lines in /etc/inetd.conf: #tftp stream tcp nowait root internal" - compliance: - - cis: "5.1.7" - condition: any - rules: - - 'f:/etc/inetd.conf -> IN !r:^# && r:tftp;' - - id: 10526 - title: "Ensure xinetd is not enabled" - description: "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." - rationale: "If there are no xinetd services required, it is recommended that the daemon be disabled." - remediation: "Disable xinetd: # update-rc.d xinetd disable" - compliance: - - cis: "5.1.8" - condition: any - rules: - - 'd:$rc_dirs -> S -> r:xinetd;' - - id: 10527 - title: "Ensure chargen is not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Remove or comment out any chargen lines in /etc/inetd.conf: #chargen stream tcp nowait root internal" - compliance: - - cis: "5.2" - condition: any - rules: - - 'f:/etc/inetd.conf -> IN !r:^# && r:chargen;' - - id: 10528 - title: "Ensure daytime is not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Remove or comment out any daytime lines in /etc/inetd.conf: #daytime stream tcp nowait root internal" - compliance: - - cis: "5.3" - condition: any - rules: - - 'f:/etc/inetd.conf -> IN !r:^# && r:daytime;' - - id: 10529 - title: "Ensure echo is not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Remove or comment out any echo lines in /etc/inetd.conf: #echo stream tcp nowait root internal" - compliance: - - cis: "5.4" - condition: any - rules: - - 'f:/etc/inetd.conf -> IN !r:^# && r:echo;' - - id: 10530 - title: "Ensure discard is not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Remove or comment out any discard lines in /etc/inetd.conf: #discard stream tcp nowait root internal" - compliance: - - cis: "5.5" - condition: any - rules: - - 'f:/etc/inetd.conf -> IN !r:^# && r:discard;' - - id: 10531 - title: "Ensure time is not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Remove or comment out any time lines in /etc/inetd.conf: #time stream tcp nowait root internal" - compliance: - - cis: "5.6" - condition: any - rules: - - 'f:/etc/inetd.conf -> IN !r:^# && r:time;' -# 6 Special Purpose Services - - id: 10532 - title: "Ensure Avahi Server is not enabled" - description: "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." - rationale: "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." - remediation: "Disable avahi-daemon: # update-rc.d avahi-daemon disable" - compliance: - - cis: "6.2" - condition: any - rules: - - 'd:$rc_dirs -> S -> r:avahi-daemon;' - - id: 10533 - title: "Ensure print server is not enabled" - description: "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." - rationale: "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." - remediation: "Disable cups: # update-rc.d cups disable" - compliance: - - cis: "6.3" - condition: any - rules: - - 'd:$rc_dirs -> S -> r:cups;' - - 'd:$rc_dirs -> S -> r:cups-browsed;' - - id: 10534 - title: "Ensure DHCP Server is not enabled" - description: "The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses." - rationale: "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." - remediation: "Disable isc-dhcp-server: # update-rc.d isc-dhcp-server disable" - compliance: - - cis: "6.4" - condition: any - rules: - - 'd:$rc_dirs -> S -> r:disc-dhcp-server;' - - id: 10535 - title: "Configure Network Time Protocol (NTP)" - description: "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." - rationale: "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." - remediation: "Remediation: 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 Note: is the IP address or hostname of a trusted time server. Configuring an NTP server is outside the scope of this benchmark." - compliance: - - cis: "6.5" - references: - - http://www.ntp.org/ - condition: any - rules: - - 'f:/etc/ntp.conf -> !r:^restrict -4 default kod nomodify notrap nopeer noquery;' - - 'f:/etc/ntp.conf -> !r:^restrict -6 default kod nomodify notrap nopeer noquery;' - - 'f:/etc/ntp.conf -> !r:^server\s\.+;' - - id: 10536 - title: "Ensure LDAP is not enabled" - description: "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." - rationale: "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." - remediation: "Uninstall the slapd package: # apt-get purge slapd" - compliance: - - cis: "6.6" - references: - - http://www.openldap.org - condition: any - rules: - - 'd:/etc/init.d -> r:ldap;' - - id: 10537 - title: "Ensure NFS and RPC are not enabled" - description: "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." - rationale: "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." - remediation: "Disable rpcbind: # update-rc.d rpcbind disable Disable nfs-kernel-server: # update-rc.d nfs-kernel-server disable" - compliance: - - cis: "6.7" - condition: any - rules: - - 'd:$rc_dirs -> S -> r:rpcbind;' - - 'd:$rc_dirs -> S -> r:nfs-kernel-server;' - - id: 10538 - title: "Ensure DNS Server is not enabled" - description: "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." - rationale: "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." - remediation: "Disable bind9: # update-rc.d bind9 disable" - compliance: - - cis: "6.8" - condition: any - rules: - - 'd:$rc_dirs -> S -> r:bind9;' - - id: 10539 - title: "Ensure FTP Server is not enabled" - description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." - rationale: "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." - remediation: "Disable vsftpd: # update-rc.d vsftpd disable" - compliance: - - cis: "6.9" - condition: any - rules: - - 'd:$rc_dirs -> S -> r:vsftpd;' - - id: 10540 - title: "Ensure HTTP Server is not enabled" - description: "HTTP or web servers provide the ability to host web site content." - rationale: "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." - remediation: "Disable apache2: # update-rc.d apache2 disable" - compliance: - - cis: "6.10" - condition: any - rules: - - 'd:$rc_dirs -> S -> r:apache2;' - - id: 10541 - title: "Ensure IMAP and POP server is not enabled" - description: "Dovecot is an open source IMAP and POP3 server for Linux based systems." - rationale: "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." - remediation: "Disable dovecot: # update-rc.d dovecot disable" - compliance: - - cis: "6.11" - condition: any - rules: - - 'd:$rc_dirs -> S -> r:dovecot;' - - id: 10542 - title: "Ensure Samba is not enabled" - description: "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." - rationale: "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." - remediation: "Disable samba: # update-rc.d samba disable" - compliance: - - cis: "6.12" - condition: any - rules: - - 'd:$rc_dirs -> S -> r:samba;' - - id: 10543 - title: "Ensure HTTP Proxy Server is not enabled" - description: "Squid is a standard proxy server used in many distributions and environments." - rationale: "If there is no need for a proxy server, it is recommended that the squid proxy be deleted to reduce the potential attack surface." - remediation: "Disable squid3: # update-rc.d squid3 disable" - compliance: - - cis: "6.13" - condition: any - rules: - - 'd:$rc_dirs -> S -> r:squid3;' - - id: 10544 - title: "Ensure SNMP Server is not enabled" - description: "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." - rationale: "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." - remediation: "Disable snmpd: # update-rc.d snmpd disable" - compliance: - - cis: "6.14" - condition: any - rules: - - 'd:$rc_dirs -> S -> r:snmpd;' - - id: 10545 - title: "Configure Mail Transfer Agent for Local-Only Mode" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.15" - condition: any - rules: - - 'f:/etc/exim4/update-exim4.conf.conf -> NIN r:^dc_local_interfaces= && r:''127.0.0.1\s*\p\s*::1''$|''::1\s*\p\s*127.0.0.1''$|''127.0.0.1''$|''::1''$;' - - id: 10546 - title: "Ensure rsync service is not enabled" - description: "The rsyncd service can be used to synchronize files between systems over network links." - rationale: "The rsyncd service presents a security risk as it uses unencrypted protocols for communication." - remediation: "Set RSYNC_ENABLE to false in /etc/default/rsync: RSYNC_ENABLE=false" - compliance: - - cis: "6.16" - condition: any - rules: - - 'f:/etc/default/rsync -> NIN !r:^# && r:^RSYNC_ENABLE=false;' -# 7 Network Configuration and Firewall - - id: 10547 - title: "Disable IP Forwarding" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "7.1.1" - condition: any - rules: - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.ip_forward=1;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv4.ip_forward=0;' - - id: 10548 - title: "Disable Send Packet Redirects" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "7.1.2" - condition: any - rules: - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.conf.all.send_redirects\s*=\s*1;' - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.conf.default.send_redirects\s*=\s*1;' - - id: 10549 - title: "Disable Source Routed Packet Acceptance" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "7.2.1" - condition: any - rules: - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.conf.all.accept_source_route=1;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv4.conf.all.accept_source_route=0;' - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.conf.default.accept_source_route=1;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv4.conf.default.accept_source_route=0;' - - id: 10550 - title: "Disable ICMP Redirect Acceptance" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "7.2.2" - condition: any - rules: - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.conf.all.accept_redirects=1;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv4.conf.all.accept_redirects=0;' - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.conf.default.accept_redirects=1;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv4.conf.default.accept_redirects=0;' - - id: 10551 - title: "Disable Secure ICMP Redirect Acceptance" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "7.2.3" - condition: any - rules: - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.conf.all.secure_redirects=1;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv4.conf.all.secure_redirects=0;' - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.conf.default.secure_redirects=1;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv4.conf.default.secure_redirects=0;' - - id: 10552 - title: "Log Suspicious Packets" - description: "When enabled, this feature logs packets with un-routable source addresses to the kernel log." - rationale: "Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their server." - remediation: "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" - compliance: - - cis: "7.2.4" - condition: any - rules: - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.conf.all.log_martians=0;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv4.conf.all.log_martians=1;' - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.conf.default.log_martians=0;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv4.conf.default.log_martians=1;' - - id: 10553 - title: "Enable Ignore Broadcast Requests" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "7.2.5" - condition: any - rules: - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.icmp_echo_ignore_broadcasts=0;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv4.icmp_echo_ignore_broadcasts=1;' - - id: 10554 - title: "Enable Bad Error Message Protection" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "7.2.6" - condition: any - rules: - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.icmp_ignore_bogus_error_responses=0;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv4.icmp_ignore_bogus_error_responses=1;' - - id: 10555 - title: "Enable RFC-recommended Source Route Validation" - description: "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)." - rationale: "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." - remediation: "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" - compliance: - - cis: "7.2.7" - condition: any - rules: - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.conf.all.rp_filter=0;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv4.conf.all.rp_filter=1;' - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.conf.default.rp_filter=0;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv4.conf.default.rp_filter=1;' - - id: 10556 - title: "Enable TCP SYN Cookies" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "7.2.8" - condition: any - rules: - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv4.tcp_syncookies=0;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv4.tcp_syncookies=1;' - - id: 10557 - title: "Disable IPv6 Router Advertisements" - description: "This setting disables the systems ability to accept router advertisements" - rationale: "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." - remediation: "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" - compliance: - - cis: "7.3.1" - condition: any - rules: - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv6.conf.all.accept_ra=1;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv6.conf.all.accept_ra=0;' - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv6.conf.default.accept_ra=1;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv6.conf.default.accept_ra=0;' - - id: 10558 - title: "Disable IPv6 Redirect Acceptance" - description: "This setting prevents the system from accepting ICMP redirects. ICMP redirects tell the system about alternate routes for sending traffic." - rationale: "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." - remediation: "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" - compliance: - - cis: "7.3.2" - condition: any - rules: - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv6.conf.all.accept_redirects=1;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv6.conf.all.accept_redirects=0;' - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv6.conf.default.accept_redirects=1;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv6.conf.default.accept_redirects=0;' - - id: 10559 - title: "Disable IPv6" - description: "Although IPv6 has many advantages over IPv4, few organizations have implemented IPv6." - rationale: "If IPv6 is not to be used, it is recommended that it be disabled to reduce the attack surface of the system." - remediation: "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" - compliance: - - cis: "7.3.3" - condition: any - rules: - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv6.conf.all.disable_ipv6=0;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv6.conf.all.disable_ipv6=1;' - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv6.conf.default.disable_ipv6=0;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv6.conf.default.disable_ipv6=1;' - - 'f:/etc/sysctl.conf -> IN !r:^# && r:net.ipv6.conf.lo.disable_ipv6=0;' - - 'f:/etc/sysctl.conf -> !r:^net.ipv6.conf.lo.disable_ipv6=1;' - - id: 10560 - title: "Create /etc/hosts.allow" - description: "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." - rationale: "The /etc/hosts.allow file supports access control by IP and helps ensure that only authorized systems can connect to the server." - remediation: "Create /etc/hosts.allow: # echo \"ALL: /, /, ...\" >/etc/hosts.allow where each / combination (for example, \"192.168.1.0/255.255.255.0\") represents one network block in use by your organization that requires access to this system." - compliance: - - cis: "7.4.2" - condition: any - rules: - - 'f:!/etc/hosts.allow;' - - 'f:/etc/hosts.allow -> !r:^ALL:\.*;' - - id: 10561 - title: "Create /etc/hosts.deny" - description: "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." - rationale: "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." - remediation: "Create /etc/hosts.deny: # echo \"ALL: ALL\" >> /etc/hosts.deny" - compliance: - - cis: "7.4.4" - condition: any - rules: - - 'f:!/etc/hosts.deny;' - - 'f:/etc/hosts.deny -> !r:^ALL:\s*ALL;' - - id: 10562 - title: "Disable DCCP" - description: "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." - rationale: "If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface." - remediation: "# echo \"install dccp /bin/true\" >> /etc/modprobe.d/CIS.conf" - compliance: - - cis: "7.5.1" - condition: any - rules: - - 'f:!/etc/modprobe.d/CIS.conf;' - - 'f:/etc/modprobe.d/CIS.conf -> !r:^install dccp /bin/true;' - - id: 10563 - title: "Disable SCTP" - description: "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." - rationale: "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." - remediation: "# echo \"install sctp /bin/true\" >> /etc/modprobe.d/CIS.conf" - compliance: - - cis: "7.5.2" - condition: any - rules: - - 'f:!/etc/modprobe.d/CIS.conf;' - - 'f:/etc/modprobe.d/CIS.conf -> !r:^install sctp /bin/true;' - - id: 10564 - title: "Disable RDS" - description: "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." - rationale: "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." - remediation: "# echo \"install rds /bin/true\" >> /etc/modprobe.d/CIS.conf" - compliance: - - cis: "7.5.3" - condition: any - rules: - - 'f:!/etc/modprobe.d/CIS.conf;' - - 'f:/etc/modprobe.d/CIS.conf -> !r:^install rds /bin/true;' - - id: 10565 - title: "Disable TIPC" - description: "The Transparent Inter-Process Communication (TIPC) protocol is designed to provide communication between cluster nodes." - rationale: "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." - remediation: "# echo \"install tipc /bin/true\" >> /etc/modprobe.d/CIS.conf" - compliance: - - cis: "7.5.4" - condition: any - rules: - - 'f:!/etc/modprobe.d/CIS.conf;' - - 'f:/etc/modprobe.d/CIS.conf -> !r:^install tipc /bin/true;' - - id: 10566 - title: "Ensure Firewall is active" - description: "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." - rationale: "IPtables provides extra protection for the Linux system by limiting communications in and out of the box to specific IPv4 addresses and ports." - remediation: "Install the iptables and iptables-persistent packages: # apt-get install iptables iptables-persistent Enable the iptables-persistent service: # update-rc.d iptables-persistent enable" - compliance: - - cis: "7.7" - condition: any - rules: - - 'f:!/etc/rc2.d/S01iptables-persistent;' - - 'f:!/etc/rc3.d/S01iptables-persistent;' - - 'f:!/etc/rc4.d/S01iptables-persistent;' - - 'f:!/etc/rc5.d/S01iptables-persistent;' -# 8 Logging and Auditing - - id: 10567 - title: "Ensure the rsyslog Service is activated" - description: "Once the rsyslog package is installed it needs to be activated." - rationale: "If the rsyslog service is not activated the system will not have a syslog service running." - remediation: "Enable rsyslog: # update-rc.d rsyslog enable" - compliance: - - cis: "8.2.2" - condition: any - rules: - - 'f:!/etc/rc2.d/S01rsyslog;' - - 'f:!/etc/rc3.d/S01rsyslog;' - - 'f:!/etc/rc4.d/S01rsyslog;' - - 'f:!/etc/rc5.d/S01rsyslog;' - - id: 10568 - title: "Configure /etc/rsyslog.conf" - description: "The /etc/rsyslog.conf file specifies rules for logging and which files are to be used to log certain classes of messages." - rationale: "A great deal of important security-related information is sent via rsyslog (e.g., successful and failed su attempts, failed login attempts, root login attempts, etc.)." - remediation: "Edit the following lines in the /etc/rsyslog.conf or /etc/rsyslog.d/* file as appropriate for your environment: *.emerg :omusrmsg:* mail.* -/var/log/mail mail.info -/var/log/mail.info mail.warning -/var/log/mail.warn mail.err -/var/log/news/news.crit news.err -/var/log/news/news.err news.notice -/var/log/news/news.notice *.=warning;*.=err -/var/log/warn *.crit /var/log/warn *.*;mail.none;news.none -/var/log/messages local0,local1.* -/var/log/localmessages local2,local3.* -/var/log/localmessages local4,local5.* -/var/log/localmessages local6,local7.* -/var/log/localmessages Execute the following command to restart rsyslogd # pkill -HUP rsyslogd" - compliance: - - cis: "8.2.3" - references: - - rsyslog.conf(5) man page - condition: any - rules: - - 'f:$rsyslog_files -> !r:^*.emerg\s*\t*\s*\S;' - - 'f:$rsyslog_files -> !r:^mail.*\s*\t*\s*\S;' - - 'f:$rsyslog_files -> !r:^mail.info\s*\t*\s*\S;' - - 'f:$rsyslog_files -> !r:^mail.warning\s*\t*\s*\S;' - - 'f:$rsyslog_files -> !r:^mail.err\s*\t*\s*\S;' - - 'f:$rsyslog_files -> !r:^news.crit\s*\t*\s*\S;' - - 'f:$rsyslog_files -> !r:^news.err\s*\t*\s*\S;' - - 'f:$rsyslog_files -> !r:^news.notice\s*\t*\s*\S;' - - 'f:$rsyslog_files -> !r:^*.=warning;*.=err\s*\t*\s*\S;' - - 'f:$rsyslog_files -> !r:^*.crit\s*\t*\s*\S;' - - 'f:$rsyslog_files -> !r:^*.*;mail.none;news.none\s*\t*\s*\S;' - - 'f:$rsyslog_files -> !r:^local0,local1.*\s*\t*\s*\S;' - - 'f:$rsyslog_files -> !r:^local2,local3.*\s*\t*\s*\S;' - - 'f:$rsyslog_files -> !r:^local4,local5.*\s*\t*\s*\S;' - - 'f:$rsyslog_files -> !r:^local6,local7.*\s*\t*\s*\S;' - - id: 10569 - title: "Configure rsyslog to Send Logs to a Remote Log Host" - description: "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." - rationale: "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" - remediation: "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." - compliance: - - cis: "8.2.5" - references: - - rsyslog.conf(5) man page - condition: any - rules: - - 'f:/etc/rsyslog.conf -> !r:^*.* @@\w+.\w+.\w+;' - - id: 10570 - title: "Accept Remote rsyslog Messages Only on Designated Log Hosts" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "8.2.6" - references: - - rsyslog.conf(8) man page - condition: any - rules: - - 'f:$rsyslog_files -> !r:^\$ModLoad imtcp.so;' - - 'f:$rsyslog_files -> !r:^\$InputTCPServerRun 514;' - - id: 10571 - title: "Configure logrotate" - description: "The system includes the capability of rotating log files regularly to avoid filling up the system with logs or making the logs unmanageable large. The file /etc/logrotate.d/rsyslog is the configuration file used to rotate log files created by rsyslog." - rationale: "By keeping the log files smaller and more manageable, a system administrator can easily archive these files to another system and spend less time looking through inordinately large log files." - remediation: "Edit the /etc/logrotate.d/rsyslog file to include appropriate system logs according to your site policy." - compliance: - - cis: "8.4" - condition: any - rules: - - 'f:!/etc/logrotate.d/rsyslog;' - - 'f:/etc/logrotate.d/rsyslog -> !r:\S+;' -# 9 System Access, Authentication and Authorization - - id: 10572 - title: "Enable cron Daemon" - description: "The cron daemon is used to execute batch jobs on the system." - rationale: "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." - remediation: "Enable cron: # update-rc.d cron enable Enable anacron: # update-rc.d anacron enable" - compliance: - - cis: "9.1.1" - condition: any - rules: - - 'f:!/etc/rc2.d/S15anacron;' - - 'f:!/etc/rc2.d/S15cron;' - - 'f:!/etc/rc3.d/S15anacron;' - - 'f:!/etc/rc3.d/S15cron;' - - 'f:!/etc/rc4.d/S15anacron;' - - 'f:!/etc/rc4.d/S15cron;' - - 'f:!/etc/rc5.d/S15anacron;' - - 'f:!/etc/rc5.d/S15cron;' - - id: 10573 - title: "Restrict at/cron to Authorized Users" - description: "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." - rationale: "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." - remediation: "# /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" - compliance: - - cis: "9.1.8" - condition: any - rules: - - 'f:!/etc/cron.allow;' - - 'f:!/etc/at.allow;' - - id: 10574 - title: "Set Password Creation Requirement Parameters Using pam_cracklib" - description: "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." - rationale: "Strong passwords protect systems from being hacked through brute force methods." - remediation: "Install the libpam-cracklib package: # apt-get install libpam-cracklib 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" - compliance: - - cis: "9.2.1" - condition: any - rules: - - 'f:/etc/pam.d/common-password -> !r:password required pam_cracklib.so retry=\d minlen=\d\d+ dcredit=-\d+ ucredit=-\d+ ocredit=-\d+ lcredit=-\d+;' - - id: 10575 - title: " Set Lockout for Failed Password Attempts" - description: "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." - rationale: "Locking out userIDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems." - remediation: "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 --reset. This command sets the failed count to 0, effectively unlocking the user." - compliance: - - cis: "9.2.2" - condition: any - rules: - - 'f:/etc/pam.d/login -> !r:auth required pam_tally2.so onerr=fail audit silent deny=\d unlock_time=\d\d\d+;' - - id: 10576 - title: "Limit Password Reuse" - description: "The /etc/security/opasswd file stores the users' old passwords and can be checked to ensure that users are not recycling recent passwords." - rationale: "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." - remediation: "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." - compliance: - - cis: "9.2.3" - condition: any - rules: - - 'f:/etc/pam.d/common-password -> !r:password [success=1 default=ignore] pam_unix.so obscure sha512 remember=\d;' - - id: 10577 - title: "Set SSH Protocol to 2" - description: "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." - rationale: "SSH v1 suffers from insecurities that do not affect SSH v2." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" - compliance: - - cis: "9.3.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> NIN !r:^# && r:Protocol\.+2;' - - id: 10578 - title: "Set LogLevel to INFO" - description: "The INFO parameter specifices that record login and logout activity will be logged." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel INFO" - compliance: - - cis: "9.3.2" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^LogLevel\s+INFO;' - - id: 10579 - title: "Disable SSH X11 Forwarding" - description: "The X11Forwarding parameter provides the ability to tunnel X11 traffic through the connection to enable remote graphic connections." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: X11Forwarding no" - compliance: - - cis: "9.3.4" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^X11Forwarding\s+no;' - - id: 10580 - title: "Set SSH MaxAuthTries to 4 or Less" - description: "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." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4" - compliance: - - cis: "9.3.5" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^MaxAuthTries\s+\d;' - - 'f:/etc/ssh/sshd_config -> r:^MaxAuthTries\s+\d\d+;' - - 'f:/etc/ssh/sshd_config -> r:^MaxAuthTries\s+5;' - - 'f:/etc/ssh/sshd_config -> r:^MaxAuthTries\s+6;' - - 'f:/etc/ssh/sshd_config -> r:^MaxAuthTries\s+7;' - - 'f:/etc/ssh/sshd_config -> r:^MaxAuthTries\s+8;' - - 'f:/etc/ssh/sshd_config -> r:^MaxAuthTries\s+9;' - - id: 10581 - title: "Set SSH IgnoreRhosts to Yes" - description: "The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication." - rationale: "Setting this parameter forces users to enter a password when authenticating with ssh." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" - compliance: - - cis: "9.3.6" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^IgnoreRhosts\s+yes;' - - id: 10582 - title: "Set SSH HostbasedAuthentication to No" - description: "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." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" - compliance: - - cis: "9.3.7" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^HostbasedAuthentication\s+no;' - - id: 10583 - title: "Disable SSH Root Login" - description: "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 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" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" - compliance: - - cis: "9.3.8" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:PermitRootLogin\s+yes;' - - 'f:/etc/ssh/sshd_config -> !r:^PermitRootLogin\s+no;' - - id: 10584 - title: "Set SSH PermitEmptyPasswords to No" - description: "The PermitEmptyPasswords parameter specifies if the server allows login to accounts with empty password strings." - rationale: "Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" - compliance: - - cis: "9.3.9" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:PermitEmptyPasswords\s+yes;' - - 'f:/etc/ssh/sshd_config -> !r:^PermitEmptyPasswords\s+no;' - - id: 10585 - title: "Do Not Allow Users to Set Environment Options" - description: "The PermitUserEnvironment option allows users to present environment options to the ssh daemon." - rationale: "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)" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitUserEnvironment no" - compliance: - - cis: "9.3.10" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:PermitUserEnvironment\s+yes;' - - 'f:/etc/ssh/sshd_config -> !r:^PermitUserEnvironment\s+no;' - - id: 10586 - title: "Set Idle Timeout Interval for User Login" - description: "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." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: ClientAliveInterval 300 ClientAliveCountMax 0" - compliance: - - cis: "9.3.12" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^ClientAliveInterval\s+\d+;' - - 'f:/etc/ssh/sshd_config -> !r:^ClientAliveCountMax\s+\d;' - - id: 10587 - title: "Limit Access via SSH" - description: "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." - rationale: "Restricting which users can remotely access the system via SSH will help ensure that only authorized users access the system." - remediation: "Edit the /etc/ssh/sshd_config file to set one or more of the parameter as follows: AllowUsers AllowGroups DenyUsers DenyGroups " - compliance: - - cis: "9.3.13" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^AllowUsers\s+\w+|^AllowGroups\s+\w+|^DenyUsers\s+\w+|^DenyGroups\s+\w+;' - - id: 10588 - title: "Set SSH Banner" - description: "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." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Banner /etc/issue.net" - compliance: - - cis: "9.3.14" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^Banner\s+\S+;' - - id: 10589 - title: "Restrict Access to the su Command" - description: "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." - rationale: "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." - remediation: "Add the following line to the /etc/pam.d/su file. auth required pam_wheel.so use_uid Once this is done, create a comma separated list of users in the wheel statement in the /etc/group file." - compliance: - - cis: "9.5" - condition: any - rules: - - 'f:/etc/pam.d/su -> !r:auth required pam_wheel.so use_uid;' -# 10 User Accounts and Environment - - id: 10590 - title: "Set Password Expiration Days" - description: "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." - rationale: "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." - remediation: "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 " - compliance: - - cis: "10.1.1" - condition: any - rules: - - 'f:/etc/login.defs -> !r:^PASS_MAX_DAYS\s+\d+;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MAX_DAYS\s+\d\d\d+;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MAX_DAYS\s+91;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MAX_DAYS\s+92;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MAX_DAYS\s+93;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MAX_DAYS\s+94;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MAX_DAYS\s+95;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MAX_DAYS\s+96;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MAX_DAYS\s+97;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MAX_DAYS\s+98;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MAX_DAYS\s+99;' - - id: 10591 - title: "Set Password Change Minimum Number of Days" - description: "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." - rationale: "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." - remediation: "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 " - compliance: - - cis: "10.1.2" - condition: any - rules: - - 'f:/etc/login.defs -> !r:^PASS_MIN_DAYS\s+\d+;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MIN_DAYS\s+1;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MIN_DAYS\s+2;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MIN_DAYS\s+3;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MIN_DAYS\s+4;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MIN_DAYS\s+5;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_MIN_DAYS\s+6;' - - id: 10592 - title: "Set Password Expiring Warning Days" - description: "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." - rationale: "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." - remediation: "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 " - compliance: - - cis: "10.1.3" - condition: any - rules: - - 'f:/etc/login.defs -> !r:^PASS_WARN_DAYS\s+\d+;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_WARN_DAYS\s+1;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_WARN_DAYS\s+2;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_WARN_DAYS\s+3;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_WARN_DAYS\s+4;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_WARN_DAYS\s+5;' - - 'f:/etc/login.defs -> IN !r:^# && r:PASS_WARN_DAYS\s+6;' - - id: 10593 - title: "Set Default Group for root Account" - description: "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." - rationale: "Using GID 0 for the root account helps prevent root-owned files from accidentally becoming accessible to non-privileged users." - remediation: "# usermod -g 0 root" - compliance: - - cis: "10.3" - condition: any - rules: - - 'f:/etc/passwd -> !r:^root:\w+:\w+:0:;' - - id: 10594 - title: "Set Default umask for Users" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "10.4" - condition: any - rules: - - 'f:$profiledfiles -> !r:^umask 077;' - - 'f:/etc/bash.bashrc -> !r:^umask 077;' - - id: 10595 - title: "Lock Inactive User Accounts" - description: "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." - rationale: "Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies." - remediation: "# useradd -D -f 35" - compliance: - - cis: "10.5" - condition: any - rules: - - 'f:/etc/default/useradd -> !r:^INACTIVE=\d\d*;' -# 11 Warning Banners - - id: 10596 - title: "Set Warning Banner for Standard Login Services" - description: "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." - rationale: "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." - remediation: "# 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" - compliance: - - cis: "11.1" - condition: any - rules: - - 'f:!/etc/motd;' - - 'f:!/etc/issue;' - - 'f:!/etc/issue.net;' - - id: 10597 - title: "Remove OS Information from Login Warning Banners" - description: "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." - rationale: "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." - remediation: "Edit the /etc/motd, /etc/issue and /etc/issue.net files and remove any lines containing \\m, \\r, \\s or \\v." - compliance: - - cis: "11.2" - condition: any - rules: - - 'f:/etc/motd -> r:debian|gnu|linux;' -# 13 Review User and Group Settings - - id: 10598 - title: "Ensure Password Fields are Not Empty" - description: "An account with an empty password field means that anybody may log in as that user without providing a password." - rationale: "All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user." - remediation: "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 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." - compliance: - - cis: "13.1" - condition: any - rules: - - 'f:/etc/shadow -> r:^\w+::;' - - id: 10599 - title: "Verify No Legacy \"+\" Entries Exist in /etc/passwd File" - description: "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." - rationale: "These entries may provide an avenue for attackers to gain privileged access on the system." - remediation: "Delete these entries if they exist." - compliance: - - cis: "13.2" - condition: any - rules: - - 'f:/etc/passwd -> IN !r:^# && r:^+:;' - - id: 10600 - title: "Verify No Legacy \"+\" Entries Exist in /etc/shadow File" - description: "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." - rationale: "These entries may provide an avenue for attackers to gain privileged access on the system." - remediation: "Delete these entries if they exist." - compliance: - - cis: "13.3" - condition: any - rules: - - 'f:/etc/shadow -> IN !r:^# && r:^+:;' - - id: 10601 - title: "Verify No Legacy \"+\" Entries Exist in /etc/group File" - description: "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." - rationale: "These entries may provide an avenue for attackers to gain privileged access on the system." - remediation: "Delete these entries if they exist." - compliance: - - cis: "13.4" - condition: any - rules: - - 'f:/etc/group -> IN !r:^# && r:^+:;' - - id: 10602 - title: "Verify No UID 0 Accounts Exist Other Than root" - description: "Any account with UID 0 has superuser privileges on the system." - rationale: "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." - remediation: "Delete any other entries that are displayed." - compliance: - - cis: "13.5" - condition: any - rules: - - 'f:/etc/passwd -> NIN !r:^# && r:^root: && r:^\w+:\w+:0:;' - - id: 10603 - title: "Check for Presence of User .rhosts Files" - description: "While no .rhosts files are shipped by default, users can easily create them." - rationale: "This action is only meaningful if .rhosts support is permitted in the file /etc/pam.conf. Even though the .rhosts files are ineffective if support is disabled in /etc/pam.conf, they may have been brought over from other systems and could contain information useful to an attacker for those other systems." - remediation: "If any users have .rhosts files determine why they have them." - compliance: - - cis: "13.10" - condition: any - rules: - - 'd:$home_dirs -> r:^.rhosts$;' - - id: 10604 - title: "Check for Presence of User .netrc Files" - description: "The .netrc file contains data for logging into a remote host for file transfers via FTP." - rationale: "The .netrc file presents a significant security risk since it stores passwords in unencrypted form. Even if FTP is disabled, user accounts may have brought over .netrc files from other systems which could pose a risk to those systems." - remediation: "Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user .netrc files and determine the action to be taken in accordance with site policy." - compliance: - - cis: "13.18" - condition: any - rules: - - 'd:$home_dirs -> r:^.netrc$;' - - id: 10605 - title: "Check for Presence of User .forward Files" - description: "The .forward file specifies an email address to forward the user's mail to." - rationale: "Use of the .forward file poses a security risk in that sensitive data may be inadvertently transferred outside the organization. The .forward file also poses a risk as it can be used to execute commands that may perform unintended actions." - remediation: "Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user .forward files and determine the action to be taken in accordance with site policy." - compliance: - - cis: "13.19" - condition: any - rules: - - 'd:$home_dirs -> r:^.forward$;' - - id: 10606 - title: "Ensure shadow group is empty" - description: "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." - rationale: "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." - remediation: "Remove all users from the shadow group, and change the primary group of any users with shadow as their primary group." - compliance: - - cis: "13.20" - condition: any - rules: - - 'f:/etc/group -> IN !r:^# && r:shadow:\w*:\w*:\S+;' diff --git a/sca/debian/cis_debianlinux7-8_L2_rcl.yml b/sca/debian/cis_debianlinux7-8_L2_rcl.yml deleted file mode 100755 index 426dcbfcc..000000000 --- a/sca/debian/cis_debianlinux7-8_L2_rcl.yml +++ /dev/null @@ -1,384 +0,0 @@ -# Security Configuration assessment -# Level 2 CIS Checks for Debian Linux 7 and Debian Linux 8 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# Center for Internet Security Debian Linux 7 Benchmark v1.0.0 - 12-31-2015 -# Center for Internet Security Debian Linux 8 Benchmark v2.0.0 - 12-28-2018 - -policy: - id: "cis_debianlinux7-8_L2" - file: "cis_debianlinux7-8_L2_rcl.yml" - name: "CIS benchmark for Debian/Linux 7 and 8 L2" - description: "This document provides prescriptive guidance for establishing a secure configuration posture for Debian Linux 7 and 8." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check Debian version" - description: "Requirements for running the SCA scan against Debian/Ubuntu" - condition: "all required" - rules: - - 'f:/etc/debian_version;' - - 'f:/proc/sys/kernel/ostype -> Linux;' - -checks: -# 2 Filesystem Configuration - - id: 11000 - title: "Disable Mounting of cramfs Filesystems" - description: "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." - rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." - remediation: "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install cramfs /bin/true" - compliance: - - cis: "2.18" - condition: any - rules: - - 'f:!/etc/modprobe.d/CIS.conf;' - - 'f:/etc/modprobe.d/CIS.conf -> !r:^install cramfs /bin/true;' - - id: 11001 - title: "Disable Mounting of freevxfs Filesystems" - description: "The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the primary filesystem type for HP-UX operating systems." - rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." - remediation: "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install freevxfs /bin/true" - compliance: - - cis: "2.19" - condition: any - rules: - - 'f:!/etc/modprobe.d/CIS.conf;' - - 'f:/etc/modprobe.d/CIS.conf -> !r:^install freevxfs /bin/true;' - - id: 11002 - title: "Disable Mounting of jffs2 Filesystems" - description: "The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices." - rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." - remediation: "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install jffs2 /bin/true" - compliance: - - cis: "2.20" - condition: any - rules: - - 'f:!/etc/modprobe.d/CIS.conf;' - - 'f:/etc/modprobe.d/CIS.conf -> !r:^install jffs2 /bin/true;' - - id: 11003 - title: "Disable Mounting of hfs Filesystems" - description: "The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS filesystems." - rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." - remediation: "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfs /bin/true" - compliance: - - cis: "2.21" - condition: any - rules: - - 'f:!/etc/modprobe.d/CIS.conf;' - - 'f:/etc/modprobe.d/CIS.conf -> !r:^install hfs /bin/true;' - - id: 11004 - title: "Disable Mounting of hfsplus Filesystems" - description: "The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems." - rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." - remediation: "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfsplus /bin/true" - compliance: - - cis: "2.22" - condition: any - rules: - - 'f:!/etc/modprobe.d/CIS.conf;' - - 'f:/etc/modprobe.d/CIS.conf -> !r:^install hfsplus /bin/true;' - - id: 11005 - title: "Disable Mounting of squashfs Filesystems" - description: "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." - rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." - remediation: "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install squashfs /bin/true" - compliance: - - cis: "2.23" - condition: any - rules: - - 'f:!/etc/modprobe.d/CIS.conf;' - - 'f:/etc/modprobe.d/CIS.conf -> !r:^install squashfs /bin/true;' - - id: 11006 - title: "Disable Mounting of udf Filesystems" - description: "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" - rationale: "Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." - remediation: "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install udf /bin/true" - compliance: - - cis: "2.24" - condition: any - rules: - - 'f:!/etc/modprobe.d/CIS.conf;' - - 'f:/etc/modprobe.d/CIS.conf -> !r:^install udf /bin/true;' -# 4 Additional Process Hardening - - id: 11007 - title: "Activate AppArmor" - description: "AppArmor provides a Mandatory Access Control (MAC) system that greatly augments the default Discretionary Access Control (DAC) model." - rationale: "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." - remediation: "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." - compliance: - - cis: "4.5" - condition: any - rules: - - 'f:/etc/default/grub -> NIN r:apparmor=1 && r:security=apparmor;' -# 8.1 Configure System Accounting (auditd) - - id: 11008 - title: "Configure Audit Log Storage Size" - description: "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." - rationale: "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." - remediation: "Set the max_log_file parameter in /etc/audit/auditd.conf max_log_file = Note: MB is the number of MegaBytes the file can be." - compliance: - - cis: "8.1.1.1" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/auditd.conf;' - - 'f:/etc/audit/auditd.conf -> !r:max_log_file\s*=\s*\d+;' - - id: 11009 - title: "Disable System on Audit Log Full" - description: "The auditd daemon can be configured to halt the system when the audit logs are full." - rationale: "In high security contexts, the risk of detecting unauthorized access or nonrepudiation exceeds the benefit of the system's availability." - remediation: "Add the following lines to the /etc/audit/auditd.conf file. space_left_action = email action_mail_acct = root admin_space_left_action = halt" - compliance: - - cis: "8.1.1.2" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/auditd.conf;' - - 'f:/etc/audit/auditd.conf -> !r:^space_left_action\s*=\s*email;' - - 'f:/etc/audit/auditd.conf -> IN !r:^# && r:space_left_action\s*=\s*ignore|syslog|suspend|single|halt;' - - 'f:/etc/audit/auditd.conf -> !r:^action_mail_acct\s*=\s*root;' - - 'f:/etc/audit/auditd.conf -> !r:^admin_space_left_action\s*=\s*halt;' - - 'f:/etc/audit/auditd.conf -> IN !r:^# && r:admin_space_left_action\s*=\s*ignore|syslog|email|suspend|single;' - - id: 11010 - title: "Keep All Auditing Information" - description: "Normally, auditd will hold 4 logs of maximum log file size before deleting older log files." - rationale: "In high security contexts, the benefits of maintaining a long audit history exceed the cost of storing the audit history." - remediation: "Add the following line to the /etc/audit/auditd.conf file. max_log_file_action = keep_logs" - compliance: - - cis: "8.1.1.3" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/auditd.conf;' - - 'f:/etc/audit/auditd.conf -> !r:^max_log_file_action\s*=\s*keep_logs;' - - 'f:/etc/audit/auditd.conf -> IN !r:^# && r:max_log_file_action\s*=\s*ignore|syslog|suspend|rotate;' - - id: 11011 - title: "Enable Auditing for Processes That Start Prior to auditd" - description: "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." - rationale: "Audit events need to be captured on processes that start up prior to auditd, so that potential malicious activity cannot go undetected." - remediation: "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" - compliance: - - cis: "8.1.3" - condition: any - rules: - - 'f:/etc/default/grub -> !r:^GRUB_CMDLINE_LINUX\s*=\s*\.*audit\s*=\s*1\.*;' - - id: 11012 - title: "Record Events That Modify Date and Time Information" - description: "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\"" - rationale: "Unexpected changes in system date and/or time could be a sign of malicious activity on the system." - remediation: "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" - compliance: - - cis: "8.1.4" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/audit.rules;' - - 'f:/etc/audit/audit.rules -> !r:^-a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change;' - - 'f:/etc/audit/audit.rules -> !r:^-a always,exit -F arch=b32 -S clock_settime -k time-change;' - - 'f:/etc/audit/audit.rules -> !r:^-w /etc/localtime -p wa -k time-change;' - - id: 11013 - title: "Record Events That Modify User/Group Information" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "8.1.5" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/audit.rules;' - - 'f:/etc/audit/audit.rules -> !r:^-w /etc/group -p wa -k identity;' - - 'f:/etc/audit/audit.rules -> !r:^-w /etc/passwd -p wa -k identity;' - - 'f:/etc/audit/audit.rules -> !r:^-w /etc/gshadow -p wa -k identity;' - - 'f:/etc/audit/audit.rules -> !r:^-w /etc/shadow -p wa -k identity;' - - 'f:/etc/audit/audit.rules -> !r:^-w /etc/security/opasswd -p wa -k identity;' - - id: 11014 - title: "Record Events That Modify the System's Network Environment" - description: "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." - rationale: "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.\"" - remediation: "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" - compliance: - - cis: "8.1.6" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/audit.rules;' - - 'f:/etc/audit/audit.rules -> !r:^-a exit,always -F arch=b32 -S sethostname -S setdomainname -k system-locale;' - - 'f:/etc/audit/audit.rules -> !r:^-w /etc/issue -p wa -k system-locale;' - - 'f:/etc/audit/audit.rules -> !r:^-w /etc/issue.net -p wa -k system-locale;' - - 'f:/etc/audit/audit.rules -> !r:^-w /etc/hosts -p wa -k system-locale;' - - 'f:/etc/audit/audit.rules -> !r:^-w /etc/network -p wa -k system-locale;' - - id: 11015 - title: "Record Events That Modify the System's Mandatory Access Controls" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "8.1.7" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/audit.rules;' - - 'f:/etc/audit/audit.rules -> !r:^-w /etc/selinux/ -p wa -k MAC-policy;' - - id: 11016 - title: "Collect Login and Logout Events" - description: "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" - rationale: "Monitoring login/logout events could provide a system administrator with information associated with brute force attacks against user logins." - remediation: "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 # Execute the following command to restart auditd # pkill -HUP -P 1 auditd" - compliance: - - cis: "8.1.8" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/audit.rules;' - - 'f:/etc/audit/audit.rules -> !r:^-w /var/log/faillog -p wa -k logins;' - - 'f:/etc/audit/audit.rules -> !r:^-w /var/log/lastlog -p wa -k logins;' - - 'f:/etc/audit/audit.rules -> !r:^-w /var/log/tallylog -p wa -k logins;' - - id: 11017 - title: "Collect Session Initiation Information" - description: "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.\"" - rationale: "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)." - remediation: "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)" - compliance: - - cis: "8.1.9" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/audit.rules;' - - 'f:/etc/audit/audit.rules -> !r:^-w /var/run/utmp -p wa -k session;' - - 'f:/etc/audit/audit.rules -> !r:^-w /var/log/wtmp -p wa -k session;' - - 'f:/etc/audit/audit.rules -> !r:^-w /var/log/btmp -p wa -k session;' - - id: 11018 - title: "Collect Discretionary Access Control Permission Modification Events" - description: "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 userids (auid >= 1000) and will ignore Daemon events (auid = 4294967295). All audit records will be tagged with the identifier \"perm_mod.\"" - rationale: "Monitoring for changes in file attributes could alert a system administrator to activity that could indicate intruder activity or policy violation." - remediation: "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" - compliance: - - cis: "8.1.10" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/audit.rules;' - - 'f:/etc/audit/audit.rules -> !r:^-a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=1000 \\;' - - 'f:/etc/audit/audit.rules -> !r:^-F auid!=4294967295 -k perm_mod;' - - 'f:/etc/audit/audit.rules -> !r:^-a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 \\;' - - 'f:/etc/audit/audit.rules -> !r:^-a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S \\;' - - 'f:/etc/audit/audit.rules -> !r:^lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod;' - - id: 11019 - title: "Collect Unsuccessful Unauthorized Access Attempts to Files" - description: "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.\"" - rationale: "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." - remediation: "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" - compliance: - - cis: "8.1.11" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/audit.rules;' - - 'f:/etc/audit/audit.rules -> !r:^-a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate \\;' - - 'f:/etc/audit/audit.rules -> !r:^-F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access;' - - 'f:/etc/audit/audit.rules -> !r:^-F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access;' - - id: 11020 - title: "Collect Successful File System Mounts" - description: "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" - rationale: "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." - remediation: "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" - compliance: - - cis: "8.1.13" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/audit.rules;' - - 'f:/etc/audit/audit.rules -> !r:^-a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts;' - - id: 11021 - title: "Collect File Deletion Events by User" - description: "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\"." - rationale: "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." - remediation: "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" - compliance: - - cis: "8.1.14" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/audit.rules;' - - 'f:/etc/audit/audit.rules -> !r:^-a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 \\;' - - 'f:/etc/audit/audit.rules -> !r:^-F auid!=4294967295 -k delete;' - - id: 11022 - title: "Collect Changes to System Administration Scope (sudoers)" - description: "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.\"" - rationale: "Changes in the /etc/sudoers file can indicate that an unauthorized change has been made to scope of system administrator activity." - remediation: "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" - compliance: - - cis: "8.1.15" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/audit.rules;' - - 'f:/etc/audit/audit.rules -> !r:^-w /etc/sudoers -p wa -k scope;' - - id: 11023 - title: "Collect System Administrator Actions (sudolog)" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "8.1.16" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/audit.rules;' - - 'f:/etc/audit/audit.rules -> !r:^-w /var/log/sudo.log -p wa -k actions;' - - id: 11024 - title: "Collect Kernel Module Loading and Unloading" - description: "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\"." - rationale: "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." - remediation: "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" - compliance: - - cis: "8.1.17" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/audit.rules;' - - 'f:/etc/audit/audit.rules -> !r:^-w /sbin/insmod -p x -k modules;' - - 'f:/etc/audit/audit.rules -> !r:^-w /sbin/rmmod -p x -k modules;' - - 'f:/etc/audit/audit.rules -> !r:^-w /sbin/modprobe -p x -k modules;' - - 'f:/etc/audit/audit.rules -> !r:^-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;' - - id: 11025 - title: "Make the Audit Configuration Immutable" - description: "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" - rationale: "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." - remediation: "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" - compliance: - - cis: "8.1.18" - condition: any - rules: - - 'f:!/etc/audit;' - - 'f:!/etc/audit/audit.rules;' - - 'f:/etc/audit/audit.rules -> !r:^-e 2$;' -# 8.3 Advanced Intrusion Detection Environment (AIDE) - - id: 11026 - title: "Install AIDE" - description: "In some installations, AIDE is not installed automatically" - rationale: "Install AIDE to make use of the file integrity features to monitor critical files for changes that could affect the security of the system." - remediation: "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." - compliance: - - cis: "8.3.1" - condition: any - rules: - - 'f:!/usr/sbin/aideinit;' - - id: 11027 - title: "Implement Periodic Execution of File Integrity" - description: "Implement periodic file checking, in compliance with site policy" - rationale: "Periodic file checking allows the system administrator to determine on a regular basis if critical files have been changed in an unauthorized fashion." - remediation: "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." - compliance: - - cis: "8.3.2" - condition: any - rules: - - 'f:/etc/crontab -> !r:/usr/sbin/aide --check;' diff --git a/sca/generic/sca_unix_audit.yml b/sca/generic/sca_unix_audit.yml new file mode 100644 index 000000000..26bcfa147 --- /dev/null +++ b/sca/generic/sca_unix_audit.yml @@ -0,0 +1,307 @@ +# Security Configuration Assessment +# Audit for UNIX systems +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation + +policy: + id: "unix_audit" + file: "sca_unix_audit.yml" + name: "System audit for Unix based systems" + description: "Guidance for establishing a secure configuration for Unix based systems." + references: + - https://www.ssh.com/ssh/ + +requirements: + title: "Check that the SSH service and password-related files are present on the system" + description: "Requirements for running the SCA scan against the Unix based systems policy." + condition: any + rules: + - 'f:$sshd_file' + - 'f:/etc/passwd' + - 'f:/etc/shadow' + +variables: + $sshd_file: /etc/ssh/sshd_config + $pam_d_files: /etc/pam.d/common-password,/etc/pam.d/password-auth,/etc/pam.d/system-auth,/etc/pam.d/system-auth-ac,/etc/pam.d/passwd + +checks: + - id: 4000 + title: "SSH Hardening: Port should not be 22" + description: "The ssh daemon should not be listening on port 22 (the default value) for incoming connections." + rationale: "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." + remediation: "Change the Port option value in the sshd_config file." + compliance: + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:Port && !r:\s*\t*22$' + + - id: 4001 + title: "SSH Hardening: Protocol should be set to 2" + description: "The SSH protocol should not be 1." + rationale: "The Protocol parameter dictates which version of the SSH communication and encryption protocols are in use. Version 1 of the SSH protocol has weaknesses." + remediation: "Change the Protocol option value in the sshd_config file." + compliance: + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:$sshd_file -> r:^\s*\t*Protocol\s*\t*2' + + - id: 4002 + title: "SSH Hardening: Root account should not be able to log in" + description: "The option PermitRootLogin should be set to no." + rationale: "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." + remediation: "Change the PermitRootLogin option value in the sshd_config file." + condition: all + rules: + - 'f:$sshd_file -> r:^\s*PermitRootLogin\s*\t*no' + + - id: 4003 + title: "SSH Hardening: No Public Key authentication" + description: "The option PubkeyAuthentication should be set yes." + rationale: "Access only by public key. Generally people will use weak passwords and have poor password practices. Keys are considered stronger than password." + remediation: "Change the PubkeyAuthentication option value in the sshd_config file." + compliance: + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:$sshd_file -> r:^\s*PubkeyAuthentication\s*\t*yes' + + - id: 4004 + title: "SSH Hardening: Password Authentication should be disabled" + description: "The option PasswordAuthentication should be set to no." + rationale: "The option PasswordAuthentication specifies whether we should use password-based authentication. Use public key authentication instead of passwords." + remediation: "Change the PasswordAuthentication option value in the sshd_config file." + compliance: + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:$sshd_file -> r:^\s*PasswordAuthentication\s*\t*no' + + - id: 4005 + title: "SSH Hardening: Empty passwords should not be allowed" + description: "The option PermitEmptyPasswords should be set to no." + rationale: "The option PermitEmptyPasswords specifies whether the server allows logging in to accounts with a null password. Accounts with null passwords are a bad practice." + remediation: "Change the PermitEmptyPasswords option value in the sshd_config file." + compliance: + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:$sshd_file -> r:^\s*PermitEmptyPasswords\s*\t*no' + + - id: 4006 + title: "SSH Hardening: Rhost or shost should not be used for authentication" + description: "The option IgnoreRhosts should be set to yes." + rationale: "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." + remediation: "Change the IgnoreRhosts option value in the sshd_config file." + compliance: + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:$sshd_file -> r:^\s*\t*IgnoreRhosts\s*\t*yes' + + - id: 4007 + title: "SSH Hardening: Grace Time should be one minute or less." + description: "The option LoginGraceTime should be set to 60 or less." + rationale: "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." + remediation: "Change the LoginGraceTime option value in the sshd_config file." + compliance: + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:$sshd_file -> n:^\s*LoginGraceTime\s*\t*(\d+)s compare <= 60' + + - id: 4008 + title: "SSH Hardening: Wrong Maximum number of authentication attempts" + description: "The option MaxAuthTries should be set to 4 or less." + rationale: "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." + remediation: "Change the MaxAuthTries option value in the sshd_config file." + compliance: + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:$sshd_file -> n:^\s*MaxAuthTries\s*\t*(\d+) compare <= 4' + + - id: 4009 + title: "SSH Hardening: Ensure SSH HostbasedAuthentication is disabled" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> r:^\s*\t*HostbasedAuthentication\s*\t*no' + + - id: 4010 + title: "Ensure retry option for passwords is less than 3" + description: "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." + rationale: "Strong passwords protect systems from being hacked through brute force methods." + remediation: "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." + compliance: + - cis_csc: ["4.4", "5.7", "16.12"] + references: + - https://linux-audit.com/configure-the-minimum-password-length-on-linux-systems/ + condition: all + rules: + - 'f:$pam_d_files -> r:password && r:requisite|required && r:pam_cracklib.so|pam_pwquality.so && n:retry\s*=\s*(\d+) compare <= 3' + + - id: 4011 + title: "Ensure passwords are longer than 14 characters" + description: "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." + rationale: "Strong passwords protect systems from being hacked through brute force methods." + remediation: "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." + compliance: + - cis_csc: ["4.4", "5.7", "16.12"] + references: + - https://linux-audit.com/configure-the-minimum-password-length-on-linux-systems/ + condition: all + rules: + - 'f:$pam_d_files -> r:pam_cracklib.so && n:minlen=(\d+) compare >= 14' + + - id: 4012 + title: "Ensure passwords contain at least one digit" + description: "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." + rationale: "Strong passwords protect systems from being hacked through brute force methods." + remediation: "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." + compliance: + - cis_csc: ["4.4", "5.7", "16.12"] + references: + - https://linux-audit.com/configure-the-minimum-password-length-on-linux-systems/ + condition: all + rules: + - 'f:$pam_d_files -> r:pam_cracklib.so && r:dcredit\s*\t*=' + + - id: 4013 + title: "Ensure passwords contain at least one lowercase character" + description: "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." + rationale: "Strong passwords protect systems from being hacked through brute force methods." + remediation: "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." + compliance: + - cis_csc: ["4.4", "5.7", "16.12"] + references: + - https://linux-audit.com/configure-the-minimum-password-length-on-linux-systems/ + condition: all + rules: + - 'f:$pam_d_files -> r:pam_cracklib.so && r:lcredit\s*\t*=' + + - id: 4014 + title: "Ensure passwords contain at least one uppercase character" + description: "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." + rationale: "Strong passwords protect systems from being hacked through brute force methods." + remediation: "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." + compliance: + - cis_csc: ["4.4", "5.7", "16.12"] + references: + - https://linux-audit.com/configure-the-minimum-password-length-on-linux-systems/ + condition: all + rules: + - 'f:$pam_d_files -> r:pam_cracklib.so && r:ucredit\s*\t*=' + + - id: 4015 + title: "Ensure passwords contain at least one special character" + description: "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." + rationale: "Strong passwords protect systems from being hacked through brute force methods." + remediation: "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." + compliance: + - cis_csc: ["4.4", "5.7", "16.12"] + references: + - https://linux-audit.com/configure-the-minimum-password-length-on-linux-systems/ + condition: all + rules: + - 'f:$pam_d_files -> r:pam_cracklib.so && r:ocredit\s*\t*=' + + - id: 4016 + title: "Ensure lockout for failed password attempts is configured" + description: "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." + rationale: "Locking out user IDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems." + remediation: "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" + condition: all + rules: + - 'f:/etc/pam.d/common-auth -> !r:^# && r:auth\s*\t*required\s*\t*pam_tally2.so && r:onerr=fail && r:audit && r:silent && r:deny\s*=\s*\d && r:unlock_time\s*=\s*\d\d\d+' + + - id: 4017 + title: "Ensure password hashing algorithm is SHA-512" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis_csc: ["16.14"] + condition: all + rules: + - 'f:$pam_d_files -> r:^password\.+pam_unix.so\.+sha512' + + - id: 4018 + title: "Ensure passwords in /etc/shadow are hashed with SHA-512 or SHA-256" + description: "SHA-512 and SHA-256 are much stronger hashing algorithms than MD5." + rationale: "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." + remediation: "Set the default algorithm for password hashing in /etc/shadow to SHA-512 or SHA-256." + references: + - https://linux-audit.com/password-security-with-linux-etc-shadow-file/ + - https://docs.oracle.com/cd/E19253-01/816-4557/concept-23/index.html + condition: none + rules: + - 'f:/etc/shadow -> r:^\w+:\$1\$|^\w+:\$2\$|^\w+:\$md5\$|^\w+:\$md5\$|^\w+:\$__unix__\$' + + - id: 4019 + title: "Ensure password expiration is 365 days or less" + description: "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." + rationale: "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." + remediation: "Set the PASS_MAX_DAYS parameter to conform to site policy in /etc/login.defs." + compliance: + - cis_csc: ["4.4", "16"] + references: + - https://www.thegeekdiary.com/understanding-etclogin-defs-file + condition: any + rules: + - 'f:/etc/login.defs -> n:^PASS_MAX_DAYS\s*\t*(\d+)$ compare <= 365' + + - id: 4020 + title: "Ensure SELinux or AppArmor are installed" + description: "SELinux and AppArmor provide Mandatory Access Controls." + rationale: "Without a Mandatory Access Control system installed only the default Discretionary Access Control system will be available." + remediation: "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" + compliance: + - cis_csc: ["14.4", "14.6"] + condition: any + rules: + - 'c:dpkg -s selinux-basics -> r:install ok installed' + - 'c:dpkg -s apparmor -> r:install ok installed' + + - id: 4021 + title: "Ensure CUPS is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable cups: # systemctl disable cups" + compliance: + - cis_csc: ["9.1", "9.2"] + references: + - 'https://www.cups.org' + condition: none + rules: + - 'c:systemctl is-enabled cups -> r:^enabled' + + - id: 4022 + title: "Ensure auditd service is enabled" + description: "Turn on the auditd daemon to record system events." + rationale: "The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring." + remediation: "Run the following command to enable auditd: # systemctl enable auditd" + compliance: + - cis_csc: ["6.2", "6.3"] + condition: all + rules: + - 'c:systemctl is-enabled auditd -> r:^enabled' diff --git a/sca/generic/system_audit_pw.yml b/sca/generic/system_audit_pw.yml deleted file mode 100755 index b8e8a89ac..000000000 --- a/sca/generic/system_audit_pw.yml +++ /dev/null @@ -1,143 +0,0 @@ -# Security Configuration assessment -# Checks for Password Security on Linux Systems -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based mainly on -# Center for Internet Security Debian Linux 9 Benchmark v1.0.0 - 12-21-2018 -# Center for Internet Security Red Hat Enterprise Linux 7 v2.2.0 - 12-27-2017 -# Center for Internet Security SUSE Linux Enterprise 12 v2.1.0 - 12-28-2017 -# OSSEC v3.2.0 - -policy: - id: "system_audit_pw" - file: "system_audit_pw.yml" - name: "System audit for password-related vulnerabilities" - description: "Guidance for establishing a secure configuration for password vulnerabilities." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check that password-related files are present on the system" - description: "Requirements for running the SCA scan against the password-related policy." - condition: "any required" - rules: - - 'f:/etc/passwd;' - - 'f:/etc/shadow;' - -checks: -# 5.3 Configure PAM - - id: 13000 - title: "Ensure password creation requirements are configured" - description: "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." - rationale: "Strong passwords protect systems from being hacked through brute force methods." - remediation: "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" - compliance: - - cis: "5.3.1" - - cis_csc: "4.4, 5.7, 16.12" - references: - - https://linux-audit.com/configure-the-minimum-password-length-on-linux-systems/ - condition: any - rules: - - 'f:/etc/pam.d/common-password -> !r:^password\s*\t*requisite\s*\t*pam_cracklib.so\.+try_first_pass|^password\s*\t*requisite\s*\t*pam_pwquality.so\.+try_first_pass|^password\s*\t*required\s*\t*pam_cracklib.so\.+try_first_pass|^password\s*\t*required\s*\t*pam_pwquality.so\.+try_first_pass;' - - 'f:/etc/pam.d/common-password -> !r:^password\s*\t*requisite\s*\t*pam_cracklib.so\.+retry=\d+|^password\s*\t*requisite\s*\t*pam_pwquality.so\.+retry=\d+|^password\s*\t*required\s*\t*pam_cracklib.so\.+retry=\d+|^password\s*\t*required\s*\t*pam_pwquality.so\.+retry=\d+;' - - 'f:/etc/pam.d/password-auth -> !r:^password\s*\t*requisite\s*\t*pam_cracklib.so\.+try_first_pass|^password\s*\t*requisite\s*\t*pam_pwquality.so\.+try_first_pass|^password\s*\t*required\s*\t*pam_cracklib.so\.+try_first_pass|^password\s*\t*required\s*\t*pam_pwquality.so\.+try_first_pass;' - - 'f:/etc/pam.d/password-auth -> !r:^password\s*\t*requisite\s*\t*pam_cracklib.so\.+retry=\d+|^password\s*\t*requisite\s*\t*pam_pwquality.so\.+retry=\d+|^password\s*\t*required\s*\t*pam_cracklib.so\.+retry=\d+|^password\s*\t*required\s*\t*pam_pwquality.so\.+retry=\d+;' - - 'f:/etc/pam.d/system-auth -> !r:^password\s*\t*requisite\s*\t*pam_cracklib.so\.+try_first_pass|^password\s*\t*requisite\s*\t*pam_pwquality.so\.+try_first_pass|^password\s*\t*required\s*\t*pam_cracklib.so\.+try_first_pass|^password\s*\t*required\s*\t*pam_pwquality.so\.+try_first_pass;' - - 'f:/etc/pam.d/system-auth -> !r:^password\s*\t*requisite\s*\t*pam_cracklib.so\.+retry=\d+|^password\s*\t*requisite\s*\t*pam_pwquality.so\.+retry=\d+|^password\s*\t*required\s*\t*pam_cracklib.so\.+retry=\d+|^password\s*\t*required\s*\t*pam_pwquality.so\.+retry=\d+;' - - 'f:/etc/pam.d/system-auth-ac -> !r:^password\s*\t*requisite\s*\t*pam_cracklib.so\.+try_first_pass|^password\s*\t*requisite\s*\t*pam_pwquality.so\.+try_first_pass|^password\s*\t*required\s*\t*pam_cracklib.so\.+try_first_pass|^password\s*\t*required\s*\t*pam_pwquality.so\.+try_first_pass;' - - 'f:/etc/pam.d/system-auth-ac -> !r:^password\s*\t*requisite\s*\t*pam_cracklib.so\.+retry=\d+|^password\s*\t*requisite\s*\t*pam_pwquality.so\.+retry=\d+|^password\s*\t*required\s*\t*pam_cracklib.so\.+retry=\d+|^password\s*\t*required\s*\t*pam_pwquality.so\.+retry=\d+;' - - 'f:/etc/pam.d/passwd -> !r:^password\s*\t*requisite\s*\t*pam_cracklib.so\.+try_first_pass|^password\s*\t*requisite\s*\t*pam_pwquality.so\.+try_first_pass|^password\s*\t*required\s*\t*pam_cracklib.so\.+try_first_pass|^password\s*\t*required\s*\t*pam_pwquality.so\.+try_first_pass|^@include\s+common-password;' - - 'f:/etc/pam.d/passwd -> !r:^password\s*\t*requisite\s*\t*pam_cracklib.so\.+retry=\d+|^password\s*\t*requisite\s*\t*pam_pwquality.so\.+retry=\d+|^password\s*\t*required\s*\t*pam_cracklib.so\.+retry=\d+|^password\s*\t*required\s*\t*pam_pwquality.so\.+retry=\d+|^@include\s+common-password;' - - 'f:/etc/pam.d/common-password -> IN r:pam_cracklib.so && !r:minlen=\d\d+;' - - 'f:/etc/pam.d/password-auth -> IN r:pam_cracklib.so && !r:minlen=\d\d+;' - - 'f:/etc/pam.d/system-auth -> IN r:pam_cracklib.so && !r:minlen=\d\d+;' - - 'f:/etc/pam.d/passwd -> IN r:pam_cracklib.so && !r:minlen=\d\d+;' - - 'f:/etc/security/pwquality.conf -> !r:^minlen=\d\d+;' - - 'f:/etc/pam.d/common-password -> IN r:pam_cracklib.so && !r:dcredit=\p*\d+;' - - 'f:/etc/pam.d/password-auth -> IN r:pam_cracklib.so && !r:dcredit=\p*\d+;' - - 'f:/etc/pam.d/system-auth -> IN r:pam_cracklib.so && !r:dcredit=\p*\d+;' - - 'f:/etc/pam.d/passwd -> IN r:pam_cracklib.so && !r:dcredit=\p*\d+;' - - 'f:/etc/security/pwquality.conf -> !r:^dcredit=\p*\d+;' - - 'f:/etc/pam.d/common-password -> IN r:pam_cracklib.so && !r:lcredit=\p*\d+;' - - 'f:/etc/pam.d/password-auth -> IN r:pam_cracklib.so && !r:lcredit=\p*\d+;' - - 'f:/etc/pam.d/system-auth -> IN r:pam_cracklib.so && !r:lcredit=\p*\d+;' - - 'f:/etc/pam.d/passwd -> IN r:pam_cracklib.so && !r:lcredit=\p*\d+;' - - 'f:/etc/security/pwquality.conf -> !r:^lcredit=\p*\d+;' - - 'f:/etc/pam.d/common-password -> IN r:pam_cracklib.so && !r:ocredit=\p*\d+;' - - 'f:/etc/pam.d/password-auth -> IN r:pam_cracklib.so && !r:ocredit=\p*\d+;' - - 'f:/etc/pam.d/system-auth -> IN r:pam_cracklib.so && !r:ocredit=\p*\d+;' - - 'f:/etc/pam.d/passwd -> IN r:pam_cracklib.so && !r:ocredit=\p*\d+;' - - 'f:/etc/security/pwquality.conf -> !r:^ocredit=\p*\d+;' - - 'f:/etc/pam.d/common-password -> IN r:pam_cracklib.so && !r:ucredit=\p*\d+;' - - 'f:/etc/pam.d/password-auth -> IN r:pam_cracklib.so && !r:ucredit=\p*\d+;' - - 'f:/etc/pam.d/system-auth -> IN r:pam_cracklib.so && !r:ucredit=\p*\d+;' - - 'f:/etc/pam.d/passwd -> IN r:pam_cracklib.so && !r:ucredit=\p*\d+;' - - 'f:/etc/security/pwquality.conf -> !r:^ucredit=\p*\d+;' - - id: 13001 - title: "Ensure password hashing algorithm is SHA-512" - description: "The password encryption should use a strong hashing algorithm such as SHA-256 or SHA-512 instead of MD5." - rationale: "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." - remediation: "Edit the /etc/pam.d/common-password file or /etc/pam.d/password-auth and /etc/pam.d/system-auth files (depending on the Linux distribution used) to include the sha512 option for pam_unix.so." - compliance: - - cis: "5.3.4" - - cis_csc: "16.4, 16.14" - references: - - https://security.stackexchange.com/questions/77349/how-can-i-find-out-the-password-hashing-schemes-used-by-the-specific-unix-accoun - - https://docs.oracle.com/cd/E26505_01/html/E27224/secsystask-42.html - condition: any - rules: - - 'f:/etc/security/policy.conf -> IN !r:^# && r:^CRYPT_DEFAULT=1|^CRYPT_DEFAULT=2|^CRYPT_DEFAULT=2a|^CRYPT_DEFAULT=2x|^CRYPT_DEFAULT=2y|^CRYPT_DEFAULT=md5|^CRYPT_DEFAULT=__unix__;' - - 'f:/etc/security/policy.conf -> !r:^CRYPT_DEFAULT=\d;' - - 'f:/etc/login.defs -> IN !r:^# && r:^ENCRYPT_METHOD\s+MD5|^ENCRYPT_METHOD\s+DES;' - - 'f:/etc/login.defs -> !r:^ENCRYPT_METHOD\s+SHA512|^ENCRYPT_METHOD\s+SHA256;' - - 'f:/etc/pam.d/common-password -> IN !r:^# && r:password\.+pam_unix.so\.+md5|password\.+pam_unix.so\.+des;' - - 'f:/etc/pam.d/common-password -> !r:^password\.+pam_unix.so\.+sha512|^password\.+pam_unix.so\.+sha256;' - - 'f:/etc/pam.d/password-auth -> IN !r:^# && r:password\.+pam_unix.so\.+md5|password\.+pam_unix.so\.+des;' - - 'f:/etc/pam.d/password-auth -> !r:^password\.+pam_unix.so\.+sha512|^password\.+pam_unix.so\.+sha256;' - - 'f:/etc/pam.d/system-auth -> IN !r:^# && r:password\.+pam_unix.so\.+md5|password\.+pam_unix.so\.+des;' - - 'f:/etc/pam.d/system-auth -> IN !r:^password\.+pam_unix.so\.+sha512|^password\.+pam_unix.so\.+sha256;' - - 'f:/etc/pam.d/system-auth-ac -> IN !r:^# && r:password\.+pam_unix.so\.+md5|password\.+pam_unix.so\.+des;' - - 'f:/etc/pam.d/system-auth-ac -> !r:^password\.+pam_unix.so\.+sha512|^password\.+pam_unix.so\.+sha256;' - - id: 13002 - title: "Ensure passwords in /etc/shadow are hashed with SHA-512 or SHA-256" - description: "SHA-512 and SHA-256 are much stronger hashing algorithms than MD5." - rationale: "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." - remediation: "Set the default algorithm for password hashing in /etc/shadow to SHA-512 or SHA-256." - references: - - https://linux-audit.com/password-security-with-linux-etc-shadow-file/ - - https://docs.oracle.com/cd/E19253-01/816-4557/concept-23/index.html - condition: any - rules: - - 'f:/etc/shadow -> IN !r:^# && !r:^\w+:NP:\d+:\d*:\d*:\d*:\d*:\d*:\d*$ && r:^\w+:\w\.*:\d+:\d*:\d*:\d*:\d*:\d*:\d*$;' - - 'f:/etc/shadow -> IN !r:^# && r:\w+:\$1\$\.+;' - - 'f:/etc/shadow -> IN !r:^# && r:\w+:\$2\$\.+;' - - 'f:/etc/shadow -> IN !r:^# && r:\w+:\$2a\$\.+;' - - 'f:/etc/shadow -> IN !r:^# && r:\w+:\$2x\$\.+;' - - 'f:/etc/shadow -> IN !r:^# && r:\w+:\$2y\$\.+;' - - 'f:/etc/shadow -> IN !r:^# && r:\w+:\$md5\$\.+;' - - 'f:/etc/shadow -> IN !r:^# && r:\w+:\$__unix__\$\.+;' -# 5.4 User accounts and Environment - - id: 13003 - title: "Ensure password expiration is 365 days or less" - description: "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." - rationale: "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." - remediation: "Set the PASS_MAX_DAYS parameter to conform to site policy in /etc/login.defs." - compliance: - - cis: "5.4.1.1" - - cis_csc: "4.4, 16" - references: - - https://www.thegeekdiary.com/understanding-etclogin-defs-file - condition: any - rules: - - 'f:/etc/default/passwd -> !r:^MAXWEEKS=\d\d$;' - - 'f:/etc/default/passwd -> !r:^MINWEEKS=\d;' - - 'f:/etc/default/passwd -> !r:^WARNWEEKS=\d;' - - 'f:/etc/login.defs -> !r:^PASS_MAX_DAYS\s*\t*\d\d$;' - - 'f:/etc/login.defs -> !r:^PASS_MIN_DAYS\s*\t*\d;' - - 'f:/etc/login.defs -> !r:^PASS_WARN_AGE\s*\t*\d;' - diff --git a/sca/generic/system_audit_rcl.yml b/sca/generic/system_audit_rcl.yml deleted file mode 100644 index b378453d3..000000000 --- a/sca/generic/system_audit_rcl.yml +++ /dev/null @@ -1,133 +0,0 @@ -# Security Configuration assessment -# Checks for auditing Linux systems -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation - -policy: - id: "system_audit" - file: "system_audit_rcl.yml" - name: "System audit for web-related vulnerabilities" - description: "Guidance for establishing a secure configuration for web-related vulnerabilities." - -variables: - $php.ini: /etc/php.ini,/var/www/conf/php.ini,/etc/php5/apache2/php.ini; - $web_dirs: /var/www,/var/htdocs,/home/httpd,/usr/local/apache,/usr/local/apache2,/usr/local/www; - - -# PHP checks -checks: - - id: 1000 - title: "PHP - Register globals are enabled" - condition: any - rules: - - 'f:$php.ini -> r:^register_globals = On;' - - id: 1001 - title: "PHP - Expose PHP is enabled" - condition: any - rules: - - 'f:$php.ini -> r:^expose_php = On;' - - id: 1002 - title: "PHP - Allow URL fopen is enabled" - condition: any - rules: - - 'f:$php.ini -> r:^allow_url_fopen = On;' - - id: 1003 - title: "PHP - Displaying of errors is enabled" - condition: any - rules: - - 'f:$php.ini -> r:^display_errors = On;' -# WEB checks - - id: 1004 - title: "Web exploits: '.yop' is an uncommon file name inside htdocs - Possible compromise" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> ^.yop$;' - - id: 1005 - title: "Web exploits: 'id' is an uncommon file name inside htdocs - Possible compromise" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> ^id$;' - - id: 1006 - title: "Web exploits: '.ssh' is an uncommon file name inside htdocs" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> ^.ssh$;' - - id: 1007 - title: "Web exploits: '...' is an uncommon file name inside htdocs - Possible compromise" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> ^...$;' - - id: 1008 - title: "Web exploits: '.shell' is an uncommon file name inside htdocs - Possible compromise" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> ^.shell$;' -# Outdated Web applications - - id: 1009 - title: "Web vulnerability - Outdated WordPress installation" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> ^version.php$ -> IN r:^\.wp_version && >:$wp_version = ''4.4.2'';' - - id: 1010 - title: "Web vulnerability - Outdated Joomla installation" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> ^version.php$ -> IN r:var \.RELEASE && r:''3.4.8'';' - - id: 1011 - title: "Web vulnerability - Outdated osCommerce (v2.2) installation" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - "d:$web_dirs -> ^application_top.php$ -> r:'osCommerce 2.2-;" -# Known backdoors - - id: 1012 - title: "Web vulnerability - Backdoors / Web based malware found - eval(base64_decode)" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> .php$ -> r:eval\(base64_decode\(\paWYo;' - - id: 1013 - title: "Web vulnerability - Backdoors / Web based malware found - eval(base64_decode(POST))" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - condition: any - rules: - - 'd:$web_dirs -> .php$ -> r:eval\(base64_decode\(\S_POST;' - - id: 1014 - title: "Web vulnerability - .htaccess file compromised" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - references: - - https://blog.sucuri.net/2011/05/understanding-htaccess-attacks-part-1.html - condition: any - rules: - - 'd:$web_dirs -> ^.htaccess$ -> r:RewriteCond \S+HTTP_REFERERS \S+google;' - - id: 1015 - title: "Web vulnerability - .htaccess file compromised - auto append" - compliance: - - pci_dss: "6.5, 6.6, 11.4" - references: - - https://blog.sucuri.net/2011/05/understanding-htaccess-attacks-part-1.html - condition: any - rules: - - 'd:$web_dirs -> ^.htaccess$ -> r:php_value auto_append_file;' diff --git a/sca/generic/system_audit_ssh.yml b/sca/generic/system_audit_ssh.yml deleted file mode 100644 index 04adc0edf..000000000 --- a/sca/generic/system_audit_ssh.yml +++ /dev/null @@ -1,117 +0,0 @@ -# Security Configuration assessment -# Checks for SSH hardening -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation - -policy: - id: "system_audit_ssh" - file: "system_audit_ssh.yml" - name: "System audit for SSH hardening" - description: "Guidance for establishing a secure configuration for SSH service vulnerabilities." - references: - - https://www.ssh.com/ssh/ - -requirements: - title: "Check that the SSH service is installed on the system" - description: "Requirements for running the SCA scan against the SSH policy." - condition: "all required" - rules: - - 'f:/etc/ssh/sshd_config;' - -variables: - $sshd_file: /etc/ssh/sshd_config; - - -checks: - - id: 1500 - title: "SSH Hardening - 1: Port 22" - description: "The ssh daemon should not be listening on port 22 (the default value) for incoming connections." - rationale: "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." - remediation: "Change the Port option value in the sshd_config file." - compliance: - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:$sshd_file -> IN !r:^# && r:Port\.+22;' - - id: 1501 - title: "SSH Hardening - 2: Protocol 1" - description: "The SSH protocol should not be 1." - rationale: "The Protocol parameter dictates which version of the SSH communication and encryption protocols are in use. Version 1 of the SSH protocol has weaknesses." - remediation: "Change the Protocol option value in the sshd_config file." - compliance: - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:$sshd_file -> IN !r:^# && r:Protocol\.+1;' - - id: 1502 - title: "SSH Hardening - 3: Root can log in" - description: "The option PermitRootLogin should be set to no." - rationale: "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." - remediation: "Change the PermitRootLogin option value in the sshd_config file." - condition: any - rules: - - 'f:$sshd_file -> !r:^\s*PermitRootLogin\.+no;' - - id: 1503 - title: "SSH Hardening - 4: No Public Key authentication" - description: "The option PubkeyAuthentication should be set yes." - rationale: "Access only by public key. Generally people will use weak passwords and have poor password practices. Keys are considered stronger than password." - remediation: "Change the PubkeyAuthentication option value in the sshd_config file." - compliance: - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:$sshd_file -> !r:^\s*PubkeyAuthentication\.+yes;' - - id: 1504 - title: "SSH Hardening - 5: Password Authentication" - description: "The option PasswordAuthentication should be set to no." - rationale: "The option PasswordAuthentication specifies whether we should use password-based authentication. Use public key authentication instead of passwords." - remediation: "Change the PasswordAuthentication option value in the sshd_config file." - compliance: - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:$sshd_file -> !r:^\s*PasswordAuthentication\.+no;' - - id: 1505 - title: "SSH Hardening - 6: Empty passwords allowed" - description: "The option PermitEmptyPasswords should be set to no." - rationale: "The option PermitEmptyPasswords specifies whether the server allows logging in to accounts with a null password. Accounts with null passwords are a bad practice." - remediation: "Change the PermitEmptyPasswords option value in the sshd_config file." - compliance: - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:$sshd_file -> !r:^\s*PermitEmptyPasswords\.+no;' - - id: 1506 - title: "SSH Hardening - 7: Rhost or shost used for authentication" - description: "The option IgnoreRhosts should be set to yes." - rationale: "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." - remediation: "Change the IgnoreRhosts option value in the sshd_config file." - compliance: - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:$sshd_file -> !r:^\s*IgnoreRhosts\.+yes;' - - id: 1507 - title: "SSH Hardening - 8: Wrong Grace Time." - description: "The option LoginGraceTime should be set to 30." - rationale: "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." - remediation: "Change the LoginGraceTime option value in the sshd_config file." - compliance: - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:$sshd_file -> !r:^\s*LoginGraceTime\s+30\s*$;' - - id: 1508 - title: "SSH Hardening - 9: Wrong Maximum number of authentication attempts" - description: "The option MaxAuthTries should be set to 4." - rationale: "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." - remediation: "Change the MaxAuthTries option value in the sshd_config file." - compliance: - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:$sshd_file -> !r:^\s*MaxAuthTries\s+4\s*$;' diff --git a/sca/rhel/5/cis_rhel5_linux.yml b/sca/rhel/5/cis_rhel5_linux.yml new file mode 100644 index 000000000..80e94beb6 --- /dev/null +++ b/sca/rhel/5/cis_rhel5_linux.yml @@ -0,0 +1,1039 @@ +# Security Configuration Assessment +# CIS Checks for RHEL 5 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Benchmark for Red Hat Enterprise Linux 5 v2.2.0 - 03-02-2015 + +policy: + id: "cis_rhel5" + file: "cis_rhel5_linux.yml" + name: "CIS Benchmark for Red Hat Enterprise Linux 5" + description: "This document, Security Configuration Benchmark for Red Hat Enterprise Linux 5 provides prescriptive guidance for establishing a secure configuration posture for Red Hat Enterprise Linux (RHEL) versions 5.0 - 5.11 running on x86 platforms." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check RHEL5 version" + description: "Requirements for running the SCA scan against RHEL 5 family." + condition: any + rules: + - 'f:/etc/redhat-release -> r:^Red Hat Enterprise Linux && r:release 5' + - 'f:/etc/redhat-release -> r:^CentOS && r:release 5' + - 'f:/etc/redhat-release -> r:^Cloud && r:release 5' + - 'f:/etc/redhat-release -> r:^Oracle && r:release 5' + - 'f:/etc/redhat-release -> r:^Better && r:release 5' + +variables: + $sshd_file: /etc/ssh/sshd_config + +checks: +# 1.1.1 /tmp: partition + - id: 4500 + title: "Create Separate Partition for /tmp" + description: "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.1"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + - CCE-14161-4 + condition: all + rules: + - 'c:mount -> r:\s/tmp\s' + +# 1.1.2 /tmp: nodev + - id: 4501 + title: "Set nodev option for /tmp Partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "Edit the /etc/fstab file and add nodev to the fourth field (mounting options). # mount -o remount,nodev /tmp" + compliance: + - cis: ["1.1.2"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-14412-1 + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:nodev' + +# 1.1.3 /tmp: nosuid + - id: 4502 + title: "Set nosuid option for /tmp Partition" + description: "The nosuid mount option specifies that the filesystem cannot contain set userid files." + rationale: "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 ." + remediation: "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options)." + compliance: + - cis: ["1.1.3"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-14940-1 + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:nosuid' + +# 1.1.4 /tmp: noexec + - id: 4503 + title: "Set noexec option for /tmp Partition" + description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." + rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /tmp ." + remediation: "Edit the /etc/fstab file and add noexec to the fourth field (mounting options). # mount -o remount,noexec /tmp" + compliance: + - cis: ["1.1.4"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-14412-1 + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:noexec' + +# 1.1.5 Build considerations - Partition scheme. + - id: 4504 + title: "Create Separate Partition for /var" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.5"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + - CCE-14777-7 + condition: all + rules: + - 'c:mount -> r:\s/var\s' + +# 1.1.6 bind mount /var/tmp to /tmp + - id: 4505 + title: "Bind Mount the /var/tmp directory to /tmp" + description: "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." + rationale: "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." + remediation: "# mount --bind /tmp /var/tmp and edit the /etc/fstab file to contain the following line: /tmp /var/tmp none bind 0 0" + compliance: + - cis: ["1.1.6"] + references: + - CCE-14584-7 + condition: all + rules: + - 'c:mount -> r:\s/var/tmp\s' + +# 1.1.7 /var/log: partition + - id: 4506 + title: "Create Separate Partition for /var/log" + description: "The /var/log directory is used by system services to store log data ." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.7"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + - CCE-14011-1 + condition: all + rules: + - 'c:mount -> r:\s/var/log\s' + +# 1.1.8 /var/log/audit: partition + - id: 4507 + title: "Create Separate Partition for /var/log/audit" + description: "The auditing daemon, auditd , stores log data in the /var/log/audit directory." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.8"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + - CCE-14171-3 + condition: all + rules: + - 'c:mount -> r:\s/var/log/audit\s' + +# 1.1.9 /home: partition + - id: 4508 + title: "Create Separate Partition for /home" + description: "The /home directory is used to support disk storage needs of local users." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.9"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + - CCE-14559-9 + condition: all + rules: + - 'c:mount -> r:\s/home\s' + +# 1.1.10 /home: nodev + - id: 4509 + title: "Add nodev Option to /home" + description: "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." + rationale: "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." + remediation: "Edit the /etc/fstab file and add nodev to the fourth field (mounting options). # mount -o remount,nodev /home" + compliance: + - cis: ["1.1.10"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-4249-9 + condition: all + rules: + - 'c:mount -> r:\s/home\s && r:nodev' + +# 1.1.14 /dev/shm: nodev + - id: 4510 + title: "Add nodev Option to /dev/shm Partition" + description: "The nodev mount option specifies that the /dev/shm (temporary filesystem stored in memory) cannot contain block or character special devices." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.14"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-15007-8 + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:nodev' + +# 1.1.15 /dev/shm: nosuid + - id: 4511 + title: "Add nosuid Option to /dev/shm Partition" + description: "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." + rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." + remediation: "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" + compliance: + - cis: ["1.1.15"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-14306-5 + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:nosuid' + +# 1.1.16 /dev/shm: noexec + - id: 4512 + title: "Add noexec Option to /dev/shm Partition" + description: "Set noexec on the shared memory partition to prevent programs from executing from there." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.16"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-14927-8 + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:noexec' + +########################################## +# 1.2 Software Updates +########################################## +# 1.2.5 Disable yum-updatesd (Scored) + - id: 4513 + title: "Disable yum-updatesd" + description: "The yum-updatesd utility provides notification of updates that are available for your system." + rationale: "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." + remediation: "Disable the yum-updatesd daemon by running the following command: # chkconfig yum-updatesd off" + compliance: + - cis: ["1.2.5"] + - pci_dss: ["6.2"] + - nist_800_53: ["SI.2"] + references: + - CCE-4218-4 + condition: none + rules: + - 'c:/sbin/chkconfig --list -> r:yum-updatesd && r::on' + +############################################### +# 1.4 Configure SELinux +############################################### +# 1.4.1 enable selinux in /etc/grub.conf + - id: 4514 + title: "Enable SELinux in /etc/grub.conf" + description: "Configure SELINUX to be enabled at boot time and verify that it has not been overwritten by the grub boot parameters" + rationale: "SELinux must be enabled at boot time in /etc/grub.conf to ensure that the controls it provides are not overwritten." + remediation: "Remove all instances of selinux=0 and enforcing=0 from /etc/grub.conf." + compliance: + - cis: ["1.4.1"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-3977-6 + condition: none + rules: + - 'f:/boot/grub/grub.conf -> r:selinux=0|enforcing=0' + +# 1.4.2 Set selinux state + - id: 4515 + title: "Set the SELinux State" + description: "Set SELinux to enable when the system is booted." + rationale: "SELinux must be enabled at boot time in to ensure that the controls it provides are in effect at all times." + remediation: "Edit the /etc/selinux/config file to set the SELINUX parameter: SELINUX=enforcing" + compliance: + - cis: ["1.4.2"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-3999-0 + condition: all + rules: + - 'f:/etc/selinux/config -> r:^SELINUX=enforcing$' + +# 1.4.3 Set seliux policy + - id: 4516 + title: "Set the SELinux Policy" + description: "Configure SELinux to meet or exceed the default targeted policy, which constrains daemons and system software only." + rationale: "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." + remediation: "Edit the /etc/selinux/config file to set the SELINUXTYPE parameter: SELINUXTYPE=targeted" + compliance: + - cis: ["1.4.3"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-3624-4 + condition: all + rules: + - 'f:/etc/selinux/config -> r:^SELINUXTYPE=targeted$' + +# 1.4.4 Remove SETroubleshoot + - id: 4517 + title: "Remove SETroubleshoot" + description: "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." + rationale: "The SETroubleshoot service is an unnecessary daemon to have running on a server, especially if X Windows is disabled." + remediation: "rpm -qa setroubleshoot" + compliance: + - cis: ["1.4.4"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:/sbin/chkconfig --list -> r:setroubleshoot && r::on' + +# 1.4.5 Disable MCS Translation service mcstrans + - id: 4518 + title: "Disable MCS Translation Service (mcstrans)" + description: "The mcstransd daemon provides category label information to client processes requesting information. The label translations are defined in /etc/selinux/targeted/setrans.conf" + rationale: "Since this service is not used very often, disable it to reduce the amount of potentially vulnerable code running on the system." + remediation: "# chkconfig mctrans off" + compliance: + - cis: ["1.4.5"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-3668-1 + condition: none + rules: + - 'c:/sbin/chkconfig --list -> r:mctrans && r::on' + +############################################### +# 1.5 Secure Boot Settings +############################################### +# 1.5.3 Set Boot Loader Password (Scored) + - id: 4519 + title: "Set Boot Loader Password" + description: "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" + rationale: "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)." + remediation: "Set a bootloader password" + compliance: + - cis: ["1.5.3"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-3818-2 + condition: all + rules: + - 'f:/boot/grub/grub.conf -> !r:^# && r:password --md5' + +# 1.5.4 Require Authentication for Single-User Mode (Scored) + - id: 4520 + title: "Require Authentication for Single-User Mode" + description: "Since /etc/init determines what run state the system is in, setting the entry in /etc/inittab will force single user authentication." + rationale: "Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials." + remediation: "Add the following to /etc/inittab : ~:S:wait:/sbin/sulogin" + compliance: + - cis: ["1.5.4"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-4241-6 + condition: none + rules: + - 'f:/etc/inittab -> r:^~:S:wait:/sbin/sulogin' + +# 1.5.5 Disable Interactive Boot (Scored) + - id: 4521 + title: "Disable Interactive Boot" + description: "The PROMPT option provides console users the ability to interactively boot the system and select which services to start on boot ." + rationale: "Turn off the PROMPT option on the console to prevent console users from potentially overriding established security settings." + remediation: "Set the PROMPT parameter in /etc/sysconfig/init to no ." + compliance: + - cis: ["1.5.5"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-4245-7 + condition: all + rules: + - 'f:/etc/sysconfig/init -> r:^PROMPT=no$' + +############################################### +# 1.6 Additional Process Hardening +############################################### +# 1.6.1 Restrict Core Dumps (Scored) + - id: 4522 + title: "Restrict Core Dumps" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.6.1"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:grep -Rh ^*[[:space:]]*hard[[:space:]][[:space:]]*core[[:space:]][[:space:]]* /etc/security/limits.conf /etc/security/limits.d -> r:\s*\t*0$' + - 'c:/sbin/sysctl fs.suid_dumpable -> r:^fs.suid_dumpable\s*=\s*0\s*$' + - 'c:grep -Rh fs\.suid_dumpable /etc/sysctl.conf /etc/sysctl.d -> r:^\s*fs.suid_dumpable\s*=\s*0\s*$' + +# 1.6.3 Enable Randomized Virtual Memory Region Placement (Scored) + - id: 4523 + title: "Enable Randomized Virtual Memory Region Placement" + description: "Set the system flag to force randomized virtual memory region placement." + rationale: "Randomly placing virtual memory regions will make it difficult for to write memory page exploits as the memory placement will be consistently shifting." + remediation: "Add the following line to the /etc/sysctl.conf file. kernel.randomize_va_space = 2" + compliance: + - cis: ["1.6.3"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-4146-7 + condition: all + rules: + - 'c:grep -Rh ^kernel\.randomize_va_space /etc/sysctl.conf /etc/sysctl.d -> r:^\s*kernel.randomize_va_space\s*=\s*2$' + - 'c:/sbin/sysctl kernel.randomize_va_space -> r:^\s*kernel.randomize_va_space\s*=\s*2' + +# 1.6.2 Configure ExecShield (Scored) + - id: 4524 + title: "Configure ExecShield" + description: "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." + rationale: "Enabling any feature that can protect against buffer overflow attacks enhances the security of the system." + remediation: "Add the following line to the /etc/sysctl.conf file. kernel.exec-shield = 1" + compliance: + - cis: ["1.6.2"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-4168-1 + condition: all + rules: + - 'c:/sbin/sysctl kernel.exec-shield -> r:\s1$' + +# 1.6.4 Enable XD/NX Support on 32-bit x86 Systems (Scored) +# TODO +# 1.6.5 Disable Prelink (Scored) + - id: 4525 + title: "Disable Prelink" + description: "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." + rationale: "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)." + remediation: "Edit /etc/sysconfig/prelink and set PRELINKING=no" + compliance: + - cis: ["1.6.5"] + condition: all + rules: + - 'f:/etc/sysconfig/prelink -> r:^PRELINKING=no$' + +############################################### +# 2 OS Services +############################################### +############################################### +# 2.1 Remove Legacy Services +############################################### +# 2.1.1 Remove telnet-server (Scored) + - id: 4526 + title: "Remove telnet-server" + description: "The telnet-server package contains the telnetd daemon, which accepts connections from users from other systems via the telnet protocol." + rationale: "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." + remediation: "# yum erase telnet-server" + compliance: + - cis: ["2.1.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + references: + - CCE-3390-2 + - CCE-4330-7 + condition: none + rules: + - 'c:rpm -qa telnet-server -> r:telnet-server' + +# Remove rsh-server (Scored) + - id: 4527 + title: "Remove rsh-server" + description: "The Berkeley rsh-server ( rsh , rlogin , rcp ) package contains legacy services that exchange credentials in clear-text." + rationale: "These legacy service contain numerous security exposures and have been replaced with the more secure SSH package." + remediation: "# yum erase rsh-server" + compliance: + - cis: ["2.1.3"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + references: + - CCE-4308-3 + condition: none + rules: + - 'c:rpm -qa rsh-server -> r:rsh-server' + + - id: 4528 + title: "Remove NIS Client" + description: "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" + rationale: "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." + remediation: "# yum erase ypbind" + compliance: + - cis: ["2.1.5"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + references: + - CCE-3705-1 (disable) + - CCE-4348-9 (uninstall) + condition: none + rules: + - 'c:rpm -qa ypbind -> r:ypbind' + +# 2.1.6 Remove NIS Server (Scored) + - id: 4529 + title: "Remove NIS Server" + description: "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." + rationale: "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." + remediation: "# yum erase ypserv" + compliance: + - cis: ["2.1.6"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + references: + - CCE-3705-1 (disable) + - CCE-4348-9 (uninstall) + condition: none + rules: + - 'c:rpm -qa ypserv -> r:ypserv' + +# 2.1.7 Remove tftp (Scored) + - id: 4530 + title: "Remove tftp-server" + description: "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." + rationale: "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." + remediation: "# yum erase tftp-server" + compliance: + - cis: ["2.1.8"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + references: + - CCE-4273-9 (disable) + - CCE-3916-4 (uninstall) + condition: none + rules: + - 'c:rpm -qa tftpd -> r:tftpd' + +# 2.1.9 Remove talk (Scored) + - id: 4531 + title: "Remove talk-server" + description: "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." + rationale: "The software presents a security risk as it uses unencrypted protocols for communication." + remediation: "# yum erase talk-server" + compliance: + - cis: ["2.1.10"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa talk-server -> r:talk-server' + +############################################### +# 3 Special Purpose Services +############################################### +# 3.2 Set Daemon umask (Scored) + - id: 4532 + title: "Set Daemon umask" + description: "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." + rationale: "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." + remediation: "Add the following line to the /etc/sysconfig/init file. umask 027" + compliance: + - cis: ["3.2"] + condition: all + rules: + - 'f:/etc/sysconfig/init -> umask 027' + +# 3.3 Remove X Windows (Scored) + - id: 4533 + title: "Remove X Windows" + description: "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." + rationale: "Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface." + remediation: "Edit /etc/inittab set default runlevel as follows: s/:5:/:3:/ Uninstall the X Windows System: # yum groupremove 'X Window System'" + compliance: + - cis: ["3.3"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:/etc/inittab -> r:^\s*id:3:initdefault' + - 'not c:yum grouplist X?Window?System -> r:Installed Groups' + +# 3.1.1 Disable Avahi Server (Scored) + - id: 4534 + title: "Disable Avahi Server" + description: "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." + rationale: "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." + remediation: "# chkconfig avahi-daemon off In addition, edit the /etc/sysconfig/network file and remove zeroconf." + compliance: + - cis: ["3.1.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:/sbin/chkconfig --list -> r:avahi-daemon && r::on' + +# 3.8 Disable NFS and RPC (Not Scored) + - id: 4535 + title: "Disable NFS and RPC" + description: "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." + rationale: "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." + remediation: "# chkconfig nfslock off; #chkconfig rpcgssd off; #chkconfig rpcidmapd off; # chkconfig portmap off;" + compliance: + - cis: ["3.8"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:/sbin/chkconfig --list -> r:nfslock|rpcgssd|rpcidmapd|portmap && r::on' + +# 3.10 Remove FTP Server (Not Scored) + - id: 4536 + title: "Remove FTP Server" + description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." + rationale: "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." + remediation: "# yum erase vsftpd" + compliance: + - cis: ["3.10"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa vsftpd -> r:vsftpd' + +# 3.11 Remove HTTP Server (Not Scored) + - id: 4537 + title: "Remove HTTP Server" + description: "HTTP or web servers provide the ability to host web site content. The default HTTP server shipped with Red Hat Linux is Apache." + rationale: "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." + remediation: "# yum erase httpd" + compliance: + - cis: ["3.11"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa httpd -> r:httpd' + +# 3.12 Remove Dovecot (IMAP and POP3 services) (Not Scored) + - id: 4538 + title: "Remove Dovecot" + description: "Dovecot is an open source IMAP and POP3 server for Linux based systems." + rationale: "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." + remediation: "# yum erase dovecot" + compliance: + - cis: ["3.12"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa dovecot -> r:dovecot' + +# 3.13 Remove Samba (Not Scored) + - id: 4539 + title: "Remove Samba" + description: "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." + rationale: "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." + remediation: "# yum erase samba" + compliance: + - cis: ["3.13"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa samba -> r:samba' + +# 3.14 Remove HTTP Proxy Server (Not Scored) + - id: 4540 + title: "Remove HTTP Proxy Server" + description: "The default HTTP proxy package shipped with Red Hat Linux is squid." + rationale: "If there is no need for a proxy server, it is recommended that the squid proxy be deleted to reduce the potential attack surface." + remediation: "# yum erase squid" + compliance: + - cis: ["3.14"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa squid -> r:squid' + +# 3.15 Remove SNMP Server (Not Scored) + - id: 4541 + title: "Remove SNMP Server" + description: "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." + rationale: "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." + remediation: "# yum erase net-snmp" + compliance: + - cis: ["3.15"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa net-snmp -> r:net-snmp' + +############################################### +# 4 Network Configuration and Firewalls +############################################### +############################################### +# 4.1 Modify Network Parameters (Host Only) +############################################### +# 4.1.1 Disable IP Forwarding (Scored) + - id: 4542 + title: "Disable IP Forwarding" + description: "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." + rationale: "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." + remediation: "Set the net.ipv4.ip_forward parameter to 0 in /etc/sysctl.conf and modify active kernel parameters to match:" + compliance: + - cis: ["4.1.1"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-3561-8 + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.ip_forward -> r:^net.ipv4.ip_forward\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.ip_forward /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.ip_forward\s*=\s*0$' + +# 4.1.2 Disable Send Packet Redirects (Scored) + - id: 4543 + title: "Disable Send Packet Redirects" + description: "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." + rationale: "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." + remediation: "Set the net.ipv4.conf.all.send_redirects and net.ipv4.conf.default.send_redirects parameters to 0 in /etc/sysctl.conf" + compliance: + - cis: ["4.1.2"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-4151-7 + - CCE-4155-8 + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.conf.all.send_redirects -> r:^net.ipv4.conf.all.send_redirects\s*=\s*0$' + - 'c:/sbin/sysctl net.ipv4.conf.default.send_redirects -> r:^net.ipv4.conf.default.send_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.send_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.send_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.send_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.send_redirects\s*=\s*0$' + +############################################### +# 4.2 Modify Network Parameters (Host and Router) +############################################### +# 4.2.1 Disable Source Routed Packet Acceptance (Scored) + - id: 4544 + title: "Disable Source Routed Packet Acceptance" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.2.1"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-4236-6 + - CCE-4091-5 + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.conf.all.accept_source_route -> r:^net.ipv4.conf.all.accept_source_route\s*=\s*0$' + - 'c:/sbin/sysctl net.ipv4.conf.default.accept_source_route -> r:^net.ipv4.conf.default.accept_source_route\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.accept_source_route\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.accept_source_route\s*=\s*0$' + +# 4.2.2 Disable ICMP Redirect Acceptance (Scored) + - id: 4545 + title: "Disable ICMP Redirect Acceptance" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.2.2"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-4217-6 + - CCE-4186-3 + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.conf.all.accept_redirects -> r:^net.ipv4.conf.all.accept_redirects\s*=\s*0$' + - 'c:/sbin/sysctl net.ipv4.conf.default.accept_redirects -> r:^net.ipv4.conf.default.accept_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.accept_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.accept_redirects\s*=\s*0$' + +# 4.2.3 Disable Secure ICMP Redirect Acceptance (Scored) + - id: 4546 + title: "Disable Secure ICMP Redirect Acceptance" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.2.3"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-3472-8 + - CCE-3339-9 + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.conf.all.secure_redirects -> r:^net.ipv4.conf.all.secure_redirects\s*=\s*0$' + - 'c:/sbin/sysctl net.ipv4.conf.default.secure_redirects -> r:^net.ipv4.conf.default.secure_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.secure_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.secure_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.secure_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.secure_redirects\s*=\s*0$' + +# 4.2.4 Log Suspicious Packets (Scored) + - id: 4547 + title: "Log Suspicious Packets" + description: "When enabled, this feature logs packets with un-routable source addresses to the kernel log." + rationale: "Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their server." + remediation: "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." + compliance: + - cis: ["4.2.4"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-4320-8 + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.conf.all.log_martians -> r:^net.ipv4.conf.all.log_martians\s*=\s*1$' + - 'c:/sbin/sysctl net.ipv4.conf.default.log_martians -> r:^net.ipv4.conf.default.log_martians\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.log_martians /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.log_martians\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.log_martians /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.log_martians\s*=\s*1$' + +# 4.2.5 Enable Ignore Broadcast Requests (Scored) + - id: 4548 + title: "Enable Ignore Broadcast Requests" + description: "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." + rationale: "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." + remediation: "Set the net.ipv4.icmp_echo_ignore_broadcasts parameter to 1 in /etc/sysctl.conf and modify active kernel parameters to match." + compliance: + - cis: ["4.2.5"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-3644-2 + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.icmp_echo_ignore_broadcasts -> r:^net.ipv4.icmp_echo_ignore_broadcasts\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.icmp_echo_ignore_broadcasts /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.icmp_echo_ignore_broadcasts\s*=\s*1$' + +# 4.2.6 Enable Bad Error Message Protection (Scored) + - id: 4549 + title: "Enable Bad Error Message Protection" + description: "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." + rationale: "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." + remediation: "Set the net.ipv4.icmp_ignore_bogus_error_responses parameter to 1 in /etc/sysctl.conf and modify active kernel parameters to match." + compliance: + - cis: ["4.2.6"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-4133-5 + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.icmp_ignore_bogus_error_responses -> r:^net.ipv4.icmp_ignore_bogus_error_responses\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.icmp_ignore_bogus_error_responses /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.icmp_ignore_bogus_error_responses\s*=\s*1$' + +# 4.2.7 Enable RFC-recommended Source Route Validation (Scored) + - id: 4550 + title: "Enable RFC-recommended Source Route Validation" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["4.2.7"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-4080-8 + - CCE-3840-6 + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.conf.all.rp_filter -> r:^net.ipv4.conf.all.rp_filter\s*=\s*1$' + - 'c:/sbin/sysctl net.ipv4.conf.default.rp_filter -> r:^net.ipv4.conf.default.rp_filter\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.rp_filter /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.rp_filter\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.rp_filter /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.rp_filter\s*=\s*1$' + +# 4.2.8 Enable TCP SYN Cookies (Scored) + - id: 4551 + title: "Enable TCP SYN Cookies" + description: "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." + rationale: "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." + remediation: "Set the net.ipv4.tcp_syncookies parameter to 1 in /etc/sysctl.conf: net.ipv4.tcp_syncookies=1 Modify active kernel parameters to match." + compliance: + - cis: ["4.2.8"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + references: + - CCE-4265-5 + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.tcp_syncookies -> r:^net.ipv4.tcp_syncookies\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.tcp_syncookies /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.tcp_syncookies\s*=\s*1$' + +############################################### +# 6 System Access, Authentication and Authorization +############################################### +############################################### +# 6.1 Configure SSH +############################################### +# 6.2.1 Set SSH Protocol to 2 (Scored) + - id: 4552 + title: "Set SSH Protocol to 2" + description: "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." + rationale: "SSH v1 suffers from insecurities that do not affect SSH v2." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" + compliance: + - 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"] + references: + - CCE-4245-7 + - https://www.ssh.com/ssh/ + condition: all + rules: + - 'f:$sshd_file -> r:^\s*\t*Protocol\s*\t*2' + +# 6.2.2 Set LogLevel to INFO (Scored) + - id: 4553 + title: "Ensure SSH LogLevel is set to INFO" + description: "The INFO parameter specifies that login and logout activity will be logged." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel INFO" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:LogLevel\s*\t*INFO' + +# 6.2.5 Set SSH MaxAuthTries to 4 or Less (Scored) + - id: 4554 + title: "Ensure SSH MaxAuthTries is set to 4 or less" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4" + compliance: + - cis: ["5.2.5"] + - cis_csc: ["16"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && n:^MaxAuthTries\s*\t*(\d+) compare <= 4' + +# 6.2.6 Set SSH IgnoreRhosts to Yes (Scored) + - id: 4555 + title: "Set SSH IgnoreRhosts to Yes" + description: "The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication ." + rationale: "Setting this parameter forces users to enter a password when authenticating with ssh ." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" + compliance: + - 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"] + references: + - CCE-4250-7 + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:IgnoreRhosts\s*\t*yes' + +# 6.2.7 Set SSH HostbasedAuthentication to No (Scored) + - id: 4556 + title: "Set SSH HostbasedAuthentication to No" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" + compliance: + - 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"] + references: + - CCE-4251-5 + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:HostbasedAuthentication\s*\t*no' + +# 6.2.8 Disable SSH Root Login (Scored) + - id: 4557 + title: "Disable SSH Root Login" + description: "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 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" + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" + compliance: + - 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"] + references: + - CCE-4252-3 + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:PermitRootLogin\s*\t*no' + +# 6.2.9 Set SSH PermitEmptyPasswords to No (Scored) + - id: 4558 + title: "Set SSH PermitEmptyPasswords to No" + description: "The PermitEmptyPasswords parameter specifies if the server allows login to accounts with empty password strings." + rationale: "Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system" + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" + compliance: + - 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"] + references: + - CCE-4256-4 + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:PermitEmptyPasswords\s*\t*no' + +############################################### +# 9 System Maintenance +############################################### +############################################### +# 9.2 Review User and Group Settings +############################################### +# 9.2.5 Verify No UID 0 Accounts Exist Other Than root (Scored) + - id: 4559 + title: "Verify No UID 0 Accounts Exist Other Than root" + description: "Any account with UID 0 has superuser privileges on the system." + rationale: "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." + remediation: "Remove any users other than root with UID 0 or assign them a new UID if appropriate." + compliance: + - cis: ["9.2.5"] + - pci_dss: ["10.2.5"] + - hipaa: ["164.312.b"] + - nist_800_53: ["AU.14", "AC.7"] + references: + - CCE-4009-7 + condition: none + rules: + - 'f:/etc/passwd -> !r:^# && !r:^\s*\t*root: && r:^\w+:\w+:0:' diff --git a/sca/rhel/5/cis_rhel5_linux_rcl.yml b/sca/rhel/5/cis_rhel5_linux_rcl.yml deleted file mode 100644 index 492f7d1ec..000000000 --- a/sca/rhel/5/cis_rhel5_linux_rcl.yml +++ /dev/null @@ -1,981 +0,0 @@ -# Security Configuration assessment -# CIS Checks for RHEL 5 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# Center for Internet Security Benchmark for Red Hat Enterprise Linux 5 v2.2.0 - 03-02-2015 - -policy: - id: "cis_rhel5" - file: "cis_rhel5_linux_rcl.yml" - name: "CIS Benchmark for Red Hat Enterprise Linux 5" - description: "This document, Security Configuration Benchmark for Red Hat Enterprise Linux 5 provides prescriptive guidance for establishing a secure configuration posture for Red Hat Enterprise Linux (RHEL) versions 5.0 - 5.11 running on x86 platforms." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check RHEL5 version" - description: "Requirements for running the SCA scan against RHEL 5." - condition: "any required" - rules: - - 'f:/etc/redhat-release -> r:^Red Hat Enterprise Linux \S+ release 5;' - - 'f:/etc/redhat-release -> IN r:^CentOS && r:release 5;' - - 'f:/etc/redhat-release -> IN r:^Cloud && r:release 5;' - - 'f:/etc/redhat-release -> IN r:^Oracle && r:release 5;' - - 'f:/etc/redhat-release -> IN r:^Better && r:release 5;' - -variables: - $rc_dirs: /etc/rc.d/rc2.d,/etc/rc.d/rc3.d,/etc/rc.d/rc4.d,/etc/rc.d/rc5.d; - -checks: -# 1.1.1 /tmp: partition - - id: 5500 - title: "Create Separate Partition for /tmp" - description: "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.1" - references: - - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ - - CCE-14161-4 - condition: any - rules: - - 'f:/etc/fstab -> !r:/tmp;' -# 1.1.2 /tmp: nodev - - id: 5501 - title: "Set nodev option for /tmp Partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "Edit the /etc/fstab file and add nodev to the fourth field (mounting options). # mount -o remount,nodev /tmp" - compliance: - - cis: "1.1.2" - - pci_dss: "2.2.4" - references: - - CCE-14412-1 - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/tmp && r:nodev;' -# 1.1.3 /tmp: nosuid - - id: 5502 - title: "Set nosuid option for /tmp Partition" - description: "The nosuid mount option specifies that the filesystem cannot contain set userid files." - rationale: "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 ." - remediation: "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options)." - compliance: - - cis: "1.1.3" - - pci_dss: "2.2.4" - references: - - CCE-14940-1 - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/tmp && r:nosuid;' -# 1.1.4 /tmp: noexec - - id: 5503 - title: "Set noexec option for /tmp Partition" - description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." - rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /tmp ." - remediation: "Edit the /etc/fstab file and add noexec to the fourth field (mounting options). # mount -o remount,noexec /tmp" - compliance: - - cis: "1.1.4" - - pci_dss: "2.2.4" - references: - - CCE-14412-1 - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/tmp && r:noexec;' -# 1.1.5 Build considerations - Partition scheme. - - id: 5504 - title: "Create Separate Partition for /var" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.5" - references: - - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ - - CCE-14777-7 - condition: any - rules: - - 'f:/etc/fstab -> NIN !r^# && r:/var;' -# 1.1.6 bind mount /var/tmp to /tmp - - id: 5505 - title: "Bind Mount the /var/tmp directory to /tmp" - description: "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." - rationale: "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." - remediation: "# mount --bind /tmp /var/tmp and edit the /etc/fstab file to contain the following line: /tmp /var/tmp none bind 0 0" - compliance: - - cis: "1.1.6" - references: - - CCE-14584-7 - condition: any - rules: - - 'f:/etc/fstab -> NIN r:^# && !r:/var/tmp && r:bind;' -# 1.1.7 /var/log: partition - - id: 5506 - title: "Create Separate Partition for /var/log" - description: "The /var/log directory is used by system services to store log data ." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.7" - references: - - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ - - CCE-14011-1 - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/var/log;' -# 1.1.8 /var/log/audit: partition - - id: 5507 - title: "Create Separate Partition for /var/log/audit" - description: "The auditing daemon, auditd , stores log data in the /var/log/audit directory." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.8" - references: - - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ - - CCE-14171-3 - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/var/log/audit;' -# 1.1.9 /home: partition - - id: 5508 - title: "Create Separate Partition for /home" - description: "The /home directory is used to support disk storage needs of local users." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.9" - references: - - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ - - CCE-14559-9 - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/home;' -# 1.1.10 /home: nodev - - id: 5509 - title: "Add nodev Option to /home" - description: "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." - rationale: "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." - remediation: "Edit the /etc/fstab file and add nodev to the fourth field (mounting options). # mount -o remount,nodev /home" - compliance: - - cis: "1.1.10" - - pci_dss: "2.2.4" - references: - - CCE-4249-9 - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/home && r:nodev;' -# 1.1.11 nodev on removable media partitions (not scored) - - id: 5510 - title: "Add nodev Option to Removable Media Partitions" - description: "Set nodev on removable media to prevent character and block special devices that are present on the removable be treated as these device files." - rationale: "Removable media containing character and block special devices could be used to circumvent security controls by allowing non-root users to access sensitive device files such as /dev/kmem or the raw disk partitions." - remediation: "Edit the / etc/fstab file and add 'nodev' to the fourth field (mounting options). Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." - compliance: - - cis: "1.1.11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:nodev;' -# 1.1.12 noexec on removable media partitions (not scored) - - id: 5511 - title: "Add noexec Option to Removable Media Partitions" - description: "Set noexec on removable media to prevent programs from executing from the removable media." - rationale: "Setting this option on a file system prevents users from executing programs from the removable. This deters users from being to introduce potentially malicious software on the system." - remediation: "Edit the /etc/fstab file and add noexec to the fourth field (mounting options). Look for entries that have mount points that contain words such as floppy or cdrom." - compliance: - - cis: "1.1.12" - - pci_dss: "2.2.4" - references: - - CCE-4275-4 - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:noexec;' -# 1.1.13 nosuid on removable media partitions (not scored) - - id: 5512 - title: "Add nosuid Option to Removable Media Partitions" - description: "Set nosuid on removable media to prevent setuid and setgid executable files that are on that media from being executed as setuid and setgid." - rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." - remediation: "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options). Look for entries that have mount points that contain words such as floppy or cdrom." - compliance: - - cis: "1.1.13" - - pci_dss: "2.2.4" - references: - - CCE-4042-8 - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:nosuid;' -# 1.1.14 /dev/shm: nodev - - id: 5513 - title: "Add nodev Option to /dev/shm Partition" - description: "The nodev mount option specifies that the /dev/shm (temporary filesystem stored in memory) cannot contain block or character special devices." - rationale: "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." - remediation: "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" - compliance: - - cis: "1.1.14" - - pci_dss: "2.2.4" - references: - - CCE-15007-8 - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:nodev;' -# 1.1.15 /dev/shm: nosuid - - id: 5514 - title: "Add nosuid Option to /dev/shm Partition" - description: "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." - rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." - remediation: "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" - compliance: - - cis: "1.1.15" - - pci_dss: "2.2.4" - references: - - CCE-14306-5 - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:nosuid;' -# 1.1.16 /dev/shm: noexec - - id: 5515 - title: "Add noexec Option to /dev/shm Partition" - description: "Set noexec on the shared memory partition to prevent programs from executing from there." - rationale: "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." - remediation: "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" - compliance: - - cis: "1.1.16" - - pci_dss: "2.2.4" - references: - - CCE-14927-8 - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:noexec;' -########################################## -# 1.2 Software Updates -########################################## -# 1.2.5 Disable yum-updatesd (Scored) - - id: 5516 - title: "Disable yum-updatesd" - description: "The yum-updatesd utility provides notification of updates that are available for your system." - rationale: "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." - remediation: "Disable the yum-updatesd daemon by running the following command: # chkconfig yum-updatesd off" - compliance: - - cis: "1.2.5" - - pci_dss: "6.2" - references: - - CCE-4218-4 - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:noexec;' - - 'p:yum-updatesd;' -############################################### -# 1.4 Configure SELinux -############################################### -# 1.4.1 enable selinux in /etc/grub.conf - - id: 5517 - title: "Enable SELinux in /etc/grub.conf" - description: "Configure SELINUX to be enabled at boot time and verify that it has not been overwritten by the grub boot parameters" - rationale: "SELinux must be enabled at boot time in /etc/grub.conf to ensure that the controls it provides are not overwritten." - remediation: "Remove all instances of selinux=0 and enforcing=0 from /etc/grub.conf." - compliance: - - cis: "1.4.1" - - pci_dss: "2.2.4" - references: - - CCE-3977-6 - condition: any - rules: - - 'f:/etc/grub.conf -> r:selinux=0;' -# 1.4.2 Set selinux state - - id: 5518 - title: "Set the SELinux State" - description: "Set SELinux to enable when the system is booted." - rationale: "SELinux must be enabled at boot time in to ensure that the controls it provides are in effect at all times." - remediation: "Edit the /etc/selinux/config file to set the SELINUX parameter: SELINUX=enforcing" - compliance: - - cis: "1.4.2" - - pci_dss: "2.2.4" - references: - - CCE-3999-0 - condition: any - rules: - - 'f:/etc/selinux/config -> !r:SELINUX=enforcing;' -# 1.4.3 Set seliux policy - - id: 5519 - title: "Set the SELinux Policy" - description: "Configure SELinux to meet or exceed the default targeted policy, which constrains daemons and system software only." - rationale: "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." - remediation: "Edit the /etc/selinux/config file to set the SELINUXTYPE parameter: SELINUXTYPE=targeted" - compliance: - - cis: "1.4.3" - - pci_dss: "2.2.4" - references: - - CCE-3624-4 - condition: any - rules: - - 'f:/etc/selinux/config -> !r:SELINUXTYPE=targeted;' -# 1.4.4 Remove SETroubleshoot - - id: 5520 - title: "Remove SETroubleshoot" - description: "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." - rationale: "The SETroubleshoot service is an unnecessary daemon to have running on a server, especially if X Windows is disabled." - remediation: "rpm -qa setroubleshoot" - compliance: - - cis: "1.4.4" - - pci_dss: "2.2.4" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsetroubleshoot$;' -# 1.4.5 Disable MCS Translation service mcstrans - - id: 5521 - title: "Disable MCS Translation Service (mcstrans)" - description: "The mcstransd daemon provides category label information to client processes requesting information. The label translations are defined in /etc/selinux/targeted/setrans.conf" - rationale: "Since this service is not used very often, disable it to reduce the amount of potentially vulnerable code running on the system." - remediation: "# chkconfig mctrans off" - compliance: - - cis: "1.4.5" - - pci_dss: "2.2.4" - references: - - CCE-3668-1 - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dmctrans$;' -############################################### -# 1.5 Secure Boot Settings -############################################### -# 1.5.3 Set Boot Loader Password (Scored) - - id: 5522 - title: "Set Boot Loader Password" - description: "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" - rationale: "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)." - remediation: "Set a bootloader password" - compliance: - - cis: "1.5.3" - - pci_dss: "2.2.4" - references: - - CCE-3818-2 - condition: any - rules: - - 'f:/boot/grub/menu.lst -> NIN !r:^# && r:password;' -# 1.5.4 Require Authentication for Single-User Mode (Scored) - - id: 5523 - title: "Require Authentication for Single-User Mode" - description: "Since /etc/init determines what run state the system is in, setting the entry in /etc/inittab will force single user authentication." - rationale: "Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials." - remediation: "Add the following to /etc/inittab : ~:S:wait:/sbin/sulogin" - compliance: - - cis: "1.5.4" - - pci_dss: "2.2.4" - references: - - CCE-4241-6 - condition: any - rules: - - 'f:/etc/inittab -> IN !r:^# && r:S:wait;' -# 1.5.5 Disable Interactive Boot (Scored) - - id: 5524 - title: "Disable Interactive Boot" - description: "The PROMPT option provides console users the ability to interactively boot the system and select which services to start on boot ." - rationale: "Turn off the PROMPT option on the console to prevent console users from potentially overriding established security settings." - remediation: "Set the PROMPT parameter in /etc/sysconfig/init to no ." - compliance: - - cis: "1.5.5" - - pci_dss: "2.2.4" - references: - - CCE-4245-7 - condition: any - rules: - - 'f:/etc/sysconfig/init -> NIN !r:^# && r:PROMPT=no;' -############################################### -# 1.6 Additional Process Hardening -############################################### -# 1.6.1 Restrict Core Dumps (Scored) - - id: 5525 - title: "Restrict Core Dumps" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "1.6.1" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/security/limits.conf -> NIN !r:^# && r:hard\.+core\.+0;' -# 1.6.2 Configure ExecShield (Scored) - - id: 5526 - title: "Configure ExecShield" - description: "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." - rationale: "Enabling any feature that can protect against buffer overflow attacks enhances the security of the system." - remediation: "Add the following line to the /etc/sysctl.conf file. kernel.exec-shield = 1" - compliance: - - cis: "1.6.2" - - pci_dss: "2.2.4" - references: - - CCE-4168-1 - condition: any - rules: - - 'f:/proc/sys/kernel/exec-shield -> 0;' -# 1.6.3 Enable Randomized Virtual Memory Region Placement (Scored) - - id: 5527 - title: "Enable Randomized Virtual Memory Region Placement" - description: "Set the system flag to force randomized virtual memory region placement." - rationale: "Randomly placing virtual memory regions will make it difficult for to write memory page exploits as the memory placement will be consistently shifting." - remediation: "Add the following line to the /etc/sysctl.conf file. kernel.randomize_va_space = 2" - compliance: - - cis: "1.6.3" - - pci_dss: "2.2.4" - references: - - CCE-4146-7 - condition: any - rules: - - 'f:/proc/sys/kernel/randomize_va_space -> 0;' -# 1.6.4 Enable XD/NX Support on 32-bit x86 Systems (Scored) -# TODO -# 1.6.5 Disable Prelink (Scored) - - id: 5528 - title: "Disable Prelink" - description: "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." - rationale: "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)." - remediation: "Edit /etc/sysconfig/prelink and set PRELINKING=no" - compliance: - - cis: "1.6.5" - condition: any - rules: - - 'f:/etc/sysconfig/prelink -> !r:PRELINKING=no;' -############################################### -# 2 OS Services -############################################### -############################################### -# 2.1 Remove Legacy Services -############################################### -# 2.1.1 Remove telnet-server (Scored) - - id: 5529 - title: "Remove telnet-server" - description: "The telnet-server package contains the telnetd daemon, which accepts connections from users from other systems via the telnet protocol." - rationale: "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." - remediation: "# yum erase telnet-server" - compliance: - - cis: "2.1.1" - - pci_dss: "2.2.3" - references: - - CCE-3390-2 - - CCE-4330-7 - condition: any - rules: - - 'f:/etc/xinetd.d/telnet -> IN !r:^# && r:disable && r:no;' -# 2.1.2 Remove telnet Clients (Scored) - - id: 5530 - title: "Remove rsh-server" - description: "The Berkeley rsh-server ( rsh , rlogin , rcp ) package contains legacy services that exchange credentials in clear-text." - rationale: "These legacy service contain numerous security exposures and have been replaced with the more secure SSH package." - remediation: "# yum erase rsh-server" - compliance: - - cis: "2.1.3" - - pci_dss: "2.2.3" - references: - - CCE-4308-3 - condition: any - rules: - - 'f:/etc/xinetd.d/rlogin -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/rsh -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/shell -> IN !r:^# && r:disable && r:no;' -# 2.1.4 Remove rsh (Scored) - - id: 5531 - title: "Remove NIS Client" - description: "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" - rationale: "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." - remediation: "# yum erase ypbind" - compliance: - - cis: "2.1.5" - - pci_dss: "2.2.3" - references: - - CCE-3705-1 (disable) - - CCE-4348-9 (uninstall) - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dypbind$;' -# 2.1.6 Remove NIS Server (Scored) - - id: 5532 - title: "Remove NIS Server" - description: "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." - rationale: "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." - remediation: "# yum erase ypserv" - compliance: - - cis: "2.1.6" - - pci_dss: "2.2.3" - references: - - CCE-3705-1 (disable) - - CCE-4348-9 (uninstall) - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dypserv$;' -# 2.1.7 Remove tftp (Scored) - - id: 5533 - title: "Remove tftp-server" - description: "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." - rationale: "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." - remediation: "# yum erase tftp-server" - compliance: - - cis: "2.1.8" - - pci_dss: "2.2.3" - references: - - CCE-4273-9 (disable) - - CCE-3916-4 (uninstall) - condition: any - rules: - - 'f:/etc/xinetd.d/tftpd -> IN !r:^# && r:disable && r:no;' -# 2.1.9 Remove talk (Scored) - - id: 5534 - title: "Remove talk-server" - description: "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." - rationale: "The software presents a security risk as it uses unencrypted protocols for communication." - remediation: "# yum erase talk-server" - compliance: - - cis: "2.1.10" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/talk -> IN !r:^# && r:disable && r:no;' -############################################### -# 3 Special Purpose Services -############################################### -############################################### -# 3.1 Disable Avahi Server -############################################### -# 3.1.1 Disable Avahi Server (Scored) - - id: 5535 - title: "Disable Avahi Server" - description: "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." - rationale: "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." - remediation: "# chkconfig avahi-daemon off In addition, edit the /etc/sysconfig/network file and remove zeroconf." - compliance: - - cis: "3.1.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'p:avahi-daemon;' -# 3.2 Set Daemon umask (Scored) - - id: 5536 - title: "Set Daemon umask" - description: "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." - rationale: "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." - remediation: "Add the following line to the /etc/sysconfig/init file. umask 027" - compliance: - - cis: "3.2" - condition: all - rules: - - 'f:/etc/init.d/functions -> IN !r:^# && r:^umask && <:umask 027;' -# 3.3 Remove X Windows (Scored) - - id: 5537 - title: "Remove X Windows" - description: "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." - rationale: "Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface." - remediation: "Edit /etc/inittab set default runlevel as follows: s/:5:/:3:/ Uninstall the X Windows System: # yum groupremove 'X Window System'" - compliance: - - cis: "3.3" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/inittab -> IN !r:^# && r:id:5;' -# 3.8 Disable NFS and RPC (Not Scored) - - id: 5538 - title: "Disable NFS and RPC" - description: "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." - rationale: "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." - remediation: "# chkconfig nfslock off; #chkconfig rpcgssd off; #chkconfig rpcidmapd off; # chkconfig portmap off;" - compliance: - - cis: "3.8" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dnfs$;' - - 'd:$rc_dirs -> ^S\d\dnfslock$;' -# 3.10 Remove FTP Server (Not Scored) - - id: 5539 - title: "Remove FTP Server" - description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." - rationale: "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." - remediation: "# yum erase vsftpd" - compliance: - - cis: "3.10" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/vsftpd -> IN !r:^# && r:disable && r:no;' -# 3.11 Remove HTTP Server (Not Scored) - - id: 5540 - title: "Remove HTTP Server" - description: "HTTP or web servers provide the ability to host web site content. The default HTTP server shipped with Red Hat Linux is Apache." - rationale: "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." - remediation: "# yum erase httpd" - compliance: - - cis: "3.11" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dhttpd$;' -# 3.12 Remove Dovecot (IMAP and POP3 services) (Not Scored) - - id: 5541 - title: "Remove Dovecot" - description: "Dovecot is an open source IMAP and POP3 server for Linux based systems." - rationale: "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." - remediation: "# yum erase dovecot" - compliance: - - cis: "3.12" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/xinetd.d/cyrus-imapd -> IN !r:^# && r:disable && r:no;' - - id: 5542 - title: "Remove Dovecot" - description: "Dovecot is an open source IMAP and POP3 server for Linux based systems." - rationale: "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." - remediation: "# yum erase dovecot" - compliance: - - cis: "3.12" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/xinetd.d/dovecot -> IN !r:^# && r:disable && r:no;' -# 3.13 Remove Samba (Not Scored) - - id: 5543 - title: "Remove Samba" - description: "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." - rationale: "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." - remediation: "# yum erase samba" - compliance: - - cis: "3.13" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsamba$;' - - 'd:$rc_dirs -> ^S\d\dsmb$;' -# 3.14 Remove HTTP Proxy Server (Not Scored) - - id: 5544 - title: "Remove HTTP Proxy Server" - description: "The default HTTP proxy package shipped with Red Hat Linux is squid." - rationale: "If there is no need for a proxy server, it is recommended that the squid proxy be deleted to reduce the potential attack surface." - remediation: "# yum erase squid" - compliance: - - cis: "3.14" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsquid$;' -# 3.15 Remove SNMP Server (Not Scored) - - id: 5545 - title: "Remove SNMP Server" - description: "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." - rationale: "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." - remediation: "# yum erase net-snmp" - compliance: - - cis: "3.15" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsnmpd$;' -############################################### -# 4 Network Configuration and Firewalls -############################################### -############################################### -# 4.1 Modify Network Parameters (Host Only) -############################################### -# 4.1.1 Disable IP Forwarding (Scored) - - id: 5546 - title: "Disable IP Forwarding" - description: "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." - rationale: "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." - remediation: "Set the net.ipv4.ip_forward parameter to 0 in /etc/sysctl.conf and modify active kernel parameters to match:" - compliance: - - cis: "4.1.1" - - pci_dss: "2.2.4" - references: - - CCE-3561-8 - condition: any - rules: - - 'f:/proc/sys/net/ipv4/ip_forward -> 1;' - - 'f:/proc/sys/net/ipv6/ip_forward -> 1;' -# 4.1.2 Disable Send Packet Redirects (Scored) - - id: 5547 - title: "Disable Send Packet Redirects" - description: "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." - rationale: "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." - remediation: "Set the net.ipv4.conf.all.send_redirects and net.ipv4.conf.default.send_redirects parameters to 0 in /etc/sysctl.conf" - compliance: - - cis: "4.1.2" - - pci_dss: "2.2.4" - references: - - CCE-4151-7 - - CCE-4155-8 - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/send_redirects -> 1;' - - 'f:/proc/sys/net/ipv4/conf/default/send_redirects -> 1;' -############################################### -# 4.2 Modify Network Parameters (Host and Router) -############################################### -# 4.2.1 Disable Source Routed Packet Acceptance (Scored) - - id: 5548 - title: "Disable Source Routed Packet Acceptance" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "4.2.1" - - pci_dss: "2.2.4" - references: - - CCE-4236-6 - - CCE-4091-5 - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/accept_source_route -> 1;' -# 4.2.2 Disable ICMP Redirect Acceptance (Scored) - - id: 5549 - title: "Disable ICMP Redirect Acceptance" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "4.2.2" - - pci_dss: "2.2.4" - references: - - CCE-4217-6 - - CCE-4186-3 - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/accept_redirects -> 1;' - - 'f:/proc/sys/net/ipv4/conf/default/accept_redirects -> 1;' -# 4.2.3 Disable Secure ICMP Redirect Acceptance (Scored) - - id: 5550 - title: "Disable Secure ICMP Redirect Acceptance" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "4.2.3" - - pci_dss: "2.2.4" - references: - - CCE-3472-8 - - CCE-3339-9 - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/secure_redirects -> 1;' - - 'f:/proc/sys/net/ipv4/conf/default/secure_redirects -> 1;' -# 4.2.4 Log Suspicious Packets (Scored) - - id: 5551 - title: "Log Suspicious Packets" - description: "When enabled, this feature logs packets with un-routable source addresses to the kernel log." - rationale: "Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their server." - remediation: "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." - compliance: - - cis: "4.2.4" - - pci_dss: "2.2.4" - references: - - CCE-4320-8 - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/log_martians -> 0;' -# 4.2.5 Enable Ignore Broadcast Requests (Scored) - - id: 5552 - title: "Enable Ignore Broadcast Requests" - description: "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." - rationale: "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." - remediation: "Set the net.ipv4.icmp_echo_ignore_broadcasts parameter to 1 in /etc/sysctl.conf and modify active kernel parameters to match." - compliance: - - cis: "4.2.5" - - pci_dss: "2.2.4" - references: - - CCE-3644-2 - condition: any - rules: - - 'f:/proc/sys/net/ipv4/icmp_echo_ignore_broadcasts -> 0;' -# 4.2.6 Enable Bad Error Message Protection (Scored) - - id: 5553 - title: "Enable Bad Error Message Protection" - description: "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." - rationale: "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." - remediation: "Set the net.ipv4.icmp_ignore_bogus_error_responses parameter to 1 in /etc/sysctl.conf and modify active kernel parameters to match." - compliance: - - cis: "4.2.6" - - pci_dss: "2.2.4" - references: - - CCE-4133-5 - condition: any - rules: - - 'f:/proc/sys/net/ipv4/icmp_ignore_bogus_error_responses -> 0;' -# 4.2.7 Enable RFC-recommended Source Route Validation (Scored) - - id: 5554 - title: "Enable RFC-recommended Source Route Validation" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "4.2.7" - - pci_dss: "2.2.4" - references: - - CCE-4080-8 - - CCE-3840-6 - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/rp_filter -> 0;' - - 'f:/proc/sys/net/ipv4/conf/default/rp_filter -> 0;' -# 4.2.8 Enable TCP SYN Cookies (Scored) - - id: 5555 - title: "Enable TCP SYN Cookies" - description: "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." - rationale: "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." - remediation: "Set the net.ipv4.tcp_syncookies parameter to 1 in /etc/sysctl.conf: net.ipv4.tcp_syncookies=1 Modify active kernel parameters to match." - compliance: - - cis: "4.2.8" - - pci_dss: "2.2.4" - references: - - CCE-4265-5 - condition: any - rules: - - 'f:/proc/sys/net/ipv4/tcp_syncookies -> 0;' -############################################### -# 6 System Access, Authentication and Authorization -############################################### -############################################### -# 6.1 Configure SSH -############################################### -# 6.2.1 Set SSH Protocol to 2 (Scored) - - id: 5556 - title: "Set SSH Protocol to 2" - description: "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." - rationale: "SSH v1 suffers from insecurities that do not affect SSH v2." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" - compliance: - - cis: "6.2.1" - - pci_dss: "4.1" - references: - - CCE-4245-7 - - https://www.ssh.com/ssh/ - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:Protocol\.+1;' -# 6.2.6 Set SSH IgnoreRhosts to Yes (Scored) - - id: 5557 - title: "Set SSH IgnoreRhosts to Yes" - description: "The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication ." - rationale: "Setting this parameter forces users to enter a password when authenticating with ssh ." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" - compliance: - - cis: "6.2.6" - - pci_dss: "4.1" - references: - - CCE-4250-7 - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:IgnoreRhosts\.+no;' -# 6.2.7 Set SSH HostbasedAuthentication to No (Scored) - - id: 5558 - title: "Set SSH HostbasedAuthentication to No" - description: "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." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" - compliance: - - cis: "6.2.7" - - pci_dss: "4.1" - references: - - CCE-4251-5 - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:HostbasedAuthentication\.+yes;' -# 6.2.8 Disable SSH Root Login (Scored) - - id: 5559 - title: "Disable SSH Root Login" - description: "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 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" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" - compliance: - - cis: "6.2.8" - - pci_dss: "4.1" - references: - - CCE-4252-3 - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:PermitRootLogin\.+yes;' -# 6.2.9 Set SSH PermitEmptyPasswords to No (Scored) - - id: 5560 - title: "Set SSH PermitEmptyPasswords to No" - description: "The PermitEmptyPasswords parameter specifies if the server allows login to accounts with empty password strings." - rationale: "Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" - compliance: - - cis: "6.2.9" - - pci_dss: "4.1" - references: - - CCE-4256-4 - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:^PermitEmptyPasswords\.+yes;' -############################################### -# 9 System Maintenance -############################################### -############################################### -# 9.2 Review User and Group Settings -############################################### -# 9.2.5 Verify No UID 0 Accounts Exist Other Than root (Scored) - - id: 5561 - title: "Verify No UID 0 Accounts Exist Other Than root" - description: "Any account with UID 0 has superuser privileges on the system." - rationale: "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." - remediation: "Delete any other entries that are displayed." - compliance: - - cis: "9.2.5" - - pci_dss: "10.2.5" - references: - - CCE-4009-7 - condition: any - rules: - - 'f:/etc/passwd -> IN !r:^# && !r:^root: && r:^\w+:\w+:0:;' -# Other/Legacy Tests - - id: 5562 - title: "Account with empty password present" - compliance: - - pci_dss: "10.2.5" - condition: any - rules: - - 'f:/etc/shadow -> r:^\w+::;' - - id: 5563 - title: "User-mounted removable partition allowed on the console" - condition: any - rules: - - 'f:/etc/security/console.perms -> r:^ \d+ ;' - - 'f:/etc/security/console.perms -> r:^ \d+ ;' - - id: 5564 - title: "Disable standard boot services - Kudzu hardware detection Enabled" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dkudzu$;' - - id: 5565 - title: "Disable standard boot services - PostgreSQL server Enabled" - compliance: - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dpostgresql$;' - - id: 5566 - title: "Disable standard boot services - MySQL server Enabled" - compliance: - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dmysqld$;' - - id: 5567 - title: "Disable standard boot services - DNS server Enabled" - compliance: - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dnamed$;' - - id: 5568 - title: "Disable standard boot services - NetFS Enabled" - compliance: - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dnetfs$;' diff --git a/sca/rhel/6/cis_rhel6_linux.yml b/sca/rhel/6/cis_rhel6_linux.yml new file mode 100644 index 000000000..c7d16d41d --- /dev/null +++ b/sca/rhel/6/cis_rhel6_linux.yml @@ -0,0 +1,930 @@ +# Security Configuration Assessment +# CIS Checks for RHEL 6 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Benchmark for Red Hat Enterprise Linux 6 v2.1.0 - 12-27-2017 + +policy: + id: "cis_rhel6" + file: "cis_rhel6_linux.yml" + name: "CIS Benchmark for Red Hat Enterprise Linux 6" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for Red Hat Enterprise Linux 6 systems running on x86 and x64 platforms. This document was tested against Red Hat Enterprise Linux 6.9." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check RHEL6 version" + description: "Requirements for running the policy against RHEL 6 family." + condition: any + rules: + - 'f:/etc/redhat-release -> r:^Red Hat Enterprise Linux && r:release 6' + - 'f:/etc/redhat-release -> r:^CentOS && r:release 6' + - 'f:/etc/redhat-release -> r:^Cloud && r:release 6' + - 'f:/etc/redhat-release -> r:^Oracle && r:release 6' + - 'f:/etc/redhat-release -> r:^Better && r:release 6' + - 'f:/etc/system-release -> r:^Amazon Linux AMI' + +variables: + $sshd_file: /etc/ssh/sshd_config + +checks: +# 1.1.2 /tmp: partition + - id: 5000 + title: "Ensure separate partition exists for /tmp" + description: "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.2"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/tmp\s' + +# 1.1.3 /tmp: nodev + - id: 5001 + title: "Ensure nodev option set on /tmp partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /tmp partition. Run the following command to remount /tmp : # mount -o remount,nodev /tmp" + compliance: + - cis: ["1.1.3"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:nodev' + +# 1.1.4 /tmp: nosuid + - id: 5002 + title: "Ensure nosuid option set on /tmp partition" + description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." + rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /tmp ." + remediation: "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /tmp partition. Run the following command to remount /tmp : # mount -o remount,nosuid /tmp" + compliance: + - cis: ["1.1.4"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:nosuid' + +# 1.1.5 /tmp: noexec + - id: 5003 + title: "Ensure noexec option set on /tmp partition" + description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." + rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /tmp ." + remediation: "Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /tmp partition. Run the following command to remount /tmp : # mount -o remount,noexec /tmp" + compliance: + - cis: ["1.1.5"] + - cis_csc: ["2"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:noexec' + +# 1.1.6 Build considerations - Partition scheme. + - id: 5004 + title: "Ensure separate partition exists for /var" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.6"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var\s' + + + - id: 5005 + title: "Ensure separate partition exists for /var/tmp" + description: "The /var/tmp directory is a world-writable directory used for temporary storage by all users and some applications." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.7"] + condition: all + rules: + - 'c:mount -> r:\s/var/tmp\s' + +# 1.1.11 /var/log: partition + - id: 5006 + title: "Ensure separate partition exists for /var/log" + description: "The /var/log directory is used by system services to store log data ." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.11"] + - cis_csc: ["6.3"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var/log\s' + +# 1.1.12 /var/log/audit: partition + - id: 5007 + title: "Ensure separate partition exists for /var/log/audit" + description: "The auditing daemon, auditd , stores log data in the /var/log/audit directory." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.12"] + - cis_csc: ["6.3"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var/log/audit\s' + +# 1.1.13 /home: partition + - id: 5008 + title: "Ensure separate partition exists for /home" + description: "The /home directory is used to support disk storage needs of local users." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.13"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/home\s' + +# 1.1.14 /home: nodev + - id: 5009 + title: "Ensure nodev option set on /home partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /home partition. # mount -o remount,nodev /home" + compliance: + - cis: ["1.1.14"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/home\s && r:nodev' + +# 1.1.15 /dev/shm: nodev + - id: 5010 + title: "Ensure nodev option set on /dev/shm partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.15"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:nodev' + +# 1.1.16 /dev/shm: nosuid + - id: 5011 + title: "Ensure nosuid option set on /dev/shm partition" + description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." + rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." + remediation: "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" + compliance: + - cis: ["1.1.16"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:nosuid' + +# 1.1.17 /dev/shm: noexec + - id: 5012 + title: "Ensure noexec option set on /dev/shm partition" + description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.17"] + - cis_csc: ["2"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:noexec' + +############################################### +# 1.4 Configure SELinux +############################################### +# 1.6.1.1 enable selinux in /etc/grub.conf + - id: 5013 + title: "Ensure SELinux is not disabled in bootloader configuration" + description: "Configure SELINUX to be enabled at boot time and verify that it has not been overwritten by the grub boot parameters." + rationale: "SELinux must be enabled at boot time in your grub configuration to ensure that the controls it provides are not overridden." + remediation: "Edit /boot/grub/grub.conf and remove all instances of selinux=0 and enforcing=0 on all kernel lines." + compliance: + - cis: ["1.6.1.1"] + - cis_csc: ["14.4"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'f:/etc/grub.conf,/boot/grub/grub.conf -> r:selinux=0|enforcing=0' + +# 1.6.1.2 Set selinux state + - id: 5014 + title: "Ensure the SELinux state is enforcing" + description: "Set SELinux to enable when the system is booted." + rationale: "SELinux must be enabled at boot time in to ensure that the controls it provides are in effect at all times." + remediation: "Edit the /etc/selinux/config file to set the SELINUX parameter: SELINUX=enforcing" + compliance: + - cis: ["1.6.1.2"] + - cis_csc: ["14.4"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sestatus -> r:^SELinux status:\s+enabled$' + - 'c:sestatus -> r:^Current mode:\s+enforcing$' + - 'c:sestatus -> r:^Mode from config file:\s+enforcing$' + - 'f:/etc/selinux/config -> r:^\s*SELINUX\s*=\s*enforcing' + +# 1.6.1.3 Set selinux policy + - id: 5015 + title: "Ensure SELinux policy is configured" + description: "Configure SELinux to meet or exceed the default targeted policy, which constrains daemons and system software only." + rationale: "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." + remediation: "Edit the /etc/selinux/config file to set the SELINUXTYPE parameter: SELINUXTYPE=targeted" + compliance: + - cis: ["1.6.1.3"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sestatus -> r:^Loaded policy name:\s+targeted$' + - 'f:/etc/selinux/config -> r:^\s*SELINUXTYPE\s*=\s*targeted|^\s*SELINUXTYPE\s*=\s*mls' + +# 1.6.1.4 Remove SETroubleshoot + - id: 5016 + title: "Ensure SETroubleshoot is not installed" + description: "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." + rationale: "The SETroubleshoot service is an unnecessary daemon to have running on a server, especially if X Windows is disabled." + remediation: "Run the following command to uninstall setroubleshoot: # yum remove setroubleshoot" + compliance: + - cis: ["1.6.1.4"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa setroubleshoot -> r:setroubleshoot' + +# 1.6.1.5 Disable MCS Translation service mcstrans + - id: 5017 + title: "Ensure the MCS Translation Service (mcstrans) is not installed" + description: "The mcstransd daemon provides category label information to client processes requesting information. The label translations are defined in /etc/selinux/targeted/setrans.conf" + rationale: "Since this service is not used very often, remove it to reduce the amount of potentially vulnerable code running on the system." + remediation: "Run the following command to uninstall mcstrans: # yum remove mcstrans" + compliance: + - cis: ["1.6.1.5"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa mcstrans -> r:mcstrans' + +############################################### +# 1.4 Secure Boot Settings +############################################### +# 1.4.2 Set Boot Loader Password (Scored) + - id: 5018 + title: "Ensure bootloader password is set" + description: "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" + rationale: "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." + remediation: "Create an encrypted password with grub-md5-crypt, copy and paste the into the global section of /boot/grub/grub.conf." + compliance: + - cis: ["1.4.2"] + - cis_csc: ["5.1"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:/boot/grub/grub.cfg,/boot/grub/grub.conf -> !r:^# && r:password --md5' + +# 1.4.3 Require Authentication for Single-User Mode (Scored) + - id: 5019 + title: "Ensure authentication required for single user mode" + description: "Single user mode is used for recovery when the system detects an issue during boot or by manual selection from the bootloader." + rationale: "Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials." + remediation: "Edit /etc/sysconfig/init and set SINGLE to ' /sbin/sulogin ': SINGLE=/sbin/sulogin" + compliance: + - cis: ["1.4.3"] + - cis_csc: ["5.1"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:/etc/sysconfig/init -> !r:^# && r:SINGLE\s*=\s*/sbin/sulogin' + +# 1.4.4 Disable Interactive Boot (Scored) + - id: 5020 + title: "Ensure interactive boot is not enabled" + description: "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 ." + rationale: "Turn off the PROMPT option on the console to prevent console users from potentially overriding established security settings." + remediation: "Edit the /etc/sysconfig/init file and set PROMPT to ' no ': PROMPT=no" + compliance: + - cis: ["1.4.4"] + - cis_csc: ["5.1"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:/etc/sysconfig/init -> r:^PROMPT\s*=\s*no$' + +############################################### +# 1.5 Additional Process Hardening +############################################### +# 1.5.1 Restrict Core Dumps (Scored) + - id: 5021 + title: "Ensure core dumps are restricted" + description: "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." + rationale: "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) )." + remediation: "Add the following line to /etc/security/limits.conf or a /etc/security/limits.d/* file: * hard core 0; fs.suid_dumpable = 0 Run the following command to set the active kernel parameter: # sysctl -w fs.suid_dumpable=0" + compliance: + - cis: ["1.5.1"] + - cis_csc: ["13"] + condition: all + rules: + - 'c:grep -Rh ^*[[:space:]]*hard[[:space:]][[:space:]]*core[[:space:]][[:space:]]* /etc/security/limits.conf /etc/security/limits.d -> r:\s*\t*0$' + - 'c:sysctl fs.suid_dumpable -> r:^fs.suid_dumpable\s*=\s*0\s*$' + - 'c:grep -Rh fs\.suid_dumpable /etc/sysctl.conf /etc/sysctl.d -> r:^\s*fs.suid_dumpable\s*=\s*0\s*$' + +# 1.5.3 Enable Randomized Virtual Memory Region Placement (Scored) + - id: 5022 + title: "Ensure address space layout randomization (ASLR) is enabled" + description: "Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process." + rationale: "Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting." + remediation: "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: kernel.randomize_va_space = 2 and set the active kernel parameter" + compliance: + - cis: ["1.5.3"] + - cis_csc: ["8.4"] + condition: all + rules: + - 'c:grep -Rh ^kernel\.randomize_va_space /etc/sysctl.conf /etc/sysctl.d -> r:^\s*kernel.randomize_va_space\s*=\s*2$' + - 'c:sysctl kernel.randomize_va_space -> r:^\s*kernel.randomize_va_space\s*=\s*2' + +############################################### +# 2 OS Services +############################################### +############################################### +# 2.1 Remove Legacy Services +############################################### +# 2.1.8 Remove telnet-server (Scored) + - id: 5023 + title: "Ensure telnet server is not enabled" + description: "The telnet-server package contains the telnet daemon, which accepts connections from users from other systems via the telnet protocol." + rationale: "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." + remediation: "Run the following command to disable telnet: # chkconfig telnet off" + compliance: + - cis: ["2.1.8"] + - cis_csc: ["3.4", "9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:telnet-server && r::on' + +# 2.1.6 Remove rsh-server (Scored) + - id: 5024 + title: "Ensure rsh server is not enabled" + description: "The Berkeley rsh-server ( rsh , rlogin , rexec ) package contains legacy services that exchange credentials in clear-text." + rationale: "These legacy services contain numerous security exposures and have been replaced with the more secure SSH package." + remediation: "Disable rsh, rlogin, and rexec." + compliance: + - cis: ["2.1.6"] + - cis_csc: ["3.4"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:rsh|rlogin|rexec && r::on' + + +# 2.3.1 Remove NIS Client (Scored) + - id: 5025 + title: "Ensure NIS Client is not installed" + description: "The Network Information Service (NIS), formerly known as Yellow Pages, is a client-server directory service protocol used to distribute system configuration files." + rationale: "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)." + remediation: "Run the following command to uninstall ypbind : # yum remove ypbind" + compliance: + - cis: ["2.3.1"] + - cis_csc: ["2"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa ypbind -> r:ypbind' + +# 2.2.16 Remove NIS Server (Scored) + - id: 5026 + title: "Ensure NIS Server is not enabled" + description: "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." + rationale: "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)." + remediation: "Run the following command to disable ypserv: # chkconfig ypserv off" + compliance: + - cis: ["2.2.16"] + - cis_csc: ["9.4"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:ypserv && r::on' + +# 2.1.9 Remove tftp-server (Scored) + - id: 5027 + title: "Ensure tftp server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable tftp: # chkconfig tftp off" + compliance: + - cis: ["2.1.9"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:tftp && r::on' + +# 2.1.7 Remove talk-server (Scored) + - id: 5028 + title: "Ensure talk server is disabled" + description: "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." + rationale: "The software presents a security risk as it uses unencrypted protocols for communication." + remediation: "Run the following command to disable talk: # chkconfig talk off" + compliance: + - cis: ["2.1.7"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:talk && r::on' + +############################################### +# 2 Special Purpose Services +############################################### + +# 2.2.2 Remove X Windows (Scored) + - id: 5029 + title: "Ensure X Window System is not installed" + description: "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." + rationale: "Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface." + remediation: "Run the following command to remove the X Windows System packages: # yum remove xorg-x11*" + compliance: + - cis: ["2.2.2"] + - cis_csc: ["2"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa xorg-x11* -> r:^xorg-x11' + +# 2.2.3 Disable Avahi Server (Scored) + - id: 5030 + title: "Ensure Avahi Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable avahi-daemon : # chkconfig avahi-daemon off" + compliance: + - cis: ["2.2.3"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:avahi-daemon && r::on' + +# 2.2.7 Disable NFS and RPC (Not Scored) + - id: 5031 + title: "Ensure NFS and RPC are not enabled" + description: "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." + rationale: "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." + remediation: "Run the following commands to disable nfs and rpcbind: # chkconfig nfs off # chkconfig rpcbind off" + compliance: + - cis: ["2.2.7"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:nfs|rpcbind && r::on' + +# 2.2.9 Remove FTP Server (Not Scored) + - id: 5032 + title: "Ensure FTP Server is not enabled" + description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." + rationale: "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." + remediation: "Run the following command to disable vsftpd: # chkconfig vsftpd off" + compliance: + - cis: ["2.2.9"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:vsftpd && r::on' + +# 2.2.10 Remove HTTP Server (Scored) + - id: 5033 + title: "Ensure HTTP server is not enabled" + description: "HTTP or web servers provide the ability to host web site content." + rationale: "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." + remediation: "Run the following command to disable httpd: # chkconfig httpd off" + compliance: + - cis: ["2.2.10"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:httpd && r::on' + +# 2.2.11 Remove Dovecot (IMAP and POP3 services) (Scored) + - id: 5034 + title: "Ensure IMAP and POP3 server is not enabled" + description: "dovecot is an open source IMAP and POP3 server for Linux based systems." + rationale: "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." + remediation: "Run the following command to disable dovecot: # chkconfig dovecot off" + compliance: + - cis: ["2.2.11"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:dovecot && r::on' + +# 2.2.12 Remove Samba (Scored) + - id: 5035 + title: "Ensure Samba is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable smb: # chkconfig smb off" + compliance: + - cis: ["2.2.12"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:smb && r::on' + +# 2.2.13 Remove HTTP Proxy Server (Scored) + - id: 5036 + title: "Ensure HTTP Proxy Server is not enabled" + description: "Squid is a standard proxy server used in many distributions and environments." + rationale: "If there is no need for a proxy server, it is recommended that the squid proxy be disabled to reduce the potential attack surface." + remediation: "Run the following command to disable squid : # chkconfig squid off" + compliance: + - cis: ["2.2.13"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:squid && r::on' + +# 2.2.14 Remove SNMP Server (Scored) + - id: 5037 + title: "Ensure SNMP Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable snmpd: # chkconfig snmpd off" + compliance: + - cis: ["2.2.14"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:snmpd && r::on' + +############################################### +# 3 Network Configuration and Firewalls +############################################### +############################################### +# 3.1 Modify Network Parameters (Host Only) +############################################### +# 3.1.1 Disable IP Forwarding (Scored) + - id: 5038 + title: "Ensure IP forwarding is disabled" + description: "The net.ipv4.ip_forward flag is used to tell the system whether it can forward packets or not." + rationale: "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." + remediation: "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.ip_forward = 0 and run # sysctl -w net.ipv4.ip_forward=0 # sysctl -w net.ipv4.route.flush=1" + compliance: + - cis: ["3.1.1"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.ip_forward -> r:^net.ipv4.ip_forward\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.ip_forward /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.ip_forward\s*=\s*0$' + +# 3.1.2 Disable Send Packet Redirects (Scored) + - id: 5039 + title: "Ensure packet redirect sending is disabled" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.1.2"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.send_redirects -> r:^net.ipv4.conf.all.send_redirects\s*=\s*0$' + - 'c:sysctl net.ipv4.conf.default.send_redirects -> r:^net.ipv4.conf.default.send_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.send_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.send_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.send_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.send_redirects\s*=\s*0$' + +############################################### +# 3.2 Modify Network Parameters (Host and Router) +############################################### +# 3.2.1 Disable Source Routed Packet Acceptance (Scored) + - id: 5040 + title: "Ensure source routed packets are not accepted" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.1"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.accept_source_route -> r:^net.ipv4.conf.all.accept_source_route\s*=\s*0$' + - 'c:sysctl net.ipv4.conf.default.accept_source_route -> r:^net.ipv4.conf.default.accept_source_route\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.accept_source_route\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.accept_source_route\s*=\s*0$' + +# 3.2.2 Disable ICMP Redirect Acceptance (Scored) + - id: 5041 + title: "Ensure ICMP redirects are not accepted" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.2"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.accept_redirects -> r:^net.ipv4.conf.all.accept_redirects\s*=\s*0$' + - 'c:sysctl net.ipv4.conf.default.accept_redirects -> r:^net.ipv4.conf.default.accept_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.accept_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.accept_redirects\s*=\s*0$' + +# 3.2.3 Disable Secure ICMP Redirect Acceptance (Scored) + - id: 5042 + title: "Ensure secure ICMP redirects are not accepted" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.3"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.secure_redirects -> r:^net.ipv4.conf.all.secure_redirects\s*=\s*0$' + - 'c:sysctl net.ipv4.conf.default.secure_redirects -> r:^net.ipv4.conf.default.secure_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.secure_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.secure_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.secure_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.secure_redirects\s*=\s*0$' + +# 3.2.4 Log Suspicious Packets (Scored) + - id: 5043 + title: "Ensure suspicious packets are logged" + description: "When enabled, this feature logs packets with un-routable source addresses to the kernel log." + rationale: "Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system." + remediation: "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." + compliance: + - cis: ["3.2.4"] + - cis_csc: ["6"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.log_martians -> r:^net.ipv4.conf.all.log_martians\s*=\s*1$' + - 'c:sysctl net.ipv4.conf.default.log_martians -> r:^net.ipv4.conf.default.log_martians\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.log_martians /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.log_martians\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.log_martians /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.log_martians\s*=\s*1$' + +# 3.2.5 Enable Ignore Broadcast Requests (Scored) + - id: 5044 + title: "Ensure broadcast ICMP requests are ignored" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.5"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.icmp_echo_ignore_broadcasts -> r:^net.ipv4.icmp_echo_ignore_broadcasts\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.icmp_echo_ignore_broadcasts /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.icmp_echo_ignore_broadcasts\s*=\s*1$' + +# 3.2.6 Enable Bad Error Message Protection (Scored) + - id: 5045 + title: "Ensure bogus ICMP responses are ignored" + description: "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." + rationale: "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." + remediation: "Set the net.ipv4.icmp_ignore_bogus_error_responses parameter to 1 in /etc/sysctl.conf: net.ipv4.icmp_ignore_bogus_error_responses=1" + compliance: + - cis: ["3.2.6"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.icmp_ignore_bogus_error_responses -> r:^net.ipv4.icmp_ignore_bogus_error_responses\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.icmp_ignore_bogus_error_responses /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.icmp_ignore_bogus_error_responses\s*=\s*1$' + +# 3.2.7 Ensure Reverse Path Filtering is enabled (Scored) + - id: 5046 + title: "Ensure Reverse Path Filtering is enabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.7"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.rp_filter -> r:^net.ipv4.conf.all.rp_filter\s*=\s*1$' + - 'c:sysctl net.ipv4.conf.default.rp_filter -> r:^net.ipv4.conf.default.rp_filter\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.rp_filter /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.rp_filter\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.rp_filter /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.rp_filter\s*=\s*1$' + +# 3.2.8 Enable TCP SYN Cookies (Scored) + - id: 5047 + title: "Ensure TCP SYN Cookies is enabled" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.8"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.tcp_syncookies -> r:^net.ipv4.tcp_syncookies\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.tcp_syncookies /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.tcp_syncookies\s*=\s*1$' + +############################################### +# 5 System Access, Authentication and Authorization +############################################### +############################################### +# 5.2 Configure SSH +############################################### +# 5.2.2 Set SSH Protocol to 2 (Scored) + - id: 5048 + title: "Ensure SSH Protocol is set to 2" + description: "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." + rationale: "SSH v1 suffers from insecurities that do not affect SSH v2." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:Protocol\s*\t*2' + +# 5.2.3 Set LogLevel to INFO (Scored) + - id: 5049 + title: "Ensure SSH LogLevel is set to INFO" + description: "The INFO parameter specifies that login and logout activity will be logged." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel INFO" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:LogLevel\s*\t*INFO' + +# 5.2.5 Set SSH MaxAuthTries to 4 or Less (Scored) + - id: 5050 + title: "Ensure SSH MaxAuthTries is set to 4 or less" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4" + compliance: + - cis: ["5.2.5"] + - cis_csc: ["16"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && n:^MaxAuthTries\s*\t*(\d+) compare <= 4' + +# 5.2.6 Set SSH IgnoreRhosts to Yes (Scored) + - id: 5051 + title: "Ensure SSH IgnoreRhosts is enabled" + description: "The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication." + rationale: "Setting this parameter forces users to enter a password when authenticating with ssh." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:IgnoreRhosts\s*\t*yes' + +# 5.2.7 Set SSH HostbasedAuthentication to No (Scored) + - id: 5052 + title: "Ensure SSH HostbasedAuthentication is disabled" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:HostbasedAuthentication\s*\t*no' + +# 5.2.8 Disable SSH Root Login (Scored) + - id: 5053 + title: "Ensure SSH root login is disabled" + description: "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" + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:PermitRootLogin\s*\t*no' + +# 5.2.9 Set SSH PermitEmptyPasswords to No (Scored) + - id: 5054 + title: "Ensure SSH PermitEmptyPasswords is disabled" + description: "The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts with empty password strings." + rationale: "Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system" + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:PermitEmptyPasswords\s*\t*no' + +############################################### +# 6 System Maintenance +############################################### +############################################### +# 6.2 Review User and Group Settings +############################################### +# 6.2.5 Verify No UID 0 Accounts Exist Other Than root (Scored) + - id: 5055 + title: "Ensure root is the only UID 0 account" + description: "Any account with UID 0 has superuser privileges on the system." + rationale: "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." + remediation: "Remove any users other than root with UID 0 or assign them a new UID if appropriate." + compliance: + - cis: ["6.2.5"] + - cis_csc: ["5.1"] + - pci_dss: ["10.2.5"] + - hipaa: ["164.312.b"] + - nist_800_53: ["AU.14", "AC.7"] + condition: none + rules: + - 'f:/etc/passwd -> !r:^# && !r:^\s*\t*root: && r:^\w+:\w+:0:' diff --git a/sca/rhel/6/cis_rhel6_linux_rcl.yml b/sca/rhel/6/cis_rhel6_linux_rcl.yml deleted file mode 100644 index 81baff119..000000000 --- a/sca/rhel/6/cis_rhel6_linux_rcl.yml +++ /dev/null @@ -1,867 +0,0 @@ -# Security Configuration assessment -# CIS Checks for RHEL 6 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# Center for Internet Security Benchmark for Red Hat Enterprise Linux 6 v2.1.0 - 12-27-2017 - -policy: - id: "cis_rhel6" - file: "cis_rhel6_linux_rcl.yml" - name: "CIS Benchmark for Red Hat Enterprise Linux 6" - description: "This document provides prescriptive guidance for establishing a secure configuration posture for Red Hat Enterprise Linux 6 systems running on x86 and x64 platforms. This document was tested against Red Hat Enterprise Linux 6.9." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check RHEL6 version" - description: "Requirements for RHEL 6 check" - condition: "any required" - rules: - - 'f:/etc/redhat-release -> r:^Red Hat Enterprise Linux \S+ release 6;' - - 'f:/etc/redhat-release -> IN r:^CentOS && r:release 6;' - - 'f:/etc/redhat-release -> IN r:^Cloud && r:release 6;' - - 'f:/etc/redhat-release -> IN r:^Oracle && r:release 6;' - - 'f:/etc/redhat-release -> IN r:^Better && r:release 6;' - -variables: - $rc_dirs: /etc/rc.d/rc2.d,/etc/rc.d/rc3.d,/etc/rc.d/rc4.d,/etc/rc.d/rc5.d; - -checks: -# 1.1.2 /tmp: partition - - id: 6000 - title: "Ensure separate partition exists for /tmp" - description: "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.2" - references: - - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> !r:/tmp;' -# 1.1.3 /tmp: nodev - - id: 6001 - title: "Ensure nodev option set on /tmp partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /tmp partition. Run the following command to remount /tmp : # mount -o remount,nodev /tmp" - compliance: - - cis: "1.1.3" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/tmp && r:nodev;' -# 1.1.4 /tmp: nosuid - - id: 6002 - title: "Ensure nosuid option set on /tmp partition" - description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." - rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /tmp ." - remediation: "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /tmp partition. Run the following command to remount /tmp : # mount -o remount,nosuid /tmp" - compliance: - - cis: "1.1.4" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/tmp && r:nosuid;' -# 1.1.5 /tmp: noexec - - id: 6003 - title: "Ensure noexec option set on /tmp partition" - description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." - rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /tmp ." - remediation: "Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /tmp partition. Run the following command to remount /tmp : # mount -o remount,noexec /tmp" - compliance: - - cis: "1.1.5" - - cis_csc: "2" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/tmp && r:noexec;' -# 1.1.6 Build considerations - Partition scheme. - - id: 6004 - title: "Ensure separate partition exists for /var" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.6" - references: - - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r^# && r:/var;' -# 1.1.7 bind mount /var/tmp to /tmp - - id: 6005 - title: "Ensure separate partition exists for /var/tmp" - description: "The /var/tmp directory is a world-writable directory used for temporary storage by all users and some applications." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.7" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/var/tmp && r:bind;' -# 1.1.11 /var/log: partition - - id: 6006 - title: "Ensure separate partition exists for /var/log" - description: "The /var/log directory is used by system services to store log data ." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.11" - - cis_csc: "6.3" - references: - - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/var/log;' -# 1.1.12 /var/log/audit: partition - - id: 6007 - title: "Ensure separate partition exists for /var/log/audit" - description: "The auditing daemon, auditd , stores log data in the /var/log/audit directory." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.12" - - cis_csc: "6.3" - references: - - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/var/log/audit;' -# 1.1.13 /home: partition - - id: 6008 - title: "Ensure separate partition exists for /home" - description: "The /home directory is used to support disk storage needs of local users." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.13" - references: - - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/home;' -# 1.1.14 /home: nodev - - id: 6009 - title: "Ensure nodev option set on /home partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /home partition. # mount -o remount,nodev /home" - compliance: - - cis: "1.1.14" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/home && r:nodev;' -# 1.1.18 nodev on removable media partitions (not scored) - - id: 6010 - title: "Ensure nodev option set on removable media partitions" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "Removable media containing character and block special devices could be used to circumvent security controls by allowing non-root users to access sensitive device files such as /dev/kmem or the raw disk partitions." - remediation: "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom." - compliance: - - cis: "1.1.18" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:nodev;' -# 1.1.19 nosuid on removable media partitions (not scored) - - id: 6011 - title: "Ensure nosuid option set on removable media partitions" - description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." - rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." - remediation: "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom." - compliance: - - cis: "1.1.19" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:nosuid;' -# 1.1.20 noexec on removable media partitions (not scored) - - id: 6012 - title: "Ensure noexec option set on removable media partitions" - description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." - rationale: "Setting this option on a file system prevents users from executing programs from the removable media. This deters users from being able to introduce potentially malicious software on the system." - remediation: "Edit the /etc/fstab file and add noexec to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom." - compliance: - - cis: "1.1.20" - - cis_csc: "8" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:noexec;' -# 1.1.15 /dev/shm: nodev - - id: 6013 - title: "Ensure nodev option set on /dev/shm partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "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" - compliance: - - cis: "1.1.15" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:nodev;' -# 1.1.16 /dev/shm: nosuid - - id: 6014 - title: "Ensure nosuid option set on /dev/shm partition" - description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." - rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." - remediation: "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" - compliance: - - cis: "1.1.16" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:nosuid;' -# 1.1.17 /dev/shm: noexec - - id: 6015 - title: "Ensure noexec option set on /dev/shm partition" - description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." - rationale: "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." - remediation: "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" - compliance: - - cis: "1.1.17" - - cis_csc: "2" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:noexec;' -############################################### -# 1.4 Configure SELinux -############################################### -# 1.6.1.1 enable selinux in /etc/grub.conf - - id: 6016 - title: "Ensure SELinux is not disabled in bootloader configuration" - description: "Configure SELINUX to be enabled at boot time and verify that it has not been overwritten by the grub boot parameters." - rationale: "SELinux must be enabled at boot time in your grub configuration to ensure that the controls it provides are not overridden." - remediation: "Edit /boot/grub/grub.conf and remove all instances of selinux=0 and enforcing=0 on all kernel lines." - compliance: - - cis: "1.6.1.1" - - cis_csc: "14.4" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/grub.conf -> r:selinux=0;' -# 1.6.1.2 Set selinux state - - id: 6017 - title: "Ensure the SELinux state is enforcing" - description: "Set SELinux to enable when the system is booted." - rationale: "SELinux must be enabled at boot time in to ensure that the controls it provides are in effect at all times." - remediation: "Edit the /etc/selinux/config file to set the SELINUX parameter: SELINUX=enforcing" - compliance: - - cis: "1.6.1.2" - - cis_csc: "14.4" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/selinux/config -> !r:SELINUX=enforcing;' -# 1.6.1.3 Set seliux policy - - id: 6018 - title: "Ensure SELinux policy is configured" - description: "Configure SELinux to meet or exceed the default targeted policy, which constrains daemons and system software only." - rationale: "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." - remediation: "Edit the /etc/selinux/config file to set the SELINUXTYPE parameter: SELINUXTYPE=targeted" - compliance: - - cis: "1.6.1.3" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/selinux/config -> !r:SELINUXTYPE=targeted;' -# 1.6.1.4 Remove SETroubleshoot - - id: 6019 - title: "Ensure SETroubleshoot is not installed" - description: "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." - rationale: "The SETroubleshoot service is an unnecessary daemon to have running on a server, especially if X Windows is disabled." - remediation: "Run the following command to uninstall setroubleshoot: # yum remove setroubleshoot" - compliance: - - cis: "1.6.1.4" - - pci_dss: "2.2.4" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsetroubleshoot$;' -# 1.6.1.5 Disable MCS Translation service mcstrans - - id: 6020 - title: "Ensure the MCS Translation Service (mcstrans) is not installed" - description: "The mcstransd daemon provides category label information to client processes requesting information. The label translations are defined in /etc/selinux/targeted/setrans.conf" - rationale: "Since this service is not used very often, remove it to reduce the amount of potentially vulnerable code running on the system." - remediation: "Run the following command to uninstall mcstrans: # yum remove mcstrans" - compliance: - - cis: "1.6.1.5" - - pci_dss: "2.2.4" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dmctrans$;' -############################################### -# 1.4 Secure Boot Settings -############################################### -# 1.4.2 Set Boot Loader Password (Scored) - - id: 6021 - title: "Ensure bootloader password is set" - description: "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" - rationale: "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." - remediation: "Create an encrypted password with grub-md5-crypt, copy and paste the into the global section of /boot/grub/grub.conf." - compliance: - - cis: "1.4.2" - - cis_csc: "5.1" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/boot/grub/menu.lst -> NIN !r:^# && r:password;' -# 1.4.3 Require Authentication for Single-User Mode (Scored) - - id: 6022 - title: "Ensure authentication required for single user mode" - description: "Single user mode is used for recovery when the system detects an issue during boot or by manual selection from the bootloader." - rationale: "Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials." - remediation: "Edit /etc/sysconfig/init and set SINGLE to ' /sbin/sulogin ': SINGLE=/sbin/sulogin" - compliance: - - cis: "1.4.3" - - cis_csc: "5.1" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/inittab -> IN !r:^# && r:S:wait;' -# 1.4.4 Disable Interactive Boot (Scored) - - id: 6023 - title: "Ensure interactive boot is not enabled" - description: "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 ." - rationale: "Turn off the PROMPT option on the console to prevent console users from potentially overriding established security settings." - remediation: "Edit the /etc/sysconfig/init file and set PROMPT to ' no ': PROMPT=no" - compliance: - - cis: "1.4.4" - - cis_csc: "5.1" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/sysconfig/init -> NIN !r:^# && r:PROMPT=no;' -############################################### -# 1.5 Additional Process Hardening -############################################### -# 1.5.1 Restrict Core Dumps (Scored) - - id: 6024 - title: "Ensure core dumps are restricted" - description: "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." - rationale: "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) )." - remediation: "Add the following line to /etc/security/limits.conf or a /etc/security/limits.d/* file: * hard core 0; fs.suid_dumpable = 0 Run the following command to set the active kernel parameter: # sysctl -w fs.suid_dumpable=0" - compliance: - - cis: "1.5.1" - - cis_csc: "13" - condition: any - rules: - - 'f:/etc/security/limits.conf -> NIN !r:^# && r:hard\.+core\.+0;' -# 1.5.3 Enable Randomized Virtual Memory Region Placement (Scored) - - id: 6025 - title: "Ensure address space layout randomization (ASLR) is enabled" - description: "Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process." - rationale: "Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting." - remediation: "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" - compliance: - - cis: "1.5.3" - - cis_csc: "8.4" - condition: any - rules: - - 'f:/proc/sys/kernel/randomize_va_space -> 0;' -############################################### -# 2 OS Services -############################################### -############################################### -# 2.1 Remove Legacy Services -############################################### -# 2.1.8 Remove telnet-server (Scored) - - id: 6026 - title: "Ensure telnet server is not enabled" - description: "The telnet-server package contains the telnet daemon, which accepts connections from users from other systems via the telnet protocol." - rationale: "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." - remediation: "Run the following command to disable telnet: # chkconfig telnet off" - compliance: - - cis: "2.1.8" - - cis_csc: "3.4, 9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/telnet -> IN !r:^# && r:disable && r:no;' -# 2.1.6 Remove rsh-server (Scored) - - id: 6027 - title: "Ensure rsh server is not enabled" - description: "The Berkeley rsh-server ( rsh , rlogin , rexec ) package contains legacy services that exchange credentials in clear-text." - rationale: "These legacy services contain numerous security exposures and have been replaced with the more secure SSH package." - remediation: "Disable rsh, rlogin, and rexec." - compliance: - - cis: "2.1.6" - - cis_csc: "3.4" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/rlogin -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/rsh -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/shell -> IN !r:^# && r:disable && r:no;' -# 2.3.1 Remove NIS Client (Scored) - - id: 6028 - title: "Ensure NIS Client is not installed" - description: "The Network Information Service (NIS), formerly known as Yellow Pages, is a client-server directory service protocol used to distribute system configuration files." - rationale: "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)." - remediation: "Run the following command to uninstall ypbind : # yum remove ypbind" - compliance: - - cis: "2.3.1" - - cis_csc: "2" - - pci_dss: "2.2.3" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dypbind$;' -# 2.2.16 Remove NIS Server (Scored) - - id: 6029 - title: "Ensure NIS Server is not enabled" - description: "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." - rationale: "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)." - remediation: "Run the following command to disable ypserv: # chkconfig ypserv off" - compliance: - - cis: "2.2.16" - - cis_csc: "9.4" - - pci_dss: "2.2.3" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dypserv$;' -# 2.1.9 Remove tftp-server (Scored) - - id: 6030 - title: "Ensure tftp server is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable tftp: # chkconfig tftp off" - compliance: - - cis: "2.1.9" - - cis_csc: "9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/tftpd -> IN !r:^# && r:disable && r:no;' -# 2.1.7 Remove talk-server (Scored) - - id: 6031 - title: "Ensure talk server is not enabled" - description: "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." - rationale: "The software presents a security risk as it uses unencrypted protocols for communication." - remediation: "Run the following command to disable talk: # chkconfig talk off" - compliance: - - cis: "2.1.7" - - cis_csc: "9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/talk -> IN !r:^# && r:disable && r:no;' -############################################### -# 2 Special Purpose Services -############################################### -# 3.1 Set Daemon umask (Scored) - - id: 6032 - title: "Set Daemon umask" - description: "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." - rationale: "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." - remediation: "Add the following line to the /etc/sysconfig/init file.umask 027" - compliance: - - cis: "3.1" - - pci_dss: "2.2.2" - condition: all - rules: - - 'f:/etc/init.d/functions -> IN !r:^# && r:^umask && <:umask 027;' -# 2.2.2 Remove X Windows (Scored) - - id: 6033 - title: "Ensure X Window System is not installed" - description: "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." - rationale: "Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface." - remediation: "Run the following command to remove the X Windows System packages: # yum remove xorg-x11*" - compliance: - - cis: "2.2.2" - - cis_csc: "2" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/inittab -> IN !r:^# && r:id:5;' -# 2.2.3 Disable Avahi Server (Scored) - - id: 6034 - title: "Ensure Avahi Server is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable avahi-daemon : # chkconfig avahi-daemon off" - compliance: - - cis: "2.2.3" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'p:avahi-daemon;' -# 2.2.7 Disable NFS and RPC (Not Scored) - - id: 6035 - title: "Ensure NFS and RPC are not enabled" - description: "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." - rationale: "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." - remediation: "Run the following commands to disable nfs and rpcbind: # chkconfig nfs off # chkconfig rpcbind off" - compliance: - - cis: "2.2.7" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dnfs$;' - - 'd:$rc_dirs -> ^S\d\dnfslock$;' -# 2.2.9 Remove FTP Server (Not Scored) - - id: 6036 - title: "Ensure FTP Server is not enabled" - description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." - rationale: "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." - remediation: "Run the following command to disable vsftpd: # chkconfig vsftpd off" - compliance: - - cis: "2.2.9" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/xinetd.d/vsftpd -> IN !r:^# && r:disable && r:no;' -# 2.2.10 Remove HTTP Server (Not Scored) - - id: 6037 - title: "Ensure HTTP server is not enabled" - description: "HTTP or web servers provide the ability to host web site content." - rationale: "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." - remediation: "Run the following command to disable httpd: # chkconfig httpd off" - compliance: - - cis: "2.2.10" - - cis_csc: "9.1" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dhttpd$;' -# 2.2.11 Remove Dovecot (IMAP and POP3 services) (Not Scored) - - id: 6038 - title: "Ensure IMAP and POP3 server is not enabled" - description: "dovecot is an open source IMAP and POP3 server for Linux based systems." - rationale: "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." - remediation: "Run the following command to disable dovecot: # chkconfig dovecot off" - compliance: - - cis: "2.2.11" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/xinetd.d/cyrus-imapd -> IN !r:^# && r:disable && r:no;' - - id: 6039 - title: "Ensure IMAP and POP3 server is not enabled" - description: "dovecot is an open source IMAP and POP3 server for Linux based systems." - rationale: "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." - remediation: "Run the following command to disable dovecot: # chkconfig dovecot off" - compliance: - - cis: "2.2.11" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/xinetd.d/dovecot -> NIN !r:^# && r:disable && r:no;' -# 2.2.12 Remove Samba (Not Scored) - - id: 6040 - title: "Ensure Samba is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable smb: # chkconfig smb off" - compliance: - - cis: "2.2.12" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsamba$;' - - 'd:$rc_dirs -> ^S\d\dsmb$;' -# 2.2.13 Remove HTTP Proxy Server (Not Scored) - - id: 6041 - title: "Ensure HTTP Proxy Server is not enabled" - description: "Squid is a standard proxy server used in many environments." - rationale: "If there is no need for a proxy server, it is recommended that the squid proxy be disabled to reduce the potential attack surface." - remediation: "Run the following command to disable squid : # chkconfig squid off" - compliance: - - cis: "2.2.13" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsquid$;' -# 2.2.14 Remove SNMP Server (Not Scored) - - id: 6042 - title: "Ensure SNMP Server is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable snmpd: # chkconfig snmpd off" - compliance: - - cis: "2.2.14" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsnmpd$;' -############################################### -# 3 Network Configuration and Firewalls -############################################### -############################################### -# 3.1 Modify Network Parameters (Host Only) -############################################### -# 3.1.1 Disable IP Forwarding (Scored) - - id: 6043 - title: "Ensure IPv4 forwarding is disabled" - description: "The net.ipv4.ip_forward flag is used to tell the system whether it can forward packets or not." - rationale: "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." - remediation: "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.ip_forward = 0 and run # sysctl -w net.ipv4.ip_forward=0 # sysctl -w net.ipv4.route.flush=1" - compliance: - - cis: "3.1.1" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/ip_forward -> 1;' - - id: 6044 - title: "Ensure IPv6 forwarding is disabled" - description: "The net.ipv6.conf.all.forwarding flag is used to tell the system whether it can forward packets or not." - rationale: "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." - remediation: "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.forwarding = 0 and run # sysctl -w net.ipv6.conf.all.forwarding=0 # sysctl -w net.ipv6.route.flush=1" - compliance: - - cis: "3.1.1" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv6/ip_forward -> 1;' -# 3.1.2 Disable Send Packet Redirects (Scored) - - id: 6045 - title: "Ensure packet redirect sending is disabled" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.1.2" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/send_redirects -> 1;' - - 'f:/proc/sys/net/ipv4/conf/default/send_redirects -> 1;' -############################################### -# 3.2 Modify Network Parameters (Host and Router) -############################################### -# 3.2.1 Disable Source Routed Packet Acceptance (Scored) - - id: 6046 - title: "Ensure source routed packets are not accepted" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.2.1" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/accept_source_route -> 1;' -# 3.2.3 Disable Secure ICMP Redirect Acceptance (Scored) - - id: 6047 - title: "Ensure secure ICMP redirects are not accepted" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.2.3" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/secure_redirects -> 1;' - - 'f:/proc/sys/net/ipv4/conf/default/secure_redirects -> 1;' -# 3.2.4 Log Suspicious Packets (Scored) - - id: 6048 - title: "Ensure suspicious packets are logged" - description: "When enabled, this feature logs packets with un-routable source addresses to the kernel log." - rationale: "Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system." - remediation: "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." - compliance: - - cis: "3.2.4" - - cis_csc: "6" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/log_martians -> 0;' - - 'f:/proc/sys/net/ipv4/conf/default/log_martians -> 0;' -# 3.2.5 Enable Ignore Broadcast Requests (Scored) - - id: 6049 - title: "Ensure broadcast ICMP requests are ignored" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.2.5" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/icmp_echo_ignore_broadcasts -> 0;' -# 3.2.6 Enable Bad Error Message Protection (Scored) - - id: 6050 - title: "Ensure bogus ICMP responses are ignored" - description: "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." - rationale: "Some routers (andsome attackers) will send responses that violate RFC-1122 and attempt to fill up a log file system with many useless error messages." - remediation: "Set the net.ipv4.icmp_ignore_bogus_error_responses parameter to 1 in /etc/sysctl.conf: net.ipv4.icmp_ignore_bogus_error_responses=1" - compliance: - - cis: "3.2.6" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/icmp_ignore_bogus_error_responses -> 0;' -# 3.2.7 Ensure Reverse Path Filtering is enabled (Scored) - - id: 6051 - title: "Ensure Reverse Path Filtering is enabled (Scored)" - description: "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." - rationale: "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." - remediation: "Set the net.ipv4.conf.all.rp_filterand 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" - compliance: - - cis: "3.2.7" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/rp_filter -> 0;' - - 'f:/proc/sys/net/ipv4/conf/default/rp_filter -> 0;' -# 3.2.8 Enable TCP SYN Cookies (Scored) - - id: 6052 - title: "Ensure TCP SYN Cookies is enabled" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.2.8" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/tcp_syncookies -> 0;' -############################################### -# 5.2 Configure SSH -############################################### -# 5.2.2 Set SSH Protocol to 2 (Scored) - - id: 6053 - title: "Ensure SSH Protocol is set to 2" - description: "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." - rationale: "SSH v1 suffers from insecurities that do not affect SSH v2." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" - compliance: - - cis: "5.2.2" - - cis_csc: "3.4" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:Protocol\.+1;' -# 5.2.6 Set SSH IgnoreRhosts to Yes (Scored) - - id: 6054 - title: "Ensure SSH IgnoreRhosts is enabled" - description: "The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication." - rationale: "Setting this parameter forces users to enter a password when authenticating with ssh." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" - compliance: - - cis: "5.2.6" - - cis_csc: "9" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:IgnoreRhosts\.+no;' -# 5.2.7 Set SSH HostbasedAuthentication to No (Scored) - - id: 6055 - title: "Ensure SSH HostbasedAuthentication is disabled" - description: "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." - rationale: "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 ." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" - compliance: - - cis: "5.2.7" - - cis_csc: "9" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:HostbasedAuthentication\.+yes;' -# 5.2.8 Disable SSH Root Login (Scored) - - id: 6056 - title: "Ensure SSH root login is disabled" - description: "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" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" - compliance: - - cis: "5.2.8" - - cis_csc: "5.8" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:PermitRootLogin\.+yes;' -# 5.2.9 Set SSH PermitEmptyPasswords to No (Scored) - - id: 6057 - title: "Ensure SSH PermitEmptyPasswords is disabled" - description: "The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts with empty password strings." - rationale: "Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" - compliance: - - cis: "5.2.9" - - cis_csc: "16" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:^PermitEmptyPasswords\.+yes;' -# 6.2.5 Verify No UID 0 Accounts Exist Other Than root (Scored) - - id: 6058 - title: "Ensure root is the only UID 0 account" - description: "Any account with UID 0 has superuser privileges on the system." - rationale: "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." - remediation: "Remove any users other than root with UID 0 or assign them a new UID if appropriate." - compliance: - - cis: "6.2.5" - - cis_csc: "5.1" - - pci_dss: "10.2.5" - condition: any - rules: - - 'f:/etc/passwd -> IN !r:^# && !r:^root: && r:^\w+:\w+:0:;' -# Other/Legacy Tests - - id: 6059 - title: "Account with empty password present" - condition: any - rules: - - 'f:/etc/shadow -> r:^\w+::;' - - id: 6060 - title: "User-mounted removable partition allowed on the console" - condition: any - rules: - - 'f:/etc/security/console.perms -> r:^ \d+ ;' - - 'f:/etc/security/console.perms -> r:^ \d+ ;' - - id: 6061 - title: "Disable standard boot services - Kudzu hardware detection Enabled" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dkudzu$;' - - id: 6062 - title: "Disable standard boot services - PostgreSQL server Enabled" - compliance: - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dpostgresql$;' - - id: 6063 - title: "Disable standard boot services - MySQL server Enabled" - compliance: - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dmysqld$;' - - id: 6064 - title: "Disable standard boot services - DNS server Enabled" - compliance: - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dnamed$;' - - id: 6065 - title: "Disable standard boot services - NetFS Enabled" - compliance: - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dnetfs$;' diff --git a/sca/rhel/7/cis_rhel7_linux.yml b/sca/rhel/7/cis_rhel7_linux.yml new file mode 100644 index 000000000..b827d43d3 --- /dev/null +++ b/sca/rhel/7/cis_rhel7_linux.yml @@ -0,0 +1,1064 @@ +# Security Configuration Assessment +# CIS Checks for RHEL 7 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Red Hat Enterprise Linux 7 Benchmark v2.2.0 - 12-27-2017 + +policy: + id: "cis_rhel7" + file: "cis_rhel7_linux.yml" + name: "CIS Benchmark for Red Hat Enterprise Linux 7" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for Red Hat Enterprise Linux 7 systems running on x86 and x64 platforms. This document was tested against Red Hat Enterprise Linux 7.4." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check RHEL7 family platform" + description: "Requirements for running the policy against RHEL 7 family." + condition: any + rules: + - 'f:/etc/redhat-release -> r:^Red Hat Enterprise Linux && r:release 7' + - 'f:/etc/redhat-release -> r:^CentOS && r:release 7' + - 'f:/etc/redhat-release -> r:^Cloud && r:release 7' + - 'f:/etc/redhat-release -> r:^Oracle && r:release 7' + - 'f:/etc/redhat-release -> r:^Better && r:release 7' + - 'f:/etc/redhat-release -> r:^OpenVZ && r:release 7' + - 'f:/etc/system-release -> r:^Amazon && r:release 2' + +variables: + $sshd_file: /etc/ssh/sshd_config + +checks: +# 1.1.2 /tmp: partition + - id: 5500 + title: "Ensure separate partition exists for /tmp" + description: "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications." + rationale: "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." + remediation: "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 for /tmp if not using tmpfs. Enable systemd /tmp mounting" + compliance: + - cis: ["1.1.2"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/tmp\s' + +# 1.1.3 /tmp: nodev + - id: 5501 + title: "Ensure nodev option set on /tmp partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add nodev to the /tmp mount options: Options=mode=1777,strictatime,noexec,nodev,nosuid" + compliance: + - cis: ["1.1.3"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:nodev' + +# 1.1.4 /tmp: nosuid + - id: 5502 + title: "Ensure nosuid option set on /tmp partition" + description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." + rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /tmp." + remediation: "Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add nosuid to the /tmp mount options: Options=mode=1777,strictatime,noexec,nodev,nosuid" + compliance: + - cis: ["1.1.4"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:nosuid' + +# 1.1.5 /tmp: noexec + - id: 5503 + title: "Ensure noexec option set on /tmp partition" + description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." + rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /tmp." + remediation: "Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add noexec to the /tmp mount options: Options=mode=1777,strictatime,noexec,nodev,nosuid" + compliance: + - cis: ["1.1.5"] + - cis_csc: ["2"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:noexec' + +# 1.1.6 Build considerations - Partition scheme. + - id: 5504 + title: "Ensure separate partition exists for /var" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.6"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var\s' + +# 1.1.7 bind mount /var/tmp to /tmp + - id: 5505 + title: "Ensure separate partition exists for /var/tmp" + description: "The /var/tmp directory is a world-writable directory used for temporary storage by all users and some applications." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.7"] + condition: all + rules: + - 'c:mount -> r:\s/var/tmp\s' + +# 1.1.11 /var/log: partition + - id: 5506 + title: "Ensure separate partition exists for /var/log" + description: "The /var/log directory is used by system services to store log data ." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.11"] + - cis_csc: ["6.3"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var/log\s' + +# 1.1.12 /var/log/audit: partition + - id: 5507 + title: "Ensure separate partition exists for /var/log/audit" + description: "The auditing daemon, auditd , stores log data in the /var/log/audit directory." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.12"] + - cis_csc: ["6.3"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var/log/audit\s' + +# 1.1.13 /home: partition + - id: 5508 + title: "Ensure separate partition exists for /home" + description: "The /home directory is used to support disk storage needs of local users." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.13"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/home\s' + +# 1.1.14 /home: nodev + - id: 5509 + title: "Ensure nodev option set on /home partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /home partition. # mount -o remount,nodev /home" + compliance: + - cis: ["1.1.14"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/home\s && r:nodev' + +# 1.1.15 /dev/shm: nodev + - id: 5510 + title: "Ensure nodev option set on /dev/shm partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.15"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:nodev' + +# 1.1.16 /dev/shm: nosuid + - id: 5511 + title: "Ensure nosuid option set on /dev/shm partition" + description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." + rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." + remediation: "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" + compliance: + - cis: ["1.1.16"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:nosuid' + +# 1.1.17 /dev/shm: noexec + - id: 5512 + title: "Ensure noexec option set on /dev/shm partition" + description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.17"] + - cis_csc: ["2"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:noexec' + +############################################### +# 1.6 Configure SELinux +############################################### +# 1.6.1.2 Set selinux state + - id: 5513 + title: "Ensure the SELinux state is enforcing" + description: "Set SELinux to enable when the system is booted." + rationale: "SELinux must be enabled at boot time in to ensure that the controls it provides are in effect at all times." + remediation: "Edit the /etc/selinux/config file to set the SELINUX parameter: SELINUX=enforcing" + compliance: + - cis: ["1.6.1.2"] + - cis_csc: ["14.4"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sestatus -> r:^SELinux status:\s+enabled$' + - 'c:sestatus -> r:^Current mode:\s+enforcing$' + - 'c:sestatus -> r:^Mode from config file:\s+enforcing$' + - 'f:/etc/selinux/config -> r:^\s*SELINUX\s*=\s*enforcing' + +# 1.6.1.3 Set selinux policy + - id: 5514 + title: "Ensure SELinux policy is configured" + description: "Configure SELinux to meet or exceed the default targeted policy, which constrains daemons and system software only." + rationale: "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." + remediation: "Edit the /etc/selinux/config file to set the SELINUXTYPE parameter: SELINUXTYPE=targeted" + compliance: + - cis: ["1.6.1.3"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sestatus -> r:^Loaded policy name:\s+targeted$' + - 'f:/etc/selinux/config -> r:^\s*SELINUXTYPE\s*=\s*targeted|^\s*SELINUXTYPE\s*=\s*mls' + +# 1.6.1.4 Remove SETroubleshoot + - id: 5515 + title: "Ensure SETroubleshoot is not installed" + description: "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." + rationale: "The SETroubleshoot service is an unnecessary daemon to have running on a server, especially if X Windows is disabled." + remediation: "Run the following command to uninstall s etroubleshoot: # yum remove setroubleshoot" + compliance: + - cis: ["1.6.1.4"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa setroubleshoot -> r:setroubleshoot' + +# 1.6.1.5 Disable MCS Translation service mcstrans + - id: 5516 + title: "Ensure the MCS Translation Service (mcstrans) is not installed" + description: "The mcstransd daemon provides category label information to client processes requesting information. The label translations are defined in /etc/selinux/targeted/setrans.conf" + rationale: "Since this service is not used very often, remove it to reduce the amount of potentially vulnerable code running on the system." + remediation: "Run the following command to uninstall mcstrans: # yum remove mcstrans" + compliance: + - cis: ["1.6.1.5"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa mcstrans -> r:mcstrans' + +############################################### +# 1.4 Secure Boot Settings +############################################### +# 1.4.2 Set Boot Loader Password (Scored) + - id: 5517 + title: "Ensure bootloader password is set" + description: "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." + rationale: "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)." + remediation: "Create an encrypted password with grub2-setpassword: # grub2-setpassword" + compliance: + - cis: ["1.4.2"] + - cis_csc: ["5.1"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:/boot/grub2/grub.cfg -> r:^GRUB2_PASSWORD\s*=\.+' + +############################################### +# 1.5 Additional Process Hardening +############################################### +# 1.5.1 Restrict Core Dumps (Scored) + - id: 5518 + title: "Ensure core dumps are restricted" + description: "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." + rationale: "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." + remediation: "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 set the active kernel parameter" + compliance: + - cis: ["1.5.1"] + - cis_csc: ["13"] + condition: all + rules: + - 'c:grep -Rh ^*[[:space:]]*hard[[:space:]][[:space:]]*core[[:space:]][[:space:]]* /etc/security/limits.conf /etc/security/limits.d -> r:\s*\t*0$' + - 'c:sysctl fs.suid_dumpable -> r:^fs.suid_dumpable\s*=\s*0\s*$' + - 'c:grep -Rh fs\.suid_dumpable /etc/sysctl.conf /etc/sysctl.d -> r:^\s*fs.suid_dumpable\s*=\s*0\s*$' + +# 1.5.3 Enable Randomized Virtual Memory Region Placement (Scored) + - id: 5519 + title: "Ensure address space layout randomization (ASLR) is enabled" + description: "Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process." + rationale: "Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting." + remediation: "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: kernel.randomize_va_space = 2 and set the active kernel parameter" + compliance: + - cis: ["1.5.3"] + - cis_csc: ["8.4"] + condition: all + rules: + - 'c:grep -Rh ^kernel\.randomize_va_space /etc/sysctl.conf /etc/sysctl.d -> r:^\s*kernel.randomize_va_space\s*=\s*2$' + - 'c:sysctl kernel.randomize_va_space -> r:^\s*kernel.randomize_va_space\s*=\s*2' + +############################################### +# 2 OS Services +############################################### +############################################### +# 2.2 Remove Legacy Services +############################################### +# 2.2.16 Remove NIS Server (Scored) + - id: 5520 + title: "Ensure NIS Server is not enabled" + description: "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." + rationale: "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" + remediation: "Run the following command to disable ypserv: # systemctl disable ypserv" + compliance: + - cis: ["2.2.16"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled ypserv -> r:^enabled' + +# 2.2.17 Remove rsh-server (Scored) + - id: 5521 + title: "Ensure rsh server is not enabled" + description: "The Berkeley rsh-server ( rsh , rlogin , rexec ) package contains legacy services that exchange credentials in clear-text." + rationale: "These legacy services contain numerous security exposures and have been replaced with the more secure SSH package." + remediation: "Run the following commands to disable rsh, rlogin, and rexec: # systemctl disable rsh.socket # systemctl disable rlogin.socket # systemctl disable rexec.socket " + compliance: + - cis: ["2.2.17"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled rsh.socket -> r:^enabled' + - 'c:systemctl is-enabled rlogin.socket -> r:^enabled' + - 'c:systemctl is-enabled rexec.socket -> r:^enabled' + +# 2.2.18 Remove talk server (Scored) + - id: 5522 + title: "Ensure talk server is not enabled" + description: "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." + rationale: "The software presents a security risk as it uses unencrypted protocols for communication." + remediation: "Run the following command to disable talk: # systemctl disable ntalk" + compliance: + - cis: ["2.2.18"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled ntalk -> r:^enabled' + +# 2.2.19 Remove telnet-server (Scored) + - id: 5523 + title: "Ensure telnet server is not enabled" + description: "The telnet-server package contains the telnet daemon, which accepts connections from users from other systems via the telnet protocol." + rationale: "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." + remediation: "Run the following command to disable telnet: # systemctl disable telnet.socket" + compliance: + - cis: ["2.2.19"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled telnet.socket -> r:^enabled' + +# 2.2.20 Remove tftp server (Scored) + - id: 5524 + title: "Ensure tftp server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable tftp: # systemctl disable tftp.socket" + compliance: + - cis: ["2.2.20"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled tftp.socket -> r:^enabled' + +# 2.2.21 Remove rsync service (Scored) + - id: 5525 + title: "Ensure rsync service is not enabled" + description: "The rsyncd service can be used to synchronize files between systems over network links." + rationale: "The rsyncd service presents a security risk as it uses unencrypted protocols for communication." + remediation: "Run the following command to disable rsync: # systemctl disable rsyncd" + compliance: + - cis: ["2.2.21"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled rsyncd -> r:^enabled' + +# 2.3.1 Remove NIS Client (Scored) + - id: 5526 + title: "Ensure NIS Client is not installed" + description: "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." + rationale: "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." + remediation: "Run the following command to uninstall ypbind: # yum remove ypbind" + compliance: + - cis: ["2.3.1"] + - cis_csc: ["2"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa ypbind -> r:ypbind' + +# 2.1.7 Remove xinetd (Scored) + - id: 5527 + title: "Ensure xinetd is not enabled" + description: "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." + rationale: "If there are no xinetd services required, it is recommended that the daemon be disabled." + remediation: "Run the following command to disable xinetd: # systemctl disable xinetd" + compliance: + - cis: ["2.1.7"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled xinetd -> r:^enabled' + +# 2.1.1 Disable chargen services (Scored) + - id: 5528 + title: "Ensure chargen services are not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Run the following commands to disable chargen-dgram and chargen-stream: # chkconfig chargen-dgram off; # chkconfig chargen-stream off" + compliance: + - cis: ["2.1.1"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:^\s*\t*chargen-dgram:\s*\t*on' + - 'c:chkconfig --list -> r:^\s*\t*chargen-stream:\s*\t*on' + +# 2.1.2 Disable daytime services (Scored) + - id: 5529 + title: "Ensure daytime services are not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Run the following commands to disable daytime-dgram and daytime-stream: # chkconfig daytime-dgram off; # chkconfig daytime-stream off" + compliance: + - cis: ["2.1.2"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:^\s*\t*daytime-dgram:\s*\t*on' + - 'c:chkconfig --list -> r:^\s*\t*daytime-stream:\s*\t*on' + +# 2.1.3 Disable discard services (Scored) + - id: 5530 + title: "Ensure discard services are not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Run the following commands to disable discard-dgram and discard-stream: # chkconfig discard-dgram off; # chkconfig discard-stream off" + compliance: + - cis: ["2.1.3"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:^\s*\t*discard-dgram:\s*\t*on' + - 'c:chkconfig --list -> r:^\s*\t*discard-stream:\s*\t*on' + +# 2.1.4 Disable echo-dgram (Scored) + - id: 5531 + title: "Ensure echo services are not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Run the following commands to disable echo-dgram and echo-stream: # chkconfig echo-dgram off; # chkconfig echo-stream off" + compliance: + - cis: ["2.1.4"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:^\s*\t*echo-dgram:\s*\t*on' + - 'c:chkconfig --list -> r:^\s*\t*echo-stream:\s*\t*on' + +# 2.1.5 Disable time-stream (Scored) + - id: 5532 + title: "Ensure time services are not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Run the following commands to disable time-dgram and time-stream: # chkconfig time-dgram off; # chkconfig time-stream off" + compliance: + - cis: ["2.1.4"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:^\s*\t*time-dgram:\s*\t*on' + - 'c:chkconfig --list -> r:^\s*\t*time-stream:\s*\t*on' + +# 2.2.2 Remove X Windows (Scored) + - id: 5533 + title: "Ensure X Window System is not installed" + description: "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." + rationale: "Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface." + remediation: "Run the following command to remove the X Windows System packages: # yum remove xorg-x11*" + compliance: + - cis: ["2.2.2"] + - cis_csc: ["2"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa xorg-x11* -> r:^xorg-x11' + +# 2.2.3 Disable Avahi Server (Scored) + - id: 5534 + title: "Ensure Avahi Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable avahi-daemon: # systemctl disable avahi-daemon" + compliance: + - cis: ["2.2.3"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled avahi-daemon -> r:^enabled' + +# 2.2.5 Remove DHCP Server (Scored) + - id: 5535 + title: "Ensure DHCP Server is not enabled" + description: "The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses." + rationale: "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." + remediation: "Run the following command to disable dhcpd: # systemctl disable dhcpd" + compliance: + - cis: ["2.2.5"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + references: + - More detailed documentation on DHCP is available at https://www.isc.org/software/dhcp + condition: none + rules: + - 'c:systemctl is-enabled dhcpd -> r:^enabled' + +# 2.2.6 Remove LDAP Server (Scored) + - id: 5536 + title: "Ensure LDAP Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable slapd: # systemctl disable dhcpd" + compliance: + - cis: ["2.2.6"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + references: + - More detailed documentation on OpenLDAP is available at https://www.openldap.org + condition: none + rules: + - 'c:systemctl is-enabled sladp -> r:^enabled' + +# 2.2.1.2 Configure Network Time Protocol (NTP) (Scored) + - id: 5537 + title: "Ensure ntp is configured" + description: "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." + rationale: "If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly." + remediation: "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 . 3) Add or edit the OPTIONS in /etc/sysconfig/ntpd to include ' -u ntp:ntp ': - OPTIONS='-u ntp:ntp'" + compliance: + - cis: ["2.2.1.2"] + - cis_csc: ["6.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:/etc/ntp.conf -> r:^restrict\s+-4\s+default|^restrict\s+default && r:\s+kod\s+ && r:\s+nomodify\s+ && r:\s+notrap\s+ && r:\s+nopeer\s+ && r:\s+noquery\s+' + - 'f:/etc/ntp.conf -> r:^restrict\s+-6\s+default && r:\s+kod\s+ && r:\s+nomodify\s+ && r:\s+notrap\s+ && r:\s+nopeer\s+ && r:\s+noquery\s+' + - 'f:/etc/ntp.conf -> r:^server\.+$|^pool\.+$' + - 'f:/etc/sysconfig/ntpd -> r:^OPTIONS\s*=\s* && r:-u ntp:ntp' + - 'f:/usr/lib/systemd/system/ntpd.service -> r:^Execstart\s*=\s*/usr/sbin/ntpd\s+-u\s+ntp:ntp' + +# 2.2.1.2 Configure Network Time Protocol (Chrony) (Scored) + - id: 5538 + title: "Ensure chrony is configured" + description: "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." + rationale: "If chrony is in use on the system proper configuration is vital to ensuring time synchronization is working properly." + remediation: "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 . 3) Add or edit the OPTIONS in /etc/sysconfig/chronyd to include: - OPTIONS='-u chronyd'" + compliance: + - cis: ["2.2.1.2"] + - cis_csc: ["6.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:/etc/chrony.conf -> r:^server\.+$|^pool\.+$' + - 'f:/etc/sysconfig/chronyd -> r:^OPTIONS\s*=\s* && r:-u chrony' + +# 2.2.7 Disable NFS and RPC (Scored) + - id: 5539 + title: "Ensure NFS and RPC are not enabled" + description: "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." + rationale: "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." + remediation: "Run the following commands to disable nfs, nfs-server and rpcbind: # systemctl disable nfs; # systemctl disable nfs-server; # systemctl disable rpcbind" + compliance: + - cis: ["2.2.7"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled nfs -> r:^enabled' + - 'c:systemctl is-enabled nfs-server -> r:^enabled' + - 'c:systemctl is-enabled rpcbind -> r:^enabled' + +# 2.2.9 Remove FTP Server (Scored) + - id: 5540 + title: "Ensure FTP Server is not enabled" + description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." + rationale: "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." + remediation: "Run the following command to disable vsftpd: # systemctl disable vsftpd" + compliance: + - cis: ["2.2.9"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled vsftpd -> r:^enabled' + +# 2.2.10 Remove HTTP Server (Scored) + - id: 5541 + title: "Ensure HTTP server is not enabled" + description: "HTTP or web servers provide the ability to host web site content." + rationale: "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." + remediation: "Run the following command to disable httpd: # systemctl disable httpd" + compliance: + - cis: ["2.2.10"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:systemctl is-enabled httpd -> r:^enabled' + +# 2.2.11 Remove Dovecot (IMAP and POP3 services) (Scored) + - id: 5542 + title: "Ensure IMAP and POP3 server is not enabled" + description: "dovecot is an open source IMAP and POP3 server for Linux based systems." + rationale: "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." + remediation: "Run the following command to disable dovecot: # systemctl disable dovecot" + compliance: + - cis: ["2.2.11"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled dovecot -> r:^enabled' + +# 2.2.12 Remove Samba (Scored) + - id: 5543 + title: "Ensure Samba is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable smb: # systemctl disable smb" + compliance: + - cis: ["2.2.12"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled smb -> r:^enabled' + +# 2.2.13 Remove HTTP Proxy Server (Scored) + - id: 5544 + title: "Ensure HTTP Proxy Server is not enabled" + description: "Squid is a standard proxy server used in many distributions and environments." + rationale: "If there is no need for a proxy server, it is recommended that the squid proxy be disabled to reduce the potential attack surface." + remediation: "Run the following command to disable squid: # systemctl disable squid" + compliance: + - cis: ["2.2.13"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled squid -> r:^enabled' + +# 2.2.14 Remove SNMP Server (Not Scored) + - id: 5545 + title: "Ensure SNMP Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable snmpd: # systemctl disable snmpd" + compliance: + - cis: ["2.2.14"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled snmpd -> r:^enabled' + +############################################### +# 3 Network Configuration and Firewalls +############################################### +############################################### +# 3.1 Modify Network Parameters (Host Only) +############################################### +# 3.1.1 Disable IP Forwarding (Scored) + - id: 5546 + title: "Ensure IP forwarding is disabled" + description: "The net.ipv4.ip_forward flag is used to tell the system whether it can forward packets or not." + rationale: "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." + remediation: "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.ip_forward = 0 and set the active kernel parameters." + compliance: + - cis: ["3.1.1"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.ip_forward -> r:^net.ipv4.ip_forward\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.ip_forward /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.ip_forward\s*=\s*0$' + +# 3.1.2 Disable Send Packet Redirects (Scored) + - id: 5547 + title: "Ensure packet redirect sending is disabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.1.2"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.send_redirects -> r:^net.ipv4.conf.all.send_redirects\s*=\s*0$' + - 'c:sysctl net.ipv4.conf.default.send_redirects -> r:^net.ipv4.conf.default.send_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.send_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.send_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.send_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.send_redirects\s*=\s*0$' + +############################################### +# 3.2 Modify Network Parameters (Host and Router) +############################################### +# 3.2.1 Disable Source Routed Packet Acceptance (Scored) + - id: 5548 + title: "Ensure source routed packets are not accepted" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.1"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.accept_source_route -> r:^net.ipv4.conf.all.accept_source_route\s*=\s*0$' + - 'c:sysctl net.ipv4.conf.default.accept_source_route -> r:^net.ipv4.conf.default.accept_source_route\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.accept_source_route\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.accept_source_route\s*=\s*0$' + +# 3.2.2 Disable ICMP Redirect Acceptance (Scored) + - id: 5549 + title: "Ensure ICMP redirects are not accepted" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.2"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.accept_redirects -> r:^net.ipv4.conf.all.accept_redirects\s*=\s*0$' + - 'c:sysctl net.ipv4.conf.default.accept_redirects -> r:^net.ipv4.conf.default.accept_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.accept_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.accept_redirects\s*=\s*0$' + +# 3.2.3 Disable Secure ICMP Redirect Acceptance (Scored) + - id: 5550 + title: "Ensure secure ICMP redirects are not accepted" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.3"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.secure_redirects -> r:^net.ipv4.conf.all.secure_redirects\s*=\s*0$' + - 'c:sysctl net.ipv4.conf.default.secure_redirects -> r:^net.ipv4.conf.default.secure_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.secure_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.secure_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.secure_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.secure_redirects\s*=\s*0$' + +# 3.2.4 Log Suspicious Packets (Scored) + - id: 5551 + title: "Ensure suspicious packets are logged" + description: "When enabled, this feature logs packets with un-routable source addresses to the kernel log." + rationale: "Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system." + remediation: "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." + compliance: + - cis: ["3.2.4"] + - cis_csc: ["6"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.log_martians -> r:^net.ipv4.conf.all.log_martians\s*=\s*1$' + - 'c:sysctl net.ipv4.conf.default.log_martians -> r:^net.ipv4.conf.default.log_martians\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.log_martians /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.log_martians\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.log_martians /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.log_martians\s*=\s*1$' + +# 3.2.5 Enable Ignore Broadcast Requests (Scored) + - id: 5552 + title: "Ensure broadcast ICMP requests are ignored" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.5"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.icmp_echo_ignore_broadcasts -> r:^net.ipv4.icmp_echo_ignore_broadcasts\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.icmp_echo_ignore_broadcasts /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.icmp_echo_ignore_broadcasts\s*=\s*1$' + +# 3.2.6 Enable Bad Error Message Protection (Scored) + - id: 5553 + title: "Ensure bogus ICMP responses are ignored" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.6"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.icmp_ignore_bogus_error_responses -> r:^net.ipv4.icmp_ignore_bogus_error_responses\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.icmp_ignore_bogus_error_responses /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.icmp_ignore_bogus_error_responses\s*=\s*1$' + +# 3.2.7 Enable RFC-recommended Source Route Validation (Scored) + - id: 5554 + title: "Ensure Reverse Path Filtering is enabled" + description: "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)." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.7"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.rp_filter -> r:^net.ipv4.conf.all.rp_filter\s*=\s*1$' + - 'c:sysctl net.ipv4.conf.default.rp_filter -> r:^net.ipv4.conf.default.rp_filter\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.rp_filter /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.rp_filter\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.rp_filter /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.rp_filter\s*=\s*1$' + +# 3.2.8 Enable TCP SYN Cookies (Scored) + - id: 5555 + title: "Ensure TCP SYN Cookies is enabled" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.8"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.tcp_syncookies -> r:^net.ipv4.tcp_syncookies\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.tcp_syncookies /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.tcp_syncookies\s*=\s*1$' + +############################################### +# 5 System Access, Authentication and Authorization +############################################### +############################################### +# 5.2 Configure SSH +############################################### +# 5.2.2 Set SSH Protocol to 2 (Scored) + - id: 5556 + title: "Ensure SSH Protocol is set to 2" + description: "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." + rationale: "SSH v1 suffers from insecurities that do not affect SSH v2." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:Protocol\s*\t*2' + +# 5.2.3 Set LogLevel to INFO (Scored) + - id: 5557 + title: "Ensure SSH LogLevel is set to INFO" + description: "The INFO parameter specifies that login and logout activity will be logged." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel INFO" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:LogLevel\s*\t*INFO' + +# 5.2.5 Set SSH MaxAuthTries to 4 or Less (Scored) + - id: 5558 + title: "Ensure SSH MaxAuthTries is set to 4 or less" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4" + compliance: + - cis: ["5.2.5"] + - cis_csc: ["16"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && n:^MaxAuthTries\s*\t*(\d+) compare <= 4' + +# 5.2.6 Set SSH IgnoreRhosts to Yes (Scored) + - id: 5559 + title: "Ensure SSH IgnoreRhosts is enabled" + description: "The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication." + rationale: "Setting this parameter forces users to enter a password when authenticating with ssh." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:IgnoreRhosts\s*\t*yes' + +# 5.2.7 Set SSH HostbasedAuthentication to No (Scored) + - id: 5560 + title: "Ensure SSH HostbasedAuthentication is disabled" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:HostbasedAuthentication\s*\t*no' + +# 5.2.8 Disable SSH Root Login (Scored) + - id: 5561 + title: "Ensure SSH root login is disabled" + description: "The PermitRootLogin parameter specifies if the root user can log in using ssh. 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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:PermitRootLogin\s*\t*no' + +# 5.2.9 Set SSH PermitEmptyPasswords to No (Scored) + - id: 5562 + title: "Ensure SSH PermitEmptyPasswords is disabled" + description: "The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts with empty password strings." + rationale: "Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:PermitEmptyPasswords\s*\t*no' + +############################################### +# 6 System Maintenance +############################################### +############################################### +# 6.2 Review User and Group Settings +############################################### +# 6.2.5 Verify No UID 0 Accounts Exist Other Than root (Scored) + - id: 5563 + title: "Ensure root is the only UID 0 account" + description: "Any account with UID 0 has superuser privileges on the system." + rationale: "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." + remediation: "Remove any users other than root with UID 0 or assign them a new UID if appropriate." + compliance: + - cis: ["6.2.5"] + - cis_csc: ["5.1"] + - pci_dss: ["10.2.5"] + - hipaa: ["164.312.b"] + - nist_800_53: ["AU.14", "AC.7"] + condition: none + rules: + - 'f:/etc/passwd -> !r:^# && !r:^\s*\t*root: && r:^\w+:\w+:0:' diff --git a/sca/rhel/7/cis_rhel7_linux_rcl.yml b/sca/rhel/7/cis_rhel7_linux_rcl.yml deleted file mode 100644 index 2087cae82..000000000 --- a/sca/rhel/7/cis_rhel7_linux_rcl.yml +++ /dev/null @@ -1,1004 +0,0 @@ -# Security Configuration assessment -# CIS Checks for RHEL 7 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# Center for Internet Security Red Hat Enterprise Linux 7 Benchmark v2.2.0 - 12-27-2017 - -policy: - id: "cis_rhel7" - file: "cis_rhel7_linux_rcl.yml" - name: "CIS Benchmark for Red Hat Enterprise Linux 7" - description: "This document provides prescriptive guidance for establishing a secure configuration posture for Red Hat Enterprise Linux 7 systems running on x86 and x64 platforms. This document was tested against Red Hat Enterprise Linux 7.4." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check RHEL7 version" - description: "Requirements for running the SCA scan against RHEL 7." - condition: "any required" - rules: - - 'f:/etc/redhat-release -> r:^Red Hat Enterprise Linux \S+ release 7;' - - 'f:/etc/redhat-release -> IN r:^CentOS && r:release 7;' - - 'f:/etc/redhat-release -> IN r:^Cloud && r:release 7;' - - 'f:/etc/redhat-release -> IN r:^Oracle && r:release 7;' - - 'f:/etc/redhat-release -> IN r:^Better && r:release 7;' - - 'f:/etc/redhat-release -> IN r:^OpenVZ && r:release 7;' - -variables: - $sshd_file: /etc/ssh/sshd_config; -# RC scripts location - $rc_dirs: /etc/rc.d/rc2.d,/etc/rc.d/rc3.d,/etc/rc.d/rc4.d,/etc/rc.d/rc5.d; - -checks: -# 1.1.2 /tmp: partition - - id: 6500 - title: "Ensure separate partition exists for /tmp" - description: "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications." - rationale: "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." - remediation: "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 for /tmp if not using tmpfs. Enable systemd /tmp mounting" - compliance: - - cis: "1.1.2" - references: - - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> !r:/tmp;' -# 1.1.3 /tmp: nodev - - id: 6501 - title: "Ensure nodev option set on /tmp partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add nodev to the /tmp mount options: Options=mode=1777,strictatime,noexec,nodev,nosuid" - compliance: - - cis: "1.1.3" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/tmp && r:nodev;' -# 1.1.4 /tmp: nosuid - - id: 6502 - title: "Ensure nosuid option set on /tmp partition" - description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." - rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /tmp." - remediation: "Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add nosuid to the /tmp mount options: Options=mode=1777,strictatime,noexec,nodev,nosuid" - compliance: - - cis: "1.1.4" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/tmp && r:nosuid;' -# 1.1.5 /tmp: noexec - - id: 6503 - title: "Ensure noexec option set on /tmp partition" - description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." - rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /tmp." - remediation: "Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add noexec to the /tmp mount options: Options=mode=1777,strictatime,noexec,nodev,nosuid" - compliance: - - cis: "1.1.5" - - cis_csc: "2" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/tmp && r:noexec;' -# 1.1.6 Build considerations - Partition scheme. - - id: 6504 - title: "Ensure separate partition exists for /var" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.6" - references: - - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r^# && r:/var;' -# 1.1.7 bind mount /var/tmp to /tmp - - id: 6505 - title: "Ensure separate partition exists for /var/tmp" - description: "The /var/tmp directory is a world-writable directory used for temporary storage by all users and some applications." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.7" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/var/tmp;' -# 1.1.11 /var/log: partition - - id: 6506 - title: "Ensure separate partition exists for /var/log" - description: "The /var/log directory is used by system services to store log data ." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.11" - - cis_csc: "6.3" - references: - - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/var/log;' -# 1.1.12 /var/log/audit: partition - - id: 6507 - title: "Ensure separate partition exists for /var/log/audit" - description: "The auditing daemon, auditd , stores log data in the /var/log/audit directory." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.12" - - cis_csc: "6.3" - references: - - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/var/log/audit;' -# 1.1.13 /home: partition - - id: 6508 - title: "Ensure separate partition exists for /home" - description: "The /home directory is used to support disk storage needs of local users." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.13" - references: - - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/home;' -# 1.1.14 /home: nodev - - id: 6509 - title: "Ensure nodev option set on /home partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /home partition. # mount -o remount,nodev /home" - compliance: - - cis: "1.1.14" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/home && r:nodev;' -# 1.1.18 nodev on removable media partitions (not scored) - - id: 6510 - title: "Ensure nodev option set on removable media partitions" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "Removable media containing character and block special devices could be used to circumvent security controls by allowing non-root users to access sensitive device files such as /dev/kmem or the raw disk partitions." - remediation: "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." - compliance: - - cis: "1.1.18" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:nodev;' -# 1.1.19 nosuid on removable media partitions (not scored) - - id: 6511 - title: "Ensure nosuid option set on removable media partitions" - description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." - rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." - remediation: "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom." - compliance: - - cis: "1.1.19" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:nosuid;' -# 1.1.20 noexec on removable media partitions (not scored) - - id: 6512 - title: "Ensure noexec option set on removable media partitions" - description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." - rationale: "Setting this option on a file system prevents users from executing programs from the removable media. This deters users from being able to introduce potentially malicious software on the system." - remediation: "Edit the /etc/fstab file and add noexec to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom." - compliance: - - cis: "1.1.20" - - cis_csc: "8" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:noexec;' -# 1.1.15 /dev/shm: nodev - - id: 6513 - title: "Ensure nodev option set on /dev/shm partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "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" - compliance: - - cis: "1.1.15" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:nodev;' -# 1.1.16 /dev/shm: nosuid - - id: 6514 - title: "Ensure nosuid option set on /dev/shm partition" - description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." - rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." - remediation: "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" - compliance: - - cis: "1.1.16" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:nosuid;' -# 1.1.17 /dev/shm: noexec - - id: 6515 - title: "Ensure noexec option set on /dev/shm partition" - description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." - rationale: "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." - remediation: "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" - compliance: - - cis: "1.1.17" - - cis_csc: "2" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:noexec;' -############################################### -# 1.6 Configure SELinux -############################################### -# 1.6.1.1 enable selinux in /etc/grub.conf - - id: 6516 - title: "Ensure SELinux is not disabled in bootloader configuration" - description: "Configure SELINUX to be enabled at boot time and verify that it has not been overwritten by the grub boot parameters." - rationale: "SELinux must be enabled at boot time in your grub configuration to ensure that the controls it provides are not overridden." - remediation: "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=''" - compliance: - - cis: "1.6.1.1" - - cis_csc: "14.4" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/grub.conf -> r:selinux=0;' - - 'f:/etc/grub2.cfg -> r:selinux=0;' -# 1.6.1.2 Set selinux state - - id: 6517 - title: "Ensure the SELinux state is enforcing" - description: "Set SELinux to enable when the system is booted." - rationale: "SELinux must be enabled at boot time in to ensure that the controls it provides are in effect at all times." - remediation: "Edit the /etc/selinux/config file to set the SELINUX parameter: SELINUX=enforcing" - compliance: - - cis: "1.6.1.2" - - cis_csc: "14.4" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/selinux/config -> !r:SELINUX=enforcing;' -# 1.6.1.3 Set selinux policy - - id: 6518 - title: "Ensure SELinux policy is configured" - description: "Configure SELinux to meet or exceed the default targeted policy, which constrains daemons and system software only." - rationale: "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." - remediation: "Edit the /etc/selinux/config file to set the SELINUXTYPE parameter: SELINUXTYPE=targeted" - compliance: - - cis: "1.6.1.3" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/selinux/config -> !r:SELINUXTYPE=targeted;' -# 1.6.1.4 Remove SETroubleshoot - - id: 6519 - title: "Ensure SETroubleshoot is not installed" - description: "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." - rationale: "The SETroubleshoot service is an unnecessary daemon to have running on a server, especially if X Windows is disabled." - remediation: "Run the following command to uninstall s etroubleshoot: # yum remove setroubleshoot" - compliance: - - cis: "1.6.1.4" - - pci_dss: "2.2.4" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsetroubleshoot$;' - - 'f:/usr/share/dbus-1/services/sealert.service -> r:Exec=/usr/bin/sealert;' -# 1.6.1.5 Disable MCS Translation service mcstrans - - id: 6520 - title: "Ensure the MCS Translation Service (mcstrans) is not installed" - description: "The mcstransd daemon provides category label information to client processes requesting information. The label translations are defined in /etc/selinux/targeted/setrans.conf" - rationale: "Since this service is not used very often, remove it to reduce the amount of potentially vulnerable code running on the system." - remediation: "Run the following command to uninstall mcstrans: # yum remove mcstrans" - compliance: - - cis: "1.6.1.5" - - pci_dss: "2.2.4" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dmctrans$;' - - 'f:/usr/lib/systemd/system/mcstransd.service -> r:ExecStart=/usr/sbin/mcstransd;' -############################################### -# 1.4 Secure Boot Settings -############################################### -# 1.4.2 Set Boot Loader Password (Scored) - - id: 6521 - title: "Ensure bootloader password is set" - description: "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" - rationale: "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)." - remediation: "Create an encrypted password with grub2-setpassword: # grub2-setpassword" - compliance: - - cis: "1.4.2" - - cis_csc: "5.1" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/boot/grub2/grub.cfg -> NIN !r:^# && r:password;' -############################################### -# 1.5 Additional Process Hardening -############################################### -# 1.5.1 Restrict Core Dumps (Scored) - - id: 6522 - title: "Ensure core dumps are restricted" - description: "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." - rationale: "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." - remediation: "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 set the active kernel parameter" - compliance: - - cis: "1.5.1" - - cis_csc: "13" - condition: any - rules: - - 'f:/etc/security/limits.conf -> NIN !r:^# && r:hard\.+core\.+0;' -# 1.5.3 Enable Randomized Virtual Memory Region Placement (Scored) - - id: 6523 - title: "Ensure address space layout randomization (ASLR) is enabled" - description: "Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process." - rationale: "Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting." - remediation: "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: kernel.randomize_va_space = 2 and set the active kernel parameter" - compliance: - - cis: "1.5.3" - - cis_csc: "8.4" - condition: any - rules: - - 'f:/proc/sys/kernel/randomize_va_space -> !r:^2$;' -############################################### -# 2 OS Services -############################################### -############################################### -# 2.2 Remove Legacy Services -############################################### -# 2.2.19 Remove telnet-server (Scored) - - id: 6524 - title: "Ensure telnet server is not enabled" - description: "The telnet-server package contains the telnet daemon, which accepts connections from users from other systems via the telnet protocol." - rationale: "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." - remediation: "Run the following command to disable telnet: # systemctl disable telnet.socket" - compliance: - - cis: "2.2.19" - - cis_csc: "9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/telnet -> IN !r:^# && r:disable && r:no;' - - 'f:/usr/lib/systemd/system/telnet@.service -> r:ExecStart=-/usr/sbin/in.telnetd;' -# 2.2.17 Remove rsh-server (Scored) - - id: 6525 - title: "Ensure rsh server is not enabled" - description: "The Berkeley rsh-server ( rsh , rlogin , rexec ) package contains legacy services that exchange credentials in clear-text." - rationale: "These legacy services contain numerous security exposures and have been replaced with the more secure SSH package." - remediation: "Run the following commands to disable rsh, rlogin, and rexec: # systemctl disable rsh.socket # systemctl disable rlogin.socket # systemctl disable rexec.socket " - compliance: - - cis: "2.2.17" - - cis_csc: "9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/rlogin -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/rsh -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/shell -> IN !r:^# && r:disable && r:no;' - - 'f:/usr/lib/systemd/system/rexec@.service -> r:ExecStart;' - - 'f:/usr/lib/systemd/system/rlogin@.service -> r:ExecStart;' - - 'f:/usr/lib/systemd/system/rsh@.service -> r:ExecStart;' -# 2.3.1 Remove NIS Client (Scored) - - id: 6526 - title: "Ensure NIS Client is not installed" - description: "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." - rationale: "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." - remediation: "Run the following command to uninstall ypbind: # yum remove ypbind" - compliance: - - cis: "2.3.1" - - cis_csc: "2" - - pci_dss: "2.2.3" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dypbind$;' - - 'f:/usr/lib/systemd/system/ypbind.service -> r:Exec;' -# 2.2.16 Remove NIS Server (Scored) - - id: 6527 - title: "Ensure NIS Server is not enabled" - description: "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." - rationale: "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" - remediation: "Run the following command to disable ypserv: # systemctl disable ypserv" - compliance: - - cis: "2.2.16" - - cis_csc: "9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dypserv$;' - - 'f:/usr/lib/systemd/system/ypserv.service -> r:Exec;' -# 2.2.20 Remove tftp-server (Scored) - - id: 6528 - title: "Ensure tftp server is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable tftp: # systemctl disable tftp.socket" - compliance: - - cis: "2.2.20" - - cis_csc: "9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/tftpd -> IN !r:^# && r:disable && r:no;' - - 'f:/usr/lib/systemd/system/tftp.service -> r:Exec;' -# 2.1.18 Remove talk-server (Scored) - - id: 6529 - title: "Ensure talk server is not enabled" - description: "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." - rationale: "The software presents a security risk as it uses unencrypted protocols for communication." - remediation: "Run the following command to disable talk: # systemctl disable ntalk" - compliance: - - cis: "2.2.18" - - cis_csc: "9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/talk -> IN !r:^# && r:disable && r:no;' - - 'f:/usr/lib/systemd/system/ntalk.service -> r:Exec;' -# 2.1.7 Remove xinetd (Scored) - - id: 6530 - title: "Ensure xinetd is not enabled" - description: "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." - rationale: "If there are no xinetd services required, it is recommended that the daemon be disabled." - remediation: "Run the following command to disable xinetd: # systemctl disable xinetd" - compliance: - - cis: "2.1.7" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/usr/lib/systemd/system/xinetd.service -> r:Exec;' -# 2.1.1 Disable chargen-dgram (Scored) - - id: 6531 - title: "Ensure chargen services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable chargen-dgram and chargen-stream: # chkconfig chargen-dgram off; # chkconfig chargen-stream off" - compliance: - - cis: "2.1.1" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/chargen-dgram -> IN !r:^# && r:disable && r:no;' -# 2.1.1 Disable chargen-stream (Scored) - - id: 6532 - title: "Ensure chargen services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable chargen-dgram and chargen-stream: # chkconfig chargen-dgram off; # chkconfig chargen-stream off" - compliance: - - cis: "2.1.1" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/chargen-stream -> IN !r:^# && r:disable && r:no;' -# 2.1.2 Disable daytime-dgram (Scored) - - id: 6533 - title: "Ensure daytime services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable daytime -dgram and daytime -stream: # chkconfig daytime-dgram off; # chkconfig daytime-stream off" - compliance: - - cis: "2.1.2" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/daytime-dgram -> IN !r:^# && r:disable && r:no;' -# 2.1.2 Disable daytime-stream (Scored) - - id: 6534 - title: "Ensure daytime services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable daytime -dgram and daytime -stream: # chkconfig daytime-dgram off; # chkconfig daytime-stream off" - compliance: - - cis: "2.1.2" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/daytime-stream -> IN !r:^# && r:disable && r:no;' -# 2.1.4 Disable echo-dgram (Scored) - - id: 6535 - title: "Ensure echo services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable echo -dgram and echo -stream: # chkconfig echo-dgram off; # chkconfig echo-stream off" - compliance: - - cis: "2.1.4" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/echo-dgram -> IN !r:^# && r:disable && r:no;' -# 2.1.4 Disable echo-stream (Scored) - - id: 6536 - title: "Ensure echo services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable echo -dgram and echo -stream: # chkconfig echo-dgram off; # chkconfig echo-stream off" - compliance: - - cis: "2.1.4" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/echo-stream -> IN !r:^# && r:disable && r:no;' -# 2.2.2 Remove X Windows (Scored) - - id: 6537 - title: "Ensure X Window System is not installed" - description: "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." - rationale: "Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface." - remediation: "Run the following command to remove the X Windows System packages: # yum remove xorg-x11*" - compliance: - - cis: "2.2.2" - - cis_csc: "2" - - pci_dss: "2.2.2" - condition: any - rules: - - 'p:gdm-x-session;' -# 2.2.3 Disable Avahi Server (Scored) - - id: 6538 - title: "Ensure Avahi Server is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable avahi-daemon: # systemctl disable avahi-daemon" - compliance: - - cis: "2.2.3" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'p:avahi-daemon;' -# 2.2.5 Remove DHCP Server (Scored) - - id: 6539 - title: "Ensure DHCP Server is not enabled" - description: "The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses." - rationale: "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." - remediation: "Run the following command to disable dhcpd: # systemctl disable dhcpd" - compliance: - - cis: "2.2.5" - - cis_csc: "9.1" - references: - - More detailed documentation on DHCP is available at https://www.isc.org - condition: any - rules: - - 'f:/usr/lib/systemd/system/dhcpd.service -> r:Exec;' -# 2.2.1.2 Configure Network Time Protocol (NTP) (Scored) - - id: 6540 - title: "Ensure time synchronization is in use" - description: "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." - rationale: "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." - remediation: "On physical systems or virtual systems where host based time synchronization is not available run one of the following commands to install either ntp or chrony: # yum install ntp; # yum install chrony; On virtual systems where host based time synchronization is available consult your virtualization software documentation and setup host based synchronization." - compliance: - - cis: "2.2.1.1" - - cis_csc: "6.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/ntp.conf -> IN r:restrict default kod nomodify notrap nopeer noquery && r:^server;' - - 'f:/etc/sysconfig/ntpd -> r:OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid";' -# 2.2.7 Disable NFS and RPC (Not Scored) - - id: 6541 - title: "Ensure NFS and RPC are not enabled" - description: "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." - rationale: "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." - remediation: "Run the following commands to disable nfs, nfs-server and rpcbind: # systemctl disable nfs; # systemctl disable nfs-server; # systemctl disable rpcbind" - compliance: - - cis: "2.2.7" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dnfs$;' - - 'd:$rc_dirs -> ^S\d\dnfslock$;' -# 2.2.9 Remove FTP Server (Not Scored) - - id: 6542 - title: "Ensure FTP Server is not enabled" - description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." - rationale: "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." - remediation: "Run the following command to disable vsftpd: # systemctl disable vsftpd" - compliance: - - cis: "2.2.9" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/xinetd.d/vsftpd -> IN !r:^# && r:disable && r:no;' -# 2.2.10 Remove HTTP Server (Not Scored) - - id: 6543 - title: "Ensure HTTP server is not enabled" - description: "HTTP or web servers provide the ability to host web site content." - rationale: "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." - remediation: "Run the following command to disable httpd: # systemctl disable httpd" - compliance: - - cis: "2.2.10" - - cis_csc: "9.1" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dhttpd$;' -# 2.2.11 Remove Dovecot (IMAP and POP3 services) (Not Scored) - - id: 6544 - title: "Ensure IMAP and POP3 server is not enabled" - description: "dovecot is an open source IMAP and POP3 server for Linux based systems." - rationale: "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." - remediation: "Run the following command to disable dovecot: # systemctl disable dovecot" - compliance: - - cis: "2.2.11" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/xinetd.d/cyrus-imapd -> IN !r:^# && r:disable && r:no;' - - id: 6545 - title: "Ensure IMAP and POP3 server is not enabled" - description: "dovecot is an open source IMAP and POP3 server for Linux based systems." - rationale: "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." - remediation: "Run the following command to disable dovecot: # systemctl disable dovecot" - compliance: - - cis: "2.2.11" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/xinetd.d/dovecot -> IN !r:^# && r:disable && r:no;' -# 2.2.12 Remove Samba (Not Scored) - - id: 6546 - title: "Ensure Samba is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable smb: # systemctl disable smb" - compliance: - - cis: "2.2.12" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsamba$;' - - 'd:$rc_dirs -> ^S\d\dsmb$;' -# 2.2.13 Remove HTTP Proxy Server (Not Scored) - - id: 6547 - title: "Ensure HTTP Proxy Server is not enabled" - description: "Squid is a standard proxy server used in many distributions and environments." - rationale: "If there is no need for a proxy server, it is recommended that the squid proxy be disabled to reduce the potential attack surface." - remediation: "Run the following command to disable squid: # systemctl disable squid" - compliance: - - cis: "2.2.13" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsquid$;' -# 2.2.14 Remove SNMP Server (Not Scored) - - id: 6548 - title: "Ensure SNMP Server is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable snmpd: # systemctl disable snmpd" - compliance: - - cis: "2.2.14" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsnmpd$;' -############################################### -# 3 Network Configuration and Firewalls -############################################### -############################################### -# 3.1 Modify Network Parameters (Host Only) -############################################### -# 3.1.1 Disable IP Forwarding (Scored) - - id: 6549 - title: "Ensure IPv4 forwarding is disabled" - description: "The net.ipv4.ip_forward flag is used to tell the system whether it can forward packets or not." - rationale: "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." - remediation: "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.ip_forward = 0 and set the active kernel parameters." - compliance: - - cis: "3.1.1" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/ip_forward -> 1;' - - id: 6550 - title: "Ensure IPv6 forwarding is disabled" - description: "The net.ipv6.conf.all.forwarding flag is used to tell the system whether it can forward packets or not." - rationale: "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." - remediation: "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.forwarding = 0 and set the active kernel parameters." - compliance: - - cis: "3.1.1" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv6/ip_forward -> 1;' -# 3.1.2 Disable Send Packet Redirects (Scored) - - id: 6551 - title: "Ensure packet redirect sending is disabled" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.1.2" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/send_redirects -> 1;' - - 'f:/proc/sys/net/ipv4/conf/default/send_redirects -> 1;' -############################################### -# 3.2 Modify Network Parameters (Host and Router) -############################################### -# 3.2.1 Disable Source Routed Packet Acceptance (Scored) - - id: 6552 - title: "Ensure source routed packets are not accepted" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.2.1" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/accept_source_route -> 1;' -# 3.2.2 Disable ICMP Redirect Acceptance (Scored) - - id: 6553 - title: "Ensure ICMP redirects are not accepted" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.2.2" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/accept_redirects -> 1;' - - 'f:/proc/sys/net/ipv4/conf/default/accept_redirects -> 1;' -# 3.2.3 Disable Secure ICMP Redirect Acceptance (Scored) - - id: 6554 - title: "Ensure secure ICMP redirects are not accepted" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.2.3" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/secure_redirects -> 1;' - - 'f:/proc/sys/net/ipv4/conf/default/secure_redirects -> 1;' -# 3.2.4 Log Suspicious Packets (Scored) - - id: 6555 - title: "Ensure suspicious packets are logged" - description: "When enabled, this feature logs packets with un-routable source addresses to the kernel log." - rationale: "Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system." - remediation: "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." - compliance: - - cis: "3.2.4" - - cis_csc: "6" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/log_martians -> 0;' -# 3.2.5 Enable Ignore Broadcast Requests (Scored) - - id: 6556 - title: "Ensure broadcast ICMP requests are ignored" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.2.5" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/icmp_echo_ignore_broadcasts -> 0;' -# 3.2.6 Enable Bad Error Message Protection (Scored) - - id: 6557 - title: "Enable Bad Error Message Protection" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.2.6" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/icmp_ignore_bogus_error_responses -> 0;' -# 3.2.7 Enable RFC-recommended Source Route Validation (Scored) - - id: 6558 - title: "Ensure Reverse Path Filtering is enabled" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.2.7" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/rp_filter -> 0;' - - 'f:/proc/sys/net/ipv4/conf/default/rp_filter -> 0;' -# 3.2.8 Enable TCP SYN Cookies (Scored) - - id: 6559 - title: "Ensure TCP SYN Cookies is enabled" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.2.8" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/tcp_syncookies -> 0;' -############################################### -# 5 System Access, Authentication and Authorization -############################################### -############################################### -# 5.2 Configure SSH -############################################### -# 5.2.2 Set SSH Protocol to 2 (Scored) - - id: 6560 - title: "Ensure SSH Protocol is set to 2" - description: "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." - rationale: "SSH v1 suffers from insecurities that do not affect SSH v2." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" - compliance: - - cis: "5.2.2" - - cis_csc: "3.4" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:Protocol\.+1;' -# 5.2.3 Set LogLevel to INFO (Scored) - - id: 6561 - title: "Ensure SSH LogLevel is set to INFO" - description: "The INFO parameter specifies that login and logout activity will be logged." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel INFO" - compliance: - - cis: "5.2.3" - - cis_csc: "16" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> NIN !r:^# && r:LogLevel\.+INFO;' -# 5.2.5 Set SSH MaxAuthTries to 4 or Less (Scored) - - id: 6562 - title: "Ensure SSH MaxAuthTries is set to 4 or less" - description: "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." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4" - compliance: - - cis: "5.2.5" - - cis_csc: "16" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:$sshd_file -> !r:^\s*MaxAuthTries\s+4\s*$;' -# 5.2.6 Set SSH IgnoreRhosts to Yes (Scored) - - id: 6563 - title: "Ensure SSH IgnoreRhosts is enabled" - description: "The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication ." - rationale: "Setting this parameter forces users to enter a password when authenticating with ssh." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" - compliance: - - cis: "5.2.6" - - cis_csc: "9" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:IgnoreRhosts\.+no;' -# 5.2.7 Set SSH HostbasedAuthentication to No (Scored) - - id: 6564 - title: "Ensure SSH HostbasedAuthentication is disabled" - description: "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." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" - compliance: - - cis: "5.2.7" - - cis_csc: "9" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:HostbasedAuthentication\.+yes;' -# 5.2.8 Disable SSH Root Login (Scored) - - id: 6565 - title: "Ensure SSH root login is disabled" - description: "The PermitRootLogin parameter specifies if the root user can log in using ssh. 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" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" - compliance: - - cis: "5.2.8" - - cis_csc: "5.8" - - pci_dss: "4.1" - condition: any - rules: - - 'f:$sshd_file -> !r:^\s*PermitRootLogin\.+no;' -# 5.2.9 Set SSH PermitEmptyPasswords to No (Scored) - - id: 6566 - title: "Ensure SSH PermitEmptyPasswords is disabled" - description: "The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts with empty password strings." - rationale: "Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" - compliance: - - cis: "5.2.9" - - cis_csc: "16" - - pci_dss: "4.1" - condition: any - rules: - - 'f:$sshd_file -> !r:^\s*PermitEmptyPasswords\.+no;' -############################################### -# 6 System Maintenance -############################################### -############################################### -# 6.2 Review User and Group Settings -############################################### -# 6.2.5 Verify No UID 0 Accounts Exist Other Than root (Scored) - - id: 6567 - title: "Ensure root is the only UID 0 account" - description: "Any account with UID 0 has superuser privileges on the system." - rationale: "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." - remediation: "Remove any users other than root with UID 0 or assign them a new UID if appropriate." - compliance: - - cis: "6.2.5" - - cis_csc: "5.1" - - pci_dss: "10.2.5" - condition: any - rules: - - 'f:/etc/passwd -> IN !r:^# && !r:^root: && r:^\w+:\w+:0:;' -# Other/Legacy Tests - - id: 6568 - title: "Account with empty password present" - compliance: - - pci_dss: "10.2.5" - condition: any - rules: - - 'f:/etc/shadow -> r:^\w+::;' - - id: 6569 - title: "User-mounted removable partition allowed on the console" - compliance: - condition: any - rules: - - 'f:/etc/security/console.perms -> r:^ \d+ ;' - - 'f:/etc/security/console.perms -> r:^ \d+ ;' - - id: 6570 - title: "Disable standard boot services - Kudzu hardware detection Enabled" - compliance: - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dkudzu$;' - - id: 6571 - title: "Disable standard boot services - PostgreSQL server Enabled" - compliance: - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dpostgresql$;' - - id: 6572 - title: "Disable standard boot services - MySQL server Enabled" - compliance: - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dmysqld$;' - - id: 6573 - title: "Disable standard boot services - DNS server Enabled" - compliance: - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dnamed$;' - - id: 6574 - title: "Disable standard boot services - NetFS Enabled" - compliance: - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dnetfs$;' diff --git a/sca/sles/11/cis_sles11_linux.yml b/sca/sles/11/cis_sles11_linux.yml new file mode 100644 index 000000000..42f988477 --- /dev/null +++ b/sca/sles/11/cis_sles11_linux.yml @@ -0,0 +1,924 @@ +# Security Configuration Assessment +# CIS Checks for SUSE SLES 11 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# CIS Benchmark for SUSE Linux Enterprise Server 11 v2.1.0 - 12-28-2017 + +policy: + id: "cis_sles11_linux" + file: "cis_sles11_linux.yml" + name: "CIS SUSE Linux Enterprise 11 Benchmark" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for SUSE Linux Enterprise 11 systems running on x86 and x64 platforms. This document was tested against SUSE Linux Enterprise Server 11 SP4." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check Suse 11 version" + description: "Requirements for running the SCA scan against SUSE Linux Enterprise Server 11" + condition: any + rules: + - 'f:/etc/os-release -> r:SUSE Linux Enterprise Server 11' + - 'f:/etc/SuSE-release -> r:SUSE Linux Enterprise Server 11' + +variables: + $sshd_file: /etc/ssh/sshd_config + +checks: +# Section 1.1 - Filesystem Configuration + - id: 6000 + title: "Ensure separate partition exists for /tmp" + description: "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.2"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/tmp\s' + + - id: 6001 + title: "Ensure nodev option set on /tmp partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.3"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:nodev' + + - id: 6002 + title: "Ensure nosuid option set on /tmp partition" + description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." + rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /tmp." + remediation: "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" + compliance: + - cis: ["1.1.4"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:nosuid' + +# 1.1.5 /tmp: noexec + - id: 6003 + title: "Ensure noexec option set on /tmp partition" + description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." + rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /tmp." + remediation: "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" + compliance: + - cis: ["1.1.5"] + - cis_csc: ["2"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:noexec' + +# 1.1.6 Build considerations - Partition scheme. + - id: 6004 + title: "Ensure separate partition exists for /var" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.6"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var\s' + + - id: 6005 + title: "Ensure separate partition exists for /var/log" + description: "The /var/log directory is used by system services to store log data." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.11"] + - cis_csc: ["6.3"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var/log\s' + +# 1.1.12 /var/log/audit: partition + - id: 6006 + title: "Ensure separate partition exists for /var/log/audit" + description: "The auditing daemon, auditd , stores log data in the /var/log/audit directory." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.12"] + - cis_csc: ["6.3"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var/log/audit\s' + +# 1.1.13 /home: partition + - id: 6007 + title: "Ensure separate partition exists for /home" + description: "The /home directory is used to support disk storage needs of local users." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.13"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/home\s' + + - id: 6008 + title: "Ensure nodev option set on /home partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.14"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/home\s && r:nodev' + +# 1.1.15 /dev/shm: nodev + - id: 6009 + title: "Ensure nodev option set on /dev/shm partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.15"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:nodev' + +# 1.1.16 /dev/shm: nosuid + - id: 6010 + title: "Ensure nosuid option set on /dev/shm partition" + description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." + rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." + remediation: "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" + compliance: + - cis: ["1.1.16"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:nosuid' + +# 1.1.17 /dev/shm: noexec + - id: 6011 + title: "Ensure noexec option set on /dev/shm partition" + description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.17"] + - cis_csc: ["2"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:noexec' + +############################################### +# 1.4 Secure Boot Settings +############################################### +# 1.4.2 Set Boot Loader Password (Scored) + - id: 6012 + title: "Ensure bootloader password is set" + description: "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." + rationale: "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)." + remediation: "Create an encrypted password with grub-md5-crypt : # grub-md5-crypt. The result is an . Copy and paste the into the global section of /boot/grub/menu.lst: password --md5 Notes: This recommendation is designed around the grub bootloader, if LILO or another bootloader is in use in your environment enact equivalent settings." + compliance: + - cis: ["1.4.2"] + - cis_csc: ["5.1"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:/boot/grub/menu.lst -> r:^password --md5' + +############################################### +# 1.5 Additional Process Hardening +############################################### +# 1.5.1 Restrict Core Dumps (Scored) + - id: 6013 + title: "Ensure core dumps are restricted" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.5.1"] + - cis_csc: ["13"] + condition: all + rules: + - 'c:grep -Rh ^*[[:space:]]*hard[[:space:]][[:space:]]*core[[:space:]][[:space:]]* /etc/security/limits.conf /etc/security/limits.d -> r:\s*\t*0$' + - 'c:sysctl fs.suid_dumpable -> r:^fs.suid_dumpable\s*=\s*0\s*$' + - 'c:grep -Rh fs\.suid_dumpable /etc/sysctl.conf /etc/sysctl.d -> r:^\s*fs.suid_dumpable\s*=\s*0\s*$' + +# 1.5.3 Enable Randomized Virtual Memory Region Placement (Scored) + - id: 6014 + title: "Ensure address space layout randomization (ASLR) is enabled" + description: "Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process." + rationale: "Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting." + remediation: "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" + compliance: + - cis: ["1.5.3"] + - cis_csc: ["8.4"] + condition: all + rules: + - 'c:grep -Rh ^kernel\.randomize_va_space /etc/sysctl.conf /etc/sysctl.d -> r:^\s*kernel.randomize_va_space\s*=\s*2$' + - 'c:sysctl kernel.randomize_va_space -> r:^\s*kernel.randomize_va_space\s*=\s*2' + +############################################### +# 2 OS Services +############################################### +############################################### +# 2.1 Remove Legacy Services +############################################### +# Section 2.1 - inetd Services + - id: 6015 + title: "Ensure chargen services are not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Run the following commands to disable chargen and chargen-udp : # chkconfig chargen off # chkconfig chargen-udp off" + compliance: + - cis: ["2.1.1"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:chargen:|chargen-udp: && r::on' + + - id: 6016 + title: "Ensure daytime services are not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Run the following commands to disable daytime - and daytime-udp: # chkconfig daytime-off # chkconfig daytime-udp off" + compliance: + - cis: ["2.1.2"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:daytime:|daytime-udp: && r::on' + + + - id: 6017 + title: "Ensure discard services are not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Run the following commands to disable discard and discard-udp: # chkconfig discard off # chkconfig discard-udp off" + compliance: + - cis: ["2.1.3"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:discard:|discard-udp: && r::on' + + - id: 6018 + title: "Ensure echo services are not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Run the following commands to disable echo and echo-udp: # chkconfig echo off # chkconfig echo-udp off" + compliance: + - cis: ["2.1.4"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:echo:|echo-udp: && r::on' + + - id: 6019 + title: "Ensure time services are not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Run the following commands to disable time and time-udp: # chkconfig time off # chkconfig time-udp off" + compliance: + - cis: ["2.1.5"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:time:|time-udp: && r::on' + + - id: 6020 + title: "Ensure rsh server is not enabled" + description: "The Berkeley rsh-server ( rsh , rlogin , rexec ) package contains legacy services that exchange credentials in clear-text." + rationale: "These legacy services contain numerous security exposures and have been replaced with the more secure SSH package." + remediation: "Run the following commands to disable rsh , rlogin , and rexec : # chkconfig rexec off # chkconfig rlogin off # chkconfig rsh off" + compliance: + - cis: ["2.1.6"] + - cis_csc: ["3.4", "9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:rexec:|rlogin:|rsh: && r::on' + + - id: 6021 + title: "Ensure talk server is not enabled" + description: "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." + rationale: "The software presents a security risk as it uses unencrypted protocols for communication." + remediation: "Run the following command to disable talk: # chkconfig talk off" + compliance: + - cis: ["2.1.7"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:talk: && r::on' + + - id: 6022 + title: "Ensure telnet server is not enabled" + description: "The telnet-server package contains the telnet daemon, which accepts connections from users from other systems via the telnet protocol." + rationale: "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." + remediation: "Run the following command to disable telnet: # chkconfig telnet off" + compliance: + - cis: ["2.1.8"] + - cis_csc: ["3.4", "9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:telnet: && r::on' + + - id: 6023 + title: "Ensure tftp server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable tftp: # chkconfig tftp off" + compliance: + - cis: ["2.1.9"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:tftp: && r::on' + + - id: 6024 + title: "Ensure rsync service is not enabled" + description: "The rsyncd service can be used to synchronize files between systems over network links." + rationale: "The rsyncd service presents a security risk as it uses unencrypted protocols for communication." + remediation: "Run the following command to disable rsyncd : # chkconfig rsyncd off" + compliance: + - cis: ["2.1.10", "2.2.17"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:rsync: && r::on' + +############################################### +# 2 Special Purpose Services +############################################### + - id: 6025 + title: "Ensure ntp is configured" + description: "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." + rationale: "If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly." + remediation: "Add or edit restrict lines in /etc/ntp.conf to match the following: restrict -4 default kod limited nomodify notrap nopeer noquery restrict -6 default kod limited nomodify notrap nopeer noquery Add or edit server or pool lines to /etc/ntp.conf as appropriate: server Add or edit the NTPD_OPTIONS in /etc/sysconfig/ntp to include '-u ntp:ntp': NTPD_OPTIONS='-u ntp:ntp'" + compliance: + - cis: ["2.2.1.2"] + - cis_csc: ["6.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: any + rules: + - 'f:/etc/ntp.conf -> r:restrict -4 default && r:kod && r:limited && r:nomodify && r:notrap && r:nopeer && r:noquery' + - 'f:/etc/ntp.conf -> r:restrict -6 default && r:kod && r:limited && r:nomodify && r:notrap && r:nopeer && r:noquery' + - 'f:/etc/ntp.conf -> r:^server|^pool' + - 'f:/etc/sysconfig/ntp -> r:NTPD_OPTIONS= && r:-u && r:ntp:ntp' + +# 2.2.2 Remove X Windows (Scored) + - id: 6026 + title: "Ensure X Window System is not installed" + description: "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." + rationale: "Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface." + remediation: "Run the following command to remove the X Windows System packages: # zypper remove xorg-x11*" + compliance: + - cis: ["2.2.2"] + - cis_csc: ["2"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa xorg-x11* -> r:^xorg-x11' + +# 2.2.3 Disable Avahi Server (Scored) + - id: 6027 + title: "Ensure Avahi Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable avahi-daemon : # chkconfig avahi-daemon off" + compliance: + - cis: ["2.2.3"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:avahi-daemon && r::on' + + - id: 6028 + title: "Ensure DHCP Server is not enabled" + description: "The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses." + rationale: "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." + remediation: "Run the following command to disable dhcpd : # chkconfig dhcpd off" + compliance: + - cis: ["2.2.5"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:dhcpd && r::on' + +# 2.2.7 Disable NFS and RPC (Not Scored) + - id: 6029 + title: "Ensure NFS and RPC are not enabled" + description: "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." + rationale: "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." + remediation: "Run the following commands to disable nfs and rpcbind : # chkconfig nfs off # chkconfig rpcbind off" + compliance: + - cis: ["2.2.7"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:nfs|rpcbind && r::on' + + - id: 6030 + title: "Ensure DNS Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable named : # chkconfig named off" + compliance: + - cis: ["2.2.8"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:named && r::on' + + - id: 6031 + title: "Ensure FTP Server is not enabled" + description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." + rationale: "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." + remediation: "Run the following command to disable vsftpd : # chkconfig vsftpd off Notes: Additional FTP servers also exist and should be audited." + compliance: + - cis: ["2.2.9"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:vsftpd && r::on' + +# 2.2.10 Remove HTTP Server (Not Scored) + - id: 6032 + title: "Ensure HTTP server is not enabled" + description: "HTTP or web servers provide the ability to host web site content." + rationale: "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." + remediation: "Run the following command to disable apache2 : # chkconfig apache2 off" + compliance: + - cis: ["2.2.10"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:apache2 && r::on' + + - id: 6033 + title: "Ensure IMAP and POP3 server is not enabled" + description: "cyrus is an open source IMAP and POP3 server for Linux based systems." + rationale: "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." + remediation: "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." + compliance: + - cis: ["2.2.11"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:cyrus && r::on' + +# 2.2.12 Remove Samba (Not Scored) + - id: 6034 + title: "Ensure Samba is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable smb : # chkconfig smb off" + compliance: + - cis: ["2.2.12"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:smb && r::on' + + - id: 6035 + title: "Ensure HTTP Proxy Server is not enabled" + description: "Squid is a standard proxy server used in many environments." + rationale: "If there is no need for a proxy server, it is recommended that the squid proxy be disabled to reduce the potential attack surface." + remediation: "Run the following command to disable squid : # chkconfig squid off" + compliance: + - cis: ["2.2.13"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:squid && r::on' + + - id: 6036 + title: "Ensure SNMP Server is not enabled" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["2.2.14"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: node + rules: + - 'c:chkconfig --list -> r:snmpd && r::on' + + - id: 6037 + title: "Ensure NIS Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable ypserv : # chkconfig ypserv off" + compliance: + - cis: ["2.2.16"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:ypserv && r::on' + +# Section 2.3 - Service Clients + - id: 6038 + title: "Ensure NIS Client is not installed" + description: "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." + rationale: "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." + remediation: "Run the following command to uninstall ypbind : # zypper remove ypbind" + compliance: + - cis: ["2.3.1"] + - cis_csc: ["2"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa ypbind -> r:ypbind' + +############################################### +# 3 Network Configuration and Firewalls +############################################### +############################################### +# 3.1 Modify Network Parameters (Host Only) +############################################### +# 3.1.1 Disable IP Forwarding (Scored) + - id: 6039 + title: "Ensure IPv4 forwarding is disabled" + description: "The net.ipv4.ip_forward flag is used to tell the system whether it can forward packets or not." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.1.1"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.ip_forward -> r:=\s*0$' + - 'c:grep -Rh net\.ipv4\.ip_forward /etc/sysctl.conf /etc/sysctl.d/ -> r:=\s*0$' + +# 3.1.2 Disable Send Packet Redirects (Scored) + - id: 6040 + title: "Ensure packet redirect sending is disabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.1.2"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:/sbin/sysctl net.ipv4.conf.all.send_redirects -> r:=\s*0$' + - 'c:/sbin/sysctl net.ipv4.conf.default.send_redirects -> r:=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.send_redirects /etc/sysctl.conf /etc/sysctl.d -> r:=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.send_redirects /etc/sysctl.conf /etc/sysctl.d -> r:=\s*0$' + +############################################### +# 3.2 Modify Network Parameters (Host and Router) +############################################### +# 3.2.1 Disable Source Routed Packet Acceptance (Scored) + - id: 6041 + title: "Ensure source routed packets are not accepted" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.1"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:grep -Rh net\.ipv4\.conf\.all\.accept_source_route /etc/sysctl.conf /etc/sysctl.d/ -> r:=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.accept_source_route /etc/sysctl.conf /etc/sysctl.d/ -> r:=\s*0$' + - 'c:/sbin/sysctl net.ipv4.conf.all.accept_source_route -> r:=\s*0$' + - 'c:/sbin/sysctl net.ipv4.conf.default.accept_source_route -> r:=\s*0$' + +# 3.2.2 Disable ICMP Redirect Acceptance (Scored) + - id: 6042 + title: "Ensure ICMP redirects are not accepted" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.2"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:grep -Rh net\.ipv4\.conf\.all\.accept_redirects /etc/sysctl.conf /etc/sysctl.d/ -> r:=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.accept_redirects /etc/sysctl.conf /etc/sysctl.d/ -> r:=\s*0$' + - 'c:/sbin/sysctl net.ipv4.conf.all.accept_redirects -> r:=\s*0$' + - 'c:/sbin/sysctl net.ipv4.conf.default.accept_redirects -> r:=\s*0$' + +# 3.2.3 Disable Secure ICMP Redirect Acceptance (Scored) + - id: 6043 + title: "Ensure secure ICMP redirects are not accepted" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.3"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:grep -Rh net\.ipv4\.conf\.all\.secure_redirects /etc/sysctl.conf /etc/sysctl.d/ -> r:=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.secure_redirects /etc/sysctl.conf /etc/sysctl.d/ -> r:=\s*0$' + - 'c:/sbin/sysctl net.ipv4.conf.all.secure_redirects -> r:=\s*0$' + - 'c:/sbin/sysctl net.ipv4.conf.default.secure_redirects -> r:=\s*0$' + + - id: 6044 + title: "Ensure suspicious packets are logged" + description: "When enabled, this feature logs packets with un-routable source addresses to the kernel log." + rationale: "Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system." + remediation: "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." + compliance: + - cis: ["3.2.4"] + - cis_csc: ["6"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:grep -Rh net\.ipv4\.conf\.all\.log_martians /etc/sysctl.conf /etc/sysctl.d/ -> r:=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.log_martians /etc/sysctl.conf /etc/sysctl.d/ -> r:=\s*1$' + - 'c:/sbin/sysctl net.ipv4.conf.all.log_martians -> r:=\s*1$' + - 'c:/sbin/sysctl net.ipv4.conf.default.log_martians -> r:=\s*1$' + +# 3.2.5 Enable Ignore Broadcast Requests (Scored) + - id: 6045 + title: "Ensure broadcast ICMP requests are ignored" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.5"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:grep -Rh net\.ipv4\.icmp_echo_ignore_broadcasts /etc/sysctl.conf /etc/sysctl.d/ -> r:=\s*1$' + - 'c:/sbin/sysctl net.ipv4.icmp_echo_ignore_broadcasts -> r:=\s*1$' + +# 3.2.6 Enable Bad Error Message Protection (Scored) + - id: 6046 + title: "Ensure bogus ICMP responses are ignored" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.6"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:grep -Rh net\.ipv4\.icmp_ignore_bogus_error_responses /etc/sysctl.conf /etc/sysctl.d/ -> r:=\s*1$' + - 'c:/sbin/sysctl net.ipv4.icmp_ignore_bogus_error_responses -> r:=\s*1$' + +# 3.2.7 Ensure Reverse Path Filtering is enabled (Scored) + - id: 6047 + title: "Ensure Reverse Path Filtering is enabled" + description: "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)." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.7"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:grep -Rh net\.ipv4\.conf\.all\.rp_filter /etc/sysctl.conf /etc/sysctl.d/ -> r:=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.rp_filter /etc/sysctl.conf /etc/sysctl.d/ -> r:=\s*1$' + - 'c:/sbin/sysctl net.ipv4.conf.all.rp_filter -> r:=\s*1$' + - 'c:/sbin/sysctl net.ipv4.conf.default.rp_filter -> r:=\s*1$' + +# 3.2.8 Enable TCP SYN Cookies (Scored) + - id: 6048 + title: "Ensure TCP SYN Cookies is enabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.8"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:grep -Rh net\.ipv4\.tcp_syncookies /etc/sysctl.conf /etc/sysctl.d/ -> r:=\s*1$' + - 'c:/sbin/sysctl net.ipv4.tcp_syncookies -> r:=\s*1$' + +############################################### +# 5 System Access, Authentication and Authorization +############################################### +############################################### +# 5.2 Configure SSH +############################################### +# 5.2.2 Set SSH Protocol to 2 (Scored) + - id: 6049 + title: "Ensure SSH Protocol is set to 2" + description: "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." + rationale: "SSH v1 suffers from insecurities that do not affect SSH v2." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:^\s*\t*Protocol\s*\t*2' + +# 5.2.3 Set LogLevel to INFO (Scored) + - id: 6050 + title: "Ensure SSH LogLevel is set to INFO" + description: "The INFO parameter specifies that login and logout activity will be logged." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel INFO" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:LogLevel\.+INFO' + +# 5.2.5 Set SSH MaxAuthTries to 4 or Less (Scored) + - id: 6051 + title: "Ensure SSH MaxAuthTries is set to 4 or less" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4" + compliance: + - cis: ["5.2.5"] + - cis_csc: ["16"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:$sshd_file -> n:^MaxAuthTries\s+(\d+) compare <= 4' + +# 5.2.6 Set SSH IgnoreRhosts to Yes (Scored) + - id: 6052 + title: "Ensure SSH IgnoreRhosts is enabled" + description: "The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication." + rationale: "Setting this parameter forces users to enter a password when authenticating with ssh." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^# && r:IgnoreRhosts\.+yes' + +# 5.2.7 Set SSH HostbasedAuthentication to No (Scored) + - id: 6053 + title: "Ensure SSH HostbasedAuthentication is disabled" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> r:^\s*\t*HostbasedAuthentication\.+no' + +# 5.2.8 Disable SSH Root Login (Scored) + - id: 6054 + title: "Ensure SSH root login is disabled" + description: "The PermitRootLogin parameter specifies if the root user can log in using ssh(1). The default is no." + rationale: "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" + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> r:^\s*\t*PermitRootLogin\.+no' + +# 5.2.9 Set SSH PermitEmptyPasswords to No (Scored) + - id: 6055 + title: "Ensure SSH PermitEmptyPasswords is disabled" + description: "The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts with empty password strings." + rationale: "Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system" + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> r:^\s*\t*PermitEmptyPasswords\.+no' + +############################################### +# 6 System Maintenance +############################################### +############################################### +# 6.2 Review User and Group Settings +############################################### +# 6.2.5 Verify No UID 0 Accounts Exist Other Than root (Scored) + - id: 6056 + title: "Ensure root is the only UID 0 account" + description: "Any account with UID 0 has superuser privileges on the system." + rationale: "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." + remediation: "Remove any users other than root with UID 0 or assign them a new UID if appropriate." + compliance: + - cis: ["6.2.5"] + - cis_csc: ["5.1"] + - pci_dss: ["10.2.5"] + - hipaa: ["164.312.b"] + - nist_800_53: ["AU.14", "AC.7"] + condition: none + rules: + - 'f:/etc/passwd -> !r:^# && !r:^\s*\t*root: && r:^\w+:\w+:0:' + + - id: 6057 + title: "Ensure password fields are not empty" + description: "An account with an empty password field means that anybody may log in as that user without providing a password." + rationale: "All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user." + remediation: "If any accounts in the /etc/shadow file do not have a password, run the following command to lock the account until it can be determined why it does not have a password: # passwd -l . Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off." + compliance: + - cis: ["6.2.1"] + - cis_csc: ["16"] + - pci_dss: ["10.2.5"] + - hipaa: ["164.312.b"] + - nist_800_53: ["AU.14", "AC.7"] + condition: none + rules: + - 'f:/etc/shadow -> r:^\w+::' diff --git a/sca/sles/11/cis_sles11_linux_rcl.yml b/sca/sles/11/cis_sles11_linux_rcl.yml deleted file mode 100644 index 6c2358ae0..000000000 --- a/sca/sles/11/cis_sles11_linux_rcl.yml +++ /dev/null @@ -1,791 +0,0 @@ -# Security Configuration assessment -# CIS Checks for SUSE SLES 11 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# CIS Benchmark for SUSE Linux Enterprise Server 11 v2.1.0 - 12-28-2017 - -policy: - id: "cis_sles11_linux" - file: "cis_sles11_linux_rcl.yml" - name: "CIS SUSE Linux Enterprise 11 Benchmark" - description: "This document provides prescriptive guidance for establishing a secure configuration posture for SUSE Linux Enterprise 11 systems running on x86 and x64 platforms. This document was tested against SUSE Linux Enterprise Server 11 SP4." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check Suse 11 version" - description: "Requirements for running the SCA scan against SUSE Linux Enterprise Server 11" - condition: "any required" - rules: - - 'f:/etc/os-release -> r:^PRETTY_NAME="SUSE Linux Enterprise Server 11";' - - 'f:/etc/os-release -> r:^PRETTY_NAME="SUSE Linux Enterprise Server 11 SP1";' - - 'f:/etc/os-release -> r:^PRETTY_NAME="SUSE Linux Enterprise Server 11 SP2";' - - 'f:/etc/os-release -> r:^PRETTY_NAME="SUSE Linux Enterprise Server 11 SP3";' - - 'f:/etc/os-release -> r:^PRETTY_NAME="SUSE Linux Enterprise Server 11 SP4";' - -variables: - $rc_dirs: /etc/rc.d/rc2.d,/etc/rc.d/rc3.d,/etc/rc.d/rc4.d,/etc/rc.d/rc5.d; - - -checks: -# Section 1.1 - Filesystem Configuration - - id: 7000 - title: "Ensure separate partition exists for /tmp" - description: "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.2" - references: - - https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> !r:/tmp;' - - id: 7001 - title: "Ensure nodev option set on /tmp partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "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" - compliance: - - cis: "1.1.3" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/tmp && r:nodev;' - - id: 7002 - title: "Ensure nosuid option set on /tmp partition" - description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." - rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /tmp." - remediation: "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" - compliance: - - cis: "1.1.4" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/tmp && r:nosuid;' - - id: 7003 - title: "Ensure noexec option set on /tmp partition" - description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." - rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /tmp." - remediation: "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" - compliance: - - cis: "1.1.5" - - cis_csc: "2" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/tmp && r:noexec;' - - id: 7004 - title: "Ensure separate partition exists for /var" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.6" - references: - - https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r^# && r:/var;' - - id: 7005 - title: "Ensure separate partition exists for /var/log" - description: "The /var/log directory is used by system services to store log data." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.11" - - cis_csc: "6.3" - references: - - https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/var/log;' - - id: 7006 - title: "Ensure separate partition exists for /var/log/audit" - description: "The auditing daemon, auditd , stores log data in the /var/log/audit directory." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.12" - - cis_csc: "6.3" - references: - - https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/var/log/audit;' - - id: 7007 - title: "Ensure separate partition exists for /home" - description: "The /home directory is used to support disk storage needs of local users." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.13" - references: - - https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/home;' - - id: 7008 - title: "Ensure nodev option set on /home partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.14" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/home && r:nodev;' - - id: 7009 - title: "Ensure nodev option set on /dev/shm partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "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" - compliance: - - cis: "1.1.15" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:nodev;' - - id: 7010 - title: "Ensure nosuid option set on /dev/shm partition" - description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." - rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." - remediation: "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" - compliance: - - cis: "1.1.16" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:nosuid;' - - id: 7011 - title: "Ensure noexec option set on /dev/shm partition" - description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." - rationale: "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." - remediation: "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" - compliance: - - cis: "1.1.17" - - cis_csc: "2" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:noexec;' - - id: 7012 - title: "Ensure nodev option set on removable media partitions" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "Removable media containing character and block special devices could be used to circumvent security controls by allowing non-root users to access sensitive device files such as /dev/kmem or the raw disk partitions." - remediation: "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." - compliance: - - cis: "1.1.18" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:nodev;' - - id: 7013 - title: "Ensure nosuid option set on removable media partitions" - description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." - rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." - remediation: "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." - compliance: - - cis: "1.1.19" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:nosuid;' - - id: 7014 - title: "Ensure noexec option set on removable media partitions" - description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." - rationale: "Setting this option on a file system prevents users from executing programs from the removable media. This deters users from being able to introduce potentially malicious software on the system." - remediation: "Edit the /etc/fstab file and add noexec to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." - compliance: - - cis: "1.1.20" - - cis_csc: "8" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:noexec;' -# Section 1.4 - Secure Boot Settings - - id: 7015 - title: "Ensure bootloader password is set" - description: "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." - rationale: "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)." - remediation: "Create an encrypted password with grub-md5-crypt : # grub-md5-crypt. The result is an . Copy and paste the into the global section of /boot/grub/menu.lst: password --md5 Notes: This recommendation is designed around the grub bootloader, if LILO or another bootloader is in use in your environment enact equivalent settings." - compliance: - - cis: "1.4.2" - - cis_csc: "5.1" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/boot/grub2/grub.cfg -> NIN !r:^# && r:password;' -# Section 1.5 - Additional Process Hardening - - id: 7016 - title: "Ensure core dumps are restricted" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.5.1" - - cis_csc: "13" - condition: any - rules: - - 'f:/etc/security/limits.conf -> NIN !r:^# && r:hard\.+core\.+0;' - - id: 7017 - title: "Ensure address space layout randomization (ASLR) is enabled" - description: "Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process." - rationale: "Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting." - remediation: "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" - compliance: - - cis: "1.5.3" - - cis_csc: "8.4" - condition: any - rules: - - 'f:/proc/sys/kernel/randomize_va_space -> 2;' -# Section 2.1 - inetd Services - - id: 7018 - title: "Ensure chargen services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable chargen and chargen-udp : # chkconfig chargen off # chkconfig chargen-udp off" - compliance: - - cis: "2.1.1" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/chargen -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/chargen-udp -> IN !r:^# && r:disable && r:no;' - - id: 7019 - title: "Ensure daytime services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable daytime - and daytime-udp: # chkconfig daytime-off # chkconfig daytime-udp off" - compliance: - - cis: "2.1.2" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/daytime -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/daytime-udp -> IN !r:^# && r:disable && r:no;' - - id: 7020 - title: "Ensure discard services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable discard and discard-udp: # chkconfig discard off # chkconfig discard-udp off" - compliance: - - cis: "2.1.3" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/discard -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/discard-udp -> IN !r:^# && r:disable && r:no;' - - id: 7021 - title: "Ensure echo services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable echo and echo-udp: # chkconfig echo off # chkconfig echo-udp off" - compliance: - - cis: "2.1.4" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/echo -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/echo-udp -> IN !r:^# && r:disable && r:no;' - - id: 7022 - title: "Ensure time services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable time and time-udp: # chkconfig time off # chkconfig time-udp off" - compliance: - - cis: "2.1.5" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/time -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/time-udp -> IN !r:^# && r:disable && r:no;' - - id: 7023 - title: "Ensure rsh server is not enabled" - description: "The Berkeley rsh-server ( rsh , rlogin , rexec ) package contains legacy services that exchange credentials in clear-text." - rationale: "These legacy services contain numerous security exposures and have been replaced with the more secure SSH package." - remediation: "Run the following commands to disable rsh , rlogin , and rexec : # chkconfig rexec off # chkconfig rlogin off # chkconfig rsh off" - compliance: - - cis: "2.1.6" - - cis_csc: "3.4, 9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/rlogin -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/rsh -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/shell -> IN !r:^# && r:disable && r:no;' - - id: 7024 - title: "Ensure talk server is not enabled" - description: "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." - rationale: "The software presents a security risk as it uses unencrypted protocols for communication." - remediation: "Run the following command to disable talk: # chkconfig talk off" - compliance: - - cis: "2.1.7" - - cis_csc: "9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/talk -> IN !r:^# && r:disable && r:no;' - - id: 7025 - title: "Ensure telnet server is not enabled" - description: "The telnet-server package contains the telnet daemon, which accepts connections from users from other systems via the telnet protocol." - rationale: "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." - remediation: "Run the following command to disable telnet: # chkconfig telnet off" - compliance: - - cis: "2.1.8" - - cis_csc: "3.4, 9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/telnet -> IN !r:^# && r:disable && r:no;' - - id: 7026 - title: "Ensure tftp server is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable tftp: # chkconfig tftp off" - compliance: - - cis: "2.1.9" - - cis_csc: "9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/tftpd -> IN !r:^# && r:disable && r:no;' - - id: 7027 - title: "Ensure rsync service is not enabled" - description: "The rsyncd service can be used to synchronize files between systems over network links." - rationale: "The rsyncd service presents a security risk as it uses unencrypted protocols for communication." - remediation: "Run the following command to disable rsyncd : # chkconfig rsyncd off" - compliance: - - cis: "2.1.10, 2.2.17" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\drsyncd$;' -# Section 2.2 - Special Purpose Services - - id: 7028 - title: "Ensure ntp is configured" - description: "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." - rationale: "If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly." - remediation: "Add or edit restrict lines in /etc/ntp.conf to match the following: restrict -4 default kod limited nomodify notrap nopeer noquery restrict -6 default kod limited nomodify notrap nopeer noquery Add or edit server or pool lines to /etc/ntp.conf as appropriate: server Add or edit the NTPD_OPTIONS in /etc/sysconfig/ntp to include '-u ntp:ntp': NTPD_OPTIONS='-u ntp:ntp'" - compliance: - - cis: "2.2.1.2" - - cis_csc: "6.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/ntp.conf -> IN r:restrict default kod nomodify notrap nopeer noquery && r:^server;' - - 'f:/etc/sysconfig/ntpd -> r:OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid";' - - id: 7029 - title: "Ensure X Window System is not installed" - description: "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." - rationale: "Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface." - remediation: "Run the following command to remove the X Windows System packages: # zypper remove xorg-x11*" - compliance: - - cis: "2.2.2" - - cis_csc: "2" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/inittab -> IN !r:^# && r:id:5;' - - id: 7030 - title: "Ensure Avahi Server is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable avahi-daemon : # chkconfig avahi-daemon off" - compliance: - - cis: "2.2.3" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'p:avahi-daemon;' - - id: 7031 - title: "Ensure DHCP Server is not enabled" - description: "The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses." - rationale: "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." - remediation: "Run the following command to disable dhcpd : # chkconfig dhcpd off" - compliance: - - cis: "2.2.5" - - cis_csc: "9.1" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dhcpd$;' - - 'd:$rc_dirs -> ^S\d\dhcpd6$;' - - id: 7032 - title: "Ensure NFS and RPC are not enabled" - description: "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." - rationale: "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." - remediation: "Run the following commands to disable nfs and rpcbind : # chkconfig nfs off # chkconfig rpcbind off" - compliance: - - cis: "2.2.7" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dnfs$;' - - 'd:$rc_dirs -> ^S\d\dnfslock$;' - - id: 7033 - title: "Ensure DNS Server is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable named : # chkconfig named off" - compliance: - - cis: "2.2.8" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dnamed$;' - - id: 7034 - title: "Ensure FTP Server is not enabled" - description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." - rationale: "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." - remediation: "Run the following command to disable vsftpd : # chkconfig vsftpd off Notes: Additional FTP servers also exist and should be audited." - compliance: - - cis: "2.2.9" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/xinetd.d/vsftpd -> IN !r:^# && r:disable && r:no;' - - id: 7035 - title: "Ensure HTTP server is not enabled" - description: "HTTP or web servers provide the ability to host web site content." - rationale: "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." - remediation: "Run the following command to disable apache2 : # chkconfig apache2 off" - compliance: - - cis: "2.2.10" - - cis_csc: "9.1" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dapache2$;' - - id: 7036 - title: "Ensure IMAP and POP3 server is not enabled" - description: "cyrus is an open source IMAP and POP3 server for Linux based systems." - rationale: "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." - remediation: "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." - compliance: - - cis: "2.2.11" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/xinetd.d/cyrus-imapd -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/dovecot -> IN !r:^# && r:disable && r:no;' - - id: 7037 - title: "Ensure Samba is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable smb : # chkconfig smb off" - compliance: - - cis: "2.2.12" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsamba$;' - - 'd:$rc_dirs -> ^S\d\dsmb$;' - - id: 7038 - title: "Ensure HTTP Proxy Server is not enabled" - description: "Squid is a standard proxy server used in many environments." - rationale: "If there is no need for a proxy server, it is recommended that the squid proxy be disabled to reduce the potential attack surface." - remediation: "Run the following command to disable squid : # chkconfig squid off" - compliance: - - cis: "2.2.13" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsquid$;' - - id: 7039 - title: "Ensure SNMP Server is not enabled" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "2.2.14" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsnmpd$;' - - id: 7040 - title: "Ensure NIS Server is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable ypserv : # chkconfig ypserv off" - compliance: - - cis: "2.2.16" - - cis_csc: "9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dypserv$;' -# Section 2.3 - Service Clients - - id: 7041 - title: "Ensure NIS Client is not installed" - description: "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." - rationale: "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." - remediation: "Run the following command to uninstall ypbind : # zypper remove ypbind" - compliance: - - cis: "2.3.1" - - cis_csc: "2" - - pci_dss: "2.2.3" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dypbind$;' -# Section 3.1 - Network Parameters (Host Only) - - id: 7042 - title: "Ensure IPv4 forwarding is disabled" - description: "The net.ipv4.ip_forward flag is used to tell the system whether it can forward packets or not." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.1.1" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/ip_forward -> 1;' - - id: 7043 - title: "Ensure IPv6 forwarding is disabled" - description: "The net.ipv6.conf.all.forwarding flag is used to tell the system whether it can forward packets or not." - rationale: "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." - remediation: "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.forwarding = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.forwarding=0 # sysctl -w net.ipv6.route.flush=1" - compliance: - - cis: "3.1.1" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv6/ip_forward -> 1;' - - id: 7044 - title: "Ensure packet redirect sending is disabled" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.1.2" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/send_redirects -> 1;' - - 'f:/proc/sys/net/ipv4/conf/default/send_redirects -> 1;' -# Section 3.2 - Network Parameters (Host and Router) - - id: 7045 - title: "Ensure source routed packets are not accepted" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.2.1" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/accept_source_route -> 1;' - - id: 7046 - title: "Ensure ICMP redirects are not accepted" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.2.2" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/accept_redirects -> 1;' - - 'f:/proc/sys/net/ipv4/conf/default/accept_redirects -> 1;' - - id: 7047 - title: "Ensure secure ICMP redirects are not accepted" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.2.3" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/secure_redirects -> 1;' - - 'f:/proc/sys/net/ipv4/conf/default/secure_redirects -> 1;' - - id: 7048 - title: "Ensure suspicious packets are logged" - description: "When enabled, this feature logs packets with un-routable source addresses to the kernel log." - rationale: "Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system." - remediation: "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." - compliance: - - cis: "3.2.4" - - cis_csc: "6" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/log_martians -> 0;' - - id: 7049 - title: "Ensure broadcast ICMP requests are ignored" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.2.5" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/icmp_echo_ignore_broadcasts -> 0;' - - id: 7050 - title: "Ensure bogus ICMP responses are ignored" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.2.6" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/icmp_ignore_bogus_error_responses -> 0;' - - id: 7051 - title: "Ensure Reverse Path Filtering is enabled" - description: "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)." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.2.7" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/rp_filter -> 0;' - - 'f:/proc/sys/net/ipv4/conf/default/rp_filter -> 0;' - - id: 7052 - title: "Ensure TCP SYN Cookies is enabled" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.2.8" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/tcp_syncookies -> 0;' -# Section 5.2 - SSH Server Configuration - - id: 7053 - title: "Ensure SSH Protocol is set to 2" - description: "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." - rationale: "SSH v1 suffers from insecurities that do not affect SSH v2." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" - compliance: - - cis: "5.2.2" - - cis_csc: "3.4" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:Protocol\.+1;' - - id: 7054 - title: "Ensure SSH LogLevel is set to INFO" - description: "The INFO parameter specifies that login and logout activity will be logged." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel INFO" - compliance: - - cis: "5.2.3" - - cis_csc: "16" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> NIN !r:^# && r:LogLevel\.+INFO;' - - id: 7055 - title: "Ensure SSH MaxAuthTries is set to 4 or less" - description: "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." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4" - compliance: - - cis: "5.2.5" - - cis_csc: "16" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^\s*MaxAuthTries\s+4\s*$;' - - id: 7056 - title: "Ensure SSH IgnoreRhosts is enabled" - description: "The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication." - rationale: "Setting this parameter forces users to enter a password when authenticating with ssh." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" - compliance: - - cis: "5.2.6" - - cis_csc: "9" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:IgnoreRhosts\.+no;' - - id: 7057 - title: "Ensure SSH HostbasedAuthentication is disabled" - description: "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." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" - compliance: - - cis: "5.2.7" - - cis_csc: "9" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:HostbasedAuthentication\.+yes;' - - id: 7058 - title: "Ensure SSH root login is disabled" - description: "The PermitRootLogin parameter specifies if the root user can log in using ssh(1). The default is no." - rationale: "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" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" - compliance: - - cis: "5.2.8" - - cis_csc: "5.8" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^\s*PermitRootLogin\.+no;' - - id: 7059 - title: "Ensure SSH PermitEmptyPasswords is disabled" - description: "The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts with empty password strings." - rationale: "Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" - compliance: - - cis: "5.2.9" - - cis_csc: "16" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^\s*PermitEmptyPasswords\.+no;' -# Section 6.2 - User and Group Settings - - id: 7060 - title: "Ensure password fields are not empty" - description: "An account with an empty password field means that anybody may log in as that user without providing a password." - rationale: "All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user." - remediation: "If any accounts in the /etc/shadow file do not have a password, run the following command to lock the account until it can be determined why it does not have a password: # passwd -l . Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off." - compliance: - - cis: "6.2.1" - - cis_csc: "16" - - pci_dss: "10.2.5" - condition: any - rules: - - 'f:/etc/shadow -> r:^\w+::;' - - id: 7061 - title: "Ensure root is the only UID 0 account" - description: "Any account with UID 0 has superuser privileges on the system." - rationale: "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." - remediation: "Remove any users other than root with UID 0 or assign them a new UID if appropriate." - compliance: - - cis: "6.2.5" - - cis_csc: "5.1" - - pci_dss: "10.2.5" - condition: any - rules: - - 'f:/etc/passwd -> IN !r:^# && !r:^root: && r:^\w+:\w+:0:;' diff --git a/sca/sles/12/cis_sles12_linux.yml b/sca/sles/12/cis_sles12_linux.yml new file mode 100644 index 000000000..586b8bcdb --- /dev/null +++ b/sca/sles/12/cis_sles12_linux.yml @@ -0,0 +1,919 @@ +# Security Configuration Assessment +# CIS Checks for SUSE SLES 12 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# CIS Benchmark for SUSE Linux Enterprise 12 v2.1.0 - 12-28-2017 + +policy: + id: "cis_sles12_linux" + file: "cis_sles12_linux.yml" + name: "CIS SUSE Linux Enterprise 12 Benchmark" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for SUSE Linux Enterprise 12 systems running on x86 and x64 platforms. This document was tested against SUSE Linux Enterprise Server 12 SP3." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check Suse 12 version" + description: "Requirements for running the SCA scan against SUSE Linux Enterprise Server 12" + condition: all + rules: + - 'f:/etc/os-release -> r:SUSE Linux Enterprise Server 12' + +variables: + $sshd_file: /etc/ssh/sshd_config + +checks: +# Section 1.1 - Filesystem Configuration + - id: 6500 + title: "Ensure separate partition exists for /tmp" + description: "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.2"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/tmp\s' + + - id: 6501 + title: "Ensure nodev option set on /tmp partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.3"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:nodev' + + - id: 6502 + title: "Ensure nosuid option set on /tmp partition" + description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." + rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /tmp." + remediation: "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" + compliance: + - cis: ["1.1.4"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:nosuid' + +# 1.1.5 /tmp: noexec + - id: 6503 + title: "Ensure noexec option set on /tmp partition" + description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." + rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /tmp." + remediation: "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" + compliance: + - cis: ["1.1.5"] + - cis_csc: ["2"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/tmp\s && r:noexec' + +# 1.1.6 Build considerations - Partition scheme. + - id: 6504 + title: "Ensure separate partition exists for /var" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.6"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var\s' + + - id: 6505 + title: "Ensure separate partition exists for /var/log" + description: "The /var/log directory is used by system services to store log data." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.11"] + - cis_csc: ["6.3"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var/log\s' + +# 1.1.12 /var/log/audit: partition + - id: 6506 + title: "Ensure separate partition exists for /var/log/audit" + description: "The auditing daemon, auditd , stores log data in the /var/log/audit directory." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.12"] + - cis_csc: ["6.3"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/var/log/audit\s' + +# 1.1.13 /home: partition + - id: 6507 + title: "Ensure separate partition exists for /home" + description: "The /home directory is used to support disk storage needs of local users." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.13"] + references: + - AJ Lewis, "LVM HOWTO", https://tldp.org/HOWTO/LVM-HOWTO/ + condition: all + rules: + - 'c:mount -> r:\s/home\s' + +# 1.1.14 /home: nodev + - id: 6508 + title: "Ensure nodev option set on /home partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "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." + compliance: + - cis: ["1.1.14"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/home\s && r:nodev' + +# 1.1.15 /dev/shm: nodev + - id: 6509 + title: "Ensure nodev option set on /dev/shm partition" + description: "The nodev mount option specifies that the filesystem cannot contain special devices." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.15"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:nodev' + +# 1.1.16 /dev/shm: nosuid + - id: 6510 + title: "Ensure nosuid option set on /dev/shm partition" + description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." + rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." + remediation: "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" + compliance: + - cis: ["1.1.16"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:nosuid' + +# 1.1.17 /dev/shm: noexec + - id: 6511 + title: "Ensure noexec option set on /dev/shm partition" + description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.1.17"] + - cis_csc: ["2"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:mount -> r:\s/dev/shm\s && r:noexec' + +############################################### +# 1.5 Additional Process Hardening +############################################### +# 1.5.1 Restrict Core Dumps (Scored) + - id: 6512 + title: "Ensure core dumps are restricted" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["1.5.1"] + - cis_csc: ["13"] + condition: all + rules: + - 'c:grep -Rh ^*[[:space:]]*hard[[:space:]][[:space:]]*core[[:space:]][[:space:]]* /etc/security/limits.conf /etc/security/limits.d -> r:\s*\t*0$' + - 'c:sysctl fs.suid_dumpable -> r:\s0$' + - 'c:grep -Rh fs\.suid_dumpable /etc/sysctl.conf /etc/sysctl.d -> r:^\s*fs.suid_dumpable\s*=\s*0\s*$' + +# 1.5.3 Enable Randomized Virtual Memory Region Placement (Scored) + - id: 6513 + title: "Ensure address space layout randomization (ASLR) is enabled" + description: "Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process." + rationale: "Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting." + remediation: "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" + compliance: + - cis: ["1.5.3"] + - cis_csc: ["8.4"] + condition: all + rules: + - 'c:grep -Rh ^kernel\.randomize_va_space /etc/sysctl.conf /etc/sysctl.d -> r:^\s*kernel.randomize_va_space\s*=\s*2$' + - 'c:sysctl kernel.randomize_va_space -> r:\s2$|\t2$' + + +############################################### +# 2 OS Services +############################################### +############################################### +# 2.1 Remove Legacy Services +############################################### +# Section 2.1 - inetd Services + - id: 6514 + title: "Ensure chargen services are not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Run the following commands to disable chargen and chargen-udp : # chkconfig chargen off # chkconfig chargen-udp off" + compliance: + - cis: ["2.1.1"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:chargen:|chargen-udp: && r::on' + + - id: 6515 + title: "Ensure daytime services are not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Run the following commands to disable daytime and daytime-udp: # chkconfig daytime off # chkconfig daytime-udp off" + compliance: + - cis: ["2.1.2"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:daytime:|daytime-udp && r::on' + + - id: 6516 + title: "Ensure discard services are not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Run the following commands to disable discard and discard-udp: # chkconfig discard off # chkconfig discard-udp off" + compliance: + - cis: ["2.1.3"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:discard:|discard-udp: && r::on' + + - id: 6517 + title: "Ensure echo services are not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Run the following commands to disable echo and echo-udp: # chkconfig echo off # chkconfig echo-udp off" + compliance: + - cis: ["2.1.4"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:echo:|echo-udp: && r::on' + + - id: 6518 + title: "Ensure time services are not enabled" + description: "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." + rationale: "Disabling this service will reduce the remote attack surface of the system." + remediation: "Run the following commands to disable time and time-udp: # chkconfig time off # chkconfig time-udp off" + compliance: + - cis: ["2.1.5"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:time:|time-udp && r::on' + + - id: 6519 + title: "Ensure rsh server is not enabled" + description: "The Berkeley rsh-server (rsh, rlogin, rexec) package contains legacy services that exchange credentials in clear-text." + rationale: "These legacy services contain numerous security exposures and have been replaced with the more secure SSH package." + remediation: "Run the following commands to disable rsh , rlogin , and rexec : # chkconfig rexec off # chkconfig rlogin off # chkconfig rsh off" + compliance: + - cis: ["2.1.6"] + - cis_csc: ["3.4", "9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:rexec:|rlogin:|rsh: && r::on' + + - id: 6520 + title: "Ensure talk server is not enabled" + description: "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." + rationale: "The software presents a security risk as it uses unencrypted protocols for communication." + remediation: "Run the following command to disable talk: # chkconfig talk off" + compliance: + - cis: ["2.1.7"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:talk: && r::on' + + - id: 6521 + title: "Ensure telnet server is not enabled" + description: "The telnet-server package contains the telnet daemon, which accepts connections from users from other systems via the telnet protocol." + rationale: "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." + remediation: "Run the following command to disable telnet: # chkconfig telnet off" + compliance: + - cis: ["2.1.8"] + - cis_csc: ["3.4", "9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:telnet: && r::on' + + - id: 6522 + title: "Ensure tftp server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable tftp: # systemctl disable atftpd" + compliance: + - cis: ["2.1.9", "2.2.17"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:tftp: && r::on' + + - id: 6523 + title: "Ensure rsync service is not enabled" + description: "The rsyncd service can be used to synchronize files between systems over network links." + rationale: "The rsyncd service presents a security risk as it uses unencrypted protocols for communication." + remediation: "Run the following command to disable rsyncd: # systemctl disable rsyncd" + compliance: + - cis: ["2.1.10", "2.2.18"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:chkconfig --list -> r:rsync: && r::on' + + - id: 6524 + title: "Ensure xinetd is not enabled" + description: "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." + rationale: "If there are no xinetd services required, it is recommended that the daemon be disabled." + remediation: "Run the following command to disable xinetd : # systemctl disable xinetd" + compliance: + - cis: ["2.1.11"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:systemctl is-enabled xinetd -> r:enabled' + +############################################### +# 2 Special Purpose Services +############################################### + - id: 6525 + title: "Ensure ntp is configured" + description: "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." + rationale: "If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly." + remediation: "Add or edit restrict lines in /etc/ntp.conf to match the following: restrict -4 default kod limited nomodify notrap nopeer noquery restrict -6 default kod limited nomodify notrap nopeer noquery Add or edit server or pool lines to /etc/ntp.conf as appropriate: server Add or edit the NTPD_OPTIONS in /etc/sysconfig/ntp to include '-u ntp:ntp': NTPD_OPTIONS='-u ntp:ntp'" + compliance: + - cis: ["2.2.1.2"] + - cis_csc: ["6.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:/etc/ntp.conf -> r:^restrict\s+-4\s+default|^restrict\s+default && r:\s+kod && r:\s+nomodify && r:\s+notrap && r:\s+nopeer && r:\s+noquery' + - 'f:/etc/ntp.conf -> r:^restrict\s+-6\s+default && r:\s+kod && r:\s+nomodify && r:\s+notrap && r:\s+nopeer && r:\s+noquery' + - 'f:/etc/ntp.conf -> r:^server\.+$|^pool\.+$' + - 'f:/etc/sysconfig/ntp -> r:NTPD_OPTIONS= && r:-u && r:ntp:ntp' + +# 2.2.2 Remove X Windows (Scored) + - id: 6526 + title: "Ensure X Window System is not installed" + description: "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." + rationale: "Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface." + remediation: "Run the following command to remove the X Windows System packages: # zypper remove xorg-x11*" + compliance: + - cis: ["2.2.2"] + - cis_csc: ["2"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa xorg-x11* -> r:^xorg-x11' + +# 2.2.3 Disable Avahi Server (Scored) + - id: 6527 + title: "Ensure Avahi Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable avahi-daemon : # systemctl disable avahi-daemon" + compliance: + - cis: ["2.2.3"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled avahi-daemon -> r:enabled' + + - id: 6528 + title: "Ensure DHCP Server is not enabled" + description: "The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses." + rationale: "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." + remediation: "Run the following command to disable dhcpd : # systemctl disable dhcpd" + compliance: + - cis: ["2.2.5"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:systemctl is-enabled dhcpd -> r:enabled' + +# 2.2.7 Disable NFS and RPC (Not Scored) + - id: 6529 + title: "Ensure NFS and RPC are not enabled" + description: "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." + rationale: "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." + remediation: "Run the following commands to disable nfs and rpcbind : # systemctl disable nfs # systemctl disable rpcbind" + compliance: + - cis: ["2.2.7"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled nfs -> r:enabled' + - 'c:systemctl is-enabled rpcbind -> r:enabled' + + - id: 6530 + title: "Ensure DNS Server is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable named : # systemctl disable named" + compliance: + - cis: ["2.2.8"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled named -> r:enabled' + + - id: 6531 + title: "Ensure FTP Server is not enabled" + description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." + rationale: "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." + remediation: "Run the following command to disable vsftpd : # systemctl disable vsftpd Notes: Additional FTP servers also exist and should be audited." + compliance: + - cis: ["2.2.9"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled vsftpd -> r:enabled' + +# 2.2.10 Remove HTTP Server (Not Scored) + - id: 6532 + title: "Ensure HTTP server is not enabled" + description: "HTTP or web servers provide the ability to host web site content." + rationale: "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." + remediation: "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." + compliance: + - cis: ["2.2.10"] + - cis_csc: ["9.1"] + condition: none + rules: + - 'c:systemctl is-enabled apache2 -> r:enabled' + + - id: 6533 + title: "Ensure IMAP and POP3 server is not enabled" + description: "dovecot is an open source IMAP and POP3 server for Linux based systems." + rationale: "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." + remediation: "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." + compliance: + - cis: ["2.2.11"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled dovecot -> r:enabled' + +# 2.2.12 Remove Samba (Not Scored) + - id: 6534 + title: "Ensure Samba is not enabled" + description: "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." + rationale: "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." + remediation: "Run the following command to disable smb : # systemctl disable smb" + compliance: + - cis: ["2.2.12"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled smb -> r:enabled' + + - id: 6535 + title: "Ensure HTTP Proxy Server is not enabled" + description: "Squid is a standard proxy server used in many distributions and environments." + rationale: "If there is no need for a proxy server, it is recommended that the squid proxy be disabled to reduce the potential attack surface." + remediation: "Run the following command to disable squid : # systemctl disable squid Notes: Several HTTP proxy servers exist. These and other services should be checked." + compliance: + - cis: ["2.2.13"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled squid -> r:enabled' + + - id: 6536 + title: "Ensure SNMP Server is not enabled" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["2.2.14"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.2"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled snmpd -> r:enabled' + + - id: 6537 + title: "Ensure NIS Server is not enabled" + description: "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." + rationale: "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" + remediation: "Run the following command to disable ypserv : # systemctl disable ypserv" + compliance: + - cis: ["2.2.16"] + - cis_csc: ["9.1"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:systemctl is-enabled ypserv -> r:enabled' + +# Section 2.3 - Service Clients + - id: 6538 + title: "Ensure NIS Client is not installed" + description: "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." + rationale: "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." + remediation: "Run the following command to uninstall ypbind : # zypper remove ypbind" + compliance: + - cis: ["2.3.1"] + - cis_csc: ["2"] + - pci_dss: ["2.2.3"] + - nist_800_53: ["CM.1"] + condition: none + rules: + - 'c:rpm -qa ypbind -> r:ypbind' + +############################################### +# 3 Network Configuration and Firewalls +############################################### +############################################### +# 3.1 Modify Network Parameters (Host Only) +############################################### +# 3.1.1 Disable IP Forwarding (Scored) + - id: 6539 + title: "Ensure IP forwarding is disabled" + description: "The net.ipv4.ip_forward flag is used to tell the system whether it can forward packets or not." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.1.1"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.ip_forward -> r:\s0$' + - 'c:grep -Rh net\.ipv4\.ip_forward /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.ip_forward\s*=\s*0$' + +# 3.1.2 Disable Send Packet Redirects (Scored) + - id: 6540 + title: "Ensure packet redirect sending is disabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.1.2"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.send_redirects -> r:^net.ipv4.conf.all.send_redirects\s*=\s*0$' + - 'c:sysctl net.ipv4.conf.default.send_redirects -> r:^net.ipv4.conf.default.send_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.send_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.send_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.send_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.send_redirects\s*=\s*0$' + +############################################### +# 3.2 Modify Network Parameters (Host and Router) +############################################### +# 3.2.1 Disable Source Routed Packet Acceptance (Scored) + - id: 6541 + title: "Ensure source routed packets are not accepted" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.1"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.accept_source_route -> r:^net.ipv4.conf.all.accept_source_route\s*=\s*0$' + - 'c:sysctl net.ipv4.conf.default.accept_source_route -> r:^net.ipv4.conf.default.accept_source_route\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.accept_source_route\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.accept_source_route /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.accept_source_route\s*=\s*0$' + +# 3.2.2 Disable ICMP Redirect Acceptance (Scored) + - id: 6542 + title: "Ensure ICMP redirects are not accepted" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.2"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.accept_redirects -> r:^net.ipv4.conf.all.accept_redirects\s*=\s*0$' + - 'c:sysctl net.ipv4.conf.default.accept_redirects -> r:^net.ipv4.conf.default.accept_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.accept_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.accept_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.accept_redirects\s*=\s*0$' + +# 3.2.3 Disable Secure ICMP Redirect Acceptance (Scored) + - id: 6543 + title: "Ensure secure ICMP redirects are not accepted" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.3"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.secure_redirects -> r:^net.ipv4.conf.all.secure_redirects\s*=\s*0$' + - 'c:sysctl net.ipv4.conf.default.secure_redirects -> r:^net.ipv4.conf.default.secure_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.secure_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.secure_redirects\s*=\s*0$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.secure_redirects /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.secure_redirects\s*=\s*0$' + + - id: 6544 + title: "Ensure suspicious packets are logged" + description: "When enabled, this feature logs packets with un-routable source addresses to the kernel log." + rationale: "Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system." + remediation: "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." + compliance: + - cis: ["3.2.4"] + - cis_csc: ["6"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.log_martians -> r:^net.ipv4.conf.all.log_martians\s*=\s*1$' + - 'c:sysctl net.ipv4.conf.default.log_martians -> r:^net.ipv4.conf.default.log_martians\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.log_martians /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.log_martians\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.log_martians /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.log_martians\s*=\s*1$' + +# 3.2.5 Enable Ignore Broadcast Requests (Scored) + - id: 6545 + title: "Ensure broadcast ICMP requests are ignored" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.5"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.icmp_ignore_bogus_error_responses -> r:^net.ipv4.icmp_ignore_bogus_error_responses\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.icmp_ignore_bogus_error_responses /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.icmp_ignore_bogus_error_responses\s*=\s*1$' + +# 3.2.6 Enable Bad Error Message Protection (Scored) + - id: 6546 + title: "Ensure bogus ICMP responses are ignored" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["3.2.6"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.icmp_ignore_bogus_error_responses -> r:^net.ipv4.icmp_ignore_bogus_error_responses\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.icmp_ignore_bogus_error_responses /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.icmp_ignore_bogus_error_responses\s*=\s*1$' + +# 3.2.7 Ensure Reverse Path Filtering is enabled (Scored) + - id: 6547 + title: "Ensure Reverse Path Filtering is enabled" + description: "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)." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.7"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:sysctl net.ipv4.conf.all.rp_filter -> r:^net.ipv4.conf.all.rp_filter\s*=\s*1$' + - 'c:sysctl net.ipv4.conf.default.rp_filter -> r:^net.ipv4.conf.default.rp_filter\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.all\.rp_filter /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.all.rp_filter\s*=\s*1$' + - 'c:grep -Rh net\.ipv4\.conf\.default\.rp_filter /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.conf.default.rp_filter\s*=\s*1$' + +# 3.2.8 Enable TCP SYN Cookies (Scored) + - id: 6548 + title: "Ensure TCP SYN Cookies is enabled" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.2.8"] + - cis_csc: ["3", "11"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'c:grep -Rh net\.ipv4\.tcp_syncookies /etc/sysctl.conf /etc/sysctl.d -> r:^net.ipv4.tcp_syncookies\s*=\s*1$' + - 'c:/sbin/sysctl net.ipv4.tcp_syncookies -> r:^net.ipv4.tcp_syncookies\s*=\s*1$' + +############################################### +# 5 System Access, Authentication and Authorization +############################################### +############################################### +# 5.2 Configure SSH +############################################### +# 5.2.2 Set SSH Protocol to 2 (Scored) + - id: 6549 + title: "Ensure SSH Protocol is set to 2" + description: "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." + rationale: "SSH v1 suffers from insecurities that do not affect SSH v2." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^\s*\t*# && r:Protocol\s*\t*2$' + +# 5.2.3 Set LogLevel to INFO (Scored) + - id: 6550 + title: "Ensure SSH LogLevel is set to INFO" + description: "The INFO parameter specifies that login and logout activity will be logged." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel INFO" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^\s*\t*# && r:LogLevel\s*\t*INFO' + +# 5.2.5 Set SSH MaxAuthTries to 4 or Less (Scored) + - id: 6551 + title: "Ensure SSH MaxAuthTries is set to 4 or less" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4" + compliance: + - cis: ["5.2.5"] + - cis_csc: ["16"] + - pci_dss: ["2.2.4"] + - nist_800_53: ["CM.1"] + condition: all + rules: + - 'f:$sshd_file -> !r:^\s*\t*# && n:^MaxAuthTries\s*\t*(\d+) compare <= 4' + +# 5.2.6 Set SSH IgnoreRhosts to Yes (Scored) + - id: 6552 + title: "Ensure SSH IgnoreRhosts is enabled" + description: "The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication." + rationale: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^\s*\t*# && r:IgnoreRhosts\s*\t*yes' + +# 5.2.7 Set SSH HostbasedAuthentication to No (Scored) + - id: 6553 + title: "Ensure SSH HostbasedAuthentication is disabled" + description: "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." + rationale: "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." + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^\s*\t*# && r:HostbasedAuthentication\s*\t*no' + +# 5.2.8 Disable SSH Root Login (Scored) + - id: 6554 + title: "Ensure SSH root login is disabled" + description: "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" + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^\s*\t*# && r:PermitRootLogin\s*\t*no' + +# 5.2.9 Set SSH PermitEmptyPasswords to No (Scored) + - id: 6555 + title: "Ensure SSH PermitEmptyPasswords is disabled" + description: "The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts with empty password strings." + rationale: "Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system" + remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" + compliance: + - 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"] + condition: all + rules: + - 'f:$sshd_file -> !r:^\s*\t*# && r:PermitEmptyPasswords\s*\t*no' + +############################################### +# 6 System Maintenance +############################################### +############################################### +# 6.2 Review User and Group Settings +############################################### +# 6.2.5 Verify No UID 0 Accounts Exist Other Than root (Scored) + - id: 6556 + title: "Ensure root is the only UID 0 account" + description: "Any account with UID 0 has superuser privileges on the system." + rationale: "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." + remediation: "Remove any users other than root with UID 0 or assign them a new UID if appropriate." + compliance: + - cis: ["6.2.5"] + - cis_csc: ["5.1"] + - pci_dss: ["10.2.5"] + - hipaa: ["164.312.b"] + - nist_800_53: ["AU.14", "AC.7"] + condition: none + rules: + - 'f:/etc/passwd -> !r:^\s*\t*# && !r:^\s*\t*root: && r:^\w+:\w+:0:' + + - id: 6557 + title: "Ensure password fields are not empty" + description: "An account with an empty password field means that anybody may log in as that user without providing a password." + rationale: "All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user." + remediation: "If any accounts in the /etc/shadow file do not have a password, run the following command to lock the account until it can be determined why it does not have a password: # passwd -l . Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off." + compliance: + - cis: ["6.2.1"] + - cis_csc: ["16"] + - pci_dss: ["10.2.5"] + - hipaa: ["164.312.b"] + - nist_800_53: ["AU.14", "AC.7"] + condition: none + rules: + - 'f:/etc/shadow -> r:^\w+::' diff --git a/sca/sles/12/cis_sles12_linux_rcl.yml b/sca/sles/12/cis_sles12_linux_rcl.yml deleted file mode 100644 index a50985e9b..000000000 --- a/sca/sles/12/cis_sles12_linux_rcl.yml +++ /dev/null @@ -1,814 +0,0 @@ -# Security Configuration assessment -# CIS Checks for SUSE SLES 12 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# CIS Benchmark for SUSE Linux Enterprise 12 v2.1.0 - 12-28-2017 - -policy: - id: "cis_sles12_linux" - file: "cis_sles12_linux_rcl.yml" - name: "CIS SUSE Linux Enterprise 12 Benchmark" - description: "This document provides prescriptive guidance for establishing a secure configuration posture for SUSE Linux Enterprise 12 systems running on x86 and x64 platforms. This document was tested against SUSE Linux Enterprise Server 12 SP3." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check Suse 12 version" - description: "Requirements for running the SCA scan against SUSE Linux Enterprise Server 12" - condition: "any required" - rules: - - 'f:/etc/os-release -> r:^PRETTY_NAME="SUSE Linux Enterprise Server 12";' - - 'f:/etc/os-release -> r:^PRETTY_NAME="SUSE Linux Enterprise Server 12 SP1";' - - 'f:/etc/os-release -> r:^PRETTY_NAME="SUSE Linux Enterprise Server 12 SP2";' - - 'f:/etc/os-release -> r:^PRETTY_NAME="SUSE Linux Enterprise Server 12 SP3";' - - 'f:/etc/os-release -> r:^PRETTY_NAME="SUSE Linux Enterprise Server 12 SP4";' - -variables: - $rc_dirs: /etc/rc.d/rc2.d,/etc/rc.d/rc3.d,/etc/rc.d/rc4.d,/etc/rc.d/rc5.d; - - -checks: -# Section 1.1 - Filesystem Configuration - - id: 7500 - title: "Ensure separate partition exists for /tmp" - description: "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.2" - references: - - https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> !r:/tmp;' - - id: 7501 - title: "Ensure nodev option set on /tmp partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "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" - compliance: - - cis: "1.1.3" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/tmp && r:nodev;' - - id: 7502 - title: "Ensure nosuid option set on /tmp partition" - description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." - rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /tmp." - remediation: "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" - compliance: - - cis: "1.1.4" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/tmp && r:nosuid;' - - id: 7503 - title: "Ensure noexec option set on /tmp partition" - description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." - rationale: "Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /tmp." - remediation: "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" - compliance: - - cis: "1.1.5" - - cis_csc: "2" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/tmp && r:noexec;' - - id: 7504 - title: "Ensure separate partition exists for /var" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.6" - references: - - https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/var;' - - id: 7505 - title: "Ensure separate partition exists for /var/log" - description: "The /var/log directory is used by system services to store log data." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.11" - - cis_csc: "6.3" - references: - - https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/var/log;' - - id: 7506 - title: "Ensure separate partition exists for /var/log/audit" - description: "The auditing daemon, auditd , stores log data in the /var/log/audit directory." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.12" - - cis_csc: "6.3" - references: - - https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/var/log/audit;' - - id: 7507 - title: "Ensure separate partition exists for /home" - description: "The /home directory is used to support disk storage needs of local users." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.13" - references: - - https://tldp.org/HOWTO/LVM-HOWTO/ - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/home;' - - id: 7508 - title: "Ensure nodev option set on /home partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "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." - compliance: - - cis: "1.1.14" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/home && r:nodev;' - - id: 7509 - title: "Ensure nodev option set on /dev/shm partition" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "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." - remediation: "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" - compliance: - - cis: "1.1.15" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:nodev;' - - id: 7510 - title: "Ensure nosuid option set on /dev/shm partition" - description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." - rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." - remediation: "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" - compliance: - - cis: "1.1.16" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:nosuid;' - - id: 7511 - title: "Ensure noexec option set on /dev/shm partition" - description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." - rationale: "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." - remediation: "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" - compliance: - - cis: "1.1.17" - - cis_csc: "2" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/dev/shm && r:noexec;' - - id: 7512 - title: "Ensure nodev option set on removable media partitions" - description: "The nodev mount option specifies that the filesystem cannot contain special devices." - rationale: "Removable media containing character and block special devices could be used to circumvent security controls by allowing non-root users to access sensitive device files such as /dev/kmem or the raw disk partitions." - remediation: "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." - compliance: - - cis: "1.1.18" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:nodev;' - - id: 7513 - title: "Ensure nosuid option set on removable media partitions" - description: "The nosuid mount option specifies that the filesystem cannot contain setuid files." - rationale: "Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." - remediation: "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." - compliance: - - cis: "1.1.19" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:nosuid;' - - id: 7514 - title: "Ensure noexec option set on removable media partitions" - description: "The noexec mount option specifies that the filesystem cannot contain executable binaries." - rationale: "Setting this option on a file system prevents users from executing programs from the removable media. This deters users from being able to introduce potentially malicious software on the system." - remediation: "Edit the /etc/fstab file and add noexec to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." - compliance: - - cis: "1.1.20" - - cis_csc: "8" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/fstab -> NIN !r:^# && r:/media && r:noexec;' -# Section 1.4 - Secure Boot Settings - - id: 7515 - title: "Ensure bootloader password is set" - description: "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" - rationale: "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)." - remediation: "Create an encrypted password with grub-mkpasswd-pbkdf2 : # grub2-mkpasswd-pbkdf2. The final message is 'Your PBKDF2 is '. Add the following into /etc/grub.d/01_users or a custom /etc/grub.d configuration file: cat <\" password_pbkdf2 EOF Run the following command to update the grub2 configuration: # grub2-mkconfig > /boot/grub2/grub.cfg Notes: This recommendation is designed around the grub bootloader, if LILO or another bootloader is in use in your environment enact equivalent settings." - compliance: - - cis: "1.4.2" - - cis_csc: "5.1" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/boot/grub2/grub.cfg -> NIN !r:^# && r:password;' -# Section 1.5 - Additional Process Hardening - - id: 7516 - title: "Ensure core dumps are restricted" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "1.5.1" - - cis_csc: "13" - condition: any - rules: - - 'f:/etc/security/limits.conf -> NIN !r:^# && r:hard\.+core\.+0;' - - id: 7517 - title: "Ensure address space layout randomization (ASLR) is enabled" - description: "Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process." - rationale: "Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting." - remediation: "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" - compliance: - - cis: "1.5.3" - - cis_csc: "8.4" - condition: any - rules: - - 'f:/proc/sys/kernel/randomize_va_space -> 2;' -# Section 2.1 - inetd Services - - id: 7518 - title: "Ensure chargen services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable chargen and chargen-udp : # chkconfig chargen off # chkconfig chargen-udp off" - compliance: - - cis: "2.1.1" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/chargen -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/chargen-udp -> IN !r:^# && r:disable && r:no;' - - id: 7519 - title: "Ensure daytime services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable daytime and daytime-udp: # chkconfig daytime off # chkconfig daytime-udp off" - compliance: - - cis: "2.1.2" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/daytime -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/daytime-udp -> IN !r:^# && r:disable && r:no;' - - id: 7520 - title: "Ensure discard services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable discard and discard-udp: # chkconfig discard off # chkconfig discard-udp off" - compliance: - - cis: "2.1.3" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/discard -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/discard-udp -> IN !r:^# && r:disable && r:no;' - - id: 7521 - title: "Ensure echo services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable echo and echo-udp: # chkconfig echo off # chkconfig echo-udp off" - compliance: - - cis: "2.1.4" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/echo -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/echo-udp -> IN !r:^# && r:disable && r:no;' - - id: 7522 - title: "Ensure time services are not enabled" - description: "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." - rationale: "Disabling this service will reduce the remote attack surface of the system." - remediation: "Run the following commands to disable time and time-udp: # chkconfig time off # chkconfig time-udp off" - compliance: - - cis: "2.1.5" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/etc/xinetd.d/time -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/time-udp -> IN !r:^# && r:disable && r:no;' - - id: 7523 - title: "Ensure rsh server is not enabled" - description: "The Berkeley rsh-server ( rsh , rlogin , rexec ) package contains legacy services that exchange credentials in clear-text." - rationale: "These legacy services contain numerous security exposures and have been replaced with the more secure SSH package." - remediation: "Run the following commands to disable rsh , rlogin , and rexec : # chkconfig rexec off # chkconfig rlogin off # chkconfig rsh off" - compliance: - - cis: "2.1.6" - - cis_csc: "3.4, 9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/rlogin -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/rsh -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/shell -> IN !r:^# && r:disable && r:no;' - - 'f:/usr/lib/systemd/system/rexec@.service -> r:ExecStart;' - - 'f:/usr/lib/systemd/system/rlogin@.service -> r:ExecStart;' - - 'f:/usr/lib/systemd/system/rsh@.service -> r:ExecStart;' - - id: 7524 - title: "Ensure talk server is not enabled" - description: "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." - rationale: "The software presents a security risk as it uses unencrypted protocols for communication." - remediation: "Run the following command to disable talk: # chkconfig talk off" - compliance: - - cis: "2.1.7" - - cis_csc: "9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/talk -> IN !r:^# && r:disable && r:no;' - - 'f:/usr/lib/systemd/system/ntalk.service -> r:Exec;' - - id: 7525 - title: "Ensure telnet server is not enabled" - description: "The telnet-server package contains the telnet daemon, which accepts connections from users from other systems via the telnet protocol." - rationale: "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." - remediation: "Run the following command to disable telnet: # chkconfig telnet off" - compliance: - - cis: "2.1.8" - - cis_csc: "3.4, 9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/telnet -> IN !r:^# && r:disable && r:no;' - - 'f:/usr/lib/systemd/system/telnet@.service -> r:ExecStart=-/usr/sbin/in.telnetd;' - - id: 7526 - title: "Ensure tftp server is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable tftp: # systemctl disable atftpd" - compliance: - - cis: "2.1.9, 2.2.17" - - cis_csc: "9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'f:/etc/xinetd.d/tftpd -> IN !r:^# && r:disable && r:no;' - - 'f:/usr/lib/systemd/system/tftp.service -> r:Exec;' - - id: 7527 - title: "Ensure rsync service is not enabled" - description: "The rsyncd service can be used to synchronize files between systems over network links." - rationale: "The rsyncd service presents a security risk as it uses unencrypted protocols for communication." - remediation: "Run the following command to disable rsyncd: # systemctl disable rsyncd" - compliance: - - cis: "2.1.10, 2.2.18" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\drsyncd$;' - - id: 7528 - title: "Ensure xinetd is not enabled" - description: "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." - rationale: "If there are no xinetd services required, it is recommended that the daemon be disabled." - remediation: "Run the following command to disable xinetd : # systemctl disable xinetd" - compliance: - - cis: "2.1.11" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/usr/lib/systemd/system/xinetd.service -> r:Exec;' -# Section 2.2 - Special Purpose Services - - id: 7529 - title: "Ensure ntp is configured" - description: "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." - rationale: "If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly." - remediation: "Add or edit restrict lines in /etc/ntp.conf to match the following: restrict -4 default kod limited nomodify notrap nopeer noquery restrict -6 default kod limited nomodify notrap nopeer noquery Add or edit server or pool lines to /etc/ntp.conf as appropriate: server Add or edit the NTPD_OPTIONS in /etc/sysconfig/ntp to include '-u ntp:ntp': NTPD_OPTIONS='-u ntp:ntp'" - compliance: - - cis: "2.2.1.2" - - cis_csc: "6.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/ntp.conf -> IN r:restrict default kod nomodify notrap nopeer noquery && r:^server;' - - 'f:/etc/sysconfig/ntpd -> r:OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid";' - - id: 7530 - title: "Ensure X Window System is not installed" - description: "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." - rationale: "Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface." - remediation: "Run the following command to remove the X Windows System packages: # zypper remove xorg-x11*" - compliance: - - cis: "2.2.2" - - cis_csc: "2" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/usr/lib/systemd/system/default.target -> r:Graphical;' - - 'p:gdm-x-session;' - - id: 7531 - title: "Ensure Avahi Server is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable avahi-daemon : # systemctl disable avahi-daemon" - compliance: - - cis: "2.2.3" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'p:avahi-daemon;' - - id: 7532 - title: "Ensure DHCP Server is not enabled" - description: "The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses." - rationale: "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." - remediation: "Run the following command to disable dhcpd : # systemctl disable dhcpd" - compliance: - - cis: "2.2.5" - - cis_csc: "9.1" - condition: any - rules: - - 'f:/usr/lib/systemd/system/dhcpd.service -> r:Exec;' - - id: 7533 - title: "Ensure NFS and RPC are not enabled" - description: "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." - rationale: "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." - remediation: "Run the following commands to disable nfs and rpcbind : # systemctl disable nfs # systemctl disable rpcbind" - compliance: - - cis: "2.2.7" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dnfs$;' - - 'd:$rc_dirs -> ^S\d\dnfslock$;' - - id: 7534 - title: "Ensure DNS Server is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable named : # systemctl disable named" - compliance: - - cis: "2.2.8" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dnamed$;' - - id: 7535 - title: "Ensure FTP Server is not enabled" - description: "The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files." - rationale: "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." - remediation: "Run the following command to disable vsftpd : # systemctl disable vsftpd Notes: Additional FTP servers also exist and should be audited." - compliance: - - cis: "2.2.9" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/xinetd.d/vsftpd -> IN !r:^# && r:disable && r:no;' - - id: 7536 - title: "Ensure HTTP server is not enabled" - description: "HTTP or web servers provide the ability to host web site content." - rationale: "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." - remediation: "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." - compliance: - - cis: "2.2.10" - - cis_csc: "9.1" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dapache2$;' - - id: 7537 - title: "Ensure IMAP and POP3 server is not enabled" - description: "dovecot is an open source IMAP and POP3 server for Linux based systems." - rationale: "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." - remediation: "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." - compliance: - - cis: "2.2.11" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'f:/etc/xinetd.d/cyrus-imapd -> IN !r:^# && r:disable && r:no;' - - 'f:/etc/xinetd.d/dovecot -> IN !r:^# && r:disable && r:no;' - - id: 7538 - title: "Ensure Samba is not enabled" - description: "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." - rationale: "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." - remediation: "Run the following command to disable smb : # systemctl disable smb" - compliance: - - cis: "2.2.12" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsamba$;' - - 'd:$rc_dirs -> ^S\d\dsmb$;' - - id: 7539 - title: "Ensure HTTP Proxy Server is not enabled" - description: "Squid is a standard proxy server used in many distributions and environments." - rationale: "If there is no need for a proxy server, it is recommended that the squid proxy be disabled to reduce the potential attack surface." - remediation: "Run the following command to disable squid : # systemctl disable squid Notes: Several HTTP proxy servers exist. These and other services should be checked." - compliance: - - cis: "2.2.13" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsquid$;' - - id: 7540 - title: "Ensure SNMP Server is not enabled" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "2.2.14" - - cis_csc: "9.1" - - pci_dss: "2.2.2" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dsnmpd$;' - - id: 7541 - title: "Ensure NIS Server is not enabled" - description: "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." - rationale: "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" - remediation: "Run the following command to disable ypserv : # systemctl disable ypserv" - compliance: - - cis: "2.2.16" - - cis_csc: "9.1" - - pci_dss: "2.2.3" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dypserv$;' - - 'f:/usr/lib/systemd/system/ypserv.service -> r:Exec;' -# Section 2.3 - Service Clients - - id: 7542 - title: "Ensure NIS Client is not installed" - description: "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." - rationale: "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." - remediation: "Run the following command to uninstall ypbind : # zypper remove ypbind" - compliance: - - cis: "2.3.1" - - cis_csc: "2" - - pci_dss: "2.2.3" - condition: any - rules: - - 'd:$rc_dirs -> ^S\d\dypbind$;' - - 'f:/usr/lib/systemd/system/ypbind.service -> r:Exec;' -# Section 3.1 - Network Parameters (Host Only) - - id: 7543 - title: "Ensure IPv4 forwarding is disabled" - description: "The net.ipv4.ip_forward flag is used to tell the system whether it can forward packets or not." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.1.1" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/ip_forward -> 1;' - - id: 7544 - title: "Ensure IPv6 forwarding is disabled" - description: "The net.ipv6.conf.all.forwarding flag is used to tell the system whether it can forward packets or not." - rationale: "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." - remediation: "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.forwarding = 0. Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.forwarding=0 # sysctl -w net.ipv6.route.flush=1" - compliance: - - cis: "3.1.1" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv6/ip_forward -> 1;' - - id: 7545 - title: "Ensure packet redirect sending is disabled" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.1.2" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/send_redirects -> 1;' - - 'f:/proc/sys/net/ipv4/conf/default/send_redirects -> 1;' -# Section 3.2 - Network Parameters (Host and Router) - - id: 7546 - title: "Ensure source routed packets are not accepted" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.2.1" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/accept_source_route -> 1;' - - id: 7547 - title: "Ensure ICMP redirects are not accepted" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.2.2" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/accept_redirects -> 1;' - - 'f:/proc/sys/net/ipv4/conf/default/accept_redirects -> 1;' - - id: 7548 - title: "Ensure secure ICMP redirects are not accepted" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.2.3" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/secure_redirects -> 1;' - - 'f:/proc/sys/net/ipv4/conf/default/secure_redirects -> 1;' - - id: 7549 - title: "nsure suspicious packets are logged" - description: "When enabled, this feature logs packets with un-routable source addresses to the kernel log." - rationale: "Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system." - remediation: "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." - compliance: - - cis: "3.2.4" - - cis_csc: "6" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/log_martians -> 0;' - - id: 7550 - title: "Ensure broadcast ICMP requests are ignored" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.2.5" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/icmp_echo_ignore_broadcasts -> 0;' - - id: 7551 - title: "Ensure bogus ICMP responses are ignored" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "3.2.6" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/icmp_ignore_bogus_error_responses -> 0;' - - id: 7552 - title: "Ensure Reverse Path Filtering is enabled" - description: "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)." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.2.7" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/conf/all/rp_filter -> 0;' - - 'f:/proc/sys/net/ipv4/conf/default/rp_filter -> 0;' - - id: 7553 - title: "Ensure TCP SYN Cookies is enabled" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.2.8" - - cis_csc: "3, 11" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/proc/sys/net/ipv4/tcp_syncookies -> 0;' -# Section 5.2 - SSH Server Configuration - - id: 7554 - title: "Ensure SSH Protocol is set to 2" - description: "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." - rationale: "SSH v1 suffers from insecurities that do not affect SSH v2." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" - compliance: - - cis: "5.2.2" - - cis_csc: "3.4" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:Protocol\.+1;' - - id: 7555 - title: "Ensure SSH LogLevel is set to INFO" - description: "The INFO parameter specifies that login and logout activity will be logged." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel INFO" - compliance: - - cis: "5.2.3" - - cis_csc: "16" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && !r:LogLevel\.+INFO;' - - id: 7556 - title: "Ensure SSH MaxAuthTries is set to 4 or less" - description: "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." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4" - compliance: - - cis: "5.2.5" - - cis_csc: "16" - - pci_dss: "2.2.4" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:MaxAuthTries && !r:3\s*$;' - - 'f:/etc/ssh/sshd_config -> r:^#\s*MaxAuthTries;' - - 'f:/etc/ssh/sshd_config -> !r:MaxAuthTries;' - - id: 7557 - title: "Ensure SSH IgnoreRhosts is enabled" - description: "The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication." - rationale: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" - compliance: - - cis: "5.2.6" - - cis_csc: "9" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:IgnoreRhosts\.+no;' - - id: 7558 - title: "Ensure SSH HostbasedAuthentication is disabled" - description: "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." - rationale: "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." - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" - compliance: - - cis: "5.2.7" - - cis_csc: "9" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:HostbasedAuthentication\.+yes;' - - id: 7559 - title: "Ensure SSH root login is disabled" - description: "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" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" - compliance: - - cis: "5.2.8" - - cis_csc: "5.8" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:PermitRootLogin\.+yes;' - - 'f:/etc/ssh/sshd_config -> r:^#\s*PermitRootLogin;' - - id: 7560 - title: "Ensure SSH PermitEmptyPasswords is disabled" - description: "The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts with empty password strings." - rationale: "Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system" - remediation: "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" - compliance: - - cis: "5.2.9" - - cis_csc: "16" - - pci_dss: "4.1" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:^PermitEmptyPasswords\.+yes;' - - 'f:/etc/ssh/sshd_config -> r:^#\s*PermitEmptyPasswords;' -# Section 6.2 - User and Group Settings - - id: 7561 - title: "Ensure password fields are not empty" - description: "An account with an empty password field means that anybody may log in as that user without providing a password." - rationale: "All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user." - remediation: "If any accounts in the /etc/shadow file do not have a password, run the following command to lock the account until it can be determined why it does not have a password: # passwd -l . Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off." - compliance: - - cis: "6.2.1" - - cis_csc: "16" - - pci_dss: "10.2.5" - condition: any - rules: - - 'f:/etc/shadow -> r:^\w+::;' - - id: 7562 - title: "Ensure root is the only UID 0 account" - description: "Any account with UID 0 has superuser privileges on the system." - rationale: "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." - remediation: "Remove any users other than root with UID 0 or assign them a new UID if appropriate." - compliance: - - cis: "6.2.5" - - cis_csc: "5.1" - - pci_dss: "10.2.5" - condition: any - rules: - - 'f:/etc/passwd -> IN !r:^# && !r:^root: && r:^\w+:\w+:0:;' diff --git a/sca/sunos/cis_solaris11.yml b/sca/sunos/cis_solaris11.yml new file mode 100644 index 000000000..d9825aa5f --- /dev/null +++ b/sca/sunos/cis_solaris11.yml @@ -0,0 +1,703 @@ +# Security Configuration Assessment +# CIS Checks for Oracle Solaris 11 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Benchmark for Oracle Solaris 11 Benchmark v1.1.0 - 09-30-2013 + +policy: + id: "cis_solaris11" + file: "cis_solaris11.yml" + name: "CIS benchmark for Oracle Solaris 11" + description: "This document, CIS Oracle Solaris 11 Benchmark v1.1.0, provides prescriptive guidance for establishing a secure configuration posture for Oracle Solaris 11 on both x86 and SPARC platforms. This guide was tested against Solaris 11 11/11 release, updated to the Software Repository Update 5 (SRU5). As of the publication of this document, Solaris 11 11/11 SRU5 is the latest available support update for the Solaris 11 OS. The recommendations included in this document may need to be adjusted for future Solaris 11 updates." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check Solaris version" + description: "Requirements for running the CIS benchmark against Solaris 11" + condition: all + rules: + - 'f:/etc/release -> r:^\s*Oracle\s+Solaris\s+11\p' + +checks: +# 2 Disable Unnecessary Services + - id: 7000 + title: "Disable Local-only Graphical Login Environment" + description: "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." + rationale: "This service should be disabled if it is not required." + remediation: "To disable this service, run the following command: # svcadm disable svc:/application/graphical-login/gdm:default" + compliance: + - cis: ["2.1"] + condition: all + rules: + - 'c:svcs -xv svc:/application/graphical-login/gdm:default -> r:State:\sdisabled|State:\s-$|match\sany\sinstances' + + - id: 7001 + title: "Configure sendmail Service for Local-Only Mode" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["2.2"] + condition: none + rules: + - 'c:netstat -an -> r:.25\s*\t*|:25\s*\t* && !r:127.0.0.1|::1' + + - id: 7002 + title: "Disable RPC Encryption Key" + description: "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.)" + rationale: "This service should be disabled if it is not required." + remediation: "To disable this service, run the following command: # svcadm disable svc:/network/rpc/keyserv" + compliance: + - cis: ["2.3"] + condition: all + rules: + - 'c:svcs -xv svc:/network/rpc/keyserv -> r:State:\sdisabled|State:\s-$|match\sany\sinstances' + + - id: 7003 + title: "Disable NIS Server Services" + description: "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." + rationale: "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." + remediation: "To disable this service, run the following commands: # svcadm disable svc:/network/nis/server # svcadm disable svc:/network/nis/domain" + compliance: + - cis: ["2.4"] + condition: all + rules: + - 'c:svcs -xv svc:/network/nis/server -> r:State:\sdisabled|State:\s-$|match\sany\sinstances' + - 'c:svcs -xv svc:/network/nis/domain -> r:State:\sdisabled|State:\s-$|match\sany\sinstances' + + - id: 7004 + title: "Disable NIS Client Services" + description: "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." + rationale: "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." + remediation: "To disable this service, run the following commands: # svcadm disable svc:/network/nis/client # svcadm disable svc:/network/nis/domain" + compliance: + - cis: ["2.5"] + condition: all + rules: + - 'c:svcs -xv svc:/network/nis/client -> r:State:\sdisabled|State:\s-$|match\sany\sinstances' + - 'c:svcs -xv svc:/network/nis/domain -> r:State:\sdisabled|State:\s-$|match\sany\sinstances' + + - id: 7005 + title: "Disable Kerberos TGT Expiration Warning" + description: "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." + rationale: "This service should be disabled if it is not required." + remediation: "To disable this service, run the following command: # svcadm disable svc:/network/security/ktkt_warn" + compliance: + - cis: ["2.6"] + condition: all + rules: + - 'c:svcs -xv svc:/network/security/ktkt_warn -> r:State:\sdisabled|State:\s-$|match\sany\sinstances' + + - id: 7006 + title: "Disable Generic Security Services (GSS)" + description: "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." + rationale: "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." + remediation: "To disable this service, run the following command: # svcadm disable svc:/network/rpc/gss" + compliance: + - cis: ["2.7"] + condition: all + rules: + - 'c:svcs -xv svc:/network/rpc/gss -> r:State:\sdisabled|State:\s-$|match\sany\sinstances' + + - id: 7007 + title: "Disable Removable Volume Manager" + description: "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." + rationale: "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." + remediation: "To disable this service, run the following commands: # svcadm disable svc:/system/filesystem/rmvolmgr # svcadm disable svc:/network/rpc/smserver" + compliance: + - cis: ["2.8"] + condition: all + rules: + - 'c:svcs -xv svc:/system/filesystem/rmvolmgr -> r:State:\sdisabled|State:\s-$|match\sany\sinstances' + - 'c:svcs -xv svc:/network/rpc/smserver -> r:State:\sdisabled|State:\s-$|match\sany\sinstances' + + - id: 7008 + title: "Disable automount Service" + description: "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." + rationale: "This service should be disabled if it is not required." + remediation: "To disable this service, run the following command: # svcadm disable svc:/system/filesystem/autofs" + compliance: + - cis: ["2.9"] + condition: all + rules: + - 'c:svcs -xv svc:/system/filesystem/autofs -> r:State:\sdisabled|State:\s-$|match\sany\sinstances' + + - id: 7009 + title: "Disable Apache Service" + description: "The Apache service provides an instance of the Apache web server." + rationale: "This service should be disabled if it is not required." + remediation: "To disable this service, run the following command: # svcadm disable svc:/network/http:apache22" + compliance: + - cis: ["2.10"] + references: + - https://httpd.apache.org/docs/2.0/misc/security_tips.html + condition: all + rules: + - 'c:svcs -xv svc:/network/http:apache22 -> r:State:\sdisabled|State:\s-$|match\sany\sinstances' + + - id: 7010 + title: "Disable Local-only RPC Port Mapping Service" + description: "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." + rationale: "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." + remediation: "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." + compliance: + - cis: ["2.11"] + condition: all + rules: + - 'c:svcs -xv svc:/network/rpc/bind -> r:State:\sdisabled|State:\s-$|match\sany\sinstances' + + - id: 7011 + title: "Configure TCP Wrappers" + description: "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." + rationale: "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." + remediation: "To enable TCP Wrappers, run the following commands: 1. Create and customize your policy in /etc/hosts.allow: # echo \"ALL: /, , ...\" > /etc/hosts.allow. Where each / 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." + compliance: + - cis: ["2.12"] + references: + - ipfilter(5) man page + condition: all + rules: + - 'c:inetadm -p -> r:tcp_wrappers=TRUE' + - 'f:/etc/hosts.allow' + - 'f:/etc/hosts.deny' + + - id: 7012 + title: "Disable Telnet Service" + description: "The telnet daemon, which accepts connections from users from other systems via the telnet protocol and can be used for remote shell access." + rationale: "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." + remediation: "Disable telnet server if enabled: # svcadm disable svc:/network/telnet" + compliance: + - cis: ["2.13"] + condition: all + rules: + - 'c:svcs -xv svc:/network/telnet -> r:State:\sdisabled|State:\s-$|match\sany\sinstances' + +# 3 Kernel Tuning + - id: 7013 + title: "Restrict Core Dumps to Protected Directory" + description: "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." + rationale: "Core dumps, particularly those from set-UID and set-GID processes, may contain sensitive data." + remediation: "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" + compliance: + - cis: ["3.1"] + condition: all + rules: + - 'c:coreadm' + - 'c:coreadm -> r:per-process core dumps: disabled' + - 'c:coreadm -> r:per-process setid core dumps: disabled' + - 'c:stat -c%u-%g-%a /var/cores -> r:^\d-\d-700' + + - id: 7014 + title: "Enable Stack Protection" + description: "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." + rationale: "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." + remediation: "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 <>/etc/system set noexec_user_stack=1 set noexec_user_stack_log=1 END_CFG fi" + compliance: + - cis: ["3.2"] + condition: all + rules: + - 'f:/etc/system' + - 'f:/etc/system -> r:\s*\t*noexec_user_stack\s*\t*=\s*\t*1' + - 'f:/etc/system -> r:\s*\t*noexec_user_stack_log\s*\t*=\s*\t*1' + + - id: 7015 + title: "Enable Strong TCP Sequence Number Generation" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["3.3"] + condition: all + rules: + - 'f:/etc/default/inetinit -> r:^TCP_STRONG_ISS\s*\t*=\s*\t*2' + - 'c:ipadm show-prop -p _strong_iss -co current tcp -> r:2' + +# 4 Auditing and Logging + - id: 7016 + title: "Create CIS Audit Class" + description: "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." + rationale: "To simplify administration, a CIS specific audit class should be created." + remediation: "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" + compliance: + - cis: ["4.1"] + condition: all + rules: + - 'f:/etc/security/audit_class -> 0x0100000000000000:cis:CIS Solaris Benchmark' + + - id: 7017 + title: "Enable Auditing of Incoming Network Connections" + description: "The Solaris Audit service can be configured to record incoming network connections to any listening service running on the system." + rationale: "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." + remediation: "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" + compliance: + - cis: ["4.2"] + condition: all + rules: + - 'f:/etc/security/audit_event -> r:^\d+:AUE_ACCEPT:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_CONNECT:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_SOCKACCEPT:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_SOCKCONNECT:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_inetd_connect:\.+cis\.*' + + - id: 7018 + title: "Enable Auditing of File Metadata Modification Events" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["4.3"] + condition: all + rules: + - 'f:/etc/security/audit_event -> r:^\d+:AUE_CHMOD:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_CHOWN:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_FCHOWN:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_FCHMOD:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_LCHOWN:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_ACLSET:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_FACLSET:\.+cis\.*' + + - id: 7019 + title: "Enable Auditing of Process and Privilege Events" + description: "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)." + rationale: "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." + remediation: "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" + compliance: + - cis: ["4.4"] + condition: all + rules: + - 'f:/etc/security/audit_event -> r:^\d+:AUE_CHROOT:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_SETREUID:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_SETREGID:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_FCHROOT:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_PFEXEC:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_SETUID:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_NICE:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_SETGID:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_PRIOCNTLSYS:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_SETEGID:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_SETEUID:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_SETPPRIV:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_SETSID:\.+cis\.*' + - 'f:/etc/security/audit_event -> r:^\d+:AUE_SETPGID:\.+cis\.*' + + - id: 7020 + title: "Configure Solaris Auditing" + description: "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)." + rationale: "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." + remediation: "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" + compliance: + - cis: ["4.5"] + condition: all + rules: + - 'c:auditconfig -getcond -> audit condition = auditing' + - 'c:auditconfig -getpolicy -> r:active audit policies = argv,cnt,zonename' + - 'c:auditconfig -getflags -> r:active user default audit flags = cis,ex,aa,ua,as,ss,lo,ft\(0x1000000800f1080,0x1000000800f1080\)' + - 'c:auditconfig -getnaflags -> r:active non-attributable audit flags = lo\(0x1000,0x1000\)' + - 'c:auditconfig -getplugin audit_binfile -> r:audit_binfile \(active\)' + - 'c:userattr audit_flags root -> r:lo,ad,ft,ex,cis:no' + - 'f:/var/spool/cron/crontabs/root -> r:/usr/sbin/audit -n' + +# 5 File/Directory Permissions/Access + - id: 7021 + title: "Default Service File Creation Mask" + description: "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." + rationale: "The default file creation mask should be set to 022 to avoid unnecessarily giving files write access to group or world." + remediation: "Perform the following to implement the recommended state: # svccfg -s svc:/system/environment:init setprop umask/umask = astring: \"022\"" + compliance: + - cis: ["5.1"] + condition: all + rules: + - 'c:svcprop -p umask/umask svc:/system/environment:init -> 022' + +# 6 System Access, Authentication, and Authorization + - id: 7022 + title: "Disable \"nobody\" Access for RPC Encryption Key Storage Service" + description: "This action listed prevents keyserv from using default keys for the nobody user, effectively stopping the nobody user from accessing information via Secure RPC." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.2"] + condition: all + rules: + - 'f:/etc/default/keyserv' + - 'f:/etc/default/keyserv -> !r:^# && r:ENABLE_NOBODY_KEYS\s*\t*=\s*\t*NO' + + - id: 7023 + title: "Disable X11 Forwarding for SSH" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.3"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:X11Forwarding\s+no' + + - id: 7024 + title: "Limit Consecutive Login Attempts for SSH" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.4"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && n:MaxAuthTries\s*\t*(\d+) compare <= 3' + + - id: 7025 + title: "Disable Rhost-based Authentication for SSH" + description: "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." + rationale: "Setting this parameter forces users to enter a password when authenticating with SSH." + remediation: "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." + compliance: + - cis: ["6.5"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:IgnoreRhosts\s+yes' + + - id: 7026 + title: "Disable root login for SSH" + description: "The PermitRootLogin value (in /etc/ssh/sshd_config) allows for direct root login by a remote user/application to resources on the local host." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.6"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:PermitRootLogin\s+no' + + - id: 7027 + title: "Blocking Authentication Using Empty/Null Passwords for SSH" + description: "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." + rationale: "Permitting login without a password is inherently risky." + remediation: "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" + compliance: + - cis: ["6.7"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:PermitEmptyPasswords\s+no' + + - id: 7028 + title: "Disable Host-based Authentication for Login-based Services" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.8"] + condition: all + rules: + - 'f:/etc/pam.conf -> r:^#\s*\t*rlogin && r:auth && r:sufficient && r:pam_rhosts_auth.so.1' + - 'f:/etc/pam.conf -> r:^#\s*\t*rsh && r:auth && r:sufficient && r:pam_rhosts_auth.so.1' + + - id: 7029 + title: "Set Delay between Failed Login Attempts to 4" + description: "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." + rationale: "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." + remediation: "Perform the following to implement the recommended state: # cd /etc/default # awk '/SLEEPTIME=/ { $1 = \"SLEEPTIME=4\" } { print }' login > login.CIS # mv login.CIS login" + compliance: + - cis: ["6.10"] + condition: all + rules: + - 'f:/etc/default/login -> !r:^# && n:^SLEEPTIME\s*\t*=\s*\t*(\d+) compare >= 4' + + - id: 7030 + title: "Remove Autologin Capabilities from the GNOME desktop" + description: "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." + rationale: "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)." + remediation: "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" + compliance: + - cis: ["6.11"] + condition: none + rules: + - 'f:/etc/pam.conf -> !r:^# && r:gdm-autologin' + + - id: 7031 + title: "Set Default Screen Lock for GNOME Users" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.12"] + condition: all + rules: + - 'f:/usr/share/X11/app-defaults/XScreensaver' + - 'f:/usr/share/X11/app-defaults/XScreensaver -> r:^*timeout:\s*\t*\d+:\d+:\d+' + - 'f:/usr/share/X11/app-defaults/XScreensaver -> r:^*locktimeout:\s*\t*\d+:\d+:\d+' + - 'f:/usr/share/X11/app-defaults/XScreensaver -> r:^*lock:\s*\t*true' + + - id: 7032 + title: "Restrict at/cron to Authorized Users" + description: "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." + rationale: "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)." + remediation: "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" + compliance: + - cis: ["6.13"] + condition: all + rules: + - 'not f:/etc/cron.d/cron.deny' + - 'not f:/etc/cron.d/at.deny' + - 'f:/etc/cron.d/cron.allow' + - 'f:/etc/cron.d/cron.allow -> r:^root$' + - 'f:/etc/cron.d/at.allow' + - 'c:wc -l /etc/cron.d/at.allow -> r:\s*0\s' + + - id: 7033 + title: "Restrict root Login to System Console" + description: "Privileged access to the system via root must be accountable to a particular user." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.14"] + condition: all + rules: + - 'f:/etc/default/login -> !r:^# && r:CONSOLE|console && r:=\s*\t*/dev/console' + + - id: 7034 + title: "Set Retry Limit for Account Lockout" + description: "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 ). 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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.15"] + condition: all + rules: + - 'f:/etc/default/login -> !r:^# && r:retries|RETRIES && n:=\s*\t*(\d+) compare <=3' + - 'f:/etc/security/policy.conf -> !r:^# && r:LOCK_AFTER_RETRIES|lock_after_retries && r:=\s*\t*yes' + + - id: 7035 + title: "Secure the GRUB Menu (Intel)" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["6.17"] + condition: all + rules: + - 'f:/rpool/boot/grub/menu.lst' + - 'f:/rpool/boot/grub/menu.lst -> r:^password\s*--md5' + +# 7 User Accounts and Environment + - id: 7036 + title: "Set Password Expiration Parameters on Active Accounts" + description: "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." + rationale: "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)." + remediation: "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 <> passwd.CIS MAXWEEKS=13 MINWEEKS=1 WARNWEEKS=4 EODefaults # mv passwd.CIS passwd" + compliance: + - cis: ["7.1"] + condition: all + rules: + - 'f:/etc/default/passwd -> !r:^# && r:maxweeks|MAXWEEKS && n:=\s*\t*(\d+) compare <= 13' + - 'f:/etc/default/passwd -> !r:^# && r:minweeks|MINWEEKS && n:=\s*\t*(\d+) compare == 1' + - 'f:/etc/default/passwd -> !r:^# && r:warnweeks|WARNWEEKS && n:=\s*\t*(\d+) compare == 4' + + - id: 7037 + title: "Set Strong Password Creation Policies" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["7.2"] + condition: all + rules: + - 'f:/etc/default/passwd -> !r:^# && r:passlength|PASSLENGTH && n:=\s*\t*(\d) compare <= 8' + - 'f:/etc/default/passwd -> !r:^# && r:namecheck|NAMECHECK && r:=\s*\t*yes' + - 'f:/etc/default/passwd -> !r:^# && r:history|HISTORY && n:=\s*\t*(\d+) compare >= 10' + - 'f:/etc/default/passwd -> !r:^# && r:mindiff|MINDIFF && n:=\s*\t*(\d+) compare >= 3' + - 'f:/etc/default/passwd -> !r:^# && r:minalpha|MINALPHA && n:=\s*\t*(\d+) compare >= 2' + - 'f:/etc/default/passwd -> !r:^# && r:minupper|MINUPPER && n:=\s*\t*(\d+) compare >= 1' + - 'f:/etc/default/passwd -> !r:^# && r:minlower|MINLOWER && n:=\s*\t*(\d+) compare >= 1' + - 'f:/etc/default/passwd -> !r:^# && r:minnonalpha|MINNONALPHA && n:=\s*\t*(\d+) compare >= 1' + - 'f:/etc/default/passwd -> !r:^# && r:maxrepeats|MAXREPEATS && r:=\s*\t*0' + - 'f:/etc/default/passwd -> !r:^# && r:whitespace|WHITESPACE && r:=\s*\t*yes' + - 'f:/etc/default/passwd -> !r:^# && r:dictiondbdir|DICTIONDBDIR && r:=\s*\t*/var/passwd' + - 'f:/etc/default/passwd -> !r:^# && r:dictionlist|DICTIONLIST && r:=\s*\t*/usr/share/lib/dict/words' + + - id: 7038 + title: "Set Default umask for users" + description: "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." + rationale: "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." + remediation: "Perform the following to implement the recommended state: # cd /etc/default # awk '/#UMASK=/ { $1 = \"UMASK=027\" } { print }' login > login.CIS # mv login.CIS login" + compliance: + - cis: ["7.3"] + condition: all + rules: + - 'f:/etc/default/login -> !r:^# && r:UMASK|umask && r:=\s*\t*027' + + - id: 7039 + title: "Set Default File Creation Mask for FTP Users" + description: "If FTP is permitted, set a strong, default file creation mask to apply to files created by the FTP server." + rationale: "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." + remediation: "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" + compliance: + - cis: ["7.4"] + condition: all + rules: + - 'f:/etc/proftpd.conf -> !r:^# && r:Umask && r:\s*\t*027' + + - id: 7040 + title: "Set \"mesg n\" as Default for All Users" + description: "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." + rationale: "Since write and talk are no longer widely used at most sites, the incremental security increase is worth the loss of functionality." + remediation: "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" + compliance: + - cis: ["7.5"] + condition: all + rules: + - 'f:/etc/.login -> r:^mesg\s*\t*n' + - 'f:/etc/profile -> r:^mesg\s*\t*n' + +# 8 Warning Banners + - id: 7041 + title: "Create Warnings for Standard Login Services" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["8.1"] + condition: all + rules: + - 'f:/etc/issue -> r:Authorized users only. All activity may be monitored and reported' + - 'f:/etc/motd -> r:Authorized users only. All activity may be monitored and reported' + - 'c:stat -c%u-%g-%a /etc/issue -> r:^0-0-644' + + - id: 7042 + title: "Enable a Warning Banner for the SSH Service" + description: "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." + remediation: "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" + compliance: + - cis: ["8.2"] + condition: all + rules: + - 'f:/etc/ssh/sshd_config -> !r:^# && r:Banner\s*/etc/issue' + + - id: 7043 + title: "Enable a Warning Banner for the GNOME Service" + description: "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." + rationale: "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." + remediation: "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" + compliance: + - cis: ["8.3"] + condition: all + rules: + - 'f:/etc/gdm/Init/Default' + - 'f:/etc/gdm/Init/Default -> r:^/usr/bin/zenity\s\.' + + - id: 7044 + title: "Enable a Warning Banner for the FTP service" + description: "The action for this item sets a warning message for FTP users before they log in." + rationale: "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." + remediation: "Perform the following to implement the recommended state: # echo \"DisplayConnect /etc/issue\" >> /etc/proftpd.conf # svcadm restart ftp" + compliance: + - cis: ["8.4"] + condition: all + rules: + - 'f:/etc/proftpd.conf -> !r:^# && r:DisplayConnect\s*\t*/etc/issue' + + - id: 7045 + title: "Check that the Banner Setting for telnet is Null" + description: "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." + rationale: "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." + remediation: "Perform the following to implement the recommended state: # cd /etc/default # awk '/^BANNER=/ { $1 = \"BANNER=\" }; { print }' telnetd > telnetd.CIS # mv telnetd.CIS telnetd" + compliance: + - cis: ["8.5"] + condition: none + rules: + - 'f:/etc/default/telnetd -> !r:^# && r:BANNER\s*\t*=\s*\t*\.' + +# 9 System Maintenance + - id: 7046 + title: "Verify System Account Default Passwords" + description: "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." + rationale: "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 accidentially or intentionally been enabled." + remediation: "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]" + compliance: + - cis: ["9.3"] + condition: none + rules: + - 'f:/etc/shadow -> r:^daemon: && !r::NL:|:NP:' + - 'f:/etc/shadow -> r:^lp: && !r::NL:|:NP:' + - 'f:/etc/shadow -> r:^adm: && !r::NL:|:NP:' + - 'f:/etc/shadow -> r:^bin: && !r::NL:|:NP:' + - 'f:/etc/shadow -> r:^gdm: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^noaccess: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^nobody: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^nobody4: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^openldap: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^unknown: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^webservd: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^mysql: && !r::NL:|:NP:' + - 'f:/etc/shadow -> r:^nuuc: && !r::NL:|:NP:' + - 'f:/etc/shadow -> r:^postgres: && !r::NL:|:NP:' + - 'f:/etc/shadow -> r:^smmsp: && !r::NL:|:NP:' + - 'f:/etc/shadow -> r:^sys: && !r::NL:|:NP:' + - 'f:/etc/shadow -> r:^uucp: && !r::NL:|:NP:' + - 'f:/etc/shadow -> r:^aiuser: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^dhcpserv: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^dladm: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^ftp: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^netadm: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^netcfg: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^pkg5srv: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^svctag: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^xvm: && !r::\p*LK\p*:' + - 'f:/etc/shadow -> r:^upnp: && !r::NL:|:NP:' + - 'f:/etc/shadow -> r:^zfssnap: && !r::NL:|:NP:' + + - id: 7047 + title: "Ensure Password Fields are Not Empty" + description: "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)." + rationale: "All accounts must have passwords, be configured as \"Non-login,\" or be locked." + remediation: "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." + compliance: + - cis: ["9.4"] + condition: none + rules: + - 'f:/etc/shadow -> r:^\w+::' + + - id: 7048 + title: "Verify No UID 0 Accounts Exist Other than root" + description: "Any account with UID 0 has superuser rights on the system." + rationale: "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." + remediation: "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." + compliance: + - cis: ["9.5"] + condition: none + rules: + - 'f:/etc/passwd -> !r:^# && !r:^\s*\t*root: && r:^\w+:\w+:0:' + + - id: 7049 + title: "Ensure root PATH Integrity" + description: "The root user can execute any command on the system and could be tricked into executing programs if the PATH is not set correctly." + rationale: "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." + remediation: "Correct or justify any items discovered in the Audit step." + compliance: + - cis: ["9.6"] + condition: none + rules: + - 'f:/etc/profile -> r::.' + - 'f:/root/.profile -> r::.' + - 'f:/root/.bashrc -> r::.' + - 'f:/etc/profile -> r:::' + - 'f:/root/.profile -> r:::' + - 'f:/root/.bashrc -> r:::' + - 'f:/etc/profile -> r::$' + - 'f:/root/.profile -> r::$' + - 'f:/root/.bashrc -> r::$' + + - id: 7050 + title: "Check That Users Are Assigned Home Directories" + description: "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." + rationale: "All users must be assigned a home directory in passwd(4)." + remediation: "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." + compliance: + - cis: ["9.12"] + condition: none + rules: + - 'f:/etc/passwd -> r:\w+:\.*:\d*:\d*:\.*::\.*' diff --git a/sca/sunos/cis_solaris11_rcl.yml b/sca/sunos/cis_solaris11_rcl.yml deleted file mode 100755 index d22aa892b..000000000 --- a/sca/sunos/cis_solaris11_rcl.yml +++ /dev/null @@ -1,758 +0,0 @@ -# Security Configuration assessment -# CIS Checks for Oracle Solaris 11 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# Center for Internet Security Benchmark for Oracle Solaris 11 Benchmark v1.1.0 - 09-30-2013 - -policy: - id: "cis_solaris11" - file: "cis_solaris11_rcl.yml" - name: "CIS benchmark for Oracle Solaris 11" - description: "This document, CIS Oracle Solaris 11 Benchmark v1.1.0, provides prescriptive guidance for establishing a secure configuration posture for Oracle Solaris 11 on both x86 and SPARC platforms. This guide was tested against Solaris 11 11/11 release, updated to the Software Repository Update 5 (SRU5). As of the publication of this document, Solaris 11 11/11 SRU5 is the latest available support update for the Solaris 11 OS. The recommendations included in this document may need to be adjusted for future Solaris 11 updates." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check Solaris version" - description: "Requirements for running the CIS benchmark against Solaris 11" - condition: "all required" - rules: - - 'f:/etc/release -> r:^\s*Oracle\s+Solaris\s+11\p;' - -variables: - $home_dirs: /usr2/home/*,/home/*,/home,/*/home/*,/*/home,/; - -checks: -# 2 Disable Unnecessary Services - - id: 11500 - title: "Disable Local-only Graphical Login Environment" - description: "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." - rationale: "This service should be disabled if it is not required." - remediation: "To disable this service, run the following command: # svcadm disable svc:/application/graphical-login/gdm:default" - compliance: - - cis: "2.1" - condition: any - rules: - - 'p:gdm;' - - 'p:cde;' - - id: 11501 - title: "Configure sendmail Service for Local-Only Mode" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "2.2" - condition: any - rules: - - 'f:!/etc/mail/local.cf;' - - id: 11502 - title: "Disable RPC Encryption Key" - description: "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.)" - rationale: "This service should be disabled if it is not required." - remediation: "To disable this service, run the following command: # svcadm disable svc:/network/rpc/keyserv" - compliance: - - cis: "2.3" - condition: any - rules: - - 'p:keyserv;' - - id: 11503 - title: "Disable NIS Server Services" - description: "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." - rationale: "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." - remediation: "To disable this service, run the following commands: # svcadm disable svc:/network/nis/server # svcadm disable svc:/network/nis/domain" - compliance: - - cis: "2.4" - condition: any - rules: - - 'p:ypserv;' - - 'p:ypbind;' - - 'p:ypxfr;' - - 'p:rpc.yppasswdd;' - - 'p:rpc.ypupdated;' - - 'f:/etc/init.d/nis;' - - id: 11504 - title: "Disable NIS Client Services" - description: "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." - rationale: "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." - remediation: "To disable this service, run the following commands: # svcadm disable svc:/network/nis/client # svcadm disable svc:/network/nis/domain" - compliance: - - cis: "2.5" - condition: any - rules: - - 'p:ypserv;' - - 'p:ypbind;' - - 'p:ypxfr;' - - 'p:rpc.yppasswdd;' - - 'p:rpc.ypupdated;' - - 'f:/etc/init.d/nis;' - - id: 11505 - title: "Disable Kerberos TGT Expiration Warning" - description: "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." - rationale: "This service should be disabled if it is not required." - remediation: "To disable this service, run the following command: # svcadm disable svc:/network/security/ktkt_warn" - compliance: - - cis: "2.6" - condition: any - rules: - - 'p:ktkt_warnd;' - - id: 11506 - title: "Disable Generic Security Services (GSS)" - description: "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." - rationale: "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." - remediation: "To disable this service, run the following command: # svcadm disable svc:/network/rpc/gss" - compliance: - - cis: "2.7" - condition: any - rules: - - 'p:gssd;' - - id: 11507 - title: "Disable Removable Volume Manager" - description: "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." - rationale: "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." - remediation: "To disable this service, run the following commands: # svcadm disable svc:/system/filesystem/rmvolmgr # svcadm disable svc:/network/rpc/smserver" - compliance: - - cis: "2.8" - condition: any - rules: - - 'p:smserverd;' - - id: 11508 - title: "Disable automount Service" - description: "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." - rationale: "This service should be disabled if it is not required." - remediation: "To disable this service, run the following command: # svcadm disable svc:/system/filesystem/autofs" - compliance: - - cis: "2.9" - condition: any - rules: - - 'p:automountd;' - - id: 11509 - title: "Disable Apache Service" - description: "The Apache service provides an instance of the Apache web server." - rationale: "This service should be disabled if it is not required." - remediation: "To disable this service, run the following command: # svcadm disable svc:/network/http:apache22" - compliance: - - cis: "2.10" - references: - - http://httpd.apache.org/docs/2.0/misc/security_tips.html - condition: any - rules: - - 'p:apache;' - - 'p:httpd;' - - id: 11510 - title: "Disable Local-only RPC Port Mapping Service" - description: "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." - rationale: "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." - remediation: "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." - compliance: - - cis: "2.11" - condition: any - rules: - - 'p:rpcbind;' - - id: 11511 - title: "Configure TCP Wrappers" - description: "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." - rationale: "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." - remediation: "To enable TCP Wrappers, run the following commands: 1. Create and customize your policy in /etc/hosts.allow: # echo \"ALL: /, , ...\" > /etc/hosts.allow where each / 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." - compliance: - - cis: "2.12" - references: - - ipfilter(5) man page - condition: any - rules: - - 'f:!/etc/hosts.allow;' - - 'f:!/etc/hosts.deny;' - - id: 11512 - title: "Disable Telnet Service" - description: "The telnet daemon, which accepts connections from users from other systems via the telnet protocol and can be used for remote shell access." - rationale: "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." - remediation: "Disable telnet server if enabled: # svcadm disable svc:/network/telnet" - compliance: - - cis: "2.13" - condition: any - rules: - - 'p:telnetd;' -# 3 Kernel Tuning - - id: 11513 - title: "Restrict Core Dumps to Protected Directory" - description: "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." - rationale: "Core dumps, particularly those from set-UID and set-GID processes, may contain sensitive data." - remediation: "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" - compliance: - - cis: "3.1" - condition: any - rules: - - 'f:/etc/coreadm.conf -> !r:^COREADM_GLOB_PATTERN\p\.+;' - - 'f:/etc/coreadm.conf -> !r:^COREADM_GLOB_CONTENT\pdefault;' - - 'f:/etc/coreadm.conf -> !r:^COREADM_INIT_PATTERN\pcore;' - - 'f:/etc/coreadm.conf -> !r:^COREADM_INIT_CONTENT\pdefault;' - - 'f:/etc/coreadm.conf -> !r:^COREADM_GLOB_ENABLED\pyes|^COREADM_GLOB_ENABLED\pno;' - - 'f:/etc/coreadm.conf -> !r:^COREADM_PROC_ENABLED\pno;' - - 'f:/etc/coreadm.conf -> !r:^COREADM_GLOB_SETID_ENABLED\pyes|^COREADM_GLOB_SETID_ENABLED\pno;' - - 'f:/etc/coreadm.conf -> !r:^COREADM_PROC_SETID_ENABLED\pno;' - - 'f:/etc/coreadm.conf -> !r:^COREADM_GLOB_LOG_ENABLED\pyes;' - - id: 11514 - title: "Enable Stack Protection" - description: "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." - rationale: "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." - remediation: "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 <>/etc/system set noexec_user_stack=1 set noexec_user_stack_log=1 END_CFG fi" - compliance: - - cis: "3.2" - condition: any - rules: - - 'f:!/etc/system;' - - 'f:/etc/system -> !r:^\s*\t*noexec_user_stack\p1;' - - 'f:/etc/system -> IN !r:^# && r:\s*\t*noexec_user_stack\p0;' - - 'f:/etc/system -> !r:^\s*\t*noexec_user_stack_log\p1;' - - 'f:/etc/system -> IN !r:^# && r:\s*\t*noexec_user_stack_log\p0;' - - id: 11515 - title: "Enable Strong TCP Sequence Number Generation" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "3.3" - condition: any - rules: - - 'f:/etc/default/inetinit -> !r:^TCP_STRONG_ISS\p2;' - - 'f:/etc/default/inetinit -> IN !r:^# && r:TCP_STRONG_ISS\p1;' -# 4 Auditing and Logging - - id: 11516 - title: "Create CIS Audit Class" - description: "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." - rationale: "To simplify administration, a CIS specific audit class should be created." - remediation: "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" - compliance: - - cis: "4.1" - condition: any - rules: - - 'f:/etc/security/audit_class -> !r:0x\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d:cis:\.+;' - - id: 11517 - title: "Enable Auditing of Incoming Network Connections" - description: "The Solaris Audit service can be configured to record incoming network connections to any listening service running on the system." - rationale: "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." - remediation: "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" - compliance: - - cis: "4.2" - condition: any - rules: - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_ACCEPT:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_CONNECT:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_SOCKACCEPT:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_SOCKCONNECT:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_inetd_connect:\.+cis\.*;' - - id: 11518 - title: "Enable Auditing of File Metadata Modification Events" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "4.3" - condition: any - rules: - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_CHMOD:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_CHOWN:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_FCHOWN:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_FCHMOD:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_LCHOWN:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_ACLSET:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_FACLSET:\.+cis\.*;' - - id: 11519 - title: "Enable Auditing of Process and Privilege Events" - description: "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)." - rationale: "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." - remediation: "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" - compliance: - - cis: "4.4" - condition: any - rules: - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_CHROOT:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_SETREUID:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_SETREGID:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_FCHROOT:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_PFEXEC:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_SETUID:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_NICE:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_SETGID:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_PRIOCNTLSYS:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_SETEGID:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_SETEUID:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_SETPRIV:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_SETSID:\.+cis\.*;' - - 'f:/etc/security/audit_event -> !r:^\d+:AUE_SETPGID:\.+cis\.*;' - - id: 11520 - title: "Configure Solaris Auditing" - description: "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)." - rationale: "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." - remediation: "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" - compliance: - - cis: "4.5" - condition: any - rules: - - 'd:/var/spool/cron/crontabs -> !r:/usr/sbin/audit -n;' -# 5 File/Directory Permissions/Access - - id: 11521 - title: "Default Service File Creation Mask" - description: "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." - rationale: "The default file creation mask should be set to 022 to avoid unnecessarily giving files write access to group or world." - remediation: "Perform the following to implement the recommended state: # svccfg -s svc:/system/environment:init setprop umask/umask = astring: \"022\"" - compliance: - - cis: "5.1" - condition: any - rules: - - 'f:/etc/profile -> !r:^umask\s*\d\d\d;' -# 6 System Access, Authentication, and Authorization - - id: 11522 - title: "Disable \"nobody\" Access for RPC Encryption Key Storage Service" - description: "This action listed prevents keyserv from using default keys for the nobody user, effectively stopping the nobody user from accessing information via Secure RPC." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.2" - condition: any - rules: - - 'f:/etc/default/keyserv -> !r:^ENABLE\.NOBODY\.KEYS\pNO;' - - 'f:/etc/default/keyserv -> IN !r:^# && r:ENABLE\.NOBODY\.KEYS\pYES;' - - id: 11523 - title: "Disable X11 Forwarding for SSH" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.3" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^X11Forwarding\s*no;' - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:X11Forwarding\s*yes;' - - id: 11524 - title: "Limit Consecutive Login Attempts for SSH" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.4" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^MaxAuthTries\s*3;' - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:MaxAuthTries\s*3\d+;' - - id: 11525 - title: "Disable Rhost-based Authentication for SSH" - description: "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." - rationale: "Setting this parameter forces users to enter a password when authenticating with SSH." - remediation: "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." - compliance: - - cis: "6.5" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^IgnoreRhosts\s*yes;' - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:IgnoreRhosts\s*no;' - - id: 11526 - title: "Disable root login for SSH" - description: "The PermitRootLogin value (in /etc/ssh/sshd_config) allows for direct root login by a remote user/application to resources on the local host." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.6" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^PermitRootLogin\s*no;' - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:PermitRootLogin\s*yes;' - - id: 11527 - title: "Blocking Authentication Using Empty/Null Passwords for SSH" - description: "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." - rationale: "Permitting login without a password is inherently risky." - remediation: "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" - compliance: - - cis: "6.7" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^PermitEmptyPasswords\s*no;' - - 'f:/etc/ssh/sshd_config -> IN !r:^# && r:PermitEmptyPasswords\s*yes;' - - id: 11528 - title: "Disable Host-based Authentication for Login-based Services" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.8" - condition: any - rules: - - 'f:/etc/pam.conf -> !r:^rlogin\s*\t*auth sufficient\s*\t*pam_rhosts_auth.so.1;' - - 'f:/etc/pam.conf -> !r:^rsh\s*\t*auth sufficient\s*\t*pam_rhosts_auth.so.1;' - - id: 11529 - title: "Restrict FTP Use" - description: "If FTP is permitted to be used on the system, the file /etc/ftpd/ftpusers is used to specify a list of users who are not allowed to access the system via FTP." - rationale: "FTP is an old and insecure protocol that transfers files and credentials in clear text and can be replaced by using sftp. However, if FTP is permitted for use in your environment, it is important to ensure that the default \"system\" accounts are not permitted to transfer files via FTP, especially the root role. Consider also adding the names of other privileged or shared accounts that may exist on your system such as user oracle and the account which your Web server process runs under. It should be reminded that the Solaris FTP service is disabled by default." - remediation: "Perform the following to implement the recommended state: # cd /etc/ftpd # for user in `logins -s | awk '{ print $1 }'` aiuser noaccess nobody nobody4; do $(echo $user >> ftpusers) done # sort -u ftpusers > ftpusers.CIS # mv ftpusers.CIS ftpusers If your site policy states that users have to be authorized to use FTP, consider placing all users in the /etc/ftpd/ftpusers file and then explicitly removing those who are permitted to use the service. To accomplish this, use the command: # getent passwd | cut -f1 -d\":\" > /etc/ftpd/ftpusers This prohibits any user on the system from using ftp unless they are explicitly removed from the file. Note that this file will need to be updated as users are added to or removed from the system." - compliance: - - cis: "6.9" - condition: any - rules: - - 'f:/etc/ftpd/ftpusers -> !r:^root;' - - 'f:/etc/ftpd/ftpusers -> !r:^daemon;' - - 'f:/etc/ftpd/ftpusers -> !r:^bin;' - - 'f:/etc/ftpd/ftpusers -> !r:^sys;' - - 'f:/etc/ftpd/ftpusers -> !r:^adm;' - - 'f:/etc/ftpd/ftpusers -> !r:^uucp;' - - 'f:/etc/ftpd/ftpusers -> !r:^nuucp;' - - 'f:/etc/ftpd/ftpusers -> !r:^smmsp;' - - 'f:/etc/ftpd/ftpusers -> !r:^listen;' - - 'f:/etc/ftpd/ftpusers -> !r:^gdm;' - - 'f:/etc/ftpd/ftpusers -> !r:^lp;' - - 'f:/etc/ftpd/ftpusers -> !r:^webservd;' - - 'f:/etc/ftpd/ftpusers -> !r:^postgres;' - - 'f:/etc/ftpd/ftpusers -> !r:^svctag;' - - 'f:/etc/ftpd/ftpusers -> !r:^openldap;' - - 'f:/etc/ftpd/ftpusers -> !r:^unknown;' - - 'f:/etc/ftpd/ftpusers -> !r:^aiuser;' - - 'f:/etc/ftpd/ftpusers -> !r:^nobody;' - - 'f:/etc/ftpd/ftpusers -> !r:^nobody4;' - - 'f:/etc/ftpd/ftpusers -> !r:^noaccess;' - - id: 11530 - title: "Set Delay between Failed Login Attempts to 4" - description: "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." - rationale: "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." - remediation: "Perform the following to implement the recommended state: # cd /etc/default # awk '/SLEEPTIME=/ { $1 = \"SLEEPTIME=4\" } { print }' login > login.CIS # mv login.CIS login" - compliance: - - cis: "6.10" - condition: any - rules: - - 'f:/etc/default/login -> !r:^SLEEPTIME\p4;' - - 'f:/etc/default/login -> NIN !r:^# && r:SLEEPTIME\p4\d;' - - id: 11531 - title: "Remove Autologin Capabilities from the GNOME desktop" - description: "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." - rationale: "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)." - remediation: "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" - compliance: - - cis: "6.11" - condition: any - rules: - - 'f:/etc/pam.conf -> IN !r:^# && r:gdm-autologin;' - - id: 11532 - title: "Set Default Screen Lock for GNOME Users" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.12" - condition: any - rules: - - 'f:/usr/share/X11/app-defaults/XScreensaver -> !r:^*timeout:\s*\t*0:10:00;' - - 'f:/usr/share/X11/app-defaults/XScreensaver -> !r:^*locktimeout:\s*\t*0:00:00;' - - 'f:/usr/share/X11/app-defaults/XScreensaver -> !r:^*lock:\s*\t*true;' - - id: 11533 - title: "Restrict at/cron to Authorized Users" - description: "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." - rationale: "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)." - remediation: "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" - compliance: - - cis: "6.13" - condition: any - rules: - - 'f:/etc/cron.d/cron.deny;' - - 'f:/etc/cron.d/at.deny;' - - 'f:!/etc/cron.d/cron.allow;' - - 'f:/etc/cron.d/cron.allow -> !r:^root$;' - - 'f:!/etc/cron.d/at.allow;' - - 'f:/etc/cron.d/at.allow -> IN !r:^# && r:\w;' - - id: 11534 - title: "Restrict root Login to System Console" - description: "Privileged access to the system via root must be accountable to a particular user." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.14" - condition: any - rules: - - 'f:/etc/default/login -> !r:^CONSOLE\p/dev/console;' - - id: 11535 - title: "Set Retry Limit for Account Lockout" - description: "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 ). 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." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.15" - condition: any - rules: - - 'f:/etc/default/login -> !r:^RETRIES\p3;' - - 'f:/etc/default/login -> NIN !r:^# && r:RETRIES\p3\d;' - - 'f:/etc/security/policy.conf -> !r:^LOCK_AFTER_RETRIES\pyes;' - - 'f:/etc/security/policy.conf -> NIN !r:^# && r:LOCK_AFTER_RETRIES\pno;' - - id: 11536 - title: "Secure the GRUB Menu (Intel)" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "6.17" - condition: any - rules: - - 'f:/rpool/boot/grub/menu.lst -> !r:^password\s*--md5;' -# 7 User Accounts and Environment - - id: 11537 - title: "Set Password Expiration Parameters on Active Accounts" - description: "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." - rationale: "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)." - remediation: "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 <> passwd.CIS MAXWEEKS=13 MINWEEKS=1 WARNWEEKS=4 EODefaults # mv passwd.CIS passwd" - compliance: - - cis: "7.1" - condition: any - rules: - - 'f:/etc/default/passwd -> !r:^maxweeks\p13;' - - 'f:/etc/default/passwd -> IN !r:^# && r:maxweeks\p13\d;' - - 'f:/etc/default/passwd -> !r:^minweeks\p1;' - - 'f:/etc/default/passwd -> IN !r:^# && r:minweeks\p1\d;' - - 'f:/etc/default/passwd -> !r:^warnweeks\p4;' - - 'f:/etc/default/passwd -> IN !r:^# && r:warnweeks\p4\d;' - - id: 11538 - title: "Set Strong Password Creation Policies" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "7.2" - condition: any - rules: - - 'f:/etc/default/passwd -> !r:^passlength\p8;' - - 'f:/etc/default/passwd -> IN !r:^# && r:passlength\p8\d;' - - 'f:/etc/default/passwd -> !r:^namecheck\pyes;' - - 'f:/etc/default/passwd -> IN !r:^# && r:namecheck\pno;' - - 'f:/etc/default/passwd -> !r:^history\p10;' - - 'f:/etc/default/passwd -> IN !r:^# && r:history\p10\d;' - - 'f:/etc/default/passwd -> !r:^mindiff\p3;' - - 'f:/etc/default/passwd -> IN !r:^# && r:mindiff\p3\d;' - - 'f:/etc/default/passwd -> !r:^minalpha\p2;' - - 'f:/etc/default/passwd -> IN !r:^# && r:minalpha\p2\d;' - - 'f:/etc/default/passwd -> !r:^minupper\p1;' - - 'f:/etc/default/passwd -> IN !r:^# && r:minupper\p1\d;' - - 'f:/etc/default/passwd -> !r:^minlower\p1;' - - 'f:/etc/default/passwd -> IN !r:^# && r:minlower\p1\d;' - - 'f:/etc/default/passwd -> !r:^minnonalpha\p1;' - - 'f:/etc/default/passwd -> IN !r:^# && r:minnonalpha\p1\d;' - - 'f:/etc/default/passwd -> !r:^maxrepeats\p0;' - - 'f:/etc/default/passwd -> IN !r:^# && r:maxrepeats\p0\d;' - - 'f:/etc/default/passwd -> !r:^whitespace\pyes;' - - 'f:/etc/default/passwd -> IN !r:^# && r:whitespace\pno;' - - 'f:/etc/default/passwd -> !r:^dictiondbdir\p/var/passwd;' - - 'f:/etc/default/passwd -> !r:^dictionlist\p/usr/share/lib/dict/words;' - - id: 11539 - title: "Set Default umask for users" - description: "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." - rationale: "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." - remediation: "Perform the following to implement the recommended state: # cd /etc/default # awk '/#UMASK=/ { $1 = \"UMASK=027\" } { print }' login > login.CIS # mv login.CIS login" - compliance: - - cis: "7.3" - condition: any - rules: - - 'f:/etc/default/login -> !r:^umask\p027|^umask\p077;' - - 'f:/etc/default/login -> IN !r:^# && r:umask\p026;' - - 'f:/etc/default/login -> IN !r:^# && r:umask\p022;' - - id: 11540 - title: "Set Default File Creation Mask for FTP Users" - description: "If FTP is permitted, set a strong, default file creation mask to apply to files created by the FTP server." - rationale: "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." - remediation: "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" - compliance: - - cis: "7.4" - condition: any - rules: - - 'f:/etc/proftpd.conf -> !r:^umask\s*027;' - - 'f:/etc/proftpd.conf -> IN !r:^# && r:umask\s*026;' - - 'f:/etc/proftpd.conf -> IN !r:^# && r:umask\s*022;' - - id: 11541 - title: "Set \"mesg n\" as Default for All Users" - description: "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." - rationale: "Since write and talk are no longer widely used at most sites, the incremental security increase is worth the loss of functionality." - remediation: "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" - compliance: - - cis: "7.5" - condition: any - rules: - - 'f:/etc/.login -> !r:^mesg\s*n;' - - 'f:/etc/profile -> !r:^mesg\s*n;' -# 8 Warning Banners - - id: 11542 - title: "Create Warnings for Standard Login Services" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "8.1" - condition: any - rules: - - 'f:/etc/issue -> r:SunOS;' - - 'f:/etc/issue -> r:Oracle;' - - 'f:/etc/issue -> r:solaris;' - - 'f:/etc/issue -> !r:Authorized users only. All activity may be monitored and reported;' - - 'f:/etc/motd -> r:SunOS;' - - 'f:/etc/motd -> r:Oracle;' - - 'f:/etc/motd -> r:solaris;' - - 'f:/etc/motd -> !r:Authorized users only. All activity may be monitored and reported;' - - id: 11543 - title: "Enable a Warning Banner for the SSH Service" - description: "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." - remediation: "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" - compliance: - - cis: "8.2" - condition: any - rules: - - 'f:/etc/ssh/sshd_config -> !r:^Banner\s*/etc/issue;' - - id: 11544 - title: "Enable a Warning Banner for the GNOME Service" - description: "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." - rationale: "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." - remediation: "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" - compliance: - - cis: "8.3" - condition: any - rules: - - 'f:/etc/gdm/Init/Default -> !r:^/usr/bin/zenity\s\.;' - - id: 11545 - title: "Enable a Warning Banner for the FTP service" - description: "The action for this item sets a warning message for FTP users before they log in." - rationale: "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." - remediation: "Perform the following to implement the recommended state: # echo \"DisplayConnect /etc/issue\" >> /etc/proftpd.conf # svcadm restart ftp" - compliance: - - cis: "8.4" - condition: any - rules: - - 'f:/etc/proftpd.conf -> !r:^DisplayConnect\s+/etc/issue;' - - id: 11546 - title: "Check that the Banner Setting for telnet is Null" - description: "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." - rationale: "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." - remediation: "Perform the following to implement the recommended state: # cd /etc/default # awk '/^BANNER=/ { $1 = \"BANNER=\" }; { print }' telnetd > telnetd.CIS # mv telnetd.CIS telnetd" - compliance: - - cis: "8.5" - condition: any - rules: - - 'f:/etc/default/telnetd -> IN !r:^# && r:BANNER=\.;' - - 'f:/etc/default/telnetd -> !r:BANNER=$;' -# 9 System Maintenance - - id: 11547 - title: "Verify System Account Default Passwords" - description: "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." - rationale: "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 accidentially or intentionally been enabled." - remediation: "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]" - compliance: - - cis: "9.3" - condition: any - rules: - - 'f:/etc/shadow -> IN r:daemon && !r::NL:|:NP:;' - - 'f:/etc/shadow -> IN r:lp && !r::NL:|:NP:;' - - 'f:/etc/shadow -> IN r:adm && !r::NL:|:NP:;' - - 'f:/etc/shadow -> IN r:bin && !r::NL:|:NP:;' - - 'f:/etc/shadow -> IN r:gdm && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:noaccess && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:nobody && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:nobody4 && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:openldap && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:unknown && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:webservd && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:mysql && !r::NL:|:NP:;' - - 'f:/etc/shadow -> IN r:nuuc && !r::NL:|:NP:;' - - 'f:/etc/shadow -> IN r:postgres && !r::NL:|:NP:;' - - 'f:/etc/shadow -> IN r:smmsp && !r::NL:|:NP:;' - - 'f:/etc/shadow -> IN r:sys && !r::NL:|:NP:;' - - 'f:/etc/shadow -> IN r:uucp && !r::NL:|:NP:;' - - 'f:/etc/shadow -> IN r:aiuser && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:dhcpserv && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:dladm && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:ftp && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:netadm && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:netcfg && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:pkg5srv && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:svctag && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:xvm && !r::\p*LK\p*:;' - - 'f:/etc/shadow -> IN r:upnp && !r::NL:|:NP:;' - - 'f:/etc/shadow -> IN r:zfssnap && !r::NL:|:NP:;' - - id: 11548 - title: "Ensure Password Fields are Not Empty" - description: "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)." - rationale: "All accounts must have passwords, be configured as \"Non-login,\" or be locked." - remediation: "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." - compliance: - - cis: "9.4" - condition: any - rules: - - 'f:/etc/shadow -> r:\.+::\.+\w+\.*$;' - - id: 11549 - title: "Verify No UID 0 Accounts Exist Other than root" - description: "Any account with UID 0 has superuser rights on the system." - rationale: "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." - remediation: "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." - compliance: - - cis: "9.5" - condition: any - rules: - - 'f:/etc/passwd -> IN !r:^root && r::\.:0:\.*;' - - id: 11550 - title: "Ensure root PATH Integrity" - description: "The root user can execute any command on the system and could be tricked into executing programs if the PATH is not set correctly." - rationale: "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." - remediation: "Correct or justify any items discovered in the Audit step." - compliance: - - cis: "9.6" - condition: any - rules: - - 'f:/etc/profile -> r:.;' - - 'f:/etc/environment -> r:.;' - - 'f:/.profile -> r:.;' - - 'f:/.bash_profile -> r:.;' - - 'f:/.bashrc -> r:.;' - - 'f:/etc/profile -> r:::;' - - 'f:/etc/environment -> r:::;' - - 'f:/.profile -> r:::;' - - 'f:/.bash_profile -> r:::;' - - 'f:/.bashrc -> r:::;' - - 'f:/etc/profile -> r::$;' - - 'f:/etc/environment -> r::$;' - - 'f:/.profile -> r::$;' - - 'f:/.bash_profile -> r::$;' - - 'f:/.bashrc -> r::$;' - - id: 11551 - title: "Check for Presence of User .rhosts Files" - description: "While no .rhosts files are shipped with Solaris, users can easily create them." - rationale: "This action is only meaningful if .rhosts support is permitted in the file /etc/pam.conf. Even though the .rhosts files are ineffective if support is disabled in /etc/pam.conf, they may have been brought over from other systems and could contain information useful to an attacker for those other systems." - remediation: "Correct or justify any items discovered in the Audit step. Determine if any user .rhosts files are present in user directories and work with those users to determine the best course of action in accordance with site policy." - compliance: - - cis: "9.10" - condition: any - rules: - - 'd:$home_dirs -> ^.rhosts$;' - - id: 11552 - title: "Check That Users Are Assigned Home Directories" - description: "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." - rationale: "All users must be assigned a home directory in passwd(4)." - remediation: "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." - compliance: - - cis: "9.12" - condition: any - rules: - - 'f:/etc/passwd -> r:\w+:\.*:\d*:\d*:\.*:\S+:\.*;' - - id: 11553 - title: "Check for Presence of User .netrc Files" - description: "The .netrc file contains data for logging into a remote host for file transfers via FTP." - rationale: "The .netrc file presents a significant security risk since it stores passwords in unencrypted form." - remediation: "Correct or justify any items discovered in the Audit step. Determine if any .netrc files exist, and work with the owner to determine the best course of action in accordance with site policy." - compliance: - - cis: "9.20" - condition: any - rules: - - 'd:$home_dirs -> ^.netrc$;' - - id: 11554 - title: "Check for Presence of User .forward Files" - description: "The .forward file specifies an email address to which a user's mail is forwarded." - rationale: "Use of the .forward file poses a security risk in that sensitive data may be inadvertently transferred outside the organization. The .forward file also poses a secondary risk as it can be used to execute commands that may perform unintended actions." - remediation: "Correct or justify any items discovered in the Audit step. Determine if any .forward files exist, and work with the owner to determine the best course of action in accordance with site policy." - compliance: - - cis: "9.21" - condition: any - rules: - - 'd:$home_dirs -> ^.forward$;' diff --git a/sca/windows/acsc_office2016_rcl.yml b/sca/windows/acsc_office2016_rcl.yml deleted file mode 100755 index 51b5f8820..000000000 --- a/sca/windows/acsc_office2016_rcl.yml +++ /dev/null @@ -1,647 +0,0 @@ -# Security Configuration assessment -# Checks for Microsoft Office 2016 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on -# Australian Cyber Security Centre Hardening Microsoft Office Guide - May 2018 (https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf) -# Center for Internet Security Microsoft Office 2016 v1.1.0 - 11-30-2016 - -policy: - id: "acsc_office2016" - file: "acsc_office2016_rcl.yml" - name: "System audit for Office 2016 vulnerabilities" - description: "Guidance for establishing a secure configuration for Office 2016 vulnerabilities." - references: - - https://www.cisecurity.org/cis-benchmarks/ - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - -requirements: - title: "Check that the installed Office is version 2016" - description: "Requirements for running the CIS benchmark against Office 2016" - condition: "any required" - rules: - - 'r:HKLM\Software\Microsoft\Office\16.0\Word\InstallRoot::Path;' - -checks: -# ACSC - Attack Surface Reduction - - id: 10000 - title: "Ensure Attack Surface Reduction is set to 'Enabled'" - description: "Attack Surface Reduction (ASR)2is a new security feature introduced in Microsoft Windows 10, version 1709 as partof Windows Defender Exploit Guard. It is designed to combat the threat of malware exploiting legitimate functionality in Microsoft Office applications. In order to use ASR, Windows Defender Antivirus must be configured as the primary real-time antivirus scanning engine on workstations." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR -> ExploitGuard_ASR_Rules -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR -> !ExploitGuard_ASR_Rules;' - - id: 10001 - title: "Ensure 'Block executable content from email client and webmail' is set to 'Enabled'" - description: "Attack Surface Reduction (ASR)2is a new security feature introduced in Microsoft Windows 10, version 1709 as partof Windows Defender Exploit Guard. It is designed to combat the threat of malware exploiting legitimate functionality in Microsoft Office applications. In order to use ASR, Windows Defender Antivirus must be configured as the primary real-time antivirus scanning engine on workstations." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550 -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> !BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550;' - - id: 10002 - title: "Ensure 'block Office applications from creating child processes' is set to 'Enabled'" - description: "Attack Surface Reduction (ASR)2is a new security feature introduced in Microsoft Windows 10, version 1709 as partof Windows Defender Exploit Guard. It is designed to combat the threat of malware exploiting legitimate functionality in Microsoft Office applications. In order to use ASR, Windows Defender Antivirus must be configured as the primary real-time antivirus scanning engine on workstations." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> D4F940AB-401B-4EFC-AADC-AD5F3C50688A -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> !D4F940AB-401B-4EFC-AADC-AD5F3C50688A;' - - id: 10003 - title: "Ensure 'block Office applications from creating executable content' is set to 'Enabled'" - description: "Attack Surface Reduction (ASR)2is a new security feature introduced in Microsoft Windows 10, version 1709 as partof Windows Defender Exploit Guard. It is designed to combat the threat of malware exploiting legitimate functionality in Microsoft Office applications. In order to use ASR, Windows Defender Antivirus must be configured as the primary real-time antivirus scanning engine on workstations." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> 3B576869-A4EC-4529-8536-B80A7769E899 -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> !3B576869-A4EC-4529-8536-B80A7769E899;' - - id: 10004 - title: "Ensure 'block Office applications from injecting code into other processes' is set to 'Enabled'" - description: "Attack Surface Reduction (ASR)2is a new security feature introduced in Microsoft Windows 10, version 1709 as partof Windows Defender Exploit Guard. It is designed to combat the threat of malware exploiting legitimate functionality in Microsoft Office applications. In order to use ASR, Windows Defender Antivirus must be configured as the primary real-time antivirus scanning engine on workstations." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> 75668C1F-73B5-4CF0-BB93-3ECF5CB7CC84 -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> !75668C1F-73B5-4CF0-BB93-3ECF5CB7CC84;' - - id: 10005 - title: "Ensure 'block JavaScript and VBScript from launching downloaded executable content' is set to 'Enabled'" - description: "Attack Surface Reduction (ASR)2is a new security feature introduced in Microsoft Windows 10, version 1709 as partof Windows Defender Exploit Guard. It is designed to combat the threat of malware exploiting legitimate functionality in Microsoft Office applications. In order to use ASR, Windows Defender Antivirus must be configured as the primary real-time antivirus scanning engine on workstations." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> D3E037E1-3EB8-44C8-A917-57927947596D -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> !D3E037E1-3EB8-44C8-A917-57927947596D;' - - id: 10006 - title: "Ensure 'block execution of potentially obfuscated scripts' is set to 'Enabled'" - description: "Attack Surface Reduction (ASR)2is a new security feature introduced in Microsoft Windows 10, version 1709 as partof Windows Defender Exploit Guard. It is designed to combat the threat of malware exploiting legitimate functionality in Microsoft Office applications. In order to use ASR, Windows Defender Antivirus must be configured as the primary real-time antivirus scanning engine on workstations." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> 5BEB7EFE-FD9A-4556-801D-275E5FFC04CC -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> !5BEB7EFE-FD9A-4556-801D-275E5FFC04CC;' - - id: 10007 - title: "Ensure 'block Win32 API calls from Office macro' is set to 'Enabled'" - description: "Attack Surface Reduction (ASR)2is a new security feature introduced in Microsoft Windows 10, version 1709 as partof Windows Defender Exploit Guard. It is designed to combat the threat of malware exploiting legitimate functionality in Microsoft Office applications. In order to use ASR, Windows Defender Antivirus must be configured as the primary real-time antivirus scanning engine on workstations." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> 92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> !92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B;' -# ACSC - Active X - - id: 10008 - title: "Ensure 'Disable All Active X' is set to 'Enabled'" - description: "While ActiveX controls can be used for legitimate business purposes to provide additional functionality for Microsoft Office, they can also be used by an adversary to gain unauthorised access to sensitive information or to execute malicious code. To reduce this risk, ActiveX controls should be disabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\common\security -> disableallactivex -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\common\security -> !disableallactivex;' -# ACSC - Add-ins - - id: 10009 - title: "Ensure 'Block all unmanaged add-ins' is set to 'Enabled' for Excel" - description: "While add-ins can be used for legitimate business purposes to provide additional functionality for Microsoft Office, they can also be used by an adversary to gain unauthorised access to sensitive information or to execute malicious code. To reduce this risk, add-in use should be managed." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\resiliency -> restricttolist -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\resiliency -> !restricttolist;' - - id: 10010 - title: "Ensure 'List of managed add-ins' is set to 'Enabled' for Excel" - description: "While add-ins can be used for legitimate business purposes to provide additional functionality for Microsoft Office, they can also be used by an adversary to gain unauthorised access to sensitive information or to execute malicious code. To reduce this risk, add-in use should be managed." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\resiliency\addinlist -> policyon -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\resiliency\addinlist -> !policyon;' - - id: 10011 - title: "Ensure 'Block all unmanaged add-ins' is set to 'Enabled' for PowerPoint" - description: "While add-ins can be used for legitimate business purposes to provide additional functionality for Microsoft Office, they can also be used by an adversary to gain unauthorised access to sensitive information or to execute malicious code. To reduce this risk, add-in use should be managed." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\resiliency -> restricttolist -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\resiliency -> !restricttolist;' - - id: 10012 - title: "Ensure 'List of managed add-ins' is set to 'Enabled' for PowerPoint" - description: "While add-ins can be used for legitimate business purposes to provide additional functionality for Microsoft Office, they can also be used by an adversary to gain unauthorised access to sensitive information or to execute malicious code. To reduce this risk, add-in use should be managed." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\resiliency\addinlist -> policyon -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\resiliency\addinlist -> !policyon;' - - id: 10013 - title: "Ensure 'Block all unmanaged add-ins' is set to 'Enabled' for Word" - description: "While add-ins can be used for legitimate business purposes to provide additional functionality for Microsoft Office, they can also be used by an adversary to gain unauthorised access to sensitive information or to execute malicious code. To reduce this risk, add-in use should be managed." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\resiliency -> restricttolist -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\resiliency -> !restricttolist;' - - id: 10014 - title: "Ensure 'List of managed add-ins' is set to 'Enabled' for Word" - description: "While add-ins can be used for legitimate business purposes to provide additional functionality for Microsoft Office, they can also be used by an adversary to gain unauthorised access to sensitive information or to execute malicious code. To reduce this risk, add-in use should be managed." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\resiliency\addinlist -> policyon -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\resiliency\addinlist -> !policyon;' -# ACSC - Extension Hardening - - id: 10015 - title: "Ensure if Extension Hardening functionality in Microsoft Excel is enabled" - description: "Extension Hardening mitigates a number of scenarios whereby an adversary would deceive users into opening malicious Microsoft Excel files. By default, users will be warned when file content or MIME type doesn’t match the file extension;however, users can still allow such files to open. As such, it is important that only Microsoft Excel files that pass integrity checks are allowed to be opened. To reduce this risk, Extension Hardening functionality should be enabled for Microsoft Excel." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security -> extensionhardening -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security -> !extensionhardening;' -# ACSC - File Type Blocking - - id: 10016 - title: "Ensure dBase III / IV files are blocked in Microsoft Excel" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> dbasefiles -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> !dbasefiles;' - - id: 10017 - title: "Ensure Dif and Sylk files are blocked in Microsoft Excel" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> difandsylkfiles -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> !difandsylkfiles;' - - id: 10018 - title: "Ensure Excel 2 macrosheets and add-in files are blocked in Microsoft Excel" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> xl2macros -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> !xl2macros;' - - id: 10019 - title: "Ensure Excel 2 worksheets are blocked in Microsoft Excel" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> xl2worksheets -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> !xl2worksheets;' - - id: 10020 - title: "Ensure Excel 3 macrosheets and add-in files are blocked in Microsoft Excel" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> xl3macros -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> !xl3macros;' - - id: 10021 - title: "Ensure Excel 3 worksheets and add-in files are blocked in Microsoft Excel" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> xl3worksheets -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> !xl3worksheets;' - - id: 10022 - title: "Ensure Excel 4 macrosheets and add-in files are blocked in Microsoft Excel" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> xl4macros -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> !xl4macros;' - - id: 10023 - title: "Ensure Excel 4 workbooks are blocked in Microsoft Excel" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> xl4workbooks -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> !xl4workbooks;' - - id: 10024 - title: "Ensure Excel 4 worksheets are blocked in Microsoft Excel" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> xl4worksheets -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> !xl4worksheets;' - - id: 10025 - title: "Ensure Excel 95 workbooks are blocked in Microsoft Excel" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> xl95workbooks -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> !xl95workbooks;' - - id: 10026 - title: "Ensure Excel 95-97 workbooks and templates are blocked in Microsoft Excel" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> xl9597workbooksandtemplates -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> !xl9597workbooksandtemplates;' - - id: 10027 - title: "Ensure Set default file block behavior is set to 'Enabled' (Blocked files are not opened) in Microsoft Excel" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> openinprotectedview -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> !openinprotectedview;' - - id: 10028 - title: "Ensure Web pages and Excel 2003 XML spreadsheets are blocked in Microsoft Excel" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> htmlandxmlssfiles -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\fileblock -> !htmlandxmlssfiles;' -# CIS 2.22 - Office Converters - - id: 10029 - title: "Ensure 'Block Opening of Pre-Release Versions of File Formats New to PowerPoint Through the Compatibility Pack for Office and PowerPoint Converter' is set to Enabled" - description: "This policy setting controls whether users with the Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint File Formats installed can open Office Open XML files saved with pre-release versions of PowerPoint. PowerPoint Open XML files usually have the following extensions: .pptx, .pptm, .potx, .potm, .ppsx, .ppsm, .ppam, .thmx, .xml. The recommended state for this setting is: Enabled." - rationale: "The Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint File Formats enables users of Microsoft PowerPoint 2000, PowerPoint 2002, and Office PowerPoint 2003 to open files saved in the Office Open XML format used by PowerPoint. PowerPoint Open XML files usually have the following extensions: .pptx, .pptm, .potx, .potm, .ppsx, .ppsm, .ppam, .thmx, .xml. By default, the Compatibility Pack does not open files that were saved in pre-release versions of the new Office Open XML format, which underwent some minor changes prior to the final release of PowerPoint. If this configuration is changed through a registry modification or by some other mechanism, users with the Compatibility Pack installed can open files saved by some pre-release versions of PowerPoint, but not by others, which can lead to inconsistent file opening functionality." - remediation: "To implement the recommended configuration state, set the following Group Policy setting to Enabled. User Configuration\\Administrative Templates\\Microsoft Office 2016\\Office 2016 Converters\\Block Opening of Pre-Release Versions of File Formats New to PowerPoint 2016 Through the Compatibility Pack for Office 2013 and PowerPoint 2016 Converter" - compliance: - - cis: "2.22.1" - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\fileblock -> powerpoint12betafilesfromconverters -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\fileblock -> !powerpoint12betafilesfromconverters;' -# ACSC - File Type Blocking (Cont'd) - - id: 10030 - title: "Ensure Set default file block behavior is set to 'Enabled' (Blocked files are not opened) in Microsoft Powerpoint" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\fileblock -> openinprotectedview -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\fileblock -> !openinprotectedview;' - - id: 10031 - title: "Ensure Set default file block behavior is set to 'Enabled' (Blocked files are not opened) in Microsoft Word" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\fileblock -> openinprotectedview -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\fileblock -> !openinprotectedview;' - - id: 10032 - title: "Ensure Word 2 and earlier binary documents and templates are blocked in Microsoft Word" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\fileblock -> word2files -> !2;' - - id: 10033 - title: "Ensure Word 6.0 binary documents and templates are blocked in Microsoft Word" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\fileblock -> word60files -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\fileblock -> !word60files;' - - id: 10034 - title: "Ensure Word 95 binary documents and templates are blocked in Microsoft Word" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\fileblock -> word95files -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\fileblock -> !word95files;' - - id: 10035 - title: "Ensure Word 97 binary documents and templates are blocked in Microsoft Word" - description: "File Type Blocking can be used to block insecure file types such as legacy, binary and beta file types from opening in Microsoft Office. By failing to block such file types, an adversary can exploit vulnerabilities in these file types to execute malicious code on workstations. To reduce this risk, insecure file types should be prevented from opening in Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\fileblock -> word97files -> !2;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\fileblock -> !word97files;' -# ACSC - Hidden Markup - - id: 10036 - title: "Ensure Make hidden markup visible is set to 'Enabled' in Microsoft PowerPoint" - description: "To assist users in collaborating on the development of Microsoft Office files, Microsoft Office allows users to track changes relating to insertions, deletions and formatting of content, as well as providing the ability to make comments. Users may choose to either view or hide these markups. If markup content is hidden, users may be unaware that sensitive changes or comments may still be included when Microsoft Office files are distributed to external parties or released into the public domain. To reduce this risk, users should be made aware of hidden markup in Microsoft Office files." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\options -> markupopensave -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\options -> !markupopensave;' - - id: 10037 - title: "Ensure Make hidden markup visible is set to 'Enabled' in Microsoft Word" - description: "To assist users in collaborating on the development of Microsoft Office files, Microsoft Office allows users to track changes relating to insertions, deletions and formatting of content, as well as providing the ability to make comments. Users may choose to either view or hide these markups. If markup content is hidden, users may be unaware that sensitive changes or comments may still be included when Microsoft Office files are distributed to external parties or released into the public domain. To reduce this risk, users should be made aware of hidden markup in Microsoft Office files." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\options -> showmarkupopensave -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\options -> !showmarkupopensave;' -# ACSC - Office File Validation - - id: 10038 - title: "Ensure Turn off error reporting for files that fail file validation is set to 'Enabled' in Microsoft Office" - description: "Office File Validation (OFV) checks that the format of a Microsoft Office file conforms to an expected standard. By default, Microsoft Office files that fail OFV checking will be opened in Protected View, with users given the option to enable editing. Alternatively, OFV can be configured to open Microsoft Office files in Protected View in an enforced read-only state or simply block them from opening. If Microsoft Office is configured to disable OFV, users may be unaware that they are opening a Microsoft Office file that may be malicious in nature. To reduce this risk, OFV functionality should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common\security\filevalidation -> disablereporting -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common\security\filevalidation -> !disablereporting;' - - id: 10039 - title: "Ensure Turn off file validation ins set to 'Disabled' in Microsoft Excel" - description: "Office File Validation (OFV) checks that the format of a Microsoft Office file conforms to an expected standard. By default, Microsoft Office files that fail OFV checking will be opened in Protected View, with users given the option to enable editing. Alternatively, OFV can be configured to open Microsoft Office files in Protected View in an enforced read-only state or simply block them from opening. If Microsoft Office is configured to disable OFV, users may be unaware that they are opening a Microsoft Office file that may be malicious in nature. To reduce this risk, OFV functionality should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\filevalidation -> enableonload -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\filevalidation -> !enableonload;' - - id: 10040 - title: "Ensure Turn off file validation ins set to 'Disabled' in Microsoft PowerPoint" - description: "Office File Validation (OFV) checks that the format of a Microsoft Office file conforms to an expected standard. By default, Microsoft Office files that fail OFV checking will be opened in Protected View, with users given the option to enable editing. Alternatively, OFV can be configured to open Microsoft Office files in Protected View in an enforced read-only state or simply block them from opening. If Microsoft Office is configured to disable OFV, users may be unaware that they are opening a Microsoft Office file that may be malicious in nature. To reduce this risk, OFV functionality should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\filevalidation -> enableonload -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\filevalidation -> !enableonload;' - - id: 10041 - title: "Ensure Turn off file validation ins set to 'Disabled' in Microsoft Word" - description: "Office File Validation (OFV) checks that the format of a Microsoft Office file conforms to an expected standard. By default, Microsoft Office files that fail OFV checking will be opened in Protected View, with users given the option to enable editing. Alternatively, OFV can be configured to open Microsoft Office files in Protected View in an enforced read-only state or simply block them from opening. If Microsoft Office is configured to disable OFV, users may be unaware that they are opening a Microsoft Office file that may be malicious in nature. To reduce this risk, OFV functionality should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\filevalidation -> enableonload -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\filevalidation -> !enableonload;' -# ACSC - Protected View - - id: 10042 - title: "Ensure Do not open files from the Internet zone in Protected View is set to 'Disabled' in Microsoft Excel" - description: "Protected View can be used to open Microsoft Office files from untrusted locations in a sandboxed environment. By default, Protected View is enabled for Microsoft Office files that have been downloaded from the Internet, opened from a defined unsafe location or opened as an attachment from Microsoft Outlook. However, organisations can choose to disable Protected View for any or all of these scenarios. If so, an adversary could exploit any of these avenues to deliver a malicious Microsoft Office file to a user’s workstation. To reduce this risk, Protected View should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\protectedview -> disableinternetfilesinpv -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\protectedview -> !disableinternetfilesinpv;' - - id: 10043 - title: "Ensure Do not open files in unsafe locations in Protected View is set to 'Disabled' in Microsoft Excel" - description: "Protected View can be used to open Microsoft Office files from untrusted locations in a sandboxed environment. By default, Protected View is enabled for Microsoft Office files that have been downloaded from the Internet, opened from a defined unsafe location or opened as an attachment from Microsoft Outlook. However, organisations can choose to disable Protected View for any or all of these scenarios. If so, an adversary could exploit any of these avenues to deliver a malicious Microsoft Office file to a user’s workstation. To reduce this risk, Protected View should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\protectedview -> disableunsafelocationsinpv -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\protectedview -> !disableunsafelocationsinpv;' - - id: 10044 - title: "Ensure Set document behaviour if file validation fails is set to 'Enabled' (Block files) in Microsoft Excel" - description: "Protected View can be used to open Microsoft Office files from untrusted locations in a sandboxed environment. By default, Protected View is enabled for Microsoft Office files that have been downloaded from the Internet, opened from a defined unsafe location or opened as an attachment from Microsoft Outlook. However, organisations can choose to disable Protected View for any or all of these scenarios. If so, an adversary could exploit any of these avenues to deliver a malicious Microsoft Office file to a user’s workstation. To reduce this risk, Protected View should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\filevalidation -> openinprotectedview -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\filevalidation -> !openinprotectedview;' - - id: 10045 - title: "Ensure Turn off Protected View for attachments opened from Outlook is set to 'Disabled' in Microsoft Excel" - description: "Protected View can be used to open Microsoft Office files from untrusted locations in a sandboxed environment. By default, Protected View is enabled for Microsoft Office files that have been downloaded from the Internet, opened from a defined unsafe location or opened as an attachment from Microsoft Outlook. However, organisations can choose to disable Protected View for any or all of these scenarios. If so, an adversary could exploit any of these avenues to deliver a malicious Microsoft Office file to a user’s workstation. To reduce this risk, Protected View should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\protectedview -> disableattachmentsinpv -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\protectedview -> !disableattachmentsinpv;' - - id: 10046 - title: "Ensure Do not open files from the Internet zone in Protected View is set to 'Disabled' in Microsoft PowerPoint" - description: "Protected View can be used to open Microsoft Office files from untrusted locations in a sandboxed environment. By default, Protected View is enabled for Microsoft Office files that have been downloaded from the Internet, opened from a defined unsafe location or opened as an attachment from Microsoft Outlook. However, organisations can choose to disable Protected View for any or all of these scenarios. If so, an adversary could exploit any of these avenues to deliver a malicious Microsoft Office file to a user’s workstation. To reduce this risk, Protected View should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\protectedview -> disableinternetfilesinpv -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\protectedview -> !disableinternetfilesinpv;' - - id: 10047 - title: "Ensure Do not open files in unsafe locations in Protected View is set to 'Disabled' in Microsoft PowerPoint" - description: "Protected View can be used to open Microsoft Office files from untrusted locations in a sandboxed environment. By default, Protected View is enabled for Microsoft Office files that have been downloaded from the Internet, opened from a defined unsafe location or opened as an attachment from Microsoft Outlook. However, organisations can choose to disable Protected View for any or all of these scenarios. If so, an adversary could exploit any of these avenues to deliver a malicious Microsoft Office file to a user’s workstation. To reduce this risk, Protected View should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\protectedview -> disableunsafelocationsinpv -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\protectedview -> !disableunsafelocationsinpv;' - - id: 10048 - title: "Ensure Set document behaviour if file validation fails is set to 'Enabled' (Block files) in Microsoft PowerPoint" - description: "Protected View can be used to open Microsoft Office files from untrusted locations in a sandboxed environment. By default, Protected View is enabled for Microsoft Office files that have been downloaded from the Internet, opened from a defined unsafe location or opened as an attachment from Microsoft Outlook. However, organisations can choose to disable Protected View for any or all of these scenarios. If so, an adversary could exploit any of these avenues to deliver a malicious Microsoft Office file to a user’s workstation. To reduce this risk, Protected View should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\filevalidation -> openinprotectedview -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\filevalidation -> !openinprotectedview;' - - id: 10049 - title: "Ensure Turn off Protected View for attachments opened from Outlook is set to 'Disabled' in Microsoft PowerPoint" - description: "Protected View can be used to open Microsoft Office files from untrusted locations in a sandboxed environment. By default, Protected View is enabled for Microsoft Office files that have been downloaded from the Internet, opened from a defined unsafe location or opened as an attachment from Microsoft Outlook. However, organisations can choose to disable Protected View for any or all of these scenarios. If so, an adversary could exploit any of these avenues to deliver a malicious Microsoft Office file to a user’s workstation. To reduce this risk, Protected View should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\protectedview -> disableattachmentsinpv -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\protectedview -> !disableattachmentsinpv;' - - id: 10050 - title: "Ensure Do not open files from the Internet zone in Protected View is set to 'Disabled' in Microsoft Word" - description: "Protected View can be used to open Microsoft Office files from untrusted locations in a sandboxed environment. By default, Protected View is enabled for Microsoft Office files that have been downloaded from the Internet, opened from a defined unsafe location or opened as an attachment from Microsoft Outlook. However, organisations can choose to disable Protected View for any or all of these scenarios. If so, an adversary could exploit any of these avenues to deliver a malicious Microsoft Office file to a user’s workstation. To reduce this risk, Protected View should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\protectedview -> disableinternetfilesinpv -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\protectedview -> disableinternetfilesinpv;' - - id: 10051 - title: "Ensure Do not open files in unsafe locations in Protected View is set to 'Disabled' in Microsoft Word" - description: "Protected View can be used to open Microsoft Office files from untrusted locations in a sandboxed environment. By default, Protected View is enabled for Microsoft Office files that have been downloaded from the Internet, opened from a defined unsafe location or opened as an attachment from Microsoft Outlook. However, organisations can choose to disable Protected View for any or all of these scenarios. If so, an adversary could exploit any of these avenues to deliver a malicious Microsoft Office file to a user’s workstation. To reduce this risk, Protected View should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\protectedview -> disableunsafelocationsinpv -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\protectedview -> !disableunsafelocationsinpv;' - - id: 10052 - title: "Ensure Set document behaviour if file validation fails is set to 'Enable' (Block files) in Microsoft Word" - description: "Protected View can be used to open Microsoft Office files from untrusted locations in a sandboxed environment. By default, Protected View is enabled for Microsoft Office files that have been downloaded from the Internet, opened from a defined unsafe location or opened as an attachment from Microsoft Outlook. However, organisations can choose to disable Protected View for any or all of these scenarios. If so, an adversary could exploit any of these avenues to deliver a malicious Microsoft Office file to a user’s workstation. To reduce this risk, Protected View should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\filevalidation -> openinprotectedview -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\filevalidation -> !openinprotectedview;' - - id: 10053 - title: "Ensure Turn off Protected View for attachments opened from Outlook is set to 'Disabled' in Microsoft Word" - description: "Protected View can be used to open Microsoft Office files from untrusted locations in a sandboxed environment. By default, Protected View is enabled for Microsoft Office files that have been downloaded from the Internet, opened from a defined unsafe location or opened as an attachment from Microsoft Outlook. However, organisations can choose to disable Protected View for any or all of these scenarios. If so, an adversary could exploit any of these avenues to deliver a malicious Microsoft Office file to a user’s workstation. To reduce this risk, Protected View should be enabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\protectedview -> disableattachmentsinpv -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\protectedview -> !disableattachmentsinpv;' -# ACSC - Trusted Documents - - id: 10054 - title: "Ensure Turn off trusted documents is set to 'Enabled' in Microsoft Excel" - description: "Macros, ActiveX controls and other active content in trusted documents are assumed to be safe by Microsoft Office. An adversary can exploit this trust by modifying trusted documents to contain malicious code. To reduce this risk, trusted documents should be disabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\trusted documents -> disabletrusteddocuments -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\trusted documents -> !disabletrusteddocuments;' - - id: 10055 - title: "Ensure Turn off Trusted Documents on the network is set to 'Enabled' in Microsoft Excel" - description: "Macros, ActiveX controls and other active content in trusted documents are assumed to be safe by Microsoft Office. An adversary can exploit this trust by modifying trusted documents to contain malicious code. To reduce this risk, trusted documents should be disabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\trusted documents -> disablenetworktrusteddocuments -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\trusted documents -> !disablenetworktrusteddocuments;' - - id: 10056 - title: "Ensure Turn off trusted documents is set to 'Enabled' in Microsoft Powerpoint" - description: "Macros, ActiveX controls and other active content in trusted documents are assumed to be safe by Microsoft Office. An adversary can exploit this trust by modifying trusted documents to contain malicious code. To reduce this risk, trusted documents should be disabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\trusted documents -> disabletrusteddocuments -> disabletrusteddocuments -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\trusted documents -> disabletrusteddocuments -> !disabletrusteddocuments;' - - id: 10057 - title: "Ensure Turn off Trusted Documents on the network is set to 'Enabled' in Microsoft Powerpoint" - description: "Macros, ActiveX controls and other active content in trusted documents are assumed to be safe by Microsoft Office. An adversary can exploit this trust by modifying trusted documents to contain malicious code. To reduce this risk, trusted documents should be disabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\trusted documents -> disabletrusteddocuments -> disablenetworktrusteddocuments -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\powerpoint\security\trusted documents -> disabletrusteddocuments -> !disablenetworktrusteddocuments;' - - id: 10058 - title: "Ensure Turn off trusted documents is set to 'Enabled' in Microsoft Word" - description: "Macros, ActiveX controls and other active content in trusted documents are assumed to be safe by Microsoft Office. An adversary can exploit this trust by modifying trusted documents to contain malicious code. To reduce this risk, trusted documents should be disabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\trusted documents -> disabletrusteddocuments -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\trusted documents -> !disabletrusteddocuments;' - - id: 10059 - title: "Ensure Turn off Trusted Documents on the network is set to 'Enabled' in Microsoft Word" - description: "Macros, ActiveX controls and other active content in trusted documents are assumed to be safe by Microsoft Office. An adversary can exploit this trust by modifying trusted documents to contain malicious code. To reduce this risk, trusted documents should be disabled for Microsoft Office." - references: - - https://acsc.gov.au/publications/protect/Hardening_MS_Office_2016.pdf - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\trusted documents -> disablenetworktrusteddocuments -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\trusted documents -> !disablenetworktrusteddocuments;' -# CIS 2.24 - Privacy - - id: 10060 - title: "Ensure 'Disable Opt-in Wizard on First Run' is set to Enabled" - description: "This policy setting controls whether users see the Opt-in Wizard the first time they run a Microsoft Office application. The recommended state for this setting is: Enabled." - rationale: "By default, the Opt-in Wizard displays the first time users run a Microsoft Office application, which allows them to opt into Internet-based services that will help improve their Office experience, such as Microsoft Update, the Customer Experience Improvement Program, Office Diagnostics, and Online Help. If your organization has policies that govern the use of such external resources, allowing users to opt in to these services might cause them to violate the policies." - remediation: "To implement the recommended configuration state, set the following Group Policy setting to Enabled. User Configuration\\Administrative Templates\\Microsoft Office 2016\\Privacy\\Trust Center\\Disable Opt-in Wizard on First Run" - compliance: - - cis: "2.24.1.1" - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common\general -> shownfirstrunoptin -> !1;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common\general -> !shownfirstrunoptin;' - - id: 10061 - title: "Ensure 'Enable Customer Experience Improvement Program' is set to Disabled" - description: "This policy setting controls whether users can participate in the Microsoft Office Customer Experience Improvement Program to help improve Microsoft Office. When users choose to participate in the Customer Experience Improvement Program (CEIP), Office applications automatically send information to Microsoft about how the applications are used. This information is combined with other CEIP data to help Microsoft solve problems and to improve the products and features customers use most often. This feature does not collect users' names, addresses, or any other identifying information except the IP address that is used to send the data. The recommended state for this setting is: Disabled" - rationale: "When users choose to participate in the Customer Experience Improvement Program (CEIP), Office applications automatically send information to Microsoft about how the applications are used. This information is combined with other CEIP data to help Microsoft solve problems and to improve the products and features customers use most often. This feature does not collect users' names, addresses, or any other identifying information except the IP address that is used to send the data. By default, users have the opportunity to opt into participation in the CEIP the first time they run an Office application. If your organization has policies that govern the use of external resources such as the CEIP, allowing users to opt in to the program might cause them to violate these policies." - remediation: "To implement the recommended configuration state, set the following Group Policy setting to Disabled. User Configuration\\Administrative Templates\\Microsoft Office 2016\\Privacy\\Trust Center\\Enable Customer Experience Improvement Program" - compliance: - - cis: "2.24.1.2" - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common -> qmenable -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common -> !qmenable;' - - id: 10062 - title: "Ensure 'Allow including screenshot with Office Feedback' is set to Disabled" - description: "This policy setting manages whether the Office Feedback Tool (a.k.a. Send a Smile) allows the user to send a screenshot of their desktop with their feedback to Microsoft. The Office Feedback Tool allows users to provide Microsoft feedback regarding their positive and negative experiences when using Office. The recommended state for this setting is: Disabled." - rationale: "Due to privacy concerns, users should not be able to send data to any third party unless approved by the System Administrators." - remediation: "To implement the recommended configuration state, set the following Group Policy setting to Disabled. User Configuration\\Administrative Templates\\Microsoft Office 2016\\Privacy\\Trust Center\\Allow including screenshot with Office Feedback" - compliance: - - cis: "2.24.1.3" - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common\feedback -> includescreenshot -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common\feedback -> !includescreenshot;' - - id: 10063 - title: "Ensure 'Send Office Feedback' is set to Disabled" - description: "This policy setting manages the Office Feedback Tool (a.k.a. Send a Smile). The Office Feedback Tool allows users to provide Microsoft feedback regarding their positive and negative experiences when using Office. The recommended state for this setting is: Disabled." - rationale: "Due to privacy concerns, users should not be able to send data to any third party unless approved by the System Administrators." - remediation: "To implement the recommended configuration state, set the following Group Policy setting to Disabled. User Configuration\\Administrative Templates\\Microsoft Office 2016\\Privacy\\Trust Center\\Send Office Feedback" - compliance: - - cis: "2.24.1.4" - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common\feedback -> enabled -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common\feedback -> !enabled;' - - id: 10064 - title: "Ensure 'Send personal information' is set to Disabled" - description: "This policy setting controls whether users can send personal information to Office. When users choose to send information Office applications automatically send information to Office." - rationale: "Due to privacy concerns, users should not be able to send data to any third party unless approved by the System Administrators." - remediation: "To implement the recommended configuration state, set the following Group Policy setting to Disabled. User Configuration\\Administrative Templates\\Microsoft Office 2016\\Privacy\\Trust Center\\Send personal information" - compliance: - - cis: "2.24.1.5" - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common -> sendcustomerdata -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common -> !sendcustomerdata;' - - id: 10065 - title: "Ensure Set 'Automatically Receive Small Updates to Improve Reliability' is set to Disabled" - description: "This policy setting controls whether Microsoft Office Diagnostics is enabled. Office Diagnostics enables Microsoft to diagnose system problems by periodically downloading a small file to the computer. If you enable this policy setting, Office Diagnostics collects information about specific errors and the IP address of the computer. Office Diagnostics does not transmit any personally identifiable information to Microsoft other than the IP address of the computer requesting the update. If you disable this policy setting, users will not receive updates from Office Diagnostics. If you do not configure this policy setting, this policy setting is not enabled, but users have the opportunity to opt into receiving updates from Office Diagnostics the first time they run an Office application. The recommended state for this setting is: Disabled." - rationale: "Office Diagnostics is used to improve the user experience by periodically downloading a small file to the computer with updated help information about specific problems. If Office Diagnostics is enabled, it collects information about specific errors and the IP address of the computer. When new help information is available, that help information is downloaded to the computer that experienced the related problems. Office Diagnostics does not transmit any personally identifiable information to Microsoft other than the IP address of the computer requesting the update. By default, users have the opportunity to opt into receiving updates from Office Diagnostics the first time they run a Office application. If your organization has policies that govern the use of external resources such as Office Diagnostics, allowing users to opt in to this feature might cause them to violate these policies." - remediation: "To implement the recommended configuration state, set the following Group Policy setting to Disabled. User Configuration\\Administrative Templates\\Microsoft Office 2016\\Privacy\\Trust Center\\Automatically Receive Small Updates to Improve Reliability" - compliance: - - cis: "2.24.1.6" - condition: any - rules: - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common -> updatereliabilitydata -> !0;' - - 'r:HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common -> !updatereliabilitydata;' diff --git a/sca/windows/cis_win10_enterprise_L1.yml b/sca/windows/cis_win10_enterprise_L1.yml new file mode 100644 index 000000000..de61a939b --- /dev/null +++ b/sca/windows/cis_win10_enterprise_L1.yml @@ -0,0 +1,3183 @@ +# Security Configuration Assessment +# CIS Checks for Windows 10 Enterprise L1 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Benchmark v1.5.0 for Microsoft Windows 10 Release 1803 v1.5.0 - 03-06-2019 + +policy: + id: "cis_win10_enterprise_L1" + file: "cis_win10_enterprise_L1.yml" + name: "CIS benchmark for Windows 10 Enterprise (Release 1803)" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for Microsoft Windows (L1)." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check that the Windows platform is Windows 10" + description: "Requirements for running the CIS benchmark Domain Controller L1 under Windows 10" + condition: all + rules: + - 'r:HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion -> ProductName -> r:^Windows 10' + +checks: +# 2.3 Security Options + - id: 13000 + title: "Ensure 'Accounts: Block Microsoft accounts' is set to 'Users can't add or log on with Microsoft accounts'" + description: "This policy setting prevents users from adding new Microsoft accounts on this computer. The recommended state for this setting is: Users can't add or log on with Microsoft accounts." + rationale: "Organizations that want to effectively implement identity management policies and maintain firm control of what accounts are used to log onto their computers will probably in order to meet the requirements of compliance standards that apply to their information systems." + remediation: "To establish the recommended configuration via GP, set the following UI path to Users can't add or log on with Microsoft accounts: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Accounts: Block Microsoft accounts." + compliance: + - cis: ["2.3.1.2"] + - cis_csc: ["16"] + references: + - 'CCE-35487-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> NoConnectedUser -> r:^3$' + + - id: 13001 + title: "Ensure 'Accounts: Limit local account use of blank passwords to console logon only' is set to 'Enabled'" + description: "This policy setting determines whether local accounts that are not password protected can be used to log on from locations other than the physical computer console. If you enable this policy setting, local accounts that have blank passwords will not be able to log on to the network from remote client computers. Such accounts will only be able to log on at the keyboard of the computer. The recommended state for this setting is: Enabled." + rationale: "Blank passwords are a serious threat to computer security and should be forbidden through both organizational policy and suitable technical measures. In fact, the default settings for Active Directory domains require complex passwords of at least seven characters. However, if users with the ability to create new accounts bypass your domainbased password policies, they could create accounts with blank passwords. For example, a user could build a stand-alone computer, create one or more accounts with blank passwords, and then join the computer to the domain. The local accounts with blank passwords would still function. Anyone who knows the name of one of these unprotected accounts could then use it to log on." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Accounts: Limit local account use of blank passwords to console logon only." + compliance: + - cis: ["2.3.1.4"] + - cis_csc: ["16"] + references: + - 'CCE-32929-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LimitBlankPasswordUse -> 1' + + - id: 13002 + title: "Ensure 'Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings' is set to 'Enabled'" + description: "This policy setting allows administrators to enable the more precise auditing capabilities present in Windows Vista. The Audit Policy settings available in Windows Server 2003 Active Directory do not yet contain settings for managing the new auditing subcategories. To properly apply the auditing policies prescribed in this baseline, the Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings setting needs to be configured to Enabled. The recommended state for this setting is: Enabled." + rationale: "If the computer is unable to record events to the Security log, critical evidence or important troubleshooting information may not be available for review after a security incident. Also, an attacker could potentially generate a large volume of Security log events to purposely force a computer shutdown." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Audit: Shut down system immediately if unable to log security audits." + compliance: + - cis: ["2.3.2.1"] + - cis_csc: ["6.2", "6.3"] + references: + - 'CCE-35533-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> SCENoApplyLegacyAuditPolicy -> 1' + + - id: 13003 + title: "Ensure 'Audit: Shut down system immediately if unable to log security audits' is set to 'Disabled'" + description: "This policy setting determines whether the system shuts down if it is unable to log Security events. It is a requirement for Trusted Computer System Evaluation Criteria (TCSEC)-C2 and Common Criteria certification to prevent auditable events from occurring if the audit system is unable to log them. Microsoft has chosen to meet this requirement by halting the system and displaying a stop message if the auditing system experiences a failure. When this policy setting is enabled, the system will be shut down if a security audit cannot be logged for any reason. The recommended state for this setting is: Disabled." + rationale: "If the computer is unable to record events to the Security log, critical evidence or important troubleshooting information may not be available for review after a security incident. Also, an attacker could potentially generate a large volume of Security log events to purposely force a computer shutdown." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Audit: Shut down system immediately if unable to log security audits." + compliance: + - cis: ["2.3.2.2"] + - cis_csc: ["6"] + references: + - 'CCE-33046-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> CrashOnAuditFail -> 0' + + - id: 13004 + title: "Ensure 'Devices: Allowed to format and eject removable media' is set to 'Administrators and Interactive Users'" + description: "This policy setting determines who is allowed to format and eject removable NTFS media. You can use this policy setting to prevent unauthorized users from removing data on one computer to access it on another computer on which they have local administrator privileges. The recommended state for this setting is: Administrators and Interactive Users." + rationale: "Users may be able to move data on removable disks to a different computer where they have administrative privileges. The user could then take ownership of any file, grant themselves full control, and view or modify any file. The fact that most removable storage devices will eject media by pressing a mechanical button diminishes the advantage of this policy setting." + remediation: "To establish the recommended configuration via GP, set the following UI path to Administrators and Interactive Users: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Devices: Allowed to format and eject removable media." + compliance: + - cis: ["2.3.4.1"] + - cis_csc: ["5.1"] + references: + - 'CCE-34355-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> AllocateDASD -> 0' + + - id: 13005 + title: "Ensure 'Domain member: Digitally encrypt or sign secure channel data (always)' is set to 'Enabled'" + description: "This policy setting determines whether all secure channel traffic that is initiated by the domain member must be signed or encrypted. The recommended state for this setting is: Enabled." + rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated-and sensitive information such as passwords are encrypted-but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally encrypt or sign secure channel data (always)" + compliance: + - cis: ["2.3.6.1"] + - cis_csc: ["13"] + references: + - 'CCE-34892-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> RequireSignOrSeal -> 1' + + - id: 13006 + title: "Ensure 'Domain member: Digitally encrypt secure channel data (when possible)' is set to 'Enabled'" + description: "This policy setting determines whether a domain member should attempt to negotiate encryption for all secure channel traffic that it initiates. The recommended state for this setting is: Enabled." + rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated-and sensitive information such as passwords are encrypted-but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally encrypt secure channel data (when possible)" + compliance: + - cis: ["2.3.6.2"] + - cis_csc: ["13"] + references: + - 'CCE-35273-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> SealSecureChannel -> 1' + + - id: 13007 + title: "Ensure 'Domain member: Digitally sign secure channel data (when possible)' is set to 'Enabled'" + description: "This policy setting determines whether a domain member should attempt to negotiate whether all secure channel traffic that it initiates must be digitally signed. Digital signatures protect the traffic from being modified by anyone who captures the data as it traverses the network. The recommended state for this setting is: Enabled." + rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated-and sensitive information such as passwords are encrypted-but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally sign secure channel data (when possible)" + compliance: + - cis: ["2.3.6.3"] + - cis_csc: ["13"] + references: + - 'CCE-34893-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> SignSecureChannel -> 1' + + - id: 13008 + title: "Ensure 'Domain member: Disable machine account password changes' is set to 'Disabled'" + description: "This policy setting determines whether a domain member can periodically change its computer account password. Computers that cannot automatically change their account passwords are potentially vulnerable, because an attacker might be able to determine the password for the system's domain account. The recommended state for this setting is: Disabled." + rationale: "The default configuration for Windows Server 2003-based computers that belong to a domain is that they are automatically required to change the passwords for their accounts every 30 days. If you disable this policy setting, computers that run Windows Server 2003 will retain the same passwords as their computer accounts. Computers that are no longer able to automatically change their account password are at risk from an attacker who could determine the password for the computer's domain account." + remediation: "Remediation: To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Disable machine account password changes." + compliance: + - cis: ["2.3.6.4"] + - cis_csc: ["16"] + references: + - 'CCE-34986-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters -> DisablePasswordChange -> 0' + + - id: 13009 + title: "Ensure 'Domain member: Require strong (Windows 2000 or later) session key' is set to 'Enabled'" + description: "When this policy setting is enabled, a secure channel can only be established with Domain Controllers that are capable of encrypting secure channel data with a strong (128-bit) session key. To enable this policy setting, all Domain Controllers in the domain must be able to encrypt secure channel data with a strong key, which means all Domain Controllers must be running Microsoft Windows 2000 or newer. The recommended state for this setting is: Enabled." + rationale: "Session keys that are used to establish secure channel communications between Domain Controllers and member computers are much stronger in Windows 2000 than they were in previous Microsoft operating systems. Whenever possible, you should take advantage of these stronger session keys to help protect secure channel communications from attacks that attempt to hijack network sessions and eavesdropping. (Eavesdropping is a form of hacking in which network data is read or altered in transit. The data can be modified to hide or change the sender, or be redirected.)" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Require strong (Windows 2000 or later) session key." + compliance: + - cis: ["2.3.6.6"] + - cis_csc: ["13"] + references: + - 'CCE-35177-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters -> RequireStrongKey -> 1' + + - id: 13010 + title: "Ensure 'Interactive logon: Do not require CTRL+ALT+DEL' is set to 'Disabled'" + description: "This policy setting determines whether users must press CTRL+ALT+DEL before they log on. The recommended state for this setting is: Disabled." + rationale: "Microsoft developed this feature to make it easier for users with certain types of physical impairments to log on to computers that run Windows. If users are not required to press CTRL+ALT+DEL, they are susceptible to attacks that attempt to intercept their passwords. If CTRL+ALT+DEL is required before logon, user passwords are communicated by means of a trusted path. An attacker could install a Trojan horse program that looks like the standard Windows logon dialog box and capture the user's password. The attacker would then be able to log on to the compromised account with whatever level of privilege that user has." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Do not require CTRL+ALT+DEL" + compliance: + - cis: ["2.3.7.1"] + - cis_csc: ["8"] + references: + - 'CCE-35099-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> DisableCAD -> 0' + + - id: 13011 + title: "Ensure 'Interactive logon: Machine inactivity limit' is set to '900 or fewer second(s), but not 0'" + description: "Windows notices inactivity of a logon session, and if the amount of inactive time exceeds the inactivity limit, then the screen saver will run, locking the session. The recommended state for this setting is: 900 or fewer second(s), but not 0. Note: A value of 0 does not conform to the benchmark as it disables the machine inactivity limit" + rationale: "If a user forgets to lock their computer when they walk away it's possible that a passerby will hijack it." + remediation: "To establish the recommended configuration via GP, set the following UI path to 900 or fewer seconds, but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Machine inactivity limit." + compliance: + - cis: ["2.3.7.4"] + - cis_csc: ["16.5"] + references: + - 'CCE-34900-1' + condition: all + rules: + - 'not r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 0' + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> n:^(\d+) compare <= 900' + + - id: 13012 + title: "Ensure 'Interactive logon: Prompt user to change password before expiration' is set to 'between 5 and 14 days'" + description: "This policy setting determines how far in advance users are warned that their password will expire. It is recommended that you configure this policy setting to at least 5 days but no more than 14 days to sufficiently warn users when their passwords will expire. The recommended state for this setting is: between 5 and 14 days." + rationale: "Users will need to be warned that their passwords are going to expire, or they may inadvertently be locked out of the computer when their passwords expire. This condition could lead to confusion for users who access the network locally, or make it impossible for users to access your organization's network through dial-up or virtual private network (VPN) connections." + remediation: "To establish the recommended configuration via GP, set the following UI path to a value between 5 and 14 days: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Prompt user to change password before expiration." + compliance: + - cis: ["2.3.7.8"] + - cis_csc: ["16"] + references: + - 'CCE-35274-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> n:^(\d+) compare => 5 && n:^(\d+) compare <= 14' + + - id: 13013 + title: "Ensure 'Interactive logon: Smart card removal behavior' is set to 'Lock Workstation' or higher" + description: "This policy setting determines what happens when the smart card for a logged-on user is removed from the smart card reader. The recommended state for this setting is: Lock Workstation. Configuring this setting to Force Logoff or Disconnect if a Remote Desktop Services session also conforms to the benchmark." + rationale: "Users sometimes forget to lock their workstations when they are away from them, allowing the possibility for malicious users to access their computers. If smart cards are used for authentication, the computer should automatically lock itself when the card is removed to ensure that only the user with the smart card is accessing resources using those credentials." + remediation: "To establish the recommended configuration via GP, set the following UI path to Lock Workstation (or, if applicable for your environment, Force Logoff or Disconnect if a Remote Desktop Services session): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Smart card removal behavior." + compliance: + - cis: ["2.3.7.9"] + - cis_csc: ["16.5"] + references: + - 'CCE-34988-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScRemoveOption -> r:^1$|^2$' + + - id: 13014 + title: "Ensure 'Microsoft network client: Digitally sign communications (always)' is set to 'Enabled'" + description: "This policy setting determines whether packet signing is required by the SMB client component. Note: When Windows Vista-based computers have this policy setting enabled and they connect to file or print shares on remote servers, it is important that the setting is synchronized with its companion setting, Microsoft network server: Digitally sign communications (always), on those servers. For more information about these settings, see the \"Microsoft network client and server: Digitally sign communications (four related settings)\" section in Chapter 5 of the Threats and Countermeasures guide. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Digitally sign communications (always)" + compliance: + - cis: ["2.3.8.1"] + - cis_csc: ["13"] + references: + - 'CCE-35222-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> RequireSecuritySignature -> 1' + + - id: 13015 + title: "Ensure 'Microsoft network client: Digitally sign communications (if server agrees)' is set to 'Enabled'" + description: "This policy setting determines whether the SMB client will attempt to negotiate SMB packet signing. Note: Enabling this policy setting on SMB clients on your network makes them fully effective for packet signing with all clients and servers in your environment. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Digitally sign communications (if server agrees)" + compliance: + - cis: ["2.3.8.2"] + - cis_csc: ["13"] + references: + - 'CCE-34908-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> EnableSecuritySignature -> 1' + + - id: 13016 + title: "Ensure 'Microsoft network client: Send unencrypted password to third-party SMB servers' is set to 'Disabled'" + description: "This policy setting determines whether the SMB redirector will send plaintext passwords during authentication to third-party SMB servers that do not support password encryption. It is recommended that you disable this policy setting unless there is a strong business case to enable it. If this policy setting is enabled, unencrypted passwords will be allowed across the network. The recommended state for this setting is: Disabled." + rationale: "If you enable this policy setting, the server can transmit passwords in plaintext across the network to other computers that offer SMB services, which is a significant security risk. These other computers may not use any of the SMB security mechanisms that are included with Windows Server 2003." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Send unencrypted password to third-party SMB servers." + compliance: + - cis: ["2.3.8.3"] + - cis_csc: ["13"] + references: + - 'CCE-33717-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> EnablePlainTextPassword -> 0' + + - id: 13017 + title: "Ensure 'Microsoft network server: Amount of idle time required before suspending session' is set to '15 or fewer minute(s)'" + description: "This policy setting allows you to specify the amount of continuous idle time that must pass in an SMB session before the session is suspended because of inactivity. Administrators can use this policy setting to control when a computer suspends an inactive SMB session. If client activity resumes, the session is automatically reestablished. A value of 0 appears to allow sessions to persist indefinitely. The maximum value is 99999, which is over 69 days; in effect, this value disables the setting. The recommended state for this setting is: 15 or fewer minute(s), but not 0." + rationale: "Each SMB session consumes server resources, and numerous null sessions will slow the server or possibly cause it to fail. An attacker could repeatedly establish SMB sessions until the server's SMB services become slow or unresponsive." + remediation: "To establish the recommended configuration via GP, set the following UI path to 15 or fewer minute(s), but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Amount of idle time required before suspending session." + compliance: + - cis: ["2.3.9.1"] + - cis_csc: ["3"] + references: + - 'CCE-34909-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> n:^(\d+) compare <= 15' + + - id: 13018 + title: "Ensure 'Microsoft network server: Digitally sign communications (always)' is set to 'Enabled'" + description: "This policy setting determines whether packet signing is required by the SMB server component. Enable this policy setting in a mixed environment to prevent downstream clients from using the workstation as a network server. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Digitally sign communications (always)" + compliance: + - cis: ["2.3.9.2"] + - cis_csc: ["13"] + references: + - 'CCE-35065-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> RequireSecuritySignature -> 1' + + - id: 13019 + title: "Ensure 'Microsoft network server: Digitally sign communications (if client agrees)' is set to 'Enabled'" + description: "This policy setting determines whether the SMB server will negotiate SMB packet signing with clients that request it. If no signing request comes from the client, a connection will be allowed without a signature if the Microsoft network server: Digitally sign communications (always) setting is not enabled. Note: Enable this policy setting on SMB clients on your network to make them fully effective for packet signing with all clients and servers in your environment. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Digitally sign communications (if client agrees)" + compliance: + - cis: ["2.3.9.3"] + - cis_csc: ["13"] + references: + - 'CCE-35182-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> EnableSecuritySignature -> 1' + + - id: 13020 + title: "Ensure 'Microsoft network server: Disconnect clients when logon hours expire' is set to 'Enabled'" + description: "This security setting determines whether to disconnect users who are connected to the local computer outside their user account's valid logon hours. This setting affects the Server Message Block (SMB) component. If you enable this policy setting you should also enable Network security: Force logoff when logon hours expire (Rule 2.3.11.6). If your organization configures logon hours for users, this policy setting is necessary to ensure they are effective. The recommended state for this setting is: Enabled." + rationale: "If your organization configures logon hours for users, then it makes sense to enable this policy setting. Otherwise, users who should not have access to network resources outside of their logon hours may actually be able to continue to use those resources with sessions that were established during allowed hours." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Disconnect clients when logon hours expire." + compliance: + - cis: ["2.3.9.4"] + - cis_csc: ["16"] + references: + - 'CCE-34911-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> EnableForcedLogOff -> 1' + + - id: 13021 + title: "Ensure 'Microsoft network server: Server SPN target name validation level' is set to 'Accept if provided by client' or higher" + description: "This policy setting controls the level of validation a computer with shared folders or printers (the server) performs on the service principal name (SPN) that is provided by the client computer when it establishes a session using the server message block (SMB) protocol. The server message block (SMB) protocol provides the basis for file and print sharing and other networking operations, such as remote Windows administration. The SMB protocol supports validating the SMB server service principal name (SPN) within the authentication blob provided by a SMB client to prevent a class of attacks against SMB servers referred to as SMB relay attacks. This setting will affect both SMB1 and SMB2. The recommended state for this setting is: Accept if provided by client. Configuring this setting to Required from client also conforms to the benchmark." + rationale: "The identity of a computer can be spoofed to gain unauthorized access to network resources." + remediation: "To establish the recommended configuration via GP, set the following UI path to Accept if provided by client (configuring to Required from client also conforms to the benchmark): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Server SPN target name validation level." + compliance: + - cis: ["2.3.9.5"] + - cis_csc: ["14"] + references: + - 'CCE-35299-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters -> SMBServerNameHardeningLevel -> n:^(\d+) compare >= 1' + + - id: 13022 + title: "Ensure 'Network access: Do not allow anonymous enumeration of SAM accounts' is set to 'Enabled'" + description: "This policy setting controls the ability of anonymous users to enumerate the accounts in the Security Accounts Manager (SAM). If you enable this policy setting, users with anonymous connections will not be able to enumerate domain account user names on the systems in your environment. This policy setting also allows additional restrictions on anonymous connections. The recommended state for this setting is: Enabled. Note: This policy has no effect on Domain Controllers." + rationale: "An unauthorized user could anonymously list account names and use the information to attempt to guess passwords or perform social engineering attacks. (Social engineering attacks try to deceive users in some way to obtain passwords or some form of security information)" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow anonymous enumeration of SAM accounts." + compliance: + - cis: ["2.3.10.2"] + - cis_csc: ["16"] + references: + - 'CCE-34631-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -> RestrictAnonymousSAM -> 1' + + - id: 13023 + title: "Ensure 'Network access: Do not allow anonymous enumeration of SAM accounts and shares' is set to 'Enabled'" + description: "This policy setting controls the ability of anonymous users to enumerate SAM accounts as well as shares. If you enable this policy setting, anonymous users will not be able to enumerate domain account user names and network share names on the systems in your environment. The recommended state for this setting is: Enabled. Note: This policy has no effect on Domain Controllers." + rationale: "An unauthorized user could anonymously list account names and shared resources and use the information to attempt to guess passwords or perform social engineering attacks. (Social engineering attacks try to deceive users in some way to obtain passwords or some form of security information)" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow anonymous enumeration of SAM accounts and shares." + compliance: + - cis: ["2.3.10.3"] + - cis_csc: ["16"] + references: + - 'CCE-34723-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -> RestrictAnonymous -> 1' + + - id: 13024 + title: "Ensure 'Network access: Do not allow storage of passwords and credentials for network authentication' is set to 'Enabled'" + description: "This policy setting determines whether Credential Manager (formerly called Stored User Names and Passwords) saves passwords or credentials for later use when it gains domain authentication. The recommended state for this setting is: Enabled. Note: Changes to this setting will not take effect until Windows is restarted." + rationale: "Passwords that are cached can be accessed by the user when logged on to the computer. Although this information may sound obvious, a problem can arise if the user unknowingly executes hostile code that reads the passwords and forwards them to another, unauthorized user." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow storage of passwords and credentials for network authentication." + compliance: + - cis: ["2.3.10.4"] + - cis_csc: ["16.14"] + references: + - 'CCE-33718-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -> DisableDomainCreds -> 1' + + - id: 13025 + title: "Ensure 'Network access: Let Everyone permissions apply to anonymous users' is set to 'Disabled'" + description: "This policy setting determines what additional permissions are assigned for anonymous connections to the computer. The recommended state for this setting is: Disabled." + rationale: "An unauthorized user could anonymously list account names and shared resources and use the information to attempt to guess passwords, perform social engineering attacks, or launch DoS attacks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Let Everyone permissions apply to anonymous users." + compliance: + - cis: ["2.3.10.5"] + - cis_csc: ["14", "16"] + references: + - 'CCE-35367-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> EveryoneIncludesAnonymous -> 0' + + - id: 13026 + title: "Ensure 'Network access: Named Pipes that can be accessed anonymously' is set to 'None'" + description: "This policy setting determines which communication sessions, or pipes, will have attributes and permissions that allow anonymous access. The recommended state for this setting is: (i.e. None)." + rationale: "Limiting named pipes that can be accessed anonymously will reduce the attack surface of the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to (i.e. None): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Named Pipes that can be accessed anonymously." + compliance: + - cis: ["2.3.10.6"] + - cis_csc: ["14.1", "14.2"] + references: + - 'CCE-34965-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> NullSessionPipes -> None' + + - id: 13027 + title: "Ensure 'Network access: Remotely accessible registry paths'" + description: "This policy setting determines which registry paths will be accessible over the network, regardless of the users or groups listed in the access control list (ACL) of the winreg registry key. Note: This setting does not exist in Windows XP. There was a setting with that name in Windows XP, but it is called Network access: Remotely accessible registry paths and subpaths in Windows Server 2003, Windows Vista, and Windows Server 2008 (non-R2)." + rationale: "The registry is a database that contains computer configuration information, and much of the information is sensitive. An attacker could use this information to facilitate unauthorized activities. To reduce the risk of such an attack, suitable ACLs are assigned throughout the registry to help protect it from access by unauthorized users." + remediation: "To establish the recommended configuration via GP, set the following UI path to: System\\CurrentControlSet\\Control\\ProductOptions System\\CurrentControlSet\\Control\\Server Applications SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Remotely accessible registry paths." + compliance: + - cis: ["2.3.10.7"] + - cis_csc: ["14", "16"] + references: + - 'CCE-33976-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedExactPaths -> Machine -> r:System\\CurrentControlSet\\Control\\ProductOptions System\\CurrentControlSet\\Control\\Server Applications Software\\Microsoft\\Windows NT\\CurrentVersion' + + - id: 13028 + title: "Ensure 'Network access: Remotely accessible registry paths and sub-paths'" + description: "This policy setting determines which registry paths and sub-paths will be accessible over the network, regardless of the users or groups listed in the access control list (ACL) of the winreg registry key. Note: In Windows XP this setting is called Network access: Remotely accessible registry paths, the setting with that same name in Windows Vista, Windows Server 2008 (non-R2), and Windows Server 2003 does not exist in Windows XP. Note #2: When you configure this setting you specify a list of one or more objects. The delimiter used when entering the list is a line feed or carriage return, that is, type the first object on the list, press the Enter button, type the next object, press Enter again, etc. The setting value is stored as a comma-delimited list in group policy security templates. It is also rendered as a comma-delimited list in Group Policy Editor's display pane and the Resultant Set of Policy console. It is recorded in the registry as a line-feed delimited list in a REG_MULTI_SZ value. The recommended state for this setting is: System\\CurrentControlSet\\Control\\Print\\Printers System\\CurrentControlSet\\Services\\Eventlog Software\\Microsoft\\OLAP Server Software\\Microsoft\\Windows NT\\CurrentVersion\\Print Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows System\\CurrentControlSet\\Control\\ContentIndex System\\CurrentControlSet\\Control\\Terminal Server System\\CurrentControlSet\\Control\\Terminal Server\\UserConfig System\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration Software\\Microsoft\\Windows NT\\CurrentVersion\\Perflib System\\CurrentControlSet\\Services\\SysmonLog" + rationale: "The registry contains sensitive computer configuration information that could be used by an attacker to facilitate unauthorized activities. The fact that the default ACLs assigned throughout the registry are fairly restrictive and help to protect the registry from access by unauthorized users reduces the risk of such an attack." + remediation: "To establish the recommended configuration via GP, set the following UI path to: System\\CurrentControlSet\\Control\\Print\\Printers System\\CurrentControlSet\\Services\\Eventlog SOFTWARE\\Microsoft\\OLAP Server SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Windows System\\CurrentControlSet\\Control\\ContentIndex System\\CurrentControlSet\\Control\\Terminal Server System\\CurrentControlSet\\Control\\Terminal Server\\UserConfig System\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Perflib System\\CurrentControlSet\\Services\\SysmonLog Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Remotely accessible registry paths and sub-paths." + compliance: + - cis: ["2.3.10.8"] + - cis_csc: ["14", "16"] + references: + - 'CCE-35300-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedPaths -> Machine -> r:System\\CurrentControlSet\\Control\\Print\\Printers System\\CurrentControlSet\\Services\\Eventlog Software\\Microsoft\\OLAP Server|Software\\Microsoft\\Windows NT\\CurrentVersion\\Print Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows System\\CurrentControlSet\\Control\\ContentIndex System\\CurrentControlSet\\Control\\Terminal Server System\\CurrentControlSet\\Control\\Terminal Server\\UserConfig System\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration Software\\Microsoft\\Windows NT\\CurrentVersion\\Perflib System\\CurrentControlSet\\Services\\SysmonLog' + + - id: 13029 + title: "Ensure 'Network access: Restrict anonymous access to Named Pipes and Shares' is set to 'Enabled'" + description: "When enabled, this policy setting restricts anonymous access to only those shares and pipes that are named in the Network access: Named pipes that can be accessed anonymously and Network access: Shares that can be accessed anonymously settings. This policy setting controls null session access to shares on your computers by adding RestrictNullSessAccess with the value 1 in the HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\LanManServer\\Parameters registry key. This registry value toggles null session shares on or off to control whether the server service restricts unauthenticated clients' access to named resources. The recommended state for this setting is: Enabled." + rationale: "Null sessions are a weakness that can be exploited through shares (including the default shares) on computers in your environment." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Restrict anonymous access to Named Pipes and Shares." + compliance: + - cis: ["2.3.10.9"] + - cis_csc: ["14", "16"] + references: + - 'CCE-33563-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> RestrictNullSessAccess -> 1' + + - id: 13030 + title: "Ensure 'Network access: Restrict clients allowed to make remote calls to SAM' is set to 'Administrators: Remote Access: Allow'" + description: "This policy setting allows you to restrict remote RPC connections to SAM. The recommended state for this setting is: Administrators: Remote Access: Allow. Note: A Windows 10 R1607, Server 2016 or newer OS is required to access and set this value in Group Policy." + rationale: "To ensure that an unauthorized user cannot anonymously list local account names or groups and use the information to attempt to guess passwords or perform social engineering attacks. (Social engineering attacks try to deceive users in some way to obtain passwords or some form of security information.)" + remediation: "To establish the recommended configuration via GP, set the following UI path to Administrators: Remote Access: Allow: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Restrict clients allowed to make remote calls to SAM." + compliance: + - cis: ["2.3.10.10"] + - cis_csc: ["5.1", "9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -> restrictremotesam -> r:O:BAG:BAD:\(A;;RC;;;BA\)' + + - id: 13031 + title: "Ensure 'Network access: Shares that can be accessed anonymously' is set to 'None'" + description: "This policy setting determines which network shares can be accessed by anonymous users. The default configuration for this policy setting has little effect because all users have to be authenticated before they can access shared resources on the server. The recommended state for this setting is: (i.e. None)." + rationale: "It is very dangerous to allow any values in this setting. Any shares that are listed can be accessed by any network user, which could lead to the exposure or corruption of sensitive data" + remediation: "To establish the recommended configuration via GP, set the following UI path to (i.e. None): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Shares that can be accessed anonymously." + compliance: + - cis: ["2.3.10.11"] + - cis_csc: ["14", "16"] + references: + - 'CCE-34651-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> NullSessionShares -> None' + + - id: 13032 + title: "Ensure 'Network access: Sharing and security model for local accounts' is set to 'Classic - local users authenticate as themselves'" + description: "This policy setting determines how network logons that use local accounts are authenticated. The Classic option allows precise control over access to resources, including the ability to assign different types of access to different users for the same resource. The Guest only option allows you to treat all users equally. In this context, all users authenticate as Guest only to receive the same access level to a given resource. The recommended state for this setting is: Classic - local users authenticate as themselves. Note: This setting does not affect interactive logons that are performed remotely by using such services as Telnet or Remote Desktop Services (formerly called Terminal Services)." + rationale: "With the Guest only model, any user who can authenticate to your computer over the network does so with guest privileges, which probably means that they will not have write access to shared resources on that computer. Although this restriction does increase security, it makes it more difficult for authorized users to access shared resources on those computers because ACLs on those resources must include access control entries (ACEs) for the Guest account. With the Classic model, local accounts should be password protected. Otherwise, if Guest access is enabled, anyone can use those user accounts to access shared system resources." + remediation: "To establish the recommended configuration via GP, set the following UI path to Classic - local users authenticate as themselves: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Sharing and security model for local accounts." + compliance: + - cis: ["2.3.10.12"] + - cis_csc: ["14", "16"] + references: + - 'CCE-33719-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> ForceGuest -> 0' + + - id: 13033 + title: "Ensure 'Network security: Allow Local System to use computer identity for NTLM' is set to 'Enabled'" + description: "This policy setting determines whether Local System services that use Negotiate when reverting to NTLM authentication can use the computer identity. This policy is supported on at least Windows 7 or Windows Server 2008 R2. The recommended state for this setting is: Enabled." + rationale: "When connecting to computers running versions of Windows earlier than Windows Vista or Windows Server 2008 (non-R2), services running as Local System and using SPNEGO (Negotiate) that revert to NTLM use the computer identity. In Windows 7, if you are connecting to a computer running Windows Server 2008 or Windows Vista, then a system service uses either the computer identity or a NULL session. When connecting with a NULL session, a system-generated session key is created, which provides no protection but allows applications to sign and encrypt data without errors. When connecting with the computer identity, both signing and encryption is supported in order to provide data protection." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Allow Local System to use computer identity for NTLM." + compliance: + - cis: ["2.3.11.1"] + - cis_csc: ["14", "16"] + references: + - 'CCE-33141-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> UseMachineId -> 1' + + - id: 13034 + title: "Ensure 'Network security: Allow LocalSystem NULL session fallback' is set to 'Disabled'" + description: "This policy setting determines whether NTLM is allowed to fall back to a NULL session when used with LocalSystem. The recommended state for this setting is: Disabled." + rationale: "NULL sessions are less secure because by definition they are unauthenticated." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Allow LocalSystem NULL session fallback." + compliance: + - cis: ["2.3.11.2"] + - cis_csc: ["14"] + references: + - 'CCE-35410-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> allownullsessionfallback -> 0' + + - id: 13035 + title: "Ensure 'Network Security: Allow PKU2U authentication requests to this computer to use online identities' is set to 'Disabled'" + description: "This setting determines if online identities are able to authenticate to this computer. The Public Key Cryptography Based User-to-User (PKU2U) protocol introduced in Windows 7 and Windows Server 2008 R2 is implemented as a security support provider (SSP). The SSP enables peer-to-peer authentication, particularly through the Windows 7 media and file sharing feature called HomeGroup, which permits sharing between computers that are not members of a domain. With PKU2U, a new extension was introduced to the Negotiate authentication package, Spnego.dll. In previous versions of Windows, Negotiate decided whether to use Kerberos or NTLM for authentication. The extension SSP for Negotiate, Negoexts.dll, which is treated as an authentication protocol by Windows, supports Microsoft SSPs including PKU2U. When computers are configured to accept authentication requests by using online IDs, Negoexts.dll calls the PKU2U SSP on the computer that is used to log on. The PKU2U SSP obtains a local certificate and exchanges the policy between the peer computers. When validated on the peer computer, the certificate within the metadata is sent to the logon peer for validation and associates the user's certificate to a security token and the logon process completes. The recommended state for this setting is: Disabled." + rationale: "The PKU2U protocol is a peer-to-peer authentication protocol - authentication should be managed centrally in most managed networks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network Security: Allow PKU2U authentication requests to this computer to use online identities." + compliance: + - cis: ["2.3.11.3"] + - cis_csc: ["16.9"] + references: + - 'CCE-35411-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\pku2u -> AllowOnlineID -> 0' + + - id: 13036 + title: "Ensure 'Network security: Configure encryption types allowed for Kerberos' is set to 'AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types'" + description: "This policy setting allows you to set the encryption types that Kerberos is allowed to use. The recommended state for this setting is: AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types. Note: Some legacy applications and OSes may require RC4_HMAC_MD5 - we recommend you test in your environment and verify whether you can safely remove it. For the purposes of scoring we have allowed the use of RC4_HMAC_MD5 as an optional setting" + rationale: "The strength of each encryption algorithm varies from one to the next, choosing stronger algorithms will reduce the risk of compromise however doing so may cause issues when the computer attempts to authenticate with systems that do not support them." + remediation: "To establish the recommended configuration via GP, set the following UI path to AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Configure encryption types allowed for Kerberos." + compliance: + - cis: ["2.3.11.4"] + - cis_csc: ["16.14"] + references: + - 'CCE-35786-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters -> SupportedEncryptionTypes -> 2147483644' + + - id: 13037 + title: "Ensure 'Network security: Do not store LAN Manager hash value on next password change' is set to 'Enabled'" + description: "This policy setting determines whether the LAN Manager (LM) hash value for the new password is stored when the password is changed. The LM hash is relatively weak and prone to attack compared to the cryptographically stronger Microsoft Windows NT hash. Since LM hashes are stored on the local computer in the security database, passwords can then be easily compromised if the database is attacked. Note: Older operating systems and some third-party applications may fail when this policy setting is enabled. Also, note that the password will need to be changed on all accounts after you enable this setting to gain the proper benefit. The recommended state for this setting is: Enabled." + rationale: "The SAM file can be targeted by attackers who seek access to username and password hashes. Such attacks use special tools to crack passwords, which can then be used to impersonate users and gain access to resources on your network. These types of attacks will not be prevented if you enable this policy setting, but it will be much more difficult for these types of attacks to succeed." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Do not store LAN Manager hash value on next password change." + compliance: + - cis: ["2.3.11.5"] + - cis_csc: ["16.14"] + references: + - 'CCE-35225-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> NoLMHash -> 1' + + - id: 13038 + title: "Ensure 'Network security: Force logoff when logon hours expire' is set to 'Enabled'" + description: "This policy setting determines whether to disconnect users who are connected to the local computer outside their user account's valid logon hours. This setting affects the Server Message Block (SMB) component. If you enable this policy setting you should also enable Microsoft network server: Disconnect clients when logon hours expire (Rule 2.3.9.4). The recommended state for this setting is: Enabled. Note: This recommendation is unscored because there is not a documented registry value that corresponds to it. We still strongly encourage that it be configured as Enabled, to ensure that logon hours (when configured) are properly enforced." + rationale: "If this setting is disabled, a user could remain connected to the computer outside of their allotted logon hours." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Force logoff when logon hours expire." + compliance: + - cis: ["2.3.11.6"] + - cis_csc: ["16"] + references: + - 'CCE-34993-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters -> EnableForcedLogOff -> 1' + + - id: 13039 + title: "Ensure 'Network security: LAN Manager authentication level' is set to 'Send NTLMv2 response only. Refuse LM & NTLM'" + description: "LAN Manager (LM) was a family of early Microsoft client/server software (predating Windows NT) that allowed users to link personal computers together on a single network. LM network capabilities included transparent file and print sharing, user security features, and network administration tools. In Active Directory domains, the Kerberos protocol is the default authentication protocol. However, if the Kerberos protocol is not negotiated for some reason, Active Directory will use LM, NTLM, or NTLMv2. LAN Manager authentication includes the LM, NTLM, and NTLM version 2 (NTLMv2) variants, and is the protocol that is used to authenticate all Windows clients when they perform the following operations: - Join a domain - Authenticate between Active Directory forests - Authenticate to down-level domains - Authenticate to computers that do not run Windows 2000, Windows Server 2003, or Windows XP - Authenticate to computers that are not in the domain The Network security: LAN Manager authentication level setting determines which challenge/response authentication protocol is used for network logons. This choice affects the level of authentication protocol used by clients, the level of session security negotiated, and the level of authentication accepted by servers. The recommended state for this setting is: Send NTLMv2 response only. Refuse LM & NTLM" + rationale: "Windows 2000 and Windows XP clients were configured by default to send LM and NTLM authentication responses (Windows 95-based and Windows 98-based clients only send LM). The default settings in OSes predating Windows Vista / Windows Server 2008 (nonR2) allowed all clients to authenticate with servers and use their resources. However, this meant that LM responses - the weakest form of authentication response - were sent over the network, and it was potentially possible for attackers to sniff that traffic to more easily reproduce the user's password. The Windows 95, Windows 98, and Windows NT operating systems cannot use the Kerberos version 5 protocol for authentication. For this reason, in a Windows Server 2003 domain, these computers authenticate by default with both the LM and NTLM protocols for network authentication. You can enforce a more secure authentication protocol for Windows 95, Windows 98, and Windows NT by using NTLMv2. For the logon process, NTLMv2 uses a secure channel to protect the authentication process. Even if you use NTLMv2 for older clients and servers, Windows-based clients and servers that are members of the domain will use the Kerberos authentication protocol to authenticate with Windows Server 2003 or newer Domain Controllers. For these reasons, it is strongly preferred to restrict the use of LM & NTLM (non-v2) as much as possible." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Send NTLMv2 response only. Refuse LM & NTLM: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: LAN Manager authentication level." + compliance: + - cis: ["2.3.11.7"] + - cis_csc: ["13"] + references: + - 'CCE-35302-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 5' + + - id: 13040 + title: "Ensure 'Network security: LDAP client signing requirements' is set to 'Negotiate signing' or higher" + description: "This policy setting determines the level of data signing that is requested on behalf of clients that issue LDAP BIND requests. Note: This policy setting does not have any impact on LDAP simple bind (ldap_simple_bind) or LDAP simple bind through SSL (ldap_simple_bind_s). No Microsoft LDAP clients that are included with Windows XP Professional use ldap_simple_bind or ldap_simple_bind_s to communicate with a Domain Controller. The recommended state for this setting is: Negotiate signing. Configuring this setting to Require signing also conforms to the benchmark." + rationale: "Unsigned network traffic is susceptible to man-in-the-middle attacks in which an intruder captures the packets between the client and server, modifies them, and then forwards them to the server. For an LDAP server, this susceptibility means that an attacker could cause a server to make decisions that are based on false or altered data from the LDAP queries. To lower this risk in your network, you can implement strong physical security measures to protect the network infrastructure. Also, you can make all types of man-in-the-middle attacks extremely difficult if you require digital signatures on all network packets by means of IPsec authentication headers." + remediation: "To establish the recommended configuration via GP, set the following UI path to Negotiate signing (configuring to Require signing also conforms to the benchmark): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: LDAP client signing requirements." + compliance: + - cis: ["2.3.11.8"] + - cis_csc: ["13"] + references: + - 'CCE-33802-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LDAP -> LDAPClientIntegrity -> 1' + + - id: 13041 + title: "Ensure 'Network security: Minimum session security for NTLM SSP based (including secure RPC) clients' is set to 'Require NTLMv2 session security, Require 128-bit encryption'" + description: "This policy setting determines which behaviors are allowed by clients for applications using the NTLM Security Support Provider (SSP). The SSP Interface (SSPI) is used by applications that need authentication services. The setting does not modify how the authentication sequence works but instead require certain behaviors in applications that use the SSPI. The recommended state for this setting is: Require NTLMv2 session security, Require 128-bit encryption. Note: These values are dependent on the Network security: LAN Manager Authentication Level (Rule 2.3.11.7) security setting value." + rationale: "You can enable both options for this policy setting to help protect network traffic that uses the NTLM Security Support Provider (NTLM SSP) from being exposed or tampered with by an attacker who has gained access to the same network. In other words, these options help protect against man-in-the-middle attacks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Require NTLMv2 session security, Require 128-bit encryption: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Minimum session security for NTLM SSP based (including secure RPC) clients." + compliance: + - cis: ["2.3.11.9"] + - cis_csc: ["13"] + references: + - 'CCE-35447-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> NTLMMinClientSec -> 537395200' + + - id: 13042 + title: "Ensure 'Network security: Minimum session security for NTLM SSP based (including secure RPC) servers' is set to 'Require NTLMv2 session security, Require 128-bit encryption'" + description: "This policy setting determines which behaviors are allowed by servers for applications using the NTLM Security Support Provider (SSP). The SSP Interface (SSPI) is used by applications that need authentication services. The setting does not modify how the authentication sequence works but instead require certain behaviors in applications that use the SSPI. The recommended state for this setting is: Require NTLMv2 session security, Require 128-bit encryption. Note: These values are dependent on the Network security: LAN Manager Authentication Level (Rule 2.3.11.7) security setting value." + rationale: "You can enable all of the options for this policy setting to help protect network traffic that uses the NTLM Security Support Provider (NTLM SSP) from being exposed or tampered with by an attacker who has gained access to the same network. That is, these options help protect against man-in-the-middle attacks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Require NTLMv2 session security, Require 128-bit encryption: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Minimum session security for NTLM SSP based (including secure RPC) servers." + compliance: + - cis: ["2.3.11.10"] + - cis_csc: ["13"] + references: + - 'CCE-35108-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> NTLMMinServerSec -> 537395200' + + - id: 13043 + title: "Ensure 'System objects: Require case insensitivity for non-Windows subsystems' is set to 'Enabled'" + description: "This policy setting determines whether case insensitivity is enforced for all subsystems. The Microsoft Win32 subsystem is case insensitive. However, the kernel supports case sensitivity for other subsystems, such as the Portable Operating System Interface for UNIX (POSIX). Because Windows is case insensitive (but the POSIX subsystem will support case sensitivity), failure to enforce this policy setting makes it possible for a user of the POSIX subsystem to create a file with the same name as another file by using mixed case to label it. Such a situation can block access to these files by another user who uses typical Win32 tools, because only one of the files will be available. The recommended state for this setting is: Enabled." + rationale: "Because Windows is case-insensitive but the POSIX subsystem will support case sensitivity, failure to enable this policy setting would make it possible for a user of that subsystem to create a file with the same name as another file but with a different mix of upper and lower case letters. Such a situation could potentially confuse users when they try to access such files from normal Win32 tools because only one of the files will be available." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System objects: Require case insensitivity for nonWindows subsystems." + compliance: + - cis: ["2.3.15.1"] + references: + - 'CCE-35008-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Kernel -> ObCaseInsensitive -> 1' + + - id: 13044 + title: "Ensure 'System objects: Strengthen default permissions of internal system objects (e.g. Symbolic Links)' is set to 'Enabled'" + description: "This policy setting determines the strength of the default discretionary access control list (DACL) for objects. Active Directory maintains a global list of shared system resources, such as DOS device names, mutexes, and semaphores. In this way, objects can be located and shared among processes. Each type of object is created with a default DACL that specifies who can access the objects and what permissions are granted. The recommended state for this setting is: Enabled." + rationale: "This setting determines the strength of the default DACL for objects. Windows maintains a global list of shared computer resources so that objects can be located and shared among processes. Each type of object is created with a default DACL that specifies who can access the objects and with what permissions." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System objects: Strengthen default permissions of internal system objects (e.g. Symbolic Links)" + compliance: + - cis: ["2.3.15.2"] + - cis_csc: ["14.4", "14.6"] + references: + - 'CCE-35232-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager -> ProtectionMode -> 1' + + - id: 13045 + title: "Ensure 'User Account Control: Admin Approval Mode for the Built-in Administrator account' is set to 'Enabled'" + description: "This policy setting controls the behavior of Admin Approval Mode for the built-in Administrator account. The recommended state for this setting is: Enabled." + rationale: "One of the risks that the User Account Control feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. An attack vector for these programs was to discover the password of the account named Administrator because that user account was created for all installations of Windows. To address this risk, in Windows Vista and newer, the built-in Administrator account is now disabled by default. In a default installation of a new computer, accounts with administrative control over the computer are initially set up in one of two ways: - If the computer is not joined to a domain, the first user account you create has the equivalent permissions as a local administrator. - If the computer is joined to a domain, no local administrator accounts are created. The Enterprise or Domain Administrator must log on to the computer and create one if a local administrator account is warranted. Once Windows is installed, the built-in Administrator account may be manually enabled, but we strongly recommend that this account remain disabled." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Admin Approval Mode for the Built-in Administrator account." + compliance: + - cis: ["2.3.17.1"] + - cis_csc: ["5.1"] + references: + - 'CCE-35338-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> FilterAdministratorToken -> 1' + + - id: 13046 + title: "Ensure 'User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop' is set to 'Disabled'" + description: "This policy setting controls whether User Interface Accessibility (UIAccess or UIA) programs can automatically disable the secure desktop for elevation prompts used by a standard user. The recommended state for this setting is: Disabled." + rationale: "One of the risks that the UAC feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. This setting allows the administrator to perform operations that require elevated privileges while connected via Remote Assistance. This increases security in that organizations can use UAC even when end user support is provided remotely. However, it also reduces security by adding the risk that an administrator might allow an unprivileged user to share elevated privileges for an application that the administrator needs to use during the Remote Desktop session." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop." + compliance: + - cis: ["2.3.17.2"] + - cis_csc: ["16"] + references: + - 'CCE-35458-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableUIADesktopToggle -> 0' + + - id: 13047 + title: "Ensure 'User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode' is set to 'Prompt for consent on the secure desktop'" + description: "This policy setting controls the behavior of the elevation prompt for administrators. The recommended state for this setting is: Prompt for consent on the secure desktop." + rationale: "One of the risks that the UAC feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. This setting raises awareness to the administrator of elevated privilege operations and permits the administrator to prevent a malicious program from elevating its privilege when the program attempts to do so." + remediation: "To establish the recommended configuration via GP, set the following UI path to Prompt for consent on the secure desktop: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode." + compliance: + - cis: ["2.3.17.3"] + - cis_csc: ["5.1"] + references: + - 'CCE-33784-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ConsentPromptBehaviorAdmin -> 2' + + - id: 13048 + title: "Ensure 'User Account Control: Behavior of the elevation prompt for standard users' is set to 'Automatically deny elevation requests'" + description: "This policy setting controls the behavior of the elevation prompt for standard users. The recommended state for this setting is: Automatically deny elevation requests." + rationale: "One of the risks that the User Account Control feature introduced with Windows Vista is trying to mitigate is that of malicious programs running under elevated credentials without the user or administrator being aware of their activity. This setting raises awareness to the user that a program requires the use of elevated privilege operations and requires that the user be able to supply administrative credentials in order for the program to run." + remediation: "To establish the recommended configuration via GP, set the following UI path to Automatically deny elevation requests: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Behavior of the elevation prompt for standard users." + compliance: + - cis: ["2.3.17.4"] + - cis_csc: ["5.1"] + references: + - 'CCE-33785-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ConsentPromptBehaviorUser -> 0' + + - id: 13049 + title: "Ensure 'User Account Control: Detect application installations and prompt for elevation' is set to 'Enabled'" + description: "This policy setting controls the behavior of application installation detection for the computer. The recommended state for this setting is: Enabled." + rationale: "Some malicious software will attempt to install itself after being given permission to run. For example, malicious software with a trusted application shell. The user may have given permission for the program to run because the program is trusted, but if they are then prompted for installation of an unknown component this provides another way of trapping the software before it can do damage." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Detect application installations and prompt for elevation." + compliance: + - cis: ["2.3.17.5"] + - cis_csc: ["5.1"] + references: + - 'CCE-35429-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableInstallerDetection -> 1' + + - id: 13050 + title: "Ensure 'User Account Control: Only elevate UIAccess applications that are installed in secure locations' is set to 'Enabled'" + description: "This policy setting controls whether applications that request to run with a User Interface Accessibility (UIAccess) integrity level must reside in a secure location in the file system. Secure locations are limited to the following: - …\\Program Files\\, including subfolders - …\\Windows\\system32\\ - …\\Program Files (x86)\\, including subfolders (for 64-bit versions of Windows) Note: Windows enforces a public key infrastructure (PKI) signature check on any interactive application that requests to run with a UIAccess integrity level regardless of the state of this security setting. The recommended state for this setting is: Enabled." + rationale: "UIAccess Integrity allows an application to bypass User Interface Privilege Isolation (UIPI) restrictions when an application is elevated in privilege from a standard user to an administrator. This is required to support accessibility features such as screen readers that are transmitting user interfaces to alternative forms. A process that is started with UIAccess rights has the following abilities: - To set the foreground window. - To drive any application window using SendInput function. - To use read input for all integrity levels using low-level hooks, raw input, GetKeyState, GetAsyncKeyState, and GetKeyboardInput. - To set journal hooks. - To uses AttachThreadInput to attach a thread to a higher integrity input queue." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Only elevate UIAccess applications that are installed in secure locations." + compliance: + - cis: ["2.3.17.6"] + - cis_csc: ["5.1"] + references: + - 'CCE-35401-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableSecureUIAPaths -> 1' + + - id: 13051 + title: "Ensure 'User Account Control: Run all administrators in Admin Approval Mode' is set to 'Enabled'" + description: "This policy setting controls the behavior of all User Account Control (UAC) policy settings for the computer. If you change this policy setting, you must restart your computer. The recommended state for this setting is: Enabled. Note: If this policy setting is disabled, the Security Center notifies you that the overall security of the operating system has been reduced." + rationale: "This is the setting that turns on or off UAC. If this setting is disabled, UAC will not be used and any security benefits and risk mitigations that are dependent on UAC will not be present on the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Run all administrators in Admin Approval Mode." + compliance: + - cis: ["2.3.17.7"] + - cis_csc: ["5.1"] + references: + - 'CCE-33788-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableLUA -> 1' + + - id: 13052 + title: "Ensure 'User Account Control: Switch to the secure desktop when prompting for elevation' is set to 'Enabled'" + description: "This policy setting controls whether the elevation request prompt is displayed on the interactive user's desktop or the secure desktop. The recommended state for this setting is: Enabled." + rationale: "Standard elevation prompt dialog boxes can be spoofed, which may cause users to disclose their passwords to malicious software. The secure desktop presents a very distinct appearance when prompting for elevation, where the user desktop dims, and the elevation prompt UI is more prominent. This increases the likelihood that users who become accustomed to the secure desktop will recognize a spoofed elevation prompt dialog box and not fall for the trick." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Switch to the secure desktop when prompting for elevation." + compliance: + - cis: ["2.3.17.8"] + - cis_csc: ["5.1"] + references: + - 'CCE-33815-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> PromptOnSecureDesktop -> 1' + + - id: 13053 + title: "Ensure 'User Account Control: Virtualize file and registry write failures to per-user locations' is set to 'Enabled'" + description: "This policy setting controls whether application write failures are redirected to defined registry and file system locations. This policy setting mitigates applications that run as administrator and write run-time application data to: - %ProgramFiles% - %Windir% - %Windir%\\system32 - HKEY_LOCAL_MACHINE\\Software The recommended state for this setting is: Enabled." + rationale: "This setting reduces vulnerabilities by ensuring that legacy applications only write data to permitted locations." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Virtualize file and registry write failures to per-user locations." + compliance: + - cis: ["2.3.17.9"] + references: + - 'CCE-35459-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableVirtualization -> 1' + +# 5 System Services + - id: 13054 + title: "Ensure 'Computer Browser (Browser)' is set to 'Disabled' or 'Not Installed'" + description: "Maintains an updated list of computers on the network and supplies this list to computers designated as browsers. The recommended state for this setting is: Disabled or Not Installed. Note: In Windows 8.1 and Windows 10, this service is bundled with the SMB 1.0/CIFS File Sharing Support optional feature. As a result, removing that feature (highly recommended unless backward compatibility is needed to XP/2003 and older Windows OSes - see Stop using SMB1 | Storage at Microsoft) will also remediate this recommendation. The feature is not installed by default starting with Windows 10 R1709." + rationale: "This is a legacy service - its sole purpose is to maintain a list of computers and their network shares in the environment (i.e. \"Network Neighborhood\"). If enabled, it generates a lot of unnecessary traffic, including \"elections\" to see who gets to be the \"master browser\". This noisy traffic could also aid malicious attackers in discovering online machines, because the service also allows anyone to \"browse\" for shared resources without any authentication. This service used to be running by default in older Windows versions (e.g. Windows XP), but today it only remains for backward compatibility for very old software that requires it." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Computer Browser" + compliance: + - cis: ["5.3"] + - cis_csc: ["9.1", "9.2"] + condition: any + rules: + - 'not r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Browser' + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Browser -> Start -> 4' + + - id: 13055 + title: "Ensure 'IIS Admin Service (IISADMIN)' is set to 'Disabled' or 'Not Installed'" + description: "Enables the server to administer the IIS metabase. The IIS metabase stores configuration for the SMTP and FTP services. The recommended state for this setting is: Disabled or Not Installed. Note: This service is not installed by default. It is supplied with Windows, but is installed by enabling an optional Windows feature (Internet Information Services). Note #2: An organization may choose to selectively grant exceptions to web developers to allow IIS (or another web server) on their workstation, in order for them to locally test & develop web pages. However, the organization should track those machines and ensure the security controls and mitigations are kept up to date, to reduce risk of compromise." + rationale: "Hosting a website from a workstation is an increased security risk, as the attack surface of that workstation is then greatly increased. If proper security mitigations are not followed, the chance of successful attack increases significantly. Note: This security concern applies to any web server application installed on a workstation, not just IIS." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\IIS Admin Service" + compliance: + - cis: ["5.6"] + - cis_csc: ["9.1", "9.2"] + condition: any + rules: + - 'not r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IISADMIN' + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IISADMIN -> Start -> 4' + + - id: 13056 + title: "Ensure 'Infrared monitor service (irmon)' is set to 'Disabled'" + description: "Detects other Infrared devices that are in range and launches the file transfer application. The recommended state for this setting is: Disabled." + rationale: "Infrared connections can potentially be a source of data compromise - especially via the automatic \"file transfer application\" functionality. Enterprise-managed systems should utilize a more secure method of connection than infrared." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Infrared monitor service" + compliance: + - cis: ["5.7"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\irmon -> Start -> 4' + + - id: 13057 + title: "Ensure 'Internet Connection Sharing (ICS) (SharedAccess) ' is set to 'Disabled'" + description: "Provides network access translation, addressing, name resolution and/or intrusion prevention services for a home or small office network. The recommended state for this setting is: Disabled." + rationale: "Internet Connection Sharing (ICS) is a feature that allows someone to \"share\" their Internet connection with other machines on the network - it was designed for home or small office environments where only one machine has Internet access - it effectively turns that machine into an Internet router. This feature causes the bridging of networks and likely bypassing other, more secure pathways. It should not be used on any enterprise-managed system." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Internet Connection Sharing (ICS)" + compliance: + - cis: ["5.8"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess -> Start -> 4' + + - id: 13058 + title: "Ensure 'LxssManager (LxssManager)' is set to 'Disabled' or 'Not Installed'" + description: "The LXSS Manager service supports running native ELF binaries. The service provides the infrastructure necessary for ELF binaries to run on Windows. The recommended state for this setting is: Disabled or Not Installed. Note: This service is not installed by default. It is supplied with Windows, but is installed by enabling an optional Windows feature (Windows Subsystem for Linux)." + rationale: "The Linux SubSystem (LXSS) Manager allows full system access to Linux applications on Windows, including the file system. While this can certainly have some functionality and performance benefits for running those applications, it also creates new security risks in the event that a hacker injects malicious code into a Linux application. For best security, it is preferred to run Linux applications on Linux, and Windows applications on Windows." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\LxssManager" + compliance: + - cis: ["5.10"] + - cis_csc: ["9.1", "9.2"] + condition: any + rules: + - 'not r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager' + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> Start -> 4' + + - id: 13059 + title: "Ensure 'Microsoft FTP Service (FTPSVC)' is set to 'Disabled' or 'Not Installed'" + description: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\LxssManager" + rationale: "Hosting an FTP server (especially a non-secure FTP server) from a workstation is an increased security risk, as the attack surface of that workstation is then greatly increased. Note: This security concern applies to any FTP server application installed on a workstation, not just IIS." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Microsoft FTP Service" + compliance: + - cis: ["5.11"] + - cis_csc: ["9.1", "9.2"] + condition: any + rules: + - 'not r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FTPSVC' + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FTPSVC -> Start -> 4' + + - id: 13060 + title: "Ensure 'Remote Procedure Call (RPC) Locator (RpcLocator)' is set to 'Disabled'" + description: "In Windows 2003 and older versions of Windows, the Remote Procedure Call (RPC) Locator service manages the RPC name service database. In Windows Vista and newer versions of Windows, this service does not provide any functionality and is present for application compatibility. The recommended state for this setting is: Disabled." + rationale: "This is a legacy service that has no value or purpose other than application compatibility for very old software. It should be disabled unless there is a specific old application still in use on the system that requires it." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Remote Procedure Call (RPC) Locator" + compliance: + - cis: ["5.24"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RpcLocator -> Start -> 4' + + - id: 13061 + title: "Ensure 'Routing and Remote Access (RemoteAccess)' is set to 'Disabled'" + description: "Offers routing services to businesses in local area and wide area network environments. The recommended state for this setting is: Disabled." + rationale: "This service's main purpose is to provide Windows router functionality - this is not an appropriate use of workstations in an enterprise managed environment." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Routing and Remote Access" + compliance: + - cis: ["5.26"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RemoteAccess -> Start -> 4' + + - id: 13062 + title: "Ensure 'Simple TCP/IP Services (simptcp)' is set to 'Disabled' or 'Not Installed'" + description: "Supports the following TCP/IP services: Character Generator, Daytime, Discard, Echo, and Quote of the Day. The recommended state for this setting is: Disabled or Not Installed. Note: This service is not installed by default. It is supplied with Windows, but is installed by enabling an optional Windows feature (Simple TCPIP services (i.e. echo, daytime etc))." + rationale: "The Simple TCP/IP Services have very little purpose in a modern enterprise environment - allowing them might increase exposure and risk for attack." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Simple TCP/IP Services" + compliance: + - cis: ["5.28"] + - cis_csc: ["9.1", "9.2"] + condition: any + rules: + - 'not r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\simptcp' + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\simptcp -> Start -> 4' + + - id: 13063 + title: "Ensure 'SSDP Discovery (SSDPSRV)' is set to 'Disabled'" + description: "Discovers networked devices and services that use the SSDP discovery protocol, such as UPnP devices. Also announces SSDP devices and services running on the local computer. The recommended state for this setting is: Disabled." + rationale: "Universal Plug n Play (UPnP) is a real security risk - it allows automatic discovery and attachment to network devices. Notes that UPnP is different than regular Plug n Play (PnP). Workstations should not be advertising their services (or automatically discovering and connecting to networked services) in a security-conscious enterprise managed environment." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\SSDP Discovery" + compliance: + - cis: ["5.30"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SSDPSRV -> Start -> 4' + + - id: 13064 + title: "Ensure 'UPnP Device Host (upnphost)' is set to 'Disabled'" + description: "Allows UPnP devices to be hosted on this computer. The recommended state for this setting is: Disabled." + rationale: "Universal Plug n Play (UPnP) is a real security risk - it allows automatic discovery and attachment to network devices. Notes that UPnP is different than regular Plug n Play (PnP). Workstations should not be advertising their services (or automatically discovering and connecting to networked services) in a security-conscious enterprise managed environment." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\UPnP Device Host" + compliance: + - cis: ["5.31"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\upnphost -> Start -> 4' + + - id: 13065 + title: "Ensure 'Web Management Service (WMSvc)' is set to 'Disabled' or 'Not Installed'" + description: "The Web Management Service enables remote and delegated management capabilities for administrators to manage for the Web server, sites and applications present on the machine. The recommended state for this setting is: Disabled or Not Installed. Note: This service is not installed by default. It is supplied with Windows, but is installed by enabling an optional Windows feature (Internet Information Services - Web Management Tools - IIS Management Service)." + rationale: "Remote web administration of IIS on a workstation is an increased security risk, as the attack surface of that workstation is then greatly increased. If proper security mitigations are not followed, the chance of successful attack increases significantly." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Web Management Service" + compliance: + - cis: ["5.32"] + - cis_csc: ["9.1", "9.2"] + condition: any + rules: + - 'not r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WMSvc' + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WMSvc -> Start -> 4' + + - id: 13066 + title: "Ensure 'Windows Media Player Network Sharing Service (WMPNetworkSvc)' is set to 'Disabled' or 'Not Installed'" + description: "Shares Windows Media Player libraries to other networked players and media devices using Universal Plug and Play. The recommended state for this setting is: Disabled or Not Installed" + rationale: "Network sharing of media from Media Player has no place in an enterprise managed environment." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Windows Media Player Network Sharing Service" + compliance: + - cis: ["5.35"] + - cis_csc: ["9.1", "9.2"] + condition: any + rules: + - 'not r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WMPNetworkSvc' + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WMPNetworkSvc -> Start -> 4' + + - id: 13067 + title: "Ensure 'Windows Mobile Hotspot Service (icssvc)' is set to 'Disabled'" + description: "Provides the ability to share a cellular data connection with another device. The recommended state for this setting is: Disabled." + rationale: "The capability to run a mobile hotspot from a domain-connected computer could easily expose the internal network to wardrivers or other hackers." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Windows Mobile Hotspot Service" + compliance: + - cis: ["5.36"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\icssvc -> Start -> 4' + + - id: 13068 + title: "Ensure 'World Wide Web Publishing Service (W3SVC)' is set to 'Disabled' or 'Not Installed'" + description: "Provides Web connectivity and administration through the Internet Information Services Manager. The recommended state for this setting is: Disabled or Not Installed. Note: This service is not installed by default. It is supplied with Windows, but is installed by enabling an optional Windows feature (Internet Information Services - World Wide Web Services). Note #2: An organization may choose to selectively grant exceptions to web developers to allow IIS (or another web server) on their workstation, in order for them to locally test & develop web pages. However, the organization should track those machines and ensure the security controls and mitigations are kept up to date, to reduce risk of compromise." + rationale: "Hosting a website from a workstation is an increased security risk, as the attack surface of that workstation is then greatly increased. If proper security mitigations are not followed, the chance of successful attack increases significantly. Note: This security concern applies to any web server application installed on a workstation, not just IIS." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\World Wide Web Publishing Service" + compliance: + - cis: ["5.40"] + - cis_csc: ["9.1", "9.2"] + condition: any + rules: + - 'not r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC' + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC -> Start -> 4' + + - id: 13069 + title: "Ensure 'Xbox Accessory Management Service (XboxGipSvc)' is set to 'Disabled'" + description: "This service manages connected Xbox Accessories. The recommended state for this setting is: Disabled." + rationale: "Xbox Live is a gaming service and has no place in an enterprise managed environment (perhaps unless it is a gaming company)." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Xbox Accessory Management Service" + compliance: + - cis: ["5.41"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XboxGipSvc -> Start -> 4' + + - id: 13070 + title: "Ensure 'Xbox Game Monitoring (xbgm)' is set to 'Disabled'" + description: "This service supports Xbox Game Monitoring. The recommended state for this setting is: Disabled." + rationale: "Xbox Live is a gaming service and has no place in an enterprise managed environment (perhaps unless it is a gaming company)." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Xbox Game Monitoring" + compliance: + - cis: ["5.42"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\xbgm -> Start -> 4' + + - id: 13071 + title: "Ensure 'Xbox Live Auth Manager (XblAuthManager)' is set to 'Disabled'" + description: "Provides authentication and authorization services for interacting with Xbox Live. The recommended state for this setting is: Disabled." + rationale: "Xbox Live is a gaming service and has no place in an enterprise managed environment (perhaps unless it is a gaming company)." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Xbox Live Auth Manager" + compliance: + - cis: ["5.43"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XblAuthManager -> Start -> 4' + + - id: 13072 + title: "Ensure 'Xbox Live Game Save (XblGameSave)' is set to 'Disabled'" + description: "This service syncs save data for Xbox Live save enabled games. The recommended state for this setting is: Disabled." + rationale: "Xbox Live is a gaming service and has no place in an enterprise managed environment (perhaps unless it is a gaming company)." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Xbox Live Game Save" + compliance: + - cis: ["5.44"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XblGameSave -> Start -> 4' + + - id: 13073 + title: "Ensure 'Xbox Live Networking Service (XboxNetApiSvc)' is set to 'Disabled'" + description: "This service supports the Windows.Networking.XboxLive application programming interface. The recommended state for this setting is: Disabled." + rationale: "Xbox Live is a gaming service and has no place in an enterprise managed environment (perhaps unless it is a gaming company)." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Xbox Live Networking Service" + compliance: + - cis: ["5.45"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XboxNetApiSvce -> Start -> 4' + +# 9 Windows Firewall with Advanced Security + - id: 13074 + title: "Ensure 'Windows Firewall: Domain: Firewall state' is set to 'On (recommended)'" + description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." + rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Firewall state" + compliance: + - cis: ["9.1.1"] + - cis_csc: ["9.2", "9.4"] + references: + - 'CCE-33160-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> EnableFirewall -> 1' + + - id: 13075 + title: "Ensure 'Windows Firewall: Domain: Inbound connections' is set to 'Block (default)'" + description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." + rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Inbound connections" + compliance: + - cis: ["9.1.2"] + - cis_csc: ["9.2", "9.4"] + references: + - 'CCE-33063-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DefaultInboundAction -> 1' + + - id: 13076 + title: "Ensure 'Windows Firewall: Domain: Outbound connections' is set to 'Allow (default)'" + description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default)." + rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." + remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Outbound connections" + compliance: + - cis: ["9.1.3"] + - cis_csc: ["9.2", "9.4"] + references: + - 'CCE-33098-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DefaultOutboundAction -> 0' + + - id: 13077 + title: "Ensure 'Windows Firewall: Domain: Settings: Display a notification' is set to 'No'" + description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." + rationale: "Firewall notifications can be complex and may confuse the end users, who would not be able to address the alert." + remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Settings Customize\\Display a notification" + compliance: + - cis: ["9.1.4"] + references: + - 'CCE-33062-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DisableNotifications -> 0' + + - id: 13078 + title: "Ensure 'Windows Firewall: Domain: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log'" + description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log" + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Name" + compliance: + - cis: ["9.1.5"] + - cis_csc: ["6.2", "6.3"] + references: + - 'CCE-34176-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFilePath -> r:%SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log' + + - id: 13079 + title: "Ensure 'Windows Firewall: Domain: Logging: Size limit (KB)' is set to '16,384 KB or greater'" + description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Size limit (KB)" + compliance: + - cis: ["9.1.6"] + - cis_csc: ["6.3", "6.4"] + references: + - 'CCE-35083-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> n:^(\d+) compare >= 16384' + + - id: 13080 + title: "Ensure 'Windows Firewall: Domain: Logging: Log dropped packets' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Log dropped packets" + compliance: + - cis: ["9.1.7"] + - cis_csc: ["6.2", "6.3"] + references: + - 'CCE-35252-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogDroppedPackets -> 1' + + - id: 13081 + title: "Ensure 'Windows Firewall: Domain: Logging: Log successful connections' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Log successful connections" + compliance: + - cis: ["9.1.8"] + - cis_csc: ["6.2", "6.3"] + references: + - 'CCE-35306-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogSuccessfulConnections -> 1' + + - id: 13082 + title: "Ensure 'Windows Firewall: Private: Firewall state' is set to 'On (recommended)'" + description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." + rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Firewall state" + compliance: + - cis: ["9.2.1"] + - cis_csc: ["9.2", "9.4"] + references: + - 'CCE-33066-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> EnableFirewall -> 1' + + - id: 13083 + title: "Ensure 'Windows Firewall: Private: Inbound connections' is set to 'Block (default)'" + description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." + rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Inbound connections" + compliance: + - cis: ["9.2.2"] + - cis_csc: ["9.2", "9.4"] + references: + - 'CCE-33161-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DefaultInboundAction -> 1' + + - id: 13084 + title: "Ensure 'Windows Firewall: Private: Outbound connections' is set to 'Allow (default)'" + description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default). Note: If you set Outbound connections to Block and then deploy the firewall policy by using a GPO, computers that receive the GPO settings cannot receive subsequent Group Policy updates unless you create and deploy an outbound rule that enables Group Policy to work. Predefined rules for Core Networking include outbound rules that enable Group Policy to work. Ensure that these outbound rules are active, and thoroughly test firewall profiles before deploying." + rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." + remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Outbound connections" + compliance: + - cis: ["9.2.3"] + - cis_csc: ["9.2", "9.4"] + references: + - 'CCE-33162-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DefaultOutboundAction -> 0' + + - id: 13085 + title: "Ensure 'Windows Firewall: Private: Settings: Display a notification' is set to 'No'" + description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." + rationale: "Firewall notifications can be complex and may confuse the end users, who would not be able to address the alert." + remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Settings Customize\\Display a notification" + compliance: + - cis: ["9.2.4"] + references: + - 'CCE-33065-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DisableNotifications -> 1' + + - id: 13086 + title: "Ensure 'Windows Firewall: Private: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log'" + description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Name" + compliance: + - cis: ["9.2.5"] + - cis_csc: ["6.2", "6.3"] + references: + - 'CCE-33437-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFilePath -> r:%SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log' + + - id: 13087 + title: "Ensure 'Windows Firewall: Private: Logging: Size limit (KB)' is set to '16,384 KB or greater'" + description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Size limit (KB)" + compliance: + - cis: ["9.2.6"] + - cis_csc: ["6.3", "6.4"] + references: + - 'CCE-34356-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> n:^(\d+) compare >= 16384' + + - id: 13088 + title: "Ensure 'Windows Firewall: Private: Logging: Log dropped packets' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Log dropped packets" + compliance: + - cis: ["9.2.7"] + - cis_csc: ["6.2", "6.3"] + references: + - 'CCE-33436-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogDroppedPackets -> 1' + + - id: 13089 + title: "Ensure 'Windows Firewall: Private: Logging: Log successful connections' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Log successful connections" + compliance: + - cis: ["9.2.8"] + - cis_csc: ["6.2", "6.3"] + references: + - 'CCE-34177-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogSuccessfulConnections -> 1' + + - id: 13090 + title: "Ensure 'Windows Firewall: Public: Firewall state' is set to 'On (recommended)'" + description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." + rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service" + remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Firewall state" + compliance: + - cis: ["9.3.1"] + - cis_csc: ["9.2", "9.4"] + references: + - 'CCE-35703-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> EnableFirewall -> 1' + + - id: 13091 + title: "Ensure 'Windows Firewall: Public: Inbound connections' is set to 'Block (default)'" + description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." + rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Inbound connections" + compliance: + - cis: ["9.3.2"] + - cis_csc: ["9.2", "9.4"] + references: + - 'CCE-33069-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DefaultInboundAction -> 1' + + - id: 13092 + title: "Ensure 'Windows Firewall: Public: Outbound connections' is set to 'Allow (default)'" + description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default). Note: If you set Outbound connections to Block and then deploy the firewall policy by using a GPO, computers that receive the GPO settings cannot receive subsequent Group Policy updates unless you create and deploy an outbound rule that enables Group Policy to work. Predefined rules for Core Networking include outbound rules that enable Group Policy to work. Ensure that these outbound rules are active, and thoroughly test firewall profiles before deploying." + rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." + remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Outbound connections" + compliance: + - cis: ["9.3.3"] + - cis_csc: ["9.2", "9.4"] + references: + - 'CCE-33070-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DefaultOutboundAction -> 0' + + - id: 13093 + title: "Ensure 'Windows Firewall: Public: Settings: Display a notification' is set to 'No'" + description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No" + rationale: "Some organizations may prefer to avoid alarming users when firewall rules block certain types of network activity. However, notifications can be helpful when troubleshooting network issues involving the firewall." + remediation: "To establish the recommended configuration via GP, set the following UI path to 'No': Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Display a notification" + compliance: + - cis: ["9.3.4"] + references: + - 'CCE-33068-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DisableNotifications -> 1' + + - id: 13094 + title: "Ensure 'Windows Firewall: Public: Settings: Apply local firewall rules' is set to 'No'" + description: "This setting controls whether local administrators are allowed to create local firewall rules that apply together with firewall rules configured by Group Policy. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." + rationale: "When in the Public profile, there should be no special local firewall exceptions per computer. These settings should be managed by a centralized policy." + remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Apply local firewall rules" + compliance: + - cis: ["9.3.5"] + - cis_csc: ["5.1"] + references: + - 'CCE-35537-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> AllowLocalPolicyMerge -> 0' + + - id: 13095 + title: "Ensure 'Windows Firewall: Public: Settings: Apply local connection security rules' is set to 'No'" + description: "This setting controls whether local administrators are allowed to create connection security rules that apply together with connection security rules configured by Group Policy. The recommended state for this setting is: No." + rationale: "Users with administrative privileges might create firewall rules that expose the system to remote attack." + remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Apply local connection security rules" + compliance: + - cis: ["9.3.6"] + - cis_csc: ["5.1"] + references: + - 'CCE-33099-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> AllowLocalIPsecPolicyMerge -> 0' + + - id: 13096 + title: "Ensure 'Windows Firewall: Public: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log'" + description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Name" + compliance: + - cis: ["9.3.7"] + - cis_csc: ["6.2", "6.3"] + references: + - 'CCE-35117-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFilePath -> r:%SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log' + + - id: 13097 + title: "Ensure 'Windows Firewall: Public: Logging: Size limit (KB)' is set to '16,384 KB or greater'" + description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Size limit (KB)" + compliance: + - cis: ["9.3.8"] + - cis_csc: ["6.3", "6.4"] + references: + - 'CCE-35421-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> n:^(\d+) compare >= 16384' + + - id: 13098 + title: "Ensure 'Windows Firewall: Public: Logging: Log dropped packets' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Log dropped packets" + compliance: + - cis: ["9.3.9"] + - cis_csc: ["6.2", "6.3"] + references: + - 'CCE-35116-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogDroppedPackets -> 1' + + - id: 13099 + title: "Ensure 'Windows Firewall: Public: Logging: Log successful connections' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Log successful connections" + compliance: + - cis: ["9.3.10"] + - cis_csc: ["6.2", "6.3"] + references: + - 'CCE-33734-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogSuccessfulConnections -> 1' + +# 18 Administrative templates (Computer) + - id: 13100 + title: "Ensure 'Prevent enabling lock screen camera' is set to 'Enabled'" + description: "Disables the lock screen camera toggle switch in PC Settings and prevents a camera from being invoked on the lock screen. The recommended state for this setting is: Enabled." + rationale: "Disabling the lock screen camera extends the protection afforded by the lock screen to camera features." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Personalization\\Prevent enabling lock screen camera" + compliance: + - cis: ["18.1.1.1"] + references: + - 'CCE-35799-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> NoLockScreenCamera -> 1' + + - id: 13101 + title: "Ensure 'Prevent enabling lock screen slide show' is set to 'Enabled'" + description: "Disables the lock screen slide show settings in PC Settings and prevents a slide show from playing on the lock screen. The recommended state for this setting is: Enabled." + rationale: "Disabling the lock screen slide show extends the protection afforded by the lock screen to slide show contents." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Personalization\\Prevent enabling lock screen slide show" + compliance: + - cis: ["18.1.1.2"] + references: + - 'CCE-35800-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> NoLockScreenSlideshow -> 1' + + - id: 13102 + title: "Ensure 'Allow input personalization' is set to 'Disabled'" + description: "This policy enables the automatic learning component of input personalization that includes speech, inking, and typing. Automatic learning enables the collection of speech and handwriting patterns, typing history, contacts, and recent calendar information. It is required for the use of Cortana. Some of this collected information may be stored on the user's OneDrive, in the case of inking and typing; some of the information will be uploaded to Microsoft to personalize speech. The recommended state for this setting is: Disabled." + rationale: "If this setting is Enabled sensitive information could be stored in the cloud or sent to Microsoft." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Regional and Language Options\\Allow input personalization" + compliance: + - cis: ["18.1.2.2"] + - cis_csc: ["13"] + references: + - 'CCE-41387-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\InputPersonalization -> AllowInputPersonalization -> 0' + + - id: 13103 + title: "Ensure LAPS AdmPwd GPO Extension / CSE is installed" + description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." + rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." + remediation: "In order to utilize LAPS, a minor Active Directory Schema update is required, and a Group Policy Client Side Extension (CSE) must be installed on each managed computer. When LAPS is installed, the file AdmPwd.dll must be present in the following location and registered in Windows (the LAPS AdmPwd GPO Extension / CSE installation does this for you): C:\\Program Files\\LAPS\\CSE\\AdmPwd.dll" + compliance: + - cis: ["18.2.1"] + - cis_csc: ["16.9"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions\{D76B9641-3288-4f75-942D-087DE603E3EA} -> DllName -> C:\\Program Files\\LAPS\\CSE\\AdmPwd.dll' + + - id: 13104 + title: "Ensure 'Do not allow password expiration time longer than required by policy' is set to 'Enabled'" + description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." + rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Do not allow password expiration time longer than required by policy." + compliance: + - cis: ["18.2.2"] + - cis_csc: ["16.2", "16.10"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PwdExpirationProtectionEnabled -> 1' + + - id: 13105 + title: "Ensure 'Enable Local Admin Password Management' is set to 'Enabled'" + description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." + rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Enable Local Admin Password Management" + compliance: + - cis: ["18.2.3"] + - cis_csc: ["16.9"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> AdmPwdEnabled -> 1' + + - id: 13106 + title: "Ensure 'Password Settings: Password Complexity' is set to 'Enabled: Large letters + small letters + numbers + special characters'" + description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled: Large letters + small letters + numbers + special characters. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." + rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, and configure the Password Complexity option to Large letters + small letters + numbers + special characters: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Password Settings" + compliance: + - cis: ["18.2.4"] + - cis_csc: ["5.7"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordComplexity -> 4' + + - id: 13107 + title: "Ensure 'Password Settings: Password Length' is set to 'Enabled: 15 or more'" + description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled: 15 or more. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." + rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, and configure the Password Length option to 15 or more: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Password Settings" + compliance: + - cis: ["18.2.5"] + - cis_csc: ["5.7"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordLength -> n:^(\d+) compare >= 15' + + - id: 13108 + title: "Ensure 'Password Settings: Password Age (Days)' is set to 'Enabled: 30 or fewer'" + description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled: 30 or fewer. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." + rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, and configure the Password Age (Days) option to 30 or fewer: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Password Settings" + compliance: + - cis: ["18.2.6"] + - cis_csc: ["16.5"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> n:^(\d+) compare <= 30' + + - id: 13109 + title: "Ensure 'Apply UAC restrictions to local accounts on network logons' is set to 'Enabled'" + description: "This setting controls whether local accounts can be used for remote administration via network logon (e.g., NET USE, connecting to C$, etc.). Local accounts are at high risk for credential theft when the same account and password is configured on multiple systems. Enabling this policy significantly reduces that risk. Enabled: Applies UAC token-filtering to local accounts on network logons. Membership in powerful group such as Administrators is disabled and powerful privileges are removed from the resulting access token. This configures the LocalAccountTokenFilterPolicy registry value to 0. This is the default behavior for Windows. Disabled: Allows local accounts to have full administrative rights when authenticating via network logon, by configuring the LocalAccountTokenFilterPolicy registry value to 1." + rationale: "Local accounts are at high risk for credential theft when the same account and password is configured on multiple systems. Ensuring this policy is Enabled significantly reduces that risk." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\Apply UAC restrictions to local accounts on network logons." + compliance: + - cis: ["18.3.1"] + - cis_csc: ["5.8", "4.3"] + references: + - 'CCE-35486-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> LocalAccountTokenFilterPolicy -> 0' + + - id: 13110 + title: "Ensure 'Configure SMB v1 client driver' is set to 'Enabled: Disable driver'" + description: "This setting configures the start type for the Server Message Block version 1 (SMBv1) client driver service (MRxSmb10), which is recommended to be disabled. The recommended state for this setting is: Enabled: Disable driver. Note: Do not, under any circumstances, configure this overall setting as Disabled, as doing so will delete the underlying registry entry altogether, which will cause serious problems." + rationale: "Since September 2016, Microsoft has strongly encouraged that SMBv1 be disabled and no longer used on modern networks, as it is a 30 year old design that is much more vulnerable to attacks then much newer designs such as SMBv2 and SMBv3." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Disable driver: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\Configure SMB v1 client driver." + compliance: + - cis: ["18.3.2"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\mrxsmb10 -> Start -> 4' + + - id: 13111 + title: "Ensure 'Configure SMB v1 server' is set to 'Disabled'" + description: "This setting configures the server-side processing of the Server Message Block version 1 (SMBv1) protocol. The recommended state for this setting is: Disabled." + rationale: "Since September 2016, Microsoft has strongly encouraged that SMBv1 be disabled and no longer used on modern networks, as it is a 30 year old design that is much more vulnerable to attacks then much newer designs such as SMBv2 and SMBv3." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\Configure SMB v1 server." + compliance: + - cis: ["18.3.3"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters -> SMB1 -> 0' + + - id: 13112 + title: "Ensure 'Enable Structured Exception Handling Overwrite Protection (SEHOP)' is set to 'Enabled'" + description: "Windows includes support for Structured Exception Handling Overwrite Protection (SEHOP). We recommend enabling this feature to improve the security profile of the computer. The recommended state for this setting is: Enabled." + rationale: "This feature is designed to block exploits that use the Structured Exception Handler (SEH) overwrite technique. This protection mechanism is provided at run-time. Therefore, it helps protect applications regardless of whether they have been compiled with the latest improvements, such as the /SAFESEH option." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\Enable Structured Exception Handling Overwrite Protection (SEHOP)" + compliance: + - cis: ["18.3.4"] + - cis_csc: ["8.4", "8.3"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel -> DisableExceptionChainValidation -> 0' + + - id: 13113 + title: "Ensure 'Turn on Windows Defender protection against Potentially Unwanted Applications' is set to 'Enabled'" + description: "Enabling this Windows Defender feature will protect against Potentially Unwanted Applications (PUA), which are sneaky unwanted application bundlers or their bundled applications to deliver adware or malware." + rationale: "This opt-in feature is free and could prevent malicious software from being installed." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\Turn on Windows Defender protection against Potentially Unwanted Applications." + compliance: + - cis: ["18.3.5"] + - cis_csc: ["8.4", "8.3"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\MpEngine -> MpEnablePus -> 1' + + - id: 13114 + title: "Ensure 'WDigest Authentication' is set to 'Disabled'" + description: "When WDigest authentication is enabled, Lsass.exe retains a copy of the user's plaintext password in memory, where it can be at risk of theft. If this setting is not configured, WDigest authentication is disabled in Windows 8.1 and in Windows Server 2012 R2; it is enabled by default in earlier versions of Windows and Windows Server." + rationale: "Preventing the plaintext storage of credentials in memory may reduce opportunity for credential theft." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\WDigest Authentication (disabling may require KB2871997)" + compliance: + - cis: ["18.3.6"] + - cis_csc: ["16.14"] + references: + - 'CCE-35815-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest -> UseLogonCredential -> 0' + + - id: 13115 + title: "Ensure 'MSS: (AutoAdminLogon) Enable Automatic Logon (not recommended)' is set to 'Disabled'" + description: "This setting is separate from the Welcome screen feature in Windows XP and Windows Vista; if that feature is disabled, this setting is not disabled. If you configure a computer for automatic logon, anyone who can physically gain access to the computer can also gain access to everything that is on the computer, including any network or networks to which the computer is connected. Also, if you enable automatic logon, the password is stored in the registry in plaintext, and the specific registry key that stores this value is remotely readable by the Authenticated Users group." + rationale: "If you configure a computer for automatic logon, anyone who can physically gain access to the computer can also gain access to everything that is on the computer, including any network or networks that the computer is connected to. Also, if you enable automatic logon, the password is stored in the registry in plaintext. The specific registry key that stores this setting is remotely readable by the Authenticated Users group. As a result, this entry is appropriate only if the computer is physically secured and if you ensure that untrusted users cannot remotely see the registry." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (AutoAdminLogon) Enable Automatic Logon (not recommended)" + compliance: + - cis: ["18.4.1"] + - cis_csc: ["16"] + references: + - 'CCE-35438-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> AutoAdminLogon -> 0' + + - id: 13116 + title: "Ensure 'MSS: (DisableIPSourceRouting IPv6) IP source routing protection level (protects against packet spoofing)' is set to 'Enabled: Highest protection, source routing is completely disabled'" + description: "IP source routing is a mechanism that allows the sender to determine the IP route that a datagram should follow through the network. The recommended state for this setting is: Enabled: Highest protection, source routing is completely disabled." + rationale: "An attacker could use source routed packets to obscure their identity and location. Source routing allows a computer that sends a packet to specify the route that the packet takes" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Highest protection, source routing is completely disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (DisableIPSourceRouting IPv6) IP source routing protection level (protects against packet spoofing)" + compliance: + - cis: ["18.4.2"] + - cis_csc: ["9"] + references: + - 'CCE-33790-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -> DisableIPSourceRouting -> 2' + + - id: 13117 + title: "Ensure 'MSS: (DisableIPSourceRouting) IP source routing protection level (protects against packet spoofing)' is set to 'Enabled: Highest protection, source routing is completely disabled'" + description: "IP source routing is a mechanism that allows the sender to determine the IP route that a datagram should take through the network. It is recommended to configure this setting to Not Defined for enterprise environments and to Highest Protection for high security environments to completely disable source routing. The recommended state for this setting is: Enabled: Highest protection, source routing is completely disabled." + rationale: "An attacker could use source routed packets to obscure their identity and location. Source routing allows a computer that sends a packet to specify the route that the packet takes." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Highest protection, source routing is completely disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (DisableIPSourceRouting) IP source routing protection level (protects against packet spoofing)" + compliance: + - cis: ["18.4.3"] + - cis_csc: ["9"] + references: + - 'CCE-33816-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> DisableIPSourceRouting -> 2' + + - id: 13118 + title: "Ensure 'MSS: (EnableICMPRedirect) Allow ICMP redirects to override OSPF generated routes' is set to 'Disabled'" + description: "Internet Control Message Protocol (ICMP) redirects cause the IPv4 stack to plumb host routes. These routes override the Open Shortest Path First (OSPF) generated routes. The recommended state for this setting is: Disabled." + rationale: "This behavior is expected. The problem is that the 10 minute time-out period for the ICMP redirect-plumbed routes temporarily creates a network situation in which traffic will no longer be routed properly for the affected host. Ignoring such ICMP redirects will limit the system's exposure to attacks that will impact its ability to participate on the network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (EnableICMPRedirect) Allow ICMP redirects to override OSPF generated routes." + compliance: + - cis: ["18.4.5"] + - cis_csc: ["9"] + references: + - 'CCE-34597-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> EnableICMPRedirect -> 0' + + - id: 13119 + title: "Ensure 'MSS: (NoNameReleaseOnDemand) Allow the computer to ignore NetBIOS name release requests except from WINS servers' is set to 'Enabled'" + description: "NetBIOS over TCP/IP is a network protocol that among other things provides a way to easily resolve NetBIOS names that are registered on Windows-based systems to the IP addresses that are configured on those systems. This setting determines whether the computer releases its NetBIOS name when it receives a name-release request. The recommended state for this setting is: Enabled." + rationale: "The NetBT protocol is designed not to use authentication, and is therefore vulnerable to spoofing. Spoofing makes a transmission appear to come from a user other than the user who performed the action. A malicious user could exploit the unauthenticated nature of the protocol to send a name-conflict datagram to a target computer, which would cause the computer to relinquish its name and not respond to queries. An attacker could send a request over the network and query a computer to release its NetBIOS name. As with any change that could affect applications, it is recommended that you test this change in a non-production environment before you change the production environment. The result of such an attack could be to cause intermittent connectivity issues on the target computer, or even to prevent the use of Network Neighborhood, domain logons, the NET SEND command, or additional NetBIOS name resolution." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (NoNameReleaseOnDemand) Allow the computer to ignore NetBIOS name release requests except from WINS servers." + compliance: + - cis: ["18.4.7"] + - cis_csc: ["9"] + references: + - 'CCE-35405-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters -> NoNameReleaseOnDemand -> 1' + + - id: 13120 + title: "Ensure 'MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended)' is set to 'Enabled'" + description: "The DLL search order can be configured to search for DLLs that are requested by running processes in one of two ways: - Search folders specified in the system path first, and then search the current working folder. - Search current working folder first, and then search the folders specified in the system path. When enabled, the registry value is set to 1. With a setting of 1, the system first searches the folders that are specified in the system path and then searches the current working folder. When disabled the registry value is set to 0 and the system first searches the current working folder and then searches the folders that are specified in the system path. Applications will be forced to search for DLLs in the system path first. For applications that require unique versions of these DLLs that are included with the application, this entry could cause performance or stability problems. The recommended state for this setting is: Enabled." + rationale: "If a user unknowingly executes hostile code that was packaged with additional files that include modified versions of system DLLs, the hostile code could load its own versions of those DLLs and potentially increase the type and degree of damage the code can render." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended)" + compliance: + - cis: ["18.4.9"] + - cis_csc: ["8"] + references: + - 'CCE-34022-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager -> SafeDllSearchMode -> 1' + + - id: 13121 + title: "Ensure 'MSS: (ScreenSaverGracePeriod) The time in seconds before the screen saver grace period expires (0 recommended)' is set to 'Enabled: 5 or fewer seconds'" + description: "Windows includes a grace period between when the screen saver is launched and when the console is actually locked automatically when screen saver locking is enabled. The recommended state for this setting is: Enabled: 5 or fewer seconds." + rationale: "The default grace period that is allowed for user movement before the screen saver lock takes effect is five seconds. If you leave the default grace period configuration, your computer is vulnerable to a potential attack from someone who could approach the console and attempt to log on to the computer before the lock takes effect. An entry to the registry can be made to adjust the length of the grace period." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 5 or fewer seconds: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (ScreenSaverGracePeriod) The time in seconds before the screen saver grace period expires (0 recommended)" + compliance: + - cis: ["18.4.10"] + - cis_csc: ["16.5"] + references: + - 'CCE-34619-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> n:^(\d+) compare <= 5' + + - id: 13122 + title: "Ensure 'MSS: (WarningLevel) Percentage threshold for the security event log at which the system will generate a warning' is set to 'Enabled: 90% or less'" + description: "This setting can generate a security audit in the Security event log when the log reaches a user-defined threshold. The recommended state for this setting is: Enabled: 90% or less." + rationale: "If the Security log reaches 90 percent of its capacity and the computer has not been configured to overwrite events as needed, more recent events will not be written to the log. If the log reaches its capacity and the computer has been configured to shut down when it can no longer record events to the Security log, the computer will shut down and will no longer be available to provide network services." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 90% or less: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (WarningLevel) Percentage threshold for the security event log at which the system will generate a warning" + compliance: + - cis: ["18.4.13"] + - cis_csc: ["6.3", "6.4"] + references: + - 'CCE-35406-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> n:^(\d+) compare <= 90' + + - id: 13123 + title: "Set 'NetBIOS node type' to 'P-node' (Ensure NetBT Parameter 'NodeType' is set to '0x2 (2)')" + description: "This parameter determines which method NetBIOS over TCP/IP (NetBT) will use to register and resolve names. - A B-node (broadcast) system only uses broadcasts. - A P-node (point-to-point) system uses only name queries to a name server (WINS). - An M-node (mixed) system broadcasts first, then queries the name server (WINS). - An H-node (hybrid) system queries the name server (WINS) first, then broadcasts. The recommended state for this setting is: NodeType - 0x2 (2) (P-node / point-to-point)." + rationale: "In order to help mitigate the risk of NetBIOS Name Service (NBT-NS) poisoning attacks, setting the node type to P-node will prevent the system from sending out NetBIOS broadcasts." + remediation: "To establish the recommended configuration, set the following Registry value to 0x2 (2) (DWORD): HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\NetBT\\Parameters:NodeType" + compliance: + - cis: ["18.5.4.1"] + - cis_csc: ["9"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NetBT\Parameters -> NodeType -> 2' + + - id: 13124 + title: "Ensure 'Turn off multicast name resolution' is set to 'Enabled'" + description: "LLMNR is a secondary name resolution protocol. With LLMNR, queries are sent using multicast over a local network link on a single subnet from a client computer to another client computer on the same subnet that also has LLMNR enabled. LLMNR does not require a DNS server or DNS client configuration, and provides name resolution in scenarios in which conventional DNS name resolution is not possible. The recommended state for this setting is: Enabled." + rationale: "An attacker can listen on a network for these LLMNR (UDP/5355) or NBT-NS (UDP/137) broadcasts and respond to them, tricking the host into thinking that it knows the location of the requested system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\DNS Client\\Turn off multicast name resolution" + compliance: + - cis: ["18.5.4.2"] + - cis_csc: ["9"] + references: + - 'CCE-34055-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient -> EnableMulticast -> 0' + + - id: 13125 + title: "Ensure 'Enable insecure guest logons' is set to 'Disabled'" + description: "This policy setting determines if the SMB client will allow insecure guest logons to an SMB server. The recommended state for this setting is: Disabled." + rationale: "Insecure guest logons are used by file servers to allow unauthenticated access to shared folders." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Lanman Workstation\\Enable insecure guest logons" + compliance: + - cis: ["18.5.8.1"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LanmanWorkstation -> AllowInsecureGuestAuth -> 0' + + - id: 13126 + title: "Ensure 'Prohibit installation and configuration of Network Bridge on your DNS domain network' is set to 'Enabled'" + description: "You can use this procedure to controls user's ability to install and configure a Network Bridge. The recommended state for this setting is: Enabled." + rationale: "The Network Bridge setting, if enabled, allows users to create a Layer 2 Media Access Control (MAC) bridge, enabling them to connect two or more physical network segments together. A Network Bridge thus allows a computer that has connections to two different networks to share data between those networks. In an enterprise managed environment, where there is a need to control network traffic to only authorized paths, allowing users to create a Network Bridge increases the risk and attack surface from the bridged network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Connections\\Prohibit installation and configuration of Network Bridge on your DNS domain network" + compliance: + - cis: ["18.5.11.2"] + - cis_csc: ["5.1"] + references: + - 'CCE-33107-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> NC_AllowNetBridge_NLA -> 0' + + - id: 13127 + title: "Ensure 'Prohibit use of Internet Connection Sharing on your DNS domain network' is set to 'Enabled'" + description: "Although this legacy setting traditionally applied to the use of Internet Connection Sharing (ICS) in Windows 2000, Windows XP & Server 2003, this setting now freshly applies to the Mobile Hotspot feature in Windows 10 & Server 2016. The recommended state for this setting is: Enabled." + rationale: "Non-administrators should not be able to turn on the Mobile Hotspot feature and open their Internet connectivity up to nearby mobile devices." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Connections\\Prohibit use of Internet Connection Sharing on your DNS domain network" + compliance: + - cis: ["18.5.11.3"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> NC_ShowSharedAccessUI -> 0' + + - id: 13128 + title: "Ensure 'Require domain users to elevate when setting a network's location' is set to 'Enabled'" + description: "This policy setting determines whether to require domain users to elevate when setting a network's location. The recommended state for this setting is: Enabled." + rationale: "Allowing regular users to set a network location increases the risk and attack surface." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Connections\\Require domain users to elevate when setting a network's location" + compliance: + - cis: ["18.5.11.4"] + - cis_csc: ["5.1"] + references: + - 'CCE-35554-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> NC_StdDomainUserSetLocation -> 1' + + - id: 13129 + title: "Ensure 'Hardened UNC Paths' is set to 'Enabled, with \"Require Mutual Authentication\" and \"Require Integrity\" set for all NETLOGON and SYSVOL shares'" + description: "This policy setting configures secure access to UNC paths. The recommended state for this setting is: Enabled, with Require Mutual Authentication and Require Integrity set for all NETLOGON and SYSVOL shares. Note: If the environment exclusively contains Windows 8.0 / Server 2012 (non-R2) or newer systems, then the \"Privacy\" setting may (optionally) also be set to enable SMB encryption. However, using SMB encryption will render the targeted share paths completely inaccessible by older OSes, so only use this additional option with caution and thorough testing." + rationale: "In February 2015, Microsoft released a new control mechanism to mitigate a security risk in Group Policy as part of the MS15-011 / MSKB 3000483 security update. This mechanism requires both the installation of the new security update and also the deployment of specific group policy settings to all computers on the domain from Windows Vista / Server 2008 (non-R2) or newer (the associated security patch to enable this feature was not released for Server 2003). A new group policy template (NetworkProvider.admx/adml) was also provided with the security update. Once the new GPO template is in place, the following are the minimum requirements to remediate the Group Policy security risk: \\*\\NETLOGON RequireMutualAuthentication=1, RequireIntegrity=1 \\*\\SYSVOL RequireMutualAuthentication=1, RequireIntegrity=1 Note: A reboot may be required after the setting is applied to a client machine to access the above paths." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled with the following paths configured, at a minimum: \\*\\NETLOGON RequireMutualAuthentication=1, RequireIntegrity=1 \\*\\SYSVOL RequireMutualAuthentication=1, RequireIntegrity=1 Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Provider\\Hardened UNC Paths" + compliance: + - cis: ["18.5.14.1"] + - cis_csc: ["3"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths -> \\*\NETLOGON -> r:RequireMutualAuthentication=1, RequireIntegrity=1' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths -> \\*\SYSVOL -> r:RequireMutualAuthentication=1, RequireIntegrity=1' + + - id: 13130 + title: "Ensure 'Minimize the number of simultaneous connections to the Internet or a Windows Domain' is set to 'Enabled'" + description: "This policy setting prevents computers from establishing multiple simultaneous connections to either the Internet or to a Windows domain. The recommended state for this setting is: Enabled." + rationale: "Blocking simultaneous connections can help prevent a user unknowingly allowing network traffic to flow between the Internet and the enterprise managed network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Windows Connection Manager\\Minimize the number of simultaneous connections to the Internet or a Windows Domain" + compliance: + - cis: ["18.5.21.1"] + - cis_csc: ["12"] + references: + - 'CCE-35242-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\GroupPolicy -> fMinimizeConnections -> 1' + + - id: 13131 + title: "Ensure 'Prohibit connection to non-domain networks when connected to domain authenticated network' is set to 'Enabled'" + description: "This policy setting prevents computers from connecting to both a domain based network and a non-domain based network at the same time. The recommended state for this setting is: Enabled." + rationale: "The potential concern is that a user would unknowingly allow network traffic to flow between the insecure public network and the enterprise managed network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Windows Connection Manager\\Prohibit connection to non-domain networks when connected to domain authenticated network" + compliance: + - cis: ["18.5.21.2"] + - cis_csc: ["12"] + references: + - 'CCE-35375-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\GroupPolicy -> fBlockNonDomain -> 1' + + - id: 13132 + title: "Ensure 'Allow Windows to automatically connect to suggested open hotspots, to networks shared by contacts, and to hotspots offering paid services' is set to 'Disabled'" + description: "This policy setting determines whether users can enable the following WLAN settings: Connect to suggested open hotspots, Connect to networks shared by my contacts, and Enable paid services. - Connect to suggested open hotspots enables Windows to automatically connect users to open hotspots it knows about by crowdsourcing networks that other people using Windows have connected to. - Connect to networks shared by my contacts enables Windows to automatically connect to networks that the user's contacts have shared with them, and enables users on this device to share networks with their contacts. - Enable paid services enables Windows to temporarily connect to open hotspots to determine if paid services are available. The recommended state for this setting is: Disabled." + rationale: "Automatically connecting to an open hotspot or network can introduce the system to a rogue network with malicious intent." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\WLAN Service\\WLAN Settings\\Allow Windows to automatically connect to suggested open hotspots, to networks shared by contacts, and to hotspots offering paid services" + compliance: + - cis: ["18.5.23.2.1"] + - cis_csc: ["15.4", "15.5"] + references: + - 'CCE-41378-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config -> AutoConnectAllowedOEM -> 0' + + - id: 13133 + title: "Ensure 'Include command line in process creation events' is set to 'Disabled'" + description: "This policy setting determines what information is logged in security audit events when a new process has been created. The recommended state for this setting is: Disabled." + rationale: "When this policy setting is enabled, any user who has read access to the security events can read the command-line arguments for any successfully created process. Command-line arguments may contain sensitive or private information such as passwords or user data." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Audit Process Creation\\Include command line in process creation events" + compliance: + - cis: ["18.8.3.1"] + - cis_csc: ["16.14"] + references: + - 'CCE-35802-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit -> ProcessCreationIncludeCmdLine_Enabled -> 0' + + - id: 13134 + title: "Ensure 'Remote host allows delegation of non-exportable credentials' is set to 'Enabled'" + description: "Remote host allows delegation of non-exportable credentials. When using credential delegation, devices provide an exportable version of credentials to the remote host. This exposes users to the risk of credential theft from attackers on the remote host. The Restricted Admin Mode and Windows Defender Remote Credential Guard features are two options to help protect against this risk. The recommended state for this setting is: Enabled." + rationale: "Restricted Admin Mode was designed to help protect administrator accounts by ensuring that reusable credentials are not stored in memory on remote devices that could potentially be compromised. Windows Defender Remote Credential Guard helps you protect your credentials over a Remote Desktop connection by redirecting Kerberos requests back to the device that is requesting the connection. Both features should be enabled and supported, as they reduce the chance of credential theft." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Credentials Delegation\\Remote host allows delegation of non-exportable credentials" + compliance: + - cis: ["18.8.4.2"] + - cis_csc: ["16"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation -> AllowProtectedCreds -> 1' + + - id: 13135 + title: "Ensure 'Boot-Start Driver Initialization Policy' is set to 'Enabled: Good, unknown and bad but critical'" + description: "This policy setting allows you to specify which boot-start drivers are initialized based on a classification determined by an Early Launch Antimalware boot-start driver. The Early Launch Antimalware boot-start driver can return the following classifications for each boot-start driver: - Good: The driver has been signed and has not been tampered with. - Bad: The driver has been identified as malware. It is recommended that you do not allow known bad drivers to be initialized. - Bad, but required for boot: The driver has been identified as malware, but the computer cannot successfully boot without loading this driver. - Unknown: This driver has not been attested to by your malware detection application and has not been classified by the Early Launch Antimalware boot-start driver. If you enable this policy setting you will be able to choose which boot-start drivers to initialize the next time the computer is started. If your malware detection application does not include an Early Launch Antimalware bootstart driver or if your Early Launch Antimalware boot-start driver has been disabled, this setting has no effect and all boot-start drivers are initialized. The recommended state for this setting is: Enabled: Good, unknown and bad but critical." + rationale: "This policy setting helps reduce the impact of malware that has already infected your system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Good, unknown and bad but critical: Computer Configuration\\Policies\\Administrative Templates\\System\\Early Launch Antimalware\\Boot-Start Driver Initialization Policy" + compliance: + - cis: ["18.8.14.1"] + - cis_csc: ["8"] + references: + - 'CCE-33231-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies\EarlyLaunch -> DriverLoadPolicy -> 3' + + - id: 13136 + title: "Ensure 'Configure registry policy processing: Do not apply during periodic background processing' is set to 'Enabled: FALSE'" + description: "The \"Do not apply during periodic background processing\" option prevents the system from updating affected policies in the background while the computer is in use. When background updates are disabled, policy changes will not take effect until the next user logon or system restart." + rationale: "Setting this option to false (unchecked) will ensure that domain policy changes take effect more quickly, as compared to waiting until the next user logon or system restart." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, then set the Do not apply during periodic background processing option to FALSE (unchecked): Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Configure registry policy processing" + compliance: + - cis: ["18.8.21.2"] + - cis_csc: ["3.7", "5.4", "5.5"] + references: + - 'CCE-35384-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> NoBackgroundPolicy -> 0' + + - id: 13137 + title: "Ensure 'Configure registry policy processing: Process even if the Group Policy objects have not changed' is set to 'Enabled: TRUE'" + description: "The \"Process even if the Group Policy objects have not changed\" option updates and reapplies policies even if the policies have not changed." + rationale: "Setting this option to true (checked) will ensure unauthorized changes that might have been configured locally are forced to match the domain-based Group Policy settings again." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, then set the Process even if the Group Policy objects have not changed option to TRUE (checked): Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Configure registry policy processing" + compliance: + - cis: ["18.8.21.3"] + - cis_csc: ["3.7", "5.4", "5.5"] + references: + - 'CCE-35384-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> NoGPOListChanges -> 0' + + - id: 13138 + title: "Ensure 'Continue experiences on this device' is set to 'Disabled'" + description: "This policy setting determines whether the Windows device is allowed to participate in cross-device experiences (continue experiences)." + rationale: "A cross-device experience is when a system can access app and send messages to other devices. In an enterprise managed environment only trusted systems should be communicating within the network. Access to any other system should be prohibited." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Continue experiences on this device" + compliance: + - cis: ["18.8.21.4"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnableCdp -> 0' + + - id: 13139 + title: "Ensure 'Turn off background refresh of Group Policy' is set to 'Disabled'" + description: "This policy setting prevents Group Policy from being updated while the computer is in use. This policy setting applies to Group Policy for computers, users and Domain Controllers." + rationale: "This setting ensures that group policy changes take effect more quickly, as compared to waiting until the next user logon or system restart." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Turn off background refresh of Group Policy" + compliance: + - cis: ["18.8.21.5"] + - cis_csc: ["3.7", "5.4", "5.5"] + references: + - 'CCE-35776-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> DisableBkGndGroupPolicy -> 0' + + - id: 13140 + title: "Ensure 'Turn off downloading of print drivers over HTTP' is set to 'Enabled'" + description: "This policy setting specifies whether to use the Store service for finding an application to open a file with an unhandled file type or protocol association. When a user opens a file type or protocol that is not associated with any applications on the computer, the user is given the choice to select a local application or use the Store service to find an application." + rationale: "The Store service is a retail outlet built into Windows, primarily for consumer use. In an enterprise managed environment the IT department should be managing the installation of all applications to reduce the risk of the installation of vulnerable software." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off access to the Store" + compliance: + - cis: ["18.8.22.1.2"] + - cis_csc: ["2"] + references: + - 'CCE-35781-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers -> DisableWebPnPDownload -> 1' + + - id: 13141 + title: "Ensure 'Turn off printing over HTTP' is set to 'Enabled'" + description: "This policy setting allows you to disable the client computer's ability to print over HTTP, which allows the computer to print to printers on the intranet as well as the Internet." + rationale: "Information that is transmitted over HTTP through this capability is not protected and can be intercepted by malicious users. For this reason, it is not often used in enterprise managed environments." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off printing over HTTP" + compliance: + - cis: ["18.8.22.1.7"] + - cis_csc: ["13.1"] + references: + - 'CCE-33783-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers -> DisableHTTPPrinting -> 1' + + - id: 13142 + title: "Ensure 'Block user from showing account details on sign-in' is set to 'Enabled'" + description: "This policy prevents the user from showing account details (email address or user name) on the sign-in screen." + rationale: "An attacker with access to the console (for example, someone with physical access or someone who is able to connect to the workstation through Remote Desktop Services) could view the name of the last user who logged on to the server. The attacker could then try to guess the password, use a dictionary, or use a brute-force attack to try and log on." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Block user from showing account details on sign-in" + compliance: + - cis: ["18.8.27.1"] + - cis_csc: ["16.5"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> BlockUserFromShowingAccountDetailsOnSignin -> 1' + + - id: 13143 + title: "Ensure 'Do not display network selection UI' is set to 'Enabled'" + description: "This policy setting allows you to control whether anyone can interact with available networks UI on the logon screen." + rationale: "An unauthorized user could disconnect the PC from the network or can connect the PC to other available networks without signing into Windows." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Do not display network selection UI" + compliance: + - cis: ["18.8.27.2"] + - cis_csc: ["5"] + references: + - 'CCE-33822-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DontDisplayNetworkSelectionUI -> 1' + + - id: 13144 + title: "Ensure 'Do not enumerate connected users on domain-joined computers' is set to 'Enabled'" + description: "This policy setting prevents connected users from being enumerated on domain-joined computers." + rationale: "A malicious user could use this feature to gather account names of other users, that information could then be used in conjunction with other types of attacks such as guessing passwords or social engineering. The value of this countermeasure is small because a user with domain credentials could gather the same account information using other methods." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Do not enumerate connected users on domain-joined computers" + compliance: + - cis: ["18.8.27.3"] + - cis_csc: ["16.9"] + references: + - 'CCE-35207-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DontEnumerateConnectedUsers -> 1' + + - id: 13145 + title: "Ensure 'Enumerate local users on domain-joined computers' is set to 'Disabled'" + description: "This policy setting allows local users to be enumerated on domain-joined computers." + rationale: "A malicious user could use this feature to gather account names of other users, that information could then be used in conjunction with other types of attacks such as guessing passwords or social engineering. The value of this countermeasure is small because a user with domain credentials could gather the same account information using other methods." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Enumerate local users on domain-joined computers" + compliance: + - cis: ["18.8.27.4"] + - cis_csc: ["16.9"] + references: + - 'CCE-34838-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnumerateLocalUsers -> 0' + + - id: 13146 + title: "Ensure 'Turn off app notifications on the lock screen' is set to 'Enabled'" + description: "This policy setting allows you to prevent app notifications from appearing on the lock screen." + rationale: "App notifications might display sensitive business or personal data." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Turn off app notifications on the lock screen" + compliance: + - cis: ["18.8.27.5"] + - cis_csc: ["16.5"] + references: + - 'CCE-34837-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DisableLockScreenAppNotifications -> 1' + + - id: 13147 + title: "Ensure 'Turn off picture password sign-in' is set to 'Enabled'" + description: "This policy setting allows you to control whether a domain user can sign in using a picture password. The recommended state for this setting is: Enabled." + rationale: "Picture passwords bypass the requirement for a typed complex password. In a shared work environment, a simple shoulder surf where someone observed the on-screen gestures would allow that person to gain access to the system without the need to know the complex password. Vertical monitor screens with an image are much more visible at a distance than horizontal key strokes, increasing the likelihood of a successful observation of the mouse gestures." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Turn off picture password sign-in" + compliance: + - cis: ["18.8.27.6"] + - cis_csc: ["16.5"] + references: + - 'CCE-35291-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> BlockDomainPicturePassword -> 1' + + - id: 13148 + title: "Ensure 'Turn on convenience PIN sign-in' is set to 'Disabled'" + description: "This policy setting allows you to control whether a domain user can sign in using a convenience PIN. In Windows 10, convenience PIN was replaced with Passport, which has stronger security properties. To configure Passport for domain users, use the policies under Computer Configuration\\Administrative Templates\\Windows Components\\Microsoft Passport for Work." + rationale: "A PIN is created from a much smaller selection of characters than a password, so in most cases a PIN will be much less robust than a password." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Turn on convenience PIN sign-in" + compliance: + - cis: ["18.8.27.7"] + - cis_csc: ["16.5"] + references: + - 'CCE-35095-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> AllowDomainPINLogon -> 0' + + - id: 13149 + title: "Ensure 'Allow network connectivity during connected-standby (on battery)' is set to 'Disabled'" + description: "This policy setting allows you to control the network connectivity state in standby on modern standby-capable systems." + rationale: "Disabling this setting ensures that the computer will not be accessible to attackers over a WLAN network while left unattended, on battery and in a sleep state." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Power Management\\Sleep Settings\\Allow network connectivity during connected-standby (on battery)" + compliance: + - cis: ["18.8.33.6.1"] + - cis_csc: ["9"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\f15576e8-98b7-4186-b944-eafa664402d9 -> DCSettingIndex -> 0' + + - id: 13150 + title: "Ensure 'Allow network connectivity during connected-standby (plugged in)' is set to 'Disabled'" + description: "This policy setting allows you to control the network connectivity state in standby on modern standby-capable systems." + rationale: "Disabling this setting ensures that the computer will not be accessible to attackers over a WLAN network while left unattended, plugged in and in a sleep state." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Power Management\\Sleep Settings\\Allow network connectivity during connected-standby (plugged in)" + compliance: + - cis: ["18.8.33.6.2"] + - cis_csc: ["9"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\f15576e8-98b7-4186-b944-eafa664402d9 -> ACSettingIndex -> 0' + + - id: 13151 + title: "Ensure 'Require a password when a computer wakes (on battery)' is set to 'Enabled'" + description: "Dictates whether or not Windows is allowed to use standby states when sleeping the computer." + rationale: "System sleep states (S1-S3) keep power to the RAM which may contain secrets, such as the BitLocker volume encryption key. An attacker finding a computer in sleep states (S1-S3) could directly attack the memory of the computer and gain access to the secrets through techniques such as RAM reminisce and direct memory access (DMA)." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Power Management\\Sleep Settings\\Allow standby states (S1-S3) when sleeping (on battery)" + compliance: + - cis: ["18.8.33.6.5"] + - cis_csc: ["13.2", "13.6"] + references: + - 'CCE-33782-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\0e796bdb-100d-47d6-a2d5-f7d2daa51f51 -> DCSettingIndex -> 1' + + - id: 13152 + title: "Ensure 'Require a password when a computer wakes (plugged in)' is set to 'Enabled'" + description: "Specifies whether or not the user is prompted for a password when the system resumes from sleep." + rationale: "Enabling this setting ensures that anyone who wakes an unattended computer from sleep state will have to provide logon credentials before they can access the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Power Management\\Sleep Settings\\Require a password when a computer wakes (plugged in)" + compliance: + - cis: ["18.8.33.6.6"] + - cis_csc: ["16.5"] + references: + - 'CCE-35462-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\0e796bdb-100d-47d6-a2d5-f7d2daa51f51 -> ACSettingIndex -> 1' + + - id: 13153 + title: "Ensure 'Configure Offer Remote Assistance' is set to 'Disabled'" + description: "This policy setting allows you to turn on or turn off Offer (Unsolicited) Remote Assistance on this computer. Help desk and support personnel will not be able to proactively offer assistance, although they can still respond to user assistance requests." + rationale: "A user might be tricked and accept an unsolicited Remote Assistance offer from a malicious user." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Assistance\\Configure Offer Remote Assistance" + compliance: + - cis: ["18.8.35.1"] + - cis_csc: ["9.1", "9.2"] + references: + - 'CCE-33801-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fAllowUnsolicited -> 0' + + - id: 13154 + title: "Ensure 'Configure Solicited Remote Assistance' is set to 'Disabled'" + description: "This policy setting allows you to turn on or turn off Solicited (Ask for) Remote Assistance on this computer." + rationale: "There is slight risk that a rogue administrator will gain access to another user's desktop session, however, they cannot connect to a user's computer unannounced or control it without permission from the user. When an expert tries to connect, the user can still choose to deny the connection or give the expert view-only privileges. The user must explicitly click the Yes button to allow the expert to remotely control the workstation." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Assistance\\Configure Solicited Remote Assistance" + compliance: + - cis: ["18.8.35.2"] + - cis_csc: ["5.1"] + references: + - 'CCE-35331-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fAllowToGetHelp -> 0' + + - id: 13155 + title: "Ensure 'Enable RPC Endpoint Mapper Client Authentication' is set to 'Enabled'" + description: "This policy setting controls whether RPC clients authenticate with the Endpoint Mapper Service when the call they are making contains authentication information. The Endpoint Mapper Service on computers running Windows NT4 (all service packs) cannot process authentication information supplied in this manner. This policy setting can cause a specific issue with 1-way forest trusts if it is applied to the trusting domain DCs (see Microsoft KB3073942), so we do not recommend applying it to Domain Controllers." + rationale: "Anonymous access to RPC services could result in accidental disclosure of information to unauthenticated users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Procedure Call\\Enable RPC Endpoint Mapper Client Authentication" + compliance: + - cis: ["18.8.36.1"] + - cis_csc: ["9.1", "9.2"] + references: + - 'CCE-35392-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Rpc -> EnableAuthEpResolution -> 1' + + - id: 13156 + title: "Ensure 'Restrict Unauthenticated RPC clients' is set to 'Enabled: Authenticated'" + description: "This policy setting controls how the RPC server runtime handles unauthenticated RPC clients connecting to RPC servers. This policy setting impacts all RPC applications. In a domain environment this policy setting should be used with caution as it can impact a wide range of functionality including group policy processing itself. Reverting a change to this policy setting can require manual intervention on each affected machine. This policy setting should never be applied to a Domain Controller. A client will be considered an authenticated client if it uses a named pipe to communicate with the server or if it uses RPC Security. RPC Interfaces that have specifically requested to be accessible by unauthenticated clients may be exempt from this restriction, depending on the selected value for this policy setting. -- None allows all RPC clients to connect to RPC Servers running on the machine on which the policy setting is applied. -- Authenticated allows only authenticated RPC Clients (per the definition above) to connect to RPC Servers running on the machine on which the policy setting is applied. Exemptions are granted to interfaces that have requested them. -- Authenticated without exceptions allows only authenticated RPC Clients (per the definition above) to connect to RPC Servers running on the machine on which the policy setting is applied. No exceptions are allowed. This value has the potential to cause serious problems and is not recommended.'" + rationale: "Unauthenticated RPC communication can create a security vulnerability." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Authenticated: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Procedure Call\\Restrict Unauthenticated RPC clients" + compliance: + - cis: ["18.8.36.2"] + - cis_csc: ["9.1", "9.2"] + references: + - 'CCE-35391-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Rpc -> RestrictRemoteClients -> 1' + + - id: 13157 + title: "Ensure 'Allow Microsoft accounts to be optional' is set to 'Enabled'" + description: "This policy setting lets you control whether Microsoft accounts are optional for Windows Store apps that require an account to sign in. This policy only affects Windows Store apps that support it." + rationale: "Enabling this setting allows an organization to use their enterprise user accounts instead of using their Microsoft accounts when accessing Windows store apps. This provides the organization with greater control over relevant credentials. Microsoft accounts cannot be centrally managed and as such enterprise credential security policies cannot be applied to them, which could put any information accessed by using Microsoft accounts at risk." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\App runtime\\Allow Microsoft accounts to be optional" + compliance: + - cis: ["18.9.6.1"] + - cis_csc: ["16.9"] + references: + - 'CCE-35803-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> MSAOptional -> 1' + + - id: 13158 + title: "Ensure 'Disallow Autoplay for non-volume devices' is set to 'Enabled'" + description: "This policy setting disallows AutoPlay for MTP devices like cameras or phones." + rationale: "An attacker could use this feature to launch a program to damage a client computer or data on the computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Disallow Autoplay for non-volume devices" + compliance: + - cis: ["18.9.8.1"] + - cis_csc: ["8.3", "8.4", "8.5"] + references: + - 'CCE-35289-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoAutoplayfornonVolume -> 1' + + - id: 13159 + title: "Ensure 'Set the default behavior for AutoRun' is set to 'Enabled: Do not execute any autorun commands'" + description: "This policy setting sets the default behavior for Autorun commands. Autorun commands are generally stored in autorun.inf files. They often launch the installation program or other routines. The recommended state for this setting is: Enabled: Do not execute any autorun commands." + rationale: "Prior to Windows Vista, when media containing an autorun command is inserted, the system will automatically execute the program without user intervention. This creates a major security concern as code may be executed without user's knowledge. The default behavior starting with Windows Vista is to prompt the user whether autorun command is to be run. The autorun command is represented as a handler in the Autoplay dialog." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Do not execute any autorun commands: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Set the default behavior for AutoRun" + compliance: + - cis: ["18.9.8.2"] + - cis_csc: ["8.3", "8.4", "8.5"] + references: + - 'CCE-34771-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoAutorun -> 1' + + - id: 13160 + title: "Ensure 'Turn off Autoplay' is set to 'Enabled: All drives'" + description: "Autoplay starts to read from a drive as soon as you insert media in the drive, which causes the setup file for programs or audio media to start immediately. An attacker could use this feature to launch a program to damage the computer or data on the computer. Autoplay is disabled by default on some removable drive types, such as floppy disk and network drives, but not on CD-ROM drives." + rationale: "An attacker could use this feature to launch a program to damage a client computer or data on the computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: All drives: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Turn off Autoplay" + compliance: + - cis: ["18.9.8.3"] + - cis_csc: ["8.3", "8.4", "8.5"] + references: + - 'CCE-33791-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoDriveTypeAutoRun -> ff' + + - id: 13161 + title: "Ensure 'Configure enhanced anti-spoofing' is set to 'Enabled'" + description: "This policy setting determines whether enhanced anti-spoofing is configured for devices which support it." + rationale: "Enterprise managed environments are now supporting a wider range of mobile devices, increasing the security on these devices will help protect against unauthorized access on your network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Biometrics\\Facial Features\\Configure enhanced anti-spoofing" + compliance: + - cis: ["18.9.10.1.1"] + - cis_csc: ["16"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Biometrics\FacialFeatures -> EnhancedAntiSpoofing -> 1' + + - id: 13162 + title: "Ensure 'Turn off Microsoft consumer experiences' is set to 'Enabled'" + description: "This policy setting turns off experiences that help consumers make the most of their devices and Microsoft account." + rationale: "Having apps silently install in an enterprise managed environment is not good security practice - especially if the apps send data back to a 3rd party." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Cloud Content\\Turn off Microsoft consumer experiences" + compliance: + - cis: ["18.9.13.1"] + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent -> DisableWindowsConsumerFeatures -> 1' + + - id: 13163 + title: "Ensure 'Require pin for pairing' is set to 'Enabled'" + description: "This policy setting controls whether or not a PIN is required for pairing to a wireless display device." + rationale: "If this setting is not configured or disabled then a PIN would not be required when pairing wireless display devices to the system, increasing the risk of unauthorized use." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Connect\\Require pin for pairing" + compliance: + - cis: ["18.9.14.1"] + - cis_csc: ["15.8", "15.9"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Connect -> RequirePinForPairing -> 1' + + - id: 13164 + title: "Ensure 'Do not display the password reveal button' is set to 'Enabled'" + description: "This policy setting allows you to configure the display of the password reveal button in password entry user experiences." + rationale: "This is a useful feature when entering a long and complex password, especially when using a touchscreen. The potential risk is that someone else may see your password while surreptitiously observing your screen." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Credential User Interface\\Do not display the password reveal button" + compliance: + - cis: ["18.9.15.1"] + - cis_csc: ["16"] + references: + - 'CCE-32965-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredUI -> DisablePasswordReveal -> 1' + + - id: 13165 + title: "Ensure 'Enumerate administrator accounts on elevation' is set to 'Disabled'" + description: "This policy setting controls whether administrator accounts are displayed when a user attempts to elevate a running application." + rationale: "Users could see the list of administrator accounts, making it slightly easier for a malicious user who has logged onto a console session to try to crack the passwords of those accounts." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Credential User Interface\\Enumerate administrator accounts on elevation" + compliance: + - cis: ["18.9.15.2"] + - cis_csc: ["16"] + references: + - 'CCE-35194-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\CredUI -> EnumerateAdministrators -> 0' + + - id: 13166 + title: "Ensure 'Allow Telemetry' is set to 'Enabled: 0 - Security [Enterprise Only]' or 'Enabled: 1 - Basic'" + description: "This policy setting determines the amount of diagnostic and usage data reported to Microsoft: - A value of 0 - Security [Enterprise Only] will send minimal data to Microsoft. This data includes Malicious Software Removal Tool (MSRT) & Windows Defender data, if enabled, and telemetry client settings. Setting a value of 0 applies to enterprise, EDU, IoT and server devices only. Setting a value of 0 for other devices is equivalent to choosing a value of 1. - A value of 1 - Basic sends only a basic amount of diagnostic and usage data. Note that setting values of 0 or 1 will degrade certain experiences on the device. - A value of 2 - Enhanced sends enhanced diagnostic and usage data. - A value of 3 - Full sends the same data as a value of 2, plus additional diagnostics data, including the files and content that may have caused the problem. Windows 10 telemetry settings apply to the Windows operating system and some first party apps. This setting does not apply to third party apps running on Windows 10. The recommended state for this setting is: Enabled: 0 - Security [Enterprise Only] or Enabled: 1 - Basic." + rationale: "Sending any data to a 3rd party vendor is a security concern and should only be done on an as needed basis." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 0 - Security [Enterprise Only] or Enabled: 1 - Basic: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Data Collection and Preview Builds\\Allow Telemetry" + compliance: + - cis: ["18.9.16.1"] + - cis_csc: ["13"] + references: + - 'CCE-41400-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection -> AllowTelemetry -> r:^0$|^1$' + + - id: 13167 + title: "Ensure 'Do not show feedback notifications' is set to 'Enabled'" + description: "This policy setting allows an organization to prevent its devices from showing feedback questions from Microsoft." + rationale: "Users should not be sending any feedback to 3rd party vendors in an enterprise managed environment." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Data Collection and Preview Builds\\Do not show feedback notifications" + compliance: + - cis: ["18.9.16.3"] + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection -> DoNotShowFeedbackNotifications -> 1' + + - id: 13168 + title: "Ensure 'Toggle user control over Insider builds' is set to 'Disabled'" + description: "This policy setting determines whether users can access the Insider build controls in the Advanced Options for Windows Update. These controls are located under \"Get Insider builds,\" and enable users to make their devices available for downloading and installing Windows preview software." + rationale: "It can be risky for experimental features to be allowed in an enterprise managed environment because this can introduce bugs and security holes into systems, making it easier for an attacker to gain access. It is generally preferred to only use production-ready builds." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Data Collection and Preview Builds\\Toggle user control over Insider builds" + compliance: + - cis: ["18.9.16.4"] + - cis_csc: ["3"] + references: + - 'CCE-41380-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds -> AllowBuildPreview -> 0' + + - id: 13169 + title: "Ensure 'Download Mode' is NOT set to 'Enabled: Internet'" + description: "This policy setting specifies the download method that Delivery Optimization can use in downloads of Windows Updates, Apps and App updates. The following methods are supported: - 0 = HTTP only, no peering. - 1 = HTTP blended with peering behind the same NAT. - 2 = HTTP blended with peering across a private group. Peering occurs on devices in the same Active Directory Site (if exist) or the same domain by default. When this option is selected, peering will cross NATs. To create a custom group use Group ID in combination with Mode 2. - 3 = HTTP blended with Internet Peering. - 99 = Simple download mode with no peering. Delivery Optimization downloads using HTTP only and does not attempt to contact the Delivery Optimization cloud services. - 100 = Bypass mode. Do not use Delivery Optimization and use BITS instead." + rationale: "Due to privacy concerns and security risks, updates should only be downloaded directly from Microsoft, or from a trusted machine on the internal network that received its updates from a trusted source and approved by the network administrator." + remediation: "To establish the recommended configuration via GP, set the following UI path to any value other than Enabled: Internet: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Delivery Optimization\\Download Mode" + compliance: + - cis: ["18.9.17.1"] + - cis_csc: ["4.5", "3.4", "3.5"] + condition: all + rules: + - 'not r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -> DODownloadMode -> r:^3$' + + - id: 13170 + title: "Ensure 'Application: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" + description: "This policy setting controls Event Log behavior when the log file reaches its maximum size." + rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Application\\Control Event Log behavior when the log file reaches its maximum size" + compliance: + - cis: ["18.9.26.1.1"] + - cis_csc: ["6.3", "6.4"] + references: + - 'CCE-34169-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> Retention -> 0' + + - id: 13171 + title: "Ensure 'Application: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" + description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Application\\Specify the maximum log file size (KB)" + compliance: + - cis: ["18.9.26.1.2"] + - cis_csc: ["6.3", "6.4"] + references: + - 'CCE-33975-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> n:^(\d+) compare >= 32768' + + - id: 13172 + title: "Ensure 'Security: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" + description: "This policy setting controls Event Log behavior when the log file reaches its maximum size." + rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Security\\Control Event Log behavior when the log file reaches its maximum size" + compliance: + - cis: ["18.9.26.2.1"] + - cis_csc: ["6.3", "6.4"] + references: + - 'CCE-35090-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> Retention -> 0' + + - id: 13173 + title: "Ensure 'Security: Specify the maximum log file size (KB)' is set to 'Enabled: 196,608 or greater'" + description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 196,608 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Security\\Specify the maximum log file size (KB)" + compliance: + - cis: ["18.9.26.2.2"] + - cis_csc: ["6.3", "6.4"] + references: + - 'CCE-33428-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> n:^(\d+) compare >= 196608' + + - id: 13174 + title: "Ensure 'Setup: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" + description: "This policy setting controls Event Log behavior when the log file reaches its maximum size." + rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Setup\\Control Event Log behavior when the log file reaches its maximum size" + compliance: + - cis: ["18.9.26.3.1"] + - cis_csc: ["6.3", "6.4"] + references: + - 'CCE-34170-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> Retention -> 0' + + - id: 13175 + title: "Ensure 'Setup: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" + description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Setup\\Specify the maximum log file size (KB)" + compliance: + - cis: ["18.9.26.3.2"] + - cis_csc: ["6.3", "6.4"] + references: + - 'CCE-35091-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> n:^(\d+) compare >= 32768' + + - id: 13176 + title: "Ensure 'System: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" + description: "This policy setting controls Event Log behavior when the log file reaches its maximum size." + rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\System\\Control Event Log behavior when the log file reaches its maximum size" + compliance: + - cis: ["18.9.26.4.1"] + - cis_csc: ["6.3", "6.4"] + references: + - 'CCE-33729-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> Retention -> 0' + + - id: 13177 + title: "Ensure 'System: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" + description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\System\\Specify the maximum log file size (KB)" + compliance: + - cis: ["18.9.26.4.2"] + - cis_csc: ["6.3", "6.4"] + references: + - 'CCE-35288-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> n:^(\d+) compare >= 32768' + + - id: 13178 + title: "Ensure 'Turn off Data Execution Prevention for Explorer' is set to 'Disabled'" + description: "Disabling Data Execution Prevention can allow certain legacy plug-in applications to function without terminating Explorer." + rationale: "Data Execution Prevention is an important security feature supported by Explorer that helps to limit the impact of certain types of malware." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off Data Execution Prevention for Explorer" + compliance: + - cis: ["18.9.30.2"] + - cis_csc: ["8.4", "8.3"] + references: + - 'CCE-33608-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoDataExecutionPrevention -> 0' + + - id: 13179 + title: "Ensure 'Turn off heap termination on corruption' is set to 'Disabled'" + description: "Without heap termination on corruption, legacy plug-in applications may continue to function when a File Explorer session has become corrupt. Ensuring that heap termination on corruption is active will prevent this." + rationale: "Allowing an application to function after its session has become corrupt increases the risk posture to the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off heap termination on corruption" + compliance: + - cis: ["18.9.30.3"] + - cis_csc: ["8.4", "8.3"] + references: + - 'CCE-33745-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoHeapTerminationOnCorruption -> 0' + + - id: 13180 + title: "Ensure 'Turn off shell protocol protected mode' is set to 'Disabled'" + description: "This policy setting allows you to configure the amount of functionality that the shell protocol can have. When using the full functionality of this protocol, applications can open folders and launch files. The protected mode reduces the functionality of this protocol allowing applications to only open a limited set of folders. Applications are not able to open files with this protocol when it is in the protected mode. It is recommended to leave this protocol in the protected mode to increase the security of Windows." + rationale: "Limiting the opening of files and folders to a limited set reduces the attack surface of the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off shell protocol protected mode" + compliance: + - cis: ["18.9.30.4"] + - cis_csc: ["8.4", "8.3"] + references: + - 'CCE-33764-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> PreXPSP2ShellProtocolBehavior -> 0' + + - id: 13181 + title: "Ensure 'Prevent the computer from joining a homegroup' is set to 'Enabled'" + description: "By default, users can add their computer to a HomeGroup on a home network." + rationale: "While resources on a domain-joined computer cannot be shared with a HomeGroup, information from the domain-joined computer can be leaked to other computers in the HomeGroup." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\HomeGroup\\Prevent the computer from joining a homegroup" + compliance: + - cis: ["18.9.35.1"] + - cis_csc: ["14.1", "14.2"] + references: + - 'CCE-34776-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HomeGroup -> DisableHomeGroup -> 1' + + - id: 13182 + title: "Ensure 'Block all consumer Microsoft account user authentication' is set to 'Enabled'" + description: "This setting determines whether applications and services on the device can utilize new consumer Microsoft account authentication via the Windows OnlineID and WebAccountManager APIs." + rationale: "Organizations that want to effectively implement identity management policies and maintain firm control of what accounts are used on their computers will probably want to block Microsoft accounts. Organizations may also need to block Microsoft accounts in order to meet the requirements of compliance standards that apply to their information systems." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft accounts\\Block all consumer Microsoft account user authentication" + compliance: + - cis: ["18.9.44.1"] + - cis_csc: ["16"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftAccount -> DisableUserAuth -> 1' + + - id: 13183 + title: "Ensure 'Configure cookies' is set to 'Enabled: Block only 3rd-party cookies' or higher" + description: "This setting lets you configure how your company deals with cookies. The recommended state for this setting is: Enabled: Block only 3rd-party cookies. Configuring this setting to Enabled: Block all cookies also conforms to the benchmark." + rationale: "Cookies can pose a serious privacy concern, although many websites depend on them for operation. It is recommended when possible to block 3rd party cookies in order to reduce tracking." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Block only 3rd-party cookies (or, if applicable for your environment, Enabled: Block all cookies): Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Configure cookies" + compliance: + - cis: ["18.9.45.4"] + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> Cookies -> r:^0$|^1$' + + - id: 13184 + title: "Ensure 'Configure Password Manager' is set to 'Disabled'" + description: "This setting lets you decide whether employees can save their passwords locally, using Password Manager." + rationale: "Using Password Manager can potentially makes it easier for an unauthorized user who gains access to the user's desktop (including a coworker who sits down at a user's desk soon after the user walks away and forgets to lock their workstation), to log in to sites as the user, without needing to know or enter the password." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Configure Password Manager" + compliance: + - cis: ["18.9.45.5"] + - cis_csc: ["16"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> FormSuggest Passwords -> no' + + - id: 13185 + title: "Ensure 'Configure the Adobe Flash Click-to-Run setting' is set to 'Enabled'" + description: "This setting controls whether Adobe Flash (within the Microsoft Edge web browser) will require the user to click on the Flash element before the browser will display the Flash content." + rationale: "Adobe Flash is a very insecure product and has been a frequent attack vector on the web. However, disabling it completely may not be a practical option for many organizations, as it is still used frequently on many websites. This feature at least makes Adobe Flash content \"opt-in\", so the user has to choose to click on each specific piece of Flash content before it will run." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Configure the Adobe Flash Click-to-Run setting" + compliance: + - cis: ["18.9.45.8"] + - cis_csc: ["7.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Security -> FlashClickToRunMode -> 1' + + - id: 13186 + title: "Ensure 'Prevent the usage of OneDrive for file storage' is set to 'Enabled'" + description: "This policy setting lets you prevent apps and features from working with files on OneDrive using the Next Generation Sync Client." + rationale: "Enabling this setting prevents users from accidentally uploading confidential or sensitive corporate information to the OneDrive cloud service using the Next Generation Sync Client." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\OneDrive\\Prevent the usage of OneDrive for file storage" + compliance: + - cis: ["18.9.52.1"] + - cis_csc: ["13"] + references: + - 'CCE-33826-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\OneDrive -> DisableFileSyncNGSC -> 1' + + - id: 13187 + title: "Ensure 'Do not allow passwords to be saved' is set to 'Enabled'" + description: "This policy setting helps prevent Remote Desktop clients from saving passwords on a computer." + rationale: "An attacker with physical access to the computer may be able to break the protection guarding saved passwords. An attacker who compromises a user's account and connects to their computer could use saved passwords to gain access to additional hosts." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Connection Client\\Do not allow passwords to be saved" + compliance: + - cis: ["18.9.58.2.2"] + - cis_csc: ["16.4"] + references: + - 'CCE-34506-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> DisablePasswordSaving -> 1' + + - id: 13188 + title: "Ensure 'Do not allow drive redirection' is set to 'Enabled'" + description: "This policy setting prevents users from sharing the local drives on their client computers to Remote Desktop Servers that they access. Mapped drives appear in the session folder tree in Windows Explorer in the following format: \\TSClient\\$ If local drives are shared they are left vulnerable to intruders who want to exploit the data that is stored on them." + rationale: "Data could be forwarded from the user's Remote Desktop Services session to the user's local computer without any direct user interaction. Malicious software already present on a compromised server would have direct and stealthy disk access to the user's local computer during the Remote Desktop session." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow drive redirection" + compliance: + - cis: ["18.9.58.3.3.2"] + - cis_csc: ["13"] + references: + - 'CCE-34697-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableCdm -> 1' + + - id: 13189 + title: "Ensure 'Always prompt for password upon connection' is set to 'Enabled'" + description: "This policy setting specifies whether Remote Desktop Services always prompts the client computer for a password upon connection. You can use this policy setting to enforce a password prompt for users who log on to Remote Desktop Services, even if they already provided the password in the Remote Desktop Connection client." + rationale: "Users have the option to store both their username and password when they create a new Remote Desktop Connection shortcut. If the server that runs Remote Desktop Services allows users who have used this feature to log on to the server but not enter their password, then it is possible that an attacker who has gained physical access to the user's computer could connect to a Remote Desktop Server through the Remote Desktop Connection shortcut, even though they may not know the user's password." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Always prompt for password upon connection" + compliance: + - cis: ["18.9.58.3.9.1"] + - cis_csc: ["16.14"] + references: + - 'CCE-33960-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fPromptForPassword -> 1' + + - id: 13190 + title: "Ensure 'Require secure RPC communication' is set to 'Enabled'" + description: "This policy setting allows you to specify whether Remote Desktop Services requires secure Remote Procedure Call (RPC) communication with all clients or allows unsecured communication. You can use this policy setting to strengthen the security of RPC communication with clients by allowing only authenticated and encrypted requests." + rationale: "Allowing unsecure RPC communication can exposes the server to man in the middle attacks and data disclosure attacks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Require secure RPC communication" + compliance: + - cis: ["18.9.58.3.9.2"] + - cis_csc: ["3.4"] + references: + - 'CCE-35723-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fEncryptRPCTraffic -> 1' + + - id: 13191 + title: "Ensure 'Set client connection encryption level' is set to 'Enabled: High Level'" + description: "This policy setting specifies whether to require the use of a specific encryption level to secure communications between client computers and RD Session Host servers during Remote Desktop Protocol (RDP) connections. This policy only applies when you are using native RDP encryption. However, native RDP encryption (as opposed to SSL encryption) is not recommended. This policy does not apply to SSL encryption." + rationale: "If Remote Desktop client connections that use low level encryption are allowed, it is more likely that an attacker will be able to decrypt any captured Remote Desktop Services network traffic." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: High Level: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Set client connection encryption level" + compliance: + - cis: ["18.9.58.3.9.5"] + - cis_csc: ["3.4"] + references: + - 'CCE-35578-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MinEncryptionLevel -> 3' + + - id: 13192 + title: "Ensure 'Do not delete temp folders upon exit' is set to 'Disabled'" + description: "This policy setting specifies whether Remote Desktop Services retains a user's per-session temporary folders at logoff." + rationale: "Sensitive information could be contained inside the temporary folders and visible to other administrators that log into the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Temporary Folders\\Do not delete temp folders upon exit" + compliance: + - cis: ["18.9.58.3.11.1"] + - cis_csc: ["14.4", "14.6"] + references: + - 'CCE-34136-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> DeleteTempDirsOnExit -> 1' + + - id: 13193 + title: "Ensure 'Do not use temporary folders per session' is set to 'Disabled'" + description: "By default, Remote Desktop Services creates a separate temporary folder on the RD Session Host server for each active session that a user maintains on the RD Session Host server. The temporary folder is created on the RD Session Host server in a Temp folder under the user's profile folder and is named with the sessionid. This temporary folder is used to store individual temporary files. To reclaim disk space, the temporary folder is deleted when the user logs off from a session." + rationale: "Disabling this setting keeps the cached data independent for each session, both reducing the chance of problems from shared cached data between sessions, and keeping possibly sensitive data separate to each user session." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Temporary Folders\\Do not use temporary folders per session" + compliance: + - cis: ["18.9.58.3.11.2"] + - cis_csc: ["14.4", "14.6"] + references: + - 'CCE-34531-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> PerSessionTempDir -> 1' + + - id: 13194 + title: "Ensure 'Prevent downloading of enclosures' is set to 'Enabled'" + description: "This policy setting prevents the user from having enclosures (file attachments) downloaded from an RSS feed to the user's computer." + rationale: "Allowing attachments to be downloaded through the RSS feed can introduce files that could have malicious intent." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\RSS Feeds\\Prevent downloading of enclosures" + compliance: + - cis: ["18.9.59.1"] + - cis_csc: ["7.2"] + references: + - 'CCE-34822-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Feeds -> DisableEnclosureDownload -> 1' + + - id: 13195 + title: "Ensure 'Allow Cortana' is set to 'Disabled'" + description: "This policy setting specifies whether Cortana is allowed on the device." + rationale: "If Cortana is enabled, sensitive information could be contained in search history and sent out to Microsoft." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Allow Cortana" + compliance: + - cis: ["18.9.60.3"] + - cis_csc: ["9.1", "9.2"] + references: + - 'CCE-41421-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> AllowCortana -> 0' + + - id: 13196 + title: "Ensure 'Allow Cortana above lock screen' is set to 'Disabled'" + description: "This policy setting determines whether or not the user can interact with Cortana using speech while the system is locked." + rationale: "Access to any computer resource should not be allowed when the device is locked." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Allow Cortana above lock screen" + compliance: + - cis: ["18.9.60.4"] + - cis_csc: ["16.5"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> AllowCortanaAboveLock -> 0' + + - id: 13197 + title: "Ensure 'Allow indexing of encrypted files' is set to 'Disabled'" + description: "This policy setting controls whether encrypted items are allowed to be indexed. When this setting is changed, the index is rebuilt completely. Full volume encryption (such as BitLocker Drive Encryption or a non-Microsoft solution) must be used for the location of the index to maintain security for encrypted files." + rationale: "Indexing and allowing users to search encrypted files could potentially reveal confidential data stored within the encrypted files." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Allow indexing of encrypted files" + compliance: + - cis: ["18.9.60.5"] + - cis_csc: ["13.1"] + references: + - 'CCE-35314-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> AllowIndexingEncryptedStoresOrItems -> 0' + + - id: 13198 + title: "Ensure 'Allow search and Cortana to use location' is set to 'Disabled'" + description: "This policy setting specifies whether search and Cortana can provide location aware search and Cortana results." + rationale: "In an enterprise managed environment, allowing Cortana and Search to have access to location data is unnecessary. Organizations likely do not want this information shared out" + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Allow search and Cortana to use location" + compliance: + - cis: ["18.9.60.6"] + - cis_csc: ["9.1", "9.2"] + references: + - 'CCE-41372-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> AllowSearchToUseLocation -> 0' + + - id: 13199 + title: "Ensure 'Turn off Automatic Download and Install of updates' is set to 'Disabled'" + description: "This setting enables or disables the automatic download and installation of Windows Store app updates." + rationale: "Keeping your system properly patched can help protect against 0 day vulnerabilities." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Store\\Turn off Automatic Download and Install of updates" + compliance: + - cis: ["18.9.68.3"] + - cis_csc: ["3.1", "3.4", "3.5", "4.5", "5.1"] + references: + - 'CCE-35807-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore -> AutoDownload -> 4' + + - id: 13200 + title: "Ensure 'Turn off the offer to update to the latest version of Windows' is set to 'Enabled'" + description: "Enables or disables the Windows Store offer to update to the latest version of Windows." + rationale: "Unplanned OS upgrades can lead to more preventable support calls. The IT department should be managing and approving all upgrades and updates." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Store\\Turn off the offer to update to the latest version of Windows" + compliance: + - cis: ["18.9.68.4"] + - cis_csc: ["3.1", "3.4", "3.5", "4.5", "5.1"] + references: + - 'CCE-35809-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore -> DisableOSUpgrade -> 1' + + - id: 13201 + title: "Ensure 'Configure local setting override for reporting to Microsoft MAPS' is set to 'Disabled'" + description: "This policy setting configures a local override for the configuration to join Microsoft Active Protection Service (MAPS), which Microsoft has now renamed to \"Windows Defender Antivirus Cloud Protection Service\". This setting can only be set by Group Policy." + rationale: "The decision on whether or not to participate in Microsoft MAPS / Windows Defender Antivirus Cloud Protection Service for malicious software reporting should be made centrally in an enterprise managed environment, so that all computers within it behave consistently in that regard. Configuring this setting to Disabled ensures that the decision remains centrally managed." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\MAPS\\Configure local setting override for reporting to Microsoft MAPS" + compliance: + - cis: ["18.9.76.3.1"] + - cis_csc: ["8"] + references: + - 'CCE-33833-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet -> LocalSettingOverrideSpynetReporting -> 0' + + - id: 13202 + title: "Ensure 'Turn on behavior monitoring' is set to 'Enabled'" + description: "This policy setting allows you to configure behavior monitoring for Windows Defender Antivirus." + rationale: "When running an antivirus solution such as Windows Defender Antivirus, it is important to ensure that it is configured to heuristically monitor in real-time for suspicious and known malicious activity." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Real-Time Protection\\Turn on behavior monitoring" + compliance: + - cis: ["18.9.76.7.1"] + - cis_csc: ["8.1", "8.6"] + references: + - 'CCE-33865-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection -> DisableBehaviorMonitoring -> 0' + + - id: 13203 + title: "Ensure 'Scan removable drives' is set to 'Enabled'" + description: "This policy setting allows you to manage whether or not to scan for malicious software and unwanted software in the contents of removable drives, such as USB flash drives, when running a full scan." + rationale: "It is important to ensure that any present removable drives are always included in any type of scan, as removable drives are more likely to contain malicious software brought in to the enterprise managed environment from an external, unmanaged computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Scan\\Scan removable drives" + compliance: + - cis: ["18.9.76.10.1"] + - cis_csc: ["13"] + references: + - 'CCE-33888-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Scan -> DisableRemovableDriveScanning -> 0' + + - id: 13204 + title: "Ensure 'Turn on e-mail scanning' is set to 'Enabled'" + description: "This policy setting allows you to configure e-mail scanning. When e-mail scanning is enabled, the engine will parse the mailbox and mail files, according to their specific format, in order to analyze the mail bodies and attachments. Several e-mail formats are currently supported, for example: pst (Outlook), dbx, mbx, mime (Outlook Express), binhex (Mac)." + rationale: "Incoming e-mails should be scanned by an antivirus solution such as Windows Defender Antivirus, as email attachments are a commonly used attack vector to infiltrate computers with malicious software." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Scan\\Turn on e-mail scanning" + compliance: + - cis: ["18.9.76.10.2"] + - cis_csc: ["13"] + references: + - 'CCE-33906-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Scan -> DisableEmailScanning -> 0' + + - id: 13205 + title: "Ensure 'Configure Attack Surface Reduction rules' is set to 'Enabled'" + description: "This policy setting controls the state for the Attack Surface Reduction (ASR) rules." + rationale: "Attack surface reduction helps prevent actions and apps that are typically used by exploitseeking malware to infect machines." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Windows Defender Exploit Guard\\Attack Surface Reduction\\Configure Attack Surface Reduction rules" + compliance: + - cis: ["18.9.76.13.1.1"] + - cis_csc: ["8.4"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR -> ExploitGuard_ASR_Rules -> 1' + + - id: 13206 + title: "Ensure 'Configure Attack Surface Reduction rules: Set the state for each ASR rule' is 'configured'" + description: "This policy setting sets the Attack Surface Reduction rules. The recommended state for this setting is: 26190899-1602-49e8-8b27-eb1d0a1ce869 - 1 (Block Office communication application from creating child processes) 3b576869-a4ec-4529-8536-b80a7769e899 - 1 (Block Office applications from creating executable content) 5beb7efe-fd9a-4556-801d-275e5ffc04cc - 1 (Block execution of potentially obfuscated scripts) 75668c1f-73b5-4cf0-bb93-3ecf5cb7cc84 - 1 (Block Office applications from injecting code into other processes) 7674ba52-37eb-4a4f-a9a1-f0f9a1619a2c - 1 (Block Adobe Reader from creating child processes) 92e97fa1-2edf-4476-bdd6-9dd0b4dddc7b - 1 (Block Win32 API calls from Office macro) 9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2 - 1 (Block credential stealing from the Windows local security authority subsystem (lsass.exe)) b2b3f03d-6a65-4f7b-a9c7-1c7ef74a9ba4 - 1 (Block untrusted and unsigned processes that run from USB) be9ba2d9-53ea-4cdc-84e5-9b1eeee46550 - 1 (Block executable content from email client and webmail) d3e037e1-3eb8-44c8-a917-57927947596d - 1 (Block JavaScript or VBScript from launching downloaded executable content) d4f940ab-401b-4efc-aadc-ad5f3c50688a - 1 (Block Office applications from creating child processes)" + rationale: "Attack surface reduction helps prevent actions and apps that are typically used by exploitseeking malware to infect machines." + remediation: "To establish the recommended configuration via GP, set the following UI path so that 26190899-1602-49e8-8b27-eb1d0a1ce869, 3b576869-a4ec-4529-8536-b80a7769e899, 5beb7efe-fd9a-4556-801d-275e5ffc04cc, 75668c1f-73b5-4cf0-bb93-3ecf5cb7cc84, 7674ba52-37eb-4a4f-a9a1-f0f9a1619a2c, 92e97fa1-2edf-4476-bdd6-9dd0b4dddc7b, 9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2, b2b3f03d-6a65-4f7b-a9c7-1c7ef74a9ba4, be9ba2d9-53ea-4cdc-84e5-9b1eeee46550, d3e037e1-3eb8-44c8-a917-57927947596d and d4f940ab-401b-4efc-aadc-ad5f3c50688a are each set to a value of 1: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Windows Defender Exploit Guard\\Attack Surface Reduction\\Configure Attack Surface Reduction rules: Set the state for each ASR rule." + compliance: + - cis: ["18.9.76.13.1.2"] + - cis_csc: ["8.4"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550 -> 1' + - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> D4F940AB-401B-4EFC-AADC-AD5F3C50688A -> 1' + - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> 3B576869-A4EC-4529-8536-B80A7769E899 -> 1' + - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> 75668C1F-73B5-4CF0-BB93-3ECF5CB7CC84 -> 1' + - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> D3E037E1-3EB8-44C8-A917-57927947596D -> 1' + - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> 5BEB7EFE-FD9A-4556-801D-275E5FFC04CC -> 1' + - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> 92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B -> 1' + - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> 26190899-1602-49E8-8B27-eB1D0A1CE869 -> 1' + - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> 7674BA52-37EB-4A4F-A9A1-F0F9A1619A2C -> 1' + - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> 9E6C4E1F-7D60-472F-bA1A-A39EF669E4B2 -> 1' + - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> B2B3F03D-6A65-4F7B-A9C7-1C7EF74A9BA4 -> 1' + + - id: 13207 + title: "Ensure 'Prevent users and apps from accessing dangerous websites' is set to 'Enabled: Block'" + description: "This policy setting controls Windows Defender Exploit Guard network protection." + rationale: "This setting can help prevent employees from using any application to access dangerous domains that may host phishing scams, exploit-hosting sites, and other malicious content on the Internet." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Block: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Windows Defender Exploit Guard\\Network Protection\\Prevent users and apps from accessing dangerous websites" + compliance: + - cis: ["18.9.76.13.3.1"] + - cis_csc: ["7"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Network Protection -> EnableNetworkProtection -> 1' + + - id: 13208 + title: "Ensure 'Turn off Windows Defender AntiVirus' is set to 'Disabled'" + description: "This policy setting turns off Windows Defender Antivirus. If the setting is configured to Disabled, Windows Defender Antivirus runs and computers are scanned for malware and other potentially unwanted software." + rationale: "It is important to ensure a current, updated antivirus product is scanning each computer for malicious file activity. Microsoft provides a competent solution out of the box in Windows Defender Antivirus. Organizations that choose to purchase a reputable 3rd-party antivirus solution may choose to exempt themselves from this recommendation in lieu of the commercial alternative." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Turn off Windows Defender AntiVirus" + compliance: + - cis: ["18.9.76.14"] + - cis_csc: ["8.1", "8.6"] + references: + - 'CCE-33478-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender -> DisableAntiSpyware -> 0' + + - id: 13209 + title: "Ensure 'Prevent users from modifying settings' is set to 'Enabled'" + description: "This policy setting prevent users from making changes to the Exploit protection settings area in the Windows Defender Security Center." + rationale: "Only authorized IT staff should be able to make changes to the exploit protection settings in order to ensure the organizations specific configuration is not modified." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Security Center\\App and browser protection\\Prevent users from modifying settings" + compliance: + - cis: ["18.9.79.2.1"] + - cis_csc: ["8.4"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\App and Browser protection -> DisallowExploitProtectionOverride -> 1' + + - id: 13210 + title: "Ensure 'Configure Windows Defender SmartScreen' is set to 'Enabled: Warn and prevent bypass'" + description: "This policy setting allows you to manage the behavior of Windows SmartScreen. Windows SmartScreen helps keep PCs safer by warning users before running unrecognized programs downloaded from the Internet. Some information is sent to Microsoft about files and programs run on PCs with this feature enabled." + rationale: "Windows SmartScreen helps keep PCs safer by warning users before running unrecognized programs downloaded from the Internet. However, due to the fact that some information is sent to Microsoft about files and programs run on PCs some organizations may prefer to disable it." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Warn and prevent bypass: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender SmartScreen\\Explorer\\Configure Windows Defender SmartScreen" + compliance: + - cis: ["18.9.80.1.1"] + - cis_csc: ["2"] + references: + - 'CCE-34026-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnableSmartScreen -> 1' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> ShellSmartScreenLevel -> Block' + + - id: 13211 + title: "Ensure 'Configure Windows Defender SmartScreen' is set to 'Enabled'" + description: "This setting lets you decide whether to turn on SmartScreen Filter. SmartScreen Filter provides warning messages to help protect your employees from potential phishing scams and malicious software." + rationale: "SmartScreen serves an important purpose as it helps to warn users of possible malicious sites and files. Allowing users to turn off this setting can make the browser become more vulnerable to compromise." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender SmartScreen\\Microsoft Edge\\Configure Windows Defender SmartScreen" + compliance: + - cis: ["18.9.80.2.1"] + - cis_csc: ["2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\PhishingFilter -> EnabledV9 -> 1' + + - id: 13212 + title: "Ensure 'Prevent bypassing Windows Defender SmartScreen prompts for files' is set to 'Enabled'" + description: "This setting lets you decide whether employees can override the SmartScreen Filter warnings about downloading unverified files." + rationale: "SmartScreen will warn an employee if a file is potentially malicious. Enabling this setting prevents these warnings from being bypassed." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: In the Windows 10 Release 1703 Administrative Templates the setting was in the following location: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender SmartScreen\\Microsoft Edge\\Prevent bypassing Windows Defender SmartScreen prompts for files In the Windows 10 Release 1709 Administrative Templates the setting was removed from the new location above and left in the old location: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Prevent bypassing Windows Defender SmartScreen prompts for files" + compliance: + - cis: ["18.9.80.2.2"] + - cis_csc: ["7"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\PhishingFilter -> PreventOverrideAppRepUnknown -> 1' + + - id: 13213 + title: "Ensure 'Prevent bypassing Windows Defender SmartScreen prompts for sites' is set to 'Enabled'" + description: "This setting lets you decide whether employees can override the SmartScreen Filter warnings about potentially malicious websites." + rationale: "SmartScreen will warn an employee if a website is potentially malicious. Enabling this setting prevents these warnings from being bypassed." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender SmartScreen\\Microsoft Edge\\Prevent bypassing Windows Defender SmartScreen prompts for sites" + compliance: + - cis: ["18.9.80.2.3"] + - cis_csc: ["7"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\PhishingFilter -> PreventOverride -> 1' + + - id: 13214 + title: "Ensure 'Enables or disables Windows Game Recording and Broadcasting' is set to 'Disabled'" + description: "This setting enables or disables the Windows Game Recording and Broadcasting features." + rationale: "If this setting is allowed users could record and broadcast session info to external sites which is a privacy concern." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Game Recording and Broadcasting\\Enables or disables Windows Game Recording and Broadcasting" + compliance: + - cis: ["18.9.82.1"] + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR -> AllowGameDVR -> 0' + + - id: 13215 + title: "Ensure 'Allow Windows Ink Workspace' is set to 'Enabled: On, but disallow access above lock' OR 'Disabled' but not 'Enabled: On'" + description: "This policy setting determines whether Windows Ink items are allowed above the lock screen." + rationale: "Allowing any apps to be accessed while system is locked is not recommended. If this feature is permitted, it should only be accessible once a user authenticates with the proper credentials." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: On, but disallow access above lock OR Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Ink Workspace\\Allow Windows Ink Workspace" + compliance: + - cis: ["18.9.84.2"] + - cis_csc: ["16.5"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsInkWorkspace -> AllowWindowsInkWorkspace -> r:^0$|^1$' + + - id: 13216 + title: "Ensure 'Allow user control over installs' is set to 'Disabled'" + description: "This setting controls whether users are permitted to change installation options that typically are available only to system administrators. The security features of Windows Installer normally prevent users from changing installation options that are typically reserved for system administrators, such as specifying the directory to which files are installed. If Windows Installer detects that an installation package has permitted the user to change a protected option, it stops the installation and displays a message. These security features operate only when the installation program is running in a privileged security context in which it has access to directories denied to the user." + rationale: "In an enterprise managed environment, only IT staff with administrative rights should be installing or changing software on a system. Allowing users the ability to have any control over installs can risk unapproved software from being installed or removed from a system, which could cause the system to become vulnerable to compromise." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Allow user control over installs" + compliance: + - cis: ["18.9.85.1"] + - cis_csc: ["5.1"] + references: + - 'CCE-35431-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> EnableUserControl -> 1' + + - id: 13217 + title: "Ensure 'Always install with elevated privileges' is set to 'Disabled'" + description: "This setting controls whether or not Windows Installer should use system permissions when it installs any program on the system. Note: This setting appears both in the Computer Configuration and User Configuration folders. To make this setting effective, you must enable the setting in both folders. Caution: If enabled, skilled users can take advantage of the permissions this setting grants to change their privileges and gain permanent access to restricted files and folders. Note that the User Configuration version of this setting is not guaranteed to be secure." + rationale: "Users with limited privileges can exploit this feature by creating a Windows Installer installation package that creates a new local account that belongs to the local built-in Administrators group, adds their current account to the local built-in Administrators group, installs malicious software, or performs other unauthorized activities." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Always install with elevated privileges" + compliance: + - cis: ["18.9.85.2"] + - cis_csc: ["5.1"] + references: + - 'CCE-35400-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> AlwaysInstallElevated -> 0' + + - id: 13218 + title: "Ensure 'Sign-in last interactive user automatically after a system-initiated restart' is set to 'Disabled'" + description: "This policy setting controls whether a device will automatically sign-in the last interactive user after Windows Update restarts the system." + rationale: "Disabling this feature will prevent the caching of user's credentials and unauthorized use of the device, and also ensure the user is aware of the restart." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Logon Options\\Sign-in last interactive user automatically after a system-initiated restart" + compliance: + - cis: ["18.9.86.1"] + - cis_csc: ["16.5"] + references: + - 'CCE-33891-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> DisableAutomaticRestartSignOn -> 1' + + - id: 13219 + title: "Ensure 'Turn on PowerShell Script Block Logging' is set to 'Disabled'" + description: "This policy setting enables logging of all PowerShell script input to the Microsoft-WindowsPowerShell/Operational event log." + rationale: "There are potential risks of capturing passwords in the PowerShell logs. This setting should only be needed for debugging purposes, and not in normal operation, it is important to ensure this is set to Disabled." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows PowerShell\\Turn on PowerShell Script Block Logging" + compliance: + - cis: ["18.9.95.1"] + - cis_csc: ["16.4"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging -> EnableScriptBlockLogging -> 0' + + - id: 13220 + title: "Ensure 'Turn on PowerShell Transcription' is set to 'Disabled'" + description: "This Policy setting lets you capture the input and output of Windows PowerShell commands into text-based transcripts." + rationale: "If this setting is enabled there is a risk that passwords could get stored in plain text in the PowerShell_transcript output file." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows PowerShell\\Turn on PowerShell Transcription" + compliance: + - cis: ["18.9.95.2"] + - cis_csc: ["16.4"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription -> EnableTranscripting -> 0' + + - id: 13221 + title: "Ensure 'Allow Basic authentication' is set to 'Disabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client uses Basic authentication." + rationale: "Basic authentication is less robust than other authentication methods available in WinRM because credentials including passwords are transmitted in plain text. An attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Allow Basic authentication" + compliance: + - cis: ["18.9.97.1.1"] + - cis_csc: ["16.13", "16.5"] + references: + - 'CCE-35258-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowBasic -> 0' + + - id: 13222 + title: "Ensure 'Allow unencrypted traffic' is set to 'Disabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client sends and receives unencrypted messages over the network." + rationale: "Encrypting WinRM network traffic reduces the risk of an attacker viewing or modifying WinRM messages as they transit the network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Allow unencrypted traffic" + compliance: + - cis: ["18.9.97.1.2"] + - cis_csc: ["16.5", "16.13"] + references: + - 'CCE-34458-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowUnencryptedTraffic -> 0' + + - id: 13223 + title: "Ensure 'Disallow Digest authentication' is set to 'Enabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client will not use Digest authentication." + rationale: "Digest authentication is less robust than other authentication methods available in WinRM, an attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Disallow Digest authentication" + compliance: + - cis: ["18.9.97.1.3"] + - cis_csc: ["16.5", "16.13"] + references: + - 'CCE-34778-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowDigest -> 0' + + - id: 13224 + title: "Ensure 'Allow Basic authentication' is set to 'Disabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service accepts Basic authentication from a remote client." + rationale: "Basic authentication is less robust than other authentication methods available in WinRM because credentials including passwords are transmitted in plain text. An attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow Basic authentication" + compliance: + - cis: ["18.9.97.2.1"] + - cis_csc: ["16.5", "16.13"] + references: + - 'CCE-34779-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowBasic -> 0' + + - id: 13225 + title: "Ensure 'Allow unencrypted traffic' is set to 'Disabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service automatically listens on the network for requests on the HTTP transport over the default HTTP port." + rationale: "Any feature is a potential avenue of attack, those that enable inbound network connections are particularly risky. Only enable the use of the Windows Remote Management (WinRM) service on trusted networks and when feasible employ additional controls such as IPsec." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow remote server management through WinRM" + compliance: + - cis: ["18.9.97.2.3"] + - cis_csc: ["3.4"] + references: + - 'CCE-35054-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowUnencryptedTraffic -> 0' + + - id: 13226 + title: "Ensure 'Disallow WinRM from storing RunAs credentials' is set to 'Enabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service sends and receives unencrypted messages over the network." + rationale: "Encrypting WinRM network traffic reduces the risk of an attacker viewing or modifying WinRM messages as they transit the network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow unencrypted traffic" + compliance: + - cis: ["18.9.97.2.4"] + - cis_csc: ["16.5", "16.13"] + references: + - 'CCE-35416-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> DisableRunAs -> 1' + + - id: 13227 + title: "Ensure 'Manage preview builds' is set to 'Enabled: Disable preview builds'" + description: "This policy setting determines whether users can access the Windows Insider Program controls in Settings -> Update and Security. These controls enable users to make their devices available for downloading and installing preview (beta) builds of Windows software." + rationale: "It can be risky for experimental features to be allowed in an enterprise managed environment because this can introduce bugs and security holes into systems, making it easier for an attacker to gain access. It is generally preferred to only use production-ready builds." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Disable preview builds: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Windows Update for Business\\Manage preview builds" + compliance: + - cis: ["18.9.101.1.1"] + - cis_csc: ["3"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> ManagePreviewBuilds -> 1' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> ManagePreviewBuildsPolicyValue -> 0' + + - id: 13228 + title: "Ensure 'Select when Preview Builds and Feature Updates are received' is set to 'Enabled: Semi-Annual Channel, 180 or more days'" + description: "This policy setting determines the level of Preview Build or Feature Updates to receive, and when. The Windows readiness level for each new Windows 10 Feature Update is classified in one of 5 categories, depending on your organizations level of comfort with receiving them: - Preview Build - Fast: Devices set to this level will be the first to receive new builds of Windows with features not yet available to the general public. Select Fast to participate in identifying and reporting issues to Microsoft, and provide suggestions on new functionality. - Preview Build - Slow: Devices set to this level receive new builds of Windows before they are available to the general public, but at a slower cadence than those set to Fast, and with changes and fixes identified in earlier builds. - Release Preview: Receive builds of Windows just before Microsoft releases them to the general public. - Semi-Annual Channel (Targeted): Receive feature updates when they are released to the general public. - Semi-Annual Channel: Feature updates will arrive when they are declared SemiAnnual Channel. This usually occurs about 4 months after Semi-Annual Channel (Targeted), indicating that Microsoft, Independent Software Vendors (ISVs), partners and customer believe that the release is ready for broad deployment." + rationale: "Forcing new features without prior testing in your environment could cause software incompatibilities as well as introducing new bugs into the operating system. In an enterprise managed environment, it is generally preferred to delay Feature Updates until thorough testing and a deployment plan is in place. This recommendation delays the automatic installation of new features as long as possible." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Semi-Annual Channel, 180 or more days: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Windows Update for Business\\Select when Preview Builds and Feature Updates are received" + compliance: + - cis: ["18.9.101.1.2"] + - cis_csc: ["3"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferFeatureUpdates -> 1' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferFeatureUpdatesPeriodInDays -> n:^(\d+) compare >= 180' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> BranchReadinessLevel -> 32' + + - id: 13229 + title: "Ensure 'Select when Quality Updates are received' is set to 'Enabled: 0 days'" + description: "This settings controls when Quality Updates are received." + rationale: "Quality Updates can contain important bug fixes and/or security patches, and should be installed as soon as possible." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled:0 days: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Windows Update for Business\\Select when Quality Updates are received" + compliance: + - cis: ["18.9.101.1.3"] + - cis_csc: ["3.4", "3.5", "4.5"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferQualityUpdates -> 1' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferQualityUpdatesPeriodInDays -> 0' + + - id: 13230 + title: "Ensure 'Configure Automatic Updates' is set to 'Enabled'" + description: "This policy setting specifies whether computers in your environment will receive security updates from Windows Update or WSUS. If you configure this policy setting to Enabled, the operating system will recognize when a network connection is available and then use the network connection to search Windows Update or your designated intranet site for updates that apply to them. After you configure this policy setting to Enabled, select one of the following three options in the Configure Automatic Updates Properties dialog box to specify how the service will work: - 2 - Notify for download and auto install (Notify before downloading any updates) - 3 - Auto download and notify for install (Download the updates automatically and notify when they are ready to be installed.) (Default setting) - 4 - Auto download and schedule the install (Automatically download updates and install them on the schedule specified below.)) - 5 - Allow local admin to choose setting (Leave decision on above choices up to the local Administrators (Not Recommended))" + rationale: "Although each version of Windows is thoroughly tested before release, it is possible that problems will be discovered after the products are shipped. The Configure Automatic Updates setting can help you ensure that the computers in your environment will always have the most recent critical operating system updates and service packs installed." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Configure Automatic Updates" + compliance: + - cis: ["18.9.101.2"] + - cis_csc: ["3.4", "3.5", "4.5"] + references: + - 'CCE-35111-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> NoAutoUpdate -> 0' + + - id: 13231 + title: "Ensure 'Configure Automatic Updates: Scheduled install day' is set to '0 - Every day'" + description: "This policy setting specifies when computers in your environment will receive security updates from Windows Update or WSUS." + rationale: "Although each version of Windows is thoroughly tested before release, it is possible that problems will be discovered after the products are shipped. The Configure Automatic Updates setting can help you ensure that the computers in your environment will always have the most recent critical operating system updates and service packs installed." + remediation: "To establish the recommended configuration via GP, set the following UI path to 0 - Every day: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Configure Automatic Updates: Scheduled install day." + compliance: + - cis: ["18.9.101.3"] + - cis_csc: ["3.4", "3.5", "4.5"] + references: + - 'CCE-35111-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> ScheduledInstallDay -> 0' + + - id: 13232 + title: "Ensure 'No auto-restart with logged on users for scheduled automatic updates installations' is set to 'Disabled'" + description: "This policy setting specifies that Automatic Updates will wait for computers to be restarted by the users who are logged on to them to complete a scheduled installation." + rationale: "Some security updates require that the computer be restarted to complete an installation. If the computer cannot restart automatically, then the most recent update will not completely install and no new updates will download to the computer until it is restarted. Without the auto-restart functionality, users who are not security-conscious may choose to indefinitely delay the restart, therefore keeping the computer in a less secure state." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\No auto-restart with logged on users for scheduled automatic updates installations" + compliance: + - cis: ["18.9.101.4"] + - cis_csc: ["3.4", "3.5", "4.5"] + references: + - 'CCE-33813-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> NoAutoRebootWithLoggedOnUsers -> 0' diff --git a/sca/windows/cis_win10_enterprise_L1_rcl.yml b/sca/windows/cis_win10_enterprise_L1_rcl.yml deleted file mode 100755 index 8a5fa99e0..000000000 --- a/sca/windows/cis_win10_enterprise_L1_rcl.yml +++ /dev/null @@ -1,2974 +0,0 @@ -# Security Configuration assessment -# CIS Checks for Windows 10 Enterprise L1 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# Center for Internet Security Benchmark v1.4.0 for Microsoft Windows 10 Release 1709 v1.4.0 - 08-21-2018 - -policy: - id: "cis_win10_enterprise_L1" - file: "cis_win10_enterprise_L1_rcl.yml" - name: "CIS benchmark for Windows 10 Enterprise (Release 1709)" - description: "This document provides prescriptive guidance for establishing a secure configuration posture for Microsoft Windows (L1)." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check that the Windows platform is Windows 10" - description: "Requirements for running the CIS benchmark Domain Controller L1 under Windows 10" - condition: "any required" - rules: - - 'r:HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion -> ProductName -> r:^Windows 10;' - -checks: -# 2.3 Security Options - - id: 12000 - title: "Ensure 'Accounts: Block Microsoft accounts' is set to 'Users can't add or log on with Microsoft accounts'" - description: "This policy setting prevents users from adding new Microsoft accounts on this computer. The recommended state for this setting is: Users can't add or log on with Microsoft accounts." - rationale: "Organizations that want to effectively implement identity management policies and maintain firm control of what accounts are used to log onto their computers will probably in order to meet the requirements of compliance standards that apply to their information systems." - remediation: "To establish the recommended configuration via GP, set the following UI path to Users can't add or log on with Microsoft accounts: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Accounts: Block Microsoft accounts" - compliance: - - cis: "2.3.1.2" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> NoConnectedUser -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> !NoConnectedUser;' - - id: 12001 - title: "Ensure 'Accounts: Limit local account use of blank passwords to console logon only' is set to 'Enabled'" - description: "This policy setting determines whether local accounts that are not password protected can be used to log on from locations other than the physical computer console. If you enable this policy setting, local accounts that have blank passwords will not be able to log on to the network from remote client computers. Such accounts will only be able to log on at the keyboard of the computer. The recommended state for this setting is: Enabled." - rationale: "Blank passwords are a serious threat to computer security and should be forbidden through both organizational policy and suitable technical measures. In fact, the default settings for Active Directory domains require complex passwords of at least seven characters. However, if users with the ability to create new accounts bypass your domainbased password policies, they could create accounts with blank passwords. For example, a user could build a stand-alone computer, create one or more accounts with blank passwords, and then join the computer to the domain. The local accounts with blank passwords would still function. Anyone who knows the name of one of these unprotected accounts could then use it to log on." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Accounts: Limit local account use of blank passwords to console logon only" - compliance: - - cis: "2.3.1.4" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LimitBlankPasswordUse -> 0;' - - id: 12002 - title: "Ensure 'Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings' is set to 'Enabled'" - description: "This policy setting determines whether the system shuts down if it is unable to log Security events. It is a requirement for Trusted Computer System Evaluation Criteria (TCSEC)-C2 and Common Criteria certification to prevent auditable events from occurring if the audit system is unable to log them. Microsoft has chosen to meet this requirement by halting the system and displaying a stop message if the auditing system experiences a failure. When this policy setting is enabled, the system will be shut down if a security audit cannot be logged for any reason. If the Audit: Shut down system immediately if unable to log security audits setting is enabled, unplanned system failures can occur. The administrative burden can be significant, especially if you also configure the Retention method for the Security log to Do not overwrite events (clear log manually). This configuration causes a repudiation threat (a backup operator could deny that they backed up or restored data) to become a denial of service (DoS) vulnerability, because a server could be forced to shut down if it is overwhelmed with logon events and other security events that are written to the Security log. Also, because the shutdown is not graceful, it is possible that irreparable damage to the operating system, applications, or data could result. Although the NTFS file system guarantees its integrity when an ungraceful computer shutdown occurs, it cannot guarantee that every data file for every application will still be in a usable form when the computer restarts. The recommended state for this setting is: Disabled." - rationale: "If the computer is unable to record events to the Security log, critical evidence or important troubleshooting information may not be available for review after a security incident. Also, an attacker could potentially generate a large volume of Security log events to purposely force a computer shutdown." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Audit: Shut down system immediately if unable to log security audits" - compliance: - - cis: "2.3.2.1" - - cis_csc: "6.2, 6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> SCENoApplyLegacyAuditPolicy -> !1;' - - id: 12003 - title: "Ensure 'Audit: Shut down system immediately if unable to log security audits' is set to 'Disabled'" - description: "This policy setting determines whether the system shuts down if it is unable to log Security events. It is a requirement for Trusted Computer System Evaluation Criteria (TCSEC)-C2 and Common Criteria certification to prevent auditable events from occurring if the audit system is unable to log them. Microsoft has chosen to meet this requirement by halting the system and displaying a stop message if the auditing system experiences a failure. When this policy setting is enabled, the system will be shut down if a security audit cannot be logged for any reason. The recommended state for this setting is: Disabled." - rationale: "If the computer is unable to record events to the Security log, critical evidence or important troubleshooting information may not be available for review after a security incident. Also, an attacker could potentially generate a large volume of Security log events to purposely force a computer shutdown." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Audit: Shut down system immediately if unable to log security audits" - compliance: - - cis: "2.3.2.2" - - cis_csc: "6" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> CrashOnAuditFail -> 1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> CrashOnAuditFail -> 2;' - - id: 12004 - title: "Ensure 'Devices: Allowed to format and eject removable media' is set to 'Administrators and Interactive Users'" - description: "This policy setting determines who is allowed to format and eject removable NTFS media. You can use this policy setting to prevent unauthorized users from removing data on one computer to access it on another computer on which they have local administrator privileges. The recommended state for this setting is: Administrators and Interactive Users." - rationale: "Users may be able to move data on removable disks to a different computer where they have administrative privileges. The user could then take ownership of any file, grant themselves full control, and view or modify any file. The fact that most removable storage devices will eject media by pressing a mechanical button diminishes the advantage of this policy setting." - remediation: "To establish the recommended configuration via GP, set the following UI path to Administrators and Interactive Users: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Devices: Allowed to format and eject removable media" - compliance: - - cis: "2.3.4.1" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> AllocateDASD -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> AllocateDASD -> 2;' - - id: 12005 - title: "Ensure 'Domain member: Digitally encrypt or sign secure channel data (always)' is set to 'Enabled'" - description: "This policy setting determines whether all secure channel traffic that is initiated by the domain member must be signed or encrypted. The recommended state for this setting is: Enabled." - rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated—and sensitive information such as passwords are encrypted—but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally encrypt or sign secure channel data (always)" - compliance: - - cis: "2.3.6.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> RequireSignOrSeal -> 0;' - - id: 12006 - title: "Ensure 'Domain member: Digitally encrypt secure channel data (when possible)' is set to 'Enabled'" - description: "This policy setting determines whether a domain member should attempt to negotiate encryption for all secure channel traffic that it initiates. The recommended state for this setting is: Enabled." - rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated—and sensitive information such as passwords are encrypted—but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally encrypt secure channel data (when possible)" - compliance: - - cis: "2.3.6.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> SealSecureChannel -> 0;' - - id: 12007 - title: "Ensure 'Domain member: Digitally sign secure channel data (when possible)' is set to 'Enabled'" - description: "This policy setting determines whether a domain member should attempt to negotiate whether all secure channel traffic that it initiates must be digitally signed. Digital signatures protect the traffic from being modified by anyone who captures the data as it traverses the network. The recommended state for this setting is: Enabled." - rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated—and sensitive information such as passwords are encrypted—but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally sign secure channel data (when possible)" - compliance: - - cis: "2.3.6.3" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> SignSecureChannel -> 0;' - - id: 12008 - title: "Ensure 'Domain member: Disable machine account password changes' is set to 'Disabled'" - description: "This policy setting determines whether a domain member can periodically change its computer account password. Computers that cannot automatically change their account passwords are potentially vulnerable, because an attacker might be able to determine the password for the system's domain account. The recommended state for this setting is: Disabled" - rationale: "The default configuration for Windows Server 2003-based computers that belong to a domain is that they are automatically required to change the passwords for their accounts every 30 days. If you disable this policy setting, computers that run Windows Server 2003 will retain the same passwords as their computer accounts. Computers that are no longer able to automatically change their account password are at risk from an attacker who could determine the password for the computer's domain account." - remediation: "Remediation: To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Disable machine account password changes" - compliance: - - cis: "2.3.6.4" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters -> DisablePasswordChange -> !0;' - - id: 12009 - title: "Ensure 'Domain member: Require strong (Windows 2000 or later) session key' is set to 'Enabled'" - description: "When this policy setting is enabled, a secure channel can only be established with Domain Controllers that are capable of encrypting secure channel data with a strong (128-bit) session key. To enable this policy setting, all Domain Controllers in the domain must be able to encrypt secure channel data with a strong key, which means all Domain Controllers must be running Microsoft Windows 2000 or newer. The recommended state for this setting is: Enabled." - rationale: "Session keys that are used to establish secure channel communications between Domain Controllers and member computers are much stronger in Windows 2000 than they were in previous Microsoft operating systems. Whenever possible, you should take advantage of these stronger session keys to help protect secure channel communications from attacks that attempt to hijack network sessions and eavesdropping. (Eavesdropping is a form of hacking in which network data is read or altered in transit. The data can be modified to hide or change the sender, or be redirected.)" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Require strong (Windows 2000 or later) session key" - compliance: - - cis: "2.3.6.6" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters -> RequireStrongKey -> !1;' - - id: 12010 - title: "Ensure 'Interactive logon: Do not display last user name' is set to 'Enabled'" - description: "This policy setting determines whether the account name of the last user to log on to the client computers in your organization will be displayed in each computer's respective Windows logon screen. Enable this policy setting to prevent intruders from collecting account names visually from the screens of desktop or laptop computers in your organization. The recommended state for this setting is: Enabled." - rationale: "An attacker with access to the console (for example, someone with physical access or someone who is able to connect to the server through Remote Desktop Services) could view the name of the last user who logged on to the server. The attacker could then try to guess the password, use a dictionary, or use a brute-force attack to try and log on." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Do not display last user name" - compliance: - - cis: "2.3.7.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> DontDisplayLastUserName -> !1;' - - id: 12011 - title: "Ensure 'Interactive logon: Do not require CTRL+ALT+DEL' is set to 'Disabled'" - description: "This policy setting determines whether users must press CTRL+ALT+DEL before they log on. The recommended state for this setting is: Disabled." - rationale: "Microsoft developed this feature to make it easier for users with certain types of physical impairments to log on to computers that run Windows. If users are not required to press CTRL+ALT+DEL, they are susceptible to attacks that attempt to intercept their passwords. If CTRL+ALT+DEL is required before logon, user passwords are communicated by means of a trusted path. An attacker could install a Trojan horse program that looks like the standard Windows logon dialog box and capture the user's password. The attacker would then be able to log on to the compromised account with whatever level of privilege that user has." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Do not require CTRL+ALT+DEL" - compliance: - - cis: "2.3.7.2" - - cis_csc: "8" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> DisableCAD -> !0;' - - id: 12012 - title: "Ensure 'Interactive logon: Machine inactivity limit' is set to '900 or fewer second(s), but not 0'" - description: "Windows notices inactivity of a logon session, and if the amount of inactive time exceeds the inactivity limit, then the screen saver will run, locking the session. The recommended state for this setting is: 900 or fewer second(s), but not 0. Note: A value of 0 does not conform to the benchmark as it disables the machine inactivity limit" - rationale: "If a user forgets to lock their computer when they walk away it's possible that a passerby will hijack it." - remediation: "To establish the recommended configuration via GP, set the following UI path to 900 or fewer seconds, but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Machine inactivity limit" - compliance: - - cis: "2.3.7.4" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 385;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 386;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 387;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 388;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 389;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:38\D;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:39\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:3\D\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:4\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:5\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:6\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:7\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:8\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:9\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:\D\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:\w\w\w\w+;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !InactivityTimeoutSecs;' - - id: 12013 - title: "Ensure 'Interactive logon: Prompt user to change password before expiration' is set to 'between 5 and 14 days'" - description: "This policy setting determines how far in advance users are warned that their password will expire. It is recommended that you configure this policy setting to at least 5 days but no more than 14 days to sufficiently warn users when their passwords will expire. The recommended state for this setting is: between 5 and 14 days." - rationale: "Users will need to be warned that their passwords are going to expire, or they may inadvertently be locked out of the computer when their passwords expire. This condition could lead to confusion for users who access the network locally, or make it impossible for users to access your organization's network through dial-up or virtual private network (VPN) connections." - remediation: "To establish the recommended configuration via GP, set the following UI path to a value between 5 and 14 days: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Prompt user to change password before expiration" - compliance: - - cis: "2.3.7.8" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 2;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 3;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 4;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 0F;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:1\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:2\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:3\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:4\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:5\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:6\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:7\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:8\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:9\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:\D\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:\w\w\w+;' - - id: 12014 - title: "Ensure 'Interactive logon: Smart card removal behavior' is set to 'Lock Workstation' or higher" - description: "This policy setting determines what happens when the smart card for a logged-on user is removed from the smart card reader. The recommended state for this setting is: Lock Workstation. Configuring this setting to Force Logoff or Disconnect if a Remote Desktop Services session also conforms to the benchmark." - rationale: "Users sometimes forget to lock their workstations when they are away from them, allowing the possibility for malicious users to access their computers. If smart cards are used for authentication, the computer should automatically lock itself when the card is removed to ensure that only the user with the smart card is accessing resources using those credentials." - remediation: "To establish the recommended configuration via GP, set the following UI path to Lock Workstation (or, if applicable for your environment, Force Logoff or Disconnect if a Remote Desktop Services session): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Smart card removal behavior" - compliance: - - cis: "2.3.7.9" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScRemoveOption -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> !ScRemoveOption;' - - id: 12015 - title: "Ensure 'Microsoft network client: Digitally sign communications (always)' is set to 'Enabled'" - description: "This policy setting determines whether packet signing is required by the SMB client component. Note: When Windows Vista-based computers have this policy setting enabled and they connect to file or print shares on remote servers, it is important that the setting is synchronized with its companion setting, Microsoft network server: Digitally sign communications (always), on those servers. For more information about these settings, see the \"Microsoft network client and server: Digitally sign communications (four related settings)\" section in Chapter 5 of the Threats and Countermeasures guide. The recommended state for this setting is: Enabled." - rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Digitally sign communications (always)" - compliance: - - cis: "2.3.8.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> RequireSecuritySignature -> !1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> !RequireSecuritySignature;' - - id: 12016 - title: "Ensure 'Microsoft network client: Digitally sign communications (if server agrees)' is set to 'Enabled'" - description: "This policy setting determines whether the SMB client will attempt to negotiate SMB packet signing. Note: Enabling this policy setting on SMB clients on your network makes them fully effective for packet signing with all clients and servers in your environment. The recommended state for this setting is: Enabled." - rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Digitally sign communications (if server agrees)" - compliance: - - cis: "2.3.8.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> EnableSecuritySignature -> !1;' - - id: 12017 - title: "Ensure 'Microsoft network client: Send unencrypted password to third-party SMB servers' is set to 'Disabled'" - description: "This policy setting determines whether the SMB redirector will send plaintext passwords during authentication to third-party SMB servers that do not support password encryption. It is recommended that you disable this policy setting unless there is a strong business case to enable it. If this policy setting is enabled, unencrypted passwords will be allowed across the network. The recommended state for this setting is: Disabled." - rationale: "If you enable this policy setting, the server can transmit passwords in plaintext across the network to other computers that offer SMB services, which is a significant security risk. These other computers may not use any of the SMB security mechanisms that are included with Windows Server 2003." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Send unencrypted password to third-party SMB servers" - compliance: - - cis: "2.3.8.3" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> EnablePlainTextPassword -> !0;' - - id: 12018 - title: "Ensure 'Microsoft network server: Amount of idle time required before suspending session' is set to '15 or fewer minute(s), but not 0'" - description: "This policy setting allows you to specify the amount of continuous idle time that must pass in an SMB session before the session is suspended because of inactivity. Administrators can use this policy setting to control when a computer suspends an inactive SMB session. If client activity resumes, the session is automatically reestablished. A value of 0 appears to allow sessions to persist indefinitely. The maximum value is 99999, which is over 69 days; in effect, this value disables the setting. The recommended state for this setting is: 15 or fewer minute(s), but not 0." - rationale: "Each SMB session consumes server resources, and numerous null sessions will slow the server or possibly cause it to fail. An attacker could repeatedly establish SMB sessions until the server's SMB services become slow or unresponsive." - remediation: "To establish the recommended configuration via GP, set the following UI path to 15 or fewer minute(s), but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Amount of idle time required before suspending session" - compliance: - - cis: "2.3.9.1" - - cis_csc: "3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> 0;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:1\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:2\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:3\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:4\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:5\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:6\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:7\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:8\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:9\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:\D\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:\w\w\w+;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> !AutoDisconnect;' - - id: 12019 - title: "Ensure 'Microsoft network server: Digitally sign communications (always)' is set to 'Enabled'" - description: "This policy setting determines whether packet signing is required by the SMB server component. Enable this policy setting in a mixed environment to prevent downstream clients from using the workstation as a network server. The recommended state for this setting is: Enabled." - rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Digitally sign communications (always)" - compliance: - - cis: "2.3.9.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> RequireSecuritySignature -> !1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> !RequireSecuritySignature;' - - id: 12020 - title: "Ensure 'Microsoft network server: Digitally sign communications (if client agrees)' is set to 'Enabled'" - description: "This policy setting determines whether the SMB server will negotiate SMB packet signing with clients that request it. If no signing request comes from the client, a connection will be allowed without a signature if the Microsoft network server: Digitally sign communications (always) setting is not enabled. Note: Enable this policy setting on SMB clients on your network to make them fully effective for packet signing with all clients and servers in your environment. The recommended state for this setting is: Enabled." - rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Digitally sign communications (if client agrees)" - compliance: - - cis: "2.3.9.3" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> EnableSecuritySignature -> !1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> !EnableSecuritySignature;' - - id: 12021 - title: "Ensure 'Microsoft network server: Disconnect clients when logon hours expire' is set to 'Enabled'" - description: "This security setting determines whether to disconnect users who are connected to the local computer outside their user account's valid logon hours. This setting affects the Server Message Block (SMB) component. If you enable this policy setting you should also enable Network security: Force logoff when logon hours expire (Rule 2.3.11.6). If your organization configures logon hours for users, this policy setting is necessary to ensure they are effective. The recommended state for this setting is: Enabled." - rationale: "If your organization configures logon hours for users, then it makes sense to enable this policy setting. Otherwise, users who should not have access to network resources outside of their logon hours may actually be able to continue to use those resources with sessions that were established during allowed hours." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Disconnect clients when logon hours expire" - compliance: - - cis: "2.3.9.4" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> EnableForcedLogOff -> !1;' - - id: 12022 - title: "Ensure 'Microsoft network server: Server SPN target name validation level' is set to 'Accept if provided by client' or higher" - description: "This policy setting controls the level of validation a computer with shared folders or printers (the server) performs on the service principal name (SPN) that is provided by the client computer when it establishes a session using the server message block (SMB) protocol. The server message block (SMB) protocol provides the basis for file and print sharing and other networking operations, such as remote Windows administration. The SMB protocol supports validating the SMB server service principal name (SPN) within the authentication blob provided by a SMB client to prevent a class of attacks against SMB servers referred to as SMB relay attacks. This setting will affect both SMB1 and SMB2. The recommended state for this setting is: Accept if provided by client. Configuring this setting to Required from client also conforms to the benchmark." - rationale: "The identity of a computer can be spoofed to gain unauthorized access to network resources." - remediation: "To establish the recommended configuration via GP, set the following UI path to Accept if provided by client (configuring to Required from client also conforms to the benchmark): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Server SPN target name validation level" - compliance: - - cis: "2.3.9.5" - - cis_csc: "14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters -> SMBServerNameHardeningLevel -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters -> !SMBServerNameHardeningLevel;' - - id: 12023 - title: "Ensure 'Network access: Do not allow anonymous enumeration of SAM accounts' is set to 'Enabled'" - description: "This policy setting controls the ability of anonymous users to enumerate the accounts in the Security Accounts Manager (SAM). If you enable this policy setting, users with anonymous connections will not be able to enumerate domain account user names on the systems in your environment. This policy setting also allows additional restrictions on anonymous connections. The recommended state for this setting is: Enabled. Note: This policy has no effect on Domain Controllers." - rationale: "An unauthorized user could anonymously list account names and use the information to attempt to guess passwords or perform social engineering attacks. (Social engineering attacks try to deceive users in some way to obtain passwords or some form of security information.)" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow anonymous enumeration of SAM accounts" - compliance: - - cis: "2.3.10.2" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -> RestrictAnonymousSAM -> 0;' - - id: 12024 - title: "Ensure 'Network access: Do not allow anonymous enumeration of SAM accounts and shares' is set to 'Enabled'" - description: "This policy setting controls the ability of anonymous users to enumerate SAM accounts as well as shares. If you enable this policy setting, anonymous users will not be able to enumerate domain account user names and network share names on the systems in your environment. The recommended state for this setting is: Enabled. Note: This policy has no effect on Domain Controllers" - rationale: "An unauthorized user could anonymously list account names and shared resources and use the information to attempt to guess passwords or perform social engineering attacks. (Social engineering attacks try to deceive users in some way to obtain passwords or some form of security information.)" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow anonymous enumeration of SAM accounts and shares" - compliance: - - cis: "2.3.10.3" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -> RestrictAnonymous -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -> !RestrictAnonymous;' - - id: 12025 - title: "Ensure 'Network access: Do not allow storage of passwords and credentials for network authentication' is set to 'Enabled'" - description: "This policy setting determines whether Credential Manager (formerly called Stored User Names and Passwords) saves passwords or credentials for later use when it gains domain authentication. The recommended state for this setting is: Enabled. Note: Changes to this setting will not take effect until Windows is restarted." - rationale: "Passwords that are cached can be accessed by the user when logged on to the computer. Although this information may sound obvious, a problem can arise if the user unknowingly executes hostile code that reads the passwords and forwards them to another, unauthorized user." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow storage of passwords and credentials for network authentication" - compliance: - - cis: "2.3.10.4" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -> DisableDomainCreds -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -> !DisableDomainCreds;' - - id: 12026 - title: "Ensure 'Network access: Let Everyone permissions apply to anonymous users' is set to 'Disabled'" - description: "This policy setting determines what additional permissions are assigned for anonymous connections to the computer. The recommended state for this setting is: Disabled." - rationale: "An unauthorized user could anonymously list account names and shared resources and use the information to attempt to guess passwords, perform social engineering attacks, or launch DoS attacks." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Let Everyone permissions apply to anonymous users" - compliance: - - cis: "2.3.10.5" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> EveryoneIncludesAnonymous -> 1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> EveryoneIncludesAnonymous -> 2;' - - id: 12027 - title: "Ensure 'Network access: Named Pipes that can be accessed anonymously' is set to 'None'" - description: "This policy setting determines which communication sessions, or pipes, will have attributes and permissions that allow anonymous access. The recommended state for this setting is: (i.e. None)." - rationale: "Limiting named pipes that can be accessed anonymously will reduce the attack surface of the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to (i.e. None): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Named Pipes that can be accessed anonymously" - compliance: - - cis: "2.3.10.6" - - cis_csc: "14.1, 14.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> NullSessionPipes -> r:\S*;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> !NullSessionPipes;' - - id: 12028 - title: "Ensure 'Network access: Remotely accessible registry paths'" - description: "This policy setting determines which registry paths will be accessible over the network, regardless of the users or groups listed in the access control list (ACL) of the winreg registry key. Note: This setting does not exist in Windows XP. There was a setting with that name in Windows XP, but it is called Network access: Remotely accessible registry paths and subpaths in Windows Server 2003, Windows Vista, and Windows Server 2008 (non-R2)." - rationale: "The registry is a database that contains computer configuration information, and much of the information is sensitive. An attacker could use this information to facilitate unauthorized activities. To reduce the risk of such an attack, suitable ACLs are assigned throughout the registry to help protect it from access by unauthorized users." - remediation: "To establish the recommended configuration via GP, set the following UI path to: System\\CurrentControlSet\\Control\\ProductOptions System\\CurrentControlSet\\Control\\Server Applications SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Remotely accessible registry paths" - compliance: - - cis: "2.3.10.7" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedExactPaths -> Machine -> !r:System\\CurrentControlSet\\Control\\ProductOptions|System\\CurrentControlSet\\Control\\Server Applications|Software\\Microsoft\\Windows NT\\CurrentVersion;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedExactPaths -> !Machine;' - - id: 12029 - title: "Ensure 'Network access: Remotely accessible registry paths and sub-paths'" - description: "This policy setting determines which registry paths and sub-paths will be accessible over the network, regardless of the users or groups listed in the access control list (ACL) of the winreg registry key. Note: In Windows XP this setting is called Network access: Remotely accessible registry paths, the setting with that same name in Windows Vista, Windows Server 2008 (non-R2), and Windows Server 2003 does not exist in Windows XP. Note #2: When you configure this setting you specify a list of one or more objects. The delimiter used when entering the list is a line feed or carriage return, that is, type the first object on the list, press the Enter button, type the next object, press Enter again, etc. The setting value is stored as a comma-delimited list in group policy security templates. It is also rendered as a comma-delimited list in Group Policy Editor's display pane and the Resultant Set of Policy console. It is recorded in the registry as a line-feed delimited list in a REG_MULTI_SZ value. The recommended state for this setting is: System\\CurrentControlSet\\Control\\Print\\Printers System\\CurrentControlSet\\Services\\Eventlog Software\\Microsoft\\OLAP Server Software\\Microsoft\\Windows NT\\CurrentVersion\\Print Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows System\\CurrentControlSet\\Control\\ContentIndex System\\CurrentControlSet\\Control\\Terminal Server System\\CurrentControlSet\\Control\\Terminal Server\\UserConfig System\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration Software\\Microsoft\\Windows NT\\CurrentVersion\\Perflib System\\CurrentControlSet\\Services\\SysmonLog" - rationale: "The registry contains sensitive computer configuration information that could be used by an attacker to facilitate unauthorized activities. The fact that the default ACLs assigned throughout the registry are fairly restrictive and help to protect the registry from access by unauthorized users reduces the risk of such an attack." - remediation: "To establish the recommended configuration via GP, set the following UI path to: System\\CurrentControlSet\\Control\\Print\\Printers System\\CurrentControlSet\\Services\\Eventlog SOFTWARE\\Microsoft\\OLAP Server SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Windows System\\CurrentControlSet\\Control\\ContentIndex System\\CurrentControlSet\\Control\\Terminal Server System\\CurrentControlSet\\Control\\Terminal Server\\UserConfig System\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Perflib System\\CurrentControlSet\\Services\\SysmonLog Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Remotely accessible registry paths and sub-paths" - compliance: - - cis: "2.3.10.8" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedPaths -> Machine -> !r:System\\CurrentControlSet\\Control\\Print\\Printers|System\\CurrentControlSet\\Services\\Eventlog|Software\\Microsoft\\OLAP Server|Software\\Microsoft\\Windows NT\\CurrentVersion\\Print|Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows|System\\CurrentControlSet\\Control\\ContentIndex|System\\CurrentControlSet\\Control\\Terminal Server|System\\CurrentControlSet\\Control\\Terminal Server\\UserConfig|System\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration|Software\\Microsoft\\Windows NT\\CurrentVersion\\Perflib|System\\CurrentControlSet\\Services\\SysmonLog;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedPaths -> !Machine;' - - id: 12030 - title: "Ensure 'Network access: Restrict anonymous access to Named Pipes and Shares' is set to 'Enabled'" - description: "When enabled, this policy setting restricts anonymous access to only those shares and pipes that are named in the Network access: Named pipes that can be accessed anonymously and Network access: Shares that can be accessed anonymously settings. This policy setting controls null session access to shares on your computers by adding RestrictNullSessAccess with the value 1 in the HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\LanManServer\\Parameters registry key. This registry value toggles null session shares on or off to control whether the server service restricts unauthenticated clients' access to named resources. The recommended state for this setting is: Enabled" - rationale: "Null sessions are a weakness that can be exploited through shares (including the default shares) on computers in your environment." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Restrict anonymous access to Named Pipes and Shares" - compliance: - - cis: "2.3.10.9" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> RestrictNullSessAccess -> !1;' - - id: 12031 - title: "Ensure 'Network access: Restrict clients allowed to make remote calls to SAM' is set to 'Administrators: Remote Access: Allow'" - description: "This policy setting allows you to restrict remote RPC connections to SAM. The recommended state for this setting is: Administrators: Remote Access: Allow. Note: A Windows 10 R1607, Server 2016 or newer OS is required to access and set this value in Group Policy." - rationale: "To ensure that an unauthorized user cannot anonymously list local account names or groups and use the information to attempt to guess passwords or perform social engineering attacks. (Social engineering attacks try to deceive users in some way to obtain passwords or some form of security information.)" - remediation: "To establish the recommended configuration via GP, set the following UI path to Administrators: Remote Access: Allow: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Restrict clients allowed to make remote calls to SAM" - compliance: - - cis: "2.3.10.10" - - cis_csc: "5.1, 9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -> restrictremotesam -> !r:O:BAG:BAD:\(A;;RC;;;BA\);' - - id: 12032 - title: "Ensure 'Network access: Shares that can be accessed anonymously' is set to 'None'" - description: "This policy setting determines which network shares can be accessed by anonymous users. The default configuration for this policy setting has little effect because all users have to be authenticated before they can access shared resources on the server. The recommended state for this setting is: (i.e. None)." - rationale: "It is very dangerous to allow any values in this setting. Any shares that are listed can be accessed by any network user, which could lead to the exposure or corruption of sensitive data" - remediation: "To establish the recommended configuration via GP, set the following UI path to (i.e. None): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Shares that can be accessed anonymously" - compliance: - - cis: "2.3.10.11" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> NullSessionShares -> r:\S*;' - - id: 12033 - title: "Ensure 'Network access: Sharing and security model for local accounts' is set to 'Classic - local users authenticate as themselves'" - description: "This policy setting determines how network logons that use local accounts are authenticated. The Classic option allows precise control over access to resources, including the ability to assign different types of access to different users for the same resource. The Guest only option allows you to treat all users equally. In this context, all users authenticate as Guest only to receive the same access level to a given resource. The recommended state for this setting is: Classic - local users authenticate as themselves. Note: This setting does not affect interactive logons that are performed remotely by using such services as Telnet or Remote Desktop Services (formerly called Terminal Services)." - rationale: "With the Guest only model, any user who can authenticate to your computer over the network does so with guest privileges, which probably means that they will not have write access to shared resources on that computer. Although this restriction does increase security, it makes it more difficult for authorized users to access shared resources on those computers because ACLs on those resources must include access control entries (ACEs) for the Guest account. With the Classic model, local accounts should be password protected. Otherwise, if Guest access is enabled, anyone can use those user accounts to access shared system resources." - remediation: "To establish the recommended configuration via GP, set the following UI path to Classic - local users authenticate as themselves: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Sharing and security model for local accounts" - compliance: - - cis: "2.3.10.12" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> ForceGuest -> 1;' - - id: 12034 - title: "Ensure 'Network security: Allow Local System to use computer identity for NTLM' is set to 'Enabled'" - description: "This policy setting determines whether Local System services that use Negotiate when reverting to NTLM authentication can use the computer identity. This policy is supported on at least Windows 7 or Windows Server 2008 R2. The recommended state for this setting is: Enabled." - rationale: "When connecting to computers running versions of Windows earlier than Windows Vista or Windows Server 2008 (non-R2), services running as Local System and using SPNEGO (Negotiate) that revert to NTLM use the computer identity. In Windows 7, if you are connecting to a computer running Windows Server 2008 or Windows Vista, then a system service uses either the computer identity or a NULL session. When connecting with a NULL session, a system-generated session key is created, which provides no protection but allows applications to sign and encrypt data without errors. When connecting with the computer identity, both signing and encryption is supported in order to provide data protection." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Allow Local System to use computer identity for NTLM" - compliance: - - cis: "2.3.11.1" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> UseMachineId -> !1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> !UseMachineId;' - - id: 12035 - title: "Ensure 'Network security: Allow LocalSystem NULL session fallback' is set to 'Disabled'" - description: "This policy setting determines whether NTLM is allowed to fall back to a NULL session when used with LocalSystem. The recommended state for this setting is: Disabled" - rationale: "NULL sessions are less secure because by definition they are unauthenticated." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Allow LocalSystem NULL session fallback" - compliance: - - cis: "2.3.11.2" - - cis_csc: "14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> allownullsessionfallback -> 1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> !allownullsessionfallback;' - - id: 12036 - title: "Ensure 'Network Security: Allow PKU2U authentication requests to this computer to use online identities' is set to 'Disabled'" - description: "This setting determines if online identities are able to authenticate to this computer. The Public Key Cryptography Based User-to-User (PKU2U) protocol introduced in Windows 7 and Windows Server 2008 R2 is implemented as a security support provider (SSP). The SSP enables peer-to-peer authentication, particularly through the Windows 7 media and file sharing feature called HomeGroup, which permits sharing between computers that are not members of a domain. With PKU2U, a new extension was introduced to the Negotiate authentication package, Spnego.dll. In previous versions of Windows, Negotiate decided whether to use Kerberos or NTLM for authentication. The extension SSP for Negotiate, Negoexts.dll, which is treated as an authentication protocol by Windows, supports Microsoft SSPs including PKU2U. When computers are configured to accept authentication requests by using online IDs, Negoexts.dll calls the PKU2U SSP on the computer that is used to log on. The PKU2U SSP obtains a local certificate and exchanges the policy between the peer computers. When validated on the peer computer, the certificate within the metadata is sent to the logon peer for validation and associates the user's certificate to a security token and the logon process completes. The recommended state for this setting is: Disabled." - rationale: "The PKU2U protocol is a peer-to-peer authentication protocol - authentication should be managed centrally in most managed networks." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network Security: Allow PKU2U authentication requests to this computer to use online identities" - compliance: - - cis: "2.3.11.3" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\pku2u -> AllowOnlineID -> !0;' - - id: 12037 - title: "Ensure 'Network security: Configure encryption types allowed for Kerberos' is set to 'AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types'" - description: "This policy setting allows you to set the encryption types that Kerberos is allowed to use. The recommended state for this setting is: AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types. Note: Some legacy applications and OSes may require RC4_HMAC_MD5 - we recommend you test in your environment and verify whether you can safely remove it. For the purposes of scoring we have allowed the use of RC4_HMAC_MD5 as an optional setting" - rationale: "The strength of each encryption algorithm varies from one to the next, choosing stronger algorithms will reduce the risk of compromise however doing so may cause issues when the computer attempts to authenticate with systems that do not support them." - remediation: "To establish the recommended configuration via GP, set the following UI path to AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Configure encryption types allowed for Kerberos" - compliance: - - cis: "2.3.11.4" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters -> SupportedEncryptionTypes -> !2147483644;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters -> !SupportedEncryptionTypes;' - - id: 12038 - title: "Ensure 'Network security: Do not store LAN Manager hash value on next password change' is set to 'Enabled'" - description: "This policy setting determines whether the LAN Manager (LM) hash value for the new password is stored when the password is changed. The LM hash is relatively weak and prone to attack compared to the cryptographically stronger Microsoft Windows NT hash. Since LM hashes are stored on the local computer in the security database, passwords can then be easily compromised if the database is attacked. Note: Older operating systems and some third-party applications may fail when this policy setting is enabled. Also, note that the password will need to be changed on all accounts after you enable this setting to gain the proper benefit. The recommended state for this setting is: Enabled" - rationale: "The SAM file can be targeted by attackers who seek access to username and password hashes. Such attacks use special tools to crack passwords, which can then be used to impersonate users and gain access to resources on your network. These types of attacks will not be prevented if you enable this policy setting, but it will be much more difficult for these types of attacks to succeed." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Do not store LAN Manager hash value on next password change" - compliance: - - cis: "2.3.11.5" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> NoLMHash -> 0;' - - id: 12039 - title: "Ensure 'Network security: Force logoff when logon hours expire' is set to 'Enabled'" - description: "This policy setting determines whether to disconnect users who are connected to the local computer outside their user account's valid logon hours. This setting affects the Server Message Block (SMB) component. If you enable this policy setting you should also enable Microsoft network server: Disconnect clients when logon hours expire (Rule 2.3.9.4). The recommended state for this setting is: Enabled. Note: This recommendation is unscored because there is not a documented registry value that corresponds to it. We still strongly encourage that it be configured as Enabled, to ensure that logon hours (when configured) are properly enforced." - rationale: "If this setting is disabled, a user could remain connected to the computer outside of their allotted logon hours." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Force logoff when logon hours expire" - compliance: - - cis: "2.3.11.6" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters -> EnableForcedLogOff -> !1;' - - id: 12040 - title: "Ensure 'Network security: LAN Manager authentication level' is set to 'Send NTLMv2 response only. Refuse LM & NTLM'" - description: "LAN Manager (LM) was a family of early Microsoft client/server software (predating Windows NT) that allowed users to link personal computers together on a single network. LM network capabilities included transparent file and print sharing, user security features, and network administration tools. In Active Directory domains, the Kerberos protocol is the default authentication protocol. However, if the Kerberos protocol is not negotiated for some reason, Active Directory will use LM, NTLM, or NTLMv2. LAN Manager authentication includes the LM, NTLM, and NTLM version 2 (NTLMv2) variants, and is the protocol that is used to authenticate all Windows clients when they perform the following operations:  Join a domain  Authenticate between Active Directory forests  Authenticate to down-level domains  Authenticate to computers that do not run Windows 2000, Windows Server 2003, or Windows XP  Authenticate to computers that are not in the domain The Network security: LAN Manager authentication level setting determines which challenge/response authentication protocol is used for network logons. This choice affects the level of authentication protocol used by clients, the level of session security negotiated, and the level of authentication accepted by servers. The recommended state for this setting is: Send NTLMv2 response only. Refuse LM & NTLM" - rationale: "Windows 2000 and Windows XP clients were configured by default to send LM and NTLM authentication responses (Windows 95-based and Windows 98-based clients only send LM). The default settings in OSes predating Windows Vista / Windows Server 2008 (nonR2) allowed all clients to authenticate with servers and use their resources. However, this meant that LM responses - the weakest form of authentication response - were sent over the network, and it was potentially possible for attackers to sniff that traffic to more easily reproduce the user's password. The Windows 95, Windows 98, and Windows NT operating systems cannot use the Kerberos version 5 protocol for authentication. For this reason, in a Windows Server 2003 domain, these computers authenticate by default with both the LM and NTLM protocols for network authentication. You can enforce a more secure authentication protocol for Windows 95, Windows 98, and Windows NT by using NTLMv2. For the logon process, NTLMv2 uses a secure channel to protect the authentication process. Even if you use NTLMv2 for older clients and servers, Windows-based clients and servers that are members of the domain will use the Kerberos authentication protocol to authenticate with Windows Server 2003 or newer Domain Controllers. For these reasons, it is strongly preferred to restrict the use of LM & NTLM (non-v2) as much as possible." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Send NTLMv2 response only. Refuse LM & NTLM: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: LAN Manager authentication level" - compliance: - - cis: "2.3.11.7" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 0;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 2;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 3;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 4;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> !LmCompatibilityLevel;' - - id: 12041 - title: "Ensure 'Network security: LDAP client signing requirements' is set to 'Negotiate signing' or higher" - description: "This policy setting determines the level of data signing that is requested on behalf of clients that issue LDAP BIND requests. Note: This policy setting does not have any impact on LDAP simple bind (ldap_simple_bind) or LDAP simple bind through SSL (ldap_simple_bind_s). No Microsoft LDAP clients that are included with Windows XP Professional use ldap_simple_bind or ldap_simple_bind_s to communicate with a Domain Controller. The recommended state for this setting is: Negotiate signing. Configuring this setting to Require signing also conforms to the benchmark." - rationale: "Unsigned network traffic is susceptible to man-in-the-middle attacks in which an intruder captures the packets between the client and server, modifies them, and then forwards them to the server. For an LDAP server, this susceptibility means that an attacker could cause a server to make decisions that are based on false or altered data from the LDAP queries. To lower this risk in your network, you can implement strong physical security measures to protect the network infrastructure. Also, you can make all types of man-in-the-middle attacks extremely difficult if you require digital signatures on all network packets by means of IPsec authentication headers." - remediation: "To establish the recommended configuration via GP, set the following UI path to Negotiate signing (configuring to Require signing also conforms to the benchmark): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: LDAP client signing requirements" - compliance: - - cis: "2.3.11.8" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LDAP -> LDAPClientIntegrity -> !1;' - - id: 12042 - title: "Ensure 'Network security: Minimum session security for NTLM SSP based (including secure RPC) clients' is set to 'Require NTLMv2 session security, Require 128-bit encryption'" - description: "This policy setting determines which behaviors are allowed by clients for applications using the NTLM Security Support Provider (SSP). The SSP Interface (SSPI) is used by applications that need authentication services. The setting does not modify how the authentication sequence works but instead require certain behaviors in applications that use the SSPI. The recommended state for this setting is: Require NTLMv2 session security, Require 128-bit encryption. Note: These values are dependent on the Network security: LAN Manager Authentication Level (Rule 2.3.11.7) security setting value." - rationale: "You can enable both options for this policy setting to help protect network traffic that uses the NTLM Security Support Provider (NTLM SSP) from being exposed or tampered with by an attacker who has gained access to the same network. In other words, these options help protect against man-in-the-middle attacks." - remediation: "To establish the recommended configuration via GP, set the following UI path to Require NTLMv2 session security, Require 128-bit encryption: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Minimum session security for NTLM SSP based (including secure RPC) clients" - compliance: - - cis: "2.3.11.9" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> NTLMMinClientSec -> !537395200;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> !NTLMMinClientSec;' - - id: 12043 - title: "Ensure 'Network security: Minimum session security for NTLM SSP based (including secure RPC) servers' is set to 'Require NTLMv2 session security, Require 128-bit encryption'" - description: "This policy setting determines which behaviors are allowed by servers for applications using the NTLM Security Support Provider (SSP). The SSP Interface (SSPI) is used by applications that need authentication services. The setting does not modify how the authentication sequence works but instead require certain behaviors in applications that use the SSPI. The recommended state for this setting is: Require NTLMv2 session security, Require 128-bit encryption. Note: These values are dependent on the Network security: LAN Manager Authentication Level (Rule 2.3.11.7) security setting value." - rationale: "You can enable all of the options for this policy setting to help protect network traffic that uses the NTLM Security Support Provider (NTLM SSP) from being exposed or tampered with by an attacker who has gained access to the same network. That is, these options help protect against man-in-the-middle attacks." - remediation: "To establish the recommended configuration via GP, set the following UI path to Require NTLMv2 session security, Require 128-bit encryption: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Minimum session security for NTLM SSP based (including secure RPC) servers" - compliance: - - cis: "2.3.11.10" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> NTLMMinServerSec -> !537395200;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> !NTLMMinServerSec;' - - id: 12044 - title: "Ensure 'System objects: Require case insensitivity for non-Windows subsystems' is set to 'Enabled'" - description: "This policy setting determines whether case insensitivity is enforced for all subsystems. The Microsoft Win32 subsystem is case insensitive. However, the kernel supports case sensitivity for other subsystems, such as the Portable Operating System Interface for UNIX (POSIX). Because Windows is case insensitive (but the POSIX subsystem will support case sensitivity), failure to enforce this policy setting makes it possible for a user of the POSIX subsystem to create a file with the same name as another file by using mixed case to label it. Such a situation can block access to these files by another user who uses typical Win32 tools, because only one of the files will be available. The recommended state for this setting is: Enabled." - rationale: "Because Windows is case-insensitive but the POSIX subsystem will support case sensitivity, failure to enable this policy setting would make it possible for a user of that subsystem to create a file with the same name as another file but with a different mix of upper and lower case letters. Such a situation could potentially confuse users when they try to access such files from normal Win32 tools because only one of the files will be available" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System objects: Require case insensitivity for nonWindows subsystems" - compliance: - - cis: "2.3.15.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Kernel -> ObCaseInsensitive -> !1;' - - id: 12045 - title: "Ensure 'System objects: Strengthen default permissions of internal system objects (e.g. Symbolic Links)' is set to 'Enabled'" - description: "This policy setting determines the strength of the default discretionary access control list (DACL) for objects. Active Directory maintains a global list of shared system resources, such as DOS device names, mutexes, and semaphores. In this way, objects can be located and shared among processes. Each type of object is created with a default DACL that specifies who can access the objects and what permissions are granted. The recommended state for this setting is: Enabled." - rationale: "This setting determines the strength of the default DACL for objects. Windows maintains a global list of shared computer resources so that objects can be located and shared among processes. Each type of object is created with a default DACL that specifies who can access the objects and with what permissions." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System objects: Strengthen default permissions of internal system objects (e.g. Symbolic Links)" - compliance: - - cis: "2.3.15.2" - - cis_csc: "14.4, 14.6" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager -> ProtectionMode -> !1;' - - id: 12046 - title: "Ensure 'User Account Control: Admin Approval Mode for the Built-in Administrator account' is set to 'Enabled'" - description: "This policy setting controls the behavior of Admin Approval Mode for the built-in Administrator account. The recommended state for this setting is: Enabled." - rationale: "One of the risks that the User Account Control feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. An attack vector for these programs was to discover the password of the account named Administrator because that user account was created for all installations of Windows. To address this risk, in Windows Vista and newer, the built-in Administrator account is now disabled by default. In a default installation of a new computer, accounts with administrative control over the computer are initially set up in one of two ways:  If the computer is not joined to a domain, the first user account you create has the equivalent permissions as a local administrator.  If the computer is joined to a domain, no local administrator accounts are created. The Enterprise or Domain Administrator must log on to the computer and create one if a local administrator account is warranted. Once Windows is installed, the built-in Administrator account may be manually enabled, but we strongly recommend that this account remain disabled." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Admin Approval Mode for the Built-in Administrator account" - compliance: - - cis: "2.3.17.1" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> FilterAdministratorToken -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !FilterAdministratorToken;' - - id: 12047 - title: "Ensure 'User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop' is set to 'Disabled'" - description: "This policy setting controls whether User Interface Accessibility (UIAccess or UIA) programs can automatically disable the secure desktop for elevation prompts used by a standard user. The recommended state for this setting is: Disabled." - rationale: "One of the risks that the UAC feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. This setting allows the administrator to perform operations that require elevated privileges while connected via Remote Assistance. This increases security in that organizations can use UAC even when end user support is provided remotely. However, it also reduces security by adding the risk that an administrator might allow an unprivileged user to share elevated privileges for an application that the administrator needs to use during the Remote Desktop session." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop" - compliance: - - cis: "2.3.17.2" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableUIADesktopToggle -> 1;' - - id: 12048 - title: "Ensure 'User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode' is set to 'Prompt for consent on the secure desktop'" - description: "This policy setting controls the behavior of the elevation prompt for administrators. The recommended state for this setting is: Prompt for consent on the secure desktop." - rationale: "One of the risks that the UAC feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. This setting raises awareness to the administrator of elevated privilege operations and permits the administrator to prevent a malicious program from elevating its privilege when the program attempts to do so." - remediation: "To establish the recommended configuration via GP, set the following UI path to Prompt for consent on the secure desktop: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode" - compliance: - - cis: "2.3.17.3" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ConsentPromptBehaviorAdmin -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ConsentPromptBehaviorAdmin -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !ConsentPromptBehaviorAdmin;' - - id: 12049 - title: "Ensure 'User Account Control: Behavior of the elevation prompt for standard users' is set to 'Automatically deny elevation requests'" - description: "This policy setting controls the behavior of the elevation prompt for standard users. The recommended state for this setting is: Automatically deny elevation requests." - rationale: "One of the risks that the User Account Control feature introduced with Windows Vista is trying to mitigate is that of malicious programs running under elevated credentials without the user or administrator being aware of their activity. This setting raises awareness to the user that a program requires the use of elevated privilege operations and requires that the user be able to supply administrative credentials in order for the program to run." - remediation: "To establish the recommended configuration via GP, set the following UI path to Automatically deny elevation requests: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Behavior of the elevation prompt for standard users" - compliance: - - cis: "2.3.17.4" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ConsentPromptBehaviorUser -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !ConsentPromptBehaviorUser;' - - id: 12050 - title: "Ensure 'User Account Control: Detect application installations and prompt for elevation' is set to 'Enabled'" - description: "This policy setting controls the behavior of application installation detection for the computer. The recommended state for this setting is: Enabled." - rationale: "Some malicious software will attempt to install itself after being given permission to run. For example, malicious software with a trusted application shell. The user may have given permission for the program to run because the program is trusted, but if they are then prompted for installation of an unknown component this provides another way of trapping the software before it can do damage" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Detect application installations and prompt for elevation" - compliance: - - cis: "2.3.17.5" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableInstallerDetection -> 0;' - - 'r:HKEY_LOCAL_MACHINE\MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !EnableInstallerDetection;' - - id: 12051 - title: "Ensure 'User Account Control: Only elevate UIAccess applications that are installed in secure locations' is set to 'Enabled'" - description: "This policy setting controls whether applications that request to run with a User Interface Accessibility (UIAccess) integrity level must reside in a secure location in the file system. Secure locations are limited to the following:  …\\Program Files\\, including subfolders  …\\Windows\\system32\\  …\\Program Files (x86)\\, including subfolders (for 64-bit versions of Windows) Note: Windows enforces a public key infrastructure (PKI) signature check on any interactive application that requests to run with a UIAccess integrity level regardless of the state of this security setting. The recommended state for this setting is: Enabled." - rationale: "UIAccess Integrity allows an application to bypass User Interface Privilege Isolation (UIPI) restrictions when an application is elevated in privilege from a standard user to an administrator. This is required to support accessibility features such as screen readers that are transmitting user interfaces to alternative forms. A process that is started with UIAccess rights has the following abilities:  To set the foreground window.  To drive any application window using SendInput function.  To use read input for all integrity levels using low-level hooks, raw input, GetKeyState, GetAsyncKeyState, and GetKeyboardInput.  To set journal hooks.  To uses AttachThreadInput to attach a thread to a higher integrity input queue." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Only elevate UIAccess applications that are installed in secure locations" - compliance: - - cis: "2.3.17.6" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableSecureUIAPaths -> 0;' - - id: 12052 - title: "Ensure 'User Account Control: Run all administrators in Admin Approval Mode' is set to 'Enabled'" - description: "This policy setting controls the behavior of all User Account Control (UAC) policy settings for the computer. If you change this policy setting, you must restart your computer. The recommended state for this setting is: Enabled. Note: If this policy setting is disabled, the Security Center notifies you that the overall security of the operating system has been reduced." - rationale: "This is the setting that turns on or off UAC. If this setting is disabled, UAC will not be used and any security benefits and risk mitigations that are dependent on UAC will not be present on the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Run all administrators in Admin Approval Mode" - compliance: - - cis: "2.3.17.7" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableLUA -> 0;' - - id: 12053 - title: "Ensure 'User Account Control: Switch to the secure desktop when prompting for elevation' is set to 'Enabled'" - description: "This policy setting controls whether the elevation request prompt is displayed on the interactive user's desktop or the secure desktop. The recommended state for this setting is: Enabled." - rationale: "Standard elevation prompt dialog boxes can be spoofed, which may cause users to disclose their passwords to malicious software. The secure desktop presents a very distinct appearance when prompting for elevation, where the user desktop dims, and the elevation prompt UI is more prominent. This increases the likelihood that users who become accustomed to the secure desktop will recognize a spoofed elevation prompt dialog box and not fall for the trick." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Switch to the secure desktop when prompting for elevation" - compliance: - - cis: "2.3.17.8" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> PromptOnSecureDesktop -> 0;' - - id: 12054 - title: "Ensure 'User Account Control: Virtualize file and registry write failures to per-user locations' is set to 'Enabled'" - description: "This policy setting controls whether application write failures are redirected to defined registry and file system locations. This policy setting mitigates applications that run as administrator and write run-time application data to:  %ProgramFiles%  %Windir%  %Windir%\\system32  HKEY_LOCAL_MACHINE\\Software The recommended state for this setting is: Enabled." - rationale: "This setting reduces vulnerabilities by ensuring that legacy applications only write data to permitted locations." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Virtualize file and registry write failures to per-user locations" - compliance: - - cis: "2.3.17.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableVirtualization -> 0;' -# 5 System Services - - id: 12055 - title: "Ensure 'Computer Browser (Browser)' is set to 'Disabled' or 'Not Installed'" - description: "Maintains an updated list of computers on the network and supplies this list to computers designated as browsers. The recommended state for this setting is: Disabled or Not Installed. Note: In Windows 8.1 and Windows 10, this service is bundled with the SMB 1.0/CIFS File Sharing Support optional feature. As a result, removing that feature (highly recommended unless backward compatibility is needed to XP/2003 and older Windows OSes - see Stop using SMB1 | Storage at Microsoft) will also remediate this recommendation. The feature is not installed by default starting with Windows 10 R1709." - rationale: "This is a legacy service - its sole purpose is to maintain a list of computers and their network shares in the environment (i.e. \"Network Neighborhood\"). If enabled, it generates a lot of unnecessary traffic, including \"elections\" to see who gets to be the \"master browser\". This noisy traffic could also aid malicious attackers in discovering online machines, because the service also allows anyone to \"browse\" for shared resources without any authentication. This service used to be running by default in older Windows versions (e.g. Windows XP), but today it only remains for backward compatibility for very old software that requires it." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Computer Browser" - compliance: - - cis: "5.3" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Browser -> Start -> !4;' - - id: 12056 - title: "Ensure 'HomeGroup Listener (HomeGroupListener)' is set to 'Disabled'" - description: "Makes local computer changes associated with configuration and maintenance of the HomeGroup-joined computer. The recommended state for this setting is: Disabled." - rationale: "While resources on a domain-joined computer cannot be shared with a HomeGroup, information from the domain-joined computer can be leaked to other computers in the HomeGroup." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\HomeGroup Listener" - compliance: - - cis: "5.6" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HomeGroupListener -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HomeGroupListener -> !Start;' - - id: 12057 - title: "Ensure 'HomeGroup Provider (HomeGroupProvider)' is set to 'Disabled'" - description: "Performs networking tasks associated with configuration and maintenance of HomeGroups. The recommended state for this setting is: Disabled." - rationale: "While resources on a domain-joined computer cannot be shared with a HomeGroup, information from the domain-joined computer can be leaked to other computers in the HomeGroup." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\HomeGroup Provider" - compliance: - - cis: "5.7" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HomeGroupProvider -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HomeGroupProvider -> !Start;' - - id: 12058 - title: "Ensure 'IIS Admin Service (IISADMIN)' is set to 'Disabled' or 'Not Installed'" - description: "Enables the server to administer the IIS metabase. The IIS metabase stores configuration for the SMTP and FTP services. The recommended state for this setting is: Disabled or Not Installed. Note: This service is not installed by default. It is supplied with Windows, but is installed by enabling an optional Windows feature (Internet Information Services). Note #2: An organization may choose to selectively grant exceptions to web developers to allow IIS (or another web server) on their workstation, in order for them to locally test & develop web pages. However, the organization should track those machines and ensure the security controls and mitigations are kept up to date, to reduce risk of compromise." - rationale: "Hosting a website from a workstation is an increased security risk, as the attack surface of that workstation is then greatly increased. If proper security mitigations are not followed, the chance of successful attack increases significantly. Note: This security concern applies to any web server application installed on a workstation, not just IIS." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\IIS Admin Service" - compliance: - - cis: "5.8" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IISADMIN -> Start -> !4;' - - id: 12059 - title: "Ensure 'Infrared monitor service (irmon)' is set to 'Disabled'" - description: "Detects other Infrared devices that are in range and launches the file transfer application. The recommended state for this setting is: Disabled" - rationale: "Infrared connections can potentially be a source of data compromise - especially via the automatic \"file transfer application\" functionality. Enterprise-managed systems should utilize a more secure method of connection than infrared." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Infrared monitor service" - compliance: - - cis: "5.9" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\irmon -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\irmon -> !Start;' - - id: 12060 - title: "Ensure 'Internet Connection Sharing (ICS) (SharedAccess) ' is set to 'Disabled'" - description: "Provides network access translation, addressing, name resolution and/or intrusion prevention services for a home or small office network. The recommended state for this setting is: Disabled." - rationale: "Internet Connection Sharing (ICS) is a feature that allows someone to \"share\" their Internet connection with other machines on the network - it was designed for home or small office environments where only one machine has Internet access - it effectively turns that machine into an Internet router. This feature causes the bridging of networks and likely bypassing other, more secure pathways. It should not be used on any enterprise-managed system." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Internet Connection Sharing (ICS)" - compliance: - - cis: "5.10" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess -> !Start;' - - id: 12061 - title: "Ensure 'LxssManager (LxssManager)' is set to 'Disabled' or 'Not Installed'" - description: "The LXSS Manager service supports running native ELF binaries. The service provides the infrastructure necessary for ELF binaries to run on Windows. The recommended state for this setting is: Disabled or Not Installed. Note: This service is not installed by default. It is supplied with Windows, but is installed by enabling an optional Windows feature (Windows Subsystem for Linux)." - rationale: "The Linux SubSystem (LXSS) Manager allows full system access to Linux applications on Windows, including the file system. While this can certainly have some functionality and performance benefits for running those applications, it also creates new security risks in the event that a hacker injects malicious code into a Linux application. For best security, it is preferred to run Linux applications on Linux, and Windows applications on Windows." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\LxssManager" - compliance: - - cis: "5.12" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> Start -> !4;' - - id: 12062 - title: "Ensure 'Microsoft FTP Service (FTPSVC)' is set to 'Disabled' or 'Not Installed'" - description: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\LxssManager" - rationale: "Hosting an FTP server (especially a non-secure FTP server) from a workstation is an increased security risk, as the attack surface of that workstation is then greatly increased. Note: This security concern applies to any FTP server application installed on a workstation, not just IIS." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Microsoft FTP Service" - compliance: - - cis: "5.13" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FTPSVC -> Start -> !4;' - - id: 12063 - title: "Ensure 'Remote Procedure Call (RPC) Locator (RpcLocator)' is set to 'Disabled'" - description: "In Windows 2003 and older versions of Windows, the Remote Procedure Call (RPC) Locator service manages the RPC name service database. In Windows Vista and newer versions of Windows, this service does not provide any functionality and is present for application compatibility. The recommended state for this setting is: Disabled." - rationale: "This is a legacy service that has no value or purpose other than application compatibility for very old software. It should be disabled unless there is a specific old application still in use on the system that requires it." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Remote Procedure Call (RPC) Locator" - compliance: - - cis: "5.24" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RpcLocator -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RpcLocator -> !Start;' - - id: 12064 - title: "Ensure 'Routing and Remote Access (RemoteAccess)' is set to 'Disabled'" - description: "Offers routing services to businesses in local area and wide area network environments. The recommended state for this setting is: Disabled." - rationale: "This service's main purpose is to provide Windows router functionality - this is not an appropriate use of workstations in an enterprise managed environment." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Routing and Remote Access" - compliance: - - cis: "5.26" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RemoteAccess -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RemoteAccess -> !Start;' - - id: 12065 - title: "Ensure 'Simple TCP/IP Services (simptcp)' is set to 'Disabled' or 'Not Installed'" - description: "Supports the following TCP/IP services: Character Generator, Daytime, Discard, Echo, and Quote of the Day. The recommended state for this setting is: Disabled or Not Installed. Note: This service is not installed by default. It is supplied with Windows, but is installed by enabling an optional Windows feature (Simple TCPIP services (i.e. echo, daytime etc))." - rationale: "The Simple TCP/IP Services have very little purpose in a modern enterprise environment - allowing them might increase exposure and risk for attack." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Simple TCP/IP Services" - compliance: - - cis: "5.28" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\simptcp -> Start -> !4;' - - id: 12066 - title: "Ensure 'SSDP Discovery (SSDPSRV)' is set to 'Disabled'" - description: "Discovers networked devices and services that use the SSDP discovery protocol, such as UPnP devices. Also announces SSDP devices and services running on the local computer. The recommended state for this setting is: Disabled." - rationale: "Universal Plug n Play (UPnP) is a real security risk - it allows automatic discovery and attachment to network devices. Notes that UPnP is different than regular Plug n Play (PnP). Workstations should not be advertising their services (or automatically discovering and connecting to networked services) in a security-conscious enterprise managed environment." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\SSDP Discovery" - compliance: - - cis: "5.30" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SSDPSRV -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SSDPSRV -> !Start;' - - id: 12067 - title: "Ensure 'UPnP Device Host (upnphost)' is set to 'Disabled'" - description: "Allows UPnP devices to be hosted on this computer. The recommended state for this setting is: Disabled." - rationale: "Universal Plug n Play (UPnP) is a real security risk - it allows automatic discovery and attachment to network devices. Notes that UPnP is different than regular Plug n Play (PnP). Workstations should not be advertising their services (or automatically discovering and connecting to networked services) in a security-conscious enterprise managed environment." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\UPnP Device Host" - compliance: - - cis: "5.31" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\upnphost -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\upnphost -> !Start;' - - id: 12068 - title: "Ensure 'Web Management Service (WMSvc)' is set to 'Disabled' or 'Not Installed'" - description: "The Web Management Service enables remote and delegated management capabilities for administrators to manage for the Web server, sites and applications present on the machine. The recommended state for this setting is: Disabled or Not Installed. Note: This service is not installed by default. It is supplied with Windows, but is installed by enabling an optional Windows feature (Internet Information Services - Web Management Tools - IIS Management Service)." - rationale: "Remote web administration of IIS on a workstation is an increased security risk, as the attack surface of that workstation is then greatly increased. If proper security mitigations are not followed, the chance of successful attack increases significantly." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Web Management Service" - compliance: - - cis: "5.32" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WMSvc -> Start -> !4;' - - id: 12069 - title: "Ensure 'Windows Media Player Network Sharing Service (WMPNetworkSvc)' is set to 'Disabled' or 'Not Installed'" - description: "Shares Windows Media Player libraries to other networked players and media devices using Universal Plug and Play. The recommended state for this setting is: Disabled or Not Installed" - rationale: "Network sharing of media from Media Player has no place in an enterprise managed environment." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Windows Media Player Network Sharing Service" - compliance: - - cis: "5.35" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WMPNetworkSvc -> Start -> !4;' - - id: 12070 - title: "Ensure 'Windows Mobile Hotspot Service (icssvc)' is set to 'Disabled'" - description: "Provides the ability to share a cellular data connection with another device. The recommended state for this setting is: Disabled." - rationale: "The capability to run a mobile hotspot from a domain-connected computer could easily expose the internal network to wardrivers or other hackers." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Windows Mobile Hotspot Service" - compliance: - - cis: "5.36" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\icssvc -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\icssvc -> !Start;' - - id: 12071 - title: "Ensure 'World Wide Web Publishing Service (W3SVC)' is set to 'Disabled' or 'Not Installed'" - description: "Provides Web connectivity and administration through the Internet Information Services Manager. The recommended state for this setting is: Disabled or Not Installed. Note: This service is not installed by default. It is supplied with Windows, but is installed by enabling an optional Windows feature (Internet Information Services - World Wide Web Services). Note #2: An organization may choose to selectively grant exceptions to web developers to allow IIS (or another web server) on their workstation, in order for them to locally test & develop web pages. However, the organization should track those machines and ensure the security controls and mitigations are kept up to date, to reduce risk of compromise." - rationale: "Hosting a website from a workstation is an increased security risk, as the attack surface of that workstation is then greatly increased. If proper security mitigations are not followed, the chance of successful attack increases significantly. Note: This security concern applies to any web server application installed on a workstation, not just IIS." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\World Wide Web Publishing Service" - compliance: - - cis: "5.41" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC -> Start -> !4;' - - id: 12072 - title: "Ensure 'Xbox Accessory Management Service (XboxGipSvc)' is set to 'Disabled'" - description: "This service manages connected Xbox Accessories. The recommended state for this setting is: Disabled." - rationale: "Xbox Live is a gaming service and has no place in an enterprise managed environment (perhaps unless it is a gaming company)." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Xbox Accessory Management Service" - compliance: - - cis: "5.42" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XboxGipSvc -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XboxGipSvc -> !Start;' - - id: 12073 - title: "Ensure 'Xbox Game Monitoring (xbgm)' is set to 'Disabled'" - description: "This service supports Xbox Game Monitoring. The recommended state for this setting is: Disabled." - rationale: "Xbox Live is a gaming service and has no place in an enterprise managed environment (perhaps unless it is a gaming company)." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Xbox Game Monitoring" - compliance: - - cis: "5.43" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\xbgm -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\xbgm -> !Start;' - - id: 12074 - title: "Ensure 'Xbox Live Auth Manager (XblAuthManager)' is set to 'Disabled'" - description: "Provides authentication and authorization services for interacting with Xbox Live. The recommended state for this setting is: Disabled." - rationale: "Xbox Live is a gaming service and has no place in an enterprise managed environment (perhaps unless it is a gaming company)." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Xbox Live Auth Manager" - compliance: - - cis: "5.44" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XblAuthManager -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XblAuthManager -> !Start;#' - - id: 12075 - title: "Ensure 'Xbox Live Game Save (XblGameSave)' is set to 'Disabled'" - description: "This service syncs save data for Xbox Live save enabled games. The recommended state for this setting is: Disabled." - rationale: "Xbox Live is a gaming service and has no place in an enterprise managed environment (perhaps unless it is a gaming company)." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Xbox Live Game Save" - compliance: - - cis: "5.45" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XblGameSave -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XblGameSave -> !Start;' - - id: 12076 - title: "Ensure 'Xbox Live Networking Service (XboxNetApiSvc)' is set to 'Disabled'" - description: "This service supports the Windows.Networking.XboxLive application programming interface. The recommended state for this setting is: Disabled" - rationale: "Xbox Live is a gaming service and has no place in an enterprise managed environment (perhaps unless it is a gaming company)." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Xbox Live Networking Service" - compliance: - - cis: "5.46" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XboxNetApiSvce -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XboxNetApiSvce -> !Start;' -# 9 Windows Firewall with Advanced Security - - id: 12077 - title: "Ensure 'Windows Firewall: Domain: Firewall state' is set to 'On (recommended)'" - description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." - rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Firewall state" - compliance: - - cis: "9.1.1" - - cis_csc: "9.2, 9.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> EnableFirewall -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile -> EnableFirewall -> 0;' - - id: 12078 - title: "Ensure 'Windows Firewall: Domain: Inbound connections' is set to 'Block (default)'" - description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." - rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Inbound connections" - compliance: - - cis: "9.1.2" - - cis_csc: "9.2, 9.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DefaultInboundAction -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile -> DefaultInboundAction -> 0;' - - id: 12079 - title: "Ensure 'Windows Firewall: Domain: Outbound connections' is set to 'Allow (default)'" - description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default)." - rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." - remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Outbound connections" - compliance: - - cis: "9.1.3" - - cis_csc: "9.2, 9.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DefaultOutboundAction -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile -> DefaultOutboundAction -> 1;' - - id: 12080 - title: "Ensure 'Windows Firewall: Domain: Settings: Display a notification' is set to 'No'" - description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." - rationale: "Firewall notifications can be complex and may confuse the end users, who would not be able to address the alert." - remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Settings Customize\\Display a notification" - compliance: - - cis: "9.1.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DisableNotifications -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> !DisableNotifications;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile -> DisableNotifications -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile -> !DisableNotifications;' - - id: 12081 - title: "Ensure 'Windows Firewall: Domain: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log'" - description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log" - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Name" - compliance: - - cis: "9.1.5" - - cis_csc: "6.2, 6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\\w+\plog;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\\w+\plog;' - - id: 12082 - title: "Ensure 'Windows Firewall: Domain: Logging: Size limit (KB)' is set to '16,384 KB or greater'" - description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Size limit (KB)" - compliance: - - cis: "9.1.6" - - cis_csc: "6.3, 6.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - id: 12083 - title: "Ensure 'Windows Firewall: Domain: Logging: Log dropped packets' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Log dropped packets" - compliance: - - cis: "9.1.7" - - cis_csc: "6.2, 6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogDroppedPackets -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogDroppedPackets -> 0;' - - id: 12084 - title: "Ensure 'Windows Firewall: Domain: Logging: Log successful connections' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Log successful connections" - compliance: - - cis: "9.1.8" - - cis_csc: "6.2, 6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogSuccessfulConnections -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogSuccessfulConnections -> 0;' - - id: 12085 - title: "Ensure 'Windows Firewall: Private: Firewall state' is set to 'On (recommended)'" - description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." - rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Firewall state" - compliance: - - cis: "9.2.1" - - cis_csc: "9.2, 9.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> EnableFirewall -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile -> EnableFirewall -> 0;' - - id: 12086 - title: "Ensure 'Windows Firewall: Private: Inbound connections' is set to 'Block (default)'" - description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." - rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Inbound connections" - compliance: - - cis: "9.2.2" - - cis_csc: "9.2, 9.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DefaultInboundAction -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile -> DefaultInboundAction -> 0;' - - id: 12087 - title: "Ensure 'Windows Firewall: Private: Outbound connections' is set to 'Allow (default)'" - description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default). Note: If you set Outbound connections to Block and then deploy the firewall policy by using a GPO, computers that receive the GPO settings cannot receive subsequent Group Policy updates unless you create and deploy an outbound rule that enables Group Policy to work. Predefined rules for Core Networking include outbound rules that enable Group Policy to work. Ensure that these outbound rules are active, and thoroughly test firewall profiles before deploying." - rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." - remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Outbound connections" - compliance: - - cis: "9.2.3" - - cis_csc: "9.2, 9.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DefaultOutboundAction -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile -> DefaultOutboundAction -> 1;' - - id: 12088 - title: "Ensure 'Windows Firewall: Private: Settings: Display a notification' is set to 'No'" - description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." - rationale: "Firewall notifications can be complex and may confuse the end users, who would not be able to address the alert." - remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Settings Customize\\Display a notification" - compliance: - - cis: "9.2.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DisableNotifications -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile -> DisableNotifications -> 0;' - - id: 12089 - title: "Ensure 'Windows Firewall: Private: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log'" - description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Name" - compliance: - - cis: "9.2.5" - - cis_csc: "6.2, 6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\\w+\plog;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\\w+\plog;' - - id: 12090 - title: "Ensure 'Windows Firewall: Private: Logging: Size limit (KB)' is set to '16,384 KB or greater'" - description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Size limit (KB)" - compliance: - - cis: "9.2.6" - - cis_csc: "6.3, 6.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - id: 12091 - title: "Ensure 'Windows Firewall: Private: Logging: Log dropped packets' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Log dropped packets" - compliance: - - cis: "9.2.7" - - cis_csc: "6.2, 6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogDroppedPackets -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogDroppedPackets -> 0;' - - id: 12092 - title: "Ensure 'Windows Firewall: Private: Logging: Log successful connections' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Log successful connections" - compliance: - - cis: "9.2.8" - - cis_csc: "6.2, 6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogSuccessfulConnections -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogSuccessfulConnections -> 0;' - - id: 12093 - title: "Ensure 'Windows Firewall: Public: Firewall state' is set to 'On (recommended)'" - description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." - rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service" - remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Firewall state" - compliance: - - cis: "9.3.1" - - cis_csc: "9.2, 9.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> EnableFirewall -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> EnableFirewall -> 0;' - - id: 12094 - title: "Ensure 'Windows Firewall: Public: Inbound connections' is set to 'Block (default)'" - description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." - rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Inbound connections" - compliance: - - cis: "9.3.2" - - cis_csc: "9.2, 9.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DefaultInboundAction -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> DefaultInboundAction -> 0;' - - id: 12095 - title: "Ensure 'Windows Firewall: Public: Outbound connections' is set to 'Allow (default)'" - description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default). Note: If you set Outbound connections to Block and then deploy the firewall policy by using a GPO, computers that receive the GPO settings cannot receive subsequent Group Policy updates unless you create and deploy an outbound rule that enables Group Policy to work. Predefined rules for Core Networking include outbound rules that enable Group Policy to work. Ensure that these outbound rules are active, and thoroughly test firewall profiles before deploying." - rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." - remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Outbound connections" - compliance: - - cis: "9.3.3" - - cis_csc: "9.2, 9.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DefaultOutboundAction -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> DefaultOutboundAction -> 1;' - - id: 12096 - title: "Ensure 'Windows Firewall: Public: Settings: Display a notification' is set to 'No'" - description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No" - rationale: "Some organizations may prefer to avoid alarming users when firewall rules block certain types of network activity. However, notifications can be helpful when troubleshooting network issues involving the firewall." - remediation: "To establish the recommended configuration via GP, set the following UI path to 'No': Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Display a notification" - compliance: - - cis: "9.3.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DisableNotifications -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> DisableNotifications -> 0;' - - id: 12097 - title: "Ensure 'Windows Firewall: Public: Settings: Apply local firewall rules' is set to 'No'" - description: "This setting controls whether local administrators are allowed to create local firewall rules that apply together with firewall rules configured by Group Policy. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." - rationale: "When in the Public profile, there should be no special local firewall exceptions per computer. These settings should be managed by a centralized policy." - remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Apply local firewall rules" - compliance: - - cis: "9.3.5" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> AllowLocalPolicyMerge -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> AllowLocalPolicyMerge -> 0;' - - id: 12098 - title: "Ensure 'Windows Firewall: Public: Settings: Apply local connection security rules' is set to 'No'" - description: "This setting controls whether local administrators are allowed to create connection security rules that apply together with connection security rules configured by Group Policy. The recommended state for this setting is: No." - rationale: "Users with administrative privileges might create firewall rules that expose the system to remote attack" - remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Apply local connection security rules" - compliance: - - cis: "9.3.6" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> AllowLocalIPsecPolicyMerge -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> AllowLocalIPsecPolicyMerge -> 0;' - - id: 12099 - title: "Ensure 'Windows Firewall: Public: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log'" - description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Name" - compliance: - - cis: "9.3.7" - - cis_csc: "6.2, 6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\\w+\plog;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\\w+\plog;' - - id: 12100 - title: "Ensure 'Windows Firewall: Public: Logging: Size limit (KB)' is set to '16,384 KB or greater'" - description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Size limit (KB)" - compliance: - - cis: "9.3.8" - - cis_csc: "6.3, 6.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - id: 12101 - title: "Ensure 'Windows Firewall: Public: Logging: Log dropped packets' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Log dropped packets" - compliance: - - cis: "9.3.9" - - cis_csc: "6.2, 6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogDroppedPackets -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogDroppedPackets -> 0;' - - id: 12102 - title: "Ensure 'Windows Firewall: Public: Logging: Log successful connections' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Log successful connections" - compliance: - - cis: "9.3.10" - - cis_csc: "6.2, 6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogSuccessfulConnections -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogSuccessfulConnections -> 0;' -# 18 Administrative templates (Computer) - - id: 12103 - title: "Ensure 'Prevent enabling lock screen camera' is set to 'Enabled'" - description: "Disables the lock screen camera toggle switch in PC Settings and prevents a camera from being invoked on the lock screen. The recommended state for this setting is: Enabled." - rationale: "Disabling the lock screen camera extends the protection afforded by the lock screen to camera features." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Personalization\\Prevent enabling lock screen camera" - compliance: - - cis: "18.1.1.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> NoLockScreenCamera -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> !NoLockScreenCamera;' - - id: 12104 - title: "Ensure 'Prevent enabling lock screen slide show' is set to 'Enabled'" - description: "Disables the lock screen slide show settings in PC Settings and prevents a slide show from playing on the lock screen. The recommended state for this setting is: Enabled" - rationale: "Disabling the lock screen slide show extends the protection afforded by the lock screen to slide show contents." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Personalization\\Prevent enabling lock screen slide show" - compliance: - - cis: "18.1.1.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> NoLockScreenSlideshow -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> !NoLockScreenSlideshow;' - - id: 12105 - title: "Ensure 'Allow input personalization' is set to 'Disabled'" - description: "This policy enables the automatic learning component of input personalization that includes speech, inking, and typing. Automatic learning enables the collection of speech and handwriting patterns, typing history, contacts, and recent calendar information. It is required for the use of Cortana. Some of this collected information may be stored on the user's OneDrive, in the case of inking and typing; some of the information will be uploaded to Microsoft to personalize speech. The recommended state for this setting is: Disabled." - rationale: "If this setting is Enabled sensitive information could be stored in the cloud or sent to Microsoft." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Regional and Language Options\\Allow input personalization" - compliance: - - cis: "18.1.2.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\InputPersonalization -> AllowInputPersonalization -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\InputPersonalization -> !AllowInputPersonalization;' - - id: 12106 - title: "Ensure LAPS AdmPwd GPO Extension / CSE is installed" - description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." - rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." - remediation: "In order to utilize LAPS, a minor Active Directory Schema update is required, and a Group Policy Client Side Extension (CSE) must be installed on each managed computer. When LAPS is installed, the file AdmPwd.dll must be present in the following location and registered in Windows (the LAPS AdmPwd GPO Extension / CSE installation does this for you): C:\\Program Files\\LAPS\\CSE\\AdmPwd.dll" - compliance: - - cis: "18.2.1" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions\{D76B9641-3288-4f75-942D-087DE603E3EA} -> !DllName;' - - id: 12107 - title: "Ensure 'Do not allow password expiration time longer than required by policy' is set to 'Enabled'" - description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." - rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Do not allow password expiration time longer than required by policy" - compliance: - - cis: "18.2.2" - - cis_csc: "16.2, 16.10" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PwdExpirationProtectionEnabled -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> !PwdExpirationProtectionEnabled;' - - id: 12108 - title: "Ensure 'Enable Local Admin Password Management' is set to 'Enabled'" - description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." - rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Enable Local Admin Password Management" - compliance: - - cis: "18.2.3" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> AdmPwdEnabled -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> !AdmPwdEnabled;' - - id: 12109 - title: "Ensure 'Password Settings: Password Complexity' is set to 'Enabled: Large letters + small letters + numbers + special characters'" - description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled: Large letters + small letters + numbers + special characters. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." - rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, and configure the Password Complexity option to Large letters + small letters + numbers + special characters: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Password Settings" - compliance: - - cis: "18.2.4" - - cis_csc: "5.7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordComplexity -> !4;' - - id: 12110 - title: "Ensure 'Password Settings: Password Length' is set to 'Enabled: 15 or more'" - description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled: 15 or more. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." - rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, and configure the Password Length option to 15 or more: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Password Settings" - compliance: - - cis: "18.2.5" - - cis_csc: "5.7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordLength -> r:\d;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordLength -> r:a;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordLength -> r:b;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordLength -> r:c;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordLength -> r:d;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordLength -> r:e;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> !PasswordLength;' - - id: 12111 - title: "Ensure 'Password Settings: Password Age (Days)' is set to 'Enabled: 30 or fewer'" - description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled: 30 or fewer. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." - rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, and configure the Password Age (Days) option to 30 or fewer: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Password Settings" - compliance: - - cis: "18.2.6" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> 1F;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:2\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:3\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:4\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:5\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:6\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:7\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:8\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:9\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:\D\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:\w\w\w+;' - - id: 12112 - title: "Ensure 'Apply UAC restrictions to local accounts on network logons' is set to 'Enabled'" - description: "This setting controls whether local accounts can be used for remote administration via network logon (e.g., NET USE, connecting to C$, etc.). Local accounts are at high risk for credential theft when the same account and password is configured on multiple systems. Enabling this policy significantly reduces that risk. Enabled: Applies UAC token-filtering to local accounts on network logons. Membership in powerful group such as Administrators is disabled and powerful privileges are removed from the resulting access token. This configures the LocalAccountTokenFilterPolicy registry value to 0. This is the default behavior for Windows. Disabled: Allows local accounts to have full administrative rights when authenticating via network logon, by configuring the LocalAccountTokenFilterPolicy registry value to 1." - rationale: "Local accounts are at high risk for credential theft when the same account and password is configured on multiple systems. Ensuring this policy is Enabled significantly reduces that risk." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\Apply UAC restrictions to local accounts on network logons" - compliance: - - cis: "18.3.1" - - cis_csc: "5.8, 4.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> LocalAccountTokenFilterPolicy -> !0;' - - id: 12113 - title: "Ensure 'Configure SMB v1 client driver' is set to 'Enabled: Disable driver'" - description: "This setting configures the start type for the Server Message Block version 1 (SMBv1) client driver service (MRxSmb10), which is recommended to be disabled. The recommended state for this setting is: Enabled: Disable driver. Note: Do not, under any circumstances, configure this overall setting as Disabled, as doing so will delete the underlying registry entry altogether, which will cause serious problems" - rationale: "Since September 2016, Microsoft has strongly encouraged that SMBv1 be disabled and no longer used on modern networks, as it is a 30 year old design that is much more vulnerable to attacks then much newer designs such as SMBv2 and SMBv3." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Disable driver: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\Configure SMB v1 client driver" - compliance: - - cis: "18.3.2" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\mrxsmb10 -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\mrxsmb10 -> !Start;' - - id: 12114 - title: "Ensure 'Configure SMB v1 server' is set to 'Disabled'" - description: "This setting configures the server-side processing of the Server Message Block version 1 (SMBv1) protocol. The recommended state for this setting is: Disabled." - rationale: "Since September 2016, Microsoft has strongly encouraged that SMBv1 be disabled and no longer used on modern networks, as it is a 30 year old design that is much more vulnerable to attacks then much newer designs such as SMBv2 and SMBv3." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\Configure SMB v1 server" - compliance: - - cis: "18.3.3" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters -> SMB1 -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters -> !SMB1;' - - id: 12115 - title: "Ensure 'Enable Structured Exception Handling Overwrite Protection (SEHOP)' is set to 'Enabled'" - description: "Windows includes support for Structured Exception Handling Overwrite Protection (SEHOP). We recommend enabling this feature to improve the security profile of the computer. The recommended state for this setting is: Enabled." - rationale: "This feature is designed to block exploits that use the Structured Exception Handler (SEH) overwrite technique. This protection mechanism is provided at run-time. Therefore, it helps protect applications regardless of whether they have been compiled with the latest improvements, such as the /SAFESEH option." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\Enable Structured Exception Handling Overwrite Protection (SEHOP)" - compliance: - - cis: "18.3.4" - - cis_csc: "8.4, 8.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel -> DisableExceptionChainValidation -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel -> !DisableExceptionChainValidation;' - - id: 12116 - title: "Ensure 'Turn on Windows Defender protection against Potentially Unwanted Applications' is set to 'Enabled'" - description: "Enabling this Windows Defender feature will protect against Potentially Unwanted Applications (PUA), which are sneaky unwanted application bundlers or their bundled applications to deliver adware or malware." - rationale: "This opt-in feature is free and could prevent malicious software from being installed." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\Turn on Windows Defender protection against Potentially Unwanted Applications" - compliance: - - cis: "18.3.5" - - cis_csc: "8.4, 8.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\MpEngine -> MpEnablePus -> 0;' - - id: 12117 - title: "Ensure 'WDigest Authentication' is set to 'Disabled'" - description: "When WDigest authentication is enabled, Lsass.exe retains a copy of the user's plaintext password in memory, where it can be at risk of theft. If this setting is not configured, WDigest authentication is disabled in Windows 8.1 and in Windows Server 2012 R2; it is enabled by default in earlier versions of Windows and Windows Server." - rationale: "Preventing the plaintext storage of credentials in memory may reduce opportunity for credential theft." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\WDigest Authentication (disabling may require KB2871997)" - compliance: - - cis: "18.3.6" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest -> UseLogonCredential -> !0;' - - id: 12118 - title: "Ensure 'MSS: (AutoAdminLogon) Enable Automatic Logon (not recommended)' is set to 'Disabled'" - description: "This setting is separate from the Welcome screen feature in Windows XP and Windows Vista; if that feature is disabled, this setting is not disabled. If you configure a computer for automatic logon, anyone who can physically gain access to the computer can also gain access to everything that is on the computer, including any network or networks to which the computer is connected. Also, if you enable automatic logon, the password is stored in the registry in plaintext, and the specific registry key that stores this value is remotely readable by the Authenticated Users group." - rationale: "If you configure a computer for automatic logon, anyone who can physically gain access to the computer can also gain access to everything that is on the computer, including any network or networks that the computer is connected to. Also, if you enable automatic logon, the password is stored in the registry in plaintext. The specific registry key that stores this setting is remotely readable by the Authenticated Users group. As a result, this entry is appropriate only if the computer is physically secured and if you ensure that untrusted users cannot remotely see the registry." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (AutoAdminLogon) Enable Automatic Logon (not recommended)" - compliance: - - cis: "18.4.1" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> AutoAdminLogon -> !0;' - - id: 12119 - title: "Ensure 'MSS: (DisableIPSourceRouting IPv6) IP source routing protection level (protects against packet spoofing)' is set to 'Enabled: Highest protection, source routing is completely disabled'" - description: "IP source routing is a mechanism that allows the sender to determine the IP route that a datagram should follow through the network. The recommended state for this setting is: Enabled: Highest protection, source routing is completely disabled." - rationale: "An attacker could use source routed packets to obscure their identity and location. Source routing allows a computer that sends a packet to specify the route that the packet takes" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Highest protection, source routing is completely disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (DisableIPSourceRouting IPv6) IP source routing protection level (protects against packet spoofing)" - compliance: - - cis: "18.4.2" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -> DisableIPSourceRouting -> !2;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -> !DisableIPSourceRouting;' - - id: 12120 - title: "Ensure 'MSS: (DisableIPSourceRouting) IP source routing protection level (protects against packet spoofing)' is set to 'Enabled: Highest protection, source routing is completely disabled'" - description: "IP source routing is a mechanism that allows the sender to determine the IP route that a datagram should take through the network. It is recommended to configure this setting to Not Defined for enterprise environments and to Highest Protection for high security environments to completely disable source routing. The recommended state for this setting is: Enabled: Highest protection, source routing is completely disabled." - rationale: "An attacker could use source routed packets to obscure their identity and location. Source routing allows a computer that sends a packet to specify the route that the packet takes." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Highest protection, source routing is completely disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (DisableIPSourceRouting) IP source routing protection level (protects against packet spoofing)" - compliance: - - cis: "18.4.3" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> DisableIPSourceRouting -> !2;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> !DisableIPSourceRouting;' - - id: 12121 - title: "Ensure 'MSS: (EnableICMPRedirect) Allow ICMP redirects to override OSPF generated routes' is set to 'Disabled'" - description: "Internet Control Message Protocol (ICMP) redirects cause the IPv4 stack to plumb host routes. These routes override the Open Shortest Path First (OSPF) generated routes. The recommended state for this setting is: Disabled." - rationale: "This behavior is expected. The problem is that the 10 minute time-out period for the ICMP redirect-plumbed routes temporarily creates a network situation in which traffic will no longer be routed properly for the affected host. Ignoring such ICMP redirects will limit the system's exposure to attacks that will impact its ability to participate on the network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (EnableICMPRedirect) Allow ICMP redirects to override OSPF generated routes" - compliance: - - cis: "18.4.5" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> EnableICMPRedirect -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> !EnableICMPRedirect;' - - id: 12122 - title: "Ensure 'MSS: (NoNameReleaseOnDemand) Allow the computer to ignore NetBIOS name release requests except from WINS servers' is set to 'Enabled'" - description: "NetBIOS over TCP/IP is a network protocol that among other things provides a way to easily resolve NetBIOS names that are registered on Windows-based systems to the IP addresses that are configured on those systems. This setting determines whether the computer releases its NetBIOS name when it receives a name-release request. The recommended state for this setting is: Enabled." - rationale: "The NetBT protocol is designed not to use authentication, and is therefore vulnerable to spoofing. Spoofing makes a transmission appear to come from a user other than the user who performed the action. A malicious user could exploit the unauthenticated nature of the protocol to send a name-conflict datagram to a target computer, which would cause the computer to relinquish its name and not respond to queries. An attacker could send a request over the network and query a computer to release its NetBIOS name. As with any change that could affect applications, it is recommended that you test this change in a non-production environment before you change the production environment. The result of such an attack could be to cause intermittent connectivity issues on the target computer, or even to prevent the use of Network Neighborhood, domain logons, the NET SEND command, or additional NetBIOS name resolution." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (NoNameReleaseOnDemand) Allow the computer to ignore NetBIOS name release requests except from WINS servers" - compliance: - - cis: "18.4.7" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters -> NoNameReleaseOnDemand -> !1;' - - id: 12123 - title: "Ensure 'MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended)' is set to 'Enabled'" - description: "The DLL search order can be configured to search for DLLs that are requested by running processes in one of two ways:  Search folders specified in the system path first, and then search the current working folder.  Search current working folder first, and then search the folders specified in the system path. When enabled, the registry value is set to 1. With a setting of 1, the system first searches the folders that are specified in the system path and then searches the current working folder. When disabled the registry value is set to 0 and the system first searches the current working folder and then searches the folders that are specified in the system path. Applications will be forced to search for DLLs in the system path first. For applications that require unique versions of these DLLs that are included with the application, this entry could cause performance or stability problems. The recommended state for this setting is: Enabled." - rationale: "If a user unknowingly executes hostile code that was packaged with additional files that include modified versions of system DLLs, the hostile code could load its own versions of those DLLs and potentially increase the type and degree of damage the code can render." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended)" - compliance: - - cis: "18.4.9" - - cis_csc: "8" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager -> SafeDllSearchMode -> 0;' - - id: 12124 - title: "Ensure 'MSS: (ScreenSaverGracePeriod) The time in seconds before the screen saver grace period expires (0 recommended)' is set to 'Enabled: 5 or fewer seconds'" - description: "Windows includes a grace period between when the screen saver is launched and when the console is actually locked automatically when screen saver locking is enabled. The recommended state for this setting is: Enabled: 5 or fewer seconds" - rationale: "The default grace period that is allowed for user movement before the screen saver lock takes effect is five seconds. If you leave the default grace period configuration, your computer is vulnerable to a potential attack from someone who could approach the console and attempt to log on to the computer before the lock takes effect. An entry to the registry can be made to adjust the length of the grace period." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 5 or fewer seconds: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (ScreenSaverGracePeriod) The time in seconds before the screen saver grace period expires (0 recommended)" - compliance: - - cis: "18.4.10" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> 6;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> 7;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> 8;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> 9;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> r:\w\w+;' - - id: 12125 - title: "Ensure 'MSS: (WarningLevel) Percentage threshold for the security event log at which the system will generate a warning' is set to 'Enabled: 90% or less'" - description: "This setting can generate a security audit in the Security event log when the log reaches a user-defined threshold. The recommended state for this setting is: Enabled: 90% or less." - rationale: "If the Security log reaches 90 percent of its capacity and the computer has not been configured to overwrite events as needed, more recent events will not be written to the log. If the log reaches its capacity and the computer has been configured to shut down when it can no longer record events to the Security log, the computer will shut down and will no longer be available to provide network services." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 90% or less: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (WarningLevel) Percentage threshold for the security event log at which the system will generate a warning" - compliance: - - cis: "18.4.13" - - cis_csc: "6.3, 6.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> 5B;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> 5C;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> 5D;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> 5E;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> 5F;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:6\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:7\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:8\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:9\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:\D\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:\w\w\w+;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> !WarningLevel;' - - id: 12126 - title: "Set 'NetBIOS node type' to 'P-node' (Ensure NetBT Parameter 'NodeType' is set to '0x2 (2)')" - description: "This parameter determines which method NetBIOS over TCP/IP (NetBT) will use to register and resolve names.  A B-node (broadcast) system only uses broadcasts.  A P-node (point-to-point) system uses only name queries to a name server (WINS).  An M-node (mixed) system broadcasts first, then queries the name server (WINS).  An H-node (hybrid) system queries the name server (WINS) first, then broadcasts. The recommended state for this setting is: NodeType - 0x2 (2) (P-node / point-to-point)." - rationale: "In order to help mitigate the risk of NetBIOS Name Service (NBT-NS) poisoning attacks, setting the node type to P-node will prevent the system from sending out NetBIOS broadcasts." - remediation: "To establish the recommended configuration, set the following Registry value to 0x2 (2) (DWORD): HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\NetBT\\Parameters:NodeTyp e" - compliance: - - cis: "18.5.4.1" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NetBT\Parameters -> NodeType -> !2;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NetBT\Parameters -> !NodeType;' - - id: 12127 - title: "Ensure 'Turn off multicast name resolution' is set to 'Enabled'" - description: "LLMNR is a secondary name resolution protocol. With LLMNR, queries are sent using multicast over a local network link on a single subnet from a client computer to another client computer on the same subnet that also has LLMNR enabled. LLMNR does not require a DNS server or DNS client configuration, and provides name resolution in scenarios in which conventional DNS name resolution is not possible. The recommended state for this setting is: Enabled." - rationale: "An attacker can listen on a network for these LLMNR (UDP/5355) or NBT-NS (UDP/137) broadcasts and respond to them, tricking the host into thinking that it knows the location of the requested system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\DNS Client\\Turn off multicast name resolution" - compliance: - - cis: "18.5.4.2" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient -> EnableMulticast -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient -> !EnableMulticast;' - - id: 12128 - title: "Ensure 'Enable insecure guest logons' is set to 'Disabled'" - description: "This policy setting determines if the SMB client will allow insecure guest logons to an SMB server. The recommended state for this setting is: Disabled." - rationale: "Insecure guest logons are used by file servers to allow unauthenticated access to shared folders." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Lanman Workstation\\Enable insecure guest logons" - compliance: - - cis: "18.5.8.1" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LanmanWorkstation -> AllowInsecureGuestAuth -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LanmanWorkstation -> !AllowInsecureGuestAuth;' - - id: 12129 - title: "Ensure 'Prohibit installation and configuration of Network Bridge on your DNS domain network' is set to 'Enabled'" - description: "You can use this procedure to controls user's ability to install and configure a Network Bridge. The recommended state for this setting is: Enabled." - rationale: "The Network Bridge setting, if enabled, allows users to create a Layer 2 Media Access Control (MAC) bridge, enabling them to connect two or more physical network segments together. A Network Bridge thus allows a computer that has connections to two different networks to share data between those networks. In an enterprise managed environment, where there is a need to control network traffic to only authorized paths, allowing users to create a Network Bridge increases the risk and attack surface from the bridged network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Connections\\Prohibit installation and configuration of Network Bridge on your DNS domain network" - compliance: - - cis: "18.5.11.2" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> NC_AllowNetBridge_NLA -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> !NC_AllowNetBridge_NLA;' - - id: 12130 - title: "Ensure 'Prohibit use of Internet Connection Sharing on your DNS domain network' is set to 'Enabled'" - description: "Although this legacy setting traditionally applied to the use of Internet Connection Sharing (ICS) in Windows 2000, Windows XP & Server 2003, this setting now freshly applies to the Mobile Hotspot feature in Windows 10 & Server 2016. The recommended state for this setting is: Enabled." - rationale: "Non-administrators should not be able to turn on the Mobile Hotspot feature and open their Internet connectivity up to nearby mobile devices." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Connections\\Prohibit use of Internet Connection Sharing on your DNS domain network" - compliance: - - cis: "18.5.11.3" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> NC_ShowSharedAccessUI -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> !NC_ShowSharedAccessUI;' - - id: 12131 - title: "Ensure 'Require domain users to elevate when setting a network's location' is set to 'Enabled'" - description: "This policy setting determines whether to require domain users to elevate when setting a network's location. The recommended state for this setting is: Enabled." - rationale: "Allowing regular users to set a network location increases the risk and attack surface." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Connections\\Require domain users to elevate when setting a network's location" - compliance: - - cis: "18.5.11.4" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> NC_StdDomainUserSetLocation -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> !NC_StdDomainUserSetLocation;' - - id: 12132 - title: "Ensure 'Hardened UNC Paths' is set to 'Enabled, with \"Require Mutual Authentication\" and \"Require Integrity\" set for all NETLOGON and SYSVOL shares'" - description: "This policy setting configures secure access to UNC paths. The recommended state for this setting is: Enabled, with Require Mutual Authentication and Require Integrity set for all NETLOGON and SYSVOL shares. Note: If the environment exclusively contains Windows 8.0 / Server 2012 (non-R2) or newer systems, then the \"Privacy\" setting may (optionally) also be set to enable SMB encryption. However, using SMB encryption will render the targeted share paths completely inaccessible by older OSes, so only use this additional option with caution and thorough testing" - rationale: "In February 2015, Microsoft released a new control mechanism to mitigate a security risk in Group Policy as part of the MS15-011 / MSKB 3000483 security update. This mechanism requires both the installation of the new security update and also the deployment of specific group policy settings to all computers on the domain from Windows Vista / Server 2008 (non-R2) or newer (the associated security patch to enable this feature was not released for Server 2003). A new group policy template (NetworkProvider.admx/adml) was also provided with the security update. Once the new GPO template is in place, the following are the minimum requirements to remediate the Group Policy security risk: \\*\\NETLOGON RequireMutualAuthentication=1, RequireIntegrity=1 \\*\\SYSVOL RequireMutualAuthentication=1, RequireIntegrity=1 Note: A reboot may be required after the setting is applied to a client machine to access the above paths." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled with the following paths configured, at a minimum: \\*\\NETLOGON RequireMutualAuthentication=1, RequireIntegrity=1 \\*\\SYSVOL RequireMutualAuthentication=1, RequireIntegrity=1 Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Provider\\Hardened UNC Paths" - compliance: - - cis: "18.5.14.1" - - cis_csc: "3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths -> \\\\*\\NETLOGON -> !r:RequireMutualAuthentication=1, RequireIntegrity=1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths -> \\\\*\\SYSVOL -> !r:RequireMutualAuthentication=1, RequireIntegrity=1;' - - id: 12133 - title: "Ensure 'Minimize the number of simultaneous connections to the Internet or a Windows Domain' is set to 'Enabled'" - description: "This policy setting prevents computers from establishing multiple simultaneous connections to either the Internet or to a Windows domain. The recommended state for this setting is: Enabled." - rationale: "Blocking simultaneous connections can help prevent a user unknowingly allowing network traffic to flow between the Internet and the enterprise managed network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Windows Connection Manager\\Minimize the number of simultaneous connections to the Internet or a Windows Domain" - compliance: - - cis: "18.5.21.1" - - cis_csc: "12" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\GroupPolicy -> fMinimizeConnections -> !1;' - - id: 12134 - title: "Ensure 'Prohibit connection to non-domain networks when connected to domain authenticated network' is set to 'Enabled'" - description: "This policy setting prevents computers from connecting to both a domain based network and a non-domain based network at the same time. The recommended state for this setting is: Enabled." - rationale: "The potential concern is that a user would unknowingly allow network traffic to flow between the insecure public network and the enterprise managed network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Windows Connection Manager\\Prohibit connection to non-domain networks when connected to domain authenticated network" - compliance: - - cis: "18.5.21.2" - - cis_csc: "12" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\GroupPolicy -> fBlockNonDomain -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\GroupPolicy -> !fBlockNonDomain;' - - id: 12135 - title: "Ensure 'Allow Windows to automatically connect to suggested open hotspots, to networks shared by contacts, and to hotspots offering paid services' is set to 'Disabled'" - description: "This policy setting determines whether users can enable the following WLAN settings: Connect to suggested open hotspots, Connect to networks shared by my contacts, and Enable paid services.  Connect to suggested open hotspots enables Windows to automatically connect users to open hotspots it knows about by crowdsourcing networks that other people using Windows have connected to.  Connect to networks shared by my contacts enables Windows to automatically connect to networks that the user's contacts have shared with them, and enables users on this device to share networks with their contacts.  Enable paid services enables Windows to temporarily connect to open hotspots to determine if paid services are available. The recommended state for this setting is: Disabled." - rationale: "Automatically connecting to an open hotspot or network can introduce the system to a rogue network with malicious intent." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\WLAN Service\\WLAN Settings\\Allow Windows to automatically connect to suggested open hotspots, to networks shared by contacts, and to hotspots offering paid services" - compliance: - - cis: "18.5.23.2.1" - - cis_csc: "15.4, 15.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config -> AutoConnectAllowedOEM -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config -> !AutoConnectAllowedOEM;' - - id: 12136 - title: "Ensure 'Include command line in process creation events' is set to 'Disabled'" - description: "This policy setting determines what information is logged in security audit events when a new process has been created. The recommended state for this setting is: Disabled." - rationale: "When this policy setting is enabled, any user who has read access to the security events can read the command-line arguments for any successfully created process. Command-line arguments may contain sensitive or private information such as passwords or user data." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Audit Process Creation\\Include command line in process creation events" - compliance: - - cis: "18.8.3.1" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit -> ProcessCreationIncludeCmdLine_Enabled -> !0;' - - id: 12137 - title: "Ensure 'Remote host allows delegation of non-exportable credentials' is set to 'Enabled'" - description: "Remote host allows delegation of non-exportable credentials. When using credential delegation, devices provide an exportable version of credentials to the remote host. This exposes users to the risk of credential theft from attackers on the remote host. The Restricted Admin Mode and Windows Defender Remote Credential Guard features are two options to help protect against this risk. The recommended state for this setting is: Enabled." - rationale: "Restricted Admin Mode was designed to help protect administrator accounts by ensuring that reusable credentials are not stored in memory on remote devices that could potentially be compromised. Windows Defender Remote Credential Guard helps you protect your credentials over a Remote Desktop connection by redirecting Kerberos requests back to the device that is requesting the connection. Both features should be enabled and supported, as they reduce the chance of credential theft." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Credentials Delegation\\Remote host allows delegation of non-exportable credentials" - compliance: - - cis: "18.8.4.1" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation -> AllowProtectedCreds -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation -> !AllowProtectedCreds;' - - id: 12138 - title: "Ensure 'Boot-Start Driver Initialization Policy' is set to 'Enabled: Good, unknown and bad but critical'" - description: "This policy setting allows you to specify which boot-start drivers are initialized based on a classification determined by an Early Launch Antimalware boot-start driver. The Early Launch Antimalware boot-start driver can return the following classifications for each boot-start driver:  Good: The driver has been signed and has not been tampered with.  Bad: The driver has been identified as malware. It is recommended that you do not allow known bad drivers to be initialized.  Bad, but required for boot: The driver has been identified as malware, but the computer cannot successfully boot without loading this driver.  Unknown: This driver has not been attested to by your malware detection application and has not been classified by the Early Launch Antimalware boot-start driver. If you enable this policy setting you will be able to choose which boot-start drivers to initialize the next time the computer is started. If your malware detection application does not include an Early Launch Antimalware bootstart driver or if your Early Launch Antimalware boot-start driver has been disabled, this setting has no effect and all boot-start drivers are initialized. The recommended state for this setting is: Enabled: Good, unknown and bad but critical." - rationale: "This policy setting helps reduce the impact of malware that has already infected your system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Good, unknown and bad but critical: Computer Configuration\\Policies\\Administrative Templates\\System\\Early Launch Antimalware\\Boot-Start Driver Initialization Policy" - compliance: - - cis: "18.8.14.1" - - cis_csc: "8" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies\EarlyLaunch -> DriverLoadPolicy -> !3;' - - id: 12139 - title: "Ensure 'Configure registry policy processing: Do not apply during periodic background processing' is set to 'Enabled: FALSE'" - description: "The \"Do not apply during periodic background processing\" option prevents the system from updating affected policies in the background while the computer is in use. When background updates are disabled, policy changes will not take effect until the next user logon or system restart." - rationale: "Setting this option to false (unchecked) will ensure that domain policy changes take effect more quickly, as compared to waiting until the next user logon or system restart." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, then set the Do not apply during periodic background processing option to FALSE (unchecked): Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Configure registry policy processing" - compliance: - - cis: "18.8.21.2" - - cis_csc: "3.7, 5.4, 5.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> NoBackgroundPolicy -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> !NoBackgroundPolicy;' - - id: 12140 - title: "Ensure 'Configure registry policy processing: Process even if the Group Policy objects have not changed' is set to 'Enabled: TRUE'" - description: "The \"Process even if the Group Policy objects have not changed\" option updates and reapplies policies even if the policies have not changed." - rationale: "Setting this option to true (checked) will ensure unauthorized changes that might have been configured locally are forced to match the domain-based Group Policy settings again." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, then set the Process even if the Group Policy objects have not changed option to TRUE (checked): Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Configure registry policy processing" - compliance: - - cis: "18.8.21.3" - - cis_csc: "3.7, 5.4, 5.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> NoGPOListChanges -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> !NoGPOListChanges;' - - id: 12141 - title: "Ensure 'Continue experiences on this device' is set to 'Disabled'" - description: "This policy setting determines whether the Windows device is allowed to participate in cross-device experiences (continue experiences)." - rationale: "A cross-device experience is when a system can access app and send messages to other devices. In an enterprise managed environment only trusted systems should be communicating within the network. Access to any other system should be prohibited." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Continue experiences on this device" - compliance: - - cis: "18.8.21.4" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnableCdp -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !EnableCdp;' - - id: 12142 - title: "Ensure 'Turn off background refresh of Group Policy' is set to 'Disabled'" - description: "This policy setting prevents Group Policy from being updated while the computer is in use. This policy setting applies to Group Policy for computers, users and Domain Controllers." - rationale: "This setting ensures that group policy changes take effect more quickly, as compared to waiting until the next user logon or system restart." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Turn off background refresh of Group Policy" - compliance: - - cis: "18.8.21.5" - - cis_csc: "3.7, 5.4, 5.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> DisableBkGndGroupPolicy -> !0;' - - id: 12143 - title: "Ensure 'Turn off downloading of print drivers over HTTP' is set to 'Enabled'" - description: "This policy setting specifies whether to use the Store service for finding an application to open a file with an unhandled file type or protocol association. When a user opens a file type or protocol that is not associated with any applications on the computer, the user is given the choice to select a local application or use the Store service to find an application." - rationale: "The Store service is a retail outlet built into Windows, primarily for consumer use. In an enterprise managed environment the IT department should be managing the installation of all applications to reduce the risk of the installation of vulnerable software." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off access to the Store" - compliance: - - cis: "18.8.22.1.2" - - cis_csc: "2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers -> DisableWebPnPDownload -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers -> !DisableWebPnPDownload;' - - id: 12144 - title: "Ensure 'Turn off Internet download for Web publishing and online ordering wizards' is set to 'Enabled'" - description: "This policy setting controls whether Windows will download a list of providers for the Web publishing and online ordering wizards." - rationale: "Although the risk is minimal, enabling this setting will reduce the possibility of a user unknowingly downloading malicious content through this feature." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Internet download for Web publishing and online ordering wizards" - compliance: - - cis: "18.8.22.1.6" - - cis_csc: "7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoWebServices -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> !NoWebServices;' - - id: 12145 - title: "Ensure 'Turn off printing over HTTP' is set to 'Enabled'" - description: "This policy setting allows you to disable the client computer's ability to print over HTTP, which allows the computer to print to printers on the intranet as well as the Internet." - rationale: "Information that is transmitted over HTTP through this capability is not protected and can be intercepted by malicious users. For this reason, it is not often used in enterprise managed environments." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off printing over HTTP" - compliance: - - cis: "18.8.22.1.7" - - cis_csc: "13.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers -> DisableHTTPPrinting -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers -> !DisableHTTPPrinting;' - - id: 12146 - title: "Ensure 'Block user from showing account details on sign-in' is set to 'Enabled'" - description: "This policy prevents the user from showing account details (email address or user name) on the sign-in screen." - rationale: "An attacker with access to the console (for example, someone with physical access or someone who is able to connect to the workstation through Remote Desktop Services) could view the name of the last user who logged on to the server. The attacker could then try to guess the password, use a dictionary, or use a brute-force attack to try and log on." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Block user from showing account details on sign-in" - compliance: - - cis: "18.8.27.1" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> BlockUserFromShowingAccountDetailsOnSignin -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !BlockUserFromShowingAccountDetailsOnSignin;' - - id: 12147 - title: "Ensure 'Do not display network selection UI' is set to 'Enabled'" - description: "This policy setting allows you to control whether anyone can interact with available networks UI on the logon screen." - rationale: "An unauthorized user could disconnect the PC from the network or can connect the PC to other available networks without signing into Windows." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Do not display network selection UI" - compliance: - - cis: "18.8.27.2" - - cis_csc: "5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DontDisplayNetworkSelectionUI -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !DontDisplayNetworkSelectionUI;' - - id: 12148 - title: "Ensure 'Do not enumerate connected users on domain-joined computers' is set to 'Enabled'" - description: "This policy setting prevents connected users from being enumerated on domain-joined computers." - rationale: "A malicious user could use this feature to gather account names of other users, that information could then be used in conjunction with other types of attacks such as guessing passwords or social engineering. The value of this countermeasure is small because a user with domain credentials could gather the same account information using other methods." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Do not enumerate connected users on domain-joined computers" - compliance: - - cis: "18.8.27.3" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DontEnumerateConnectedUsers -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !DontEnumerateConnectedUsers;' - - id: 12149 - title: "Ensure 'Enumerate local users on domain-joined computers' is set to 'Disabled'" - description: "This policy setting allows local users to be enumerated on domain-joined computers." - rationale: "A malicious user could use this feature to gather account names of other users, that information could then be used in conjunction with other types of attacks such as guessing passwords or social engineering. The value of this countermeasure is small because a user with domain credentials could gather the same account information using other methods." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Enumerate local users on domain-joined computers" - compliance: - - cis: "18.8.27.4" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnumerateLocalUsers -> !0;' - - id: 12150 - title: "Ensure 'Turn off app notifications on the lock screen' is set to 'Enabled'" - description: "This policy setting allows you to prevent app notifications from appearing on the lock screen." - rationale: "App notifications might display sensitive business or personal data" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Turn off app notifications on the lock screen" - compliance: - - cis: "18.8.27.5" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DisableLockScreenAppNotifications -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !DisableLockScreenAppNotifications;' - - id: 12151 - title: "Ensure 'Turn off picture password sign-in' is set to 'Enabled'" - description: "This policy setting allows you to control whether a domain user can sign in using a picture password. The recommended state for this setting is: Enabled." - rationale: "Picture passwords bypass the requirement for a typed complex password. In a shared work environment, a simple shoulder surf where someone observed the on-screen gestures would allow that person to gain access to the system without the need to know the complex password. Vertical monitor screens with an image are much more visible at a distance than horizontal key strokes, increasing the likelihood of a successful observation of the mouse gestures." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Turn off picture password sign-in" - compliance: - - cis: "18.8.27.6" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> BlockDomainPicturePassword -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !BlockDomainPicturePassword;' - - id: 12152 - title: "Ensure 'Turn on convenience PIN sign-in' is set to 'Disabled'" - description: "This policy setting allows you to control whether a domain user can sign in using a convenience PIN. In Windows 10, convenience PIN was replaced with Passport, which has stronger security properties. To configure Passport for domain users, use the policies under Computer Configuration\\Administrative Templates\\Windows Components\\Microsoft Passport for Work." - rationale: "A PIN is created from a much smaller selection of characters than a password, so in most cases a PIN will be much less robust than a password." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Turn on convenience PIN sign-in" - compliance: - - cis: "18.8.27.7" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> AllowDomainPINLogon -> !0;' - - id: 12153 - title: "Ensure 'Allow network connectivity during connected-standby (on battery)' is set to 'Disabled'" - description: "This policy setting allows you to control the network connectivity state in standby on modern standby-capable systems." - rationale: "Disabling this setting ensures that the computer will not be accessible to attackers over a WLAN network while left unattended, on battery and in a sleep state." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Power Management\\Sleep Settings\\Allow network connectivity during connected-standby (on battery)" - compliance: - - cis: "18.8.33.6.1" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\f15576e8-98b7-4186-b944-eafa664402d9 -> DCSettingIndex -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\f15576e8-98b7-4186-b944-eafa664402d9 -> !DCSettingIndex;' - - id: 12154 - title: "Ensure 'Allow network connectivity during connected-standby (plugged in)' is set to 'Disabled'" - description: "This policy setting allows you to control the network connectivity state in standby on modern standby-capable systems." - rationale: "Disabling this setting ensures that the computer will not be accessible to attackers over a WLAN network while left unattended, plugged in and in a sleep state." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Power Management\\Sleep Settings\\Allow network connectivity during connected-standby (plugged in)" - compliance: - - cis: "18.8.33.6.2" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\f15576e8-98b7-4186-b944-eafa664402d9 -> ACSettingIndex -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\f15576e8-98b7-4186-b944-eafa664402d9 -> !ACSettingIndex;' - - id: 12155 - title: "Ensure 'Require a password when a computer wakes (on battery)' is set to 'Enabled'" - description: "Dictates whether or not Windows is allowed to use standby states when sleeping the computer." - rationale: "System sleep states (S1-S3) keep power to the RAM which may contain secrets, such as the BitLocker volume encryption key. An attacker finding a computer in sleep states (S1-S3) could directly attack the memory of the computer and gain access to the secrets through techniques such as RAM reminisce and direct memory access (DMA)." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Power Management\\Sleep Settings\\Allow standby states (S1-S3) when sleeping (on battery)" - compliance: - - cis: "18.8.33.6.5" - - cis_csc: "13.2, 13.6" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\0e796bdb-100d-47d6-a2d5-f7d2daa51f51 -> DCSettingIndex -> !1;' - - id: 12156 - title: "Ensure 'Require a password when a computer wakes (plugged in)' is set to 'Enabled'" - description: "Specifies whether or not the user is prompted for a password when the system resumes from sleep." - rationale: "Enabling this setting ensures that anyone who wakes an unattended computer from sleep state will have to provide logon credentials before they can access the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Power Management\\Sleep Settings\\Require a password when a computer wakes (plugged in)" - compliance: - - cis: "18.8.33.6.6" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\0e796bdb-100d-47d6-a2d5-f7d2daa51f51 -> ACSettingIndex -> !1;' - - id: 12157 - title: "Ensure 'Configure Offer Remote Assistance' is set to 'Disabled'" - description: "This policy setting allows you to turn on or turn off Offer (Unsolicited) Remote Assistance on this computer. Help desk and support personnel will not be able to proactively offer assistance, although they can still respond to user assistance requests." - rationale: "A user might be tricked and accept an unsolicited Remote Assistance offer from a malicious user." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Assistance\\Configure Offer Remote Assistance" - compliance: - - cis: "18.8.35.1" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fAllowUnsolicited -> !0;' - - id: 12158 - title: "Ensure 'Configure Solicited Remote Assistance' is set to 'Disabled'" - description: "This policy setting allows you to turn on or turn off Solicited (Ask for) Remote Assistance on this computer." - rationale: "There is slight risk that a rogue administrator will gain access to another user's desktop session, however, they cannot connect to a user's computer unannounced or control it without permission from the user. When an expert tries to connect, the user can still choose to deny the connection or give the expert view-only privileges. The user must explicitly click the Yes button to allow the expert to remotely control the workstation." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Assistance\\Configure Solicited Remote Assistance" - compliance: - - cis: "18.8.35.2" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fAllowToGetHelp -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fAllowToGetHelp;' - - id: 12159 - title: "Ensure 'Enable RPC Endpoint Mapper Client Authentication' is set to 'Enabled'" - description: "This policy setting controls whether RPC clients authenticate with the Endpoint Mapper Service when the call they are making contains authentication information. The Endpoint Mapper Service on computers running Windows NT4 (all service packs) cannot process authentication information supplied in this manner. This policy setting can cause a specific issue with 1-way forest trusts if it is applied to the trusting domain DCs (see Microsoft KB3073942), so we do not recommend applying it to Domain Controllers." - rationale: "Anonymous access to RPC services could result in accidental disclosure of information to unauthenticated users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Procedure Call\\Enable RPC Endpoint Mapper Client Authentication" - compliance: - - cis: "18.8.36.1" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Rpc -> EnableAuthEpResolution -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Rpc -> !EnableAuthEpResolution;' - - id: 12160 - title: "Ensure 'Restrict Unauthenticated RPC clients' is set to 'Enabled: Authenticated'" - description: "This policy setting controls how the RPC server runtime handles unauthenticated RPC clients connecting to RPC servers. This policy setting impacts all RPC applications. In a domain environment this policy setting should be used with caution as it can impact a wide range of functionality including group policy processing itself. Reverting a change to this policy setting can require manual intervention on each affected machine. This policy setting should never be applied to a Domain Controller. A client will be considered an authenticated client if it uses a named pipe to communicate with the server or if it uses RPC Security. RPC Interfaces that have specifically requested to be accessible by unauthenticated clients may be exempt from this restriction, depending on the selected value for this policy setting. -- None allows all RPC clients to connect to RPC Servers running on the machine on which the policy setting is applied. -- Authenticated allows only authenticated RPC Clients (per the definition above) to connect to RPC Servers running on the machine on which the policy setting is applied. Exemptions are granted to interfaces that have requested them. -- Authenticated without exceptions allows only authenticated RPC Clients (per the definition above) to connect to RPC Servers running on the machine on which the policy setting is applied. No exceptions are allowed. This value has the potential to cause serious problems and is not recommended.'" - rationale: "Unauthenticated RPC communication can create a security vulnerability." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Authenticated: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Procedure Call\\Restrict Unauthenticated RPC clients" - compliance: - - cis: "18.8.36.2" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Rpc -> RestrictRemoteClients -> !1;' - - id: 12161 - title: "Ensure 'Allow Microsoft accounts to be optional' is set to 'Enabled'" - description: "This policy setting lets you control whether Microsoft accounts are optional for Windows Store apps that require an account to sign in. This policy only affects Windows Store apps that support it" - rationale: "Enabling this setting allows an organization to use their enterprise user accounts instead of using their Microsoft accounts when accessing Windows store apps. This provides the organization with greater control over relevant credentials. Microsoft accounts cannot be centrally managed and as such enterprise credential security policies cannot be applied to them, which could put any information accessed by using Microsoft accounts at risk." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\App runtime\\Allow Microsoft accounts to be optional" - compliance: - - cis: "18.9.6.1" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> MSAOptional -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> !MSAOptional;' - - id: 12162 - title: "Ensure 'Disallow Autoplay for non-volume devices' is set to 'Enabled'" - description: "This policy setting disallows AutoPlay for MTP devices like cameras or phones" - rationale: "An attacker could use this feature to launch a program to damage a client computer or data on the computer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Disallow Autoplay for non-volume devices" - compliance: - - cis: "18.9.8.1" - - cis_csc: "8.3, 8.4, 8.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoAutoplayfornonVolume -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> !NoAutoplayfornonVolume;' - - id: 12163 - title: "Ensure 'Set the default behavior for AutoRun' is set to 'Enabled: Do not execute any autorun commands'" - description: "This policy setting sets the default behavior for Autorun commands. Autorun commands are generally stored in autorun.inf files. They often launch the installation program or other routines. The recommended state for this setting is: Enabled: Do not execute any autorun commands." - rationale: "Prior to Windows Vista, when media containing an autorun command is inserted, the system will automatically execute the program without user intervention. This creates a major security concern as code may be executed without user's knowledge. The default behavior starting with Windows Vista is to prompt the user whether autorun command is to be run. The autorun command is represented as a handler in the Autoplay dialog" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Do not execute any autorun commands: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Set the default behavior for AutoRun" - compliance: - - cis: "18.9.8.2" - - cis_csc: "8.3, 8.4, 8.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoAutorun -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> !NoAutorun;' - - id: 12164 - title: "Ensure 'Turn off Autoplay' is set to 'Enabled: All drives'" - description: "Autoplay starts to read from a drive as soon as you insert media in the drive, which causes the setup file for programs or audio media to start immediately. An attacker could use this feature to launch a program to damage the computer or data on the computer. Autoplay is disabled by default on some removable drive types, such as floppy disk and network drives, but not on CD-ROM drives." - rationale: "An attacker could use this feature to launch a program to damage a client computer or data on the computer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: All drives: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Turn off Autoplay" - compliance: - - cis: "18.9.8.3" - - cis_csc: "8.3, 8.4, 8.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer-> NoDriveTypeAutoRun -> !ff;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer-> !NoDriveTypeAutoRun;' - - id: 12165 - title: "Ensure 'Configure enhanced anti-spoofing' is set to 'Enabled'" - description: "This policy setting determines whether enhanced anti-spoofing is configured for devices which support it." - rationale: "Enterprise managed environments are now supporting a wider range of mobile devices, increasing the security on these devices will help protect against unauthorized access on your network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Biometrics\\Facial Features\\Configure enhanced anti-spoofing" - compliance: - - cis: "18.9.10.1.1" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Biometrics\FacialFeatures -> EnhancedAntiSpoofing -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Biometrics\FacialFeatures -> !EnhancedAntiSpoofing;' - - id: 12166 - title: "Ensure 'Turn off Microsoft consumer experiences' is set to 'Enabled'" - description: "This policy setting turns off experiences that help consumers make the most of their devices and Microsoft account." - rationale: "Having apps silently install in an enterprise managed environment is not good security practice - especially if the apps send data back to a 3rd party." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Cloud Content\\Turn off Microsoft consumer experiences" - compliance: - - cis: "18.9.13.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent -> DisableWindowsConsumerFeatures -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent -> !DisableWindowsConsumerFeatures;' - - id: 12167 - title: "Ensure 'Require pin for pairing' is set to 'Enabled'" - description: "This policy setting controls whether or not a PIN is required for pairing to a wireless display device." - rationale: "If this setting is not configured or disabled then a PIN would not be required when pairing wireless display devices to the system, increasing the risk of unauthorized use." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Connect\\Require pin for pairing" - compliance: - - cis: "18.9.14.1" - - cis_csc: "15.8, 15.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Connect -> RequirePinForPairing -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Connect -> !RequirePinForPairing;' - - id: 12168 - title: "Ensure 'Do not display the password reveal button' is set to 'Enabled'" - description: "This policy setting allows you to configure the display of the password reveal button in password entry user experiences." - rationale: "This is a useful feature when entering a long and complex password, especially when using a touchscreen. The potential risk is that someone else may see your password while surreptitiously observing your screen." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Credential User Interface\\Do not display the password reveal button" - compliance: - - cis: "18.9.15.1" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredUI -> DisablePasswordReveal -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredUI -> !DisablePasswordReveal;' - - id: 12169 - title: "Ensure 'Enumerate administrator accounts on elevation' is set to 'Disabled'" - description: "This policy setting controls whether administrator accounts are displayed when a user attempts to elevate a running application." - rationale: "Users could see the list of administrator accounts, making it slightly easier for a malicious user who has logged onto a console session to try to crack the passwords of those accounts." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Credential User Interface\\Enumerate administrator accounts on elevation" - compliance: - - cis: "18.9.15.2" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\CredUI -> EnumerateAdministrators -> !0;' - - id: 12170 - title: "Ensure 'Allow Telemetry' is set to 'Enabled: 0 - Security (Enterprise Only)' or 'Enabled: 1 - Basic'" - description: "This policy setting determines the amount of diagnostic and usage data reported to Microsoft:  A value of 0 - Security [Enterprise Only] will send minimal data to Microsoft. This data includes Malicious Software Removal Tool (MSRT) & Windows Defender data, if enabled, and telemetry client settings. Setting a value of 0 applies to enterprise, EDU, IoT and server devices only. Setting a value of 0 for other devices is equivalent to choosing a value of 1.  A value of 1 - Basic sends only a basic amount of diagnostic and usage data. Note that setting values of 0 or 1 will degrade certain experiences on the device.  A value of 2 - Enhanced sends enhanced diagnostic and usage data.  A value of 3 - Full sends the same data as a value of 2, plus additional diagnostics data, including the files and content that may have caused the problem. Windows 10 telemetry settings apply to the Windows operating system and some first party apps. This setting does not apply to third party apps running on Windows 10. The recommended state for this setting is: Enabled: 0 - Security [Enterprise Only] or Enabled: 1 - Basic." - rationale: "Sending any data to a 3rd party vendor is a security concern and should only be done on an as needed basis." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 0 - Security [Enterprise Only] or Enabled: 1 - Basic: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Data Collection and Preview Builds\\Allow Telemetry" - compliance: - - cis: "18.9.16.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection -> AllowTelemetry -> 2;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection -> AllowTelemetry -> 3;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection -> !AllowTelemetry;' - - id: 12171 - title: "Ensure 'Disable pre-release features or settings' is set to 'Disabled'" - description: "This policy setting determines the level that Microsoft can experiment with the product to study user preferences or device behavior. A value of 1 permits Microsoft to configure device settings only. A value of 2 allows Microsoft to conduct full experimentations." - rationale: "It can be dangerous in an enterprise managed environment if experimental features are allowed because this can introduce bugs and security holes into systems, making it easier for an attacker to gain access." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Data Collection and Preview Builds\\Disable pre-release features or settings" - compliance: - - cis: "18.9.16.3" - - cis_csc: "3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds -> EnableConfigFlighting -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds -> !EnableConfigFlighting;' - - id: 12172 - title: "Ensure 'Do not show feedback notifications' is set to 'Enabled'" - description: "This policy setting allows an organization to prevent its devices from showing feedback questions from Microsoft." - rationale: "Users should not be sending any feedback to 3rd party vendors in an enterprise managed environment." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Data Collection and Preview Builds\\Do not show feedback notifications" - compliance: - - cis: "18.9.16.4" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection -> DoNotShowFeedbackNotifications -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection -> !DoNotShowFeedbackNotifications;' - - id: 12173 - title: "Ensure 'Toggle user control over Insider builds' is set to 'Disabled'" - description: "This policy setting determines whether users can access the Insider build controls in the Advanced Options for Windows Update. These controls are located under \"Get Insider builds,\" and enable users to make their devices available for downloading and installing Windows preview software." - rationale: "It can be risky for experimental features to be allowed in an enterprise managed environment because this can introduce bugs and security holes into systems, making it easier for an attacker to gain access. It is generally preferred to only use production-ready builds." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Data Collection and Preview Builds\\Toggle user control over Insider builds" - compliance: - - cis: "18.9.16.5" - - cis_csc: "3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds -> AllowBuildPreview -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds -> !AllowBuildPreview;' - - id: 12174 - title: "Ensure 'Download Mode' is NOT set to 'Enabled: Internet'" - description: "This policy setting specifies the download method that Delivery Optimization can use in downloads of Windows Updates, Apps and App updates. The following methods are supported:  0 = HTTP only, no peering.  1 = HTTP blended with peering behind the same NAT.  2 = HTTP blended with peering across a private group. Peering occurs on devices in the same Active Directory Site (if exist) or the same domain by default. When this option is selected, peering will cross NATs. To create a custom group use Group ID in combination with Mode 2.  3 = HTTP blended with Internet Peering.  99 = Simple download mode with no peering. Delivery Optimization downloads using HTTP only and does not attempt to contact the Delivery Optimization cloud services.  100 = Bypass mode. Do not use Delivery Optimization and use BITS instead." - rationale: "Due to privacy concerns and security risks, updates should only be downloaded directly from Microsoft, or from a trusted machine on the internal network that received its updates from a trusted source and approved by the network administrator." - remediation: "To establish the recommended configuration via GP, set the following UI path to any value other than Enabled: Internet: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Delivery Optimization\\Download Mode" - compliance: - - cis: "18.9.17.1" - - cis_csc: "4.5, 3.4, 3.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -> DODownloadMode -> 3;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -> !DODownloadMode;' - - id: 12175 - title: "Ensure 'Application: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" - description: "This policy setting controls Event Log behavior when the log file reaches its maximum size." - rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Application\\Control Event Log behavior when the log file reaches its maximum size" - compliance: - - cis: "18.9.26.1.1" - - cis_csc: "6.3, 6.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> Retention -> 1;' - - id: 12176 - title: "Ensure 'Application: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" - description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Application\\Specify the maximum log file size (KB)" - compliance: - - cis: "18.9.26.1.2" - - cis_csc: "6.3, 6.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:0\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:4\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:5\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:6\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:7\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> !MaxSize;' - - id: 12177 - title: "Ensure 'Security: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" - description: "This policy setting controls Event Log behavior when the log file reaches its maximum size." - rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Security\\Control Event Log behavior when the log file reaches its maximum size" - compliance: - - cis: "18.9.26.2.1" - - cis_csc: "6.3, 6.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> Retention -> !0;' - - id: 12178 - title: "Ensure 'Security: Specify the maximum log file size (KB)' is set to 'Enabled: 196,608 or greater'" - description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 196,608 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Security\\Specify the maximum log file size (KB)" - compliance: - - cis: "18.9.26.2.2" - - cis_csc: "6.3, 6.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:0\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:1\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:2\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> !MaxSize;' - - id: 12179 - title: "Ensure 'Setup: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" - description: "This policy setting controls Event Log behavior when the log file reaches its maximum size." - rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Setup\\Control Event Log behavior when the log file reaches its maximum size" - compliance: - - cis: "18.9.26.3.1" - - cis_csc: "6.3, 6.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> Retention -> !0;' - - id: 12180 - title: "Ensure 'Setup: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" - description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Setup\\Specify the maximum log file size (KB)" - compliance: - - cis: "18.9.26.3.2" - - cis_csc: "6.3, 6.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:0\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:4\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:5\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:6\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:7\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> !MaxSize;' - - id: 12181 - title: "Ensure 'System: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" - description: "This policy setting controls Event Log behavior when the log file reaches its maximum size." - rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\System\\Control Event Log behavior when the log file reaches its maximum size" - compliance: - - cis: "18.9.26.4.1" - - cis_csc: "6.3, 6.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> Retention -> !0;' - - id: 12182 - title: "Ensure 'System: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" - description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\System\\Specify the maximum log file size (KB)" - compliance: - - cis: "18.9.26.4.2" - - cis_csc: "6.3, 6.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:0\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:4\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:5\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:6\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:7\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> !MaxSize;' - - id: 12183 - title: "Ensure 'Turn off Data Execution Prevention for Explorer' is set to 'Disabled'" - description: "Disabling Data Execution Prevention can allow certain legacy plug-in applications to function without terminating Explorer." - rationale: "Data Execution Prevention is an important security feature supported by Explorer that helps to limit the impact of certain types of malware." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off Data Execution Prevention for Explorer" - compliance: - - cis: "18.9.30.2" - - cis_csc: "8.4, 8.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoDataExecutionPrevention -> !0;' - - id: 12184 - title: "Ensure 'Turn off heap termination on corruption' is set to 'Disabled'" - description: "Without heap termination on corruption, legacy plug-in applications may continue to function when a File Explorer session has become corrupt. Ensuring that heap termination on corruption is active will prevent this." - rationale: "Allowing an application to function after its session has become corrupt increases the risk posture to the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off heap termination on corruption" - compliance: - - cis: "18.9.30.3" - - cis_csc: "8.4, 8.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoHeapTerminationOnCorruption -> !0;' - - id: 12185 - title: "Ensure 'Turn off shell protocol protected mode' is set to 'Disabled'" - description: "This policy setting allows you to configure the amount of functionality that the shell protocol can have. When using the full functionality of this protocol, applications can open folders and launch files. The protected mode reduces the functionality of this protocol allowing applications to only open a limited set of folders. Applications are not able to open files with this protocol when it is in the protected mode. It is recommended to leave this protocol in the protected mode to increase the security of Windows." - rationale: "Limiting the opening of files and folders to a limited set reduces the attack surface of the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off shell protocol protected mode" - compliance: - - cis: "18.9.30.4" - - cis_csc: "8.4, 8.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> PreXPSP2ShellProtocolBehavior -> !0;' - - id: 12186 - title: "Ensure 'Prevent the computer from joining a homegroup' is set to 'Enabled'" - description: "By default, users can add their computer to a HomeGroup on a home network." - rationale: "While resources on a domain-joined computer cannot be shared with a HomeGroup, information from the domain-joined computer can be leaked to other computers in the HomeGroup." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\HomeGroup\\Prevent the computer from joining a homegroup" - compliance: - - cis: "18.9.35.1" - - cis_csc: "14.1, 14.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HomeGroup -> DisableHomeGroup -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HomeGroup -> !DisableHomeGroup;' - - id: 12187 - title: "Ensure 'Block all consumer Microsoft account user authentication' is set to 'Enabled'" - description: "This setting determines whether applications and services on the device can utilize new consumer Microsoft account authentication via the Windows OnlineID and WebAccountManager APIs." - rationale: "Organizations that want to effectively implement identity management policies and maintain firm control of what accounts are used on their computers will probably want to block Microsoft accounts. Organizations may also need to block Microsoft accounts in order to meet the requirements of compliance standards that apply to their information systems." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft accounts\\Block all consumer Microsoft account user authentication" - compliance: - - cis: "18.9.44.1" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftAccount -> DisableUserAuth -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftAccount -> !DisableUserAuth;' - - id: 12188 - title: "Ensure 'Configure cookies' is set to 'Enabled: Block only 3rd-party cookies' or higher" - description: "This setting lets you configure how your company deals with cookies. The recommended state for this setting is: Enabled: Block only 3rd-party cookies. Configuring this setting to Enabled: Block all cookies also conforms to the benchmark." - rationale: "Cookies can pose a serious privacy concern, although many websites depend on them for operation. It is recommended when possible to block 3rd party cookies in order to reduce tracking" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Block only 3rd-party cookies (or, if applicable for your environment, Enabled: Block all cookies): Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Configure cookies" - compliance: - - cis: "18.9.45.4" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> Cookies -> 2;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> !Cookies;' - - id: 12189 - title: "Ensure 'Configure Password Manager' is set to 'Disabled'" - description: "This setting lets you decide whether employees can save their passwords locally, using Password Manager." - rationale: "Using Password Manager can potentially makes it easier for an unauthorized user who gains access to the user’s desktop (including a coworker who sits down at a user’s desk soon after the user walks away and forgets to lock their workstation), to log in to sites as the user, without needing to know or enter the password." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Configure Password Manager" - compliance: - - cis: "18.9.45.5" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> FormSuggest Passwords -> !no;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> !FormSuggest Passwords;' - - id: 12190 - title: "Ensure 'Configure the Adobe Flash Click-to-Run setting' is set to 'Enabled'" - description: "This setting controls whether Adobe Flash (within the Microsoft Edge web browser) will require the user to click on the Flash element before the browser will display the Flash content." - rationale: "Adobe Flash is a very insecure product and has been a frequent attack vector on the web. However, disabling it completely may not be a practical option for many organizations, as it is still used frequently on many websites. This feature at least makes Adobe Flash content \"opt-in\", so the user has to choose to click on each specific piece of Flash content before it will run." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Configure the Adobe Flash Click-to-Run setting" - compliance: - - cis: "18.9.45.8" - - cis_csc: "7.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Security -> FlashClickToRunMode -> !1;' - - id: 12191 - title: "Ensure 'Prevent the usage of OneDrive for file storage' is set to 'Enabled'" - description: "This policy setting lets you prevent apps and features from working with files on OneDrive using the Next Generation Sync Client." - rationale: "Enabling this setting prevents users from accidentally uploading confidential or sensitive corporate information to the OneDrive cloud service using the Next Generation Sync Client." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\OneDrive\\Prevent the usage of OneDrive for file storage" - compliance: - - cis: "18.9.52.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\OneDrive -> DisableFileSyncNGSC -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\OneDrive -> !DisableFileSyncNGSC;' - - id: 12192 - title: "Ensure 'Do not allow passwords to be saved' is set to 'Enabled'" - description: "This policy setting helps prevent Remote Desktop clients from saving passwords on a computer." - rationale: "An attacker with physical access to the computer may be able to break the protection guarding saved passwords. An attacker who compromises a user's account and connects to their computer could use saved passwords to gain access to additional hosts" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Connection Client\\Do not allow passwords to be saved" - compliance: - - cis: "18.9.58.2.2" - - cis_csc: "16.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> DisablePasswordSaving -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !DisablePasswordSaving;' - - id: 12193 - title: "Ensure 'Do not allow drive redirection' is set to 'Enabled'" - description: "This policy setting prevents users from sharing the local drives on their client computers to Remote Desktop Servers that they access. Mapped drives appear in the session folder tree in Windows Explorer in the following format: \\TSClient\\$ If local drives are shared they are left vulnerable to intruders who want to exploit the data that is stored on them." - rationale: "Data could be forwarded from the user's Remote Desktop Services session to the user's local computer without any direct user interaction. Malicious software already present on a compromised server would have direct and stealthy disk access to the user's local computer during the Remote Desktop session." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow drive redirection" - compliance: - - cis: "18.9.58.3.3.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableCdma -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fDisableCdm;' - - id: 12194 - title: "Ensure 'Always prompt for password upon connection' is set to 'Enabled'" - description: "This policy setting specifies whether Remote Desktop Services always prompts the client computer for a password upon connection. You can use this policy setting to enforce a password prompt for users who log on to Remote Desktop Services, even if they already provided the password in the Remote Desktop Connection client." - rationale: "Users have the option to store both their username and password when they create a new Remote Desktop Connection shortcut. If the server that runs Remote Desktop Services allows users who have used this feature to log on to the server but not enter their password, then it is possible that an attacker who has gained physical access to the user's computer could connect to a Remote Desktop Server through the Remote Desktop Connection shortcut, even though they may not know the user's password." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Always prompt for password upon connection" - compliance: - - cis: "18.9.58.3.9.1" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fPromptForPassword -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fPromptForPassword;' - - id: 12195 - title: "Ensure 'Require secure RPC communication' is set to 'Enabled'" - description: "This policy setting allows you to specify whether Remote Desktop Services requires secure Remote Procedure Call (RPC) communication with all clients or allows unsecured communication. You can use this policy setting to strengthen the security of RPC communication with clients by allowing only authenticated and encrypted requests." - rationale: "Allowing unsecure RPC communication can exposes the server to man in the middle attacks and data disclosure attacks." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Require secure RPC communication" - compliance: - - cis: "18.9.58.3.9.2" - - cis_csc: "3.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fEncryptRPCTraffic -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fEncryptRPCTraffic;' - - id: 12196 - title: "Ensure 'Set client connection encryption level' is set to 'Enabled: High Level'" - description: "This policy setting specifies whether to require the use of a specific encryption level to secure communications between client computers and RD Session Host servers during Remote Desktop Protocol (RDP) connections. This policy only applies when you are using native RDP encryption. However, native RDP encryption (as opposed to SSL encryption) is not recommended. This policy does not apply to SSL encryption." - rationale: "If Remote Desktop client connections that use low level encryption are allowed, it is more likely that an attacker will be able to decrypt any captured Remote Desktop Services network traffic." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: High Level: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Set client connection encryption level" - compliance: - - cis: "18.9.58.3.9.3" - - cis_csc: "3.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MinEncryptionLevel -> !3;' - - id: 12197 - title: "Ensure 'Do not delete temp folders upon exit' is set to 'Disabled'" - description: "This policy setting specifies whether Remote Desktop Services retains a user's per-session temporary folders at logoff." - rationale: "Sensitive information could be contained inside the temporary folders and visible to other administrators that log into the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Temporary Folders\\Do not delete temp folders upon exit" - compliance: - - cis: "18.9.58.3.11.1" - - cis_csc: "14.4, 14.6" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> DeleteTempDirsOnExit -> !1;' - - id: 12198 - title: "Ensure 'Do not use temporary folders per session' is set to 'Disabled'" - description: "By default, Remote Desktop Services creates a separate temporary folder on the RD Session Host server for each active session that a user maintains on the RD Session Host server. The temporary folder is created on the RD Session Host server in a Temp folder under the user's profile folder and is named with the sessionid. This temporary folder is used to store individual temporary files. To reclaim disk space, the temporary folder is deleted when the user logs off from a session." - rationale: "Disabling this setting keeps the cached data independent for each session, both reducing the chance of problems from shared cached data between sessions, and keeping possibly sensitive data separate to each user session." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Temporary Folders\\Do not use temporary folders per session" - compliance: - - cis: "18.9.58.3.11.2" - - cis_csc: "14.4, 14.6" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> PerSessionTempDir -> !1;' - - id: 12199 - title: "Ensure 'Prevent downloading of enclosures' is set to 'Enabled'" - description: "This policy setting prevents the user from having enclosures (file attachments) downloaded from an RSS feed to the user's computer." - rationale: "Allowing attachments to be downloaded through the RSS feed can introduce files that could have malicious intent." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\RSS Feeds\\Prevent downloading of enclosures" - compliance: - - cis: "18.9.59.1" - - cis_csc: "7.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Feeds -> DisableEnclosureDownload -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Feeds -> !DisableEnclosureDownload;' - - id: 12200 - title: "Ensure 'Allow Cortana' is set to 'Disabled'" - description: "This policy setting specifies whether Cortana is allowed on the device" - rationale: "If Cortana is enabled, sensitive information could be contained in search history and sent out to Microsoft." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Allow Cortana" - compliance: - - cis: "18.9.60.3" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> AllowCortana -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> !AllowCortana;' - - id: 12201 - title: "Ensure 'Allow Cortana above lock screen' is set to 'Disabled'" - description: "This policy setting determines whether or not the user can interact with Cortana using speech while the system is locked." - rationale: "Access to any computer resource should not be allowed when the device is locked." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Allow Cortana above lock screen" - compliance: - - cis: "18.9.60.4" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> AllowCortanaAboveLock -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> !AllowCortanaAboveLock;' - - id: 12202 - title: "Ensure 'Allow indexing of encrypted files' is set to 'Disabled'" - description: "This policy setting controls whether encrypted items are allowed to be indexed. When this setting is changed, the index is rebuilt completely. Full volume encryption (such as BitLocker Drive Encryption or a non-Microsoft solution) must be used for the location of the index to maintain security for encrypted files." - rationale: "Indexing and allowing users to search encrypted files could potentially reveal confidential data stored within the encrypted files." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Allow indexing of encrypted files" - compliance: - - cis: "18.9.60.5" - - cis_csc: "13.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> AllowIndexingEncryptedStoresOrItems -> !0;' - - id: 12203 - title: "Ensure 'Allow search and Cortana to use location' is set to 'Disabled'" - description: "This policy setting specifies whether search and Cortana can provide location aware search and Cortana results." - rationale: "In an enterprise managed environment, allowing Cortana and Search to have access to location data is unnecessary. Organizations likely do not want this information shared out" - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Allow search and Cortana to use location" - compliance: - - cis: "18.9.60.6" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> AllowSearchToUseLocation -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> !AllowSearchToUseLocation;' - - id: 12204 - title: "Ensure 'Turn off Automatic Download and Install of updates' is set to 'Disabled'" - description: "This setting enables or disables the automatic download and installation of Windows Store app updates." - rationale: "Keeping your system properly patched can help protect against 0 day vulnerabilities." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Store\\Turn off Automatic Download and Install of updates" - compliance: - - cis: "18.9.68.2" - - cis_csc: "3.1, 3.4, 3.5, 4.5, 5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore -> AutoDownload -> !4;' - - id: 12205 - title: "Ensure 'Turn off the offer to update to the latest version of Windows' is set to 'Enabled'" - description: "Enables or disables the Windows Store offer to update to the latest version of Windows." - rationale: "Unplanned OS upgrades can lead to more preventable support calls. The IT department should be managing and approving all upgrades and updates." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Store\\Turn off the offer to update to the latest version of Windows" - compliance: - - cis: "18.9.68.3" - - cis_csc: "3.1, 3.4, 3.5, 4.5, 5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore -> DisableOSUpgrade -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore -> !DisableOSUpgrade;' - - id: 12206 - title: "Ensure 'Configure local setting override for reporting to Microsoft MAPS' is set to 'Disabled'" - description: "This policy setting configures a local override for the configuration to join Microsoft Active Protection Service (MAPS), which Microsoft has now renamed to \"Windows Defender Antivirus Cloud Protection Service\". This setting can only be set by Group Policy." - rationale: "The decision on whether or not to participate in Microsoft MAPS / Windows Defender Antivirus Cloud Protection Service for malicious software reporting should be made centrally in an enterprise managed environment, so that all computers within it behave consistently in that regard. Configuring this setting to Disabled ensures that the decision remains centrally managed." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\MAPS\\Configure local setting override for reporting to Microsoft MAPS" - compliance: - - cis: "18.9.76.3.1" - - cis_csc: "8" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet -> LocalSettingOverrideSpynetReporting -> !0;' - - id: 12207 - title: "Ensure 'Turn on behavior monitoring' is set to 'Enabled'" - description: "This policy setting allows you to configure behavior monitoring for Windows Defender Antivirus." - rationale: "When running an antivirus solution such as Windows Defender Antivirus, it is important to ensure that it is configured to heuristically monitor in real-time for suspicious and known malicious activity." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Real-Time Protection\\Turn on behavior monitoring" - compliance: - - cis: "18.9.76.7.1" - - cis_csc: "8.1, 8.6" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection -> DisableBehaviorMonitoring -> !1;' - - id: 12208 - title: "Ensure 'Scan removable drives' is set to 'Enabled'" - description: "This policy setting allows you to manage whether or not to scan for malicious software and unwanted software in the contents of removable drives, such as USB flash drives, when running a full scan." - rationale: "It is important to ensure that any present removable drives are always included in any type of scan, as removable drives are more likely to contain malicious software brought in to the enterprise managed environment from an external, unmanaged computer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Scan\\Scan removable drives" - compliance: - - cis: "18.9.76.10.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Scan -> DisableRemovableDriveScanning -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Scan -> !DisableRemovableDriveScanning;' - - id: 12209 - title: "Ensure 'Turn on e-mail scanning' is set to 'Enabled'" - description: "This policy setting allows you to configure e-mail scanning. When e-mail scanning is enabled, the engine will parse the mailbox and mail files, according to their specific format, in order to analyze the mail bodies and attachments. Several e-mail formats are currently supported, for example: pst (Outlook), dbx, mbx, mime (Outlook Express), binhex (Mac)." - rationale: "Incoming e-mails should be scanned by an antivirus solution such as Windows Defender Antivirus, as email attachments are a commonly used attack vector to infiltrate computers with malicious software." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Scan\\Turn on e-mail scanning" - compliance: - - cis: "18.9.76.10.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Scan -> DisableEmailScanning -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Scan -> !DisableEmailScanning;' - - id: 12210 - title: "Ensure 'Configure Attack Surface Reduction rules' is set to 'Enabled'" - description: "This policy setting controls the state for the Attack Surface Reduction (ASR) rules." - rationale: "Attack surface reduction helps prevent actions and apps that are typically used by exploitseeking malware to infect machines." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Windows Defender Exploit Guard\\Attack Surface Reduction\\Configure Attack Surface Reduction rules" - compliance: - - cis: "18.9.76.13.1.1" - - cis_csc: "8.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR -> ExploitGuard_ASR_Rules -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR -> !ExploitGuard_ASR_Rules;' - - id: 12211 - title: "Ensure 'Configure Attack Surface Reduction rules: Set the state for each ASR rule' is 'configured'" - description: "This policy setting sets the Attack Surface Reduction rules. The recommended state for this setting is: 75668c1f-73b5-4cf0-bb93-3ecf5cb7cc84 - 1 (Block Office applications from injecting code into other processes) 3b576869-a4ec-4529-8536-b80a7769e899 - 1 (Block Office applications from creating executable content) d4f940ab-401b-4efc-aadc-ad5f3c50688a - 1 (Block Office applications from creating child processes) 92e97fa1-2edf-4476-bdd6-9dd0b4dddc7b - 1 (Block Win32 API calls from Office macro) 5beb7efe-fd9a-4556-801d-275e5ffc04cc - 1 (Block execution of potentially obfuscated scripts) d3e037e1-3eb8-44c8-a917-57927947596d - 1 (Block JavaScript or VBScript from launching downloaded executable content) be9ba2d9-53ea-4cdc-84e5-9b1eeee46550 - 1 (Block executable content from email client and webmail)" - rationale: "Attack surface reduction helps prevent actions and apps that are typically used by exploitseeking malware to infect machines." - remediation: "To establish the recommended configuration via GP, set the following UI path so that 75668c1f-73b5-4cf0-bb93-3ecf5cb7cc84, 3b576869-a4ec-4529-8536-b80a7769e899, d4f940ab-401b-4efc-aadc-ad5f3c50688a, 92e97fa1-2edf-4476-bdd6-9dd0b4dddc7b, 5beb7efe-fd9a-4556-801d-275e5ffc04cc, d3e037e1-3eb8-44c8-a917-57927947596d, and be9ba2d9-53ea-4cdc-84e5-9b1eeee46550 are each set to a value of 1: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Windows Defender Exploit Guard\\Attack Surface Reduction\\Configure Attack Surface Reduction rules: Set the state for each ASR rule" - compliance: - - cis: "18.9.76.13.1.2" - - cis_csc: "8.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550 -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> !BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> D4F940AB-401B-4EFC-AADC-AD5F3C50688A -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> !D4F940AB-401B-4EFC-AADC-AD5F3C50688A;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> 3B576869-A4EC-4529-8536-B80A7769E899 -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> !3B576869-A4EC-4529-8536-B80A7769E899;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> 75668C1F-73B5-4CF0-BB93-3ECF5CB7CC84 -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> !75668C1F-73B5-4CF0-BB93-3ECF5CB7CC84;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> D3E037E1-3EB8-44C8-A917-57927947596D -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> !D3E037E1-3EB8-44C8-A917-57927947596D;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> 5BEB7EFE-FD9A-4556-801D-275E5FFC04CC -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> !5BEB7EFE-FD9A-4556-801D-275E5FFC04CC;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> 92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules -> !92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B;' - - id: 12212 - title: "Ensure 'Prevent users and apps from accessing dangerous websites' is set to 'Enabled: Block'" - description: "This policy setting controls Windows Defender Exploit Guard network protection." - rationale: "This setting can help prevent employees from using any application to access dangerous domains that may host phishing scams, exploit-hosting sites, and other malicious content on the Internet." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Block: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Windows Defender Exploit Guard\\Network Protection\\Prevent users and apps from accessing dangerous websites" - compliance: - - cis: "18.9.76.13.3.1" - - cis_csc: "7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Network Protection -> EnableNetworkProtection -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Network Protection -> !EnableNetworkProtection;' - - id: 12213 - title: "Ensure 'Turn off Windows Defender AntiVirus' is set to 'Disabled'" - description: "This policy setting turns off Windows Defender Antivirus. If the setting is configured to Disabled, Windows Defender Antivirus runs and computers are scanned for malware and other potentially unwanted software." - rationale: "It is important to ensure a current, updated antivirus product is scanning each computer for malicious file activity. Microsoft provides a competent solution out of the box in Windows Defender Antivirus. Organizations that choose to purchase a reputable 3rd-party antivirus solution may choose to exempt themselves from this recommendation in lieu of the commercial alternative." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Turn off Windows Defender AntiVirus" - compliance: - - cis: "18.9.76.14" - - cis_csc: "8.1, 8.6" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender -> DisableAntiSpyware -> 1;' - - id: 12214 - title: "Ensure 'Prevent users from modifying settings' is set to 'Enabled'" - description: "This policy setting prevent users from making changes to the Exploit protection settings area in the Windows Defender Security Center." - rationale: "Only authorized IT staff should be able to make changes to the exploit protection settings in order to ensure the organizations specific configuration is not modified." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Security Center\\App and browser protection\\Prevent users from modifying settings" - compliance: - - cis: "18.9.79.1.1" - - cis_csc: "8.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\App and Browser protection -> DisallowExploitProtectionOverride -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\App and Browser protection -> !DisallowExploitProtectionOverride;' - - id: 12215 - title: "Ensure 'Configure Windows Defender SmartScreen' is set to 'Enabled: Warn and prevent bypass'" - description: "This policy setting allows you to manage the behavior of Windows SmartScreen. Windows SmartScreen helps keep PCs safer by warning users before running unrecognized programs downloaded from the Internet. Some information is sent to Microsoft about files and programs run on PCs with this feature enabled." - rationale: "Windows SmartScreen helps keep PCs safer by warning users before running unrecognized programs downloaded from the Internet. However, due to the fact that some information is sent to Microsoft about files and programs run on PCs some organizations may prefer to disable it." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Warn and prevent bypass: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender SmartScreen\\Explorer\\Configure Windows Defender SmartScreen" - compliance: - - cis: "18.9.80.1.1" - - cis_csc: "2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnableSmartScreen -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !EnableSmartScreen;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> ShellSmartScreenLevel -> !Block;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !ShellSmartScreenLevel;' - - id: 12216 - title: "Ensure 'Configure Windows Defender SmartScreen' is set to 'Enabled'" - description: "This setting lets you decide whether to turn on SmartScreen Filter. SmartScreen Filter provides warning messages to help protect your employees from potential phishing scams and malicious software." - rationale: "SmartScreen serves an important purpose as it helps to warn users of possible malicious sites and files. Allowing users to turn off this setting can make the browser become more vulnerable to compromise." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender SmartScreen\\Microsoft Edge\\Configure Windows Defender SmartScreen" - compliance: - - cis: "18.9.80.2.1" - - cis_csc: "2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\PhishingFilter -> EnabledV9 -> !1;' - - id: 12217 - title: "Ensure 'Prevent bypassing Windows Defender SmartScreen prompts for files' is set to 'Enabled'" - description: "This setting lets you decide whether employees can override the SmartScreen Filter warnings about downloading unverified files." - rationale: "SmartScreen will warn an employee if a file is potentially malicious. Enabling this setting prevents these warnings from being bypassed." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: In the Windows 10 Release 1703 Administrative Templates the setting was in the following location: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender SmartScreen\\Microsoft Edge\\Prevent bypassing Windows Defender SmartScreen prompts for files In the Windows 10 Release 1709 Administrative Templates the setting was removed from the new location above and left in the old location: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Prevent bypassing Windows Defender SmartScreen prompts for files" - compliance: - - cis: "18.9.80.2.2" - - cis_csc: "7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\PhishingFilter -> PreventOverrideAppRepUnknown -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\PhishingFilter -> !PreventOverrideAppRepUnknown;' - - id: 12218 - title: "Ensure 'Prevent bypassing Windows Defender SmartScreen prompts for sites' is set to 'Enabled'" - description: "This setting lets you decide whether employees can override the SmartScreen Filter warnings about potentially malicious websites." - rationale: "SmartScreen will warn an employee if a website is potentially malicious. Enabling this setting prevents these warnings from being bypassed." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender SmartScreen\\Microsoft Edge\\Prevent bypassing Windows Defender SmartScreen prompts for sites" - compliance: - - cis: "18.9.80.2.3" - - cis_csc: "7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\PhishingFilter -> PreventOverride -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\PhishingFilter -> !PreventOverride;' - - id: 12219 - title: "Ensure 'Enables or disables Windows Game Recording and Broadcasting' is set to 'Disabled'" - description: "This setting enables or disables the Windows Game Recording and Broadcasting features." - rationale: "If this setting is allowed users could record and broadcast session info to external sites which is a privacy concern." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Game Recording and Broadcasting\\Enables or disables Windows Game Recording and Broadcasting" - compliance: - - cis: "18.9.82.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR -> AllowGameDVR -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR -> !AllowGameDVR;' - - id: 12220 - title: "Ensure 'Allow Windows Ink Workspace' is set to 'Enabled: On, but disallow access above lock' OR 'Disabled' but not 'Enabled: On'" - description: "This policy setting determines whether Windows Ink items are allowed above the lock screen." - rationale: "Allowing any apps to be accessed while system is locked is not recommended. If this feature is permitted, it should only be accessible once a user authenticates with the proper credentials." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: On, but disallow access above lock OR Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Ink Workspace\\Allow Windows Ink Workspace" - compliance: - - cis: "18.9.84.2" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsInkWorkspace -> AllowWindowsInkWorkspace -> 2;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsInkWorkspace -> !AllowWindowsInkWorkspace;' - - id: 12221 - title: "Ensure 'Allow user control over installs' is set to 'Disabled'" - description: "This setting controls whether users are permitted to change installation options that typically are available only to system administrators. The security features of Windows Installer normally prevent users from changing installation options that are typically reserved for system administrators, such as specifying the directory to which files are installed. If Windows Installer detects that an installation package has permitted the user to change a protected option, it stops the installation and displays a message. These security features operate only when the installation program is running in a privileged security context in which it has access to directories denied to the user." - rationale: "In an enterprise managed environment, only IT staff with administrative rights should be installing or changing software on a system. Allowing users the ability to have any control over installs can risk unapproved software from being installed or removed from a system, which could cause the system to become vulnerable to compromise." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Allow user control over installs" - compliance: - - cis: "18.9.85.1" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> EnableUserControl -> !0;' - - id: 12222 - title: "Ensure 'Always install with elevated privileges' is set to 'Disabled'" - description: "This setting controls whether or not Windows Installer should use system permissions when it installs any program on the system. Note: This setting appears both in the Computer Configuration and User Configuration folders. To make this setting effective, you must enable the setting in both folders. Caution: If enabled, skilled users can take advantage of the permissions this setting grants to change their privileges and gain permanent access to restricted files and folders. Note that the User Configuration version of this setting is not guaranteed to be secure." - rationale: "Users with limited privileges can exploit this feature by creating a Windows Installer installation package that creates a new local account that belongs to the local built-in Administrators group, adds their current account to the local built-in Administrators group, installs malicious software, or performs other unauthorized activities." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Always install with elevated privileges" - compliance: - - cis: "18.9.85.2" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> AlwaysInstallElevated -> !0;' - - id: 12223 - title: "Ensure 'Sign-in last interactive user automatically after a system-initiated restart' is set to 'Disabled'" - description: "This policy setting controls whether a device will automatically sign-in the last interactive user after Windows Update restarts the system." - rationale: "Disabling this feature will prevent the caching of user's credentials and unauthorized use of the device, and also ensure the user is aware of the restart." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Logon Options\\Sign-in last interactive user automatically after a system-initiated restart" - compliance: - - cis: "18.9.86.1" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> DisableAutomaticRestartSignOn -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> !DisableAutomaticRestartSignOn;' - - id: 12224 - title: "Ensure 'Turn on PowerShell Script Block Logging' is set to 'Disabled'" - description: "This policy setting enables logging of all PowerShell script input to the Microsoft-WindowsPowerShell/Operational event log." - rationale: "There are potential risks of capturing passwords in the PowerShell logs. This setting should only be needed for debugging purposes, and not in normal operation, it is important to ensure this is set to Disabled." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows PowerShell\\Turn on PowerShell Script Block Logging" - compliance: - - cis: "18.9.95.1" - - cis_csc: "16.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging -> EnableScriptBlockLogging -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging -> !EnableScriptBlockLogging;' - - id: 12225 - title: "Ensure 'Turn on PowerShell Transcription' is set to 'Disabled'" - description: "This Policy setting lets you capture the input and output of Windows PowerShell commands into text-based transcripts." - rationale: "If this setting is enabled there is a risk that passwords could get stored in plain text in the PowerShell_transcript output file" - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows PowerShell\\Turn on PowerShell Transcription" - compliance: - - cis: "18.9.95.2" - - cis_csc: "16.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription -> EnableTranscripting -> !0;' - - id: 12226 - title: "Ensure 'Allow Basic authentication' is set to 'Disabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client uses Basic authentication." - rationale: "Basic authentication is less robust than other authentication methods available in WinRM because credentials including passwords are transmitted in plain text. An attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Allow Basic authentication" - compliance: - - cis: "18.9.97.1.1" - - cis_csc: "16.13, 16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowBasic -> !0;' - - id: 12227 - title: "Ensure 'Allow unencrypted traffic' is set to 'Disabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client sends and receives unencrypted messages over the network." - rationale: "Encrypting WinRM network traffic reduces the risk of an attacker viewing or modifying WinRM messages as they transit the network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Allow unencrypted traffic" - compliance: - - cis: "18.9.97.1.2" - - cis_csc: "16.5, 16.13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowUnencryptedTraffic -> !0;' - - id: 12228 - title: "Ensure 'Disallow Digest authentication' is set to 'Enabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client will not use Digest authentication." - rationale: "Digest authentication is less robust than other authentication methods available in WinRM, an attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Disallow Digest authentication" - compliance: - - cis: "18.9.97.1.3" - - cis_csc: "16.5, 16.13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowDigest -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> !AllowDigest;' - - id: 12229 - title: "Ensure 'Allow Basic authentication' is set to 'Disabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service accepts Basic authentication from a remote client." - rationale: "Basic authentication is less robust than other authentication methods available in WinRM because credentials including passwords are transmitted in plain text. An attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow Basic authentication" - compliance: - - cis: "18.9.97.2.1" - - cis_csc: "16.5, 16.13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowBasic -> !0;' - - id: 12230 - title: "Ensure 'Allow unencrypted traffic' is set to 'Disabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service automatically listens on the network for requests on the HTTP transport over the default HTTP port." - rationale: "Any feature is a potential avenue of attack, those that enable inbound network connections are particularly risky. Only enable the use of the Windows Remote Management (WinRM) service on trusted networks and when feasible employ additional controls such as IPsec." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow remote server management through WinRM" - compliance: - - cis: "18.9.97.2.3" - - cis_csc: "3.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowUnencryptedTraffic -> !0;' - - id: 12231 - title: "Ensure 'Disallow WinRM from storing RunAs credentials' is set to 'Enabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service sends and receives unencrypted messages over the network." - rationale: "Encrypting WinRM network traffic reduces the risk of an attacker viewing or modifying WinRM messages as they transit the network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow unencrypted traffic" - compliance: - - cis: "18.9.97.2.4" - - cis_csc: "16.5, 16.13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> DisableRunAs -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> !DisableRunAs;' - - id: 12232 - title: "Ensure 'Manage preview builds' is set to 'Enabled: Disable preview builds'" - description: "This policy setting determines whether users can access the Windows Insider Program controls in Settings -> Update and Security. These controls enable users to make their devices available for downloading and installing preview (beta) builds of Windows software." - rationale: "It can be risky for experimental features to be allowed in an enterprise managed environment because this can introduce bugs and security holes into systems, making it easier for an attacker to gain access. It is generally preferred to only use production-ready builds." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Disable preview builds: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Windows Update for Business\\Manage preview builds" - compliance: - - cis: "18.9.101.1.1" - - cis_csc: "3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> ManagePreviewBuilds -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> !ManagePreviewBuilds;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> ManagePreviewBuildsPolicyValue -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> !ManagePreviewBuildsPolicyValue;' - - id: 12233 - title: "Ensure 'Select when Preview Builds and Feature Updates are received' is set to 'Enabled: Semi-Annual Channel, 180 or more days'" - description: "This policy setting determines the level of Preview Build or Feature Updates to receive, and when. The Windows readiness level for each new Windows 10 Feature Update is classified in one of 5 categories, depending on your organizations level of comfort with receiving them:  Preview Build - Fast: Devices set to this level will be the first to receive new builds of Windows with features not yet available to the general public. Select Fast to participate in identifying and reporting issues to Microsoft, and provide suggestions on new functionality.  Preview Build - Slow: Devices set to this level receive new builds of Windows before they are available to the general public, but at a slower cadence than those set to Fast, and with changes and fixes identified in earlier builds.  Release Preview: Receive builds of Windows just before Microsoft releases them to the general public.  Semi-Annual Channel (Targeted): Receive feature updates when they are released to the general public.  Semi-Annual Channel: Feature updates will arrive when they are declared SemiAnnual Channel. This usually occurs about 4 months after Semi-Annual Channel (Targeted), indicating that Microsoft, Independent Software Vendors (ISVs), partners and customer believe that the release is ready for broad deployment." - rationale: "Forcing new features without prior testing in your environment could cause software incompatibilities as well as introducing new bugs into the operating system. In an enterprise managed environment, it is generally preferred to delay Feature Updates until thorough testing and a deployment plan is in place. This recommendation delays the automatic installation of new features as long as possible." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Semi-Annual Channel, 180 or more days: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Windows Update for Business\\Select when Preview Builds and Feature Updates are received" - compliance: - - cis: "18.9.101.1.2" - - cis_csc: "3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferFeatureUpdates -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> !DeferFeatureUpdates;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferFeatureUpdatesPeriodInDays -> r:10\d;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferFeatureUpdatesPeriodInDays -> r:11\d;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferFeatureUpdatesPeriodInDays -> r:12\d;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferFeatureUpdatesPeriodInDays -> r:13\d;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferFeatureUpdatesPeriodInDays -> r:14\d;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferFeatureUpdatesPeriodInDays -> r:15\d;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferFeatureUpdatesPeriodInDays -> r:16\d;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferFeatureUpdatesPeriodInDays -> r:17\d;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferFeatureUpdatesPeriodInDays -> !r:\d\d\d+;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> !DeferFeatureUpdatesPeriodInDays;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> BranchReadinessLevel -> !32;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> !BranchReadinessLevel;' - - id: 12234 - title: "Ensure 'Select when Quality Updates are received' is set to 'Enabled: 0 days'" - description: "This settings controls when Quality Updates are received." - rationale: "Quality Updates can contain important bug fixes and/or security patches, and should be installed as soon as possible." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled:0 days: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Windows Update for Business\\Select when Quality Updates are received" - compliance: - - cis: "18.9.101.1.3" - - cis_csc: "3.4, 3.5, 4.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferQualityUpdates -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> !DeferQualityUpdates;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> DeferQualityUpdatesPeriodInDays -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -> !DeferQualityUpdatesPeriodInDays;' - - id: 12235 - title: "Ensure 'Configure Automatic Updates' is set to 'Enabled'" - description: "This policy setting specifies whether computers in your environment will receive security updates from Windows Update or WSUS. If you configure this policy setting to Enabled, the operating system will recognize when a network connection is available and then use the network connection to search Windows Update or your designated intranet site for updates that apply to them. After you configure this policy setting to Enabled, select one of the following three options in the Configure Automatic Updates Properties dialog box to specify how the service will work:  2 - Notify for download and auto install (Notify before downloading any updates)  3 - Auto download and notify for install (Download the updates automatically and notify when they are ready to be installed.) (Default setting)  4 - Auto download and schedule the install (Automatically download updates and install them on the schedule specified below.))  5 - Allow local admin to choose setting (Leave decision on above choices up to the local Administrators (Not Recommended))" - rationale: "Although each version of Windows is thoroughly tested before release, it is possible that problems will be discovered after the products are shipped. The Configure Automatic Updates setting can help you ensure that the computers in your environment will always have the most recent critical operating system updates and service packs installed." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Configure Automatic Updates" - compliance: - - cis: "18.9.101.2" - - cis_csc: "3.4, 3.5, 4.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> NoAutoUpdate -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> !NoAutoUpdate;' - - id: 12236 - title: "Ensure 'Configure Automatic Updates: Scheduled install day' is set to '0 - Every day'" - description: "This policy setting specifies when computers in your environment will receive security updates from Windows Update or WSUS." - rationale: "Although each version of Windows is thoroughly tested before release, it is possible that problems will be discovered after the products are shipped. The Configure Automatic Updates setting can help you ensure that the computers in your environment will always have the most recent critical operating system updates and service packs installed." - remediation: "To establish the recommended configuration via GP, set the following UI path to 0 - Every day: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Configure Automatic Updates: Scheduled install day" - compliance: - - cis: "18.9.101.3" - - cis_csc: "3.4, 3.5, 4.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> ScheduledInstallDay -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> !ScheduledInstallDay;' - - id: 12237 - title: "Ensure 'No auto-restart with logged on users for scheduled automatic updates installations' is set to 'Disabled'" - description: "This policy setting specifies that Automatic Updates will wait for computers to be restarted by the users who are logged on to them to complete a scheduled installation." - rationale: "Some security updates require that the computer be restarted to complete an installation. If the computer cannot restart automatically, then the most recent update will not completely install and no new updates will download to the computer until it is restarted. Without the auto-restart functionality, users who are not security-conscious may choose to indefinitely delay the restart, therefore keeping the computer in a less secure state." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\No auto-restart with logged on users for scheduled automatic updates installations" - compliance: - - cis: "18.9.101.4" - - cis_csc: "3.4, 3.5, 4.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> NoAutoRebootWithLoggedOnUsers -> !0;' diff --git a/sca/windows/cis_win10_enterprise_L2.yml b/sca/windows/cis_win10_enterprise_L2.yml new file mode 100644 index 000000000..c92800c22 --- /dev/null +++ b/sca/windows/cis_win10_enterprise_L2.yml @@ -0,0 +1,1159 @@ +# Security Configuration Assessment +# CIS Checks for Windows 10 Enterprise L2 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Benchmark v1.5.0 for Microsoft Windows 10 Release 1803 v1.5.0 - 03-06-2019 + +policy: + id: "cis_win10_enterprise_L2" + file: "cis_win10_enterprise_L2.yml" + name: "CIS benchmark for Windows 10 Enterprise (Release 1803)" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for Microsoft Windows (L2)." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check that the Windows platform is Windows 10" + description: "Requirements for running the CIS benchmark Domain Controller L2 under Windows 10" + condition: all + rules: + - 'r:HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion -> ProductName -> r:^Windows 10' + +checks: +# 2.3 Security Options + - id: 13500 + title: "Ensure 'Devices: Prevent users from installing printer drivers' is set to 'Enabled'" + description: "For a computer to print to a shared printer, the driver for that shared printer must be installed on the local computer. This security setting determines who is allowed to install a printer driver as part of connecting to a shared printer. The recommended state for this setting is: Enabled. Note: This setting does not affect the ability to add a local printer. This setting does not affect Administrators." + rationale: "It may be appropriate in some organizations to allow users to install printer drivers on their own workstations. However, in a high security environment, you should allow only Administrators, not users, to do this, because printer driver installation may unintentionally cause the computer to become less stable. A malicious user could install inappropriate printer drivers in a deliberate attempt to damage the computer, or a user might accidentally install malicious software that masquerades as a printer driver. It is feasible for an attacker to disguise a Trojan horse program as a printer driver. The program may appear to users as if they must use it to print, but such a program could unleash malicious code on your computer network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Devices: Prevent users from installing printer drivers." + compliance: + - cis: ["2.3.4.2"] + - cis_csc: ["5.1"] + references: + - 'CCE-33958-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Providers\LanMan Print Services\Servers -> AddPrinterDrivers -> 1' + + - id: 13501 + title: "Ensure 'Interactive logon: Number of previous logons to cache (in case domain controller is not available)' is set to '4 or fewer logon(s)'" + description: "This policy setting determines whether a user can log on to a Windows domain using cached account information. Logon information for domain accounts can be cached locally to allow users to log on even if a Domain Controller cannot be contacted. This policy setting determines the number of unique users for whom logon information is cached locally. If this value is set to 0, the logon cache feature is disabled. An attacker who is able to access the file system of the server could locate this cached information and use a brute force attack to determine user passwords. The recommended state for this setting is: 4 or fewer logon(s)." + rationale: "The number that is assigned to this policy setting indicates the number of users whose logon information the computer will cache locally. If the number is set to 4, then the computer caches logon information for 4 users. When a 5th user logs on to the computer, the server overwrites the oldest cached logon session. Users who access the computer console will have their logon credentials cached on that computer. An attacker who is able to access the file system of the computer could locate this cached information and use a brute force attack to attempt to determine user passwords. To mitigate this type of attack, Windows encrypts the information and obscures its physical location." + remediation: "To establish the recommended configuration via GP, set the following UI path to 4 or fewer logon(s): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Number of previous logons to cache (in case domain controller is not available)" + compliance: + - cis: ["2.3.7.7"] + - cis_csc: ["16"] + references: + - 'CCE-34901-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> CachedLogonsCount -> n:^(\d+) compare <= 4' + + - id: 13502 + title: "Ensure 'System cryptography: Force strong key protection for user keys stored on the computer' is set to 'User is prompted when the key is first used' or higher" + description: "This policy setting determines whether users' private keys (such as their S-MIME keys) require a password to be used. The recommended state for this setting is: User is prompted when the key is first used. Configuring this setting to User must enter a password each time they use a key also conforms to the benchmark." + rationale: "If a user's account is compromised or their computer is inadvertently left unsecured the malicious user can use the keys stored for the user to access protected resources. You can configure this policy setting so that users must provide a password that is distinct from their domain password every time they use a key. This configuration makes it more difficult for an attacker to access locally stored user keys, even if the attacker takes control of the user's computer and determines their logon password." + remediation: "To establish the recommended configuration via GP, set the following UI path to User is prompted when the key is first used (configuring to User must enter a password each time they use a key also conforms to the benchmark): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System cryptography: Force strong key protection for user keys stored on the computer." + compliance: + - cis: ["2.3.14.1"] + - cis_csc: ["16.14"] + references: + - 'CCE-35007-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Cryptography -> ForceKeyProtection -> n:^(\d+) compare >= 1' + +# 5 System Services + - id: 13503 + title: "Ensure 'Bluetooth Support Service (bthserv)' is set to 'Disabled'" + description: "The Bluetooth service supports discovery and association of remote Bluetooth devices. The recommended state for this setting is: Disabled." + rationale: "Bluetooth technology has inherent security risks - especially prior to the v2.1 standard. Wireless Bluetooth traffic is not well encrypted (if at all), so in a high-security environment, it should not be permitted, in spite of the added inconvenience of not being able to use Bluetooth devices." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Bluetooth Support Service" + compliance: + - cis: ["5.2"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\bthserv -> Start -> 4' + + - id: 13504 + title: "Ensure 'Downloaded Maps Manager (MapsBroker)' is set to 'Disabled'" + description: "Windows service for application access to downloaded maps. This service is started on- demand by application accessing downloaded maps." + rationale: "Mapping technologies can unwillingly reveal your location to attackers and other software that picks up the information. In addition, automatic downloads of data from 3rd-party sources should be minimized when not needed. Therefore this service should not be needed in high security environments." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Downloaded Maps Manager" + compliance: + - cis: ["5.4"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MapsBroker -> Start -> 4' + + - id: 13505 + title: "Ensure 'Geolocation Service (lfsvc)' is set to 'Disabled'" + description: "This service monitors the current location of the system and manages geofences (a geographical location with associated events). The recommended state for this setting is: Disabled." + rationale: "This setting affects the location feature (e.g. GPS or other location tracking). From a security perspective, it's not a good idea to reveal your location to software in most cases, but there are legitimate uses, such as mapping software. However, they should not be used in high security environments." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Geolocation Service" + compliance: + - cis: ["5.5"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lfsvc -> Start -> 4' + + - id: 13506 + title: "Ensure 'Link-Layer Topology Discovery Mapper (lltdsvc)' is set to 'Disabled'" + description: "Creates a Network Map, consisting of PC and device topology (connectivity) information, and metadata describing each PC and device. The recommended state for this setting is: Disabled." + rationale: "The feature that this service enables could potentially be used for unauthorized discovery and connection to network devices. Disabling the service helps to prevent responses to requests for network topology discovery in high security environments." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Link-Layer Topology Discovery Mapper" + compliance: + - cis: ["5.9"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lltdsvc -> Start -> 4' + + - id: 13507 + title: "Ensure 'Microsoft iSCSI Initiator Service (MSiSCSI)' is set to 'Disabled'" + description: "Manages Internet SCSI (iSCSI) sessions from this computer to remote target devices. The recommended state for this setting is: Disabled." + rationale: "This service is critically necessary in order to directly attach to an iSCSI device. However, iSCSI itself uses a very weak authentication protocol (CHAP), which means that the passwords for iSCSI communication are easily exposed, unless all of the traffic is isolated and/or encrypted using another technology like IPsec. This service is generally more appropriate for servers in a controlled environment then on workstations requiring high security." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Microsoft iSCSI Initiator Service" + compliance: + - cis: ["5.12"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSiSCSI -> Start -> 4' + + - id: 13508 + title: "Ensure 'Peer Name Resolution Protocol (PNRPsvc)' is set to 'Disabled'" + description: "Enables serverless peer name resolution over the Internet using the Peer Name Resolution Protocol (PNRP). The recommended state for this setting is: Disabled." + rationale: "Peer Name Resolution Protocol is a distributed and (mostly) serverless way to handle name resolution of clients with each other. In a high security environment, it is more secure to rely on centralized name resolution methods maintained by authorized staff." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Peer Name Resolution Protocol" + compliance: + - cis: ["5.15"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PNRPsvc -> Start -> 4' + + - id: 13509 + title: "Ensure 'Peer Networking Grouping (p2psvc)' is set to 'Disabled'" + description: "Enables multi-party communication using Peer-to-Peer Grouping. The recommended state for this setting is: Disabled." + rationale: "Peer Name Resolution Protocol is a distributed and (mostly) serverless way to handle name resolution of clients with each other. In a high security environment, it is more secure to rely on centralized name resolution methods maintained by authorized staff." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Peer Networking Grouping" + compliance: + - cis: ["5.16"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\p2psvc -> Start -> 4' + + - id: 13510 + title: "Ensure 'Peer Networking Identity Manager (p2pimsvc)' is set to 'Disabled'" + description: "Provides identity services for the Peer Name Resolution Protocol (PNRP) and Peer-to-Peer Grouping services. The recommended state for this setting is: Disabled." + rationale: "Peer Name Resolution Protocol is a distributed and (mostly) serverless way to handle name resolution of clients with each other. In a high security environment, it is more secure to rely on centralized name resolution methods maintained by authorized staff." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Peer Networking Identity Manager" + compliance: + - cis: ["5.17"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\p2pimsvc -> Start -> 4' + + - id: 13511 + title: "Ensure 'PNRP Machine Name Publication Service (PNRPAutoReg)' is set to 'Disabled'" + description: "This service publishes a machine name using the Peer Name Resolution Protocol. Configuration is managed via the netsh context ‘p2p pnrp peer'. The recommended state for this setting is: Disabled." + rationale: "Peer Name Resolution Protocol is a distributed and (mostly) serverless way to handle name resolution of clients with each other. In a high security environment, it is more secure to rely on centralized name resolution methods maintained by authorized staff." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\PNRP Machine Name Publication Service" + compliance: + - cis: ["5.18"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PNRPAutoReg -> Start -> 4' + + - id: 13512 + title: "Ensure 'Problem Reports and Solutions Control Panel Support (wercplsupport)' is set to 'Disabled'" + description: "This service provides support for viewing, sending and deletion of system-level problem reports for the Problem Reports and Solutions control panel. The recommended state for this setting is: Disabled." + rationale: "This service is involved in the process of displaying/reporting issues & solutions to/from Microsoft. In a high security environment, preventing this information from being sent can help reduce privacy concerns for sensitive corporate information." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Problem Reports and Solutions Control Panel Support" + compliance: + - cis: ["5.19"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wercplsupport -> Start -> 4' + + - id: 13513 + title: "Ensure 'Remote Access Auto Connection Manager (RasAuto)' is set to 'Disabled'" + description: "Creates a connection to a remote network whenever a program references a remote DNS or NetBIOS name or address." + rationale: "The function of this service is to provide a \"demand dial\" type of functionality. In a high security environment, it is preferred that any remote \"dial\" connections (whether they be legacy dial-in POTS or VPN) are initiated by the user, not automatically by the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Remote Access Auto Connection Manager" + compliance: + - cis: ["5.20"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasAuto -> Start -> 4' + + - id: 13514 + title: "Ensure 'Remote Desktop Configuration (SessionEnv)' is set to 'Disabled'" + description: "Remote Desktop Configuration service (RDCS) is responsible for all Remote Desktop related configuration and session maintenance activities that require SYSTEM context. These include per-session temporary folders, RD themes, and RD certificates. The recommended state for this setting is: Disabled." + rationale: "In a high security environment, Remote Desktop access is an increased security risk. For these environments, only local console access should be permitted." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Remote Desktop Configuration" + compliance: + - cis: ["5.21"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SessionEnv -> Start -> 4' + + - id: 13515 + title: "Ensure 'Remote Desktop Services (TermService)' is set to 'Disabled'" + description: "Allows users to connect interactively to a remote computer. Remote Desktop and Remote Desktop Session Host Server depend on this service. The recommended state for this setting is: Disabled." + rationale: "In a high security environment, Remote Desktop access is an increased security risk. For these environments, only local console access should be permitted." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Remote Desktop Services" + compliance: + - cis: ["5.22"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermService -> Start -> 4' + + - id: 13516 + title: "Ensure 'Remote Desktop Services UserMode Port Redirector (UmRdpService)' is set to 'Disabled'" + description: "Allows the redirection of Printers/Drives/Ports for RDP connections. The recommended state for this setting is: Disabled." + rationale: "In a security-sensitive environment, it is desirable to reduce the possible attack surface - preventing the redirection of COM, LPT and PnP ports will reduce the number of unexpected avenues for data exfiltration and/or malicious code transfer within an RDP session." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Remote Desktop Services UserMode Port Redirector" + compliance: + - cis: ["5.23"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UmRdpService -> Start -> 4' + + - id: 13517 + title: "Ensure 'Remote Registry (RemoteRegistry)' is set to 'Disabled'" + description: "Enables remote users to modify registry settings on this computer. The recommended state for this setting is: Disabled." + rationale: "In a high security environment, exposing the registry to remote access is an increased security risk." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Remote Registry" + compliance: + - cis: ["5.25"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RemoteRegistry -> Start -> 4' + + - id: 13518 + title: "Ensure 'Server (LanmanServer)' is set to 'Disabled'" + description: "Supports file, print, and named-pipe sharing over the network for this computer. If this service is stopped, these functions will be unavailable. The recommended state for this setting is: Disabled." + rationale: "In a high security environment, a secure workstation should only be a client, not a server. Sharing workstation resources for remote access increases security risk as the attack surface is notably higher." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Server" + compliance: + - cis: ["5.27"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer -> Start -> 4' + + - id: 13519 + title: "Ensure 'SNMP Service (SNMP)' is set to 'Disabled' or 'Not Installed'" + description: "Enables Simple Network Management Protocol (SNMP) requests to be processed by this computer. The recommended state for this setting is: Disabled or Not Installed. Note: This service is not installed by default. It is supplied with Windows, but is installed by enabling an optional Windows feature (Simple Network Management Protocol (SNMP))." + rationale: "Features that enable inbound network connections increase the attack surface. In a high security environment, management of secure workstations should be handled locally." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\SNMP Service" + compliance: + - cis: ["5.29"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP -> Start -> 4' + + - id: 13520 + title: "Ensure 'Windows Error Reporting Service (WerSvc)' is set to 'Disabled'" + description: "Allows errors to be reported when programs stop working or responding and allows existing solutions to be delivered. Also allows logs to be generated for diagnostic and repair services. The recommended state for this setting is: Disabled." + rationale: "If a Windows Error occurs in a secure, enterprise managed environment, the error should be reported directly to IT staff for troubleshooting and remediation. There is no benefit to the corporation to report these errors directly to Microsoft, and there is some risk of unknowingly exposing sensitive data as part of the error." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Windows Error Reporting Service" + compliance: + - cis: ["5.33"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WerSvc -> Start -> 4' + + - id: 13521 + title: "Ensure 'Windows Event Collector (Wecsvc)' is set to 'Disabled'" + description: "This service manages persistent subscriptions to events from remote sources that support WS-Management protocol. This includes Windows Vista event logs, hardware and IPMI- enabled event sources. The service stores forwarded events in a local Event Log. The recommended state for this setting is: Disabled." + rationale: "In a high security environment, remote connections to secure workstations should be minimized, and management functions should be done locally." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Windows Event Collector" + compliance: + - cis: ["5.34"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Wecsvc -> Start -> 4' + + - id: 13522 + title: "Ensure 'Windows Push Notifications System Service (WpnService)' is set to 'Disabled'" + description: "This service runs in session 0 and hosts the notification platform and connection provider which handles the connection between the device and WNS server. The recommended state for this setting is: Disabled. Note: In the first two releases of Windows 10 (R1507 & R1511), the display name of this service was initially named Windows Push Notifications Service - but it was renamed to Windows Push Notifications System Service starting with Windows 10 R1607." + rationale: "Windows Push Notification Services (WNS) is a mechanism to receive 3rd-party notifications and updates from the cloud/Internet. In a high security environment, external systems, especially those hosted outside the organization, should be prevented from having an impact on the secure workstations." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Windows Push Notifications System Service" + compliance: + - cis: ["5.37"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WpnService -> Start -> 4' + + - id: 13523 + title: "Ensure 'Windows PushToInstall Service (PushToInstall)' is set to 'Disabled'" + description: "This service manages Apps that are pushed to the device from the Windows Store App running on other devices or the web. The recommended state for this setting is: Disabled." + rationale: "In a high security managed environment, application installations should be managed centrally by IT staff, not by end users." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Windows PushToInstall Service (PushToInstall)" + compliance: + - cis: ["5.38"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PushToInstall -> Start -> 4' + + - id: 13524 + title: "Ensure 'Windows Remote Management (WS-Management) (WinRM)' is set to 'Disabled'" + description: "Windows Remote Management (WinRM) service implements the WS-Management protocol for remote management. WS-Management is a standard web services protocol used for remote software and hardware management. The WinRM service listens on the network for WS-Management requests and processes them. The recommended state for this setting is: Disabled." + rationale: "Features that enable inbound network connections increase the attack surface. In a high security environment, management of secure workstations should be handled locally." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Windows Remote Management (WS-Management)" + compliance: + - cis: ["5.39"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinRM -> Start -> 4' + +# 18.1 Control Panel + - id: 13525 + title: "Ensure 'Allow Online Tips' is set to 'Disabled'" + description: "This policy setting configures the retrieval of online tips and help for the Settings app. The recommended state for this setting is: Disabled." + rationale: "Due to privacy concerns, data should never be sent to any 3rd party since this data could contain sensitive information." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Allow Online Tips Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ControlPanel.admx/adml that is included with the Microsoft Windows 10 Release 1709 Administrative Templates (or newer)." + compliance: + - cis: ["18.1.3"] + - cis_csc: ["9.1"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> AllowOnlineTips -> 0' + +# 18.4 MSS (Legacy) + - id: 13526 + title: "Ensure 'MSS: (DisableSavePassword) Prevent the dial-up password from being saved' is set to 'Enabled'" + description: "When you dial a phonebook or VPN entry in Dial-Up Networking, you can use the \"Save Password\" option so that your Dial-Up Networking password is cached and you will not need to enter it on successive dial attempts. For security, administrators may want to prevent users from caching passwords. The recommended state for this setting is: Enabled." + rationale: "An attacker who steals a mobile user's computer could automatically connect to the organization's network if the Save This Password check box is selected for the dial-up or VPN networking entry used to connect to your organization's network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(DisableSavePassword) Prevent the dial-up password from being saved. Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.4"] + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasMan\Parameters -> DisableSavePassword -> 1' + + - id: 13527 + title: "Ensure 'MSS: (KeepAliveTime) How often keep-alive packets are sent in milliseconds' is set to 'Enabled: 300,000 or 5 minutes (recommended)'" + description: "This value controls how often TCP attempts to verify that an idle connection is still intact by sending a keep-alive packet. If the remote computer is still reachable, it acknowledges the keep-alive packet. The recommended state for this setting is: Enabled: 300,000 or 5 minutes (recommended)." + rationale: "An attacker who is able to connect to network applications could establish numerous connections to cause a DoS condition." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 300,000 or 5 minutes (recommended): Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (KeepAliveTime) How often keep-alive packets are sent in milliseconds. Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.6"] + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-35469-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> KeepAliveTime -> 493e0' + + - id: 13528 + title: "Ensure 'MSS: (PerformRouterDiscovery) Allow IRDP to detect and configure Default Gateway addresses (could lead to DoS)' is set to 'Disabled'" + description: "This setting is used to enable or disable the Internet Router Discovery Protocol (IRDP), which allows the system to detect and configure default gateway addresses automatically as described in RFC 1256 on a per-interface basis. The recommended state for this setting is: Disabled." + rationale: "An attacker who has gained control of a computer on the same network segment could configure a computer on the network to impersonate a router. Other computers with IRDP enabled would then attempt to route their traffic through the already compromised computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (PerformRouterDiscovery) Allow IRDP to detect and configure Default Gateway addresses (could lead to DoS). Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.8"] + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-34614-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> PerformRouterDiscovery -> 0' + + - id: 13529 + title: "Ensure 'MSS: (TcpMaxDataRetransmissions IPv6) How many times unacknowledged data is retransmitted' is set to 'Enabled: 3'" + description: "This setting controls the number of times that TCP retransmits an individual data segment (non-connect segment) before the connection is aborted. The retransmission time-out is doubled with each successive retransmission on a connection. It is reset when responses resume. The base time-out value is dynamically determined by the measured round-trip time on the connection. The recommended state for this setting is: Enabled: 3." + rationale: "A malicious user could exhaust a target computer's resources if it never sent any acknowledgment messages for data that was transmitted by the target computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 3: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(TcpMaxDataRetransmissions IPv6) How many times unacknowledged data is retransmitted. Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.11"] + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-34622-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> TcpMaxDataRetransmissions -> 3' + + - id: 13530 + title: "Ensure 'MSS: (TcpMaxDataRetransmissions) How many times unacknowledged data is retransmitted' is set to 'Enabled: 3'" + description: "This setting controls the number of times that TCP retransmits an individual data segment (non-connect segment) before the connection is aborted. The retransmission time-out is doubled with each successive retransmission on a connection. It is reset when responses resume. The base time-out value is dynamically determined by the measured round-trip time on the connection. The recommended state for this setting is: Enabled: 3." + rationale: "A malicious user could exhaust a target computer's resources if it never sent any acknowledgment messages for data that was transmitted by the target computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 3: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(TcpMaxDataRetransmissions) How many times unacknowledged data is retransmitted. Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.12"] + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-34623-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> TcpMaxDataRetransmissions -> 3' + +# 18.5 Network + - id: 13531 + title: "Ensure 'Enable Font Providers' is set to 'Disabled'" + description: "This policy setting determines whether Windows is allowed to download fonts and font catalog data from an online font provider. The recommended state for this setting is: Disabled." + rationale: "In an enterprise managed environment the IT department should be managing the changes to the system configuration, to ensure all changes are tested and approved." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Fonts\\Enable Font Providers Note: This Group Policy path may not exist by default. It is provided by the Group Policy template GroupPolicy.admx/adml that is included with the Microsoft Windows 10 Release 1607 & Server 2016 Administrative Templates (or newer)." + compliance: + - cis: ["18.5.5.1"] + - cis_csc: ["3", "13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnableFontProviders -> 0' + + - id: 13532 + title: "Ensure 'Turn on Mapper I/O (LLTDIO) driver' is set to 'Disabled'" + description: "This policy setting changes the operational behavior of the Mapper I/O network protocol driver. LLTDIO allows a computer to discover the topology of a network it's connected to. It also allows a computer to initiate Quality-of-Service requests such as bandwidth estimation and network health analysis. The recommended state for this setting is: Disabled." + rationale: "To help protect from potentially discovering and connecting to unauthorized devices, this setting should be disabled to prevent responding to network traffic for network topology discovery." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Link-Layer Topology Discovery\\Turn on Mapper I/O (LLTDIO) driver. Note: This Group Policy path is provided by the Group Policy template LinkLayerTopologyDiscovery.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.5.9.1"] + - cis_csc: ["9"] + references: + - 'CCE-34262-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowLLTDIOOnDomain -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowLLTDIOOnPublicNet -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> EnableLLTDIO -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> ProhibitLLTDIOOnPrivateNet -> 0' + + - id: 13533 + title: "Ensure 'Turn on Responder (RSPNDR) driver' is set to 'Disabled'" + description: "This policy setting changes the operational behavior of the Responder network protocol driver. The Responder allows a computer to participate in Link Layer Topology Discovery requests so that it can be discovered and located on the network. It also allows a computer to participate in Quality-of-Service activities such as bandwidth estimation and network health analysis. The recommended state for this setting is: Disabled." + rationale: "To help protect from potentially discovering and connecting to unauthorized devices, this setting should be disabled to prevent responding to network traffic for network topology discovery." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Link-Layer Topology Discovery\\Turn on Responder (RSPNDR) driver Note: This Group Policy path is provided by the Group Policy template LinkLayerTopologyDiscovery.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.5.9.2"] + - cis_csc: ["9"] + references: + - 'CCE-34073-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowRspndrOnDomain -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowRspndrOnPublicNet -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> EnableRspndr -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> ProhibitRspndrOnPrivateNet -> 0' + + - id: 13534 + title: "Ensure 'Turn off Microsoft Peer-to-Peer Networking Services' is set to 'Enabled'" + description: "The Peer Name Resolution Protocol (PNRP) allows for distributed resolution of a name to an IPv6 address and port number. The protocol operates in the context of clouds. A cloud is a set of peer computers that can communicate with each other by using the same IPv6 scope. Peer-to-Peer protocols allow for applications in the areas of RTC, collaboration, content distribution and distributed processing. The recommended state for this setting is: Enabled." + rationale: "This setting enhances the security of the environment and reduces the overall risk exposure related to peer-to-peer networking." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Microsoft Peer-to-Peer Networking Services\\Turn off Microsoft Peer-to-Peer Networking Services. Note: This Group Policy path is provided by the Group Policy template P2P- pnrp.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.5.10.2"] + - cis_csc: ["9.1", "9.2"] + references: + - 'CCE-33208-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Peernet -> Disabled -> 1' + + - id: 13535 + title: "Disable IPv6 (Ensure TCPIP6 Parameter 'DisabledComponents' is set to '0xff (255)')" + description: "Internet Protocol version 6 (IPv6) is a set of protocols that computers use to exchange information over the Internet and over home and business networks. IPv6 allows for many more IP addresses to be assigned than IPv4 did. Older networking, hosts and operating systems may not support IPv6 natively. The recommended state for this setting is: DisabledComponents - 0xff (255)" + rationale: "Since the vast majority of private enterprise managed networks have no need to utilize IPv6 (because they have access to private IPv4 addressing), disabling IPv6 components reduces a possible attack surface that is also harder to monitor the traffic on. As a result, we recommend configuring IPv6 to a Disabled state when it is not needed." + remediation: "To establish the recommended configuration, set the following Registry value to 0xff (255) (DWORD): HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\TCPIP6\\Parameters:Disabl edComponents Note: This change does not take effect until the computer has been restarted. Note #2: Although Microsoft does not provide an ADMX template to configure this registry value, a custom .ADM template (Disable-IPv6-Components-KB929852.adm) is provided in the CIS Benchmark Remediation Kit to facilitate its configuration. Be aware though that simply turning off the group policy setting in the .ADM template will not \"undo\" the change once applied. Instead, the opposite setting must be applied to change the registry value to the opposite state." + compliance: + - cis: ["18.5.19.2.1"] + - cis_csc: ["9"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> DisabledComponents -> ff' + + - id: 13536 + title: "Ensure 'Configuration of wireless settings using Windows Connect Now' is set to 'Disabled'" + description: "This policy setting allows the configuration of wireless settings using Windows Connect Now (WCN). The WCN Registrar enables the discovery and configuration of devices over Ethernet (UPnP) over in-band 802.11 Wi-Fi through the Windows Portable Device API (WPD) and via USB Flash drives. Additional options are available to allow discovery and configuration over a specific medium. The recommended state for this setting is: Disabled." + rationale: "This setting enhances the security of the environment and reduces the overall risk exposure related to user configuration of wireless settings." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Windows Connect Now\\Configuration of wireless settings using Windows Connect Now Note: This Group Policy path is provided by the Group Policy template WindowsConnectNow.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.5.20.1"] + - cis_csc: ["15.4", "15.5"] + references: + - 'CCE-34326-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> EnableRegistrars -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableUPnPRegistrar -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableInBand802DOT11Registrar -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableFlashConfigRegistrar -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableWPDRegistrar -> 0' + + - id: 13537 + title: "Ensure 'Prohibit access of the Windows Connect Now wizards' is set to 'Enabled'" + description: "This policy setting prohibits access to Windows Connect Now (WCN) wizards. The recommended state for this setting is: Enabled." + rationale: "Allowing standard users to access the Windows Connect Now wizard increases the risk and attack surface." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network\\Windows Connect Now\\Prohibit access of the Windows Connect Now wizards Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsConnectNow.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.5.20.2"] + - cis_csc: ["15.4", "15.5"] + references: + - 'CCE-35606-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\UI -> DisableWcnUi -> 1' + +# 18.8 System + - id: 13538 + title: "Ensure 'Turn off access to the Store' is set to 'Enabled'" + description: "This policy setting specifies whether to use the Store service for finding an application to open a file with an unhandled file type or protocol association. When a user opens a file type or protocol that is not associated with any applications on the computer, the user is given the choice to select a local application or use the Store service to find an application. The recommended state for this setting is: Enabled." + rationale: "The Store service is a retail outlet built into Windows, primarily for consumer use. In an enterprise managed environment the IT department should be managing the installation of all applications to reduce the risk of the installation of vulnerable software." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off access to the Store. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ICM.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.22.1.1"] + - cis_csc: ["2"] + references: + - 'CCE-35626-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoUseStoreOpenWith -> 1' + + - id: 13539 + title: "Ensure 'Turn off downloading of print drivers over HTTP' is set to 'Enabled'" + description: "This policy setting controls whether the computer can download print driver packages over HTTP. To set up HTTP printing, printer drivers that are not available in the standard operating system installation might need to be downloaded over HTTP. The recommended state for this setting is: Enabled." + rationale: "Users might download drivers that include malicious code." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off downloading of print drivers over HTTP." + compliance: + - cis: ["18.8.22.1.2"] + - cis_csc: ["7"] + references: + - 'CCE-35781-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers -> DisableWebPnPDownload -> 1' + + - id: 13540 + title: "Ensure 'Turn off handwriting personalization data sharing' is set to 'Enabled'" + description: "This setting turns off data sharing from the handwriting recognition personalization tool. The handwriting recognition personalization tool enables Tablet PC users to adapt handwriting recognition to their own writing style by providing writing samples. The tool can optionally share user writing samples with Microsoft to improve handwriting recognition in future versions of Windows. The tool generates reports and transmits them to Microsoft over a secure connection. The recommended state for this setting is: Enabled." + rationale: "A person's handwriting is Personally Identifiable Information (PII), especially when it comes to your signature. As such, it is unacceptable in many environments to automatically upload PII to a website without explicit approval by the user." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off handwriting personalization data sharing Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ShapeCollector.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.8.22.1.3"] + - cis_csc: ["13"] + references: + - 'CCE-32945-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\TabletPC -> PreventHandwritingDataSharing -> 1' + + - id: 13541 + title: "Ensure 'Turn off handwriting recognition error reporting' is set to 'Enabled'" + description: "Turns off the handwriting recognition error reporting tool. The handwriting recognition error reporting tool enables users to report errors encountered in Tablet PC Input Panel. The tool generates error reports and transmits them to Microsoft over a secure connection. Microsoft uses these error reports to improve handwriting recognition in future versions of Windows. The recommended state for this setting is: Enabled." + rationale: "A person's handwriting is Personally Identifiable Information (PII), especially when it comes to your signature. As such, it is unacceptable in many environments to automatically upload PII to a website without explicit approval by the user." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off handwriting recognition error reporting. Note: This Group Policy path is provided by the Group Policy template InkWatson.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.4"] + - cis_csc: ["13"] + references: + - 'CCE-35784-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HandwritingErrorReports -> PreventHandwritingErrorReports -> 1' + + - id: 13542 + title: "Ensure 'Turn off Internet Connection Wizard if URL connection is referring to Microsoft.com' is set to 'Enabled'" + description: "This policy setting specifies whether the Internet Connection Wizard can connect to Microsoft to download a list of Internet Service Providers (ISPs). The recommended state for this setting is: Enabled." + rationale: "In an enterprise managed environment we want to lower the risk of a user unknowingly exposing sensitive data." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Internet Connection Wizard if URL connection is referring to Microsoft.com. Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.5"] + - cis_csc: ["13"] + references: + - 'CCE-33153-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Internet Connection Wizard -> ExitOnMSICW -> 1' + + - id: 13543 + title: "Ensure 'Turn off Registration if URL connection is referring to Microsoft.com' is set to 'Enabled'" + description: "This policy setting specifies whether the Windows Registration Wizard connects to Microsoft.com for online registration. The recommended state for this setting is: Enabled." + rationale: "Users in an enterprise managed environment should not be registering their own copies of Windows, providing their own PII in the process." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Registration if URL connection is referring to Microsoft.com. Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.8"] + references: + - 'CCE-33216-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Policies\Microsoft\Windows\Registration Wizard Control -> NoRegistration -> 1' + + - id: 13544 + title: "Ensure 'Turn off Search Companion content file updates' is set to 'Enabled'" + description: "This policy setting specifies whether Search Companion should automatically download content updates during local and Internet searches. The recommended state for this setting is: Enabled." + rationale: "There is a small risk that users will unknowingly reveal sensitive information because of the topics they are searching for. This risk is very low because even if this setting is enabled users still must submit search queries to the desired search engine in order to perform searches." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Search Companion content file updates. Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.9"] + - cis_csc: ["13"] + references: + - 'CCE-33817-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SearchCompanion -> DisableContentFileUpdates -> 1' + + - id: 13545 + title: "Ensure 'Turn off the \"Order Prints\" picture task' is set to 'Enabled'" + description: "This policy setting specifies whether the \"Order Prints Online\" task is available from Picture Tasks in Windows folders. The Order Prints Online Wizard is used to download a list of providers and allow users to order prints online. The recommended state for this setting is: Enabled." + rationale: "In an enterprise managed environment we want to lower the risk of a user unknowingly exposing sensitive data." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the \"Order Prints\" picture task. Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.10"] + - cis_csc: ["13"] + references: + - 'CCE-34061-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoOnlinePrintsWizard -> 1' + + - id: 13546 + title: "Ensure 'Turn off the \"Publish to Web\" task for files and folders' is set to 'Enabled'" + description: "This policy setting specifies whether the tasks Publish this file to the Web, Publish this folder to the Web, and Publish the selected items to the Web are available from File and Folder Tasks in Windows folders. The Web Publishing wizard is used to download a list of providers and allow users to publish content to the Web. The recommended state for this setting is: Enabled." + rationale: "Users may publish confidential or sensitive information to a public service outside of the control of the organization." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the \"Publish to Web\" task for files and folders Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.11"] + - cis_csc: ["13"] + references: + - 'CCE-33246-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoPublishingWizard -> 1' + + - id: 13547 + title: "Ensure 'Turn off the Windows Messenger Customer Experience Improvement Program' is set to 'Enabled'" + description: "This policy setting specifies whether Windows Messenger can collect anonymous information about how the Windows Messenger software and service is used. Microsoft uses information collected through the Customer Experience Improvement Program to detect software flaws so that they can be corrected more quickly, enabling this setting will reduce the amount of data Microsoft is able to gather for this purpose. The recommended state for this setting is: Enabled." + rationale: "Large enterprise managed environments may not want to have information collected by Microsoft from managed client computers." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the Windows Messenger Customer Experience Improvement Program. Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.12"] + - cis_csc: ["13"] + references: + - 'CCE-33957-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Messenger\Client -> CEIP -> 2' + + - id: 13548 + title: "Ensure 'Turn off Windows Customer Experience Improvement Program' is set to 'Enabled'" + description: "This policy setting specifies whether Windows Messenger can collect anonymous information about how the Windows Messenger software and service is used. Microsoft uses information collected through the Windows Customer Experience Improvement Program to detect software flaws so that they can be corrected more quickly, enabling this setting will reduce the amount of data Microsoft is able to gather for this purpose. The recommended state for this setting is: Enabled." + rationale: "Large enterprise managed environments may not want to have information collected by Microsoft from managed client computers." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Windows Customer Experience Improvement Program. Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.13"] + - cis_csc: ["13"] + references: + - 'CCE-33255-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SQMClient\Windows -> CEIPEnable -> 0' + + - id: 13549 + title: "Ensure 'Turn off Windows Error Reporting' is set to 'Enabled'" + description: "This policy setting controls whether or not errors are reported to Microsoft. Error Reporting is used to report information about a system or application that has failed or has stopped responding and is used to improve the quality of the product. The recommended state for this setting is: Enabled." + rationale: "If a Windows Error occurs in a secure, enterprise managed environment, the error should be reported directly to IT staff for troubleshooting and remediation. There is no benefit to the corporation to report these errors directly to Microsoft, and there is some risk of unknowingly exposing sensitive data as part of the error." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Windows Error Reporting. Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.14"] + - cis_csc: ["13"] + references: + - 'CCE-34260-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> Disabled -> 1' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PCHealth\ErrorReporting -> DoReport -> 0' + + - id: 13550 + title: "Ensure 'Support device authentication using certificate' is set to 'Enabled: Automatic'" + description: "This policy setting allows you to set support for Kerberos to attempt authentication using the certificate for the device to the domain. Support for device authentication using certificate will require connectivity to a DC in the device account domain which supports certificate authentication for computer accounts. The recommended state for this setting is: Enabled: Automatic." + rationale: "Having stronger device authentication with the use of certificates is strongly encouraged over standard username and password authentication. Having this set to Automatic will allow certificate based authentication to be used whenever possible." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Automatic: Computer Configuration\\Policies\\Administrative Templates\\System\\Kerberos\\Support device authentication using certificate. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Kerberos.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.25.1"] + - cis_csc: ["1.6", "1.8"] + references: + - 'CCE-41396-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\kerberos\parameters -> DevicePKInitBehavior -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\kerberos\parameters -> DevicePKInitEnabled -> 1' + + - id: 13551 + title: "Ensure 'Disallow copying of user input methods to the system account for sign-in' is set to 'Enabled'" + description: "This policy prevents automatic copying of user input methods to the system account for use on the sign-in screen. The user is restricted to the set of input methods that are enabled in the system account. The recommended state for this setting is: Enabled." + rationale: "This is a way to increase the security of the system account." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Locale Services\\Disallow copying of user input methods to the system account for sign-in Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Globalization.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.26.1"] + - cis_csc: ["16.5", "16.11"] + references: + - 'CCE-35101-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Control Panel\International -> BlockUserInputMethodsForSignIn -> 1' + + - id: 13552 + title: "Ensure 'Microsoft Support Diagnostic Tool: Turn on MSDT interactive communication with support provider' is set to 'Disabled'" + description: "This policy setting configures Microsoft Support Diagnostic Tool (MSDT) interactive communication with the support provider. MSDT gathers diagnostic data for analysis by support professionals. The recommended state for this setting is: Disabled." + rationale: "Due to privacy concerns, data should never be sent to any 3rd party since this data could contain sensitive information." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Troubleshooting and Diagnostics\\Microsoft Support Diagnostic Tool\\Microsoft Support Diagnostic Tool: Turn on MSDT interactive communication with support provider. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MSDT.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.44.5.1"] + - cis_csc: ["13"] + references: + - 'CCE-34972-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\ScriptedDiagnosticsProvider\Policy -> DisableQueryRemoteServer -> 0' + + - id: 13553 + title: "Ensure 'Enable/Disable PerfTrack' is set to 'Disabled'" + description: "This policy setting specifies whether to enable or disable tracking of responsiveness events. The recommended state for this setting is: Disabled." + rationale: "When enabled the aggregated data of a given event will be transmitted to Microsoft. The option exists to restrict this feature for a specific user, set the consent level, and designate specific programs for which error reports could be sent. However, centrally restricting the ability to execute PerfTrack to limit the potential for unauthorized or undesired usage, data leakage, or unintentional communications is highly recommended." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Troubleshooting and Diagnostics\\Windows Performance PerfTrack\\Enable/Disable PerfTrack. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template PerformancePerftrack.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.8.44.11.1"] + - cis_csc: ["13"] + references: + - 'CCE-33662-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WDI\{9c5a40da-b965-4fc3-8781-88dd50a6299d} -> ScenarioExecutionEnabled -> 0' + + - id: 13554 + title: "Ensure 'Turn off the advertising ID' is set to 'Enabled'" + description: "This policy setting turns off the advertising ID, preventing apps from using the ID for experiences across apps. The recommended state for this setting is: Enabled." + rationale: "Tracking user activity for advertising purposes, even anonymously, may be a privacy concern. In an enterprise managed environment, applications should not need or require tracking for targeted advertising." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\User Profiles\\Turn off the advertising ID Note: This Group Policy path may not exist by default. It is provided by the Group Policy template UserProfiles.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.8.46.1"] + - cis_csc: ["13"] + references: + - 'CCE-33823-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo -> DisabledByGroupPolicy -> 1' + + - id: 13555 + title: "Ensure 'Enable Windows NTP Client' is set to 'Enabled'" + description: "This policy setting specifies whether the Windows NTP Client is enabled. Enabling the Windows NTP Client allows your computer to synchronize its computer clock with other NTP servers. You might want to disable this service if you decide to use a third-party time provider. The recommended state for this setting is: Enabled." + rationale: "A reliable and accurate account of time is important for a number of services and security requirements, including but not limited to distributed applications, authentication services, multi-user databases and logging services. The use of an NTP client (with secure operation) establishes functional accuracy and is a focal point when reviewing security relevant events." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Windows Time Service\\Time Providers\\Enable Windows NTP Client. Note: This Group Policy path is provided by the Group Policy template W32Time.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.49.1.1"] + - cis_csc: ["6.1"] + references: + - 'CCE-33661-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\W32Time\TimeProviders\NtpClient -> Enabled -> 1' + + - id: 13556 + title: "Ensure 'Enable Windows NTP Server' is set to 'Disabled'" + description: "This policy setting allows you to specify whether the Windows NTP Server is enabled. The recommended state for this setting is: Disabled." + rationale: "The configuration of proper time synchronization is critically important in an enterprise managed environment both due to the sensitivity of Kerberos authentication timestamps and also to ensure accurate security logging." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Windows Time Service\\Time Providers\\Enable Windows NTP Server. Note: This Group Policy path is provided by the Group Policy template W32Time.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.49.1.2"] + - cis_csc: ["9.1", "9.2"] + references: + - 'CCE-35135-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\W32Time\TimeProviders\NtpServer -> Enabled -> 0' + +# 18.9 Windows Components + - id: 13557 + title: "Ensure 'Allow a Windows app to share application data between users' is set to 'Disabled'" + description: "Manages a Windows app's ability to share data between users who have installed the app. Data is shared through the SharedLocal folder. This folder is available through the Windows.Storage API. The recommended state for this setting is: Disabled." + rationale: "Users of a system could accidentally share sensitive data with other users on the same system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\App Package Deployment\\Allow a Windows app to share application data between users. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AppxPackageManager.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." + compliance: + - cis: ["18.9.4.1"] + - cis_csc: ["14.4", "14.6"] + references: + - 'CCE-41397-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\AppModel\StateManager -> AllowSharedLocalAppData -> 0' + + - id: 13558 + title: "Ensure 'Allow Use of Camera' is set to 'Disabled'" + description: "This policy setting controls whether the use of Camera devices on the machine are permitted. The recommended state for this setting is: Disabled." + rationale: "Cameras in a high security environment can pose serious privacy and data exfiltration risks - they should be disabled to help mitigate that risk." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Camera\\Allow Use of Camera Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Camera.admx/adml that is included with the Microsoft Windows 10 Release 1607 & Server 2016 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.12.1"] + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Camera -> AllowCamera -> 0' + + - id: 13559 + title: "Ensure 'Configure Authenticated Proxy usage for the Connected User Experience and Telemetry service' is set to 'Enabled: Disable Authenticated Proxy usage'" + description: "This policy setting controls whether the Connected User Experience and Telemetry service can automatically use an authenticated proxy to send data back to Microsoft. The recommended state for this setting is: Enabled: Disable Authenticated Proxy usage." + rationale: "Sending any data to a 3rd party vendor is a security concern and should only be done on an as needed basis." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Disable Authenticated Proxy usage: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Configure Authenticated Proxy usage for the Connected User Experience and Telemetry service. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template DataCollection.admx/adml that is included with the Microsoft Windows 10 Release 1703 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.16.2"] + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection -> DisableEnterpriseAuthProxy -> 1' + + - id: 13560 + title: "Ensure 'Turn off location' is set to 'Enabled'" + description: "This policy setting turns off the location feature for the computer. The recommended state for this setting is: Enabled." + rationale: "This setting affects the location feature (e.g. GPS or other location tracking). From a security perspective, it's not a good idea to reveal your location to software in most cases, but there are legitimate uses, such as mapping software. However, they should not be used in high security environments." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Location and Sensors\\Turn off location. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Sensors.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.39.2"] + - cis_csc: ["13"] + references: + - 'CCE-33743-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors -> DisableLocation -> 1' + + - id: 13561 + title: "Ensure 'Allow Message Service Cloud Sync' is set to 'Disabled'" + description: "This policy setting allows backup and restore of cellular text messages to Microsoft's cloud services. The recommended state for this setting is: Disabled." + rationale: "In a high security environment, data should never be sent to any 3rd party since this data could contain sensitive information." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Messaging\\Allow Message Service Cloud Sync Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Messaging.admx/adml that is included with the Microsoft Windows 10 Release 1709 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.43.1"] + - cis_csc: ["9.1", "9.2", "13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Messaging -> AllowMessageSync -> 0' + + - id: 13562 + title: "Ensure 'Allow Address bar drop-down list suggestions' is set to 'Disabled'" + description: "This setting determines whether the Address bar drop-down functionality is available in Microsoft Edge. The recommended state for this setting is: Disabled." + rationale: "Having Address bar drop-down list suggestions sent out to be processed is considered a privacy concern." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Allow Address bar drop-down list suggestions. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MicrosoftEdge.admx/adml that is included with the Microsoft Windows 10 Release 1703 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.45.1"] + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\ServiceUI -> ShowOneBox -> 0' + + - id: 13563 + title: "Ensure 'Allow Adobe Flash' is set to 'Disabled'" + description: "This setting lets you decide whether employees can run Adobe Flash in Microsoft Edge. The recommended state for this setting is: Disabled." + rationale: "Adobe Flash is a very insecure product and has been a frequent attack vector on the web. In more highly security-sensitive environments, Adobe Flash should be disabled completely to eliminate this attack vector. Note: This setting will not prevent or remove Adobe Flash usage from other web browsers, so we recommend also uninstalling Adobe Flash completely from all systems in highly security-sensitive environments." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Allow Adobe Flash. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MicrosoftEdge.admx/adml that is included with the Microsoft Windows 10 Release 1703 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.45.2"] + - cis_csc: ["7.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Addons -> FlashPlayerEnabled -> 0' + + - id: 13564 + title: "Ensure 'Allow InPrivate Browsing' is set to 'Disabled'" + description: "This setting lets you decide whether employees can browse using InPrivate website browsing. The recommended state for this setting is: Disabled." + rationale: "Even though web filter logs can monitor traffic to and from websites, it is always a good practice to try and keep multiple source of logs. It can also be helpful to keep user from privately browsing in order to troubleshoot malicious site visits if a machine has become compromised." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Allow InPrivate Browsing. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MicrosoftEdge.admx/adml that is included with the Microsoft Windows 10 Release 1511 Administrative Templates (or newer). Note #2: In the Microsoft Windows 10 Release 1511 Administrative Templates, this setting was named Turn off InPrivate browsing, but it was renamed starting with the Windows 10 Release 1607 & Server 2016 Administrative Templates." + compliance: + - cis: ["18.9.45.3"] + - cis_csc: ["7"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> AllowInPrivate -> 0' + + - id: 13565 + title: "Ensure 'Configure Pop-up Blocker' is set to 'Enabled'" + description: "This setting lets you decide whether to turn on Pop-up Blocker and whether to allow pop- ups to appear in secondary windows. The recommended state for this setting is: Enabled." + rationale: "The Pop-up Blocker serves an important purpose by blocking malicious popups and helping prevent the machine from being compromised." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Configure Pop-up Blocker. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MicrosoftEdge.admx/adml that is included with the Microsoft Windows 10 Release 1511 Administrative Templates (or newer). Note #2: In the Microsoft Windows 10 Release 1511 Administrative Templates, this setting was named Turn off Pop-up Blocker, but it was renamed starting with the Windows 10 Release 1607 & Server 2016 Administrative Templates." + compliance: + - cis: ["18.9.45.6"] + - cis_csc: ["7"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> AllowPopups -> r:yes' + + - id: 13566 + title: "Ensure 'Configure search suggestions in Address bar' is set to 'Disabled'" + description: "This setting lets you decide whether search suggestions should appear in the Address bar of Microsoft Edge. The recommended state for this setting is: Disabled." + rationale: "Having search suggestions sent out to be processed is considered a privacy concern." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Configure search suggestions in Address bar. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MicrosoftEdge.admx/adml that is included with the Microsoft Windows 10 Release 1507 Administrative Templates (or newer). Note #2: In the Microsoft Windows 10 Release 1507 Administrative Templates, this setting was named Stops address bar from showing search suggestions. In the Microsoft Windows 10 Release 1511 Administrative Templates, this setting was renamed to Turn off address bar search suggestions, but it was finally renamed to Configure search suggestions in Address bar starting with the Windows 10 Release 1607 & Server 2016 Administrative Templates." + compliance: + - cis: ["18.9.45.7"] + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\SearchScopes -> ShowSearchSuggestionsGlobal -> 0' + + - id: 13567 + title: "Ensure 'Prevent access to the about:flags page in Microsoft Edge' is set to 'Enabled'" + description: "This policy setting lets you decide whether employees can access the about:flags page, which is used to change developer settings and to enable experimental features. The recommended state for this setting is: Enabled." + rationale: "Users should not have access to developer settings and experimental features. Vulnerabilities could be introduced if these settings are not properly managed." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Prevent access to the about:flags page in Microsoft Edge. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MicrosoftEdge.admx/adml that is included with the Microsoft Windows 10 Release 1607 & Server 2016 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.45.9"] + - cis_csc: ["3"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> PreventAccessToAboutFlagsInMicrosoftEdge -> 1' + + - id: 13568 + title: "Ensure 'Prevent using Localhost IP address for WebRTC' is set to 'Enabled'" + description: "This setting lets you decide whether an employee's LocalHost IP address shows while making phone calls using the WebRTC protocol. The recommended state for this setting is: Enabled." + rationale: "WebRTC is a Real-Time Communications open source project supported by all major browsers. Allowing a system's local IP address to be shared may be considered a privacy concern." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Prevent using Localhost IP address for WebRTC. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MicrosoftEdge.admx/adml that is included with the Microsoft Windows 10 Release 1511 Administrative Templates (or newer). Note #2: In the Microsoft Windows 10 Release 1511 Administrative Templates, this setting was named Don't allow WebRTC to share the LocalHost IP address, but it was renamed starting with the Windows 10 Release 1607 & Server 2016 Administrative Templates." + compliance: + - cis: ["18.9.45.10"] + - cis_csc: ["7.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> HideLocalHostIP -> 1' + + - id: 13569 + title: "Ensure 'Turn off Push To Install service' is set to 'Enabled'" + description: "This policy setting controls whether users can push Apps to the device from the Windows Store App running on other devices or the web. The recommended state for this setting is: Enabled." + rationale: "In a high security managed environment, application installations should be managed centrally by IT staff, not by end users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Push to Install\\Turn off Push To Install service. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template PushToInstall.admx/adml that is included with the Microsoft Windows 10 Release 1709 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.57.1"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PushToInstall -> DisablePushToInstall -> 1' + + - id: 13570 + title: "Ensure 'Allow users to connect remotely by using Remote Desktop Services' is set to 'Disabled'" + description: "This policy setting allows you to configure remote access to computers by using Remote Desktop Services. The recommended state for this setting is: Disabled." + rationale: "Any account with the Allow log on through Remote Desktop Services user right can log on to the remote console of the computer. If you do not restrict access to legitimate users who need to log on to the console of the computer, unauthorized users could download and execute malicious code to elevate their privileges." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Connections\\Allow users to connect remotely by using Remote Desktop Services. Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Allow users to connect remotely using Terminal Services, but it was renamed to Allow users to connect remotely using Remote Desktop Services in the Windows 7 & Server 2008 R2 Administrative Templates. It was renamed again to Allow users to connect remotely by using Remote Desktop Services in the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.58.3.2.1"] + references: + - 'CCE-35255-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDenyTSConnections -> 0' + + - id: 13571 + title: "Ensure 'Do not allow COM port redirection' is set to 'Enabled'" + description: "This policy setting specifies whether to prevent the redirection of data to client COM ports from the remote computer in a Remote Desktop Services session. The recommended state for this setting is: Enabled." + rationale: "In a more security-sensitive environment, it is desirable to reduce the possible attack surface. The need for COM port redirection within a Remote Desktop session is very rare, so makes sense to reduce the number of unexpected avenues for data exfiltration and/or malicious code transfer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow COM port redirection. Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.3.1"] + - cis_csc: ["9.1", "9.2"] + references: + - 'CCE-34496-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableCcm -> 1' + + - id: 13572 + title: "Ensure 'Do not allow LPT port redirection' is set to 'Enabled'" + description: "This policy setting specifies whether to prevent the redirection of data to client LPT ports during a Remote Desktop Services session. The recommended state for this setting is: Enabled." + rationale: "In a more security-sensitive environment, it is desirable to reduce the possible attack surface. The need for LPT port redirection within a Remote Desktop session is very rare, so makes sense to reduce the number of unexpected avenues for data exfiltration and/or malicious code transfer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow LPT port redirection. Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.3.3"] + - cis_csc: ["9.1", "9.2"] + references: + - 'CCE-34698-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableLPT -> 1' + + - id: 13573 + title: "Ensure 'Do not allow supported Plug and Play device redirection' is set to 'Enabled'" + description: "This policy setting allows you to control the redirection of supported Plug and Play devices, such as Windows Portable Devices, to the remote computer in a Remote Desktop Services session. The recommended state for this setting is: Enabled." + rationale: "In a more security-sensitive environment, it is desirable to reduce the possible attack surface. The need for Plug and Play device redirection within a Remote Desktop session is very rare, so makes sense to reduce the number of unexpected avenues for data exfiltration and/or malicious code transfer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow supported Plug and Play device redirection. Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.3.4"] + - cis_csc: ["9.1", "9.2"] + references: + - 'CCE-34790-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisablePNPRedir -> 1' + + - id: 13574 + title: "Ensure 'Set time limit for active but idle Remote Desktop Services sessions' is set to 'Enabled: 15 minutes or less'" + description: "This policy setting allows you to specify the maximum amount of time that an active Remote Desktop Services session can be idle (without user input) before it is automatically disconnected. The recommended state for this setting is: Enabled: 15 minutes or less." + rationale: "This setting helps to prevent active Remote Desktop sessions from tying up the computer for long periods of time while not in use, preventing computing resources from being consumed by large numbers of inactive sessions. In addition, old, forgotten Remote Desktop sessions that are still active can cause password lockouts if the user's password has changed but the old session is still running. For systems that limit the number of connected users (e.g. servers in the default Administrative mode - 2 sessions only), other users' old but still active sessions can prevent another user from connecting, resulting in an effective denial of service." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 15 minutes or less: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Session Time Limits\\Set time limit for active but idle Remote Desktop Services sessions. Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Set time limit for active but idle Terminal Services sessions, but it was renamed starting with the Windows 7 & Server 2008 R2 Administrative Templates." + compliance: + - cis: ["18.9.58.3.10.1"] + - cis_csc: ["16.5", "16.11"] + references: + - https://workbench.cisecurity.org/benchmarks/766 + - 'CCE-35595-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> n:^(\d+) compare <= 900000' + + - id: 13575 + title: "Ensure 'Set time limit for disconnected sessions' is set to 'Enabled: 1 minute'" + description: "This policy setting allows you to configure a time limit for disconnected Remote Desktop Services sessions. The recommended state for this setting is: Enabled: 1 minute." + rationale: "This setting helps to prevent active Remote Desktop sessions from tying up the computer for long periods of time while not in use, preventing computing resources from being consumed by large numbers of disconnected but still active sessions. In addition, old, forgotten Remote Desktop sessions that are still active can cause password lockouts if the user's password has changed but the old session is still running. For systems that limit the number of connected users (e.g. servers in the default Administrative mode - 2 sessions only), other users' old but still active sessions can prevent another user from connecting, resulting in an effective denial of service. This setting is important to ensure a disconnected session is properly terminated." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 1 minute: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Session Time Limits\\Set time limit for disconnected sessions. Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.10.2"] + - cis_csc: ["16.5", "16.11"] + references: + - 'CCE-35599-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxDisconnectionTime -> 60000' + + - id: 13576 + title: "Ensure 'Allow Cloud Search' is set to 'Enabled: Disable Cloud Search'" + description: "This policy setting allows search and Cortana to search cloud sources like OneDrive and SharePoint. The recommended state for this setting is: Enabled: Disable Cloud Search." + rationale: "Due to privacy concerns, data should never be sent to any 3rd party since this data could contain sensitive information." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Disable Cloud Search: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Allow Cloud Search. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Search.admx/adml that is included with the Microsoft Windows 10 Release 1709 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.60.2"] + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> AllowCloudSearch -> 0' + + - id: 13577 + title: "Ensure 'Turn off KMS Client Online AVS Validation' is set to 'Enabled'" + description: "The Key Management Service (KMS) is a Microsoft license activation method that entails setting up a local server to store the software licenses. The KMS server itself needs to connect to Microsoft to activate the KMS service, but subsequent on-network clients can activate Microsoft Windows OS and/or their Microsoft Office via the KMS server instead of connecting directly to Microsoft. This policy setting lets you opt-out of sending KMS client activation data to Microsoft automatically. The recommended state for this setting is: Enabled." + rationale: "Even though the KMS licensing method does not require KMS clients to connect to Microsoft, they still send KMS client activation state data to Microsoft automatically. Preventing this information from being sent can help reduce privacy concerns in high security environments." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Software Protection Platform\\Turn off KMS Client Online AVS Validation. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AVSValidationGP.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." + compliance: + - cis: ["18.9.65.1"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform -> NoGenTicket -> 1' + + - id: 13578 + title: "Ensure 'Turn off the Store application' is set to 'Enabled'" + description: "This setting denies or allows access to the Store application. The recommended state for this setting is: Enabled. Note: Per Microsoft TechNet and MSKB 3135657, this policy setting does not apply to any Windows 10 editions other than Enterprise and Education." + rationale: "Only applications approved by an IT department should be installed. Allowing users to install 3rd party applications can lead to missed patches and potential zero day vulnerabilities." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Store\\Turn off the Store application. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WinStoreUI.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates, or by the Group Policy template WindowsStore.admx/adml that is included with the Microsoft Windows 10 Release 1511 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.68.5"] + - cis_csc: ["2"] + references: + - https://docs.microsoft.com/en-us/windows/client-management/group-policies-for-enterprise-and-education-editions + - https://support.microsoft.com/en-us/help/3135657/can-t-disable-windows-store-in-windows-10-pro-through-group-policy + - 'CCE-35811-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore -> RemoveWindowsStore -> 1' + + - id: 13579 + title: "Ensure 'Join Microsoft MAPS' is set to 'Disabled'" + description: "This policy setting allows you to join Microsoft Active Protection Service (MAPS), which Microsoft has now renamed to \"Windows Defender Antivirus Cloud Protection Service\". Microsoft MAPS / Windows Defender Antivirus Cloud Protection Service is the online community that helps you choose how to respond to potential threats. The community also helps stop the spread of new malicious software infections. You can choose to send basic or additional information about detected software. Additional information helps Microsoft create new definitions and help it to protect your computer. Possible options are: - (0x0) Disabled (default) - (0x1) Basic membership - (0x2) Advanced membership. The recommended state for this setting is: Disabled." + rationale: "The information that would be sent can include things like location of detected items on your computer if harmful software was removed. The information would be automatically collected and sent. In some instances personal information might unintentionally be sent to Microsoft. However, Microsoft states that it will not use this information to identify you or contact you. For privacy reasons in high security environments, it is best to prevent these data submissions altogether." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\MAPS\\Join Microsoft MAPS Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsDefender.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.76.3.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet -> SpynetReporting -> 0' + + - id: 13580 + title: "Ensure 'Configure Watson events' is set to 'Disabled'" + description: "This policy setting allows you to configure whether or not Watson events are sent. The recommended state for this setting is: Disabled." + rationale: "Watson events are the reports that get sent to Microsoft when a program or service crashes or fails, including the possibility of automatic submission. Preventing this information from being sent can help reduce privacy concerns." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Reporting\\Configure Watson events. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsDefender.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.76.9.1"] + - cis_csc: ["13"] + references: + - 'CCE-33880-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Reporting -> DisableGenericRePorts -> 1' + + - id: 13581 + title: "Ensure 'Allow suggested apps in Windows Ink Workspace' is set to 'Disabled'" + description: "This policy setting determines whether suggested apps in Windows Ink Workspace are allowed. The recommended state for this setting is: Disabled." + rationale: "This Microsoft feature is designed to collect data and suggest apps based on that data collected. Disabling this setting will help ensure your data is not shared with any third party." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Ink Workspace\\Allow suggested apps in Windows Ink Workspace. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsInkWorkspace.admx/adml that is included with the Microsoft Windows 10 Release 1607 & Server 2016 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.84.1"] + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsInkWorkspace -> AllowSuggestedAppsInWindowsInkWorkspace -> 0' + + - id: 13582 + title: "Ensure 'Prevent Internet Explorer security prompt for Windows Installer scripts' is set to 'Disabled'" + description: "This policy setting controls whether Web-based programs are allowed to install software on the computer without notifying the user. The recommended state for this setting is: Disabled." + rationale: "Suppressing the system warning can pose a security risk and increase the attack surface on the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Prevent Internet Explorer security prompt for Windows Installer scripts. Note: This Group Policy path is provided by the Group Policy template MSI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Disable IE security prompt for Windows Installer scripts, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.85.3"] + - cis_csc: ["7"] + references: + - 'CCE-35086-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> SafeForScripting -> 0' + + - id: 13583 + title: "Ensure 'Allow remote server management through WinRM' is set to 'Disabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service automatically listens on the network for requests on the HTTP transport over the default HTTP port. The recommended state for this setting is: Disabled." + rationale: "Any feature is a potential avenue of attack, those that enable inbound network connections are particularly risky. Only enable the use of the Windows Remote Management (WinRM) service on trusted networks and when feasible employ additional controls such as IPsec." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow remote server management through WinRM. Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Allow automatic configuration of listeners, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.97.2.2"] + - cis_csc: ["3.4", "4.5"] + references: + - 'CCE-33146-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowAutoConfig -> 0' + + - id: 13584 + title: "Ensure 'Allow Remote Shell Access' is set to 'Disabled'" + description: "This policy setting allows you to manage configuration of remote access to all supported shells to execute scripts and commands. The recommended state for this setting is: Disabled. Note: The GPME help text for this setting is incorrectly worded, implying that configuring it to Enabled will reject new Remote Shell connections, and setting it to Disabled will allow Remote Shell connections. The opposite is true (and is consistent with the title of the setting). This is a wording mistake by Microsoft in the Administrative Template." + rationale: "Any feature is a potential avenue of attack, those that enable inbound network connections are particularly risky. Only enable the use of the Windows Remote Shell on trusted networks and when feasible employ additional controls such as IPsec." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Administrative Templates\\Windows Components\\Windows Remote Shell\\Allow Remote Shell Access. Note: This Group Policy path is provided by the Group Policy template WindowsRemoteShell.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.98.1"] + - cis_csc: ["3.4", "4.5"] + references: + - 'CCE-33740-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service\WinRS -> AllowRemoteShellAccess -> 0' diff --git a/sca/windows/cis_win10_enterprise_L2_rcl.yml b/sca/windows/cis_win10_enterprise_L2_rcl.yml deleted file mode 100755 index 44bbff12d..000000000 --- a/sca/windows/cis_win10_enterprise_L2_rcl.yml +++ /dev/null @@ -1,1134 +0,0 @@ -# Security Configuration assessment -# CIS Checks for Windows 10 Enterprise L2 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# Center for Internet Security Benchmark v1.4.0 for Microsoft Windows 10 Release 1709 v1.4.0 - 08-21-2018 - -policy: - id: "cis_win10_enterprise_L2" - file: "cis_win10_enterprise_L2_rcl.yml" - name: "CIS benchmark for Windows 10 Enterprise (Release 1709)" - description: "This document provides prescriptive guidance for establishing a secure configuration posture for Microsoft Windows (L2)." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check that the Windows platform is Windows 10" - description: "Requirements for running the CIS benchmark Domain Controller L2 under Windows 10" - condition: "any required" - rules: - - 'r:HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion -> ProductName -> r:^Windows 10;' - -checks: -# 2.3 Security Options - - id: 12500 - title: "Ensure 'Devices: Prevent users from installing printer drivers' is set to 'Enabled'" - description: "For a computer to print to a shared printer, the driver for that shared printer must be installed on the local computer. This security setting determines who is allowed to install a printer driver as part of connecting to a shared printer. The recommended state for this setting is: Enabled. Note: This setting does not affect the ability to add a local printer. This setting does not affect Administrators." - rationale: "It may be appropriate in some organizations to allow users to install printer drivers on their own workstations. However, in a high security environment, you should allow only Administrators, not users, to do this, because printer driver installation may unintentionally cause the computer to become less stable. A malicious user could install inappropriate printer drivers in a deliberate attempt to damage the computer, or a user might accidentally install malicious software that masquerades as a printer driver. It is feasible for an attacker to disguise a Trojan horse program as a printer driver. The program may appear to users as if they must use it to print, but such a program could unleash malicious code on your computer network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Devices: Prevent users from installing printer drivers" - compliance: - - cis: "2.3.4.2" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Providers\LanMan Print Services\Servers -> AddPrinterDrivers -> !1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Providers\LanMan Print Services\Servers -> !AddPrinterDrivers;' - - id: 12501 - title: "Ensure 'Interactive logon: Number of previous logons to cache (in case domain controller is not available)' is set to '4 or fewer logon(s)'" - description: "This policy setting determines whether a user can log on to a Windows domain using cached account information. Logon information for domain accounts can be cached locally to allow users to log on even if a Domain Controller cannot be contacted. This policy setting determines the number of unique users for whom logon information is cached locally. If this value is set to 0, the logon cache feature is disabled. An attacker who is able to access the file system of the server could locate this cached information and use a brute force attack to determine user passwords. The recommended state for this setting is: 4 or fewer logon(s)." - rationale: "The number that is assigned to this policy setting indicates the number of users whose logon information the computer will cache locally. If the number is set to 4, then the computer caches logon information for 4 users. When a 5th user logs on to the computer, the server overwrites the oldest cached logon session. Users who access the computer console will have their logon credentials cached on that computer. An attacker who is able to access the file system of the computer could locate this cached information and use a brute force attack to attempt to determine user passwords. To mitigate this type of attack, Windows encrypts the information and obscures its physical location." - remediation: "To establish the recommended configuration via GP, set the following UI path to 4 or fewer logon(s): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Number of previous logons to cache (in case domain controller is not available)" - compliance: - - cis: "2.3.7.7" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> CachedLogonsCount -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> !CachedLogonsCount;' - - id: 12502 - title: "Ensure 'System cryptography: Force strong key protection for user keys stored on the computer' is set to 'User is prompted when the key is first used' or higher" - description: "This policy setting determines whether users' private keys (such as their S-MIME keys) require a password to be used. The recommended state for this setting is: User is prompted when the key is first used. Configuring this setting to User must enter a password each time they use a key also conforms to the benchmark." - rationale: "If a user's account is compromised or their computer is inadvertently left unsecured the malicious user can use the keys stored for the user to access protected resources. You can configure this policy setting so that users must provide a password that is distinct from their domain password every time they use a key. This configuration makes it more difficult for an attacker to access locally stored user keys, even if the attacker takes control of the user's computer and determines their logon password." - remediation: "To establish the recommended configuration via GP, set the following UI path to User is prompted when the key is first used (configuring to User must enter a password each time they use a key also conforms to the benchmark): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System cryptography: Force strong key protection for user keys stored on the computer" - compliance: - - cis: "2.3.14.1" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Cryptography -> ForceKeyProtection -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Cryptography -> !ForceKeyProtection;' -# 5 System Services - - id: 12503 - title: "Ensure 'Bluetooth Handsfree Service (BthHFSrv)' is set to 'Disabled'" - description: "Enables wireless Bluetooth headsets to run on this computer. The recommended state for this setting is: Disabled." - rationale: "Bluetooth technology has inherent security risks - especially prior to the v2.1 standard. Wireless Bluetooth traffic is not well encrypted (if at all), so in a high-security environment, it should not be permitted, in spite of the added inconvenience of not being able to use Bluetooth devices." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Bluetooth Handsfree Service" - compliance: - - cis: "5.1" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BthHFSrv -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BthHFSrv -> !Start;' - - id: 12504 - title: "Ensure 'Bluetooth Support Service (bthserv)' is set to 'Disabled'" - description: "The Bluetooth service supports discovery and association of remote Bluetooth devices. The recommended state for this setting is: Disabled." - rationale: "Bluetooth technology has inherent security risks - especially prior to the v2.1 standard. Wireless Bluetooth traffic is not well encrypted (if at all), so in a high-security environment, it should not be permitted, in spite of the added inconvenience of not being able to use Bluetooth devices." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Bluetooth Support Service" - compliance: - - cis: "5.2" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\bthserv -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\bthserv -> !Start;' - - id: 12505 - title: "Ensure 'Downloaded Maps Manager (MapsBroker)' is set to 'Disabled'" - description: "Windows service for application access to downloaded maps. This service is started on- demand by application accessing downloaded maps." - rationale: "Mapping technologies can unwillingly reveal your location to attackers and other software that picks up the information. In addition, automatic downloads of data from 3rd-party sources should be minimized when not needed. Therefore this service should not be needed in high security environments." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Downloaded Maps Manager" - compliance: - - cis: "5.4" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MapsBroker -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MapsBroker -> !Start;' - - id: 12506 - title: "Ensure 'Geolocation Service (lfsvc)' is set to 'Disabled'" - description: "This service monitors the current location of the system and manages geofences (a geographical location with associated events). The recommended state for this setting is: Disabled." - rationale: "This setting affects the location feature (e.g. GPS or other location tracking). From a security perspective, it’s not a good idea to reveal your location to software in most cases, but there are legitimate uses, such as mapping software. However, they should not be used in high security environments." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Geolocation Service" - compliance: - - cis: "5.5" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lfsvc -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lfsvc -> !Start;' - - id: 12507 - title: "Ensure 'Link-Layer Topology Discovery Mapper (lltdsvc)' is set to 'Disabled'" - description: "Creates a Network Map, consisting of PC and device topology (connectivity) information, and metadata describing each PC and device. The recommended state for this setting is: Disabled." - rationale: "The feature that this service enables could potentially be used for unauthorized discovery and connection to network devices. Disabling the service helps to prevent responses to requests for network topology discovery in high security environments." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Link-Layer Topology Discovery Mapper" - compliance: - - cis: "5.11" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lltdsvc -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lltdsvc -> !Start;' - - id: 12508 - title: "Ensure 'Microsoft iSCSI Initiator Service (MSiSCSI)' is set to 'Disabled'" - description: "Manages Internet SCSI (iSCSI) sessions from this computer to remote target devices. The recommended state for this setting is: Disabled." - rationale: "This service is critically necessary in order to directly attach to an iSCSI device. However, iSCSI itself uses a very weak authentication protocol (CHAP), which means that the passwords for iSCSI communication are easily exposed, unless all of the traffic is isolated and/or encrypted using another technology like IPsec. This service is generally more appropriate for servers in a controlled environment then on workstations requiring high security." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Microsoft iSCSI Initiator Service" - compliance: - - cis: "5.14" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSiSCSI -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSiSCSI -> !Start;' - - id: 12509 - title: "Ensure 'Peer Name Resolution Protocol (PNRPsvc)' is set to 'Disabled'" - description: "Enables serverless peer name resolution over the Internet using the Peer Name Resolution Protocol (PNRP). The recommended state for this setting is: Disabled." - rationale: "Peer Name Resolution Protocol is a distributed and (mostly) serverless way to handle name resolution of clients with each other. In a high security environment, it is more secure to rely on centralized name resolution methods maintained by authorized staff." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Peer Name Resolution Protocol" - compliance: - - cis: "5.15" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PNRPsvc -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PNRPsvc -> !Start;' - - id: 12510 - title: "Ensure 'Peer Networking Grouping (p2psvc)' is set to 'Disabled'" - description: "Enables multi-party communication using Peer-to-Peer Grouping. The recommended state for this setting is: Disabled." - rationale: "Peer Name Resolution Protocol is a distributed and (mostly) serverless way to handle name resolution of clients with each other. In a high security environment, it is more secure to rely on centralized name resolution methods maintained by authorized staff." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Peer Networking Grouping" - compliance: - - cis: "5.16" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\p2psvc -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\p2psvc -> !Start;' - - id: 12511 - title: "Ensure 'Peer Networking Identity Manager (p2pimsvc)' is set to 'Disabled'" - description: "Provides identity services for the Peer Name Resolution Protocol (PNRP) and Peer-to-Peer Grouping services. The recommended state for this setting is: Disabled." - rationale: "Peer Name Resolution Protocol is a distributed and (mostly) serverless way to handle name resolution of clients with each other. In a high security environment, it is more secure to rely on centralized name resolution methods maintained by authorized staff." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Peer Networking Identity Manager" - compliance: - - cis: "5.17" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\p2pimsvc -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\p2pimsvc -> !Start;' - - id: 12512 - title: "Ensure 'PNRP Machine Name Publication Service (PNRPAutoReg)' is set to 'Disabled'" - description: "This service publishes a machine name using the Peer Name Resolution Protocol. Configuration is managed via the netsh context ‘p2p pnrp peer’. The recommended state for this setting is: Disabled." - rationale: "Peer Name Resolution Protocol is a distributed and (mostly) serverless way to handle name resolution of clients with each other. In a high security environment, it is more secure to rely on centralized name resolution methods maintained by authorized staff." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\PNRP Machine Name Publication Service" - compliance: - - cis: "5.18" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PNRPAutoReg -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PNRPAutoReg -> !Start;' - - id: 12513 - title: "Ensure 'Problem Reports and Solutions Control Panel Support (wercplsupport)' is set to 'Disabled'" - description: "This service provides support for viewing, sending and deletion of system-level problem reports for the Problem Reports and Solutions control panel. The recommended state for this setting is: Disabled." - rationale: "This service is involved in the process of displaying/reporting issues & solutions to/from Microsoft. In a high security environment, preventing this information from being sent can help reduce privacy concerns for sensitive corporate information." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Problem Reports and Solutions Control Panel Support" - compliance: - - cis: "5.19" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wercplsupport -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wercplsupport -> !Start;' - - id: 12514 - title: "Ensure 'Remote Access Auto Connection Manager (RasAuto)' is set to 'Disabled'" - description: "Creates a connection to a remote network whenever a program references a remote DNS or NetBIOS name or address." - rationale: "The function of this service is to provide a \"demand dial\" type of functionality. In a high security environment, it is preferred that any remote \"dial\" connections (whether they be legacy dial-in POTS or VPN) are initiated by the user, not automatically by the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Remote Access Auto Connection Manager" - compliance: - - cis: "5.20" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasAuto -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasAuto -> !Start;' - - id: 12515 - title: "Ensure 'Remote Desktop Configuration (SessionEnv)' is set to 'Disabled'" - description: "Remote Desktop Configuration service (RDCS) is responsible for all Remote Desktop related configuration and session maintenance activities that require SYSTEM context. These include per-session temporary folders, RD themes, and RD certificates. The recommended state for this setting is: Disabled." - rationale: "In a high security environment, Remote Desktop access is an increased security risk. For these environments, only local console access should be permitted." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Remote Desktop Configuration" - compliance: - - cis: "5.21" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SessionEnv -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SessionEnv -> !Start;' - - id: 12516 - title: "Ensure 'Remote Desktop Services (TermService)' is set to 'Disabled'" - description: "Allows users to connect interactively to a remote computer. Remote Desktop and Remote Desktop Session Host Server depend on this service. The recommended state for this setting is: Disabled." - rationale: "In a high security environment, Remote Desktop access is an increased security risk. For these environments, only local console access should be permitted." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Remote Desktop Services" - compliance: - - cis: "5.22" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermService -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermService -> !Start;' - - id: 12517 - title: "Ensure 'Remote Desktop Services UserMode Port Redirector (UmRdpService)' is set to 'Disabled'" - description: "Allows the redirection of Printers/Drives/Ports for RDP connections. The recommended state for this setting is: Disabled." - rationale: "In a security-sensitive environment, it is desirable to reduce the possible attack surface - preventing the redirection of COM, LPT and PnP ports will reduce the number of unexpected avenues for data exfiltration and/or malicious code transfer within an RDP session." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Remote Desktop Services UserMode Port Redirector" - compliance: - - cis: "5.23" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UmRdpService -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UmRdpService -> !Start;' - - id: 12518 - title: "Ensure 'Remote Registry (RemoteRegistry)' is set to 'Disabled'" - description: "Enables remote users to modify registry settings on this computer. The recommended state for this setting is: Disabled." - rationale: "In a high security environment, exposing the registry to remote access is an increased security risk." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Remote Registry" - compliance: - - cis: "5.25" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RemoteRegistry -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RemoteRegistry -> !Start;' - - id: 12519 - title: "Ensure 'Server (LanmanServer)' is set to 'Disabled'" - description: "Supports file, print, and named-pipe sharing over the network for this computer. If this service is stopped, these functions will be unavailable. The recommended state for this setting is: Disabled." - rationale: "In a high security environment, a secure workstation should only be a client, not a server. Sharing workstation resources for remote access increases security risk as the attack surface is notably higher." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Server" - compliance: - - cis: "5.27" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer -> !Start;' - - id: 12520 - title: "Ensure 'SNMP Service (SNMP)' is set to 'Disabled' or 'Not Installed'" - description: "Enables Simple Network Management Protocol (SNMP) requests to be processed by this computer. The recommended state for this setting is: Disabled or Not Installed. Note: This service is not installed by default. It is supplied with Windows, but is installed by enabling an optional Windows feature (Simple Network Management Protocol (SNMP))." - rationale: "Features that enable inbound network connections increase the attack surface. In a high security environment, management of secure workstations should be handled locally." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled or ensure the service is not installed. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\SNMP Service" - compliance: - - cis: "5.29" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP -> Start -> !4;' - - id: 12521 - title: "Ensure 'Windows Error Reporting Service (WerSvc)' is set to 'Disabled'" - description: "Allows errors to be reported when programs stop working or responding and allows existing solutions to be delivered. Also allows logs to be generated for diagnostic and repair services. The recommended state for this setting is: Disabled." - rationale: "If a Windows Error occurs in a secure, enterprise managed environment, the error should be reported directly to IT staff for troubleshooting and remediation. There is no benefit to the corporation to report these errors directly to Microsoft, and there is some risk of unknowingly exposing sensitive data as part of the error." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Windows Error Reporting Service" - compliance: - - cis: "5.33" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WerSvc -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WerSvc -> !Start;' - - id: 12522 - title: "Ensure 'Windows Event Collector (Wecsvc)' is set to 'Disabled'" - description: "This service manages persistent subscriptions to events from remote sources that support WS-Management protocol. This includes Windows Vista event logs, hardware and IPMI- enabled event sources. The service stores forwarded events in a local Event Log. The recommended state for this setting is: Disabled." - rationale: "In a high security environment, remote connections to secure workstations should be minimized, and management functions should be done locally." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Windows Event Collector" - compliance: - - cis: "5.34" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Wecsvc -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Wecsvc -> !Start;' - - id: 12523 - title: "Ensure 'Windows Push Notifications System Service (WpnService)' is set to 'Disabled'" - description: "This service runs in session 0 and hosts the notification platform and connection provider which handles the connection between the device and WNS server. The recommended state for this setting is: Disabled. Note: In the first two releases of Windows 10 (R1507 & R1511), the display name of this service was initially named Windows Push Notifications Service - but it was renamed to Windows Push Notifications System Service starting with Windows 10 R1607." - rationale: "Windows Push Notification Services (WNS) is a mechanism to receive 3rd-party notifications and updates from the cloud/Internet. In a high security environment, external systems, especially those hosted outside the organization, should be prevented from having an impact on the secure workstations." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Windows Push Notifications System Service" - compliance: - - cis: "5.37" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WpnService -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WpnService -> !Start;' - - id: 12524 - title: "Ensure 'Windows PushToInstall Service (PushToInstall)' is set to 'Disabled'" - description: "This service manages Apps that are pushed to the device from the Windows Store App running on other devices or the web. The recommended state for this setting is: Disabled." - rationale: "In a high security managed environment, application installations should be managed centrally by IT staff, not by end users." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Windows PushToInstall Service (PushToInstall)" - compliance: - - cis: "5.38" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PushToInstall -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PushToInstall -> !Start;' - - id: 12525 - title: "Ensure 'Windows Remote Management (WS-Management) (WinRM)' is set to 'Disabled'" - description: "Windows Remote Management (WinRM) service implements the WS-Management protocol for remote management. WS-Management is a standard web services protocol used for remote software and hardware management. The WinRM service listens on the network for WS-Management requests and processes them. The recommended state for this setting is: Disabled." - rationale: "Features that enable inbound network connections increase the attack surface. In a high security environment, management of secure workstations should be handled locally." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Windows Remote Management (WS-Management)" - compliance: - - cis: "5.39" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinRM -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinRM -> !Start;' - - id: 12526 - title: "Ensure 'Windows Store Install Service (InstallService)' is set to 'Disabled'" - description: "This service provides infrastructure support for the Windows Store. The recommended state for this setting is: Disabled." - rationale: "In a high security managed environment, application installations should be managed centrally by IT staff, not by end users." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Disabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\System Services\\Windows Store Install Service (InstallService)" - compliance: - - cis: "5.40" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\InstallService -> Start -> !4;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\InstallService -> !Start;' -# 18.1 Control Panel - - id: 12527 - title: "Ensure 'Allow Online Tips' is set to 'Disabled'" - description: "This policy setting configures the retrieval of online tips and help for the Settings app. The recommended state for this setting is: Disabled." - rationale: "Due to privacy concerns, data should never be sent to any 3rd party since this data could contain sensitive information." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Allow Online Tips Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ControlPanel.admx/adml that is included with the Microsoft Windows 10 Release 1709 Administrative Templates (or newer)." - compliance: - - cis: "18.1.3" - - cis_csc: "9.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> AllowOnlineTips -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> !AllowOnlineTips;' -# 18.4 MSS (Legacy) - - id: 12528 - title: "Ensure 'MSS: (DisableSavePassword) Prevent the dial-up password from being saved' is set to 'Enabled'" - description: "When you dial a phonebook or VPN entry in Dial-Up Networking, you can use the \"Save Password\" option so that your Dial-Up Networking password is cached and you will not need to enter it on successive dial attempts. For security, administrators may want to prevent users from caching passwords. The recommended state for this setting is: Enabled." - rationale: "An attacker who steals a mobile user's computer could automatically connect to the organization's network if the Save This Password check box is selected for the dial-up or VPN networking entry used to connect to your organization's network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(DisableSavePassword) Prevent the dial-up password from being saved Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog" - compliance: - - cis: "18.4.4" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasMan\Parameters -> DisableSavePassword -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasMan\Parameters -> !DisableSavePassword;' - - id: 12529 - title: "Ensure 'MSS: (KeepAliveTime) How often keep-alive packets are sent in milliseconds' is set to 'Enabled: 300,000 or 5 minutes (recommended)'" - description: "This value controls how often TCP attempts to verify that an idle connection is still intact by sending a keep-alive packet. If the remote computer is still reachable, it acknowledges the keep-alive packet. The recommended state for this setting is: Enabled: 300,000 or 5 minutes (recommended)." - rationale: "An attacker who is able to connect to network applications could establish numerous connections to cause a DoS condition." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 300,000 or 5 minutes (recommended): Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (KeepAliveTime) How often keep-alive packets are sent in milliseconds Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog" - compliance: - - cis: "18.4.6" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> KeepAliveTime -> !493e0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> !KeepAliveTime;' - - id: 12530 - title: "Ensure 'MSS: (PerformRouterDiscovery) Allow IRDP to detect and configure Default Gateway addresses (could lead to DoS)' is set to 'Disabled'" - description: "This setting is used to enable or disable the Internet Router Discovery Protocol (IRDP), which allows the system to detect and configure default gateway addresses automatically as described in RFC 1256 on a per-interface basis. The recommended state for this setting is: Disabled." - rationale: "An attacker who has gained control of a computer on the same network segment could configure a computer on the network to impersonate a router. Other computers with IRDP enabled would then attempt to route their traffic through the already compromised computer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (PerformRouterDiscovery) Allow IRDP to detect and configure Default Gateway addresses (could lead to DoS) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog" - compliance: - - cis: "18.4.8" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> PerformRouterDiscovery -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> !PerformRouterDiscovery;' - - id: 12531 - title: "Ensure 'MSS: (TcpMaxDataRetransmissions IPv6) How many times unacknowledged data is retransmitted' is set to 'Enabled: 3'" - description: "This setting controls the number of times that TCP retransmits an individual data segment (non-connect segment) before the connection is aborted. The retransmission time-out is doubled with each successive retransmission on a connection. It is reset when responses resume. The base time-out value is dynamically determined by the measured round-trip time on the connection. The recommended state for this setting is: Enabled: 3." - rationale: "A malicious user could exhaust a target computer's resources if it never sent any acknowledgment messages for data that was transmitted by the target computer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 3: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(TcpMaxDataRetransmissions IPv6) How many times unacknowledged data is retransmitted Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog" - compliance: - - cis: "18.4.11" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> TcpMaxDataRetransmissions -> !3;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> !TcpMaxDataRetransmissions;' - - id: 12532 - title: "Ensure 'MSS: (TcpMaxDataRetransmissions) How many times unacknowledged data is retransmitted' is set to 'Enabled: 3'" - description: "This setting controls the number of times that TCP retransmits an individual data segment (non-connect segment) before the connection is aborted. The retransmission time-out is doubled with each successive retransmission on a connection. It is reset when responses resume. The base time-out value is dynamically determined by the measured round-trip time on the connection. The recommended state for this setting is: Enabled: 3." - rationale: "A malicious user could exhaust a target computer's resources if it never sent any acknowledgment messages for data that was transmitted by the target computer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 3: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(TcpMaxDataRetransmissions) How many times unacknowledged data is retransmitted Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog" - compliance: - - cis: "18.4.12" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> TcpMaxDataRetransmissions -> !3;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> !TcpMaxDataRetransmissions;' -# 18.5 Network - - id: 12533 - title: "Ensure 'Enable Font Providers' is set to 'Disabled'" - description: "This policy setting determines whether Windows is allowed to download fonts and font catalog data from an online font provider. The recommended state for this setting is: Disabled." - rationale: "In an enterprise managed environment the IT department should be managing the changes to the system configuration, to ensure all changes are tested and approved." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Fonts\\Enable Font Providers Note: This Group Policy path may not exist by default. It is provided by the Group Policy template GroupPolicy.admx/adml that is included with the Microsoft Windows 10 Release 1607 & Server 2016 Administrative Templates (or newer)." - compliance: - - cis: "18.5.5.1" - - cis_csc: "3, 13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnableFontProviders -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !EnableFontProviders;' - - id: 12534 - title: "Ensure 'Turn on Mapper I/O (LLTDIO) driver' is set to 'Disabled'" - description: "This policy setting changes the operational behavior of the Mapper I/O network protocol driver. LLTDIO allows a computer to discover the topology of a network it's connected to. It also allows a computer to initiate Quality-of-Service requests such as bandwidth estimation and network health analysis. The recommended state for this setting is: Disabled." - rationale: "To help protect from potentially discovering and connecting to unauthorized devices, this setting should be disabled to prevent responding to network traffic for network topology discovery." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Link-Layer Topology Discovery\\Turn on Mapper I/O (LLTDIO) driver Note: This Group Policy path is provided by the Group Policy template LinkLayerTopologyDiscovery.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.5.9.1" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowLLTDIOOnDomain -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowLLTDIOOnPublicNet -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> EnableLLTDIO -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> ProhibitLLTDIOOnPrivateNet -> !0;' - - id: 12535 - title: "Ensure 'Turn on Responder (RSPNDR) driver' is set to 'Disabled'" - description: "This policy setting changes the operational behavior of the Responder network protocol driver. The Responder allows a computer to participate in Link Layer Topology Discovery requests so that it can be discovered and located on the network. It also allows a computer to participate in Quality-of-Service activities such as bandwidth estimation and network health analysis. The recommended state for this setting is: Disabled." - rationale: "To help protect from potentially discovering and connecting to unauthorized devices, this setting should be disabled to prevent responding to network traffic for network topology discovery." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Link-Layer Topology Discovery\\Turn on Responder (RSPNDR) driver Note: This Group Policy path is provided by the Group Policy template LinkLayerTopologyDiscovery.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.5.9.2" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowRspndrOnDomain -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowRspndrOnPublicNet -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> EnableRspndr -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> ProhibitRspndrOnPrivateNet -> !0;' - - id: 12536 - title: "Ensure 'Turn off Microsoft Peer-to-Peer Networking Services' is set to 'Enabled'" - description: "The Peer Name Resolution Protocol (PNRP) allows for distributed resolution of a name to an IPv6 address and port number. The protocol operates in the context of clouds. A cloud is a set of peer computers that can communicate with each other by using the same IPv6 scope. Peer-to-Peer protocols allow for applications in the areas of RTC, collaboration, content distribution and distributed processing. The recommended state for this setting is: Enabled." - rationale: "This setting enhances the security of the environment and reduces the overall risk exposure related to peer-to-peer networking." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Microsoft Peer-to-Peer Networking Services\\Turn off Microsoft Peer-to-Peer Networking Services Note: This Group Policy path is provided by the Group Policy template P2P- pnrp.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.5.10.2" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Peernet -> Disabled -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Peernet -> !Disabled;' - - id: 12537 - title: "Disable IPv6 (Ensure TCPIP6 Parameter 'DisabledComponents' is set to '0xff (255)')" - description: "Internet Protocol version 6 (IPv6) is a set of protocols that computers use to exchange information over the Internet and over home and business networks. IPv6 allows for many more IP addresses to be assigned than IPv4 did. Older networking, hosts and operating systems may not support IPv6 natively. The recommended state for this setting is: DisabledComponents - 0xff (255)" - rationale: "Since the vast majority of private enterprise managed networks have no need to utilize IPv6 (because they have access to private IPv4 addressing), disabling IPv6 components reduces a possible attack surface that is also harder to monitor the traffic on. As a result, we recommend configuring IPv6 to a Disabled state when it is not needed." - remediation: "To establish the recommended configuration, set the following Registry value to 0xff (255) (DWORD): HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\TCPIP6\\Parameters:Disabl edComponents Note: This change does not take effect until the computer has been restarted. Note #2: Although Microsoft does not provide an ADMX template to configure this registry value, a custom .ADM template (Disable-IPv6-Components-KB929852.adm) is provided in the CIS Benchmark Remediation Kit to facilitate its configuration. Be aware though that simply turning off the group policy setting in the .ADM template will not \"undo\" the change once applied. Instead, the opposite setting must be applied to change the registry value to the opposite state." - compliance: - - cis: "18.5.19.2.1" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> DisabledComponents -> !ff;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> !DisabledComponents;' - - id: 12538 - title: "Ensure 'Configuration of wireless settings using Windows Connect Now' is set to 'Disabled'" - description: "This policy setting allows the configuration of wireless settings using Windows Connect Now (WCN). The WCN Registrar enables the discovery and configuration of devices over Ethernet (UPnP) over in-band 802.11 Wi-Fi through the Windows Portable Device API (WPD) and via USB Flash drives. Additional options are available to allow discovery and configuration over a specific medium. The recommended state for this setting is: Disabled." - rationale: "This setting enhances the security of the environment and reduces the overall risk exposure related to user configuration of wireless settings." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Windows Connect Now\\Configuration of wireless settings using Windows Connect Now Note: This Group Policy path is provided by the Group Policy template WindowsConnectNow.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.5.20.1" - - cis_csc: "15.4, 15.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> EnableRegistrars -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> !EnableRegistrars;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableUPnPRegistrar -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> !DisableUPnPRegistrar;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableInBand802DOT11Registrar -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> !DisableInBand802DOT11Registrar;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableFlashConfigRegistrar -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> !DisableFlashConfigRegistrar;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableWPDRegistrar -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> !DisableWPDRegistrar;' - - id: 12539 - title: "Ensure 'Prohibit access of the Windows Connect Now wizards' is set to 'Enabled'" - description: "This policy setting prohibits access to Windows Connect Now (WCN) wizards. The recommended state for this setting is: Enabled." - rationale: "Allowing standard users to access the Windows Connect Now wizard increases the risk and attack surface." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network\\Windows Connect Now\\Prohibit access of the Windows Connect Now wizards Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsConnectNow.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.5.20.2" - - cis_csc: "15.4, 15.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\UI -> DisableWcnUi -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\UI -> !DisableWcnUi;' -# 18.8 System - - id: 12540 - title: "Ensure 'Turn off access to the Store' is set to 'Enabled'" - description: "This policy setting specifies whether to use the Store service for finding an application to open a file with an unhandled file type or protocol association. When a user opens a file type or protocol that is not associated with any applications on the computer, the user is given the choice to select a local application or use the Store service to find an application. The recommended state for this setting is: Enabled." - rationale: "The Store service is a retail outlet built into Windows, primarily for consumer use. In an enterprise managed environment the IT department should be managing the installation of all applications to reduce the risk of the installation of vulnerable software." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off access to the Store Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ICM.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.22.1.1" - - cis_csc: "2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoUseStoreOpenWith -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> !NoUseStoreOpenWith;' - - id: 12541 - title: "Ensure 'Turn off handwriting personalization data sharing' is set to 'Enabled'" - description: "This setting turns off data sharing from the handwriting recognition personalization tool. The handwriting recognition personalization tool enables Tablet PC users to adapt handwriting recognition to their own writing style by providing writing samples. The tool can optionally share user writing samples with Microsoft to improve handwriting recognition in future versions of Windows. The tool generates reports and transmits them to Microsoft over a secure connection. The recommended state for this setting is: Enabled." - rationale: "A person's handwriting is Personally Identifiable Information (PII), especially when it comes to your signature. As such, it is unacceptable in many environments to automatically upload PII to a website without explicit approval by the user." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off handwriting personalization data sharing Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ShapeCollector.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.8.22.1.3" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\TabletPC -> PreventHandwritingDataSharing -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\TabletPC -> !PreventHandwritingDataSharing;' - - id: 12542 - title: "Ensure 'Turn off handwriting recognition error reporting' is set to 'Enabled'" - description: "Turns off the handwriting recognition error reporting tool. The handwriting recognition error reporting tool enables users to report errors encountered in Tablet PC Input Panel. The tool generates error reports and transmits them to Microsoft over a secure connection. Microsoft uses these error reports to improve handwriting recognition in future versions of Windows. The recommended state for this setting is: Enabled." - rationale: "A person's handwriting is Personally Identifiable Information (PII), especially when it comes to your signature. As such, it is unacceptable in many environments to automatically upload PII to a website without explicit approval by the user." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off handwriting recognition error reporting Note: This Group Policy path is provided by the Group Policy template InkWatson.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.4" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HandwritingErrorReports -> PreventHandwritingErrorReports -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HandwritingErrorReports -> !PreventHandwritingErrorReports;' - - id: 12543 - title: "Ensure 'Turn off Internet Connection Wizard if URL connection is referring to Microsoft.com' is set to 'Enabled'" - description: "This policy setting specifies whether the Internet Connection Wizard can connect to Microsoft to download a list of Internet Service Providers (ISPs). The recommended state for this setting is: Enabled." - rationale: "In an enterprise managed environment we want to lower the risk of a user unknowingly exposing sensitive data." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Internet Connection Wizard if URL connection is referring to Microsoft.com Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.5" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Internet Connection Wizard -> ExitOnMSICW -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Internet Connection Wizard -> !ExitOnMSICW;' - - id: 12544 - title: "Ensure 'Turn off Registration if URL connection is referring to Microsoft.com' is set to 'Enabled'" - description: "This policy setting specifies whether the Windows Registration Wizard connects to Microsoft.com for online registration. The recommended state for this setting is: Enabled." - rationale: "Users in an enterprise managed environment should not be registering their own copies of Windows, providing their own PII in the process." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Registration if URL connection is referring to Microsoft.com Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.8" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Policies\Microsoft\Windows\Registration Wizard Control -> NoRegistration -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Policies\Microsoft\Windows\Registration Wizard Control -> !NoRegistration;' - - id: 12545 - title: "Ensure 'Turn off Search Companion content file updates' is set to 'Enabled'" - description: "This policy setting specifies whether Search Companion should automatically download content updates during local and Internet searches. The recommended state for this setting is: Enabled." - rationale: "There is a small risk that users will unknowingly reveal sensitive information because of the topics they are searching for. This risk is very low because even if this setting is enabled users still must submit search queries to the desired search engine in order to perform searches." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Search Companion content file updates Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.9" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SearchCompanion -> DisableContentFileUpdates -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SearchCompanion -> !DisableContentFileUpdates;' - - id: 12546 - title: "Ensure 'Turn off the \"Order Prints\" picture task' is set to 'Enabled'" - description: "This policy setting specifies whether the \"Order Prints Online\" task is available from Picture Tasks in Windows folders. The Order Prints Online Wizard is used to download a list of providers and allow users to order prints online. The recommended state for this setting is: Enabled." - rationale: "In an enterprise managed environment we want to lower the risk of a user unknowingly exposing sensitive data." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the \"Order Prints\" picture task Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.10" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoOnlinePrintsWizard -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> !NoOnlinePrintsWizard;' - - id: 12547 - title: "Ensure 'Turn off the \"Publish to Web\" task for files and folders' is set to 'Enabled'" - description: "This policy setting specifies whether the tasks Publish this file to the Web, Publish this folder to the Web, and Publish the selected items to the Web are available from File and Folder Tasks in Windows folders. The Web Publishing wizard is used to download a list of providers and allow users to publish content to the Web. The recommended state for this setting is: Enabled." - rationale: "Users may publish confidential or sensitive information to a public service outside of the control of the organization." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the \"Publish to Web\" task for files and folders Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.11" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoPublishingWizard -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> !NoPublishingWizard;' - - id: 12548 - title: "Ensure 'Turn off the Windows Messenger Customer Experience Improvement Program' is set to 'Enabled'" - description: "This policy setting specifies whether Windows Messenger can collect anonymous information about how the Windows Messenger software and service is used. Microsoft uses information collected through the Customer Experience Improvement Program to detect software flaws so that they can be corrected more quickly, enabling this setting will reduce the amount of data Microsoft is able to gather for this purpose. The recommended state for this setting is: Enabled." - rationale: "Large enterprise managed environments may not want to have information collected by Microsoft from managed client computers." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the Windows Messenger Customer Experience Improvement Program Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.12" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Messenger\Client -> CEIP -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Messenger\Client -> !CEIP;' - - id: 12549 - title: "Ensure 'Turn off Windows Customer Experience Improvement Program' is set to 'Enabled'" - description: "This policy setting specifies whether Windows Messenger can collect anonymous information about how the Windows Messenger software and service is used. Microsoft uses information collected through the Windows Customer Experience Improvement Program to detect software flaws so that they can be corrected more quickly, enabling this setting will reduce the amount of data Microsoft is able to gather for this purpose. The recommended state for this setting is: Enabled." - rationale: "Large enterprise managed environments may not want to have information collected by Microsoft from managed client computers." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Windows Customer Experience Improvement Program Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.13" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SQMClient\Windows -> CEIPEnable -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SQMClient\Windows -> !CEIPEnable;' - - id: 12550 - title: "Ensure 'Turn off Windows Error Reporting' is set to 'Enabled'" - description: "This policy setting controls whether or not errors are reported to Microsoft. Error Reporting is used to report information about a system or application that has failed or has stopped responding and is used to improve the quality of the product. The recommended state for this setting is: Enabled." - rationale: "If a Windows Error occurs in a secure, enterprise managed environment, the error should be reported directly to IT staff for troubleshooting and remediation. There is no benefit to the corporation to report these errors directly to Microsoft, and there is some risk of unknowingly exposing sensitive data as part of the error." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Windows Error Reporting Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.14" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> Disabled -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> !Disabled;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PCHealth\ErrorReporting -> DoReport -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PCHealth\ErrorReporting -> !DoReport;' - - id: 12551 - title: "Ensure 'Support device authentication using certificate' is set to 'Enabled: Automatic'" - description: "This policy setting allows you to set support for Kerberos to attempt authentication using the certificate for the device to the domain. Support for device authentication using certificate will require connectivity to a DC in the device account domain which supports certificate authentication for computer accounts. The recommended state for this setting is: Enabled: Automatic." - rationale: "Having stronger device authentication with the use of certificates is strongly encouraged over standard username and password authentication. Having this set to Automatic will allow certificate based authentication to be used whenever possible." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Automatic: Computer Configuration\\Policies\\Administrative Templates\\System\\Kerberos\\Support device authentication using certificate Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Kerberos.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." - compliance: - - cis: "18.8.25.1" - - cis_csc: "1.6" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\kerberos\parameters -> DevicePKInitBehavior -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\kerberos\parameters -> DevicePKInitEnabled -> !1;' - - id: 12552 - title: "Ensure 'Disallow copying of user input methods to the system account for sign-in' is set to 'Enabled'" - description: "This policy prevents automatic copying of user input methods to the system account for use on the sign-in screen. The user is restricted to the set of input methods that are enabled in the system account. The recommended state for this setting is: Enabled." - rationale: "This is a way to increase the security of the system account." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Locale Services\\Disallow copying of user input methods to the system account for sign-in Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Globalization.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.26.1" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Control Panel\International -> BlockUserInputMethodsForSignIn -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Control Panel\International -> !BlockUserInputMethodsForSignIn;' - - id: 12553 - title: "Ensure 'Microsoft Support Diagnostic Tool: Turn on MSDT interactive communication with support provider' is set to 'Disabled'" - description: "This policy setting configures Microsoft Support Diagnostic Tool (MSDT) interactive communication with the support provider. MSDT gathers diagnostic data for analysis by support professionals. The recommended state for this setting is: Disabled." - rationale: "Due to privacy concerns, data should never be sent to any 3rd party since this data could contain sensitive information." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Troubleshooting and Diagnostics\\Microsoft Support Diagnostic Tool\\Microsoft Support Diagnostic Tool: Turn on MSDT interactive communication with support provider Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MSDT.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.44.5.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\ScriptedDiagnosticsProvider\Policy -> DisableQueryRemoteServer -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\ScriptedDiagnosticsProvider\Policy -> !DisableQueryRemoteServer;' - - id: 12554 - title: "Ensure 'Enable/Disable PerfTrack' is set to 'Disabled'" - description: "This policy setting specifies whether to enable or disable tracking of responsiveness events. The recommended state for this setting is: Disabled." - rationale: "When enabled the aggregated data of a given event will be transmitted to Microsoft. The option exists to restrict this feature for a specific user, set the consent level, and designate specific programs for which error reports could be sent. However, centrally restricting the ability to execute PerfTrack to limit the potential for unauthorized or undesired usage, data leakage, or unintentional communications is highly recommended." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Troubleshooting and Diagnostics\\Windows Performance PerfTrack\\Enable/Disable PerfTrack Note: This Group Policy path may not exist by default. It is provided by the Group Policy template PerformancePerftrack.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.8.44.11.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WDI\{9c5a40da-b965-4fc3-8781-88dd50a6299d} -> ScenarioExecutionEnabled -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WDI\{9c5a40da-b965-4fc3-8781-88dd50a6299d} -> !ScenarioExecutionEnabled;' - - id: 12555 - title: "Ensure 'Turn off the advertising ID' is set to 'Enabled'" - description: "This policy setting turns off the advertising ID, preventing apps from using the ID for experiences across apps. The recommended state for this setting is: Enabled." - rationale: "Tracking user activity for advertising purposes, even anonymously, may be a privacy concern. In an enterprise managed environment, applications should not need or require tracking for targeted advertising." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\User Profiles\\Turn off the advertising ID Note: This Group Policy path may not exist by default. It is provided by the Group Policy template UserProfiles.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.8.46.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo -> DisabledByGroupPolicy -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo -> !DisabledByGroupPolicy;' - - id: 12556 - title: "Ensure 'Enable Windows NTP Client' is set to 'Enabled'" - description: "This policy setting specifies whether the Windows NTP Client is enabled. Enabling the Windows NTP Client allows your computer to synchronize its computer clock with other NTP servers. You might want to disable this service if you decide to use a third-party time provider. The recommended state for this setting is: Enabled." - rationale: "A reliable and accurate account of time is important for a number of services and security requirements, including but not limited to distributed applications, authentication services, multi-user databases and logging services. The use of an NTP client (with secure operation) establishes functional accuracy and is a focal point when reviewing security relevant events." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Windows Time Service\\Time Providers\\Enable Windows NTP Client Note: This Group Policy path is provided by the Group Policy template W32Time.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.49.1.1" - - cis_csc: "6.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\W32Time\TimeProviders\NtpClient -> Enabled -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\W32Time\TimeProviders\NtpClient -> !Enabled;' - - id: 12557 - title: "Ensure 'Enable Windows NTP Server' is set to 'Disabled'" - description: "This policy setting allows you to specify whether the Windows NTP Server is enabled. The recommended state for this setting is: Disabled." - rationale: "The configuration of proper time synchronization is critically important in an enterprise managed environment both due to the sensitivity of Kerberos authentication timestamps and also to ensure accurate security logging." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Windows Time Service\\Time Providers\\Enable Windows NTP Server Note: This Group Policy path is provided by the Group Policy template W32Time.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.49.1.2" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\W32Time\TimeProviders\NtpServer -> Enabled -> !0;' -# 18.9 Windows Components - - id: 12558 - title: "Ensure 'Allow a Windows app to share application data between users' is set to 'Disabled'" - description: "Manages a Windows app's ability to share data between users who have installed the app. Data is shared through the SharedLocal folder. This folder is available through the Windows.Storage API. The recommended state for this setting is: Disabled." - rationale: "Users of a system could accidentally share sensitive data with other users on the same system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\App Package Deployment\\Allow a Windows app to share application data between users Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AppxPackageManager.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." - compliance: - - cis: "18.9.4.1" - - cis_csc: "14.4, 14.6" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\AppModel\StateManager -> AllowSharedLocalAppData -> !0;' - - id: 12559 - title: "Ensure 'Block launching Windows Store apps with Windows Runtime API access from hosted content.' is set to 'Enabled'" - description: "This policy setting controls whether Windows Store apps with Windows Runtime API access directly from web content can be launched. The recommended state for this setting is: Enabled." - rationale: "Blocking apps from the web with direct access to the Windows API can prevent malicious apps from being run on a system. Only system administrators should be installing approved applications." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\App runtime\\Block launching Windows Store apps with Windows Runtime API access from hosted content. Note: A reboot may be required after the setting is applied. Note #2: This Group Policy path may not exist by default. It is provided by the Group Policy template AppXRuntime.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." - compliance: - - cis: "18.9.6.2" - - cis_csc: "7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> BlockHostedAppAccessWinRT -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> !BlockHostedAppAccessWinRT;' - - id: 12560 - title: "Ensure 'Allow Use of Camera' is set to 'Disabled'" - description: "This policy setting controls whether the use of Camera devices on the machine are permitted. The recommended state for this setting is: Disabled." - rationale: "Cameras in a high security environment can pose serious privacy and data exfiltration risks - they should be disabled to help mitigate that risk." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Camera\\Allow Use of Camera Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Camera.admx/adml that is included with the Microsoft Windows 10 Release 1607 & Server 2016 Administrative Templates (or newer)." - compliance: - - cis: "18.9.12.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Camera -> AllowCamera -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Camera -> !AllowCamera;' - - id: 12561 - title: "Ensure 'Configure Authenticated Proxy usage for the Connected User Experience and Telemetry service' is set to 'Enabled: Disable Authenticated Proxy usage'" - description: "This policy setting controls whether the Connected User Experience and Telemetry service can automatically use an authenticated proxy to send data back to Microsoft. The recommended state for this setting is: Enabled: Disable Authenticated Proxy usage." - rationale: "Sending any data to a 3rd party vendor is a security concern and should only be done on an as needed basis." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Disable Authenticated Proxy usage: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Configure Authenticated Proxy usage for the Connected User Experience and Telemetry service Note: This Group Policy path may not exist by default. It is provided by the Group Policy template DataCollection.admx/adml that is included with the Microsoft Windows 10 Release 1703 Administrative Templates (or newer)." - compliance: - - cis: "18.9.16.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection -> DisableEnterpriseAuthProxy -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection -> !DisableEnterpriseAuthProxy;' - - id: 12562 - title: "Ensure 'Turn off location' is set to 'Enabled'" - description: "This policy setting turns off the location feature for the computer. The recommended state for this setting is: Enabled." - rationale: "This setting affects the location feature (e.g. GPS or other location tracking). From a security perspective, it’s not a good idea to reveal your location to software in most cases, but there are legitimate uses, such as mapping software. However, they should not be used in high security environments." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Location and Sensors\\Turn off location Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Sensors.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.9.39.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors -> DisableLocation -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors -> !DisableLocation;' - - id: 12563 - title: "Ensure 'Allow Message Service Cloud Sync' is set to 'Disabled'" - description: "This policy setting allows backup and restore of cellular text messages to Microsoft's cloud services. The recommended state for this setting is: Disabled." - rationale: "In a high security environment, data should never be sent to any 3rd party since this data could contain sensitive information." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Messaging\\Allow Message Service Cloud Sync Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Messaging.admx/adml that is included with the Microsoft Windows 10 Release 1709 Administrative Templates (or newer)." - compliance: - - cis: "18.9.43.1" - - cis_csc: "9.1, 9.2, 13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Messaging -> AllowMessageSync -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Messaging -> !AllowMessageSync;' - - id: 12564 - title: "Ensure 'Allow Address bar drop-down list suggestions' is set to 'Disabled'" - description: "This setting determines whether the Address bar drop-down functionality is available in Microsoft Edge. The recommended state for this setting is: Disabled." - rationale: "Having Address bar drop-down list suggestions sent out to be processed is considered a privacy concern." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Allow Address bar drop-down list suggestions Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MicrosoftEdge.admx/adml that is included with the Microsoft Windows 10 Release 1703 Administrative Templates (or newer)." - compliance: - - cis: "18.9.45.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\ServiceUI -> ShowOneBox -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\ServiceUI -> !ShowOneBox;' - - id: 12565 - title: "Ensure 'Allow Adobe Flash' is set to 'Disabled'" - description: "This setting lets you decide whether employees can run Adobe Flash in Microsoft Edge. The recommended state for this setting is: Disabled." - rationale: "Adobe Flash is a very insecure product and has been a frequent attack vector on the web. In more highly security-sensitive environments, Adobe Flash should be disabled completely to eliminate this attack vector. Note: This setting will not prevent or remove Adobe Flash usage from other web browsers, so we recommend also uninstalling Adobe Flash completely from all systems in highly security-sensitive environments." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Allow Adobe Flash Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MicrosoftEdge.admx/adml that is included with the Microsoft Windows 10 Release 1703 Administrative Templates (or newer)." - compliance: - - cis: "18.9.45.2" - - cis_csc: "7.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Addons -> FlashPlayerEnabled -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Addons -> !FlashPlayerEnabled;' - - id: 12566 - title: "Ensure 'Allow InPrivate Browsing' is set to 'Disabled'" - description: "This setting lets you decide whether employees can browse using InPrivate website browsing. The recommended state for this setting is: Disabled." - rationale: "Even though web filter logs can monitor traffic to and from websites, it is always a good practice to try and keep multiple source of logs. It can also be helpful to keep user from privately browsing in order to troubleshoot malicious site visits if a machine has become compromised." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Allow InPrivate Browsing Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MicrosoftEdge.admx/adml that is included with the Microsoft Windows 10 Release 1511 Administrative Templates (or newer). Note #2: In the Microsoft Windows 10 Release 1511 Administrative Templates, this setting was named Turn off InPrivate browsing, but it was renamed starting with the Windows 10 Release 1607 & Server 2016 Administrative Templates." - compliance: - - cis: "18.9.45.3" - - cis_csc: "7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> AllowInPrivate -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> !AllowInPrivate;' - - id: 12567 - title: "Ensure 'Configure Pop-up Blocker' is set to 'Enabled'" - description: "This setting lets you decide whether to turn on Pop-up Blocker and whether to allow pop- ups to appear in secondary windows. The recommended state for this setting is: Enabled." - rationale: "The Pop-up Blocker serves an important purpose by blocking malicious popups and helping prevent the machine from being compromised." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Configure Pop-up Blocker Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MicrosoftEdge.admx/adml that is included with the Microsoft Windows 10 Release 1511 Administrative Templates (or newer). Note #2: In the Microsoft Windows 10 Release 1511 Administrative Templates, this setting was named Turn off Pop-up Blocker, but it was renamed starting with the Windows 10 Release 1607 & Server 2016 Administrative Templates." - compliance: - - cis: "18.9.45.6" - - cis_csc: "7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> AllowPopups -> !r:yes;' - - id: 12568 - title: "Ensure 'Configure search suggestions in Address bar' is set to 'Disabled'" - description: "This setting lets you decide whether search suggestions should appear in the Address bar of Microsoft Edge. The recommended state for this setting is: Disabled." - rationale: "Having search suggestions sent out to be processed is considered a privacy concern." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Configure search suggestions in Address bar Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MicrosoftEdge.admx/adml that is included with the Microsoft Windows 10 Release 1507 Administrative Templates (or newer). Note #2: In the Microsoft Windows 10 Release 1507 Administrative Templates, this setting was named Stops address bar from showing search suggestions. In the Microsoft Windows 10 Release 1511 Administrative Templates, this setting was renamed to Turn off address bar search suggestions, but it was finally renamed to Configure search suggestions in Address bar starting with the Windows 10 Release 1607 & Server 2016 Administrative Templates." - compliance: - - cis: "18.9.45.7" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\SearchScopes -> ShowSearchSuggestionsGlobal -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\SearchScopes -> !ShowSearchSuggestionsGlobal;' - - id: 12569 - title: "Ensure 'Prevent access to the about:flags page in Microsoft Edge' is set to 'Enabled'" - description: "This policy setting lets you decide whether employees can access the about:flags page, which is used to change developer settings and to enable experimental features. The recommended state for this setting is: Enabled." - rationale: "Users should not have access to developer settings and experimental features. Vulnerabilities could be introduced if these settings are not properly managed." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Prevent access to the about:flags page in Microsoft Edge Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MicrosoftEdge.admx/adml that is included with the Microsoft Windows 10 Release 1607 & Server 2016 Administrative Templates (or newer)." - compliance: - - cis: "18.9.45.9" - - cis_csc: "3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> PreventAccessToAboutFlagsInMicrosoftEdge -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> !PreventAccessToAboutFlagsInMicrosoftEdge;' - - id: 12570 - title: "Ensure 'Prevent using Localhost IP address for WebRTC' is set to 'Enabled'" - description: "This setting lets you decide whether an employee's LocalHost IP address shows while making phone calls using the WebRTC protocol. The recommended state for this setting is: Enabled." - rationale: "WebRTC is a Real-Time Communications open source project supported by all major browsers. Allowing a system's local IP address to be shared may be considered a privacy concern." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Microsoft Edge\\Prevent using Localhost IP address for WebRTC Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MicrosoftEdge.admx/adml that is included with the Microsoft Windows 10 Release 1511 Administrative Templates (or newer). Note #2: In the Microsoft Windows 10 Release 1511 Administrative Templates, this setting was named Don't allow WebRTC to share the LocalHost IP address, but it was renamed starting with the Windows 10 Release 1607 & Server 2016 Administrative Templates." - compliance: - - cis: "18.9.45.10" - - cis_csc: "7.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> HideLocalHostIP -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main -> !HideLocalHostIP;' - - id: 12571 - title: "Ensure 'Turn off Push To Install service' is set to 'Enabled'" - description: "This policy setting controls whether users can push Apps to the device from the Windows Store App running on other devices or the web. The recommended state for this setting is: Enabled." - rationale: "In a high security managed environment, application installations should be managed centrally by IT staff, not by end users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Push to Install\\Turn off Push To Install service Note: This Group Policy path may not exist by default. It is provided by the Group Policy template PushToInstall.admx/adml that is included with the Microsoft Windows 10 Release 1709 Administrative Templates (or newer)." - compliance: - - cis: "18.9.57.1" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PushToInstall -> DisablePushToInstall -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PushToInstall -> !DisablePushToInstall;' - - id: 12572 - title: "Ensure 'Allow users to connect remotely by using Remote Desktop Services' is set to 'Disabled'" - description: "This policy setting allows you to configure remote access to computers by using Remote Desktop Services. The recommended state for this setting is: Disabled." - rationale: "Any account with the Allow log on through Remote Desktop Services user right can log on to the remote console of the computer. If you do not restrict access to legitimate users who need to log on to the console of the computer, unauthorized users could download and execute malicious code to elevate their privileges." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Connections\\Allow users to connect remotely by using Remote Desktop Services Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Allow users to connect remotely using Terminal Services, but it was renamed to Allow users to connect remotely using Remote Desktop Services in the Windows 7 & Server 2008 R2 Administrative Templates. It was renamed again to Allow users to connect remotely by using Remote Desktop Services in the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.58.3.2.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDenyTSConnections -> !1;' - - id: 12573 - title: "Ensure 'Do not allow COM port redirection' is set to 'Enabled'" - description: "This policy setting specifies whether to prevent the redirection of data to client COM ports from the remote computer in a Remote Desktop Services session. The recommended state for this setting is: Enabled." - rationale: "In a more security-sensitive environment, it is desirable to reduce the possible attack surface. The need for COM port redirection within a Remote Desktop session is very rare, so makes sense to reduce the number of unexpected avenues for data exfiltration and/or malicious code transfer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow COM port redirection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.3.1" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableCcm -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fDisableCcm;' - - id: 12574 - title: "Ensure 'Do not allow LPT port redirection' is set to 'Enabled'" - description: "This policy setting specifies whether to prevent the redirection of data to client LPT ports during a Remote Desktop Services session. The recommended state for this setting is: Enabled." - rationale: "In a more security-sensitive environment, it is desirable to reduce the possible attack surface. The need for LPT port redirection within a Remote Desktop session is very rare, so makes sense to reduce the number of unexpected avenues for data exfiltration and/or malicious code transfer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow LPT port redirection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.3.3" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableLPT -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fDisableLPT;' - - id: 12575 - title: "Ensure 'Do not allow supported Plug and Play device redirection' is set to 'Enabled'" - description: "This policy setting allows you to control the redirection of supported Plug and Play devices, such as Windows Portable Devices, to the remote computer in a Remote Desktop Services session. The recommended state for this setting is: Enabled." - rationale: "In a more security-sensitive environment, it is desirable to reduce the possible attack surface. The need for Plug and Play device redirection within a Remote Desktop session is very rare, so makes sense to reduce the number of unexpected avenues for data exfiltration and/or malicious code transfer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow supported Plug and Play device redirection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.3.4" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisablePNPRedir -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fDisablePNPRedir;' - - id: 12576 - title: "Ensure 'Set time limit for active but idle Remote Desktop Services sessions' is set to 'Enabled: 15 minutes or less'" - description: "This policy setting allows you to specify the maximum amount of time that an active Remote Desktop Services session can be idle (without user input) before it is automatically disconnected. The recommended state for this setting is: Enabled: 15 minutes or less." - rationale: "This setting helps to prevent active Remote Desktop sessions from tying up the computer for long periods of time while not in use, preventing computing resources from being consumed by large numbers of inactive sessions. In addition, old, forgotten Remote Desktop sessions that are still active can cause password lockouts if the user's password has changed but the old session is still running. For systems that limit the number of connected users (e.g. servers in the default Administrative mode - 2 sessions only), other users' old but still active sessions can prevent another user from connecting, resulting in an effective denial of service." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 15 minutes or less: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Session Time Limits\\Set time limit for active but idle Remote Desktop Services sessions Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Set time limit for active but idle Terminal Services sessions, but it was renamed starting with the Windows 7 & Server 2008 R2 Administrative Templates." - compliance: - - cis: "18.9.58.3.10.1" - - cis_csc: "16.5" - references: - - https://workbench.cisecurity.org/benchmarks/766 - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba2;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba3;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba4;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba5;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba6;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba7;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba8;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba9;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba\D;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbbb\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbbc\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbbd\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbbe\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbbf\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbc\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbd\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbe\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbf\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dc\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dd\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:de\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:df\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:e\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:f\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:\w\w\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !MaxIdleTime;' - - id: 12577 - title: "Ensure 'Set time limit for disconnected sessions' is set to 'Enabled: 1 minute'" - description: "This policy setting allows you to configure a time limit for disconnected Remote Desktop Services sessions. The recommended state for this setting is: Enabled: 1 minute." - rationale: "This setting helps to prevent active Remote Desktop sessions from tying up the computer for long periods of time while not in use, preventing computing resources from being consumed by large numbers of disconnected but still active sessions. In addition, old, forgotten Remote Desktop sessions that are still active can cause password lockouts if the user's password has changed but the old session is still running. For systems that limit the number of connected users (e.g. servers in the default Administrative mode - 2 sessions only), other users' old but still active sessions can prevent another user from connecting, resulting in an effective denial of service. This setting is important to ensure a disconnected session is properly terminated." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 1 minute: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Session Time Limits\\Set time limit for disconnected sessions Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.10.2" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxDisconnectionTime -> !EA60;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !MaxDisconnectionTime;' - - id: 12578 - title: "Ensure 'Allow Cloud Search' is set to 'Enabled: Disable Cloud Search'" - description: "This policy setting allows search and Cortana to search cloud sources like OneDrive and SharePoint. The recommended state for this setting is: Enabled: Disable Cloud Search." - rationale: "Due to privacy concerns, data should never be sent to any 3rd party since this data could contain sensitive information." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Disable Cloud Search: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Allow Cloud Search Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Search.admx/adml that is included with the Microsoft Windows 10 Release 1709 Administrative Templates (or newer)." - compliance: - - cis: "18.9.60.2" - - cis_csc: "9.1, 9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> AllowCloudSearch -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> !AllowCloudSearch;' - - id: 12579 - title: "Ensure 'Turn off KMS Client Online AVS Validation' is set to 'Enabled'" - description: "The Key Management Service (KMS) is a Microsoft license activation method that entails setting up a local server to store the software licenses. The KMS server itself needs to connect to Microsoft to activate the KMS service, but subsequent on-network clients can activate Microsoft Windows OS and/or their Microsoft Office via the KMS server instead of connecting directly to Microsoft. This policy setting lets you opt-out of sending KMS client activation data to Microsoft automatically. The recommended state for this setting is: Enabled." - rationale: "Even though the KMS licensing method does not require KMS clients to connect to Microsoft, they still send KMS client activation state data to Microsoft automatically. Preventing this information from being sent can help reduce privacy concerns in high security environments." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Software Protection Platform\\Turn off KMS Client Online AVS Validation Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AVSValidationGP.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." - compliance: - - cis: "18.9.65.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform -> NoGenTicket -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform -> !NoGenTicket;' - - id: 12580 - title: "Ensure 'Disable all apps from Windows Store' is set to 'Disabled'" - description: "This setting configures the launch of all apps from the Windows Store that came pre- installed or were downloaded. The recommended state for this setting is: Disabled." - rationale: "The Store service is a retail outlet built into Windows, primarily for consumer use. In an enterprise managed environment the IT department should be managing the installation of all applications to reduce the risk of the installation of vulnerable software." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Store\\Disable all apps from Windows Store Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsStore.admx/adml that is included with the Microsoft Windows 10 Release 1511 Administrative Templates (or newer)." - compliance: - - cis: "18.9.68.1" - - cis_csc: "2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore -> DisableStoreApps -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore -> !DisableStoreApps;' - - id: 12581 - title: "Ensure 'Turn off the Store application' is set to 'Enabled'" - description: "This setting denies or allows access to the Store application. The recommended state for this setting is: Enabled. Note: Per Microsoft TechNet and MSKB 3135657, this policy setting does not apply to any Windows 10 editions other than Enterprise and Education." - rationale: "Only applications approved by an IT department should be installed. Allowing users to install 3rd party applications can lead to missed patches and potential zero day vulnerabilities." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Store\\Turn off the Store application Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WinStoreUI.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates, or by the Group Policy template WindowsStore.admx/adml that is included with the Microsoft Windows 10 Release 1511 Administrative Templates (or newer)." - compliance: - - cis: "18.9.68.4" - - cis_csc: "2" - references: - - https://docs.microsoft.com/en-us/windows/client-management/group-policies-for-enterprise-and-education-editions - - https://support.microsoft.com/en-us/help/3135657/can-t-disable-windows-store-in-windows-10-pro-through-group-policy - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore -> RemoveWindowsStore -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore -> !RemoveWindowsStore;' - - id: 12582 - title: "Ensure 'Join Microsoft MAPS' is set to 'Disabled'" - description: "This policy setting allows you to join Microsoft Active Protection Service (MAPS), which Microsoft has now renamed to \"Windows Defender Antivirus Cloud Protection Service\". Microsoft MAPS / Windows Defender Antivirus Cloud Protection Service is the online community that helps you choose how to respond to potential threats. The community also helps stop the spread of new malicious software infections. You can choose to send basic or additional information about detected software. Additional information helps Microsoft create new definitions and help it to protect your computer. Possible options are:  (0x0) Disabled (default)  (0x1) Basic membership  (0x2) Advanced membership. The recommended state for this setting is: Disabled." - rationale: "The information that would be sent can include things like location of detected items on your computer if harmful software was removed. The information would be automatically collected and sent. In some instances personal information might unintentionally be sent to Microsoft. However, Microsoft states that it will not use this information to identify you or contact you. For privacy reasons in high security environments, it is best to prevent these data submissions altogether." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\MAPS\\Join Microsoft MAPS Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsDefender.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.9.76.3.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet -> SpynetReporting -> !0;' - - id: 12583 - title: "Ensure 'Configure Watson events' is set to 'Disabled'" - description: "This policy setting allows you to configure whether or not Watson events are sent. The recommended state for this setting is: Disabled." - rationale: "Watson events are the reports that get sent to Microsoft when a program or service crashes or fails, including the possibility of automatic submission. Preventing this information from being sent can help reduce privacy concerns." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Reporting\\Configure Watson events Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsDefender.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.9.76.9.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Reporting -> DisableGenericRePorts -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Reporting -> !DisableGenericRePorts;' - - id: 12584 - title: "Ensure 'Allow suggested apps in Windows Ink Workspace' is set to 'Disabled'" - description: "This policy setting determines whether suggested apps in Windows Ink Workspace are allowed. The recommended state for this setting is: Disabled." - rationale: "This Microsoft feature is designed to collect data and suggest apps based on that data collected. Disabling this setting will help ensure your data is not shared with any third party." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Ink Workspace\\Allow suggested apps in Windows Ink Workspace Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsInkWorkspace.admx/adml that is included with the Microsoft Windows 10 Release 1607 & Server 2016 Administrative Templates (or newer)." - compliance: - - cis: "18.9.84.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsInkWorkspace -> AllowSuggestedAppsInWindowsInkWorkspace -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsInkWorkspace -> !AllowSuggestedAppsInWindowsInkWorkspace;' - - id: 12585 - title: "Ensure 'Prevent Internet Explorer security prompt for Windows Installer scripts' is set to 'Disabled'" - description: "This policy setting controls whether Web-based programs are allowed to install software on the computer without notifying the user. The recommended state for this setting is: Disabled." - rationale: "Suppressing the system warning can pose a security risk and increase the attack surface on the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Prevent Internet Explorer security prompt for Windows Installer scripts Note: This Group Policy path is provided by the Group Policy template MSI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Disable IE security prompt for Windows Installer scripts, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.85.3" - - cis_csc: "7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> SafeForScripting -> !0;' - - id: 12586 - title: "Ensure 'Allow remote server management through WinRM' is set to 'Disabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service automatically listens on the network for requests on the HTTP transport over the default HTTP port. The recommended state for this setting is: Disabled." - rationale: "Any feature is a potential avenue of attack, those that enable inbound network connections are particularly risky. Only enable the use of the Windows Remote Management (WinRM) service on trusted networks and when feasible employ additional controls such as IPsec." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow remote server management through WinRM Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Allow automatic configuration of listeners, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.97.2.2" - - cis_csc: "3.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowAutoConfig -> !0;' - - id: 12587 - title: "Ensure 'Allow Remote Shell Access' is set to 'Disabled'" - description: "This policy setting allows you to manage configuration of remote access to all supported shells to execute scripts and commands. The recommended state for this setting is: Disabled. Note: The GPME help text for this setting is incorrectly worded, implying that configuring it to Enabled will reject new Remote Shell connections, and setting it to Disabled will allow Remote Shell connections. The opposite is true (and is consistent with the title of the setting). This is a wording mistake by Microsoft in the Administrative Template." - rationale: "Any feature is a potential avenue of attack, those that enable inbound network connections are particularly risky. Only enable the use of the Windows Remote Shell on trusted networks and when feasible employ additional controls such as IPsec." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Administrative Templates\\Windows Components\\Windows Remote Shell\\Allow Remote Shell Access Note: This Group Policy path is provided by the Group Policy template WindowsRemoteShell.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.98.1" - - cis_csc: "3.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service\WinRS -> AllowRemoteShellAccess -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service\WinRS -> !AllowRemoteShellAccess;' - diff --git a/sca/windows/cis_win2012r2_domainL1.yml b/sca/windows/cis_win2012r2_domainL1.yml new file mode 100644 index 000000000..a4944c705 --- /dev/null +++ b/sca/windows/cis_win2012r2_domainL1.yml @@ -0,0 +1,2246 @@ +# Security Configuration Assessment +# CIS Checks for Windows 2012 R2 Domain Controller L1 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.3.0 - 03-30-2018 +# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.1.0 - 11-02-2015 +# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.0.0 - 09-30-2015 + +policy: + id: "cis_win2012r2_domainL1" + file: "cis_win2012r2_domainL1.yml" + name: "CIS benchmark for Windows 2012 R2 Domain Controller L1" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for Microsoft Windows Server 2012 R2." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check that the Windows platform is Windows Server 2012 R2" + description: "Requirements for running the CIS benchmark Domain Controller L1 under Windows Server 2012 R2" + condition: all + rules: + - 'r:HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion -> ProductName -> r:^Windows Server 2012 R2' + +checks: +# Section 1.1 - Password Policies + - id: 11000 + title: "Ensure 'Maximum password age' is set to '60 or fewer days, but not 0'" + description: "This policy setting defines how long a user can use their password before it expires. Values for this policy setting range from 0 to 999 days. If you set the value to 0, the password will never expire. Because attackers can crack passwords, the more frequently you change the password the less opportunity an attacker has to use a cracked password. However, the lower this value is set, the higher the potential for an increase in calls to help desk support due to users having to change their password or forgetting which password is current. The recommended state for this setting is 60 or fewer days, but not 0." + rationale: "The longer a password exists the higher the likelihood that it will be compromised by a brute force attack, by an attacker gaining general knowledge about the user, or by the user sharing the password. Configuring the Maximum password age setting to 0 so that users are never required to change their passwords is a major security risk because that allows a compromised password to be used by the malicious user for as long as the valid user is authorized access." + remediation: "To establish the recommended configuration via GP, set the following UI path to 60 or fewer days, but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Account Policies\\Password Policy\\Maximum password age." + compliance: + - cis: ["1.1.2"] + - cis_csc: ["16.5"] + references: + - 'CCE-37167-4' + condition: all + rules: + - 'not r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> 0' + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> n:^(\d+) compare <= 60' + +# Section 2.3 - Security Options + - id: 11001 + title: "Ensure 'Accounts: Block Microsoft accounts' is set to 'Users can't add or log on with Microsoft accounts'" + description: "This policy setting prevents users from adding new Microsoft accounts on this computer. The recommended state for this setting is: Users can't add or log on with Microsoft accounts." + rationale: "Organizations that want to effectively implement identity management policies and maintain firm control of what accounts are used to log onto their computers will probably in order to meet the requirements of compliance standards that apply to their information systems." + remediation: "To establish the recommended configuration via GP, set the following UI path to Users can't add or log on with Microsoft accounts: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Accounts: Block Microsoft accounts." + compliance: + - cis: ["2.3.1.2"] + - cis_csc: ["16"] + references: + - 'CCE-36147-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> NoConnectedUser -> 3' + + - id: 11002 + title: "Ensure 'Accounts: Limit local account use of blank passwords to console logon only' is set to 'Enabled'" + description: "This policy setting determines whether local accounts that are not password protected can be used to log on from locations other than the physical computer console. If you enable this policy setting, local accounts that have blank passwords will not be able to log on to the network from remote client computers. Such accounts will only be able to log on at the keyboard of the computer. The recommended state for this setting is: Enabled." + rationale: "Blank passwords are a serious threat to computer security and should be forbidden through both organizational policy and suitable technical measures. In fact, the default settings for Active Directory domains require complex passwords of at least seven characters. However, if users with the ability to create new accounts bypass your domainbased password policies, they could create accounts with blank passwords. For example, a user could build a stand-alone computer, create one or more accounts with blank passwords, and then join the computer to the domain. The local accounts with blank passwords would still function. Anyone who knows the name of one of these unprotected accounts could then use it to log on." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Accounts: Limit local account use of blank passwords to console logon only." + compliance: + - cis: ["2.3.1.4"] + - cis_csc: ["16"] + references: + - 'CCE-37615-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LimitBlankPasswordUse -> 1' + + - id: 11003 + title: "Ensure 'Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings' is set to 'Enabled'" + description: "This policy setting allows administrators to enable the more precise auditing capabilities present in Windows Vista. The Audit Policy settings available in Windows Server 2003 Active Directory do not yet contain settings for managing the new auditing subcategories. To properly apply the auditing policies prescribed in this baseline, the Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings setting needs to be configured to Enabled. The recommended state for this setting is: Enabled. *Important*: Be very cautious about audit settings that can generate a large volume of traffic. For example, if you enable either success or failure auditing for all of the Privilege Use subcategories, the high volume of audit events generated can make it difficult to find other types of entries in the Security log. Such a configuration could also have a significant impact on system performance." + rationale: "Prior to the introduction of auditing subcategories in Windows Vista, it was difficult to track events at a per-system or per-user level. The larger event categories created too many events and the key information that needed to be audited was difficult to find." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings." + compliance: + - cis: ["2.3.2.1"] + - cis_csc: ["6.2"] + references: + - 'CCE-37850-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> SCENoApplyLegacyAuditPolicy -> 1' + + - id: 11004 + title: "Ensure 'Audit: Shut down system immediately if unable to log security audits' is set to 'Disabled'" + description: "This policy setting determines whether the system shuts down if it is unable to log Security events. It is a requirement for Trusted Computer System Evaluation Criteria (TCSEC)-C2 and Common Criteria certification to prevent auditable events from occurring if the audit system is unable to log them. Microsoft has chosen to meet this requirement by halting the system and displaying a stop message if the auditing system experiences a failure. When this policy setting is enabled, the system will be shut down if a security audit cannot be logged for any reason. The recommended state for this setting is: Disabled." + rationale: "If the computer is unable to record events to the Security log, critical evidence or important troubleshooting information may not be available for review after a security incident. Also, an attacker could potentially generate a large volume of Security log events to purposely force a computer shutdown." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Audit: Shut down system immediately if unable to log security audits." + compliance: + - cis: ["2.3.2.2"] + - cis_csc: ["6"] + references: + - 'CCE-35907-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> CrashOnAuditFail -> 0' + + - id: 11005 + title: "Ensure 'Devices: Allowed to format and eject removable media' is set to 'Administrators'" + description: "This policy setting determines who is allowed to format and eject removable NTFS media. You can use this policy setting to prevent unauthorized users from removing data on one computer to access it on another computer on which they have local administrator privileges. The recommended state for this setting is: Administrators." + rationale: "Users may be able to move data on removable disks to a different computer where they have administrative privileges. The user could then take ownership of any file, grant themselves full control, and view or modify any file. The fact that most removable storage devices will eject media by pressing a mechanical button diminishes the advantage of this policy setting." + remediation: "To establish the recommended configuration via GP, set the following UI path to Administrators and Interactive Users: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Devices: Allowed to format and eject removable media." + compliance: + - cis: ["2.3.4.1"] + - cis_csc: ["5.1"] + references: + - 'CCE-37701-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> AllocateDASD -> 0' + + - id: 11006 + title: "Ensure 'Domain controller: Allow server operators to schedule tasks' is set to 'Disabled' (DC only)" + description: "This policy setting determines whether members of the Server Operators group are allowed to submit jobs by means of the AT schedule facility. The impact of this policy setting configuration should be small for most organizations. Users, including those in the Server Operators group, will still be able to create jobs by means of the Task Scheduler Wizard, but those jobs will run in the context of the account with which the user authenticates when they set up the job. Note: An AT Service Account can be modified to select a different account rather than the LOCAL SYSTEM account. To change the account, open System Tools, click Scheduled Tasks, and then click Accessories folder. Then click AT Service Account on the Advanced menu. The recommended state for this setting is: Disabled." + rationale: "If you enable this policy setting, jobs that are created by server operators by means of the AT service will execute in the context of the account that runs that service. By default, that is the local SYSTEM account. If you enable this policy setting, server operators could perform tasks that SYSTEM is able to do but that they would typically not be able to do, such as add their account to the local Administrators group." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain controller: Allow server operators to schedule tasks." + compliance: + - cis: ["2.3.5.1"] + - cis_csc: ["5.1"] + references: + - 'CCE-37848-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> SubmitControl -> 0' + + - id: 11007 + title: "Ensure 'Domain controller: LDAP server signing requirements' is set to 'Require signing' (DC only)" + description: "This policy setting determines whether the Lightweight Directory Access Protocol (LDAP) server requires LDAP clients to negotiate data signing. The recommended state for this setting is: Require signing. Note: Domain member computers must have Network security: LDAP signing requirements (Rule 2.3.11.8) set to Negotiate signing or higher. If not, they will fail to authenticate once the above Require signing value is configured on the Domain Controllers. Fortunately, Negotiate signing is the default in the client configuration. Note #2: This policy setting does not have any impact on LDAP simple bind (ldap_simple_bind) or LDAP simple bind through SSL (ldap_simple_bind_s). No Microsoft LDAP clients that are shipped with Windows XP Professional use LDAP simple bind or LDAP simple bind through SSL to talk to a Domain Controller. Note #3: Before enabling this setting, you should first ensure that there are no clients (including server-based applications) that are configured to authenticate with Active Directory via unsigned LDAP, because changing this setting will break those applications. Such applications should first be reconfigured to use signed LDAP, Secure LDAP (LDAPS), or IPsec-protected connections." + rationale: "Unsigned network traffic is susceptible to man-in-the-middle attacks. In such attacks, an intruder captures packets between the server and the client, modifies them, and then forwards them to the client. Where LDAP servers are concerned, an attacker could cause a client to make decisions that are based on false records from the LDAP directory. To lower the risk of such an intrusion in an organization's network, you can implement strong physical security measures to protect the network infrastructure. Also, you could implement Internet Protocol security (IPsec) authentication header mode (AH), which performs mutual authentication and packet integrity for IP traffic to make all types of man- in-the-middle attacks extremely difficult. Additionally, allowing the use of regular, unsigned LDAP permits credentials to be received over the network in clear text, which could very easily result in the interception of account passwords by other systems on the network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Require signing: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain controller: LDAP server signing requirements." + compliance: + - cis: ["2.3.5.2"] + - cis_csc: ["3"] + references: + - https://blogs.technet.microsoft.com/russellt/2016/01/13/identifying-clear-text-ldap-binds-to-your-dcs/ + - 'CCE-35904-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NTDS\Parameters -> LDAPServerIntegrity -> 2' + + - id: 11008 + title: "Ensure 'Domain controller: Refuse machine account password changes' is set to 'Disabled' (DC only)" + description: "This security setting determines whether Domain Controllers will refuse requests from member computers to change computer account passwords. The recommended state for this setting is: Disabled." + rationale: "If you enable this policy setting on all Domain Controllers in a domain, domain members will not be able to change their computer account passwords, and those passwords will be more susceptible to attack." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain controller: Refuse machine account password changes." + compliance: + - cis: ["2.3.5.3"] + - cis_csc: ["16"] + references: + - 'CCE-36921-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> RefusePasswordChange -> 0' + + - id: 11009 + title: "Ensure 'Domain member: Digitally encrypt or sign secure channel data (always)' is set to 'Enabled'" + description: "This policy setting determines whether all secure channel traffic that is initiated by the domain member must be signed or encrypted. The recommended state for this setting is: Enabled." + rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated-and sensitive information such as passwords are encrypted-but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally encrypt or sign secure channel data (always)." + compliance: + - cis: ["2.3.6.1"] + - cis_csc: ["13"] + references: + - 'CCE-36142-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> RequireSignOrSeal -> 1' + + - id: 11010 + title: "Ensure 'Domain member: Digitally encrypt secure channel data (when possible)' is set to 'Enabled'" + description: "This policy setting determines whether a domain member should attempt to negotiate encryption for all secure channel traffic that it initiates. The recommended state for this setting is: Enabled." + rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated-and sensitive information such as passwords are encrypted-but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally encrypt secure channel data (when possible)." + compliance: + - cis: ["2.3.6.2"] + - cis_csc: ["13"] + references: + - 'CCE-37130-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> SealSecureChannel -> 1' + + - id: 11011 + title: "Ensure 'Domain member: Digitally sign secure channel data (when possible)' is set to 'Enabled'" + description: "This policy setting determines whether a domain member should attempt to negotiate whether all secure channel traffic that it initiates must be digitally signed. Digital signatures protect the traffic from being modified by anyone who captures the data as it traverses the network. The recommended state for this setting is: Enabled." + rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated-and sensitive information such as passwords are encrypted-but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally sign secure channel data (when possible)." + compliance: + - cis: ["2.3.6.3"] + - cis_csc: ["13"] + references: + - 'CCE-37222-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> SignSecureChannel -> 1' + + - id: 11012 + title: "Ensure 'Domain member: Disable machine account password changes' is set to 'Disabled'" + description: "This policy setting determines whether a domain member can periodically change its computer account password. Computers that cannot automatically change their account passwords are potentially vulnerable, because an attacker might be able to determine the password for the system's domain account. The recommended state for this setting is: Disabled." + rationale: "The default configuration for Windows Server 2003-based computers that belong to a domain is that they are automatically required to change the passwords for their accounts every 30 days. If you disable this policy setting, computers that run Windows Server 2003 will retain the same passwords as their computer accounts. Computers that are no longer able to automatically change their account password are at risk from an attacker who could determine the password for the computer's domain account." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Disable machine account password changes." + compliance: + - cis: ["2.3.6.4"] + - cis_csc: ["16"] + references: + - 'CCE-37508-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> DisablePasswordChange -> 0' + + - id: 11013 + title: "Ensure 'Domain member: Require strong (Windows 2000 or later) session key' is set to 'Enabled'" + description: "When this policy setting is enabled, a secure channel can only be established with Domain Controllers that are capable of encrypting secure channel data with a strong (128-bit) session key. To enable this policy setting, all Domain Controllers in the domain must be able to encrypt secure channel data with a strong key, which means all Domain Controllers must be running Microsoft Windows 2000 or newer. The recommended state for this setting is: Enabled." + rationale: "Session keys that are used to establish secure channel communications between Domain Controllers and member computers are much stronger in Windows 2000 than they were in previous Microsoft operating systems. Whenever possible, you should take advantage of these stronger session keys to help protect secure channel communications from attacks that attempt to hijack network sessions and eavesdropping. (Eavesdropping is a form of hacking in which network data is read or altered in transit. The data can be modified to hide or change the sender, or be redirected.)" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Require strong (Windows 2000 or later) session key." + compliance: + - cis: ["2.3.6.6"] + - cis_csc: ["13"] + references: + - 'CCE-37614-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> RequireStrongKey -> 1' + + - id: 11014 + title: "Ensure 'Interactive logon: Do not display last user name' is set to 'Enabled'" + description: "This policy setting determines whether the account name of the last user to log on to the client computers in your organization will be displayed in each computer's respective Windows logon screen. Enable this policy setting to prevent intruders from collecting account names visually from the screens of desktop or laptop computers in your organization. The recommended state for this setting is: Enabled." + rationale: "An attacker with access to the console (for example, someone with physical access or someone who is able to connect to the server through Remote Desktop Services) could view the name of the last user who logged on to the server. The attacker could then try to guess the password, use a dictionary, or use a brute-force attack to try and log on." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Do not display last user name." + compliance: + - cis: ["2.3.7.1"] + - cis_csc: ["13"] + references: + - 'CCE-36056-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> DontDisplayLastUserName -> 1' + + - id: 11015 + title: "Ensure 'Interactive logon: Do not require CTRL+ALT+DEL' is set to 'Disabled'" + description: "This policy setting determines whether users must press CTRL+ALT+DEL before they log on. The recommended state for this setting is: Disabled." + rationale: "Microsoft developed this feature to make it easier for users with certain types of physical impairments to log on to computers that run Windows. If users are not required to press CTRL+ALT+DEL, they are susceptible to attacks that attempt to intercept their passwords. If CTRL+ALT+DEL is required before logon, user passwords are communicated by means of a trusted path. An attacker could install a Trojan horse program that looks like the standard Windows logon dialog box and capture the user's password. The attacker would then be able to log on to the compromised account with whatever level of privilege that user has." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Do not require CTRL+ALT+DEL" + compliance: + - cis: ["2.3.7.2"] + - cis_csc: ["8"] + references: + - 'CCE-37637-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> DisableCAD -> 0' + + - id: 11016 + title: "Ensure 'Interactive logon: Machine inactivity limit' is set to '900 or fewer second(s), but not 0'" + description: "Windows notices inactivity of a logon session, and if the amount of inactive time exceeds the inactivity limit, then the screen saver will run, locking the session. The recommended state for this setting is: 900 or fewer second(s), but not 0. Note: A value of 0 does not conform to the benchmark as it disables the machine inactivity limit." + rationale: "If a user forgets to lock their computer when they walk away it's possible that a passerby will hijack it." + remediation: "To establish the recommended configuration via GP, set the following UI path to 900 or fewer seconds, but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Machine inactivity limit." + compliance: + - cis: ["2.3.7.3"] + - cis_csc: ["16.5"] + references: + - 'CCE-38235-8' + condition: all + rules: + - 'not r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 0' + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> n:^(\d+) compare <= 900' + + - id: 11017 + title: "Ensure 'Interactive logon: Prompt user to change password before expiration' is set to 'between 5 and 14 days'" + description: "This policy setting determines how far in advance users are warned that their password will expire. It is recommended that you configure this policy setting to at least 5 days but no more than 14 days to sufficiently warn users when their passwords will expire. The recommended state for this setting is: between 5 and 14 days." + rationale: "It is recommended that user passwords be configured to expire periodically. Users will need to be warned that their passwords are going to expire, or they may inadvertently be locked out of the computer when their passwords expire. This condition could lead to confusion for users who access the network locally, or make it impossible for users to access your organization's network through dial-up or virtual private network (VPN) connections." + remediation: "To establish the recommended configuration via GP, set the following UI path to a value between 5 and 14 days: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Prompt user to change password before expiration." + compliance: + - cis: ["2.3.7.7"] + - cis_csc: ["16"] + references: + - 'CCE-37622-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> n:^(\d+) compare >= 5 && n:^(\d+) compare <= 14' + + - id: 11018 + title: "Ensure 'Interactive logon: Smart card removal behavior' is set to 'Lock Workstation' or higher" + description: "This policy setting determines what happens when the smart card for a logged-on user is removed from the smart card reader. The recommended state for this setting is: Lock Workstation. Configuring this setting to Force Logoff or Disconnect if a Remote Desktop Services session also conforms to the benchmark." + rationale: "Users sometimes forget to lock their workstations when they are away from them, allowing the possibility for malicious users to access their computers. If smart cards are used for authentication, the computer should automatically lock itself when the card is removed to ensure that only the user with the smart card is accessing resources using those credentials." + remediation: "To establish the recommended configuration via GP, set the following UI path to Lock Workstation (or, if applicable for your environment, Force Logoff or Disconnect if a Remote Desktop Services session): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Smart card removal behavior." + compliance: + - cis: ["2.3.7.9"] + - cis_csc: ["16.5"] + references: + - 'CCE-38333-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScRemoveOption -> r:^1$|^2$|^3$' + + - id: 11019 + title: "Ensure 'Microsoft network client: Digitally sign communications (always)' is set to 'Enabled'" + description: "This policy setting determines whether packet signing is required by the SMB client component. Note: When Windows Vista-based computers have this policy setting enabled and they connect to file or print shares on remote servers, it is important that the setting is synchronized with its companion setting, Microsoft network server: Digitally sign communications (always), on those servers. For more information about these settings, see the 'Microsoft network client and server: Digitally sign communications (four related settings)' section in Chapter 5 of the Threats and Countermeasures guide. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Digitally sign communications (always)." + compliance: + - cis: ["2.3.8.1"] + - cis_csc: ["13"] + references: + - 'CCE-36325-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> RequireSecuritySignature -> 1' + + - id: 11020 + title: "Ensure 'Microsoft network client: Digitally sign communications (if server agrees)' is set to 'Enabled'" + description: "This policy setting determines whether the SMB client will attempt to negotiate SMB packet signing. Note: Enabling this policy setting on SMB clients on your network makes them fully effective for packet signing with all clients and servers in your environment. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Digitally sign communications (if server agrees)." + compliance: + - cis: ["2.3.8.2"] + - cis_csc: ["13"] + references: + - 'CCE-36269-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> EnableSecuritySignature -> 1' + + - id: 11021 + title: "Ensure 'Microsoft network client: Send unencrypted password to third-party SMB servers' is set to 'Disabled'" + description: "This policy setting determines whether the SMB redirector will send plaintext passwords during authentication to third-party SMB servers that do not support password encryption. It is recommended that you disable this policy setting unless there is a strong business case to enable it. If this policy setting is enabled, unencrypted passwords will be allowed across the network. The recommended state for this setting is: Disabled." + rationale: "If you enable this policy setting, the server can transmit passwords in plaintext across the network to other computers that offer SMB services, which is a significant security risk. These other computers may not use any of the SMB security mechanisms that are included with Windows Server 2003." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Send unencrypted password to third-party SMB servers." + compliance: + - cis: ["2.3.8.3"] + - cis_csc: ["13"] + references: + - 'CCE-37863-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> EnablePlainTextPassword -> 0' + + - id: 11022 + title: "Ensure 'Microsoft network server: Amount of idle time required before suspending session' is set to '15 or fewer minute(s), but not 0'" + description: "This policy setting allows you to specify the amount of continuous idle time that must pass in an SMB session before the session is suspended because of inactivity. Administrators can use this policy setting to control when a computer suspends an inactive SMB session. If client activity resumes, the session is automatically reestablished. A value of 0 appears to allow sessions to persist indefinitely. The maximum value is 99999, which is over 69 days; in effect, this value disables the setting. The recommended state for this setting is: 15 or fewer minute(s), but not 0." + rationale: "Each SMB session consumes server resources, and numerous null sessions will slow the server or possibly cause it to fail. An attacker could repeatedly establish SMB sessions until the server's SMB services become slow or unresponsive." + remediation: "To establish the recommended configuration via GP, set the following UI path to 15 or fewer minute(s), but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Amount of idle time required before suspending session." + compliance: + - cis: ["2.3.9.1"] + - cis_csc: ["3"] + references: + - 'CCE-38046-9' + condition: all + rules: + - 'not r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> 0' + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> n:^(\d+) compare <= 15' + + - id: 11023 + title: "Ensure 'Microsoft network server: Digitally sign communications (always)' is set to 'Enabled'" + description: "This policy setting determines whether packet signing is required by the SMB server component. Enable this policy setting in a mixed environment to prevent downstream clients from using the workstation as a network server. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Digitally sign communications (always)." + compliance: + - cis: ["2.3.9.2"] + - cis_csc: ["13"] + references: + - 'CCE-37864-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> RequireSecuritySignature -> 1' + + - id: 11024 + title: "Ensure 'Microsoft network server: Digitally sign communications (if client agrees)' is set to 'Enabled'" + description: "This policy setting determines whether the SMB server will negotiate SMB packet signing with clients that request it. If no signing request comes from the client, a connection will be allowed without a signature if the Microsoft network server: Digitally sign communications (always) setting is not enabled. Note: Enable this policy setting on SMB clients on your network to make them fully effective for packet signing with all clients and servers in your environment. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Digitally sign communications (if client agrees)." + compliance: + - cis: ["2.3.9.3"] + - cis_csc: ["13"] + references: + - 'CCE-35988-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> EnableSecuritySignature -> 1' + + - id: 11025 + title: "Ensure 'Microsoft network server: Disconnect clients when logon hours expire' is set to 'Enabled'" + description: "This security setting determines whether to disconnect users who are connected to the local computer outside their user account's valid logon hours. This setting affects the Server Message Block (SMB) component. If you enable this policy setting you should also enable Network security: Force logoff when logon hours expire (Rule 2.3.11.6). If your organization configures logon hours for users, this policy setting is necessary to ensure they are effective. The recommended state for this setting is: Enabled." + rationale: "If your organization configures logon hours for users, then it makes sense to enable this policy setting. Otherwise, users who should not have access to network resources outside of their logon hours may actually be able to continue to use those resources with sessions that were established during allowed hours." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Disconnect clients when logon hours expire." + compliance: + - cis: ["2.3.9.4"] + - cis_csc: ["16"] + references: + - 'CCE-37972-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> EnableForcedLogOff -> 1' + +# Section 2.3 - Security Options + - id: 11026 + title: "Ensure 'Network access: Do not allow storage of passwords and credentials for network authentication' is set to 'Enabled'" + description: "This policy setting determines whether Credential Manager (formerly called Stored User Names and Passwords) saves passwords or credentials for later use when it gains domain authentication. The recommended state for this setting is: Enabled. Note: Changes to this setting will not take effect until Windows is restarted." + rationale: "Passwords that are cached can be accessed by the user when logged on to the computer. Although this information may sound obvious, a problem can arise if the user unknowingly executes hostile code that reads the passwords and forwards them to another, unauthorized user." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow storage of passwords and credentials for network authentication." + compliance: + - cis: ["2.3.10.4"] + - cis_csc: ["16.14"] + references: + - 'CCE-38119-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> DisableDomainCreds -> 1' + + - id: 11027 + title: "Ensure 'Network access: Let Everyone permissions apply to anonymous users' is set to 'Disabled'" + description: "This policy setting determines what additional permissions are assigned for anonymous connections to the computer. The recommended state for this setting is: Disabled." + rationale: "An unauthorized user could anonymously list account names and shared resources and use the information to attempt to guess passwords, perform social engineering attacks, or launch DoS attacks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Let Everyone permissions apply to anonymous users." + compliance: + - cis: ["2.3.10.5"] + - cis_csc: ["14", "16"] + references: + - 'CCE-36148-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> EveryoneIncludesAnonymous -> 0' + + - id: 11028 + title: "Configure 'Network access: Named Pipes that can be accessed anonymously'" + description: "This policy setting determines which communication sessions, or pipes, will have attributes and permissions that allow anonymous access. The recommended state for this setting is: - Level 1 - Domain Controller. The recommended state for this setting is: LSARPC, NETLOGON, SAMR and (when the legacy Computer Browser service is enabled) BROWSER. - Level 1 - Member Server. The recommended state for this setting is: (i.e. None), or (when the legacy Computer Browser service is enabled) BROWSER. Note: A Member Server that holds the Remote Desktop Services Role with Remote Desktop Licensing Role Service will require a special exception to this recommendation, to allow the HydraLSPipe and TermServLicensing Named Pipes to be accessed anonymously." + rationale: "Limiting named pipes that can be accessed anonymously will reduce the attack surface of the system." + remediation: "To establish the recommended configuration via GP, configure the following UI path: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Named Pipes that can be accessed anonymously." + compliance: + - cis: ["2.3.10.6"] + - cis_csc: ["14.1", "16"] + references: + - 'CCE-38258-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> NullSessionPipes -> r:lsarpc|netlogon|samr' + + - id: 11029 + title: "Configure 'Network access: Remotely accessible registry paths'" + description: "This policy setting determines which registry paths will be accessible over the network, regardless of the users or groups listed in the access control list (ACL) of the winreg registry key. Note: This setting does not exist in Windows XP. There was a setting with that name in Windows XP, but it is called 'Network access: Remotely accessible registry paths and sub- paths' in Windows Server 2003, Windows Vista, and Windows Server 2008 (non-R2). Note #2: When you configure this setting you specify a list of one or more objects. The delimiter used when entering the list is a line feed or carriage return, that is, type the first object on the list, press the Enter button, type the next object, press Enter again, etc. The setting value is stored as a comma-delimited list in group policy security templates. It is also rendered as a comma-delimited list in Group Policy Editor's display pane and the Resultant Set of Policy console. It is recorded in the registry as a line-feed delimited list in a REG_MULTI_SZ value." + rationale: "The registry is a database that contains computer configuration information, and much of the information is sensitive. An attacker could use this information to facilitate unauthorized activities. To reduce the risk of such an attack, suitable ACLs are assigned throughout the registry to help protect it from access by unauthorized users." + remediation: "To establish the recommended configuration via GP, set the following UI path to: System\\CurrentControlSet\\Control\\ProductOptions | System\\CurrentControlSet\\Control\\Server Applications | Software\\Microsoft\\Windows NT\\CurrentVersion. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Remotely accessible registry paths." + compliance: + - cis: ["2.3.10.7"] + - cis_csc: ["14", "16"] + references: + - 'CCE-37194-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedExactPaths -> Machine -> r:System\\CurrentControlSet\\Control\\ProductOptions|System\\CurrentControlSet\\Control\\Server Applications|Software\\Microsoft\\Windows NT\\CurrentVersion' + + - id: 11030 + title: "Configure 'Network access: Remotely accessible registry paths and sub-paths'" + description: "This policy setting determines which registry paths and sub-paths will be accessible over the network, regardless of the users or groups listed in the access control list (ACL) of the winreg registry key. Note: In Windows XP this setting is called 'Network access: Remotely accessible registry paths,' the setting with that same name in Windows Vista, Windows Server 2008 (non-R2), and Windows Server 2003 does not exist in Windows XP. Note #2: When you configure this setting you specify a list of one or more objects. The delimiter used when entering the list is a line feed or carriage return, that is, type the first object on the list, press the Enter button, type the next object, press Enter again, etc. The setting value is stored as a comma-delimited list in group policy security templates. It is also rendered as a comma-delimited list in Group Policy Editor's display pane and the Resultant Set of Policy console. It is recorded in the registry as a line-feed delimited list in a REG_MULTI_SZ value." + rationale: "The registry contains sensitive computer configuration information that could be used by an attacker to facilitate unauthorized activities. The fact that the default ACLs assigned throughout the registry are fairly restrictive and help to protect the registry from access by unauthorized users reduces the risk of such an attack." + remediation: "To establish the recommended configuration via GP, set the following UI path to: System\\CurrentControlSet\\Control\\Print\\Printers | System\\CurrentControlSet\\Services\\Eventlog Software\\Microsoft\\OLAP Server | Software\\Microsoft\\Windows NT\\CurrentVersion\\Print Software\\Microsoft\\Windows | NT\\CurrentVersion\\Windows System\\CurrentControlSet\\Control\\ContentIndex | System\\CurrentControlSet\\Control\\Terminal Server | System\\CurrentControlSet\\Control\\Terminal Server\\UserConfig | System\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration | Software\\Microsoft\\Windows NT\\CurrentVersion\\Perflib | System\\CurrentControlSet\\Services\\SysmonLog | Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local | Policies\\Security Options\\Network access: Remotely accessible registry paths | and sub-paths. When a server holds the Active Directory Certificate Services Role with Certification Authority Role Service, the above list should also include: System\\CurrentControlSet\\Services\\CertSvc. When a server has the WINS Server Feature installed, the above list should also include: System\\CurrentControlSet\\Services\\WINS" + compliance: + - cis: ["2.3.10.8"] + - cis_csc: ["14", "16"] + references: + - 'CCE-36347-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedPaths -> Machine -> r:Software\\Microsoft\\Windows NT\\CurrentVersion\\Print|Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows|System\\CurrentControlSet\\Control\\Print\\Printers|System\\CurrentControlSet\\Services\\Eventlog|Software\\Microsoft\\OLAP Server|System\\CurrentControlSet\\Control\\ContentIndex|System\\CurrentControlSet\\Control\\Terminal Server|System\\CurrentControlSet\\Control\\Terminal Server\\UserConfig|System\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration|Software\\Microsoft\\Windows NT\\CurrentVersion\\Perflib|System\\CurrentControlSet\\Services\\SysmonLog|System\\CurrentControlSet\\Services\\CertSvc|System\\CurrentControlSet\\Services\\WINS' + + - id: 11031 + title: "Ensure 'Network access: Restrict anonymous access to Named Pipes and Shares' is set to 'Enabled'" + description: "When enabled, this policy setting restricts anonymous access to only those shares and pipes that are named in the Network access: Named pipes that can be accessed anonymously and Network access: Shares that can be accessed anonymously settings. This policy setting controls null session access to shares on your computers by adding RestrictNullSessAccess with the value 1 in the HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\LanManServer\\Parameters registry key. This registry value toggles null session shares on or off to control whether the server service restricts unauthenticated clients' access to named resources. The recommended state for this setting is: Enabled." + rationale: "Null sessions are a weakness that can be exploited through shares (including the default shares) on computers in your environment." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Restrict anonymous access to Named Pipes and Shares." + compliance: + - cis: ["2.3.10.9"] + - cis_csc: ["14", "16"] + references: + - 'CCE-36021-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> RestrictNullSessAccess -> 1' + + - id: 11032 + title: "Ensure 'Network access: Shares that can be accessed anonymously' is set to 'None'" + description: "This policy setting determines which network shares can be accessed by anonymous users. The default configuration for this policy setting has little effect because all users have to be authenticated before they can access shared resources on the server. The recommended state for this setting is: (i.e. None)." + rationale: "It is very dangerous to allow any values in this setting. Any shares that are listed can be accessed by any network user, which could lead to the exposure or corruption of sensitive data." + remediation: "To establish the recommended configuration via GP, set the following UI path to (i.e. None): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Shares that can be accessed anonymously." + compliance: + - cis: ["2.3.10.10"] + - cis_csc: ["14", "16"] + references: + - 'CCE-38095-6' + condition: all + rules: + - 'not r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> NullSessionShares -> r:\.' + - id: 11033 + title: "Ensure 'Network access: Sharing and security model for local accounts' is set to 'Classic - local users authenticate as themselves'" + description: "This policy setting determines how network logons that use local accounts are authenticated. The Classic option allows precise control over access to resources, including the ability to assign different types of access to different users for the same resource. The Guest only option allows you to treat all users equally. In this context, all users authenticate as Guest only to receive the same access level to a given resource. The recommended state for this setting is: Classic - local users authenticate as themselves. Note: This setting does not affect interactive logons that are performed remotely by using such services as Telnet or Remote Desktop Services (formerly called Terminal Services)." + rationale: "With the Guest only model, any user who can authenticate to your computer over the network does so with guest privileges, which probably means that they will not have write access to shared resources on that computer. Although this restriction does increase security, it makes it more difficult for authorized users to access shared resources on those computers because ACLs on those resources must include access control entries (ACEs) for the Guest account. With the Classic model, local accounts should be password protected. Otherwise, if Guest access is enabled, anyone can use those user accounts to access shared system resources." + remediation: "To establish the recommended configuration via GP, set the following UI path to Classic - local users authenticate as themselves: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Sharing and security model for local accounts." + compliance: + - cis: ["2.3.10.11"] + - cis_csc: ["14", "16"] + references: + - 'CCE-37623-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> ForceGuest -> 0' + + - id: 11034 + title: "Ensure 'Network security: Allow Local System to use computer identity for NTLM' is set to 'Enabled'" + description: "This policy setting determines whether Local System services that use Negotiate when reverting to NTLM authentication can use the computer identity. This policy is supported on at least Windows 7 or Windows Server 2008 R2. The recommended state for this setting is: Enabled." + rationale: "When connecting to computers running versions of Windows earlier than Windows Vista or Windows Server 2008 (non-R2), services running as Local System and using SPNEGO (Negotiate) that revert to NTLM use the computer identity. In Windows 7, if you are connecting to a computer running Windows Server 2008 or Windows Vista, then a system service uses either the computer identity or a NULL session. When connecting with a NULL session, a system-generated session key is created, which provides no protection but allows applications to sign and encrypt data without errors. When connecting with the computer identity, both signing and encryption is supported in order to provide data protection." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Allow Local System to use computer identity for NTLM." + compliance: + - cis: ["2.3.11.1"] + - cis_csc: ["14", "16"] + references: + - 'CCE-38341-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> UseMachineId -> 1' + + - id: 11035 + title: "Ensure 'Network security: Allow LocalSystem NULL session fallback' is set to 'Disabled'" + description: "This policy setting determines whether NTLM is allowed to fall back to a NULL session when used with LocalSystem. The recommended state for this setting is: Disabled." + rationale: "NULL sessions are less secure because by definition they are unauthenticated." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Allow LocalSystem NULL session fallback." + compliance: + - cis: ["2.3.11.2"] + - cis_csc: ["14"] + references: + - 'CCE-37035-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> allownullsessionfallback -> 0' + + - id: 11036 + title: "Ensure 'Network Security: Allow PKU2U authentication requests to this computer to use online identities' is set to 'Disabled'" + description: "This setting determines if online identities are able to authenticate to this computer. The Public Key Cryptography Based User-to-User (PKU2U) protocol introduced in Windows 7 and Windows Server 2008 R2 is implemented as a security support provider (SSP). The SSP enables peer-to-peer authentication, particularly through the Windows 7 media and file sharing feature called Homegroup, which permits sharing between computers that are not members of a domain. With PKU2U, a new extension was introduced to the Negotiate authentication package, Spnego.dll. In previous versions of Windows, Negotiate decided whether to use Kerberos or NTLM for authentication. The extension SSP for Negotiate, Negoexts.dll, which is treated as an authentication protocol by Windows, supports Microsoft SSPs including PKU2U. When computers are configured to accept authentication requests by using online IDs, Negoexts.dll calls the PKU2U SSP on the computer that is used to log on. The PKU2U SSP obtains a local certificate and exchanges the policy between the peer computers. When validated on the peer computer, the certificate within the metadata is sent to the logon peer for validation and associates the user's certificate to a security token and the logon process completes. The recommended state for this setting is: Disabled." + rationale: "The PKU2U protocol is a peer-to-peer authentication protocol - authentication should be managed centrally in most managed networks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network Security: Allow PKU2U authentication requests to this computer to use online identities." + compliance: + - cis: ["2.3.11.3"] + - cis_csc: ["16.9"] + references: + - 'CCE-38047-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\pku2u -> AllowOnlineID -> 0' + + - id: 11037 + title: "Ensure 'Network Security: Configure encryption types allowed for Kerberos' is set to 'RC4_HMAC_MD5, AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types'" + description: "This policy setting allows you to set the encryption types that Kerberos is allowed to use. The recommended state for this setting is: AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types. Note: Some legacy applications and OSes may require RC4_HMAC_MD5 - we recommend you test in your environment and verify whether you can safely remove it. For the purposes of scoring we have allowed the use of RC4_HMAC_MD5 as an optional setting." + rationale: "he strength of each encryption algorithm varies from one to the next, choosing stronger algorithms will reduce the risk of compromise however doing so may cause issues when the computer attempts to authenticate with systems that do not support them." + remediation: "To establish the recommended configuration via GP, set the following UI path to AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Configure encryption types allowed for Kerberos." + compliance: + - cis: ["2.3.11.4"] + - cis_csc: ["16.14"] + references: + - 'CCE-37755-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters -> SupportedEncryptionTypes -> 2147483644' + + - id: 11038 + title: "Ensure 'Network security: Do not store LAN Manager hash value on next password change' is set to 'Enabled'" + description: "This policy setting determines whether the LAN Manager (LM) hash value for the new password is stored when the password is changed. The LM hash is relatively weak and prone to attack compared to the cryptographically stronger Microsoft Windows NT hash. Since LM hashes are stored on the local computer in the security database, passwords can then be easily compromised if the database is attacked. Note: Older operating systems and some third-party applications may fail when this policy setting is enabled. Also, note that the password will need to be changed on all accounts after you enable this setting to gain the proper benefit. The recommended state for this setting is: Enabled." + rationale: "The SAM file can be targeted by attackers who seek access to username and password hashes. Such attacks use special tools to crack passwords, which can then be used to impersonate users and gain access to resources on your network. These types of attacks will not be prevented if you enable this policy setting, but it will be much more difficult for these types of attacks to succeed." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Do not store LAN Manager hash value on next password change." + compliance: + - cis: ["2.3.11.5"] + - cis_csc: ["16.14"] + references: + - 'CCE-36326-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> NoLMHash -> 1' + + - id: 11039 + title: "Ensure 'Network security: Force logoff when logon hours expire' is set to 'Enabled'" + description: "This policy setting determines whether to disconnect users who are connected to the local computer outside their user account's valid logon hours. This setting affects the Server Message Block (SMB) component. If you enable this policy setting you should also enable Microsoft network server: Disconnect clients when logon hours expire (Rule 2.3.9.4). The recommended state for this setting is: Enabled. Note: This recommendation is unscored because there is not a documented registry value that corresponds to it. We still strongly encourage that it be configured as Enabled, to ensure that logon hours (when configured) are properly enforced." + rationale: "If this setting is disabled, a user could remain connected to the computer outside of their allotted logon hours." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Force logoff when logon hours expire." + compliance: + - cis: ["2.3.11.6"] + - cis_csc: ["16"] + references: + - 'CCE-36270-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters -> EnableForcedLogOff -> 1' + + - id: 11040 + title: "Ensure 'Network security: LAN Manager authentication level' is set to 'Send NTLMv2 response only. Refuse LM & NTLM'" + description: "LAN Manager (LM) was a family of early Microsoft client/server software (predating Windows NT) that allowed users to link personal computers together on a single network. LM network capabilities included transparent file and print sharing, user security features, and network administration tools. In Active Directory domains, the Kerberos protocol is the default authentication protocol. However, if the Kerberos protocol is not negotiated for some reason, Active Directory will use LM, NTLM, or NTLMv2. LAN Manager authentication includes the LM, NTLM, and NTLM version 2 (NTLMv2) variants, and is the protocol that is used to authenticate all Windows clients when they perform the following operations: -Join a domain -Authenticate between Active Directory forests -Authenticate to down-level domains -Authenticate to computers that do not run Windows 2000, Windows Server 2003, or Windows XP -Authenticate to computers that are not in the domain. The Network security: LAN Manager authentication level setting determines which challenge/response authentication protocol is used for network logons. This choice affects the level of authentication protocol used by clients, the level of session security negotiated, and the level of authentication accepted by servers. The recommended state for this setting is: Send NTLMv2 response only. Refuse LM & NTLM." + rationale: "Windows 2000 and Windows XP clients were configured by default to send LM and NTLM authentication responses (Windows 95-based and Windows 98-based clients only send LM). The default settings in OSes predating Windows Vista / Windows Server 2008 (non- R2) allowed all clients to authenticate with servers and use their resources. However, this meant that LM responses - the weakest form of authentication response - were sent over the network, and it was potentially possible for attackers to sniff that traffic to more easily reproduce the user's password. The Windows 95, Windows 98, and Windows NT operating systems cannot use the Kerberos version 5 protocol for authentication. For this reason, in a Windows Server 2003 domain, these computers authenticate by default with both the LM and NTLM protocols for network authentication. You can enforce a more secure authentication protocol for Windows 95, Windows 98, and Windows NT by using NTLMv2. For the logon process, NTLMv2 uses a secure channel to protect the authentication process. Even if you use NTLMv2 for older clients and servers, Windows-based clients and servers that are members of the domain will use the Kerberos authentication protocol to authenticate with Windows Server 2003 or newer Domain Controllers. For these reasons, it is strongly preferred to restrict the use of LM & NTLM (non-v2) as much as possible." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Send NTLMv2 response only. Refuse LM & NTLM: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: LAN Manager authentication level." + compliance: + - cis: ["2.3.11.7"] + - cis_csc: ["13"] + references: + - 'CCE-36173-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 5' + + - id: 11041 + title: "Ensure 'Network security: LDAP client signing requirements' is set to 'Negotiate signing' or higher" + description: "This policy setting determines the level of data signing that is requested on behalf of clients that issue LDAP BIND requests. Note: This policy setting does not have any impact on LDAP simple bind (ldap_simple_bind) or LDAP simple bind through SSL (ldap_simple_bind_s). No Microsoft LDAP clients that are included with Windows XP Professional use ldap_simple_bind or ldap_simple_bind_s to communicate with a Domain Controller. The recommended state for this setting is: Negotiate signing. Configuring this setting to Require signing also conforms to the benchmark." + rationale: "Unsigned network traffic is susceptible to man-in-the-middle attacks in which an intruder captures the packets between the client and server, modifies them, and then forwards them to the server. For an LDAP server, this susceptibility means that an attacker could cause a server to make decisions that are based on false or altered data from the LDAP queries. To lower this risk in your network, you can implement strong physical security measures to protect the network infrastructure. Also, you can make all types of man-in-the-middle attacks extremely difficult if you require digital signatures on all network packets by means of IPsec authentication headers." + remediation: "To establish the recommended configuration via GP, set the following UI path to Negotiate signing (configuring to Require signing also conforms to the benchmark): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: LDAP client signing requirements." + compliance: + - cis: ["2.3.11.8"] + - cis_csc: ["13"] + references: + - 'CCE-36858-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LDAP -> LDAPClientIntegrity -> n:^(\d+) compare >= 1' + + - id: 11042 + title: "Ensure 'Network security: Minimum session security for NTLM SSP based (including secure RPC) clients' is set to 'Require NTLMv2 session security, Require 128-bit encryption'" + description: "This policy setting determines which behaviors are allowed by clients for applications using the NTLM Security Support Provider (SSP). The SSP Interface (SSPI) is used by applications that need authentication services. The setting does not modify how the authentication sequence works but instead require certain behaviors in applications that use the SSPI. The recommended state for this setting is: Require NTLMv2 session security, Require 128-bit encryption. Note: These values are dependent on the Network security: LAN Manager Authentication Level (Rule 2.3.11.7) security setting value." + rationale: "You can enable both options for this policy setting to help protect network traffic that uses the NTLM Security Support Provider (NTLM SSP) from being exposed or tampered with by an attacker who has gained access to the same network. In other words, these options help protect against man-in-the-middle attacks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Require NTLMv2 session security, Require 128-bit encryption: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Minimum session security for NTLM SSP based (including secure RPC) clients." + compliance: + - cis: ["2.3.11.9"] + - cis_csc: ["13"] + references: + - 'CCE-37553-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> NTLMMinClientSec -> 537395200' + + - id: 11043 + title: "Ensure 'Network security: Minimum session security for NTLM SSP based (including secure RPC) servers' is set to 'Require NTLMv2 session security, Require 128-bit encryption'" + description: "This policy setting determines which behaviors are allowed by servers for applications using the NTLM Security Support Provider (SSP). The SSP Interface (SSPI) is used by applications that need authentication services. The setting does not modify how the authentication sequence works but instead require certain behaviors in applications that use the SSPI. The recommended state for this setting is: Require NTLMv2 session security, Require 128-bit encryption. Note: These values are dependent on the Network security: LAN Manager Authentication Level (Rule 2.3.11.7) security setting value." + rationale: "You can enable all of the options for this policy setting to help protect network traffic that uses the NTLM Security Support Provider (NTLM SSP) from being exposed or tampered with by an attacker who has gained access to the same network. That is, these options help protect against man-in-the-middle attacks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Require NTLMv2 session security, Require 128-bit encryption: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Minimum session security for NTLM SSP based (including secure RPC) servers." + compliance: + - cis: ["2.3.11.10"] + - cis_csc: ["13"] + references: + - https://workbench.cisecurity.org/benchmarks/288 + - 'CCE-37835-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> NTLMMinServerSec -> 537395200' + + - id: 11044 + title: "Ensure 'Shutdown: Allow system to be shut down without having to log on' is set to 'Disabled'" + description: "This policy setting determines whether a computer can be shut down when a user is not logged on. If this policy setting is enabled, the shutdown command is available on the Windows logon screen. It is recommended to disable this policy setting to restrict the ability to shut down the computer to users with credentials on the system. The recommended state for this setting is: Disabled. Note: In Server 2008 R2 and older versions, this setting had no impact on Remote Desktop (RDP) / Terminal Services sessions - it only affected the local console. However, Microsoft changed the behavior in Windows Server 2012 (non-R2) and above, where if set to Enabled, RDP sessions are also allowed to shut down or restart the server." + rationale: "Users who can access the console locally could shut down the computer. Attackers could also walk to the local console and restart the server, which would cause a temporary DoS condition. Attackers could also shut down the server and leave all of its applications and services unavailable. As noted in the Description above, the Denial of Service (DoS) risk of enabling this setting dramatically increases in Windows Server 2012 (non-R2) and above, as even remote users could then shut down or restart the server from the logon screen of an RDP session." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Shutdown: Allow system to be shut down without having to log on." + compliance: + - cis: ["2.3.13.1"] + - cis_csc: ["5.1"] + references: + - 'CCE-36788-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ShutdownWithoutLogon -> 0' + + - id: 11045 + title: "Ensure 'System objects: Require case insensitivity for non-Windows subsystems' is set to 'Enabled'" + description: "This policy setting determines whether case insensitivity is enforced for all subsystems. The Microsoft Win32 subsystem is case insensitive. However, the kernel supports case sensitivity for other subsystems, such as the Portable Operating System Interface for UNIX (POSIX). Because Windows is case insensitive (but the POSIX subsystem will support case sensitivity), failure to enforce this policy setting makes it possible for a user of the POSIX subsystem to create a file with the same name as another file by using mixed case to label it. Such a situation can block access to these files by another user who uses typical Win32 tools, because only one of the files will be available. The recommended state for this setting is: Enabled." + rationale: "Because Windows is case-insensitive but the POSIX subsystem will support case sensitivity, failure to enable this policy setting would make it possible for a user of that subsystem to create a file with the same name as another file but with a different mix of upper and lower case letters. Such a situation could potentially confuse users when they try to access such files from normal Win32 tools because only one of the files will be available." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System objects: Require case insensitivity for non- Windows subsystems." + compliance: + - cis: ["2.3.15.1"] + references: + - 'CCE-37885-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Kernel -> ObCaseInsensitive -> 1' + + - id: 11046 + title: "Ensure 'System objects: Strengthen default permissions of internal system objects (e.g. Symbolic Links)' is set to 'Enabled'" + description: "This policy setting determines the strength of the default discretionary access control list (DACL) for objects. Active Directory maintains a global list of shared system resources, such as DOS device names, mutexes, and semaphores. In this way, objects can be located and shared among processes. Each type of object is created with a default DACL that specifies who can access the objects and what permissions are granted. The recommended state for this setting is: Enabled." + rationale: "This setting determines the strength of the default DACL for objects. Windows maintains a global list of shared computer resources so that objects can be located and shared among processes. Each type of object is created with a default DACL that specifies who can access the objects and with what permissions." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System objects: Strengthen default permissions of internal system objects (e.g. Symbolic Links)." + compliance: + - cis: ["2.3.15.2"] + - cis_csc: ["14.4"] + references: + - 'CCE-37644-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager -> ProtectionMode -> 1' + + - id: 11047 + title: "Ensure 'User Account Control: Admin Approval Mode for the Built-in Administrator account' is set to 'Enabled'" + description: "This policy setting controls the behavior of Admin Approval Mode for the built-in Administrator account. The recommended state for this setting is: Enabled." + rationale: "One of the risks that the User Account Control feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. An attack vector for these programs was to discover the password of the account named 'Administrator' because that user account was created for all installations of Windows. To address this risk, in Windows Vista and newer, the built-in Administrator account is now disabled by default. In a default installation of a new computer, accounts with administrative control over the computer are initially set up in one of two ways: - If the computer is not joined to a domain, the first user account you create has the equivalent permissions as a local administrator. -If the computer is joined to a domain, no local administrator accounts are created. The Enterprise or Domain Administrator must log on to the computer and create one if a local administrator account is warranted. Once Windows is installed, the built-in Administrator account may be manually enabled, but we strongly recommend that this account remain disabled." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Admin Approval Mode for the Built-in Administrator account." + compliance: + - cis: ["2.3.17.1"] + - cis_csc: ["5.1"] + references: + - 'CCE-36494-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> FilterAdministratorToken -> 1' + + - id: 11048 + title: "Ensure 'User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop' is set to 'Disabled'" + description: "This policy setting controls whether User Interface Accessibility (UIAccess or UIA) programs can automatically disable the secure desktop for elevation prompts used by a standard user. The recommended state for this setting is: Disabled." + rationale: "One of the risks that the UAC feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. This setting allows the administrator to perform operations that require elevated privileges while connected via Remote Assistance. This increases security in that organizations can use UAC even when end user support is provided remotely. However, it also reduces security by adding the risk that an administrator might allow an unprivileged user to share elevated privileges for an application that the administrator needs to use during the Remote Desktop session." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop." + compliance: + - cis: ["2.3.17.2"] + - cis_csc: ["16"] + references: + - 'CCE-36863-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableUIADesktopToggle -> 0' + + - id: 11049 + title: "Ensure 'User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode' is set to 'Prompt for consent on the secure desktop'" + description: "This policy setting controls the behavior of the elevation prompt for administrators. The recommended state for this setting is: Prompt for consent on the secure desktop." + rationale: "One of the risks that the UAC feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. This setting raises awareness to the administrator of elevated privilege operations and permits the administrator to prevent a malicious program from elevating its privilege when the program attempts to do so." + remediation: "To establish the recommended configuration via GP, set the following UI path to Prompt for consent on the secure desktop: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode." + compliance: + - cis: ["2.3.17.3"] + - cis_csc: ["5.1"] + references: + - 'CCE-37029-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ConsentPromptBehaviorAdmin -> 2' + + - id: 11050 + title: "Ensure 'User Account Control: Behavior of the elevation prompt for standard users' is set to 'Automatically deny elevation requests'" + description: "This policy setting controls the behavior of the elevation prompt for standard users. The recommended state for this setting is: Automatically deny elevation requests." + rationale: "One of the risks that the User Account Control feature introduced with Windows Vista is trying to mitigate is that of malicious programs running under elevated credentials without the user or administrator being aware of their activity. This setting raises awareness to the user that a program requires the use of elevated privilege operations and requires that the user be able to supply administrative credentials in order for the program to run." + remediation: "To establish the recommended configuration via GP, set the following UI path to Automatically deny elevation requests: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Behavior of the elevation prompt for standard users." + compliance: + - cis: ["2.3.17.4"] + - cis_csc: ["5.1"] + references: + - 'CCE-36864-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ConsentPromptBehaviorUser -> 0' + + - id: 11051 + title: "Ensure 'User Account Control: Detect application installations and prompt for elevation' is set to 'Enabled'" + description: "This policy setting controls the behavior of application installation detection for the computer. The recommended state for this setting is: Enabled." + rationale: "Some malicious software will attempt to install itself after being given permission to run. For example, malicious software with a trusted application shell. The user may have given permission for the program to run because the program is trusted, but if they are then prompted for installation of an unknown component this provides another way of trapping the software before it can do damage." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Detect application installations and prompt for elevation." + compliance: + - cis: ["2.3.17.5"] + - cis_csc: ["5.1"] + references: + - 'CCE-36533-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableInstallerDetection -> 1' + + - id: 11052 + title: "Ensure 'User Account Control: Only elevate UIAccess applications that are installed in secure locations' is set to 'Enabled'" + description: "This policy setting controls whether applications that request to run with a User Interface Accessibility (UIAccess) integrity level must reside in a secure location in the file system. Secure locations are limited to the following: ...\\Program Files\\, including subfolders; ...\\Windows\\system32\\; ...\\Program Files (x86)\\, including subfolders (for 64-bit versions of Windows). Note: Windows enforces a public key infrastructure (PKI) signature check on any interactive application that requests to run with a UIAccess integrity level regardless of the state of this security setting. The recommended state for this setting is: Enabled." + rationale: "UIAccess Integrity allows an application to bypass User Interface Privilege Isolation (UIPI) restrictions when an application is elevated in privilege from a standard user to an administrator. This is required to support accessibility features such as screen readers that are transmitting user interfaces to alternative forms. A process that is started with UIAccess rights has the following abilities: -To set the foreground window. -To drive any application window using SendInput function. -To use read input for all integrity levels using low-level hooks, raw input, GetKeyState, GetAsyncKeyState, and GetKeyboardInput. -To set journal hooks. -To uses AttachThreadInput to attach a thread to a higher integrity input queue." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Only elevate UIAccess applications that are installed in secure locations." + compliance: + - cis: ["2.3.17.6"] + - cis_csc: ["5.1"] + references: + - 'CCE-37057-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableSecureUIAPaths -> 1' + + - id: 11053 + title: "Ensure 'User Account Control: Run all administrators in Admin Approval Mode' is set to 'Enabled'" + description: "This policy setting controls the behavior of all User Account Control (UAC) policy settings for the computer. If you change this policy setting, you must restart your computer. The recommended state for this setting is: Enabled. Note: If this policy setting is disabled, the Security Center notifies you that the overall security of the operating system has been reduced." + rationale: "This is the setting that turns on or off UAC. If this setting is disabled, UAC will not be used and any security benefits and risk mitigations that are dependent on UAC will not be present on the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Run all administrators in Admin Approval Mode." + compliance: + - cis: ["2.3.17.7"] + - cis_csc: ["5.1"] + references: + - 'CCE-36869-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableLUA -> 1' + + - id: 11054 + title: "Ensure 'User Account Control: Switch to the secure desktop when prompting for elevation' is set to 'Enabled'" + description: "This policy setting controls whether the elevation request prompt is displayed on the interactive user's desktop or the secure desktop. The recommended state for this setting is: Enabled." + rationale: "Standard elevation prompt dialog boxes can be spoofed, which may cause users to disclose their passwords to malicious software. The secure desktop presents a very distinct appearance when prompting for elevation, where the user desktop dims, and the elevation prompt UI is more prominent. This increases the likelihood that users who become accustomed to the secure desktop will recognize a spoofed elevation prompt dialog box and not fall for the trick." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Switch to the secure desktop when prompting for elevation." + compliance: + - cis: ["2.3.17.8"] + - cis_csc: ["5.1"] + references: + - 'CCE-36866-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> PromptOnSecureDesktop -> 1' + + - id: 11055 + title: "Ensure 'User Account Control: Virtualize file and registry write failures to per-user locations' is set to 'Enabled'" + description: "This policy setting controls whether application write failures are redirected to defined registry and file system locations. This policy setting mitigates applications that run as administrator and write run-time application data to: - %ProgramFiles% - %Windir% - %Windir%\\system32 - HKEY_LOCAL_MACHINE\\Software. The recommended state for this setting is: Enabled." + rationale: "This setting reduces vulnerabilities by ensuring that legacy applications only write data to permitted locations." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Virtualize file and registry write failures to per-user locations." + compliance: + - cis: ["2.3.17.9"] + references: + - 'CCE-37064-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableVirtualization -> 1' + +# Section 9.1 - Domain Profile + - id: 11056 + title: "Ensure 'Windows Firewall: Domain: Firewall state' is set to 'On (recommended)'" + description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." + rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Firewall state." + compliance: + - cis: ["9.1.1"] + - cis_csc: ["9.2"] + references: + - 'CCE-36062-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> EnableFirewall -> 1' + + - id: 11057 + title: "Ensure 'Windows Firewall: Domain: Inbound connections' is set to 'Block (default)'" + description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." + rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Inbound connections." + compliance: + - cis: ["9.1.2"] + - cis_csc: ["9.2"] + references: + - 'CCE-38117-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DefaultInboundAction -> 1' + + - id: 11058 + title: "Ensure 'Windows Firewall: Domain: Outbound connections' is set to 'Allow (default)'" + description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default)." + rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." + remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Outbound connections." + compliance: + - cis: ["9.1.3"] + - cis_csc: ["9.2"] + references: + - 'CCE-36146-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DefaultOutboundAction -> 0' + + - id: 11059 + title: "Ensure 'Windows Firewall: Domain: Settings: Display a notification' is set to 'No'" + description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." + rationale: "Firewall notifications can be complex and may confuse the end users, who would not be able to address the alert." + remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Settings Customize\\Display a notification." + compliance: + - cis: ["9.1.4"] + references: + - 'CCE-38041-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DisableNotifications -> 1' + + - id: 11060 + title: "Ensure 'Windows Firewall: Domain: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log'" + description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Name" + compliance: + - cis: ["9.1.5"] + - cis_csc: ["6.2"] + references: + - 'CCE-37482-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFilePath -> r:%SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log' + + - id: 11061 + title: "Ensure 'Windows Firewall: Domain: Logging: Size limit (KB)' is set to '16384 KB or greater'" + description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Size limit (KB)." + compliance: + - cis: ["9.1.6"] + - cis_csc: ["6.3"] + references: + - 'CCE-36088-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> n:^(\d+) compare >= 16384' + + - id: 11062 + title: "Ensure 'Windows Firewall: Domain: Logging: Log dropped packets' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Log dropped packets." + compliance: + - cis: ["9.1.7"] + - cis_csc: ["6.2"] + references: + - 'CCE-37523-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogDroppedPackets -> 1' + + - id: 11063 + title: "Ensure 'Windows Firewall: Domain: Logging: Log successful connections' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Log successful connections." + compliance: + - cis: ["9.1.8"] + - cis_csc: ["6.2"] + references: + - 'CCE-36393-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogSuccessfulConnections -> 1' + +# Section 9.2 - Private Profile + - id: 11064 + title: "Ensure 'Windows Firewall: Private: Firewall state' is set to 'On (recommended)'" + description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." + rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Firewall state." + compliance: + - cis: ["9.2.1"] + - cis_csc: ["9.2"] + references: + - 'CCE-38239-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> EnableFirewall -> 1' + + - id: 11065 + title: "Ensure 'Windows Firewall: Private: Inbound connections' is set to 'Block (default)'" + description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." + rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Inbound connections." + compliance: + - cis: ["9.2.2"] + - cis_csc: ["9.2"] + references: + - 'CCE-38042-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DefaultInboundAction -> 1' + + - id: 11066 + title: "Ensure 'Windows Firewall: Private: Outbound connections' is set to 'Allow (default)'" + description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default). Note: If you set Outbound connections to Block and then deploy the firewall policy by using a GPO, computers that receive the GPO settings cannot receive subsequent Group Policy updates unless you create and deploy an outbound rule that enables Group Policy to work. Predefined rules for Core Networking include outbound rules that enable Group Policy to work. Ensure that these outbound rules are active, and thoroughly test firewall profiles before deploying." + rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." + remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Outbound connections." + compliance: + - cis: ["9.2.3"] + - cis_csc: ["9.2"] + references: + - 'CCE-38332-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DefaultOutboundAction -> 0' + + - id: 11067 + title: "Ensure 'Windows Firewall: Private: Settings: Display a notification' is set to 'No'" + description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." + rationale: "Firewall notifications can be complex and may confuse the end users, who would not be able to address the alert." + remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Settings Customize\\Display a notification." + compliance: + - cis: ["9.2.4"] + references: + - 'CCE-37621-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DisableNotifications -> 1' + + - id: 11068 + title: "Ensure 'Windows Firewall: Private: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log'" + description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Name" + compliance: + - cis: ["9.2.5"] + - cis_csc: ["6.2"] + references: + - 'CCE-37569-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFilePath -> r:%SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log' + + - id: 11069 + title: "Ensure 'Windows Firewall: Private: Logging: Size limit (KB)' is set to '16384 KB or greater'" + description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Size limit (KB)." + compliance: + - cis: ["9.2.6"] + - cis_csc: ["6.3"] + references: + - 'CCE-38178-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> n:^(\d+) compare >= 16384' + + - id: 11070 + title: "Ensure 'Windows Firewall: Private: Logging: Log dropped packets' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Log dropped packets." + compliance: + - cis: ["9.2.7"] + - cis_csc: ["6.2"] + references: + - 'CCE-35972-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogDroppedPackets -> 1' + + - id: 11071 + title: "Ensure 'Windows Firewall: Private: Logging: Log successful connections' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Log successful connections." + compliance: + - cis: ["9.2.8"] + - cis_csc: ["6.2"] + references: + - 'CCE-37387-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogSuccessfulConnections -> 1' + +# Sectin 9.3 - Public Profile + - id: 11072 + title: "Ensure 'Windows Firewall: Public: Firewall state' is set to 'On (recommended)'" + description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." + rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Firewall state." + compliance: + - cis: ["9.3.1"] + - cis_csc: ["9.2"] + references: + - 'CCE-37862-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> EnableFirewall -> 1' + + - id: 11073 + title: "Ensure 'Windows Firewall: Public: Inbound connections' is set to 'Block (default)'" + description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." + rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Inbound connections." + compliance: + - cis: ["9.3.2"] + - cis_csc: ["9.2"] + references: + - 'CCE-36057-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DefaultInboundAction -> 1' + + - id: 11074 + title: "Ensure 'Windows Firewall: Public: Outbound connections' is set to 'Allow (default)'" + description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default). Note: If you set Outbound connections to Block and then deploy the firewall policy by using a GPO, computers that receive the GPO settings cannot receive subsequent Group Policy updates unless you create and deploy an outbound rule that enables Group Policy to work. Predefined rules for Core Networking include outbound rules that enable Group Policy to work. Ensure that these outbound rules are active, and thoroughly test firewall profiles before deploying." + rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." + remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Outbound connections." + compliance: + - cis: ["9.3.3"] + - cis_csc: ["9.2"] + references: + - 'CCE-37434-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DefaultOutboundAction -> 0' + + - id: 11075 + title: "Ensure 'Windows Firewall: Public: Settings: Display a notification' is set to 'No'" + description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No." + rationale: "Some organizations may prefer to avoid alarming users when firewall rules block certain types of network activity. However, notifications can be helpful when troubleshooting network issues involving the firewall." + remediation: "To establish the recommended configuration via GP, set the following UI path to 'No': Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Display a notification." + compliance: + - cis: ["9.3.4"] + references: + - 'CCE-38043-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DisableNotifications -> 0' + + + - id: 11076 + title: "Ensure 'Windows Firewall: Public: Settings: Apply local firewall rules' is set to 'No'" + description: "This setting controls whether local administrators are allowed to create local firewall rules that apply together with firewall rules configured by Group Policy. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." + rationale: "iWhen in the Public profile, there should be no special local firewall exceptions per computer. These settings should be managed by a centralized policy." + remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Apply local firewall rules." + compliance: + - cis: ["9.3.5"] + - cis_csc: ["5.1"] + references: + - 'CCE-37861-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> AllowLocalPolicyMerge -> 0' + + - id: 11077 + title: "Ensure 'Windows Firewall: Public: Settings: Apply local connection security rules' is set to 'No'" + description: "This setting controls whether local administrators are allowed to create connection security rules that apply together with connection security rules configured by Group Policy. The recommended state for this setting is: No." + rationale: "Users with administrative privileges might create firewall rules that expose the system to remote attack." + remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Apply local connection security rules." + compliance: + - cis: ["9.3.6"] + - cis_csc: ["5.1"] + references: + - 'CCE-36268-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> AllowLocalIPsecPolicyMerge -> 0' + + - id: 11078 + title: "Ensure 'Windows Firewall: Public: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log'" + description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Name" + compliance: + - cis: ["9.3.7"] + - cis_csc: ["6.2"] + references: + - 'CCE-37266-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFilePath -> r:%SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log' + + - id: 11079 + title: "Ensure 'Windows Firewall: Public: Logging: Size limit (KB)' is set to '16384 KB or greater'" + description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Size limit (KB)." + compliance: + - cis: ["9.3.8"] + - cis_csc: ["6.3"] + references: + - 'CCE-36395-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> n:^(\d+) compare >= 16384' + + - id: 11080 + title: "Ensure 'Windows Firewall: Public: Logging: Log dropped packets' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Log dropped packets." + compliance: + - cis: ["9.3.9"] + - cis_csc: ["6.2"] + references: + - 'CCE-37265-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogDroppedPackets -> 1' + + - id: 11081 + title: "Ensure 'Windows Firewall: Public: Logging: Log successful connections' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Log successful connections." + compliance: + - cis: ["9.3.10"] + - cis_csc: ["6.2"] + references: + - 'CCE-36394-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogSuccessfulConnections -> 1' + +# Section 18.1 - Control Panel + - id: 11082 + title: "Ensure 'Prevent enabling lock screen camera' is set to 'Enabled'" + description: "Disables the lock screen camera toggle switch in PC Settings and prevents a camera from being invoked on the lock screen. The recommended state for this setting is: Enabled." + rationale: "Disabling the lock screen camera extends the protection afforded by the lock screen to camera features." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Personalization\\Prevent enabling lock screen camera. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ControlPanelDisplay.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.1.1.1"] + references: + - 'CCE-38347-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> NoLockScreenCamera -> 1' + + - id: 11083 + title: "Ensure 'Prevent enabling lock screen slide show' is set to 'Enabled'" + description: "Disables the lock screen slide show settings in PC Settings and prevents a slide show from playing on the lock screen. The recommended state for this setting is: Enabled." + rationale: "Disabling the lock screen slide show extends the protection afforded by the lock screen to slide show contents." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Personalization\\Prevent enabling lock screen slide show. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ControlPanelDisplay.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.1.1.2"] + references: + - 'CCE-38348-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> NoLockScreenSlideshow -> 1' + +# Section 18.3 - MS Security Guide + - id: 11084 + title: "Ensure 'WDigest Authentication' is set to 'Disabled'" + description: "When WDigest authentication is enabled, Lsass.exe retains a copy of the user's plaintext password in memory, where it can be at risk of theft. If this setting is not configured, WDigest authentication is disabled in Windows 8.1 and in Windows Server 2012 R2; it is enabled by default in earlier versions of Windows and Windows Server. The recommended state for this setting is: Disabled." + rationale: "Preventing the plaintext storage of credentials in memory may reduce opportunity for credential theft." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\WDigest Authentication (disabling may require KB2871997) Note: This Group Policy path does not exist by default. An additional Group Policy template (SecGuide.admx/adml) is required - it is available from Microsoft." + compliance: + - cis: ["18.3.5"] + - cis_csc: ["16.14"] + references: + - https://www.microsoft.com/en-us/download/details.aspx?id=36036 + - https://support.microsoft.com/en-us/help/2871997/microsoft-security-advisory-update-to-improve-credentials-protection-a + - https://blogs.technet.microsoft.com/secguide/2017/08/30/security-baseline-for-windows-10-creators-update-v1703-final/ + - 'CCE-38444-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest -> UseLogonCredential -> 0' + +# Section 18.4 - MSS (Legacy) + - id: 11085 + title: "Ensure 'MSS: (AutoAdminLogon) Enable Automatic Logon (not recommended)' is set to 'Disabled'" + description: "This setting is separate from the Welcome screen feature in Windows XP and Windows Vista; if that feature is disabled, this setting is not disabled. If you configure a computer for automatic logon, anyone who can physically gain access to the computer can also gain access to everything that is on the computer, including any network or networks to which the computer is connected. Also, if you enable automatic logon, the password is stored in the registry in plaintext, and the specific registry key that stores this value is remotely readable by the Authenticated Users group. The recommended state for this setting is: Disabled." + rationale: "If you configure a computer for automatic logon, anyone who can physically gain access to the computer can also gain access to everything that is on the computer, including any network or networks that the computer is connected to. Also, if you enable automatic logon, the password is stored in the registry in plaintext. The specific registry key that stores this setting is remotely readable by the Authenticated Users group. As a result, this entry is appropriate only if the computer is physically secured and if you ensure that untrusted users cannot remotely see the registry." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (AutoAdminLogon) Enable Automatic Logon (not recommended) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.1"] + - cis_csc: ["16"] + references: + - https://support.microsoft.com/en-us/help/324737/how-to-turn-on-automatic-logon-in-windows + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-37067-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> AutoAdminLogon -> 0' + + - id: 11086 + title: "Ensure 'MSS: (DisableIPSourceRouting IPv6) IP source routing protection level (protects against packet spoofing)' is set to 'Enabled: Highest protection, source routing is completely disabled'" + description: "IP source routing is a mechanism that allows the sender to determine the IP route that a datagram should follow through the network. The recommended state for this setting is: Enabled: Highest protection, source routing is completely disabled." + rationale: "An attacker could use source routed packets to obscure their identity and location. Source routing allows a computer that sends a packet to specify the route that the packet takes." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Highest protection, source routing is completely disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (DisableIPSourceRouting IPv6) IP source routing protection level (protects against packet spoofing) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.2"] + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-36871-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -> DisableIPSourceRouting -> 2' + + - id: 11087 + title: "Ensure 'MSS: (DisableIPSourceRouting) IP source routing protection level (protects against packet spoofing)' is set to 'Enabled: Highest protection, source routing is completely disabled'" + description: "IP source routing is a mechanism that allows the sender to determine the IP route that a datagram should take through the network. It is recommended to configure this setting to Not Defined for enterprise environments and to Highest Protection for high security environments to completely disable source routing. The recommended state for this setting is: Enabled: Highest protection, source routing is completely disabled." + rationale: "An attacker could use source routed packets to obscure their identity and location. Source routing allows a computer that sends a packet to specify the route that the packet takes." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Highest protection, source routing is completely disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (DisableIPSourceRouting) IP source routing protection level (protects against packet spoofing) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.3"] + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-36535-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> DisableIPSourceRouting -> 2' + + - id: 11088 + title: "Ensure 'MSS: (EnableICMPRedirect) Allow ICMP redirects to override OSPF generated routes' is set to 'Disabled'" + description: "Internet Control Message Protocol (ICMP) redirects cause the IPv4 stack to plumb host routes. These routes override the Open Shortest Path First (OSPF) generated routes. The recommended state for this setting is: Disabled." + rationale: "This behavior is expected. The problem is that the 10 minute time-out period for the ICMP redirect-plumbed routes temporarily creates a network situation in which traffic will no longer be routed properly for the affected host. Ignoring such ICMP redirects will limit the system's exposure to attacks that will impact its ability to participate on the network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (EnableICMPRedirect) Allow ICMP redirects to override OSPF generated routes Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.4"] + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-37988-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> EnableICMPRedirect -> 0' + + - id: 11089 + title: "Ensure 'MSS: (NoNameReleaseOnDemand) Allow the computer to ignore NetBIOS name release requests except from WINS servers' is set to 'Enabled'" + description: "NetBIOS over TCP/IP is a network protocol that among other things provides a way to easily resolve NetBIOS names that are registered on Windows-based systems to the IP addresses that are configured on those systems. This setting determines whether the computer releases its NetBIOS name when it receives a name-release request. The recommended state for this setting is: Enabled." + rationale: "The NetBT protocol is designed not to use authentication, and is therefore vulnerable to spoofing. Spoofing makes a transmission appear to come from a user other than the user who performed the action. A malicious user could exploit the unauthenticated nature of the protocol to send a name-conflict datagram to a target computer, which would cause the computer to relinquish its name and not respond to queries. An attacker could send a request over the network and query a computer to release its NetBIOS name. As with any change that could affect applications, it is recommended that you test this change in a non-production environment before you change the production environment. The result of such an attack could be to cause intermittent connectivity issues on the target computer, or even to prevent the use of Network Neighborhood, domain logons, the NET SEND command, or additional NetBIOS name resolution." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (NoNameReleaseOnDemand) Allow the computer to ignore NetBIOS name release requests except from WINS servers Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.6"] + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-36879-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters -> NoNameReleaseOnDemand -> 1' + + - id: 11090 + title: "Ensure 'MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended)' is set to 'Enabled'" + description: "The DLL search order can be configured to search for DLLs that are requested by running processes in one of two ways: -Search folders specified in the system path first, and then search the current working folder. -Search current working folder first, and then search the folders specified in the system path. When enabled, the registry value is set to 1. With a setting of 1, the system first searches the folders that are specified in the system path and then searches the current working folder. When disabled the registry value is set to 0 and the system first searches the current working folder and then searches the folders that are specified in the system path. Applications will be forced to search for DLLs in the system path first. For applications that require unique versions of these DLLs that are included with the application, this entry could cause performance or stability problems. The recommended state for this setting is: Enabled." + rationale: "If a user unknowingly executes hostile code that was packaged with additional files that include modified versions of system DLLs, the hostile code could load its own versions of those DLLs and potentially increase the type and degree of damage the code can render." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.8"] + - cis_csc: ["8"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-36351-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager -> SafeDllSearchMode -> 1' + + - id: 11091 + title: "Ensure 'MSS: (ScreenSaverGracePeriod) The time in seconds before the screen saver grace period expires (0 recommended)' is set to 'Enabled: 5 or fewer seconds'" + description: "Windows includes a grace period between when the screen saver is launched and when the console is actually locked automatically when screen saver locking is enabled. The recommended state for this setting is: Enabled: 5 or fewer seconds." + rationale: "The default grace period that is allowed for user movement before the screen saver lock takes effect is five seconds. If you leave the default grace period configuration, your computer is vulnerable to a potential attack from someone who could approach the console and attempt to log on to the computer before the lock takes effect. An entry to the registry can be made to adjust the length of the grace period." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 5 or fewer seconds: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (ScreenSaverGracePeriod) The time in seconds before the screen saver grace period expires (0 recommended) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.9"] + - cis_csc: ["16.5"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-37993-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> n:^(\d+) compare <= 5' + + - id: 11092 + title: "Ensure 'MSS: (WarningLevel) Percentage threshold for the security event log at which the system will generate a warning' is set to 'Enabled: 90% or less'" + description: "This setting can generate a security audit in the Security event log when the log reaches a user-defined threshold. The recommended state for this setting is: Enabled: 90% or less. Note: If log settings are configured to Overwrite events as needed or Overwrite events older than x days, this event will not be generated." + rationale: "If the Security log reaches 90 percent of its capacity and the computer has not been configured to overwrite events as needed, more recent events will not be written to the log. If the log reaches its capacity and the computer has been configured to shut down when it can no longer record events to the Security log, the computer will shut down and will no longer be available to provide network services." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 90% or less: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (WarningLevel) Percentage threshold for the security event log at which the system will generate a warning Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.12"] + - cis_csc: ["6.3"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-36880-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> n:^(\d+) compare <= 90' + +# Section 18.5 - Network + - id: 11093 + title: "Ensure 'Prohibit installation and configuration of Network Bridge on your DNS domain network' is set to 'Enabled'" + description: "You can use this procedure to controls user's ability to install and configure a Network Bridge. The recommended state for this setting is: Enabled." + rationale: "The Network Bridge setting, if enabled, allows users to create a Layer 2 Media Access Control (MAC) bridge, enabling them to connect two or more physical network segments together. A Network Bridge thus allows a computer that has connections to two different networks to share data between those networks. In an enterprise managed environment, where there is a need to control network traffic to only authorized paths, allowing users to create a Network Bridge increases the risk and attack surface from the bridged network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Connections\\Prohibit installation and configuration of Network Bridge on your DNS domain network Note: This Group Policy path is provided by the Group Policy template NetworkConnections.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.5.11.2"] + - cis_csc: ["5.1"] + references: + - 'CCE-38002-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> NC_AllowNetBridge_NLA -> 0' + + - id: 11094 + title: "Ensure 'Require domain users to elevate when setting a network's location' is set to 'Enabled'" + description: "This policy setting determines whether to require domain users to elevate when setting a network's location. The recommended state for this setting is: Enabled." + rationale: "Allowing regular users to set a network location increases the risk and attack surface." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Connections\\Require domain users to elevate when setting a network's location Note: This Group Policy path may not exist by default. It is provided by the Group Policy template NetworkConnections.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.5.11.3"] + - cis_csc: ["5.1"] + references: + - 'CCE-38188-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> NC_StdDomainUserSetLocation -> 1' + + - id: 11095 + title: "Ensure 'Minimize the number of simultaneous connections to the Internet or a Windows Domain' is set to 'Enabled'" + description: "This policy setting prevents computers from connecting to both a domain based network and a non-domain based network at the same time. The recommended state for this setting is: Enabled." + rationale: "Blocking simultaneous connections can help prevent a user unknowingly allowing network traffic to flow between the Internet and the enterprise managed network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Windows Connection Manager\\Minimize the number of simultaneous connections to the Internet or a Windows Domain Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WCM.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.5.21.1"] + - cis_csc: ["12"] + references: + - 'CCE-38338-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\GroupPolicy -> fMinimizeConnections -> 1' + +# Section 18.8 - System + - id: 11096 + title: "Ensure 'Include command line in process creation events' is set to 'Disabled'" + description: "This policy setting determines what information is logged in security audit events when a new process has been created. The recommended state for this setting is: Disabled." + rationale: "When this policy setting is enabled, any user who has read access to the security events can read the command-line arguments for any successfully created process. Command-line arguments may contain sensitive or private information such as passwords or user data." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Audit Process Creation\\Include command line in process creation events Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AuditSettings.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.8.3.1"] + - cis_csc: ["16.14"] + references: + - 'CCE-36925-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit -> ProcessCreationIncludeCmdLine_Enabled -> 0' + + - id: 11097 + title: "Ensure 'Boot-Start Driver Initialization Policy' is set to 'Enabled: Good, unknown and bad but critical'" + description: "This policy setting allows you to specify which boot-start drivers are initialized based on a classification determined by an Early Launch Antimalware boot-start driver. The Early Launch Antimalware boot-start driver can return the following classifications for each boot-start driver: -Good: The driver has been signed and has not been tampered with. -Bad: The driver has been identified as malware. It is recommended that you do not allow known bad drivers to be initialized. -Bad, but required for boot: The driver has been identified as malware, but the computer cannot successfully boot without loading this driver. -Unknown: This driver has not been attested to by your malware detection application and has not been classified by the Early Launch Antimalware boot-start driver. If you enable this policy setting you will be able to choose which boot-start drivers to initialize the next time the computer is started. If your malware detection application does not include an Early Launch Antimalware boot- start driver or if your Early Launch Antimalware boot-start driver has been disabled, this setting has no effect and all boot-start drivers are initialized. The recommended state for this setting is: Enabled: Good, unknown and bad but critical." + rationale: "This policy setting helps reduce the impact of malware that has already infected your system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Good, unknown and bad but critical: Computer Configuration\\Policies\\Administrative Templates\\System\\Early Launch Antimalware\\Boot-Start Driver Initialization Policy Note: This Group Policy path may not exist by default. It is provided by the Group Policy template EarlyLaunchAM.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.14.1"] + - cis_csc: ["8"] + references: + - 'CCE-37912-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies\EarlyLaunch -> DriverLoadPolicy -> 3' + + - id: 11098 + title: "Ensure 'Configure registry policy processing: Do not apply during periodic background processing' is set to 'Enabled: FALSE'" + description: "The 'Do not apply during periodic background processing' option prevents the system from updating affected policies in the background while the computer is in use. When background updates are disabled, policy changes will not take effect until the next user logon or system restart. The recommended state for this setting is: Enabled: FALSE (unchecked)." + rationale: "Setting this option to false (unchecked) will ensure that domain policy changes take effect more quickly, as compared to waiting until the next user logon or system restart." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, then set the Do not apply during periodic background processing option to FALSE (unchecked): Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Configure registry policy processing Note: This Group Policy path may not exist by default. It is provided by the Group Policy template GroupPolicy.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.21.2"] + - cis_csc: ["3.7"] + references: + - 'CCE-36169-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> NoBackgroundPolicy -> 0' + + - id: 11099 + title: "Ensure 'Configure registry policy processing: Process even if the Group Policy objects have not changed' is set to 'Enabled: TRUE'" + description: "The 'Process even if the Group Policy objects have not changed' option updates and reapplies policies even if the policies have not changed. The recommended state for this setting is: Enabled: TRUE (checked)." + rationale: "Setting this option to true (checked) will ensure unauthorized changes that might have been configured locally are forced to match the domain-based Group Policy settings again." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, then set the Process even if the Group Policy objects have not changed option to TRUE (checked): Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Configure registry policy processing Note: This Group Policy path may not exist by default. It is provided by the Group Policy template GroupPolicy.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.21.3"] + - cis_csc: ["3.7"] + references: + - 'CCE-36169-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> NoGPOListChanges -> 0' + + - id: 11100 + title: "Ensure 'Turn off background refresh of Group Policy' is set to 'Disabled'" + description: "This policy setting prevents Group Policy from being updated while the computer is in use. This policy setting applies to Group Policy for computers, users and Domain Controllers. The recommended state for this setting is: Disabled." + rationale: "This setting ensures that group policy changes take effect more quickly, as compared to waiting until the next user logon or system restart." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Turn off background refresh of Group Policy Note: This Group Policy path is provided by the Group Policy template GroupPolicy.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.21.4"] + - cis_csc: ["3.7"] + references: + - 'CCE-37712-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> DisableBkGndGroupPolicy -> 0' + +# Section 18.8 - System + - id: 11101 + title: "Ensure 'Turn off downloading of print drivers over HTTP' is set to 'Enabled'" + description: "This policy setting controls whether the computer can download print driver packages over HTTP. To set up HTTP printing, printer drivers that are not available in the standard operating system installation might need to be downloaded over HTTP. The recommended state for this setting is: Enabled." + rationale: "Users might download drivers that include malicious code." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off downloading of print drivers over HTTP Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.1"] + - cis_csc: ["2"] + references: + - 'CCE-36625-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers -> DisableWebPnPDownload -> 1' + + - id: 11102 + title: "Ensure 'Turn off Internet download for Web publishing and online ordering wizards' is set to 'Enabled'" + description: "This policy setting controls whether Windows will download a list of providers for the Web publishing and online ordering wizards. The recommended state for this setting is: Enabled." + rationale: "Although the risk is minimal, enabling this setting will reduce the possibility of a user unknowingly downloading malicious content through this feature." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Internet download for Web publishing and online ordering wizards Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.5"] + - cis_csc: ["7"] + references: + - 'CCE-36096-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoWebServices -> 1' + + - id: 11103 + title: "Ensure 'Turn off printing over HTTP' is set to 'Enabled'" + description: "This policy setting allows you to disable the client computer's ability to print over HTTP, which allows the computer to print to printers on the intranet as well as the Internet. The recommended state for this setting is: Enabled." + rationale: "Information that is transmitted over HTTP through this capability is not protected and can be intercepted by malicious users. For this reason, it is not often used in enterprise managed environments." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off printing over HTTP Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.6"] + - cis_csc: ["13.1"] + references: + - 'CCE-36920-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers -> DisableHTTPPrinting -> 1' + + - id: 11104 + title: "Ensure 'Do not display network selection UI' is set to 'Enabled'" + description: "This policy setting allows you to control whether anyone can interact with available networks UI on the logon screen. The recommended state for this setting is: Enabled." + rationale: "An unauthorized user could disconnect the PC from the network or can connect the PC to other available networks without signing into Windows." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Do not display network selection UI Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.8.27.1"] + - cis_csc: ["5"] + references: + - 'CCE-38353-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DontDisplayNetworkSelectionUI -> 1' + + - id: 11105 + title: "Ensure 'Do not enumerate connected users on domain-joined computers' is set to 'Enabled'" + description: "This policy setting prevents connected users from being enumerated on domain-joined computers. The recommended state for this setting is: Enabled." + rationale: "A malicious user could use this feature to gather account names of other users, that information could then be used in conjunction with other types of attacks such as guessing passwords or social engineering. The value of this countermeasure is small because a user with domain credentials could gather the same account information using other methods." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Do not enumerate connected users on domain-joined computers Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.27.2"] + - cis_csc: ["16.9"] + references: + - 'CCE-37838-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DontEnumerateConnectedUsers -> 1' + + - id: 11106 + title: "Ensure 'Enumerate local users on domain-joined computers' is set to 'Disabled'" + description: "This policy setting allows local users to be enumerated on domain-joined computers. The recommended state for this setting is: Disabled." + rationale: "A malicious user could use this feature to gather account names of other users, that information could then be used in conjunction with other types of attacks such as guessing passwords or social engineering. The value of this countermeasure is small because a user with domain credentials could gather the same account information using other methods." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Enumerate local users on domain-joined computers Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.27.3"] + - cis_csc: ["16.9"] + references: + - 'CCE-35894-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnumerateLocalUsers -> 0' + + - id: 11107 + title: "Ensure 'Turn off app notifications on the lock screen' is set to 'Enabled'" + description: "This policy setting allows you to prevent app notifications from appearing on the lock screen. The recommended state for this setting is: Enabled." + rationale: "App notifications might display sensitive business or personal data." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Turn off app notifications on the lock screen Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.27.4"] + - cis_csc: ["16.5"] + references: + - 'CCE-35893-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DisableLockScreenAppNotifications -> 1' + + - id: 11108 + title: "Ensure 'Turn on convenience PIN sign-in' is set to 'Disabled'" + description: "This policy setting allows you to control whether a domain user can sign in using a convenience PIN. In Windows 10, convenience PIN was replaced with Passport, which has stronger security properties. To configure Passport for domain users, use the policies under Computer Configuration\\Administrative Templates\\Windows Components\\Microsoft Passport for Work. Note: The user's domain password will be cached in the system vault when using this feature. The recommended state for this setting is: Disabled." + rationale: "A PIN is created from a much smaller selection of characters than a password, so in most cases a PIN will be much less robust than a password." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Turn on convenience PIN sign-in Note: This Group Policy path may not exist by default. It is provided by the Group Policy template CredentialProviders.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer). Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Turn on PIN sign-in, but it was renamed starting with the Windows 10 Release 1511 Administrative Templates." + compliance: + - cis: ["18.8.27.6"] + - cis_csc: ["16.5"] + references: + - 'CCE-37528-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> AllowDomainPINLogon -> 0' + + - id: 11109 + title: "Ensure 'Require a password when a computer wakes (on battery)' is set to 'Enabled'" + description: "Specifies whether or not the user is prompted for a password when the system resumes from sleep. The recommended state for this setting is: Enabled." + rationale: "Enabling this setting ensures that anyone who wakes an unattended computer from sleep state will have to provide logon credentials before they can access the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Power Management\\Sleep Settings\\Require a password when a computer wakes (on battery) Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Power.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.33.6.1"] + - cis_csc: ["16.5"] + references: + - 'CCE-36881-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\0e796bdb-100d-47d6-a2d5-f7d2daa51f51 -> DCSettingIndex -> 1' + + - id: 11110 + title: "Ensure 'Require a password when a computer wakes (plugged in)' is set to 'Enabled'" + description: "Specifies whether or not the user is prompted for a password when the system resumes from sleep. The recommended state for this setting is: Enabled." + rationale: "Enabling this setting ensures that anyone who wakes an unattended computer from sleep state will have to provide logon credentials before they can access the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Power Management\\Sleep Settings\\Require a password when a computer wakes (plugged in) Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Power.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.33.6.2"] + - cis_csc: ["16.5"] + references: + - 'CCE-37066-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\0e796bdb-100d-47d6-a2d5-f7d2daa51f51 -> ACSettingIndex -> 1' + + - id: 11111 + title: "Ensure 'Configure Offer Remote Assistance' is set to 'Disabled'" + description: "This policy setting allows you to turn on or turn off Offer (Unsolicited) Remote Assistance on this computer. Help desk and support personnel will not be able to proactively offer assistance, although they can still respond to user assistance requests. The recommended state for this setting is: Disabled." + rationale: "A user might be tricked and accept an unsolicited Remote Assistance offer from a malicious user." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Assistance\\Configure Offer Remote Assistance Note: This Group Policy path may not exist by default. It is provided by the Group Policy template RemoteAssistance.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.35.1"] + - cis_csc: ["9.1"] + references: + - 'CCE-36388-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fAllowUnsolicited -> 0' + + - id: 11112 + title: "Ensure 'Configure Solicited Remote Assistance' is set to 'Disabled'" + description: "This policy setting allows you to turn on or turn off Solicited (Ask for) Remote Assistance on this computer. The recommended state for this setting is: Disabled." + rationale: "There is slight risk that a rogue administrator will gain access to another user's desktop session, however, they cannot connect to a user's computer unannounced or control it without permission from the user. When an expert tries to connect, the user can still choose to deny the connection or give the expert view-only privileges. The user must explicitly click the Yes button to allow the expert to remotely control the workstation." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Assistance\\Configure Solicited Remote Assistance Note: This Group Policy path may not exist by default. It is provided by the Group Policy template RemoteAssistance.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.35.2"] + - cis_csc: ["5.1"] + references: + - 'CCE-37281-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fAllowToGetHelp -> 0' + +# Section 18.9 - Windows Components + - id: 11113 + title: "Ensure 'Allow Microsoft accounts to be optional' is set to 'Enabled'" + description: "This policy setting lets you control whether Microsoft accounts are optional for Windows Store apps that require an account to sign in. This policy only affects Windows Store apps that support it. The recommended state for this setting is: Enabled." + rationale: "Enabling this setting allows an organization to use their enterprise user accounts instead of using their Microsoft accounts when accessing Windows store apps. This provides the organization with greater control over relevant credentials. Microsoft accounts cannot be centrally managed and as such enterprise credential security policies cannot be applied to them, which could put any information accessed by using Microsoft accounts at risk." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\App runtime\\Allow Microsoft accounts to be optional Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AppXRuntime.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.6.1"] + - cis_csc: ["16.9"] + references: + - 'CCE-38354-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> MSAOptional -> 1' + + - id: 11114 + title: "Ensure 'Disallow Autoplay for non-volume devices' is set to 'Enabled'" + description: "This policy setting disallows AutoPlay for MTP devices like cameras or phones. The recommended state for this setting is: Enabled." + rationale: "An attacker could use this feature to launch a program to damage a client computer or data on the computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Disallow Autoplay for non-volume devices Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AutoPlay.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.9.8.1"] + - cis_csc: ["8.3"] + references: + - 'CCE-37636-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoAutoplayfornonVolume -> 1' + + - id: 11115 + title: "Ensure 'Set the default behavior for AutoRun' is set to 'Enabled: Do not execute any autorun commands'" + description: "This policy setting sets the default behavior for Autorun commands. Autorun commands are generally stored in autorun.inf files. They often launch the installation program or other routines. The recommended state for this setting is: Enabled: Do not execute any autorun commands." + rationale: "Prior to Windows Vista, when media containing an autorun command is inserted, the system will automatically execute the program without user intervention. This creates a major security concern as code may be executed without user's knowledge. The default behavior starting with Windows Vista is to prompt the user whether autorun command is to be run. The autorun command is represented as a handler in the Autoplay dialog." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Do not execute any autorun commands: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Set the default behavior for AutoRun Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AutoPlay.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.9.8.2"] + - cis_csc: ["8.3"] + references: + - 'CCE-38217-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoAutorun -> 1' + + - id: 11116 + title: "Ensure 'Turn off Autoplay' is set to 'Enabled: All drives'" + description: "Autoplay starts to read from a drive as soon as you insert media in the drive, which causes the setup file for programs or audio media to start immediately. An attacker could use this feature to launch a program to damage the computer or data on the computer. Autoplay is disabled by default on some removable drive types, such as floppy disk and network drives, but not on CD-ROM drives. Note: You cannot use this policy setting to enable Autoplay on computer drives in which it is disabled by default, such as floppy disk and network drives. The recommended state for this setting is: Enabled: All drives." + rationale: "An attacker could use this feature to launch a program to damage a client computer or data on the computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: All drives: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Turn off Autoplay Note: This Group Policy path is provided by the Group Policy template AutoPlay.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.8.3"] + - cis_csc: ["8.3"] + references: + - 'CCE-36875-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoDriveTypeAutoRun -> 255' + + - id: 11117 + title: "Ensure 'Do not display the password reveal button' is set to 'Enabled'" + description: "This policy setting allows you to configure the display of the password reveal button in password entry user experiences. The recommended state for this setting is: Enabled." + rationale: "This is a useful feature when entering a long and complex password, especially when using a touchscreen. The potential risk is that someone else may see your password while surreptitiously observing your screen." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Credential User Interface\\Do not display the password reveal button Note: This Group Policy path may not exist by default. It is provided by the Group Policy template CredUI.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.9.15.1"] + - cis_csc: ["16"] + references: + - 'CCE-37534-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredUI -> DisablePasswordReveal -> 1' + + - id: 11118 + title: "Ensure 'Enumerate administrator accounts on elevation' is set to 'Disabled'" + description: "This policy setting controls whether administrator accounts are displayed when a user attempts to elevate a running application. The recommended state for this setting is: Disabled." + rationale: "Users could see the list of administrator accounts, making it slightly easier for a malicious user who has logged onto a console session to try to crack the passwords of those accounts." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Credential User Interface\\Enumerate administrator accounts on elevation Note: This Group Policy path is provided by the Group Policy template CredUI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.15.2"] + - cis_csc: ["16"] + references: + - 'CCE-36512-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\CredUI -> EnumerateAdministrators -> 0' + + - id: 11119 + title: "Ensure 'Application: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" + description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." + rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Application\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.1.1"] + - cis_csc: ["6.3"] + references: + - 'CCE-37775-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> Retention -> 0' + + - id: 11120 + title: "Ensure 'Application: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" + description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 32,768 or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Application\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.1.2"] + - cis_csc: ["6.3"] + references: + - 'CCE-37948-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> n:^(\d+) compare >= 32768' + + - id: 11121 + title: "Ensure 'Security: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" + description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." + rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Security\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.2.1"] + - cis_csc: ["6.3"] + references: + - 'CCE-37145-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> Retention -> 0' + + - id: 11122 + title: "Ensure 'Security: Specify the maximum log file size (KB)' is set to 'Enabled: 196,608 or greater'" + description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 196,608 or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 196,608 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Security\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.2.2"] + - cis_csc: ["6.3"] + references: + - 'CCE-37695-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> n:^(\d+) compare >= 196608' + + - id: 11123 + title: "Ensure 'Setup: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" + description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." + rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Setup\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.3.1"] + - cis_csc: ["6.3"] + references: + - 'CCE-38276-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> Retention -> 0' + + - id: 11124 + title: "Ensure 'Setup: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" + description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 32,768 or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Setup\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.3.2"] + - cis_csc: ["6.3"] + references: + - 'CCE-37526-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> n:^(\d+) compare >= 32768' + + - id: 11125 + title: "Ensure 'System: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" + description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." + rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\System\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.4.1"] + - cis_csc: ["6.3"] + references: + - 'CCE-36160-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> Retention -> 0' + + - id: 11126 + title: "Ensure 'System: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" + description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 32,768 or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\System\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.4.2"] + - cis_csc: ["6.3"] + references: + - 'CCE-36092-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> n:^(\d+) compare >= 32768' + + - id: 11127 + title: "Ensure 'Turn off Data Execution Prevention for Explorer' is set to 'Disabled'" + description: "Disabling Data Execution Prevention can allow certain legacy plug-in applications to function without terminating Explorer. The recommended state for this setting is: Disabled." + rationale: "Data Execution Prevention is an important security feature supported by Explorer that helps to limit the impact of certain types of malware." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off Data Execution Prevention for Explorer Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Explorer.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.30.2"] + - cis_csc: ["8.4"] + references: + - 'CCE-37809-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoDataExecutionPrevention -> 0' + + - id: 11128 + title: "Ensure 'Turn off heap termination on corruption' is set to 'Disabled'" + description: "This policy setting allows you to configure the amount of functionality that the shell protocol can have. When using the full functionality of this protocol, applications can open folders and launch files. The protected mode reduces the functionality of this protocol allowing applications to only open a limited set of folders. Applications are not able to open files with this protocol when it is in the protected mode. It is recommended to leave this protocol in the protected mode to increase the security of Windows. The recommended state for this setting is: Disabled." + rationale: "Limiting the opening of files and folders to a limited set reduces the attack surface of the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off shell protocol protected mode Note: This Group Policy path is provided by the Group Policy template WindowsExplorer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.30.3"] + - cis_csc: ["8.4"] + references: + - 'CCE-36660-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoHeapTerminationOnCorruption -> 0' + + - id: 11129 + title: "Ensure 'Turn off shell protocol protected mode' is set to 'Disabled'" + description: "This policy setting allows you to configure the amount of functionality that the shell protocol can have. When using the full functionality of this protocol, applications can open folders and launch files. The protected mode reduces the functionality of this protocol allowing applications to only open a limited set of folders. Applications are not able to open files with this protocol when it is in the protected mode. It is recommended to leave this protocol in the protected mode to increase the security of Windows. The recommended state for this setting is: Disabled." + rationale: "Limiting the opening of files and folders to a limited set reduces the attack surface of the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off shell protocol protected mode Note: This Group Policy path is provided by the Group Policy template WindowsExplorer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.30.4"] + - cis_csc: ["8.4"] + references: + - 'CCE-36809-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> PreXPSP2ShellProtocolBehavior -> 0' + + - id: 11130 + title: "Ensure 'Prevent the usage of OneDrive for file storage' is set to 'Enabled'" + description: "This policy setting lets you prevent apps and features from working with files on OneDrive using the Next Generation Sync Client. The recommended state for this setting is: Enabled." + rationale: "Enabling this setting prevents users from accidentally uploading confidential or sensitive corporate information to the OneDrive cloud service using the Next Generation Sync Client." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\OneDrive\\Prevent the usage of OneDrive for file storage Note: This Group Policy path may not exist by default. It is provided by the Group Policy template SkyDrive.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer). However, we strongly recommend you only use the version included with the Microsoft Windows 10 Release 1607 & Server 2016 Administrative Templates (or newer). Older versions of the templates had conflicting settings in different template files for both OneDrive & SkyDrive, until it was cleaned up properly in the above version. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Prevent the usage of SkyDrive for file storage, but it was renamed starting with the Windows 10 RTM (Release 1507) Administrative Templates." + compliance: + - cis: ["18.9.52.1"] + - cis_csc: ["13"] + references: + - 'CCE-36939-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\OneDrive -> DisableFileSyncNGSC -> 1' + + - id: 11131 + title: "Ensure 'Do not allow passwords to be saved' is set to 'Enabled'" + description: "This policy setting helps prevent Remote Desktop clients from saving passwords on a computer. The recommended state for this setting is: Enabled. Note: If this policy setting was previously configured as Disabled or Not configured, any previously saved passwords will be deleted the first time a Remote Desktop client disconnects from any server." + rationale: "An attacker with physical access to the computer may be able to break the protection guarding saved passwords. An attacker who compromises a user's account and connects to their computer could use saved passwords to gain access to additional hosts." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Connection Client\\Do not allow passwords to be saved Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.2.2"] + - cis_csc: ["16.4"] + references: + - 'CCE-36223-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> DisablePasswordSaving -> 1' + + - id: 11132 + title: "Ensure 'Do not allow drive redirection' is set to 'Enabled'" + description: "This policy setting prevents users from sharing the local drives on their client computers to Remote Desktop Servers that they access. Mapped drives appear in the session folder tree in Windows Explorer in the following format: \\\\TSClient\\$ If local drives are shared they are left vulnerable to intruders who want to exploit the data that is stored on them. The recommended state for this setting is: Enabled." + rationale: "Data could be forwarded from the user's Remote Desktop Services session to the user's local computer without any direct user interaction. Malicious software already present on a compromised server would have direct and stealthy disk access to the user's local computer during the Remote Desktop session." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow drive redirection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.3.2"] + - cis_csc: ["13"] + references: + - 'CCE-36509-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableCdm -> 1' + + - id: 11133 + title: "Ensure 'Always prompt for password upon connection' is set to 'Enabled'" + description: "This policy setting specifies whether Remote Desktop Services always prompts the client computer for a password upon connection. You can use this policy setting to enforce a password prompt for users who log on to Remote Desktop Services, even if they already provided the password in the Remote Desktop Connection client. The recommended state for this setting is: Enabled." + rationale: "Users have the option to store both their username and password when they create a new Remote Desktop Connection shortcut. If the server that runs Remote Desktop Services allows users who have used this feature to log on to the server but not enter their password, then it is possible that an attacker who has gained physical access to the user's computer could connect to a Remote Desktop Server through the Remote Desktop Connection shortcut, even though they may not know the user's password." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Always prompt for password upon connection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In the Microsoft Windows Vista Administrative Templates, this setting was named Always prompt client for password upon connection, but it was renamed starting with the Windows Server 2008 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.58.3.9.1"] + - cis_csc: ["16.14"] + references: + - 'CCE-37929-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fPromptForPassword -> 1' + + - id: 11134 + title: "Ensure 'Require secure RPC communication' is set to 'Enabled'" + description: "This policy setting allows you to specify whether Remote Desktop Services requires secure Remote Procedure Call (RPC) communication with all clients or allows unsecured communication. You can use this policy setting to strengthen the security of RPC communication with clients by allowing only authenticated and encrypted requests. The recommended state for this setting is: Enabled." + rationale: "Allowing unsecure RPC communication can exposes the server to man in the middle attacks and data disclosure attacks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Require secure RPC communication Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.9.2"] + - cis_csc: ["3.4"] + references: + - 'CCE-37567-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fEncryptRPCTraffic -> 1' + + - id: 11135 + title: "Ensure 'Set client connection encryption level' is set to 'Enabled: High Level'" + description: "This policy setting specifies whether to require the use of a specific encryption level to secure communications between client computers and RD Session Host servers during Remote Desktop Protocol (RDP) connections. This policy only applies when you are using native RDP encryption. However, native RDP encryption (as opposed to SSL encryption) is not recommended. This policy does not apply to SSL encryption. The recommended state for this setting is: Enabled: High Level." + rationale: "If Remote Desktop client connections that use low level encryption are allowed, it is more likely that an attacker will be able to decrypt any captured Remote Desktop Services network traffic." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: High Level: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Set client connection encryption level Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.9.3"] + - cis_csc: ["3.4"] + references: + - 'CCE-36627-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MinEncryptionLevel -> 3' + + - id: 11136 + title: "Ensure 'Do not delete temp folders upon exit' is set to 'Disabled'" + description: "This policy setting specifies whether Remote Desktop Services retains a user's per-session temporary folders at logoff. The recommended state for this setting is: Disabled." + rationale: "Sensitive information could be contained inside the temporary folders and visible to other administrators that log into the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Temporary Folders\\Do not delete temp folders upon exit Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Do not delete temp folder upon exit, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.58.3.11.1"] + - cis_csc: ["14.4"] + references: + - 'CCE-37946-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> DeleteTempDirsOnExit -> 1' + + - id: 11137 + title: "Ensure 'Do not use temporary folders per session' is set to 'Disabled'" + description: "By default, Remote Desktop Services creates a separate temporary folder on the RD Session Host server for each active session that a user maintains on the RD Session Host server. The temporary folder is created on the RD Session Host server in a Temp folder under the user's profile folder and is named with the sessionid. This temporary folder is used to store individual temporary files. To reclaim disk space, the temporary folder is deleted when the user logs off from a session. The recommended state for this setting is: Disabled." + rationale: "Disabling this setting keeps the cached data independent for each session, both reducing the chance of problems from shared cached data between sessions, and keeping possibly sensitive data separate to each user session." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Temporary Folders\\Do not use temporary folders per session Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.11.2"] + - cis_csc: ["14.4"] + references: + - 'CCE-38180-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> PerSessionTempDir -> 1' + + - id: 11138 + title: "Ensure 'Prevent downloading of enclosures' is set to 'Enabled'" + description: "This policy setting prevents the user from having enclosures (file attachments) downloaded from an RSS feed to the user's computer. The recommended state for this setting is: Enabled." + rationale: "Allowing attachments to be downloaded through the RSS feed can introduce files that could have malicious intent." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\RSS Feeds\\Prevent downloading of enclosures Note: This Group Policy path is provided by the Group Policy template InetRes.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Turn off downloading of enclosures, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.59.1"] + - cis_csc: ["7.2"] + references: + - 'CCE-37126-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Feeds -> DisableEnclosureDownload -> 1' + + - id: 11139 + title: "Ensure 'Allow indexing of encrypted files' is set to 'Disabled'" + description: "This policy setting controls whether encrypted items are allowed to be indexed. When this setting is changed, the index is rebuilt completely. Full volume encryption (such as BitLocker Drive Encryption or a non-Microsoft solution) must be used for the location of the index to maintain security for encrypted files. The recommended state for this setting is: Disabled." + rationale: "Indexing and allowing users to search encrypted files could potentially reveal confidential data stored within the encrypted files." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Allow indexing of encrypted files Note: This Group Policy path is provided by the Group Policy template Search.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.60.2"] + - cis_csc: ["13.1"] + references: + - 'CCE-38277-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> AllowIndexingEncryptedStoresOrItems -> 0' + + - id: 11140 + title: "Ensure 'Configure Windows Defender SmartScreen' is set to 'Enabled: Warn and prevent bypass'" + description: "This policy setting allows you to manage the behavior of Windows SmartScreen. Windows SmartScreen helps keep PCs safer by warning users before running unrecognized programs downloaded from the Internet. Some information is sent to Microsoft about files and programs run on PCs with this feature enabled. The recommended state for this setting is: Enabled: Warn and prevent bypass." + rationale: "Windows SmartScreen helps keep PCs safer by warning users before running unrecognized programs downloaded from the Internet. However, due to the fact that some information is sent to Microsoft about files and programs run on PCs some organizations may prefer to disable it." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Warn and prevent bypass: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender SmartScreen\\Explorer\\Configure Windows Defender SmartScreen Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsExplorer.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer). Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Configure Windows SmartScreen, but it was renamed starting with the Windows 10 Release 1703 Administrative Templates." + compliance: + - cis: ["18.9.80.1.1"] + - cis_csc: ["2"] + references: + - 'CCE-35859-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnableSmartScreen -> 2' + + - id: 11141 + title: "Ensure 'Configure Default consent' is set to 'Enabled: Always ask before sending data'" + description: "This setting allows you to set the default consent handling for error reports. The recommended state for this setting is: Enabled: Always ask before sending data" + rationale: "Error reports may contain sensitive information and should not be sent to anyone automatically." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Always ask before sending data: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Error Reporting\\Consent\\Configure Default consent Note: This Group Policy path is provided by the Group Policy template ErrorReporting.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.81.2.1"] + - cis_csc: ["13"] + references: + - 'CCE-37112-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent -> DefaultConsent -> 1' + + - id: 11142 + title: "Ensure 'Automatically send memory dumps for OS-generated error reports' is set to 'Disabled'" + description: "This policy setting controls whether memory dumps in support of OS-generated error reports can be sent to Microsoft automatically. This policy does not apply to error reports generated by 3rd-party products, or additional data other than memory dumps. The recommended state for this setting is: Disabled." + rationale: "Memory dumps may contain sensitive information and should not be automatically sent to anyone." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Error Reporting\\Automatically send memory dumps for OS- generated error reports Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ErrorReporting.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.81.3"] + - cis_csc: ["13"] + references: + - 'CCE-36978-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> AutoApproveOSDumps -> 0' + + - id: 11143 + title: "Ensure 'Allow user control over installs' is set to 'Disabled'" + description: "This setting controls whether users are permitted to change installation options that typically are available only to system administrators. The security features of Windows Installer normally prevent users from changing installation options that are typically reserved for system administrators, such as specifying the directory to which files are installed. If Windows Installer detects that an installation package has permitted the user to change a protected option, it stops the installation and displays a message. These security features operate only when the installation program is running in a privileged security context in which it has access to directories denied to the user. The recommended state for this setting is: Disabled." + rationale: "In an enterprise managed environment, only IT staff with administrative rights should be installing or changing software on a system. Allowing users the ability to have any control over installs can risk unapproved software from being installed or removed from a system, which could cause the system to become vulnerable to compromise." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Allow user control over installs Note: This Group Policy path is provided by the Group Policy template MSI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Enable user control over installs, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.85.1"] + - cis_csc: ["5.1"] + references: + - 'CCE-36400-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> EnableUserControl -> 0' + + - id: 11144 + title: "Ensure 'Always install with elevated privileges' is set to 'Disabled'" + description: "This setting controls whether or not Windows Installer should use system permissions when it installs any program on the system. Note: This setting appears both in the Computer Configuration and User Configuration folders. To make this setting effective, you must enable the setting in both folders. Caution: If enabled, skilled users can take advantage of the permissions this setting grants to change their privileges and gain permanent access to restricted files and folders. Note that the User Configuration version of this setting is not guaranteed to be secure. The recommended state for this setting is: Disabled." + rationale: "Users with limited privileges can exploit this feature by creating a Windows Installer installation package that creates a new local account that belongs to the local built-in Administrators group, adds their current account to the local built-in Administrators group, installs malicious software, or performs other unauthorized activities." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Always install with elevated privileges Note: This Group Policy path is provided by the Group Policy template MSI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.85.2"] + - cis_csc: ["5.1"] + references: + - 'CCE-36919-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> AlwaysInstallElevated -> 0' + + - id: 11145 + title: "Ensure 'Sign-in last interactive user automatically after a system-initiated restart' is set to 'Disabled'" + description: "This policy setting controls whether a device will automatically sign-in the last interactive user after Windows Update restarts the system. The recommended state for this setting is: Disabled." + rationale: "Disabling this feature will prevent the caching of user's credentials and unauthorized use of the device, and also ensure the user is aware of the restart." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Logon Options\\Sign-in last interactive user automatically after a system-initiated restart Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WinLogon.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.86.1"] + - cis_csc: ["16.5"] + references: + - 'CCE-36977-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> DisableAutomaticRestartSignOn -> 1' + + - id: 11146 + title: "Ensure 'Turn on PowerShell Script Block Logging' is set to 'Disabled'" + description: "This policy setting enables logging of all PowerShell script input to the Microsoft-Windows- PowerShell/Operational event log. The recommended state for this setting is: Disabled. Note: In Microsoft's own hardening guidance, they recommend the opposite value, Enabled, because having this data logged improves investigations of PowerShell attack incidents. However, the default ACL on the PowerShell Operational log allows Interactive User (i.e. any logged on user) to read it, and therefore possibly expose passwords or other sensitive information to unauthorized users. If Microsoft locks down the default ACL on that log in the future (e.g. to restrict it only to Administrators), then we will revisit this recommendation in a future release." + rationale: "There are potential risks of capturing passwords in the PowerShell logs. This setting should only be needed for debugging purposes, and not in normal operation, it is important to ensure this is set to Disabled." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows PowerShell\\Turn on PowerShell Script Block Logging Note: This Group Policy path may not exist by default. It is provided by the Group Policy template PowerShellExecutionPolicy.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." + compliance: + - cis: ["18.9.95.1"] + - cis_csc: ["16.4"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging -> EnableScriptBlockLogging -> 0' + + - id: 11147 + title: "Ensure 'Turn on PowerShell Transcription' is set to 'Disabled'" + description: "This Policy setting lets you capture the input and output of Windows PowerShell commands into text-based transcripts. The recommended state for this setting is: Disabled." + rationale: "If this setting is enabled there is a risk that passwords could get stored in plain text in the PowerShell_transcript output file." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows PowerShell\\Turn on PowerShell Transcription Note: This Group Policy path may not exist by default. It is provided by the Group Policy template PowerShellExecutionPolicy.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." + compliance: + - cis: ["18.9.95.2"] + - cis_csc: ["16.4"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription -> EnableTranscripting -> 0' + + - id: 11148 + title: "Ensure 'Allow Basic authentication' is set to 'Disabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client uses Basic authentication. The recommended state for this setting is: Disabled." + rationale: "Basic authentication is less robust than other authentication methods available in WinRM because credentials including passwords are transmitted in plain text. An attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Allow Basic authentication Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.97.1.1"] + - cis_csc: ["16.13"] + references: + - 'CCE-36310-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowBasic -> 0' + + - id: 11149 + title: "Ensure 'Allow unencrypted traffic' is set to 'Disabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client sends and receives unencrypted messages over the network. The recommended state for this setting is: Disabled." + rationale: "Encrypting WinRM network traffic reduces the risk of an attacker viewing or modifying WinRM messages as they transit the network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Allow unencrypted traffic Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.97.1.2"] + - cis_csc: ["16.13"] + references: + - 'CCE-37726-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowUnencryptedTraffic -> 0' + + - id: 11150 + title: "Ensure 'Disallow Digest authentication' is set to 'Enabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client will not use Digest authentication. The recommended state for this setting is: Enabled." + rationale: "Digest authentication is less robust than other authentication methods available in WinRM, an attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Disallow Digest authentication Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.97.1.3"] + - cis_csc: ["16.13"] + references: + - 'CCE-38318-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowDigest -> 0' + + - id: 11151 + title: "Ensure 'Allow Basic authentication' is set to 'Disabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service accepts Basic authentication from a remote client. The recommended state for this setting is: Disabled." + rationale: "Basic authentication is less robust than other authentication methods available in WinRM because credentials including passwords are transmitted in plain text. An attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow Basic authentication Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.97.2.1"] + - cis_csc: ["16.13"] + references: + - 'CCE-36254-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowBasic -> 0' + + - id: 11152 + title: "Ensure 'Allow unencrypted traffic' is set to 'Disabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service sends and receives unencrypted messages over the network. The recommended state for this setting is: Disabled." + rationale: "Encrypting WinRM network traffic reduces the risk of an attacker viewing or modifying WinRM messages as they transit the network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow unencrypted traffic Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.97.2.3"] + - cis_csc: ["16.13"] + references: + - 'CCE-38223-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowUnencryptedTraffic -> 0' + + - id: 11153 + title: "Ensure 'Disallow WinRM from storing RunAs credentials' is set to 'Enabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service will allow RunAs credentials to be stored for any plug-ins. The recommended state for this setting is: Enabled. Note: If you enable and then disable this policy setting, any values that were previously configured for RunAsPassword will need to be reset." + rationale: "Although the ability to store RunAs credentials is a convenient feature it increases the risk of account compromise slightly. For example, if you forget to lock your desktop before leaving it unattended for a few minutes another person could access not only the desktop of your computer but also any hosts you manage via WinRM with cached RunAs credentials." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Disallow WinRM from storing RunAs credentials Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.9.97.2.4"] + - cis_csc: ["16.4"] + references: + - 'CCE-36000-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> DisableRunAs -> 1' + + - id: 11154 + title: "Ensure 'Configure Automatic Updates' is set to 'Enabled'" + description: "This policy setting specifies whether computers in your environment will receive security updates from Windows Update or WSUS. If you configure this policy setting to Enabled, the operating system will recognize when a network connection is available and then use the network connection to search Windows Update or your designated intranet site for updates that apply to them. After you configure this policy setting to Enabled, select one of the following three options in the Configure Automatic Updates Properties dialog box to specify how the service will work: 2 - Notify for download and auto install (Notify before downloading any updates) 3 - Auto download and notify for install (Download the updates automatically and notify when they are ready to be installed.) (Default setting) 4 - Auto download and schedule the install (Automatically download updates and install them on the schedule specified below.)) 5 - Allow local admin to choose setting (Leave decision on above choices up to the local Administrators (Not Recommended)) The recommended state for this setting is: Enabled. Note: The sub-setting 'Configure automatic updating:' has 4 possible values - all of them are valid depending on specific organizational needs, however if feasible we suggest using a value of 4 - Auto download and schedule the install. This suggestion is not a scored requirement. Note #2: Organizations that utilize a 3rd-party solution for patching may choose to exempt themselves from this setting, and instead configure it to Disabled so that the native Windows Update mechanism does not interfere with the 3rd-party patching process." + rationale: "Although each version of Windows is thoroughly tested before release, it is possible that problems will be discovered after the products are shipped. The Configure Automatic Updates setting can help you ensure that the computers in your environment will always have the most recent critical operating system updates and service packs installed." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Configure Automatic Updates Note: This Group Policy path is provided by the Group Policy template WindowsUpdate.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.101.2"] + - cis_csc: ["4.5"] + references: + - 'CCE-36172-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> NoAutoUpdate -> 0' + + - id: 11155 + title: "Ensure 'Configure Automatic Updates: Scheduled install day' is set to '0 - Every day'" + description: "This policy setting specifies when computers in your environment will receive security updates from Windows Update or WSUS. The recommended state for this setting is: 0 - Every day. Note: This setting is only applicable if 4 - Auto download and schedule the install is selected in Rule 18.9.101.2. It will have no impact if any other option is selected." + rationale: "Although each version of Windows is thoroughly tested before release, it is possible that problems will be discovered after the products are shipped. The Configure Automatic Updates setting can help you ensure that the computers in your environment will always have the most recent critical operating system updates and service packs installed." + remediation: "To establish the recommended configuration via GP, set the following UI path to 0 - Every day: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Configure Automatic Updates: Scheduled install day Note: This Group Policy path is provided by the Group Policy template WindowsUpdate.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.101.3"] + - cis_csc: ["4.5"] + references: + - 'CCE-36172-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> ScheduledInstallDay -> 0' + + - id: 11156 + title: "Ensure 'No auto-restart with logged on users for scheduled automatic updates installations' is set to 'Disabled'" + description: "This policy setting specifies that Automatic Updates will wait for computers to be restarted by the users who are logged on to them to complete a scheduled installation. The recommended state for this setting is: Disabled. Note: This setting applies only when you configure Automatic Updates to perform scheduled update installations. If you configure the Configure Automatic Updates setting to Disabled, this setting has no effect." + rationale: "Some security updates require that the computer be restarted to complete an installation. If the computer cannot restart automatically, then the most recent update will not completely install and no new updates will download to the computer until it is restarted. Without the auto-restart functionality, users who are not security-conscious may choose to indefinitely delay the restart, therefore keeping the computer in a less secure state." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\No auto-restart with logged on users for scheduled automatic updates installations Note: This Group Policy path is provided by the Group Policy template WindowsUpdate.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named No auto-restart for scheduled Automatic Updates installations, but it was renamed starting with the Windows 7 & Server 2008 R2 Administrative Templates." + compliance: + - cis: ["18.9.101.4"] + - cis_csc: ["4.5"] + references: + - 'CCE-37027-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> NoAutoRebootWithLoggedOnUsers -> 0' diff --git a/sca/windows/cis_win2012r2_domainL1_rcl.yml b/sca/windows/cis_win2012r2_domainL1_rcl.yml deleted file mode 100644 index fd1031e19..000000000 --- a/sca/windows/cis_win2012r2_domainL1_rcl.yml +++ /dev/null @@ -1,1976 +0,0 @@ -# Security Configuration assessment -# CIS Checks for Windows 2012 R2 Domain Controller L1 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.3.0 - 03-30-2018 -# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.1.0 - 11-02-2015 -# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.0.0 - 09-30-2015 - -policy: - id: "cis_win2012r2_domainL1" - file: "cis_win2012r2_domainL1_rcl.yml" - name: "CIS benchmark for Windows 2012 R2 Domain Controller L1" - description: "This document provides prescriptive guidance for establishing a secure configuration posture for Microsoft Windows Server 2012 R2." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check that the Windows platform is Windows Server 2012 R2" - description: "Requirements for running the CIS benchmark Domain Controller L1 under Windows Server 2012 R2" - condition: "any required" - rules: - - 'r:HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion -> ProductName -> r:^Windows Server 2012 R2;' - -checks: -# Section 1.1 - Password Policies - - id: 8000 - title: "Ensure 'Maximum password age' is set to '60 or fewer days, but not 0'" - description: "This policy setting defines how long a user can use their password before it expires. Values for this policy setting range from 0 to 999 days. If you set the value to 0, the password will never expire. Because attackers can crack passwords, the more frequently you change the password the less opportunity an attacker has to use a cracked password. However, the lower this value is set, the higher the potential for an increase in calls to help desk support due to users having to change their password or forgetting which password is current. The recommended state for this setting is 60 or fewer days, but not 0 ." - rationale: "The longer a password exists the higher the likelihood that it will be compromised by a brute force attack, by an attacker gaining general knowledge about the user, or by the user sharing the password. Configuring the Maximum password age setting to 0 so that users are never required to change their passwords is a major security risk because that allows a compromised password to be used by the malicious user for as long as the valid user is authorized access." - remediation: "To establish the recommended configuration via GP, set the following UI path to 60 or fewer days, but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Account Policies\\Password Policy\\Maximum password age." - compliance: - - cis: "1.1.2" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> 0;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> 3D;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> 3E;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> 3F;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:4\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:5\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:6\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:7\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:8\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:9\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:A\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:B\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:C\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:D\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:E\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:F\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:\w\w\w+;' -# Section 2.3 - Security Options - - id: 8001 - title: "Ensure 'Accounts: Block Microsoft accounts' is set to 'Users can't add or log on with Microsoft accounts" - description: "This policy setting prevents users from adding new Microsoft accounts on this computer. The recommended state for this setting is: Users can't add or log on with Microsoft accounts." - rationale: "Organizations that want to effectively implement identity management policies and maintain firm control of what accounts are used to log onto their computers will probably want to block Microsoft accounts. Organizations may also need to block Microsoft accounts in order to meet the requirements of compliance standards that apply to their information systems." - remediation: "To establish the recommended configuration via GP, set the following UI path to Users can't add or log on with Microsoft accounts : Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Accounts: Block Microsoft accounts." - compliance: - - cis: "2.3.1.2" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> NoConnectedUser -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> NoConnectedUser -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !NoConnectedUser;' - - id: 8002 - title: "Ensure 'Accounts: Limit local account use of blank passwords to console logon only' is set to 'Enabled" - description: "This policy setting determines whether local accounts that are not password protected can be used to log on from locations other than the physical computer console. If you enable this policy setting, local accounts that have blank passwords will not be able to log on to the network from remote client computers. Such accounts will only be able to log on at the keyboard of the computer. The recommended state for this setting is: Enabled." - rationale: "Blank passwords are a serious threat to computer security and should be forbidden through both organizational policy and suitable technical measures. In fact, the default settings for Active Directory domains require complex passwords of at least seven characters. However, if users with the ability to create new accounts bypass your domain-based password policies, they could create accounts with blank passwords. For example, a user could build a stand-alone computer, create one or more accounts with blank passwords, and then join the computer to the domain. The local accounts with blank passwords would still function. Anyone who knows the name of one of these unprotected accounts could then use it to log on." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Accounts: Limit local account use of blank passwords to console logon only." - compliance: - - cis: "2.3.1.4" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LimitBlankPasswordUse -> 0;' - - id: 8003 - title: "Ensure 'Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings' is set to 'Enabled'" - description: "This policy setting allows administrators to enable the more precise auditing capabilities present in Windows Vista. The Audit Policy settings available in Windows Server 2003 Active Directory do not yet contain settings for managing the new auditing subcategories. To properly apply the auditing policies prescribed in this baseline, the Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings setting needs to be configured to Enabled. The recommended state for this setting is: Enabled. *Important*: Be very cautious about audit settings that can generate a large volume of traffic. For example, if you enable either success or failure auditing for all of the Privilege Use subcategories, the high volume of audit events generated can make it difficult to find other types of entries in the Security log. Such a configuration could also have a significant impact on system performance." - rationale: "Prior to the introduction of auditing subcategories in Windows Vista, it was difficult to track events at a per-system or per-user level. The larger event categories created too many events and the key information that needed to be audited was difficult to find." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings" - compliance: - - cis: "2.3.2.1" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> SCENoApplyLegacyAuditPolicy -> !1;' - - id: 8004 - title: "Ensure 'Audit: Shut down system immediately if unable to log security audits' is set to 'Disabled'" - description: "This policy setting determines whether the system shuts down if it is unable to log Security events. It is a requirement for Trusted Computer System Evaluation Criteria (TCSEC)-C2 and Common Criteria certification to prevent auditable events from occurring if the audit system is unable to log them. Microsoft has chosen to meet this requirement by halting the system and displaying a stop message if the auditing system experiences a failure. When this policy setting is enabled, the system will be shut down if a security audit cannot be logged for any reason. If the Audit: Shut down system immediately if unable to log security audits setting is enabled, unplanned system failures can occur. The administrative burden can be significant, especially if you also configure the Retention method for the Security log to Do not overwrite events (clear log manually). This configuration causes a repudiation threat (a backup operator could deny that they backed up or restored data) to become a denial of service (DoS) vulnerability, because a server could be forced to shut down if it is overwhelmed with logon events and other security events that are written to the Security log. Also, because the shutdown is not graceful, it is possible that irreparable damage to the operating system, applications, or data could result. Although the NTFS file system guarantees its integrity when an ungraceful computer shutdown occurs, it cannot guarantee that every data file for every application will still be in a usable form when the computer restarts. The recommended state for this setting is: Disabled." - rationale: "If the computer is unable to record events to the Security log, critical evidence or important troubleshooting information may not be available for review after a security incident. Also, an attacker could potentially generate a large volume of Security log events to purposely force a computer shutdown." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Audit: Shut down system immediately if unable to log security audits" - default_value: "Disabled." - compliance: - - cis: "2.3.2.2" - - cis_csc: "6" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> CrashOnAuditFail -> 1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> CrashOnAuditFail -> 2;' - - id: 8005 - title: "Ensure 'Devices: Allowed to format and eject removable media' is set to 'Administrators'" - description: "This policy setting determines who is allowed to format and eject removable NTFS media. You can use this policy setting to prevent unauthorized users from removing data on one computer to access it on another computer on which they have local administrator privileges. The recommended state for this setting is: Administrators." - rationale: "Users may be able to move data on removable disks to a different computer where they have administrative privileges. The user could then take ownership of any file, grant themselves full control, and view or modify any file. The fact that most removable storage devices will eject media by pressing a mechanical button diminishes the advantage of this policy setting." - remediation: "To establish the recommended configuration via GP, set the following UI path to Administrators: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Devices: Allowed to format and eject removable media" - compliance: - - cis: "2.3.4.1" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> AllocateDASD -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> AllocateDASD -> 2;' - - id: 8006 - title: "Ensure 'Devices: Prevent users from installing printer drivers' is set to 'Enabled'" - description: "For a computer to print to a shared printer, the driver for that shared printer must be installed on the local computer. This security setting determines who is allowed to install a printer driver as part of connecting to a shared printer. The recommended state for this setting is: Enabled. Note: This setting does not affect the ability to add a local printer. This setting does not affect Administrators." - rationale: "It may be appropriate in some organizations to allow users to install printer drivers on their own workstations. However, you should allow only Administrators, not users, to do so on servers, because printer driver installation on a server may unintentionally cause the computer to become less stable. A malicious user could install inappropriate printer drivers in a deliberate attempt to damage the computer, or a user might accidentally install malicious software that masquerades as a printer driver. It is feasible for an attacker to disguise a Trojan horse program as a printer driver. The program may appear to users as if they must use it to print, but such a program could unleash malicious code on your computer network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Devices: Prevent users from installing printer drivers" - compliance: - - cis: "2.3.4.2" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Providers\LanMan Print Services\Servers -> AddPrinterDrivers -> !1;' - - id: 8007 - title: "Ensure 'Domain controller: Allow server operators to schedule tasks' is set to 'Disabled' (DC only)" - description: "This policy setting determines whether members of the Server Operators group are allowed to submit jobs by means of the AT schedule facility. The impact of this policy setting configuration should be small for most organizations. Users, including those in the Server Operators group, will still be able to create jobs by means of the Task Scheduler Wizard, but those jobs will run in the context of the account with which the user authenticates when they set up the job. Note: An AT Service Account can be modified to select a different account rather than the LOCAL SYSTEM account. To change the account, open System Tools, click Scheduled Tasks, and then click Accessories folder. Then click AT Service Account on the Advanced menu. The recommended state for this setting is: Disabled." - rationale: "If you enable this policy setting, jobs that are created by server operators by means of the AT service will execute in the context of the account that runs that service. By default, that is the local SYSTEM account. If you enable this policy setting, server operators could perform tasks that SYSTEM is able to do but that they would typically not be able to do, such as add their account to the local Administrators group." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain controller: Allow server operators to schedule tasks" - compliance: - - cis: "2.3.5.1" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\SubmitControl -> !0;' - - id: 8008 - title: "Ensure 'Domain controller: LDAP server signing requirements' is set to 'Require signing' (DC only)" - description: "This policy setting determines whether the Lightweight Directory Access Protocol (LDAP) server requires LDAP clients to negotiate data signing. The recommended state for this setting is: Require signing. Note: Domain member computers must have Network security: LDAP signing requirements (Rule 2.3.11.8) set to Negotiate signing or higher. If not, they will fail to authenticate once the above Require signing value is configured on the Domain Controllers. Fortunately, Negotiate signing is the default in the client configuration. Note #2: This policy setting does not have any impact on LDAP simple bind (ldap_simple_bind) or LDAP simple bind through SSL (ldap_simple_bind_s). No Microsoft LDAP clients that are shipped with Windows XP Professional use LDAP simple bind or LDAP simple bind through SSL to talk to a Domain Controller. Note #3: Before enabling this setting, you should first ensure that there are no clients (including server-based applications) that are configured to authenticate with Active Directory via unsigned LDAP, because changing this setting will break those applications. Such applications should first be reconfigured to use signed LDAP, Secure LDAP (LDAPS), or IPsec-protected connections." - rationale: "Unsigned network traffic is susceptible to man-in-the-middle attacks. In such attacks, an intruder captures packets between the server and the client, modifies them, and then forwards them to the client. Where LDAP servers are concerned, an attacker could cause a client to make decisions that are based on false records from the LDAP directory. To lower the risk of such an intrusion in an organization's network, you can implement strong physical security measures to protect the network infrastructure. Also, you could implement Internet Protocol security (IPsec) authentication header mode (AH), which performs mutual authentication and packet integrity for IP traffic to make all types of man- in-the-middle attacks extremely difficult. Additionally, allowing the use of regular, unsigned LDAP permits credentials to be received over the network in clear text, which could very easily result in the interception of account passwords by other systems on the network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Require signing: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain controller: LDAP server signing requirements" - compliance: - - cis: "2.3.5.2" - - cis_csc: "3" - references: - - https://blogs.technet.microsoft.com/russellt/2016/01/13/identifying-clear-text-ldap-binds-to-your-dcs/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NTDS\Parameters -> LDAPServerIntegrity -> !2;' - - id: 8009 - title: "Ensure 'Domain controller: Refuse machine account password changes' is set to 'Disabled' (DC only)" - description: "This security setting determines whether Domain Controllers will refuse requests from member computers to change computer account passwords. The recommended state for this setting is: Disabled." - rationale: "If you enable this policy setting on all Domain Controllers in a domain, domain members will not be able to change their computer account passwords, and those passwords will be more susceptible to attack." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain controller: Refuse machine account password changes" - compliance: - - cis: "2.3.5.3" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> RefusePasswordChange -> 1;' - - id: 8010 - title: "Ensure 'Domain member: Digitally encrypt or sign secure channel data (always)' is set to 'Enabled'" - description: "This policy setting determines whether all secure channel traffic that is initiated by the domain member must be signed or encrypted. The recommended state for this setting is: Enabled." - rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated—and sensitive information such as passwords are encrypted—but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally encrypt or sign secure channel data (always)" - compliance: - - cis: "2.3.6.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> RequireSignOrSeal -> 0;' - - id: 8011 - title: "Ensure 'Domain member: Digitally encrypt secure channel data (when possible)' is set to 'Enabled'" - description: "This policy setting determines whether a domain member should attempt to negotiate encryption for all secure channel traffic that it initiates. The recommended state for this setting is: Enabled." - rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated—and sensitive information such as passwords are encrypted—but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally encrypt secure channel data (when possible)" - compliance: - - cis: "2.3.6.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> SealSecureChannel -> 0;' - - id: 8012 - title: "Ensure 'Domain member: Digitally sign secure channel data (when possible)' is set to 'Enabled'" - description: "This policy setting determines whether a domain member should attempt to negotiate whether all secure channel traffic that it initiates must be digitally signed. Digital signatures protect the traffic from being modified by anyone who captures the data as it traverses the network. The recommended state for this setting is: Enabled." - rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated—and sensitive information such as passwords are encrypted—but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally sign secure channel data (when possible)" - compliance: - - cis: "2.3.6.3" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> SignSecureChannel -> 0;' - - id: 8013 - title: "Ensure 'Domain member: Disable machine account password changes' is set to 'Disabled'" - description: "This policy setting determines whether a domain member can periodically change its computer account password. Computers that cannot automatically change their account passwords are potentially vulnerable, because an attacker might be able to determine the password for the system's domain account. The recommended state for this setting is: Disabled." - rationale: "The default configuration for Windows Server 2003-based computers that belong to a domain is that they are automatically required to change the passwords for their accounts every 30 days. If you disable this policy setting, computers that run Windows Server 2003 will retain the same passwords as their computer accounts. Computers that are no longer able to automatically change their account password are at risk from an attacker who could determine the password for the computer's domain account." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Disable machine account password changes" - compliance: - - cis: "2.3.6.4" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> DisablePasswordChange -> 1;' - - id: 8014 - title: "Ensure 'Domain member: Require strong (Windows 2000 or later) session key' is set to 'Enabled'" - description: "When this policy setting is enabled, a secure channel can only be established with Domain Controllers that are capable of encrypting secure channel data with a strong (128-bit) session key. To enable this policy setting, all Domain Controllers in the domain must be able to encrypt secure channel data with a strong key, which means all Domain Controllers must be running Microsoft Windows 2000 or newer. The recommended state for this setting is: Enabled." - rationale: "Session keys that are used to establish secure channel communications between Domain Controllers and member computers are much stronger in Windows 2000 than they were in previous Microsoft operating systems. Whenever possible, you should take advantage of these stronger session keys to help protect secure channel communications from attacks that attempt to hijack network sessions and eavesdropping. (Eavesdropping is a form of hacking in which network data is read or altered in transit. The data can be modified to hide or change the sender, or be redirected.)" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Require strong (Windows 2000 or later) session key" - compliance: - - cis: "2.3.6.6" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> RequireStrongKey -> 0;' - - id: 8015 - title: "Ensure 'Interactive logon: Do not display last user name' is set to 'Enabled'" - description: "This policy setting determines whether the account name of the last user to log on to the client computers in your organization will be displayed in each computer's respective Windows logon screen. Enable this policy setting to prevent intruders from collecting account names visually from the screens of desktop or laptop computers in your organization. The recommended state for this setting is: Enabled." - rationale: "An attacker with access to the console (for example, someone with physical access or someone who is able to connect to the server through Remote Desktop Services) could view the name of the last user who logged on to the server. The attacker could then try to guess the password, use a dictionary, or use a brute-force attack to try and log on." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Do not display last user name" - compliance: - - cis: "2.3.7.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> DontDisplayLastUserName -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !DontDisplayLastUserName;' - - id: 8016 - title: "Ensure 'Interactive logon: Do not require CTRL+ALT+DEL' is set to 'Disabled'" - description: "This policy setting determines whether users must press CTRL+ALT+DEL before they log on. The recommended state for this setting is: Disabled." - rationale: "Microsoft developed this feature to make it easier for users with certain types of physical impairments to log on to computers that run Windows. If users are not required to press CTRL+ALT+DEL, they are susceptible to attacks that attempt to intercept their passwords. If CTRL+ALT+DEL is required before logon, user passwords are communicated by means of a trusted path. An attacker could install a Trojan horse program that looks like the standard Windows logon dialog box and capture the user's password. The attacker would then be able to log on to the compromised account with whatever level of privilege that user has." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Do not require CTRL+ALT+DEL" - compliance: - - cis: "2.3.7.2" - - cis_csc: "8" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> DisableCAD -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !DisableCAD;' - - id: 8017 - title: "Ensure 'Interactive logon: Machine inactivity limit' is set to '900 or fewer second(s), but not 0'" - description: "Windows notices inactivity of a logon session, and if the amount of inactive time exceeds the inactivity limit, then the screen saver will run, locking the session. The recommended state for this setting is: 900 or fewer second(s), but not 0. Note: A value of 0 does not conform to the benchmark as it disables the machine inactivity limit." - rationale: "If a user forgets to lock their computer when they walk away it's possible that a passerby will hijack it." - remediation: "To establish the recommended configuration via GP, set the following UI path to 900 or fewer seconds, but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Machine inactivity limit" - compliance: - - cis: "2.3.7.3" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 385;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 386;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 387;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 388;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 389;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:38\D;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:39\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:3\D\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:4\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:5\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:6\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:7\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:8\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:9\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:\D\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:\w\w\w\w+;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !InactivityTimeoutSecs;' - - id: 8018 - title: "Ensure 'Interactive logon: Prompt user to change password before expiration' is set to 'between 5 and 14 days'" - description: "This policy setting determines how far in advance users are warned that their password will expire. It is recommended that you configure this policy setting to at least 5 days but no more than 14 days to sufficiently warn users when their passwords will expire. The recommended state for this setting is: between 5 and 14 days." - rationale: "It is recommended that user passwords be configured to expire periodically. Users will need to be warned that their passwords are going to expire, or they may inadvertently be locked out of the computer when their passwords expire. This condition could lead to confusion for users who access the network locally, or make it impossible for users to access your organization's network through dial-up or virtual private network (VPN) connections." - remediation: "To establish the recommended configuration via GP, set the following UI path to a value between 5 and 14 days: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Prompt user to change password before expiration" - compliance: - - cis: "2.3.7.7" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 2;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 3;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 4;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 0F;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:1\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:2\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:3\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:4\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:5\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:6\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:7\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:8\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:9\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:\D\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:\w\w\w+;' - - id: 8019 - title: "Ensure 'Interactive logon: Smart card removal behavior' is set to 'Lock Workstation' or higher" - description: "This policy setting determines what happens when the smart card for a logged-on user is removed from the smart card reader. The recommended state for this setting is: Lock Workstation. Configuring this setting to Force Logoff or Disconnect if a Remote Desktop Services session also conforms to the benchmark." - rationale: "Users sometimes forget to lock their workstations when they are away from them, allowing the possibility for malicious users to access their computers. If smart cards are used for authentication, the computer should automatically lock itself when the card is removed to ensure that only the user with the smart card is accessing resources using those credentials." - remediation: "To establish the recommended configuration via GP, set the following UI path to Lock Workstation (or, if applicable for your environment, Force Logoff or Disconnect if a Remote Desktop Services session): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Smart card removal behavior" - compliance: - - cis: "2.3.7.9" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScRemoveOption -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> !ScRemoveOption;' - - id: 8020 - title: "Ensure 'Microsoft network client: Digitally sign communications (always)' is set to 'Enabled'" - description: "This policy setting determines whether packet signing is required by the SMB client component. Note: When Windows Vista-based computers have this policy setting enabled and they connect to file or print shares on remote servers, it is important that the setting is synchronized with its companion setting, Microsoft network server: Digitally sign communications (always), on those servers. For more information about these settings, see the 'Microsoft network client and server: Digitally sign communications (four related settings)' section in Chapter 5 of the Threats and Countermeasures guide. The recommended state for this setting is: Enabled." - rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Digitally sign communications (always)" - compliance: - - cis: "2.3.8.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> RequireSecuritySignature -> !1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> !RequireSecuritySignature;' - - id: 8021 - title: "Ensure 'Microsoft network client: Digitally sign communications (if server agrees)' is set to 'Enabled'" - description: "This policy setting determines whether the SMB client will attempt to negotiate SMB packet signing. Note: Enabling this policy setting on SMB clients on your network makes them fully effective for packet signing with all clients and servers in your environment. The recommended state for this setting is: Enabled." - rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Digitally sign communications (if server agrees)" - compliance: - - cis: "2.3.8.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> EnableSecuritySignature -> !1;' - - id: 8022 - title: "Ensure 'Microsoft network client: Send unencrypted password to third-party SMB servers' is set to 'Disabled'" - description: "This policy setting determines whether the SMB redirector will send plaintext passwords during authentication to third-party SMB servers that do not support password encryption. It is recommended that you disable this policy setting unless there is a strong business case to enable it. If this policy setting is enabled, unencrypted passwords will be allowed across the network. The recommended state for this setting is: Disabled." - rationale: "If you enable this policy setting, the server can transmit passwords in plaintext across the network to other computers that offer SMB services, which is a significant security risk. These other computers may not use any of the SMB security mechanisms that are included with Windows Server 2003." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Send unencrypted password to third-party SMB servers" - compliance: - - cis: "2.3.8.3" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> EnablePlainTextPassword -> !0;' - - id: 8023 - title: "Ensure 'Microsoft network server: Amount of idle time required before suspending session' is set to '15 or fewer minute(s), but not 0'" - description: "This policy setting allows you to specify the amount of continuous idle time that must pass in an SMB session before the session is suspended because of inactivity. Administrators can use this policy setting to control when a computer suspends an inactive SMB session. If client activity resumes, the session is automatically reestablished. A value of 0 appears to allow sessions to persist indefinitely. The maximum value is 99999, which is over 69 days; in effect, this value disables the setting. The recommended state for this setting is: 15 or fewer minute(s), but not 0." - rationale: "Each SMB session consumes server resources, and numerous null sessions will slow the server or possibly cause it to fail. An attacker could repeatedly establish SMB sessions until the server's SMB services become slow or unresponsive." - remediation: "To establish the recommended configuration via GP, set the following UI path to 15 or fewer minute(s), but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Amount of idle time required before suspending session" - compliance: - - cis: "2.3.9.1" - - cis_csc: "3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> 0;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:1\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:2\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:3\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:4\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:5\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:6\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:7\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:8\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:9\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:\D\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:\w\w\w+;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> !AutoDisconnect;' - - id: 8024 - title: "Ensure 'Microsoft network server: Digitally sign communications (always)' is set to 'Enabled'" - description: "This policy setting determines whether packet signing is required by the SMB server component. Enable this policy setting in a mixed environment to prevent downstream clients from using the workstation as a network server. The recommended state for this setting is: Enabled." - rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Digitally sign communications (always)" - compliance: - - cis: "2.3.9.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> RequireSecuritySignature -> !1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> !RequireSecuritySignature;' - - id: 8025 - title: "Ensure 'Microsoft network server: Digitally sign communications (if client agrees)' is set to 'Enabled'" - description: "This policy setting determines whether the SMB server will negotiate SMB packet signing with clients that request it. If no signing request comes from the client, a connection will be allowed without a signature if the Microsoft network server: Digitally sign communications (always) setting is not enabled. Note: Enable this policy setting on SMB clients on your network to make them fully effective for packet signing with all clients and servers in your environment. The recommended state for this setting is: Enabled." - rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Digitally sign communications (if client agrees)" - compliance: - - cis: "2.3.9.3" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> EnableSecuritySignature -> !1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> !EnableSecuritySignature;' - - id: 8026 - title: "Ensure 'Microsoft network server: Disconnect clients when logon hours expire' is set to 'Enabled'" - description: "This security setting determines whether to disconnect users who are connected to the local computer outside their user account's valid logon hours. This setting affects the Server Message Block (SMB) component. If you enable this policy setting you should also enable Network security: Force logoff when logon hours expire (Rule 2.3.11.6). If your organization configures logon hours for users, this policy setting is necessary to ensure they are effective. The recommended state for this setting is: Enabled." - rationale: "If your organization configures logon hours for users, then it makes sense to enable this policy setting. Otherwise, users who should not have access to network resources outside of their logon hours may actually be able to continue to use those resources with sessions that were established during allowed hours." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Disconnect clients when logon hours expire" - compliance: - - cis: "2.3.9.4" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> EnableForcedLogOff -> !1;' - - id: 8027 - title: "Ensure 'Network access: Let Everyone permissions apply to anonymous users' is set to 'Disabled'" - description: "This policy setting determines what additional permissions are assigned for anonymous connections to the computer. The recommended state for this setting is: Disabled." - rationale: "An unauthorized user could anonymously list account names and shared resources and use the information to attempt to guess passwords, perform social engineering attacks, or launch DoS attacks." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Let Everyone permissions apply to anonymous users" - compliance: - - cis: "2.3.10.5" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> EveryoneIncludesAnonymous -> 1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> EveryoneIncludesAnonymous -> 2;' - - id: 8028 - title: "Configure 'Network access: Named Pipes that can be accessed anonymously'" - description: "This policy setting determines which communication sessions, or pipes, will have attributes and permissions that allow anonymous access. The recommended state for this setting is:  Level 1 - Domain Controller. The recommended state for this setting is: LSARPC, NETLOGON, SAMR and (when the legacy Computer Browser service is enabled) BROWSER. Level 1 - Member Server. The recommended state for this setting is: (i.e. None), or (when the legacy Computer Browser service is enabled) BROWSER. Note: A Member Server that holds the Remote Desktop Services Role with Remote Desktop Licensing Role Service will require a special exception to this recommendation, to allow the HydraLSPipe and TermServLicensing Named Pipes to be accessed anonymously." - rationale: "Limiting named pipes that can be accessed anonymously will reduce the attack surface of the system." - remediation: "To establish the recommended configuration via GP, configure the following UI path: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Named Pipes that can be accessed anonymously" - compliance: - - cis: "2.3.10.6" - - cis_csc: "14.1, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> NullSessionPipes -> !r:lsarpc|netlogon|samr;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> !NullSessionPipes;' - - id: 8029 - title: "Configure 'Network access: Remotely accessible registry paths'" - description: "This policy setting determines which registry paths will be accessible over the network, regardless of the users or groups listed in the access control list (ACL) of the winreg registry key. Note: This setting does not exist in Windows XP. There was a setting with that name in Windows XP, but it is called 'Network access: Remotely accessible registry paths and sub- paths' in Windows Server 2003, Windows Vista, and Windows Server 2008 (non-R2). Note #2: When you configure this setting you specify a list of one or more objects. The delimiter used when entering the list is a line feed or carriage return, that is, type the first object on the list, press the Enter button, type the next object, press Enter again, etc. The setting value is stored as a comma-delimited list in group policy security templates. It is also rendered as a comma-delimited list in Group Policy Editor's display pane and the Resultant Set of Policy console. It is recorded in the registry as a line-feed delimited list in a REG_MULTI_SZ value." - rationale: "The registry is a database that contains computer configuration information, and much of the information is sensitive. An attacker could use this information to facilitate unauthorized activities. To reduce the risk of such an attack, suitable ACLs are assigned throughout the registry to help protect it from access by unauthorized users." - remediation: "To establish the recommended configuration via GP, set the following UI path to: System\\CurrentControlSet\\Control\\ProductOptions | System\\CurrentControlSet\\Control\\Server Applications | Software\\Microsoft\\Windows NT\\CurrentVersion. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Remotely accessible registry paths" - compliance: - - cis: "2.3.10.7" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedExactPaths -> Machine -> !r:System\\CurrentControlSet\\Control\\ProductOptions|System\\CurrentControlSet\\Control\\Server Applications|Software\\Microsoft\\Windows NT\\CurrentVersion;' - - id: 8030 - title: "Configure 'Network access: Remotely accessible registry paths and sub-paths'" - description: "This policy setting determines which registry paths and sub-paths will be accessible over the network, regardless of the users or groups listed in the access control list (ACL) of the winreg registry key. Note: In Windows XP this setting is called 'Network access: Remotely accessible registry paths,' the setting with that same name in Windows Vista, Windows Server 2008 (non-R2), and Windows Server 2003 does not exist in Windows XP. Note #2: When you configure this setting you specify a list of one or more objects. The delimiter used when entering the list is a line feed or carriage return, that is, type the first object on the list, press the Enter button, type the next object, press Enter again, etc. The setting value is stored as a comma-delimited list in group policy security templates. It is also rendered as a comma-delimited list in Group Policy Editor's display pane and the Resultant Set of Policy console. It is recorded in the registry as a line-feed delimited list in a REG_MULTI_SZ value." - rationale: "The registry contains sensitive computer configuration information that could be used by an attacker to facilitate unauthorized activities. The fact that the default ACLs assigned throughout the registry are fairly restrictive and help to protect the registry from access by unauthorized users reduces the risk of such an attack." - remediation: "To establish the recommended configuration via GP, set the following UI path to: System\\CurrentControlSet\\Control\\Print\\Printers | System\\CurrentControlSet\\Services\\Eventlog Software\\Microsoft\\OLAP Server | Software\\Microsoft\\Windows NT\\CurrentVersion\\Print Software\\Microsoft\\Windows | NT\\CurrentVersion\\Windows System\\CurrentControlSet\\Control\\ContentIndex | System\\CurrentControlSet\\Control\\Terminal Server | System\\CurrentControlSet\\Control\\Terminal Server\\UserConfig | System\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration | Software\\Microsoft\\Windows NT\\CurrentVersion\\Perflib | System\\CurrentControlSet\\Services\\SysmonLog | Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local | Policies\\Security Options\\Network access: Remotely accessible registry paths | and sub-paths. When a server holds the Active Directory Certificate Services Role with Certification Authority Role Service, the above list should also include: System\\CurrentControlSet\\Services\\CertSvc. When a server has the WINS Server Feature installed, the above list should also include: System\\CurrentControlSet\\Services\\WINS" - compliance: - - cis: "2.3.10.8" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedPaths -> Machine -> !r:Software\\Microsoft\\Windows NT\\CurrentVersion\\Print|Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows|System\\CurrentControlSet\\Control\\Print\\Printers|System\\CurrentControlSet\\Services\\Eventlog|Software\\Microsoft\\OLAP Server|System\\CurrentControlSet\\Control\\ContentIndex|System\\CurrentControlSet\\Control\\Terminal Server|System\\CurrentControlSet\\Control\\Terminal Server\\UserConfig|System\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration|Software\\Microsoft\\Windows NT\\CurrentVersion\\Perflib|System\\CurrentControlSet\\Services\\SysmonLog|System\\CurrentControlSet\\Services\\CertSvc|System\\CurrentControlSet\\Services\\WINS;' - - id: 8031 - title: "Ensure 'Network access: Restrict anonymous access to Named Pipes and Shares' is set to 'Enabled'" - description: "When enabled, this policy setting restricts anonymous access to only those shares and pipes that are named in the Network access: Named pipes that can be accessed anonymously and Network access: Shares that can be accessed anonymously settings. This policy setting controls null session access to shares on your computers by adding RestrictNullSessAccess with the value 1 in the HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\LanManServer\\Parameters registry key. This registry value toggles null session shares on or off to control whether the server service restricts unauthenticated clients' access to named resources. The recommended state for this setting is: Enabled." - rationale: "Null sessions are a weakness that can be exploited through shares (including the default shares) on computers in your environment." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Restrict anonymous access to Named Pipes and Shares" - compliance: - - cis: "2.3.10.9" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> RestrictNullSessAccess -> !1;' - - id: 8032 - title: "Ensure 'Network access: Shares that can be accessed anonymously' is set to 'None'" - description: "This policy setting determines which network shares can be accessed by anonymous users. The default configuration for this policy setting has little effect because all users have to be authenticated before they can access shared resources on the server. The recommended state for this setting is: (i.e. None)." - rationale: "It is very dangerous to allow any values in this setting. Any shares that are listed can be accessed by any network user, which could lead to the exposure or corruption of sensitive data." - remediation: "To establish the recommended configuration via GP, set the following UI path to (i.e. None): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Shares that can be accessed anonymously" - compliance: - - cis: "2.3.10.10" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> NullSessionShares -> r:\.+;' - - id: 8033 - title: "Ensure 'Network access: Sharing and security model for local accounts' is set to 'Classic - local users authenticate as themselves'" - description: "This policy setting determines how network logons that use local accounts are authenticated. The Classic option allows precise control over access to resources, including the ability to assign different types of access to different users for the same resource. The Guest only option allows you to treat all users equally. In this context, all users authenticate as Guest only to receive the same access level to a given resource. The recommended state for this setting is: Classic - local users authenticate as themselves. Note: This setting does not affect interactive logons that are performed remotely by using such services as Telnet or Remote Desktop Services (formerly called Terminal Services)." - rationale: "With the Guest only model, any user who can authenticate to your computer over the network does so with guest privileges, which probably means that they will not have write access to shared resources on that computer. Although this restriction does increase security, it makes it more difficult for authorized users to access shared resources on those computers because ACLs on those resources must include access control entries (ACEs) for the Guest account. With the Classic model, local accounts should be password protected. Otherwise, if Guest access is enabled, anyone can use those user accounts to access shared system resources." - remediation: "To establish the recommended configuration via GP, set the following UI path to Classic - local users authenticate as themselves: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Sharing and security model for local accounts" - compliance: - - cis: "2.3.10.11" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> ForceGuest -> 1;' - - id: 8034 - title: "Ensure 'Network security: Allow Local System to use computer identity for NTLM' is set to 'Enabled'" - description: "This policy setting determines whether Local System services that use Negotiate when reverting to NTLM authentication can use the computer identity. This policy is supported on at least Windows 7 or Windows Server 2008 R2. The recommended state for this setting is: Enabled." - rationale: "When connecting to computers running versions of Windows earlier than Windows Vista or Windows Server 2008 (non-R2), services running as Local System and using SPNEGO (Negotiate) that revert to NTLM use the computer identity. In Windows 7, if you are connecting to a computer running Windows Server 2008 or Windows Vista, then a system service uses either the computer identity or a NULL session. When connecting with a NULL session, a system-generated session key is created, which provides no protection but allows applications to sign and encrypt data without errors. When connecting with the computer identity, both signing and encryption is supported in order to provide data protection." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Allow Local System to use computer identity for NTLM" - compliance: - - cis: "2.3.11.1" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> UseMachineId -> !1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> !UseMachineId;' - - id: 8035 - title: "Ensure 'Network security: Allow LocalSystem NULL session fallback' is set to 'Disabled'" - description: "This policy setting determines whether NTLM is allowed to fall back to a NULL session when used with LocalSystem. The recommended state for this setting is: Disabled." - rationale: "NULL sessions are less secure because by definition they are unauthenticated." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Allow LocalSystem NULL session fallback" - compliance: - - cis: "2.3.11.2" - - cis_csc: "14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> allownullsessionfallback -> 1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> !allownullsessionfallback;' - - id: 8036 - title: "Ensure 'Network Security: Allow PKU2U authentication requests to this computer to use online identities' is set to 'Disabled'" - description: "This setting determines if online identities are able to authenticate to this computer. The Public Key Cryptography Based User-to-User (PKU2U) protocol introduced in Windows 7 and Windows Server 2008 R2 is implemented as a security support provider (SSP). The SSP enables peer-to-peer authentication, particularly through the Windows 7 media and file sharing feature called Homegroup, which permits sharing between computers that are not members of a domain. With PKU2U, a new extension was introduced to the Negotiate authentication package, Spnego.dll. In previous versions of Windows, Negotiate decided whether to use Kerberos or NTLM for authentication. The extension SSP for Negotiate, Negoexts.dll, which is treated as an authentication protocol by Windows, supports Microsoft SSPs including PKU2U. When computers are configured to accept authentication requests by using online IDs, Negoexts.dll calls the PKU2U SSP on the computer that is used to log on. The PKU2U SSP obtains a local certificate and exchanges the policy between the peer computers. When validated on the peer computer, the certificate within the metadata is sent to the logon peer for validation and associates the user's certificate to a security token and the logon process completes. The recommended state for this setting is: Disabled." - rationale: "The PKU2U protocol is a peer-to-peer authentication protocol - authentication should be managed centrally in most managed networks." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network Security: Allow PKU2U authentication requests to this computer to use online identities" - compliance: - - cis: "2.3.11.3" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\pku2u -> AllowOnlineID -> !0;' - - id: 8037 - title: "Ensure 'Network Security: Configure encryption types allowed for Kerberos' is set to 'RC4_HMAC_MD5, AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types'" - description: "This policy setting allows you to set the encryption types that Kerberos is allowed to use. The recommended state for this setting is: AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types. Note: Some legacy applications and OSes may require RC4_HMAC_MD5 - we recommend you test in your environment and verify whether you can safely remove it. For the purposes of scoring we have allowed the use of RC4_HMAC_MD5 as an optional setting." - rationale: "he strength of each encryption algorithm varies from one to the next, choosing stronger algorithms will reduce the risk of compromise however doing so may cause issues when the computer attempts to authenticate with systems that do not support them." - remediation: "To establish the recommended configuration via GP, set the following UI path to AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Configure encryption types allowed for Kerberos" - compliance: - - cis: "2.3.11.4" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters -> SupportedEncryptionTypes -> !2147483644;' - - id: 8038 - title: "Ensure 'Network security: Do not store LAN Manager hash value on next password change' is set to 'Enabled'" - description: "This policy setting determines whether the LAN Manager (LM) hash value for the new password is stored when the password is changed. The LM hash is relatively weak and prone to attack compared to the cryptographically stronger Microsoft Windows NT hash. Since LM hashes are stored on the local computer in the security database, passwords can then be easily compromised if the database is attacked. Note: Older operating systems and some third-party applications may fail when this policy setting is enabled. Also, note that the password will need to be changed on all accounts after you enable this setting to gain the proper benefit. The recommended state for this setting is: Enabled." - rationale: "The SAM file can be targeted by attackers who seek access to username and password hashes. Such attacks use special tools to crack passwords, which can then be used to impersonate users and gain access to resources on your network. These types of attacks will not be prevented if you enable this policy setting, but it will be much more difficult for these types of attacks to succeed." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Do not store LAN Manager hash value on next password change" - compliance: - - cis: "2.3.11.5" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> NoLMHash -> 0;' - - id: 8039 - title: "Ensure 'Network security: Force logoff when logon hours expire' is set to 'Enabled'" - description: "This policy setting determines whether to disconnect users who are connected to the local computer outside their user account's valid logon hours. This setting affects the Server Message Block (SMB) component. If you enable this policy setting you should also enable Microsoft network server: Disconnect clients when logon hours expire (Rule 2.3.9.4). The recommended state for this setting is: Enabled. Note: This recommendation is unscored because there is not a documented registry value that corresponds to it. We still strongly encourage that it be configured as Enabled, to ensure that logon hours (when configured) are properly enforced." - rationale: "If this setting is disabled, a user could remain connected to the computer outside of their allotted logon hours." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Force logoff when logon hours expire" - compliance: - - cis: "2.3.11.6" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters -> EnableForcedLogOff -> !1;' - - id: 8040 - title: "Ensure 'Network security: LAN Manager authentication level' is set to 'Send NTLMv2 response only. Refuse LM & NTLM'" - description: "LAN Manager (LM) was a family of early Microsoft client/server software (predating Windows NT) that allowed users to link personal computers together on a single network. LM network capabilities included transparent file and print sharing, user security features, and network administration tools. In Active Directory domains, the Kerberos protocol is the default authentication protocol. However, if the Kerberos protocol is not negotiated for some reason, Active Directory will use LM, NTLM, or NTLMv2. LAN Manager authentication includes the LM, NTLM, and NTLM version 2 (NTLMv2) variants, and is the protocol that is used to authenticate all Windows clients when they perform the following operations: -Join a domain -Authenticate between Active Directory forests -Authenticate to down-level domains -Authenticate to computers that do not run Windows 2000, Windows Server 2003, or Windows XP -Authenticate to computers that are not in the domain. The Network security: LAN Manager authentication level setting determines which challenge/response authentication protocol is used for network logons. This choice affects the level of authentication protocol used by clients, the level of session security negotiated, and the level of authentication accepted by servers. The recommended state for this setting is: Send NTLMv2 response only. Refuse LM & NTLM." - rationale: "Windows 2000 and Windows XP clients were configured by default to send LM and NTLM authentication responses (Windows 95-based and Windows 98-based clients only send LM). The default settings in OSes predating Windows Vista / Windows Server 2008 (non- R2) allowed all clients to authenticate with servers and use their resources. However, this meant that LM responses - the weakest form of authentication response - were sent over the network, and it was potentially possible for attackers to sniff that traffic to more easily reproduce the user's password. The Windows 95, Windows 98, and Windows NT operating systems cannot use the Kerberos version 5 protocol for authentication. For this reason, in a Windows Server 2003 domain, these computers authenticate by default with both the LM and NTLM protocols for network authentication. You can enforce a more secure authentication protocol for Windows 95, Windows 98, and Windows NT by using NTLMv2. For the logon process, NTLMv2 uses a secure channel to protect the authentication process. Even if you use NTLMv2 for older clients and servers, Windows-based clients and servers that are members of the domain will use the Kerberos authentication protocol to authenticate with Windows Server 2003 or newer Domain Controllers. For these reasons, it is strongly preferred to restrict the use of LM & NTLM (non-v2) as much as possible." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Send NTLMv2 response only. Refuse LM & NTLM: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: LAN Manager authentication level" - compliance: - - cis: "2.3.11.7" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 0;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 2;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 3;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 4;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> !LmCompatibilityLevel;' - - id: 8041 - title: "Ensure 'Network security: LDAP client signing requirements' is set to 'Negotiate signing' or higher" - description: "This policy setting determines the level of data signing that is requested on behalf of clients that issue LDAP BIND requests. Note: This policy setting does not have any impact on LDAP simple bind (ldap_simple_bind) or LDAP simple bind through SSL (ldap_simple_bind_s). No Microsoft LDAP clients that are included with Windows XP Professional use ldap_simple_bind or ldap_simple_bind_s to communicate with a Domain Controller. The recommended state for this setting is: Negotiate signing. Configuring this setting to Require signing also conforms to the benchmark." - rationale: "Unsigned network traffic is susceptible to man-in-the-middle attacks in which an intruder captures the packets between the client and server, modifies them, and then forwards them to the server. For an LDAP server, this susceptibility means that an attacker could cause a server to make decisions that are based on false or altered data from the LDAP queries. To lower this risk in your network, you can implement strong physical security measures to protect the network infrastructure. Also, you can make all types of man-in-the-middle attacks extremely difficult if you require digital signatures on all network packets by means of IPsec authentication headers." - remediation: "To establish the recommended configuration via GP, set the following UI path to Negotiate signing (configuring to Require signing also conforms to the benchmark): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: LDAP client signing requirements" - compliance: - - cis: "2.3.11.8" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LDAP -> LDAPClientIntegrity -> !1;' - - id: 8042 - title: "Ensure 'Network security: Minimum session security for NTLM SSP based (including secure RPC) clients' is set to 'Require NTLMv2 session security, Require 128-bit encryption'" - description: "This policy setting determines which behaviors are allowed by clients for applications using the NTLM Security Support Provider (SSP). The SSP Interface (SSPI) is used by applications that need authentication services. The setting does not modify how the authentication sequence works but instead require certain behaviors in applications that use the SSPI. The recommended state for this setting is: Require NTLMv2 session security, Require 128-bit encryption. Note: These values are dependent on the Network security: LAN Manager Authentication Level (Rule 2.3.11.7) security setting value." - rationale: "You can enable both options for this policy setting to help protect network traffic that uses the NTLM Security Support Provider (NTLM SSP) from being exposed or tampered with by an attacker who has gained access to the same network. In other words, these options help protect against man-in-the-middle attacks." - remediation: "To establish the recommended configuration via GP, set the following UI path to Require NTLMv2 session security, Require 128-bit encryption: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Minimum session security for NTLM SSP based (including secure RPC) clients" - compliance: - - cis: "2.3.11.9" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> NTLMMinClientSec -> !537395200;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> !NTLMMinClientSec;' - - id: 8043 - title: "Ensure 'Network security: Minimum session security for NTLM SSP based (including secure RPC) servers' is set to 'Require NTLMv2 session security, Require 128-bit encryption'" - description: "This policy setting determines which behaviors are allowed by servers for applications using the NTLM Security Support Provider (SSP). The SSP Interface (SSPI) is used by applications that need authentication services. The setting does not modify how the authentication sequence works but instead require certain behaviors in applications that use the SSPI. The recommended state for this setting is: Require NTLMv2 session security, Require 128-bit encryption. Note: These values are dependent on the Network security: LAN Manager Authentication Level (Rule 2.3.11.7) security setting value." - rationale: "You can enable all of the options for this policy setting to help protect network traffic that uses the NTLM Security Support Provider (NTLM SSP) from being exposed or tampered with by an attacker who has gained access to the same network. That is, these options help protect against man-in-the-middle attacks." - remediation: "To establish the recommended configuration via GP, set the following UI path to Require NTLMv2 session security, Require 128-bit encryption: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Minimum session security for NTLM SSP based (including secure RPC) servers" - compliance: - - cis: "2.3.11.10" - - cis_csc: "13" - references: - - https://workbench.cisecurity.org/benchmarks/288 - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> NTLMMinServerSec -> !537395200;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> !NTLMMinServerSec;' - - id: 8044 - title: "Ensure 'Shutdown: Allow system to be shut down without having to log on' is set to 'Disabled'" - description: "This policy setting determines whether a computer can be shut down when a user is not logged on. If this policy setting is enabled, the shutdown command is available on the Windows logon screen. It is recommended to disable this policy setting to restrict the ability to shut down the computer to users with credentials on the system. The recommended state for this setting is: Disabled. Note: In Server 2008 R2 and older versions, this setting had no impact on Remote Desktop (RDP) / Terminal Services sessions - it only affected the local console. However, Microsoft changed the behavior in Windows Server 2012 (non-R2) and above, where if set to Enabled, RDP sessions are also allowed to shut down or restart the server." - rationale: "Users who can access the console locally could shut down the computer. Attackers could also walk to the local console and restart the server, which would cause a temporary DoS condition. Attackers could also shut down the server and leave all of its applications and services unavailable. As noted in the Description above, the Denial of Service (DoS) risk of enabling this setting dramatically increases in Windows Server 2012 (non-R2) and above, as even remote users could then shut down or restart the server from the logon screen of an RDP session." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Shutdown: Allow system to be shut down without having to log on" - compliance: - - cis: "2.3.13.1" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ShutdownWithoutLogon -> 1;' - - id: 8045 - title: "Ensure 'System objects: Require case insensitivity for non-Windows subsystems' is set to 'Enabled'" - description: "This policy setting determines whether case insensitivity is enforced for all subsystems. The Microsoft Win32 subsystem is case insensitive. However, the kernel supports case sensitivity for other subsystems, such as the Portable Operating System Interface for UNIX (POSIX). Because Windows is case insensitive (but the POSIX subsystem will support case sensitivity), failure to enforce this policy setting makes it possible for a user of the POSIX subsystem to create a file with the same name as another file by using mixed case to label it. Such a situation can block access to these files by another user who uses typical Win32 tools, because only one of the files will be available. The recommended state for this setting is: Enabled." - rationale: "Because Windows is case-insensitive but the POSIX subsystem will support case sensitivity, failure to enable this policy setting would make it possible for a user of that subsystem to create a file with the same name as another file but with a different mix of upper and lower case letters. Such a situation could potentially confuse users when they try to access such files from normal Win32 tools because only one of the files will be available." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System objects: Require case insensitivity for non- Windows subsystems" - compliance: - - cis: "2.3.15.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Kernel -> ObCaseInsensitive -> !1;' - - id: 8046 - title: "Ensure 'System objects: Strengthen default permissions of internal system objects (e.g. Symbolic Links)' is set to 'Enabled'" - description: "This policy setting determines the strength of the default discretionary access control list (DACL) for objects. Active Directory maintains a global list of shared system resources, such as DOS device names, mutexes, and semaphores. In this way, objects can be located and shared among processes. Each type of object is created with a default DACL that specifies who can access the objects and what permissions are granted. The recommended state for this setting is: Enabled." - rationale: "This setting determines the strength of the default DACL for objects. Windows maintains a global list of shared computer resources so that objects can be located and shared among processes. Each type of object is created with a default DACL that specifies who can access the objects and with what permissions." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System objects: Strengthen default permissions of internal system objects (e.g. Symbolic Links)" - compliance: - - cis: "2.3.15.2" - - cis_csc: "14.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager -> ProtectionMode -> !1;' - - id: 8047 - title: "Ensure 'User Account Control: Admin Approval Mode for the Built-in Administrator account' is set to 'Enabled'" - description: "This policy setting controls the behavior of Admin Approval Mode for the built-in Administrator account. The recommended state for this setting is: Enabled." - rationale: "One of the risks that the User Account Control feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. An attack vector for these programs was to discover the password of the account named 'Administrator' because that user account was created for all installations of Windows. To address this risk, in Windows Vista and newer, the built-in Administrator account is now disabled by default. In a default installation of a new computer, accounts with administrative control over the computer are initially set up in one of two ways: -If the computer is not joined to a domain, the first user account you create has the equivalent permissions as a local administrator. -If the computer is joined to a domain, no local administrator accounts are created. The Enterprise or Domain Administrator must log on to the computer and create one if a local administrator account is warranted. Once Windows is installed, the built-in Administrator account may be manually enabled, but we strongly recommend that this account remain disabled." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Admin Approval Mode for the Built-in Administrator account" - compliance: - - cis: "2.3.17.1" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> FilterAdministratorToken -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !FilterAdministratorToken;' - - id: 8048 - title: "Ensure 'User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop' is set to 'Disabled'" - description: "This policy setting controls whether User Interface Accessibility (UIAccess or UIA) programs can automatically disable the secure desktop for elevation prompts used by a standard user. The recommended state for this setting is: Disabled." - rationale: "One of the risks that the UAC feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. This setting allows the administrator to perform operations that require elevated privileges while connected via Remote Assistance. This increases security in that organizations can use UAC even when end user support is provided remotely. However, it also reduces security by adding the risk that an administrator might allow an unprivileged user to share elevated privileges for an application that the administrator needs to use during the Remote Desktop session." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop" - compliance: - - cis: "2.3.17.2" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableUIADesktopToggle -> 1;' - - id: 8049 - title: "Ensure 'User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode' is set to 'Prompt for consent on the secure desktop'" - description: "This policy setting controls the behavior of the elevation prompt for administrators. The recommended state for this setting is: Prompt for consent on the secure desktop." - rationale: "One of the risks that the UAC feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. This setting raises awareness to the administrator of elevated privilege operations and permits the administrator to prevent a malicious program from elevating its privilege when the program attempts to do so." - remediation: "To establish the recommended configuration via GP, set the following UI path to Prompt for consent on the secure desktop: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode" - compliance: - - cis: "2.3.17.3" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ConsentPromptBehaviorAdmin -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ConsentPromptBehaviorAdmin -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !ConsentPromptBehaviorAdmin;' - - id: 8050 - title: "Ensure 'User Account Control: Behavior of the elevation prompt for standard users' is set to 'Automatically deny elevation requests'" - description: "This policy setting controls the behavior of the elevation prompt for standard users. The recommended state for this setting is: Automatically deny elevation requests." - rationale: "One of the risks that the User Account Control feature introduced with Windows Vista is trying to mitigate is that of malicious programs running under elevated credentials without the user or administrator being aware of their activity. This setting raises awareness to the user that a program requires the use of elevated privilege operations and requires that the user be able to supply administrative credentials in order for the program to run." - remediation: "To establish the recommended configuration via GP, set the following UI path to Automatically deny elevation requests: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Behavior of the elevation prompt for standard users" - compliance: - - cis: "2.3.17.4" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ConsentPromptBehaviorUser -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !ConsentPromptBehaviorUser;' - - id: 8051 - title: "Ensure 'User Account Control: Detect application installations and prompt for elevation' is set to 'Enabled'" - description: "This policy setting controls the behavior of application installation detection for the computer. The recommended state for this setting is: Enabled." - rationale: "Some malicious software will attempt to install itself after being given permission to run. For example, malicious software with a trusted application shell. The user may have given permission for the program to run because the program is trusted, but if they are then prompted for installation of an unknown component this provides another way of trapping the software before it can do damage" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Detect application installations and prompt for elevation" - compliance: - - cis: "2.3.17.5" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableInstallerDetection -> 0;' - - 'r:HKEY_LOCAL_MACHINE\MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !EnableInstallerDetection;' - - id: 8052 - title: "Ensure 'User Account Control: Only elevate UIAccess applications that are installed in secure locations' is set to 'Enabled'" - description: "This policy setting controls whether applications that request to run with a User Interface Accessibility (UIAccess) integrity level must reside in a secure location in the file system. Secure locations are limited to the following: ...\\Program Files\\, including subfolders; ...\\Windows\\system32\\; ...\\Program Files (x86)\\, including subfolders (for 64-bit versions of Windows). Note: Windows enforces a public key infrastructure (PKI) signature check on any interactive application that requests to run with a UIAccess integrity level regardless of the state of this security setting. The recommended state for this setting is: Enabled." - rationale: "UIAccess Integrity allows an application to bypass User Interface Privilege Isolation (UIPI) restrictions when an application is elevated in privilege from a standard user to an administrator. This is required to support accessibility features such as screen readers that are transmitting user interfaces to alternative forms. A process that is started with UIAccess rights has the following abilities: -To set the foreground window.  -To drive any application window using SendInput function. -To use read input for all integrity levels using low-level hooks, raw input, GetKeyState, GetAsyncKeyState, and GetKeyboardInput. -To set journal hooks. -To uses AttachThreadInput to attach a thread to a higher integrity input queue." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Only elevate UIAccess applications that are installed in secure locations" - compliance: - - cis: "2.3.17.6" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableSecureUIAPaths -> 0;' - - id: 8053 - title: "Ensure 'User Account Control: Run all administrators in Admin Approval Mode' is set to 'Enabled'" - description: "This policy setting controls the behavior of all User Account Control (UAC) policy settings for the computer. If you change this policy setting, you must restart your computer. The recommended state for this setting is: Enabled. Note: If this policy setting is disabled, the Security Center notifies you that the overall security of the operating system has been reduced." - rationale: "This is the setting that turns on or off UAC. If this setting is disabled, UAC will not be used and any security benefits and risk mitigations that are dependent on UAC will not be present on the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Run all administrators in Admin Approval Mode" - compliance: - - cis: "2.3.17.7" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableLUA -> 0;' - - id: 8054 - title: "Ensure 'User Account Control: Switch to the secure desktop when prompting for elevation' is set to 'Enabled'" - description: "This policy setting controls whether the elevation request prompt is displayed on the interactive user's desktop or the secure desktop. The recommended state for this setting is: Enabled." - rationale: "Standard elevation prompt dialog boxes can be spoofed, which may cause users to disclose their passwords to malicious software. The secure desktop presents a very distinct appearance when prompting for elevation, where the user desktop dims, and the elevation prompt UI is more prominent. This increases the likelihood that users who become accustomed to the secure desktop will recognize a spoofed elevation prompt dialog box and not fall for the trick." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Switch to the secure desktop when prompting for elevation" - compliance: - - cis: "2.3.17.8" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> PromptOnSecureDesktop -> 0;' - - id: 8055 - title: "Ensure 'User Account Control: Virtualize file and registry write failures to per-user locations' is set to 'Enabled'" - description: "This policy setting controls whether application write failures are redirected to defined registry and file system locations. This policy setting mitigates applications that run as administrator and write run-time application data to: - %ProgramFiles% - %Windir% - %Windir%\\system32 - HKEY_LOCAL_MACHINE\\Software. The recommended state for this setting is: Enabled." - rationale: "This setting reduces vulnerabilities by ensuring that legacy applications only write data to permitted locations." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Virtualize file and registry write failures to per-user locations" - compliance: - - cis: "2.3.17.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableVirtualization -> 0;' -# Section 9.1 - Domain Profile - - id: 8056 - title: "Ensure 'Windows Firewall: Domain: Firewall state' is set to 'On'" - description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." - rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Firewall state" - compliance: - - cis: "9.1.1" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> EnableFirewall -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile -> EnableFirewall -> 0;' - - id: 8057 - title: "Ensure 'Windows Firewall: Domain: Inbound connections' is set to 'Block (default)'" - description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." - rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Inbound connections" - compliance: - - cis: "9.1.2" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DefaultInboundAction -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile -> DefaultInboundAction -> 0;' - - id: 8058 - title: "Ensure 'Windows Firewall: Domain: Outbound connections' is set to 'Allow (default)'" - description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default)." - rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." - remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Outbound connections" - compliance: - - cis: "9.1.3" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DefaultOutboundAction -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile -> DefaultOutboundAction -> 1;' - - id: 8059 - title: "Ensure 'Windows Firewall: Domain: Settings: Display a notification' is set to 'No'" - description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." - rationale: "Firewall notifications can be complex and may confuse the end users, who would not be able to address the alert" - remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Settings Customize\\Display a notification" - compliance: - - cis: "9.1.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DisableNotifications -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> !DisableNotifications;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile -> DisableNotifications -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile -> !DisableNotifications;' - - id: 8060 - title: "Ensure 'Windows Firewall: Domain: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log'" - description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Name" - compliance: - - cis: "9.1.5" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\domainfw\plog;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\domainfw\plog;' - - id: 8061 - title: "Ensure 'Windows Firewall: Domain: Logging: Size limit (KB)' is set to '16384 KB or greater'" - description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Size limit (KB)" - compliance: - - cis: "9.1.6" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - id: 8062 - title: "Ensure 'Windows Firewall: Domain: Logging: Log dropped packets' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Log dropped packets" - compliance: - - cis: "9.1.7" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogDroppedPackets -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogDroppedPackets -> 0;' - - id: 8063 - title: "Ensure 'Windows Firewall: Domain: Logging: Log successful connections' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Log successful connections" - compliance: - - cis: "9.1.8" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogSuccessfulConnections -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogSuccessfulConnections -> 0;' -# Section 9.2 - Private Profile - - id: 8064 - title: "Ensure 'Windows Firewall: Private: Firewall state' is set to 'On'" - description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." - rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Firewall state" - compliance: - - cis: "9.2.1" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> EnableFirewall -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile -> EnableFirewall -> 0;' - - id: 8065 - title: "Ensure 'Windows Firewall: Private: Inbound connections' is set to 'Block (default)'" - description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." - rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Inbound connections" - compliance: - - cis: "9.2.2" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DefaultInboundAction -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile -> DefaultInboundAction -> 0;' - - id: 8066 - title: "Ensure 'Windows Firewall: Private: Outbound connections' is set to 'Allow (default)'" - description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default). Note: If you set Outbound connections to Block and then deploy the firewall policy by using a GPO, computers that receive the GPO settings cannot receive subsequent Group Policy updates unless you create and deploy an outbound rule that enables Group Policy to work. Predefined rules for Core Networking include outbound rules that enable Group Policy to work. Ensure that these outbound rules are active, and thoroughly test firewall profiles before deploying." - rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." - remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Outbound connections" - compliance: - - cis: "9.2.3" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DefaultOutboundAction -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile -> DefaultOutboundAction -> 1;' - - id: 8067 - title: "Ensure 'Windows Firewall: Private: Settings: Display a notification' is set to 'No'" - description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." - rationale: "Firewall notifications can be complex and may confuse the end users, who would not be able to address the alert." - remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Settings Customize\\Display a notification" - compliance: - - cis: "9.2.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DisableNotifications -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile -> DisableNotifications -> 0;' - - id: 8068 - title: "Ensure 'Windows Firewall: Private: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log'" - description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Name" - compliance: - - cis: "9.2.5" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\privatefw\plog;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\privatefw\plog;' - - id: 8069 - title: "Ensure 'Windows Firewall: Private: Logging: Size limit (KB)' is set to '16384 KB or greater'" - description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Size limit (KB)" - compliance: - - cis: "9.2.6" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - id: 8070 - title: "Ensure 'Windows Firewall: Private: Logging: Log dropped packets' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Log dropped packets" - compliance: - - cis: "9.2.7" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogDroppedPackets -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogDroppedPackets -> 0;' - - id: 8071 - title: "Ensure 'Windows Firewall: Private: Logging: Log successful connections' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Log successful connections" - compliance: - - cis: "9.2.8" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogSuccessfulConnections -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogSuccessfulConnections -> 0;' -# Sectin 9.3 - Public Profile - - id: 8072 - title: "Ensure 'Windows Firewall: Public: Firewall state' is set to 'On'" - description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." - rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Firewall state" - compliance: - - cis: "9.3.1" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> EnableFirewall -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> EnableFirewall -> 0;' - - id: 8073 - title: "Ensure 'Windows Firewall: Public: Inbound connections' is set to 'Block (default)'" - description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)" - rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Inbound connections" - compliance: - - cis: "9.3.2" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DefaultInboundAction -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> DefaultInboundAction -> 0;' - - id: 8074 - title: "Ensure 'Windows Firewall: Public: Outbound connections' is set to 'Allow (default)'" - description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default). Note: If you set Outbound connections to Block and then deploy the firewall policy by using a GPO, computers that receive the GPO settings cannot receive subsequent Group Policy updates unless you create and deploy an outbound rule that enables Group Policy to work. Predefined rules for Core Networking include outbound rules that enable Group Policy to work. Ensure that these outbound rules are active, and thoroughly test firewall profiles before deploying." - rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." - remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Outbound connections" - compliance: - - cis: "9.3.3" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DefaultOutboundAction -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> DefaultOutboundAction -> 1;' - - id: 8075 - title: "Ensure 'Windows Firewall: Public: Settings: Display a notification' is set to 'No'" - description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No." - rationale: "Some organizations may prefer to avoid alarming users when firewall rules block certain types of network activity. However, notifications can be helpful when troubleshooting network issues involving the firewall." - remediation: "To establish the recommended configuration via GP, set the following UI path to 'No': Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Display a notification" - compliance: - - cis: "9.3.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DisableNotifications -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> DisableNotifications -> 1;' - - id: 8076 - title: "Ensure 'Windows Firewall: Public: Settings: Apply local firewall rules' is set to 'No'" - description: "This setting controls whether local administrators are allowed to create local firewall rules that apply together with firewall rules configured by Group Policy. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." - rationale: "iWhen in the Public profile, there should be no special local firewall exceptions per computer. These settings should be managed by a centralized policy." - remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Apply local firewall rules" - compliance: - - cis: "9.3.5" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> AllowLocalPolicyMerge -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> AllowLocalPolicyMerge -> 0;' - - id: 8077 - title: "Ensure 'Windows Firewall: Public: Settings: Apply local connection security rules' is set to 'No'" - description: "This setting controls whether local administrators are allowed to create connection security rules that apply together with connection security rules configured by Group Policy. The recommended state for this setting is: No." - rationale: "Users with administrative privileges might create firewall rules that expose the system to remote attack." - remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Apply local connection security rules" - compliance: - - cis: "9.3.6" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> AllowLocalIPsecPolicyMerge -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> AllowLocalIPsecPolicyMerge -> 0;' - - id: 8078 - title: "Ensure 'Windows Firewall: Private: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log'" - description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Name" - compliance: - - cis: "9.3.7" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\publicfw\plog;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\publicfw\plog;' - - id: 8079 - title: "Ensure 'Windows Firewall: Public: Logging: Size limit (KB)' is set to '16384 KB or greater'" - description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Size limit (KB)" - compliance: - - cis: "9.3.8" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - id: 8080 - title: "Ensure 'Windows Firewall: Public: Logging: Log dropped packets' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Log dropped packets" - compliance: - - cis: "9.3.9" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogDroppedPackets -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogDroppedPackets -> 0;' - - id: 8081 - title: "Ensure 'Windows Firewall: Public: Logging: Log successful connections' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Log successful connections" - compliance: - - cis: "9.3.10" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogSuccessfulConnections -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogSuccessfulConnections -> 0;' -# Section 18.1 - Control Panel - - id: 8082 - title: "Ensure 'Prevent enabling lock screen camera' is set to 'Enabled'" - description: "Disables the lock screen camera toggle switch in PC Settings and prevents a camera from being invoked on the lock screen. The recommended state for this setting is: Enabled." - rationale: "Disabling the lock screen camera extends the protection afforded by the lock screen to camera features." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Personalization\\Prevent enabling lock screen camera Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ControlPanelDisplay.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer). " - compliance: - - cis: "18.1.1.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> NoLockScreenCamera -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> !NoLockScreenCamera;' - - id: 8083 - title: "Ensure 'Prevent enabling lock screen slide show' is set to 'Enabled'" - description: "Disables the lock screen slide show settings in PC Settings and prevents a slide show from playing on the lock screen. The recommended state for this setting is: Enabled." - rationale: "Disabling the lock screen slide show extends the protection afforded by the lock screen to slide show contents." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Personalization\\Prevent enabling lock screen slide show Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ControlPanelDisplay.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.1.1.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> NoLockScreenSlideshow -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> !NoLockScreenSlideshow;' -# Section 18.3 - MS Security Guide - - id: 8084 - title: "Ensure 'WDigest Authentication' is set to 'Disabled'" - description: "When WDigest authentication is enabled, Lsass.exe retains a copy of the user's plaintext password in memory, where it can be at risk of theft. If this setting is not configured, WDigest authentication is disabled in Windows 8.1 and in Windows Server 2012 R2; it is enabled by default in earlier versions of Windows and Windows Server. The recommended state for this setting is: Disabled." - rationale: "Preventing the plaintext storage of credentials in memory may reduce opportunity for credential theft." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\WDigest Authentication (disabling may require KB2871997) Note: This Group Policy path does not exist by default. An additional Group Policy template (SecGuide.admx/adml) is required - it is available from Microsoft." - compliance: - - cis: "18.3.5" - - cis_csc: "16.14" - references: - - https://www.microsoft.com/en-us/download/details.aspx?id=36036 - - https://support.microsoft.com/en-us/help/2871997/microsoft-security-advisory-update-to-improve-credentials-protection-a - - https://blogs.technet.microsoft.com/secguide/2017/08/30/security-baseline-for-windows-10-creators-update-v1703-final/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest -> UseLogonCredential -> !0;' -# Section 18.4 - MSS (Legacy) - - id: 8085 - title: "Ensure 'MSS: (AutoAdminLogon) Enable Automatic Logon (not recommended)' is set to 'Disabled'" - description: "This setting is separate from the Welcome screen feature in Windows XP and Windows Vista; if that feature is disabled, this setting is not disabled. If you configure a computer for automatic logon, anyone who can physically gain access to the computer can also gain access to everything that is on the computer, including any network or networks to which the computer is connected. Also, if you enable automatic logon, the password is stored in the registry in plaintext, and the specific registry key that stores this value is remotely readable by the Authenticated Users group. The recommended state for this setting is: Disabled." - rationale: "If you configure a computer for automatic logon, anyone who can physically gain access to the computer can also gain access to everything that is on the computer, including any network or networks that the computer is connected to. Also, if you enable automatic logon, the password is stored in the registry in plaintext. The specific registry key that stores this setting is remotely readable by the Authenticated Users group. As a result, this entry is appropriate only if the computer is physically secured and if you ensure that untrusted users cannot remotely see the registry." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (AutoAdminLogon) Enable Automatic Logon (not recommended) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.1" - - cis_csc: "16" - references: - - https://support.microsoft.com/en-us/help/324737/how-to-turn-on-automatic-logon-in-windows - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> AutoAdminLogon -> !0;' - - id: 8086 - title: "Ensure 'MSS: (DisableIPSourceRouting IPv6) IP source routing protection level (protects against packet spoofing)' is set to 'Enabled: Highest protection, source routing is completely disabled'" - description: "IP source routing is a mechanism that allows the sender to determine the IP route that a datagram should follow through the network. The recommended state for this setting is: Enabled: Highest protection, source routing is completely disabled." - rationale: "An attacker could use source routed packets to obscure their identity and location. Source routing allows a computer that sends a packet to specify the route that the packet takes." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Highest protection, source routing is completely disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (DisableIPSourceRouting IPv6) IP source routing protection level (protects against packet spoofing) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.2" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -> DisableIPSourceRouting -> !2;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -> !DisableIPSourceRouting;' - - id: 8087 - title: "Ensure 'MSS: (DisableIPSourceRouting) IP source routing protection level (protects against packet spoofing)' is set to 'Enabled: Highest protection, source routing is completely disabled'" - description: "IP source routing is a mechanism that allows the sender to determine the IP route that a datagram should take through the network. It is recommended to configure this setting to Not Defined for enterprise environments and to Highest Protection for high security environments to completely disable source routing. The recommended state for this setting is: Enabled: Highest protection, source routing is completely disabled." - rationale: "An attacker could use source routed packets to obscure their identity and location. Source routing allows a computer that sends a packet to specify the route that the packet takes." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Highest protection, source routing is completely disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (DisableIPSourceRouting) IP source routing protection level (protects against packet spoofing) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.3" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> DisableIPSourceRouting -> !2;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> !DisableIPSourceRouting;' - - id: 8088 - title: "Ensure 'MSS: (EnableICMPRedirect) Allow ICMP redirects to override OSPF generated routes' is set to 'Disabled'" - description: "Internet Control Message Protocol (ICMP) redirects cause the IPv4 stack to plumb host routes. These routes override the Open Shortest Path First (OSPF) generated routes. The recommended state for this setting is: Disabled." - rationale: "This behavior is expected. The problem is that the 10 minute time-out period for the ICMP redirect-plumbed routes temporarily creates a network situation in which traffic will no longer be routed properly for the affected host. Ignoring such ICMP redirects will limit the system's exposure to attacks that will impact its ability to participate on the network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (EnableICMPRedirect) Allow ICMP redirects to override OSPF generated routes Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.4" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> EnableICMPRedirect -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> !EnableICMPRedirect;' - - id: 8089 - title: "Ensure 'MSS: (NoNameReleaseOnDemand) Allow the computer to ignore NetBIOS name release requests except from WINS servers' is set to 'Enabled'" - description: "NetBIOS over TCP/IP is a network protocol that among other things provides a way to easily resolve NetBIOS names that are registered on Windows-based systems to the IP addresses that are configured on those systems. This setting determines whether the computer releases its NetBIOS name when it receives a name-release request. The recommended state for this setting is: Enabled." - rationale: "The NetBT protocol is designed not to use authentication, and is therefore vulnerable to spoofing. Spoofing makes a transmission appear to come from a user other than the user who performed the action. A malicious user could exploit the unauthenticated nature of the protocol to send a name-conflict datagram to a target computer, which would cause the computer to relinquish its name and not respond to queries. An attacker could send a request over the network and query a computer to release its NetBIOS name. As with any change that could affect applications, it is recommended that you test this change in a non-production environment before you change the production environment. The result of such an attack could be to cause intermittent connectivity issues on the target computer, or even to prevent the use of Network Neighborhood, domain logons, the NET SEND command, or additional NetBIOS name resolution." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (NoNameReleaseOnDemand) Allow the computer to ignore NetBIOS name release requests except from WINS servers Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.6" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters -> NoNameReleaseOnDemand -> !1;' - - id: 8090 - title: "Ensure 'MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended)' is set to 'Enabled'" - description: "The DLL search order can be configured to search for DLLs that are requested by running processes in one of two ways: -Search folders specified in the system path first, and then search the current working folder. -Search current working folder first, and then search the folders specified in the system path. When enabled, the registry value is set to 1. With a setting of 1, the system first searches the folders that are specified in the system path and then searches the current working folder. When disabled the registry value is set to 0 and the system first searches the current working folder and then searches the folders that are specified in the system path. Applications will be forced to search for DLLs in the system path first. For applications that require unique versions of these DLLs that are included with the application, this entry could cause performance or stability problems. The recommended state for this setting is: Enabled." - rationale: "If a user unknowingly executes hostile code that was packaged with additional files that include modified versions of system DLLs, the hostile code could load its own versions of those DLLs and potentially increase the type and degree of damage the code can render." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.8" - - cis_csc: "8" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager -> SafeDllSearchMode -> 0;' - - id: 8091 - title: "Ensure 'MSS: (ScreenSaverGracePeriod) The time in seconds before the screen saver grace period expires (0 recommended)' is set to 'Enabled: 5 or fewer seconds'" - description: "Windows includes a grace period between when the screen saver is launched and when the console is actually locked automatically when screen saver locking is enabled. The recommended state for this setting is: Enabled: 5 or fewer seconds." - rationale: "The default grace period that is allowed for user movement before the screen saver lock takes effect is five seconds. If you leave the default grace period configuration, your computer is vulnerable to a potential attack from someone who could approach the console and attempt to log on to the computer before the lock takes effect. An entry to the registry can be made to adjust the length of the grace period." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 5 or fewer seconds: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (ScreenSaverGracePeriod) The time in seconds before the screen saver grace period expires (0 recommended) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.9" - - cis_csc: "16.5" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> 6;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> 7;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> 8;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> 9;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> r:\w\w+;' - - id: 8092 - title: "Ensure 'MSS: (WarningLevel) Percentage threshold for the security event log at which the system will generate a warning' is set to 'Enabled: 90% or less'" - description: "This setting can generate a security audit in the Security event log when the log reaches a user-defined threshold. The recommended state for this setting is: Enabled: 90% or less. Note: If log settings are configured to Overwrite events as needed or Overwrite events older than x days, this event will not be generated." - rationale: "If the Security log reaches 90 percent of its capacity and the computer has not been configured to overwrite events as needed, more recent events will not be written to the log. If the log reaches its capacity and the computer has been configured to shut down when it can no longer record events to the Security log, the computer will shut down and will no longer be available to provide network services." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 90% or less: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (WarningLevel) Percentage threshold for the security event log at which the system will generate a warning Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.12" - - cis_csc: "6.3" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> 5B;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> 5C;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> 5D;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> 5E;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> 5F;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:6\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:7\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:8\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:9\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:\D\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:\w\w\w+;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> !WarningLevel;' -# Section 18.5 - Network - - id: 8093 - title: "Ensure 'Prohibit installation and configuration of Network Bridge on your DNS domain network' is set to 'Enabled'" - description: "You can use this procedure to controls user's ability to install and configure a Network Bridge. The recommended state for this setting is: Enabled" - rationale: "The Network Bridge setting, if enabled, allows users to create a Layer 2 Media Access Control (MAC) bridge, enabling them to connect two or more physical network segments together. A Network Bridge thus allows a computer that has connections to two different networks to share data between those networks. In an enterprise managed environment, where there is a need to control network traffic to only authorized paths, allowing users to create a Network Bridge increases the risk and attack surface from the bridged network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Connections\\Prohibit installation and configuration of Network Bridge on your DNS domain network Note: This Group Policy path is provided by the Group Policy template NetworkConnections.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.5.11.2" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> NC_AllowNetBridge_NLA -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> !NC_AllowNetBridge_NLA;' - - id: 8094 - title: "Ensure 'Require domain users to elevate when setting a network's location' is set to 'Enabled'" - description: "This policy setting determines whether to require domain users to elevate when setting a network's location. The recommended state for this setting is: Enabled." - rationale: "Allowing regular users to set a network location increases the risk and attack surface." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Connections\\Require domain users to elevate when setting a network's location Note: This Group Policy path may not exist by default. It is provided by the Group Policy template NetworkConnections.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.5.11.3" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> NC_StdDomainUserSetLocation -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> !NC_StdDomainUserSetLocation;' - - id: 8095 - title: "Ensure 'Minimize the number of simultaneous connections to the Internet or a Windows Domain' is set to 'Enabled'" - description: "This policy setting prevents computers from connecting to both a domain based network and a non-domain based network at the same time. The recommended state for this setting is: Enabled." - rationale: "Blocking simultaneous connections can help prevent a user unknowingly allowing network traffic to flow between the Internet and the enterprise managed network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Windows Connection Manager\\Minimize the number of simultaneous connections to the Internet or a Windows Domain Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WCM.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.5.21.1" - - cis_csc: "12" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\GroupPolicy -> fMinimizeConnections -> !1;' -# Section 18.8 - System - - id: 8096 - title: "Ensure 'Include command line in process creation events' is set to 'Disabled'" - description: "This policy setting determines what information is logged in security audit events when a new process has been created. The recommended state for this setting is: Disabled. " - rationale: "When this policy setting is enabled, any user who has read access to the security events can read the command-line arguments for any successfully created process. Command-line arguments may contain sensitive or private information such as passwords or user data." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Audit Process Creation\\Include command line in process creation events Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AuditSettings.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.8.3.1" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit -> ProcessCreationIncludeCmdLine_Enabled -> !0;' - - id: 8097 - title: "Ensure 'Boot-Start Driver Initialization Policy' is set to 'Enabled: Good, unknown and bad but critical'" - description: "This policy setting allows you to specify which boot-start drivers are initialized based on a classification determined by an Early Launch Antimalware boot-start driver. The Early Launch Antimalware boot-start driver can return the following classifications for each boot-start driver:  -Good: The driver has been signed and has not been tampered with.  -Bad: The driver has been identified as malware. It is recommended that you do not allow known bad drivers to be initialized.  -Bad, but required for boot: The driver has been identified as malware, but the computer cannot successfully boot without loading this driver.  -Unknown: This driver has not been attested to by your malware detection application and has not been classified by the Early Launch Antimalware boot-start driver. If you enable this policy setting you will be able to choose which boot-start drivers to initialize the next time the computer is started. If your malware detection application does not include an Early Launch Antimalware boot- start driver or if your Early Launch Antimalware boot-start driver has been disabled, this setting has no effect and all boot-start drivers are initialized. The recommended state for this setting is: Enabled: Good, unknown and bad but critical." - rationale: "This policy setting helps reduce the impact of malware that has already infected your system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Good, unknown and bad but critical: Computer Configuration\\Policies\\Administrative Templates\\System\\Early Launch Antimalware\\Boot-Start Driver Initialization Policy Note: This Group Policy path may not exist by default. It is provided by the Group Policy template EarlyLaunchAM.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.14.1" - - cis_csc: "8" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies\EarlyLaunch -> DriverLoadPolicy -> !3;' - - id: 8098 - title: "Ensure 'Configure registry policy processing: Do not apply during periodic background processing' is set to 'Enabled: FALSE'" - description: "The 'Do not apply during periodic background processing' option prevents the system from updating affected policies in the background while the computer is in use. When background updates are disabled, policy changes will not take effect until the next user logon or system restart. The recommended state for this setting is: Enabled: FALSE (unchecked)." - rationale: "Setting this option to false (unchecked) will ensure that domain policy changes take effect more quickly, as compared to waiting until the next user logon or system restart." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, then set the Do not apply during periodic background processing option to FALSE (unchecked): Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Configure registry policy processing Note: This Group Policy path may not exist by default. It is provided by the Group Policy template GroupPolicy.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.21.2" - - cis_csc: "3.7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> NoBackgroundPolicy -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> !NoBackgroundPolicy;' - - id: 8099 - title: "Ensure 'Configure registry policy processing: Process even if the Group Policy objects have not changed' is set to 'Enabled: TRUE'" - description: "The 'Process even if the Group Policy objects have not changed' option updates and reapplies policies even if the policies have not changed. The recommended state for this setting is: Enabled: TRUE (checked)." - rationale: "Setting this option to true (checked) will ensure unauthorized changes that might have been configured locally are forced to match the domain-based Group Policy settings again." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, then set the Process even if the Group Policy objects have not changed option to TRUE (checked): Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Configure registry policy processing Note: This Group Policy path may not exist by default. It is provided by the Group Policy template GroupPolicy.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.21.3" - - cis_csc: "3.7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> NoGPOListChanges -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> !NoGPOListChanges;' - - id: 8100 - title: "Ensure 'Turn off background refresh of Group Policy' is set to 'Disabled'" - description: "This policy setting prevents Group Policy from being updated while the computer is in use. This policy setting applies to Group Policy for computers, users and Domain Controllers. The recommended state for this setting is: Disabled." - rationale: "This setting ensures that group policy changes take effect more quickly, as compared to waiting until the next user logon or system restart." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Turn off background refresh of Group Policy Note: This Group Policy path is provided by the Group Policy template GroupPolicy.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.21.4" - - cis_csc: "3.7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> DisableBkGndGroupPolicy -> !0;' - - id: 8101 - title: "Ensure 'Do not display network selection UI' is set to 'Enabled'" - description: "This policy setting allows you to control whether anyone can interact with available networks UI on the logon screen. The recommended state for this setting is: Enabled." - rationale: "An unauthorized user could disconnect the PC from the network or can connect the PC to other available networks without signing into Windows." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Do not display network selection UI Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.8.27.1" - - cis_csc: "5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DontDisplayNetworkSelectionUI -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !DontDisplayNetworkSelectionUI;' - - id: 8102 - title: "Ensure 'Do not enumerate connected users on domain-joined computers' is set to 'Enabled'" - description: "This policy setting prevents connected users from being enumerated on domain-joined computers. The recommended state for this setting is: Enabled." - rationale: "A malicious user could use this feature to gather account names of other users, that information could then be used in conjunction with other types of attacks such as guessing passwords or social engineering. The value of this countermeasure is small because a user with domain credentials could gather the same account information using other methods." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Do not enumerate connected users on domain-joined computers Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.27.2" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DontEnumerateConnectedUsers -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !DontEnumerateConnectedUsers;' - - id: 8103 - title: "Ensure 'Enumerate local users on domain-joined computers' is set to 'Disabled'" - description: "This policy setting allows local users to be enumerated on domain-joined computers. The recommended state for this setting is: Disabled." - rationale: "A malicious user could use this feature to gather account names of other users, that information could then be used in conjunction with other types of attacks such as guessing passwords or social engineering. The value of this countermeasure is small because a user with domain credentials could gather the same account information using other methods." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Enumerate local users on domain-joined computers Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.27.3" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnumerateLocalUsers -> !0;' - - id: 8104 - title: "Ensure 'Turn off app notifications on the lock screen' is set to 'Enabled'" - description: "This policy setting allows you to prevent app notifications from appearing on the lock screen. The recommended state for this setting is: Enabled." - rationale: "App notifications might display sensitive business or personal data." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Turn off app notifications on the lock screen Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.27.4" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DisableLockScreenAppNotifications -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !DisableLockScreenAppNotifications;' - - id: 8105 - title: "Ensure 'Turn on convenience PIN sign-in' is set to 'Disabled'" - description: "This policy setting allows you to control whether a domain user can sign in using a convenience PIN. In Windows 10, convenience PIN was replaced with Passport, which has stronger security properties. To configure Passport for domain users, use the policies under Computer Configuration\\Administrative Templates\\Windows Components\\Microsoft Passport for Work. Note: The user's domain password will be cached in the system vault when using this feature. The recommended state for this setting is: Disabled." - rationale: "A PIN is created from a much smaller selection of characters than a password, so in most cases a PIN will be much less robust than a password." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Turn on convenience PIN sign-in Note: This Group Policy path may not exist by default. It is provided by the Group Policy template CredentialProviders.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer). Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Turn on PIN sign-in, but it was renamed starting with the Windows 10 Release 1511 Administrative Templates." - compliance: - - cis: "18.8.27.6" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> AllowDomainPINLogon -> !0;' - - id: 8106 - title: "Ensure 'Configure Offer Remote Assistance' is set to 'Disabled'" - description: "This policy setting allows you to turn on or turn off Offer (Unsolicited) Remote Assistance on this computer. Help desk and support personnel will not be able to proactively offer assistance, although they can still respond to user assistance requests. The recommended state for this setting is: Disabled" - rationale: "A user might be tricked and accept an unsolicited Remote Assistance offer from a malicious user." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Assistance\\Configure Offer Remote Assistance Note: This Group Policy path may not exist by default. It is provided by the Group Policy template RemoteAssistance.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.35.1" - - cis_csc: "9.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fAllowUnsolicited -> !0;' - - id: 8107 - title: "Ensure 'Configure Solicited Remote Assistance' is set to 'Disabled'" - description: "This policy setting allows you to turn on or turn off Solicited (Ask for) Remote Assistance on this computer. The recommended state for this setting is: Disabled." - rationale: "There is slight risk that a rogue administrator will gain access to another user's desktop session, however, they cannot connect to a user's computer unannounced or control it without permission from the user. When an expert tries to connect, the user can still choose to deny the connection or give the expert view-only privileges. The user must explicitly click the Yes button to allow the expert to remotely control the workstation." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Assistance\\Configure Solicited Remote Assistance Note: This Group Policy path may not exist by default. It is provided by the Group Policy template RemoteAssistance.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.35.2" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fAllowToGetHelp -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fAllowToGetHelp;' -# Section 18.9 - Windows Components - - id: 8108 - title: "Ensure 'Allow Microsoft accounts to be optional' is set to 'Enabled'" - description: "This policy setting lets you control whether Microsoft accounts are optional for Windows Store apps that require an account to sign in. This policy only affects Windows Store apps that support it. The recommended state for this setting is: Enabled." - rationale: "Enabling this setting allows an organization to use their enterprise user accounts instead of using their Microsoft accounts when accessing Windows store apps. This provides the organization with greater control over relevant credentials. Microsoft accounts cannot be centrally managed and as such enterprise credential security policies cannot be applied to them, which could put any information accessed by using Microsoft accounts at risk." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\App runtime\\Allow Microsoft accounts to be optional Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AppXRuntime.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.9.6.1" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> MSAOptional -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> !MSAOptional;' - - id: 8109 - title: "Ensure 'Disallow Autoplay for non-volume devices' is set to 'Enabled'" - description: "This policy setting disallows AutoPlay for MTP devices like cameras or phones. The recommended state for this setting is: Enabled." - rationale: "An attacker could use this feature to launch a program to damage a client computer or data on the computer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Disallow Autoplay for non-volume devices Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AutoPlay.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.9.8.1" - - cis_csc: "8.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoAutoplayfornonVolume -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> !NoAutoplayfornonVolume;' - - id: 8110 - title: "Ensure 'Set the default behavior for AutoRun' is set to 'Enabled: Do not execute any autorun commands'" - description: "This policy setting sets the default behavior for Autorun commands. Autorun commands are generally stored in autorun.inf files. They often launch the installation program or other routines. The recommended state for this setting is: Enabled: Do not execute any autorun commands." - rationale: "Prior to Windows Vista, when media containing an autorun command is inserted, the system will automatically execute the program without user intervention. This creates a major security concern as code may be executed without user's knowledge. The default behavior starting with Windows Vista is to prompt the user whether autorun command is to be run. The autorun command is represented as a handler in the Autoplay dialog." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Do not execute any autorun commands: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Set the default behavior for AutoRun Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AutoPlay.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.9.8.2" - - cis_csc: "8.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoAutorun -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> !NoAutorun;' - - id: 8111 - title: "Ensure 'Turn off Autoplay' is set to 'Enabled: All drives'" - description: "Autoplay starts to read from a drive as soon as you insert media in the drive, which causes the setup file for programs or audio media to start immediately. An attacker could use this feature to launch a program to damage the computer or data on the computer. Autoplay is disabled by default on some removable drive types, such as floppy disk and network drives, but not on CD-ROM drives. Note: You cannot use this policy setting to enable Autoplay on computer drives in which it is disabled by default, such as floppy disk and network drives. The recommended state for this setting is: Enabled: All drives." - rationale: "An attacker could use this feature to launch a program to damage a client computer or data on the computer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: All drives: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Turn off Autoplay Note: This Group Policy path is provided by the Group Policy template AutoPlay.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.8.3" - - cis_csc: "8.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer-> NoDriveTypeAutoRun -> !ff;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer-> !NoDriveTypeAutoRun;' - - id: 8112 - title: "Ensure 'Do not display the password reveal button' is set to 'Enabled'" - description: "This policy setting allows you to configure the display of the password reveal button in password entry user experiences. The recommended state for this setting is: Enabled." - rationale: "This is a useful feature when entering a long and complex password, especially when using a touchscreen. The potential risk is that someone else may see your password while surreptitiously observing your screen." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Credential User Interface\\Do not display the password reveal button Note: This Group Policy path may not exist by default. It is provided by the Group Policy template CredUI.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.9.15.1" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredUI -> DisablePasswordReveal -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredUI -> !DisablePasswordReveal;' - - id: 8113 - title: "Ensure 'Enumerate administrator accounts on elevation' is set to 'Disabled'" - description: "This policy setting controls whether administrator accounts are displayed when a user attempts to elevate a running application. The recommended state for this setting is: Disabled." - rationale: "Users could see the list of administrator accounts, making it slightly easier for a malicious user who has logged onto a console session to try to crack the passwords of those accounts." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Credential User Interface\\Enumerate administrator accounts on elevation Note: This Group Policy path is provided by the Group Policy template CredUI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.15.2" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\CredUI -> EnumerateAdministrators -> !0;' - - id: 8114 - title: "Ensure 'Application: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" - description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." - rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Application\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.1.1" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> Retention -> !0;' - - id: 8115 - title: "Ensure 'Application: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" - description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 32,768 or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Application\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.1.2" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:0\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:4\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:5\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:6\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:7\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> !MaxSize;' - - id: 8116 - title: "Ensure 'Security: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" - description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." - rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Security\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.2.1" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> Retention -> !0;' - - id: 8117 - title: "Ensure 'Security: Specify the maximum log file size (KB)' is set to 'Enabled: 196,608 or greater'" - description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 196,608 or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 196,608 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Security\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.2.2" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:0\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:1\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:2\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> !MaxSize;' - - id: 8118 - title: "Ensure 'Setup: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" - description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." - rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Setup\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.3.1" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> Retention -> !0;' - - id: 8119 - title: "Ensure 'Setup: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" - description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 32,768 or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Setup\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.3.2" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:0\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:4\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:5\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:6\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:7\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> !MaxSize;' - - id: 8120 - title: "Ensure 'System: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" - description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." - rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\System\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.4.1" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> Retention -> !0;' - - id: 8121 - title: "Ensure 'System: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" - description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 32,768 or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\System\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.4.2" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:0\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:4\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:5\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:6\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:7\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> !MaxSize;' - - id: 8122 - title: "Ensure 'Turn off Data Execution Prevention for Explorer' is set to 'Disabled'" - description: "Disabling Data Execution Prevention can allow certain legacy plug-in applications to function without terminating Explorer. The recommended state for this setting is: Disabled." - rationale: "Data Execution Prevention is an important security feature supported by Explorer that helps to limit the impact of certain types of malware." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off Data Execution Prevention for Explorer Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Explorer.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.9.30.2" - - cis_csc: "8.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoDataExecutionPrevention -> !0;' - - id: 8123 - title: "Ensure 'Turn off heap termination on corruption' is set to 'Disabled'" - description: "This policy setting allows you to configure the amount of functionality that the shell protocol can have. When using the full functionality of this protocol, applications can open folders and launch files. The protected mode reduces the functionality of this protocol allowing applications to only open a limited set of folders. Applications are not able to open files with this protocol when it is in the protected mode. It is recommended to leave this protocol in the protected mode to increase the security of Windows. The recommended state for this setting is: Disabled." - rationale: "Limiting the opening of files and folders to a limited set reduces the attack surface of the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off shell protocol protected mode Note: This Group Policy path is provided by the Group Policy template WindowsExplorer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.30.3" - - cis_csc: "8.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoHeapTerminationOnCorruption -> !0;' - - id: 8124 - title: "Ensure 'Turn off shell protocol protected mode' is set to 'Disabled'" - description: "This policy setting allows you to configure the amount of functionality that the shell protocol can have. When using the full functionality of this protocol, applications can open folders and launch files. The protected mode reduces the functionality of this protocol allowing applications to only open a limited set of folders. Applications are not able to open files with this protocol when it is in the protected mode. It is recommended to leave this protocol in the protected mode to increase the security of Windows. The recommended state for this setting is: Disabled." - rationale: "Limiting the opening of files and folders to a limited set reduces the attack surface of the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off shell protocol protected mode Note: This Group Policy path is provided by the Group Policy template WindowsExplorer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.30.4" - - cis_csc: "8.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> PreXPSP2ShellProtocolBehavior -> !0;' - - id: 8125 - title: "Ensure 'Prevent the usage of OneDrive for file storage' is set to 'Enabled'" - description: "This policy setting lets you prevent apps and features from working with files on OneDrive using the Next Generation Sync Client. The recommended state for this setting is: Enabled." - rationale: "Enabling this setting prevents users from accidentally uploading confidential or sensitive corporate information to the OneDrive cloud service using the Next Generation Sync Client." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\OneDrive\\Prevent the usage of OneDrive for file storage Note: This Group Policy path may not exist by default. It is provided by the Group Policy template SkyDrive.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer). However, we strongly recommend you only use the version included with the Microsoft Windows 10 Release 1607 & Server 2016 Administrative Templates (or newer). Older versions of the templates had conflicting settings in different template files for both OneDrive & SkyDrive, until it was cleaned up properly in the above version. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Prevent the usage of SkyDrive for file storage, but it was renamed starting with the Windows 10 RTM (Release 1507) Administrative Templates" - compliance: - - cis: "18.9.52.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\OneDrive -> DisableFileSyncNGSC -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\OneDrive -> !DisableFileSyncNGSC;' - - id: 8126 - title: "Ensure 'Prevent the usage of OneDrive for file storage on Windows 8.1' is set to 'Enabled'" - description: "This policy setting lets you prevent apps and features from working with files on OneDrive using the legacy OneDrive/SkyDrive client. The recommended state for this setting is: Enabled. Note: Despite the name of this setting, it is applicable to the legacy OneDrive client on any Windows OS." - rationale: "Enabling this setting prevents users from accidentally uploading confidential or sensitive corporate information to the OneDrive cloud service using the legacy OneDrive/SkyDrive client." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\OneDrive\\Prevent the usage of OneDrive for file storage on Windows 8.1 Note: This Group Policy path may not exist by default. It is provided by the Group Policy template SkyDrive.admx/adml that is included with the Microsoft Windows 10 Release 1607 & Server 2016 Administrative Templates (or newer). We strongly recommend you only use either that version of the template or a newer one. Older versions of the templates had conflicting settings in different template files for both OneDrive & SkyDrive, until it was cleaned up properly in the above version." - compliance: - - cis: "18.9.52.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Skydrive -> DisableFileSync -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Skydrive -> !DisableFileSync;' - - id: 8127 - title: "Ensure 'Do not allow passwords to be saved' is set to 'Enabled'" - description: "This policy setting helps prevent Remote Desktop clients from saving passwords on a computer. The recommended state for this setting is: Enabled. Note: If this policy setting was previously configured as Disabled or Not configured, any previously saved passwords will be deleted the first time a Remote Desktop client disconnects from any server." - rationale: "An attacker with physical access to the computer may be able to break the protection guarding saved passwords. An attacker who compromises a user's account and connects to their computer could use saved passwords to gain access to additional hosts." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Connection Client\\Do not allow passwords to be saved Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.2.2" - - cis_csc: "16.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> DisablePasswordSaving -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !DisablePasswordSaving;' - - id: 8128 - title: "Ensure 'Do not allow drive redirection' is set to 'Enabled'" - description: "This policy setting prevents users from sharing the local drives on their client computers to Remote Desktop Servers that they access. Mapped drives appear in the session folder tree in Windows Explorer in the following format: \\\\TSClient\\$ If local drives are shared they are left vulnerable to intruders who want to exploit the data that is stored on them. The recommended state for this setting is: Enabled." - rationale: "Data could be forwarded from the user's Remote Desktop Services session to the user's local computer without any direct user interaction. Malicious software already present on a compromised server would have direct and stealthy disk access to the user's local computer during the Remote Desktop session." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow drive redirection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.3.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableCdm -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fDisableCdm;' - - id: 8129 - title: "Ensure 'Always prompt for password upon connection' is set to 'Enabled'" - description: "This policy setting specifies whether Remote Desktop Services always prompts the client computer for a password upon connection. You can use this policy setting to enforce a password prompt for users who log on to Remote Desktop Services, even if they already provided the password in the Remote Desktop Connection client. The recommended state for this setting is: Enabled." - rationale: "Users have the option to store both their username and password when they create a new Remote Desktop Connection shortcut. If the server that runs Remote Desktop Services allows users who have used this feature to log on to the server but not enter their password, then it is possible that an attacker who has gained physical access to the user's computer could connect to a Remote Desktop Server through the Remote Desktop Connection shortcut, even though they may not know the user's password." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Always prompt for password upon connection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In the Microsoft Windows Vista Administrative Templates, this setting was named Always prompt client for password upon connection, but it was renamed starting with the Windows Server 2008 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.58.3.9.1" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fPromptForPassword -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fPromptForPassword;' - - id: 8130 - title: "Ensure 'Require secure RPC communication' is set to 'Enabled'" - description: "This policy setting allows you to specify whether Remote Desktop Services requires secure Remote Procedure Call (RPC) communication with all clients or allows unsecured communication. You can use this policy setting to strengthen the security of RPC communication with clients by allowing only authenticated and encrypted requests. The recommended state for this setting is: Enabled." - rationale: "Allowing unsecure RPC communication can exposes the server to man in the middle attacks and data disclosure attacks." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Require secure RPC communication Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.9.2" - - cis_csc: "3.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fEncryptRPCTraffic -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fEncryptRPCTraffic;' - - id: 8131 - title: "Ensure 'Set client connection encryption level' is set to 'Enabled: High Level'" - description: "This policy setting specifies whether to require the use of a specific encryption level to secure communications between client computers and RD Session Host servers during Remote Desktop Protocol (RDP) connections. This policy only applies when you are using native RDP encryption. However, native RDP encryption (as opposed to SSL encryption) is not recommended. This policy does not apply to SSL encryption. The recommended state for this setting is: Enabled: High Level." - rationale: "If Remote Desktop client connections that use low level encryption are allowed, it is more likely that an attacker will be able to decrypt any captured Remote Desktop Services network traffic." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: High Level: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Set client connection encryption level Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.9.3" - - cis_csc: "3.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MinEncryptionLevel -> !3;' - - id: 8132 - title: "Ensure 'Do not delete temp folders upon exit' is set to 'Disabled'" - description: "This policy setting specifies whether Remote Desktop Services retains a user's per-session temporary folders at logoff. The recommended state for this setting is: Disabled." - rationale: "Sensitive information could be contained inside the temporary folders and visible to other administrators that log into the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Temporary Folders\\Do not delete temp folders upon exit Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Do not delete temp folder upon exit, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.58.3.11.1" - - cis_csc: "14.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> DeleteTempDirsOnExit -> !1;' - - id: 8133 - title: "Ensure 'Do not use temporary folders per session' is set to 'Disabled'" - description: "By default, Remote Desktop Services creates a separate temporary folder on the RD Session Host server for each active session that a user maintains on the RD Session Host server. The temporary folder is created on the RD Session Host server in a Temp folder under the user's profile folder and is named with the sessionid. This temporary folder is used to store individual temporary files. To reclaim disk space, the temporary folder is deleted when the user logs off from a session. The recommended state for this setting is: Disabled." - rationale: "Disabling this setting keeps the cached data independent for each session, both reducing the chance of problems from shared cached data between sessions, and keeping possibly sensitive data separate to each user session." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Temporary Folders\\Do not use temporary folders per session Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.11.2" - - cis_csc: "14.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> PerSessionTempDir -> !1;' - - id: 8134 - title: "Ensure 'Prevent downloading of enclosures' is set to 'Enabled'" - description: "This policy setting prevents the user from having enclosures (file attachments) downloaded from an RSS feed to the user's computer. The recommended state for this setting is: Enabled." - rationale: "Allowing attachments to be downloaded through the RSS feed can introduce files that could have malicious intent." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\RSS Feeds\\Prevent downloading of enclosures Note: This Group Policy path is provided by the Group Policy template InetRes.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Turn off downloading of enclosures, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.59.1" - - cis_csc: "7.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Feeds -> DisableEnclosureDownload -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Feeds -> !DisableEnclosureDownload;' - - id: 8135 - title: "Ensure 'Allow indexing of encrypted files' is set to 'Disabled'" - description: "This policy setting controls whether encrypted items are allowed to be indexed. When this setting is changed, the index is rebuilt completely. Full volume encryption (such as BitLocker Drive Encryption or a non-Microsoft solution) must be used for the location of the index to maintain security for encrypted files. The recommended state for this setting is: Disabled." - rationale: "Indexing and allowing users to search encrypted files could potentially reveal confidential data stored within the encrypted files." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Allow indexing of encrypted files Note: This Group Policy path is provided by the Group Policy template Search.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.60.2" - - cis_csc: "13.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> AllowIndexingEncryptedStoresOrItems -> !0;' - - id: 8136 - title: "Ensure 'Configure Windows Defender SmartScreen' is set to 'Enabled: Warn and prevent bypass'" - description: "This policy setting allows you to manage the behavior of Windows SmartScreen. Windows SmartScreen helps keep PCs safer by warning users before running unrecognized programs downloaded from the Internet. Some information is sent to Microsoft about files and programs run on PCs with this feature enabled. The recommended state for this setting is: Enabled: Warn and prevent bypass." - rationale: "Windows SmartScreen helps keep PCs safer by warning users before running unrecognized programs downloaded from the Internet. However, due to the fact that some information is sent to Microsoft about files and programs run on PCs some organizations may prefer to disable it." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Warn and prevent bypass: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender SmartScreen\\Explorer\\Configure Windows Defender SmartScreen Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsExplorer.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer). Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Configure Windows SmartScreen, but it was renamed starting with the Windows 10 Release 1703 Administrative Templates." - compliance: - - cis: "18.9.80.1.1" - - cis_csc: "2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnableSmartScreen -> !2;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !EnableSmartScreen;' - - id: 8137 - title: "Ensure 'Configure Default consent' is set to 'Enabled: Always ask before sending data'" - description: "This setting allows you to set the default consent handling for error reports. The recommended state for this setting is: Enabled: Always ask before sending data" - rationale: "Error reports may contain sensitive information and should not be sent to anyone automatically." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Always ask before sending data: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Error Reporting\\Consent\\Configure Default consent Note: This Group Policy path is provided by the Group Policy template ErrorReporting.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.81.2.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent -> DefaultConsent -> !1;' - - id: 8138 - title: "Ensure 'Automatically send memory dumps for OS-generated error reports' is set to 'Disabled'" - description: "This policy setting controls whether memory dumps in support of OS-generated error reports can be sent to Microsoft automatically. This policy does not apply to error reports generated by 3rd-party products, or additional data other than memory dumps. The recommended state for this setting is: Disabled." - rationale: "Memory dumps may contain sensitive information and should not be automatically sent to anyone." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Error Reporting\\Automatically send memory dumps for OS- generated error reports Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ErrorReporting.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.9.81.3" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> AutoApproveOSDumps -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> !AutoApproveOSDumps;' - - id: 8139 - title: "Ensure 'Allow user control over installs' is set to 'Disabled'" - description: "This setting controls whether users are permitted to change installation options that typically are available only to system administrators. The security features of Windows Installer normally prevent users from changing installation options that are typically reserved for system administrators, such as specifying the directory to which files are installed. If Windows Installer detects that an installation package has permitted the user to change a protected option, it stops the installation and displays a message. These security features operate only when the installation program is running in a privileged security context in which it has access to directories denied to the user. The recommended state for this setting is: Disabled." - rationale: "In an enterprise managed environment, only IT staff with administrative rights should be installing or changing software on a system. Allowing users the ability to have any control over installs can risk unapproved software from being installed or removed from a system, which could cause the system to become vulnerable to compromise." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Allow user control over installs Note: This Group Policy path is provided by the Group Policy template MSI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Enable user control over installs, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.85.1" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> EnableUserControl -> !0;' - - id: 8140 - title: "Ensure 'Always install with elevated privileges' is set to 'Disabled'" - description: "This setting controls whether or not Windows Installer should use system permissions when it installs any program on the system. Note: This setting appears both in the Computer Configuration and User Configuration folders. To make this setting effective, you must enable the setting in both folders. Caution: If enabled, skilled users can take advantage of the permissions this setting grants to change their privileges and gain permanent access to restricted files and folders. Note that the User Configuration version of this setting is not guaranteed to be secure. The recommended state for this setting is: Disabled." - rationale: "Users with limited privileges can exploit this feature by creating a Windows Installer installation package that creates a new local account that belongs to the local built-in Administrators group, adds their current account to the local built-in Administrators group, installs malicious software, or performs other unauthorized activities." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Always install with elevated privileges Note: This Group Policy path is provided by the Group Policy template MSI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.85.2" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> AlwaysInstallElevated -> !0;' - - id: 8141 - title: "Ensure 'Sign-in last interactive user automatically after a system-initiated restart' is set to 'Disabled'" - description: "This policy setting controls whether a device will automatically sign-in the last interactive user after Windows Update restarts the system. The recommended state for this setting is: Disabled." - rationale: "Disabling this feature will prevent the caching of user's credentials and unauthorized use of the device, and also ensure the user is aware of the restart." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Logon Options\\Sign-in last interactive user automatically after a system-initiated restart Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WinLogon.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.9.86.1" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> DisableAutomaticRestartSignOn -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> !DisableAutomaticRestartSignOn;' - - id: 8142 - title: "Ensure 'Turn on PowerShell Script Block Logging' is set to 'Disabled'" - description: "This policy setting enables logging of all PowerShell script input to the Microsoft-Windows- PowerShell/Operational event log. The recommended state for this setting is: Disabled. Note: In Microsoft's own hardening guidance, they recommend the opposite value, Enabled, because having this data logged improves investigations of PowerShell attack incidents. However, the default ACL on the PowerShell Operational log allows Interactive User (i.e. any logged on user) to read it, and therefore possibly expose passwords or other sensitive information to unauthorized users. If Microsoft locks down the default ACL on that log in the future (e.g. to restrict it only to Administrators), then we will revisit this recommendation in a future release." - rationale: "There are potential risks of capturing passwords in the PowerShell logs. This setting should only be needed for debugging purposes, and not in normal operation, it is important to ensure this is set to Disabled." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows PowerShell\\Turn on PowerShell Script Block Logging Note: This Group Policy path may not exist by default. It is provided by the Group Policy template PowerShellExecutionPolicy.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." - compliance: - - cis: "18.9.95.1" - - cis_csc: "16.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging -> EnableScriptBlockLogging -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging -> !EnableScriptBlockLogging;' - - id: 8143 - title: "Ensure 'Turn on PowerShell Transcription' is set to 'Disabled'" - description: "This Policy setting lets you capture the input and output of Windows PowerShell commands into text-based transcripts. The recommended state for this setting is: Disabled." - rationale: "If this setting is enabled there is a risk that passwords could get stored in plain text in the PowerShell_transcript output file." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows PowerShell\\Turn on PowerShell Transcription Note: This Group Policy path may not exist by default. It is provided by the Group Policy template PowerShellExecutionPolicy.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." - compliance: - - cis: "18.9.95.2" - - cis_csc: "16.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription -> EnableTranscripting -> !0;' - - id: 8144 - title: "Ensure 'Allow Basic authentication' is set to 'Disabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client uses Basic authentication. The recommended state for this setting is: Disabled." - rationale: "Basic authentication is less robust than other authentication methods available in WinRM because credentials including passwords are transmitted in plain text. An attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Allow Basic authentication Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.97.1.1" - - cis_csc: "16.13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowBasic -> !0;' - - id: 8145 - title: "Ensure 'Allow unencrypted traffic' is set to 'Disabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client sends and receives unencrypted messages over the network. The recommended state for this setting is: Disabled." - rationale: "Encrypting WinRM network traffic reduces the risk of an attacker viewing or modifying WinRM messages as they transit the network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Allow unencrypted traffic Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.97.1.2" - - cis_csc: "16.13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowUnencryptedTraffic -> !0;' - - id: 8146 - title: "Ensure 'Disallow Digest authentication' is set to 'Enabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client will not use Digest authentication. The recommended state for this setting is: Enabled." - rationale: "Digest authentication is less robust than other authentication methods available in WinRM, an attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Disallow Digest authentication Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.97.1.3" - - cis_csc: "16.13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowDigest -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> !AllowDigest;' - - id: 8147 - title: "Ensure 'Allow Basic authentication' is set to 'Disabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service accepts Basic authentication from a remote client. The recommended state for this setting is: Disabled." - rationale: "Basic authentication is less robust than other authentication methods available in WinRM because credentials including passwords are transmitted in plain text. An attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow Basic authentication Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.97.2.1" - - cis_csc: "16.13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowBasic -> !0;' - - id: 8148 - title: "Ensure 'Allow unencrypted traffic' is set to 'Disabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service sends and receives unencrypted messages over the network. The recommended state for this setting is: Disabled." - rationale: "Encrypting WinRM network traffic reduces the risk of an attacker viewing or modifying WinRM messages as they transit the network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow unencrypted traffic Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.97.2.3" - - cis_csc: "16.13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowUnencryptedTraffic -> !0;' - - id: 8149 - title: "Ensure 'Disallow WinRM from storing RunAs credentials' is set to 'Enabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service will allow RunAs credentials to be stored for any plug-ins. The recommended state for this setting is: Enabled. Note: If you enable and then disable this policy setting, any values that were previously configured for RunAsPassword will need to be reset." - rationale: "Although the ability to store RunAs credentials is a convenient feature it increases the risk of account compromise slightly. For example, if you forget to lock your desktop before leaving it unattended for a few minutes another person could access not only the desktop of your computer but also any hosts you manage via WinRM with cached RunAs credentials." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Disallow WinRM from storing RunAs credentials Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.9.97.2.4" - - cis_csc: "16.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> DisableRunAs -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> !DisableRunAs;' - - id: 8150 - title: "Ensure 'Configure Automatic Updates' is set to 'Enabled'" - description: "This policy setting specifies whether computers in your environment will receive security updates from Windows Update or WSUS. If you configure this policy setting to Enabled, the operating system will recognize when a network connection is available and then use the network connection to search Windows Update or your designated intranet site for updates that apply to them. After you configure this policy setting to Enabled, select one of the following three options in the Configure Automatic Updates Properties dialog box to specify how the service will work:  2 - Notify for download and auto install (Notify before downloading any updates)  3 - Auto download and notify for install (Download the updates automatically and notify when they are ready to be installed.) (Default setting)  4 - Auto download and schedule the install (Automatically download updates and install them on the schedule specified below.))  5 - Allow local admin to choose setting (Leave decision on above choices up to the local Administrators (Not Recommended)) The recommended state for this setting is: Enabled. Note: The sub-setting 'Configure automatic updating:' has 4 possible values – all of them are valid depending on specific organizational needs, however if feasible we suggest using a value of 4 - Auto download and schedule the install. This suggestion is not a scored requirement. Note #2: Organizations that utilize a 3rd-party solution for patching may choose to exempt themselves from this setting, and instead configure it to Disabled so that the native Windows Update mechanism does not interfere with the 3rd-party patching process." - rationale: "Although each version of Windows is thoroughly tested before release, it is possible that problems will be discovered after the products are shipped. The Configure Automatic Updates setting can help you ensure that the computers in your environment will always have the most recent critical operating system updates and service packs installed." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Configure Automatic Updates Note: This Group Policy path is provided by the Group Policy template WindowsUpdate.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.101.2" - - cis_csc: "4.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> NoAutoUpdate -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> !NoAutoUpdate;' - - id: 8151 - title: "Ensure 'Configure Automatic Updates: Scheduled install day' is set to '0 - Every day'" - description: "This policy setting specifies when computers in your environment will receive security updates from Windows Update or WSUS. The recommended state for this setting is: 0 - Every day. Note: This setting is only applicable if 4 - Auto download and schedule the install is selected in Rule 18.9.101.2. It will have no impact if any other option is selected." - rationale: "Although each version of Windows is thoroughly tested before release, it is possible that problems will be discovered after the products are shipped. The Configure Automatic Updates setting can help you ensure that the computers in your environment will always have the most recent critical operating system updates and service packs installed." - remediation: "To establish the recommended configuration via GP, set the following UI path to 0 - Every day: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Configure Automatic Updates: Scheduled install day Note: This Group Policy path is provided by the Group Policy template WindowsUpdate.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.101.3" - - cis_csc: "4.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> ScheduledInstallDay -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> !ScheduledInstallDay;' - - id: 8152 - title: "Ensure 'No auto-restart with logged on users for scheduled automatic updates installations' is set to 'Disabled'" - description: "This policy setting specifies that Automatic Updates will wait for computers to be restarted by the users who are logged on to them to complete a scheduled installation. The recommended state for this setting is: Disabled. Note: This setting applies only when you configure Automatic Updates to perform scheduled update installations. If you configure the Configure Automatic Updates setting to Disabled, this setting has no effect." - rationale: "Some security updates require that the computer be restarted to complete an installation. If the computer cannot restart automatically, then the most recent update will not completely install and no new updates will download to the computer until it is restarted. Without the auto-restart functionality, users who are not security-conscious may choose to indefinitely delay the restart, therefore keeping the computer in a less secure state." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\No auto-restart with logged on users for scheduled automatic updates installations Note: This Group Policy path is provided by the Group Policy template WindowsUpdate.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named No auto-restart for scheduled Automatic Updates installations, but it was renamed starting with the Windows 7 & Server 2008 R2 Administrative Templates." - compliance: - - cis: "18.9.101.4" - - cis_csc: "4.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> NoAutoRebootWithLoggedOnUsers -> !0;' diff --git a/sca/windows/cis_win2012r2_domainL2.yml b/sca/windows/cis_win2012r2_domainL2.yml new file mode 100644 index 000000000..82137c1a8 --- /dev/null +++ b/sca/windows/cis_win2012r2_domainL2.yml @@ -0,0 +1,583 @@ +# Security Configuration Assessment +# CIS Checks for Windows Server 2012 R2 Domain Controller L2 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.3.0 - 03-30-2018 +# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.1.0 - 11-02-2015 +# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.0.0 - 09-30-2015 + +policy: + id: "cis_win2012r2_domainL2" + file: "cis_win2012r2_domainL2.yml" + name: "CIS benchmark for Windows 2012 R2 Domain Controller L2" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for Microsoft Windows Server 2012 R2." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check that the Windows platform is Windows Server 2012 R2" + description: "Requirements for running the CIS benchmark Domain Controller L2 under Windows Server 2012 R2" + condition: all + rules: + - 'r:HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion -> ProductName -> r:^Windows Server 2012 R2' + +checks: + - id: 11500 + title: "Ensure 'Devices: Prevent users from installing printer drivers' is set to 'Enabled'" + description: "For a computer to print to a shared printer, the driver for that shared printer must be installed on the local computer. This security setting determines who is allowed to install a printer driver as part of connecting to a shared printer. The recommended state for this setting is: Enabled. Note: This setting does not affect the ability to add a local printer. This setting does not affect Administrators." + rationale: "It may be appropriate in some organizations to allow users to install printer drivers on their own workstations. However, you should allow only Administrators, not users, to do so on servers, because printer driver installation on a server may unintentionally cause the computer to become less stable. A malicious user could install inappropriate printer drivers in a deliberate attempt to damage the computer, or a user might accidentally install malicious software that masquerades as a printer driver. It is feasible for an attacker to disguise a Trojan horse program as a printer driver. The program may appear to users as if they must use it to print, but such a program could unleash malicious code on your computer network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Devices: Prevent users from installing printer drivers." + compliance: + - cis: ["2.3.4.2"] + - cis_csc: ["5.1"] + references: + - 'CCE-37942-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Providers\LanMan Print Services\Servers -> AddPrinterDrivers -> 1' + +# Section 18.4 - MSS (Legacy) + - id: 11501 + title: "Ensure 'MSS: (KeepAliveTime) How often keep-alive packets are sent in milliseconds' is set to 'Enabled: 300,000 or 5 minutes'" + description: "This value controls how often TCP attempts to verify that an idle connection is still intact by sending a keep-alive packet. If the remote computer is still reachable, it acknowledges the keep-alive packet. The recommended state for this setting is: Enabled: 300,000 or 5 minutes (recommended)." + rationale: "An attacker who is able to connect to network applications could establish numerous connections to cause a DoS condition." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 300,000 or 5 minutes (recommended): Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (KeepAliveTime) How often keep-alive packets are sent in milliseconds. Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.5"] + - cis_csc: ["9"] + references: + - 'CCE-36868-8' + - 'https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> KeepAliveTime -> 300000' + + - id: 11502 + title: "Ensure 'MSS: (PerformRouterDiscovery) Allow IRDP to detect and configure Default Gateway addresses (could lead to DoS)' is set to 'Disabled'" + description: "This setting is used to enable or disable the Internet Router Discovery Protocol (IRDP), which allows the system to detect and configure default gateway addresses automatically as described in RFC 1256 on a per-interface basis. The recommended state for this setting is: Disabled." + rationale: "An attacker who has gained control of a computer on the same network segment could configure a computer on the network to impersonate a router. Other computers with IRDP enabled would then attempt to route their traffic through the already compromised computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (PerformRouterDiscovery) Allow IRDP to detect and configure Default Gateway addresses (could lead to DoS). Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.7"] + - cis_csc: ["9"] + references: + - 'CCE-38065-9' + - 'https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> PerformRouterDiscovery -> 0' + + - id: 11503 + title: "Ensure 'MSS: (TcpMaxDataRetransmissions IPv6) How many times unacknowledged data is retransmitted' is set to 'Enabled: 3'" + description: "This setting controls the number of times that TCP retransmits an individual data segment (non-connect segment) before the connection is aborted. The retransmission time-out is doubled with each successive retransmission on a connection. It is reset when responses resume. The base time-out value is dynamically determined by the measured round-trip time on the connection. The recommended state for this setting is: Enabled: 3." + rationale: "A malicious user could exhaust a target computer's resources if it never sent any acknowledgment messages for data that was transmitted by the target computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 3: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(TcpMaxDataRetransmissions IPv6) How many times unacknowledged data is retransmitted. Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.10"] + - cis_csc: ["9"] + references: + - 'CCE-37846-3' + - 'https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> TcpMaxDataRetransmissions -> 3' + + - id: 11504 + title: "Ensure 'MSS: (TcpMaxDataRetransmissions) How many times unacknowledged data is retransmitted' is set to 'Enabled: 3'" + description: "This setting controls the number of times that TCP retransmits an individual data segment (non-connect segment) before the connection is aborted. The retransmission time-out is doubled with each successive retransmission on a connection. It is reset when responses resume. The base time-out value is dynamically determined by the measured round-trip time on the connection. The recommended state for this setting is: Enabled: 3." + rationale: "A malicious user could exhaust a target computer's resources if it never sent any acknowledgment messages for data that was transmitted by the target computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 3: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(TcpMaxDataRetransmissions) How many times unacknowledged data is retransmitted. Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.11"] + - cis_csc: ["9"] + references: + - 'CCE-36051-1' + - 'https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> TcpMaxDataRetransmissions -> 3' + +# Section 18.5 - Network + - id: 11505 + title: "Ensure 'Turn on Mapper I/O (LLTDIO) driver' is set to 'Disabled'" + description: "This policy setting changes the operational behavior of the Mapper I/O network protocol driver. LLTDIO allows a computer to discover the topology of a network it's connected to. It also allows a computer to initiate Quality-of-Service requests such as bandwidth estimation and network health analysis. The recommended state for this setting is: Disabled." + rationale: "To help protect from potentially discovering and connecting to unauthorized devices, this setting should be disabled to prevent responding to network traffic for network topology discovery." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Link-Layer Topology Discovery\\Turn on Mapper I/O (LLTDIO) driver. Note: This Group Policy path is provided by the Group Policy template LinkLayerTopologyDiscovery.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.5.9.1"] + - cis_csc: ["9"] + references: + - 'CCE-38170-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowLLTDIOOnDomain -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowLLTDIOOnPublicNet -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> EnableLLTDIO -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> ProhibitLLTDIOOnPrivateNet -> 0' + + - id: 11506 + title: "Ensure 'Turn on Responder (RSPNDR) driver' is set to 'Disabled'" + description: "This policy setting changes the operational behavior of the Responder network protocol driver. The Responder allows a computer to participate in Link Layer Topology Discovery requests so that it can be discovered and located on the network. It also allows a computer to participate in Quality-of-Service activities such as bandwidth estimation and network health analysis. The recommended state for this setting is: Disabled." + rationale: "To help protect from potentially discovering and connecting to unauthorized devices, this setting should be disabled to prevent responding to network traffic for network topology discovery." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Link-Layer Topology Discovery\\Turn on Responder (RSPNDR) driver. Note: This Group Policy path is provided by the Group Policy template LinkLayerTopologyDiscovery.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.5.9.2"] + - cis_csc: ["9"] + references: + - 'CCE-37959-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowRspndrOnDomain -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowRspndrOnPublicNet -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> EnableRspndr -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> ProhibitRspndrOnPrivateNet -> 0' + + - id: 11507 + title: "Ensure 'Turn off Microsoft Peer-to-Peer Networking Services' is set to 'Enabled'" + description: "The Peer Name Resolution Protocol (PNRP) allows for distributed resolution of a name to an IPv6 address and port number. The protocol operates in the context of clouds. A cloud is a set of peer computers that can communicate with each other by using the same IPv6 scope. Peer-to-Peer protocols allow for applications in the areas of RTC, collaboration, content distribution and distributed processing. The recommended state for this setting is: Enabled." + rationale: "This setting enhances the security of the environment and reduces the overall risk exposure related to peer-to-peer networking." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Microsoft Peer-to-Peer Networking Services\\Turn off Microsoft Peer-to-Peer Networking Services. Note: This Group Policy path is provided by the Group Policy template P2P- pnrp.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.5.10.2"] + - cis_csc: ["9.1"] + references: + - 'CCE-37699-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Peernet -> Disabled -> 1' + + - id: 11508 + title: "Disable IPv6 (Ensure TCPIP6 Parameter 'DisabledComponents' is set to '0xff (255)')" + description: "Internet Protocol version 6 (IPv6) is a set of protocols that computers use to exchange information over the Internet and over home and business networks. IPv6 allows for many more IP addresses to be assigned than IPv4 did. Older networking, hosts and operating systems may not support IPv6 natively. The recommended state for this setting is: DisabledComponents - 0xff (255)" + rationale: "Since the vast majority of private enterprise managed networks have no need to utilize IPv6 (because they have access to private IPv4 addressing), disabling IPv6 components reduces a possible attack surface that is also harder to monitor the traffic on. As a result, we recommend configuring IPv6 to a Disabled state when it is not needed." + remediation: "To establish the recommended configuration, set the following Registry value to 0xff (255) (DWORD): HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\TCPIP6\\Parameters:DisabledComponents. Note: This change does not take effect until the computer has been restarted. Note #2: Although Microsoft does not provide an ADMX template to configure this registry value, a custom .ADM template (Disable-IPv6-Components-KB929852.adm) is provided in the CIS Benchmark Remediation Kit to facilitate its configuration. Be aware though that simply turning off the group policy setting in the .ADM template will not \"undo\" the change once applied. Instead, the opposite setting must be applied to change the registry value to the opposite state." + compliance: + - cis: ["18.5.19.2.1"] + - cis_csc: ["9"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> DisabledComponents -> 255' + + - id: 11509 + title: "Ensure 'Configuration of wireless settings using Windows Connect Now' is set to 'Disabled'" + description: "This policy setting allows the configuration of wireless settings using Windows Connect Now (WCN). The WCN Registrar enables the discovery and configuration of devices over Ethernet (UPnP) over in-band 802.11 Wi-Fi through the Windows Portable Device API (WPD) and via USB Flash drives. Additional options are available to allow discovery and configuration over a specific medium. The recommended state for this setting is: Disabled." + rationale: "This setting enhances the security of the environment and reduces the overall risk exposure related to user configuration of wireless settings." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Windows Connect Now\\Configuration of wireless settings using Windows Connect Now. Note: This Group Policy path is provided by the Group Policy template WindowsConnectNow.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.5.20.1"] + - cis_csc: ["15.4"] + references: + - 'CCE-37481-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> EnableRegistrars -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableUPnPRegistrar -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableInBand802DOT11Registrar -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableFlashConfigRegistrar -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableWPDRegistrar -> 0' + + - id: 11510 + title: "Ensure 'Prohibit access of the Windows Connect Now wizards' is set to 'Enabled'" + description: "This policy setting prohibits access to Windows Connect Now (WCN) wizards. The recommended state for this setting is: Enabled." + rationale: "Allowing standard users to access the Windows Connect Now wizard increases the risk and attack surface." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network\\Windows Connect Now\\Prohibit access of the Windows Connect Now wizards. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsConnectNow.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.5.20.2"] + - cis_csc: ["15.4"] + references: + - 'CCE-36109-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\UI -> DisableWcnUi -> 1' + + - id: 11511 + title: "Ensure 'Turn off handwriting personalization data sharing' is set to 'Enabled'" + description: "This setting turns off data sharing from the handwriting recognition personalization tool. The handwriting recognition personalization tool enables Tablet PC users to adapt handwriting recognition to their own writing style by providing writing samples. The tool can optionally share user writing samples with Microsoft to improve handwriting recognition in future versions of Windows. The tool generates reports and transmits them to Microsoft over a secure connection. The recommended state for this setting is: Enabled." + rationale: "A person's handwriting is Personally Identifiable Information (PII), especially when it comes to your signature. As such, it is unacceptable in many environments to automatically upload PII to a website without explicit approval by the user." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off handwriting personalization data sharing. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ShapeCollector.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.8.22.1.2"] + - cis_csc: ["13"] + references: + - 'CCE-37911-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\TabletPC -> PreventHandwritingDataSharing -> 1' + + - id: 11512 + title: "Ensure 'Turn off handwriting recognition error reporting' is set to 'Enabled'" + description: "Turns off the handwriting recognition error reporting tool. The handwriting recognition error reporting tool enables users to report errors encountered in Tablet PC Input Panel. The tool generates error reports and transmits them to Microsoft over a secure connection. Microsoft uses these error reports to improve handwriting recognition in future versions of Windows. The recommended state for this setting is: Enabled." + rationale: "A person's handwriting is Personally Identifiable Information (PII), especially when it comes to your signature. As such, it is unacceptable in many environments to automatically upload PII to a website without explicit approval by the user." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off handwriting recognition error reporting. Note: This Group Policy path is provided by the Group Policy template InkWatson.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.3"] + - cis_csc: ["13"] + references: + - 'CCE-36203-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HandwritingErrorReports -> PreventHandwritingErrorReports -> 1' + + - id: 11513 + title: "Ensure 'Turn off Internet Connection Wizard if URL connection is referring to Microsoft.com' is set to 'Enabled'" + description: "This policy setting specifies whether the Internet Connection Wizard can connect to Microsoft to download a list of Internet Service Providers (ISPs). The recommended state for this setting is: Enabled." + rationale: "In an enterprise managed environment we want to lower the risk of a user unknowingly exposing sensitive data." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Internet Connection Wizard if URL connection is referring to Microsoft.com. Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.4"] + - cis_csc: ["13"] + references: + - 'CCE-37163-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Internet Connection Wizard -> ExitOnMSICW -> 1' + + - id: 11514 + title: "Ensure 'Turn off Registration if URL connection is referring to Microsoft.com' is set to 'Enabled'" + description: "This policy setting specifies whether the Windows Registration Wizard connects to Microsoft.com for online registration. The recommended state for this setting is: Enabled." + rationale: "Users in an enterprise managed environment should not be registering their own copies of Windows, providing their own PII in the process." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Registration if URL connection is referring to Microsoft.com. Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.7"] + references: + - 'CCE-36352-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Policies\Microsoft\Windows\Registration Wizard Control -> NoRegistration -> 1' + + - id: 11515 + title: "Ensure 'Turn off Search Companion content file updates' is set to 'Enabled'" + description: "This policy setting specifies whether Search Companion should automatically download content updates during local and Internet searches. The recommended state for this setting is: Enabled." + rationale: "There is a small risk that users will unknowingly reveal sensitive information because of the topics they are searching for. This risk is very low because even if this setting is enabled users still must submit search queries to the desired search engine in order to perform searches." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Search Companion content file updates. Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.8"] + - cis_csc: ["13"] + references: + - 'CCE-36884-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SearchCompanion -> DisableContentFileUpdates -> 1' + + - id: 11516 + title: "Ensure 'Turn off the \"Order Prints\" picture task' is set to 'Enabled'" + description: "This policy setting specifies whether the \"Order Prints Online\" task is available from Picture Tasks in Windows folders. The Order Prints Online Wizard is used to download a list of providers and allow users to order prints online. The recommended state for this setting is: Enabled." + rationale: "In an enterprise managed environment we want to lower the risk of a user unknowingly exposing sensitive data." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the \"Order Prints\" picture task. Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.9"] + - cis_csc: ["13"] + references: + - 'CCE-38275-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoOnlinePrintsWizard -> 1' + + - id: 11517 + title: "Ensure 'Turn off the \"Publish to Web\" task for files and folders' is set to 'Enabled'" + description: "This policy setting specifies whether the tasks Publish this file to the Web, Publish this folder to the Web, and Publish the selected items to the Web are available from File and Folder Tasks in Windows folders. The Web Publishing wizard is used to download a list of providers and allow users to publish content to the Web. The recommended state for this setting is: Enabled." + rationale: "Users may publish confidential or sensitive information to a public service outside of the control of the organization." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the \"Publish to Web\" task for files and folders Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.10"] + - cis_csc: ["13"] + references: + - 'CCE-37090-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoPublishingWizard -> 1' + + - id: 11518 + title: "Ensure 'Turn off the Windows Messenger Customer Experience Improvement Program' is set to 'Enabled'" + description: "This policy setting specifies whether Windows Messenger can collect anonymous information about how the Windows Messenger software and service is used. Microsoft uses information collected through the Customer Experience Improvement Program to detect software flaws so that they can be corrected more quickly, enabling this setting will reduce the amount of data Microsoft is able to gather for this purpose. The recommended state for this setting is: Enabled." + rationale: "Large enterprise managed environments may not want to have information collected by Microsoft from managed client computers." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the Windows Messenger Customer Experience Improvement Program. Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.11"] + - cis_csc: ["13"] + references: + - 'CCE-36628-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Messenger\Client -> CEIP -> 2' + + - id: 11519 + title: "Ensure 'Turn off Windows Customer Experience Improvement Program' is set to 'Enabled'" + description: "This policy setting specifies whether Windows Messenger can collect anonymous information about how the Windows Messenger software and service is used. Microsoft uses information collected through the Windows Customer Experience Improvement Program to detect software flaws so that they can be corrected more quickly, enabling this setting will reduce the amount of data Microsoft is able to gather for this purpose. The recommended state for this setting is: Enabled." + rationale: "Large enterprise managed environments may not want to have information collected by Microsoft from managed client computers." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Windows Customer Experience Improvement Program. Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.12"] + - cis_csc: ["13"] + references: + - 'CCE-36174-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SQMClient\Windows -> CEIPEnable -> 0' + + - id: 11520 + title: "Ensure 'Turn off Windows Error Reporting' is set to 'Enabled'" + description: "This policy setting controls whether or not errors are reported to Microsoft. Error Reporting is used to report information about a system or application that has failed or has stopped responding and is used to improve the quality of the product. The recommended state for this setting is: Enabled." + rationale: "If a Windows Error occurs in a secure, enterprise managed environment, the error should be reported directly to IT staff for troubleshooting and remediation. There is no benefit to the corporation to report these errors directly to Microsoft, and there is some risk of unknowingly exposing sensitive data as part of the error." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Windows Error Reporting. Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.22.1.13"] + - cis_csc: ["13"] + references: + - 'CCE-35964-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> Disabled -> 1' + + - id: 11521 + title: "Ensure 'Disallow copying of user input methods to the system account for sign-in' is set to 'Enabled'" + description: "This policy prevents automatic copying of user input methods to the system account for use on the sign-in screen. The user is restricted to the set of input methods that are enabled in the system account. The recommended state for this setting is: Enabled." + rationale: "This is a way to increase the security of the system account." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Locale Services\\Disallow copying of user input methods to the system account for sign-in. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Globalization.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.26.1"] + - cis_csc: ["16.5"] + references: + - 'CCE-36343-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Control Panel\International -> BlockUserInputMethodsForSignIn -> 1' + + - id: 11522 + title: "Ensure 'Microsoft Support Diagnostic Tool: Turn on MSDT interactive communication with support provider' is set to 'Disabled'" + description: "This policy setting configures Microsoft Support Diagnostic Tool (MSDT) interactive communication with the support provider. MSDT gathers diagnostic data for analysis by support professionals. The recommended state for this setting is: Disabled." + rationale: "Due to privacy concerns, data should never be sent to any 3rd party since this data could contain sensitive information." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Troubleshooting and Diagnostics\\Microsoft Support Diagnostic Tool\\Microsoft Support Diagnostic Tool: Turn on MSDT interactive communication with support provider. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MSDT.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.44.5.1"] + - cis_csc: ["13"] + references: + - 'CCE-38161-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\ScriptedDiagnosticsProvider\Policy -> DisableQueryRemoteServer -> 0' + + - id: 11523 + title: "Ensure 'Enable/Disable PerfTrack' is set to 'Disabled'" + description: "This policy setting specifies whether to enable or disable tracking of responsiveness events. The recommended state for this setting is: Disabled." + rationale: "When enabled the aggregated data of a given event will be transmitted to Microsoft. The option exists to restrict this feature for a specific user, set the consent level, and designate specific programs for which error reports could be sent. However, centrally restricting the ability to execute PerfTrack to limit the potential for unauthorized or undesired usage, data leakage, or unintentional communications is highly recommended." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Troubleshooting and Diagnostics\\Windows Performance PerfTrack\\Enable/Disable PerfTrack. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template PerformancePerftrack.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.8.44.11.1"] + - cis_csc: ["13"] + references: + - 'CCE-36648-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WDI\{9c5a40da-b965-4fc3-8781-88dd50a6299d} -> ScenarioExecutionEnabled -> 0' + + - id: 11524 + title: "Ensure 'Turn off the advertising ID' is set to 'Enabled'" + description: "This policy setting turns off the advertising ID, preventing apps from using the ID for experiences across apps. The recommended state for this setting is: Enabled." + rationale: "Tracking user activity for advertising purposes, even anonymously, may be a privacy concern. In an enterprise managed environment, applications should not need or require tracking for targeted advertising." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\User Profiles\\Turn off the advertising ID. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template UserProfiles.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.8.46.1"] + - cis_csc: ["13"] + references: + - 'CCE-36931-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo -> DisabledByGroupPolicy -> 1' + + - id: 11525 + title: "Ensure 'Enable Windows NTP Client' is set to 'Enabled'" + description: "This policy setting specifies whether the Windows NTP Client is enabled. Enabling the Windows NTP Client allows your computer to synchronize its computer clock with other NTP servers. You might want to disable this service if you decide to use a third-party time provider. The recommended state for this setting is: Enabled." + rationale: "A reliable and accurate account of time is important for a number of services and security requirements, including but not limited to distributed applications, authentication services, multi-user databases and logging services. The use of an NTP client (with secure operation) establishes functional accuracy and is a focal point when reviewing security relevant events." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Windows Time Service\\Time Providers\\Enable Windows NTP Client. Note: This Group Policy path is provided by the Group Policy template W32Time.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.49.1.1"] + - cis_csc: ["6.1"] + references: + - 'CCE-37843-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\W32Time\TimeProviders\NtpClient -> Enabled -> 1' + +# Section 18.9 - System + - id: 11526 + title: "Ensure 'Turn off location' is set to 'Enabled'" + description: "This policy setting turns off the location feature for the computer. The recommended state for this setting is: Enabled." + rationale: "This setting affects the location feature (e.g. GPS or other location tracking). From a security perspective, it's not a good idea to reveal your location to software in most cases, but there are legitimate uses, such as mapping software. However, they should not be used in high security environments." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Location and Sensors\\Turn off location. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Sensors.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.39.2"] + - cis_csc: ["13"] + references: + - 'CCE-36886-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors -> DisableLocation -> 1' + + - id: 11527 + title: "Ensure 'Restrict Remote Desktop Services users to a single Remote Desktop Services session' is set to 'Enabled'" + description: "This policy setting allows you to restrict users to a single Remote Desktop Services session. The recommended state for this setting is: Enabled." + rationale: "This setting ensures that users & administrators who Remote Desktop to a server will continue to use the same session - if they disconnect and reconnect, they will go back to the same session they were using before, preventing the creation of a second simultaneous session. This both prevents unnecessary resource usage by having the server host unnecessary additional sessions (which would put extra load on the server) and also ensures a consistency of experience for the user." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Connections\\Restrict Remote Desktop Services users to a single Remote Desktop Services session. Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Restrict Terminal Services users to a single remote session, but it was renamed starting with the Windows 7 & Server 2008 R2 Administrative Templates." + compliance: + - cis: ["18.9.58.3.2.1"] + references: + - 'CCE-37708-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fSingleSessionPerUser -> 1' + + - id: 11528 + title: "Ensure 'Do not allow COM port redirection' is set to 'Enabled'" + description: "This policy setting specifies whether to prevent the redirection of data to client COM ports from the remote computer in a Remote Desktop Services session. The recommended state for this setting is: Enabled." + rationale: "In a more security-sensitive environment, it is desirable to reduce the possible attack surface. The need for COM port redirection within a Remote Desktop session is very rare, so makes sense to reduce the number of unexpected avenues for data exfiltration and/or malicious code transfer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow COM port redirection. Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.3.1"] + - cis_csc: ["9.1"] + references: + - 'CCE-37696-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableCcm -> 1' + + - id: 11529 + title: "Ensure 'Do not allow LPT port redirection' is set to 'Enabled'" + description: "This policy setting specifies whether to prevent the redirection of data to client LPT ports during a Remote Desktop Services session. The recommended state for this setting is: Enabled." + rationale: "In a more security-sensitive environment, it is desirable to reduce the possible attack surface. The need for LPT port redirection within a Remote Desktop session is very rare, so makes sense to reduce the number of unexpected avenues for data exfiltration and/or malicious code transfer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow LPT port redirection. Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.3.3"] + - cis_csc: ["9.1"] + references: + - 'CCE-37778-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableLPT -> 1' + + - id: 11530 + title: "Ensure 'Do not allow supported Plug and Play device redirection' is set to 'Enabled'" + description: "This policy setting allows you to control the redirection of supported Plug and Play devices, such as Windows Portable Devices, to the remote computer in a Remote Desktop Services session. The recommended state for this setting is: Enabled." + rationale: "In a more security-sensitive environment, it is desirable to reduce the possible attack surface. The need for Plug and Play device redirection within a Remote Desktop session is very rare, so makes sense to reduce the number of unexpected avenues for data exfiltration and/or malicious code transfer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow supported Plug and Play device redirection. Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.3.4"] + - cis_csc: ["9.1"] + references: + - 'CCE-37477-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisablePNPRedir -> 1' + + - id: 11531 + title: "Ensure 'Set time limit for active but idle Remote Desktop Services sessions' is set to 'Enabled: 15 minutes or less'" + description: "This policy setting allows you to specify the maximum amount of time that an active Remote Desktop Services session can be idle (without user input) before it is automatically disconnected. The recommended state for this setting is: Enabled: 15 minutes or less." + rationale: "This setting helps to prevent active Remote Desktop sessions from tying up the computer for long periods of time while not in use, preventing computing resources from being consumed by large numbers of inactive sessions. In addition, old, forgotten Remote Desktop sessions that are still active can cause password lockouts if the user's password has changed but the old session is still running. For systems that limit the number of connected users (e.g. servers in the default Administrative mode - 2 sessions only), other users' old but still active sessions can prevent another user from connecting, resulting in an effective denial of service." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 15 minutes or less: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Session Time Limits\\Set time limit for active but idle Remote Desktop Services sessions. Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Set time limit for active but idle Terminal Services sessions, but it was renamed starting with the Windows 7 & Server 2008 R2 Administrative Templates." + compliance: + - cis: ["18.9.58.3.10.1"] + - cis_csc: ["16.5"] + references: + - 'CCE-37562-6' + - https://workbench.cisecurity.org/benchmarks/766 + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> n:^(\d+) compare <= 900000' + + - id: 11532 + title: "Ensure 'Set time limit for disconnected sessions' is set to 'Enabled: 1 minute'" + description: "This policy setting allows you to configure a time limit for disconnected Remote Desktop Services sessions. The recommended state for this setting is: Enabled: 1 minute." + rationale: "This setting helps to prevent active Remote Desktop sessions from tying up the computer for long periods of time while not in use, preventing computing resources from being consumed by large numbers of disconnected but still active sessions. In addition, old, forgotten Remote Desktop sessions that are still active can cause password lockouts if the user's password has changed but the old session is still running. For systems that limit the number of connected users (e.g. servers in the default Administrative mode - 2 sessions only), other users' old but still active sessions can prevent another user from connecting, resulting in an effective denial of service. This setting is important to ensure a disconnected session is properly terminated." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 1 minute: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Session Time Limits\\Set time limit for disconnected sessions. Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.10.2"] + - cis_csc: ["16.5"] + references: + - 'CCE-37949-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxDisconnectionTime -> 60000' + + - id: 11533 + title: "Ensure 'Set what information is shared in Search' is set to 'Enabled: Anonymous info'" + description: "Various levels of information can be shared with Bing in Search, to include user information and location. Configuring this setting prevents users from selecting the level of information shared and enables the most restrictive selection. The recommended state for this setting is: Enabled: Anonymous info." + rationale: "Limiting the search information shared with Microsoft Bing enhances privacy and security." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Anonymous info: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Set what information is shared in Search. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Search.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.60.3"] + - cis_csc: ["13"] + references: + - 'CCE-36937-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> ConnectedSearchPrivacy -> 3' + + - id: 11534 + title: "Ensure 'Turn off KMS Client Online AVS Validation' is set to 'Enabled'" + description: "The Key Management Service (KMS) is a Microsoft license activation method that entails setting up a local server to store the software licenses. The KMS server itself needs to connect to Microsoft to activate the KMS service, but subsequent on-network clients can activate Microsoft Windows OS and/or their Microsoft Office via the KMS server instead of connecting directly to Microsoft. This policy setting lets you opt-out of sending KMS client activation data to Microsoft automatically. The recommended state for this setting is: Enabled." + rationale: "Even though the KMS licensing method does not require KMS clients to connect to Microsoft, they still send KMS client activation state data to Microsoft automatically. Preventing this information from being sent can help reduce privacy concerns in high security environments." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Software Protection Platform\\Turn off KMS Client Online AVS Validation. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AVSValidationGP.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." + compliance: + - cis: ["18.9.65.1"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform -> NoGenTicket -> 1' + + - id: 11535 + title: "Ensure 'Join Microsoft MAPS' is set to 'Disabled'" + description: "This policy setting allows you to join Microsoft Active Protection Service (MAPS), which Microsoft has now renamed to 'Windows Defender Antivirus Cloud Protection Service'. Microsoft MAPS / Windows Defender Antivirus Cloud Protection Service is the online community that helps you choose how to respond to potential threats. The community also helps stop the spread of new malicious software infections. You can choose to send basic or additional information about detected software. Additional information helps Microsoft create new definitions and help it to protect your computer. Possible options are: - (0x0) Disabled (default) - (0x1) Basic membership - (0x2) Advanced membership Basic membership will send basic information to Microsoft about software that has been detected including where the software came from the actions that you apply or that are applied automatically and whether the actions were successful. Advanced membership in addition to basic information will send more information to Microsoft about malicious software spyware and potentially unwanted software including the location of the software file names how the software operates and how it has impacted your computer. The recommended state for this setting is: Disabled." + rationale: "The information that would be sent can include things like location of detected items on your computer if harmful software was removed. The information would be automatically collected and sent. In some instances personal information might unintentionally be sent to Microsoft. However, Microsoft states that it will not use this information to identify you or contact you. For privacy reasons in high security environments, it is best to prevent these data submissions altogether." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\MAPS\\Join Microsoft MAPS. Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsDefender.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.76.3.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet -> SpynetReporting -> 0' + + - id: 11536 + title: "Ensure 'Prevent Internet Explorer security prompt for Windows Installer scripts' is set to 'Disabled'" + description: "This policy setting controls whether Web-based programs are allowed to install software on the computer without notifying the user. The recommended state for this setting is: Disabled." + rationale: "Suppressing the system warning can pose a security risk and increase the attack surface on the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Prevent Internet Explorer security prompt for Windows Installer scripts. Note: This Group Policy path is provided by the Group Policy template MSI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Disable IE security prompt for Windows Installer scripts, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.85.3"] + - cis_csc: ["7"] + references: + - 'CCE-37524-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> SafeForScripting -> 0' + + - id: 11537 + title: "Ensure 'Allow remote server management through WinRM' is set to 'Disabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service automatically listens on the network for requests on the HTTP transport over the default HTTP port. The recommended state for this setting is: Disabled." + rationale: "Any feature is a potential avenue of attack, those that enable inbound network connections are particularly risky. Only enable the use of the Windows Remote Management (WinRM) service on trusted networks and when feasible employ additional controls such as IPsec." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow remote server management through WinRM. Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Allow automatic configuration of listeners, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.97.2.2"] + - cis_csc: ["3.4"] + references: + - 'CCE-37927-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowAutoConfig -> 0' + + - id: 11538 + title: "Ensure 'Allow Remote Shell Access' is set to 'Disabled'" + description: "This policy setting allows you to manage configuration of remote access to all supported shells to execute scripts and commands. The recommended state for this setting is: Disabled. Note: The GPME help text for this setting is incorrectly worded, implying that configuring it to Enabled will reject new Remote Shell connections, and setting it to Disabled will allow Remote Shell connections. The opposite is true (and is consistent with the title of the setting). This is a wording mistake by Microsoft in the Administrative Template." + rationale: "Any feature is a potential avenue of attack, those that enable inbound network connections are particularly risky. Only enable the use of the Windows Remote Shell on trusted networks and when feasible employ additional controls such as IPsec." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Administrative Templates\\Windows Components\\Windows Remote Shell\\Allow Remote Shell Access. Note: This Group Policy path is provided by the Group Policy template WindowsRemoteShell.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.98.1"] + - cis_csc: ["3.4"] + references: + - 'CCE-36499-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service\WinRS -> AllowRemoteShellAccess -> 0' diff --git a/sca/windows/cis_win2012r2_domainL2_rcl.yml b/sca/windows/cis_win2012r2_domainL2_rcl.yml deleted file mode 100644 index f897b8cd2..000000000 --- a/sca/windows/cis_win2012r2_domainL2_rcl.yml +++ /dev/null @@ -1,601 +0,0 @@ -# Security Configuration assessment -# CIS Checks for Windows Server 2012 R2 Domain Controller L2 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.3.0 - 03-30-2018 -# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.1.0 - 11-02-2015 -# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.0.0 - 09-30-2015 - -policy: - id: "cis_win2012r2_domainL2" - file: "cis_win2012r2_domainL2_rcl.yml" - name: "CIS benchmark for Windows 2012 R2 Domain Controller L2" - description: "This document provides prescriptive guidance for establishing a secure configuration posture for Microsoft Windows Server 2012 R2." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check that the Windows platform is Windows Server 2012 R2" - description: "Requirements for running the CIS benchmark Domain Controller L2 under Windows Server 2012 R2" - condition: "any required" - rules: - - 'r:HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion -> ProductName -> r:^Windows Server 2012 R2;' - -checks: -# Section 2.3 - Security Options - - id: 8500 - title: "Ensure 'Network access: Do not allow storage of passwords and credentials for network authentication' is set to 'Enabled'" - description: "This policy setting determines whether Credential Manager (formerly called Stored User Names and Passwords) saves passwords or credentials for later use when it gains domain authentication. The recommended state for this setting is: Enabled. Note: Changes to this setting will not take effect until Windows is restarted." - rationale: "Passwords that are cached can be accessed by the user when logged on to the computer. Although this information may sound obvious, a problem can arise if the user unknowingly executes hostile code that reads the passwords and forwards them to another, unauthorized user." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow storage of passwords and credentials for network authentication" - compliance: - - cis: "2.3.10.4" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> DisableDomainCreds -> !1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> !DisableDomainCreds;' -# Section 18.4 - MSS (Legacy) - - id: 8501 - title: "Ensure 'MSS: (KeepAliveTime) How often keep-alive packets are sent in milliseconds' is set to 'Enabled: 300,000 or 5 minutes'" - description: "This value controls how often TCP attempts to verify that an idle connection is still intact by sending a keep-alive packet. If the remote computer is still reachable, it acknowledges the keep-alive packet. The recommended state for this setting is: Enabled: 300,000 or 5 minutes (recommended)." - rationale: "An attacker who is able to connect to network applications could establish numerous connections to cause a DoS condition." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 300,000 or 5 minutes (recommended): Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (KeepAliveTime) How often keep-alive packets are sent in milliseconds Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.5" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> KeepAliveTime -> !493e0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> !KeepAliveTime;' - - id: 8502 - title: "Ensure 'MSS: (PerformRouterDiscovery) Allow IRDP to detect and configure Default Gateway addresses (could lead to DoS)' is set to 'Disabled'" - description: "This setting is used to enable or disable the Internet Router Discovery Protocol (IRDP), which allows the system to detect and configure default gateway addresses automatically as described in RFC 1256 on a per-interface basis. The recommended state for this setting is: Disabled." - rationale: "An attacker who has gained control of a computer on the same network segment could configure a computer on the network to impersonate a router. Other computers with IRDP enabled would then attempt to route their traffic through the already compromised computer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (PerformRouterDiscovery) Allow IRDP to detect and configure Default Gateway addresses (could lead to DoS) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.7" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> PerformRouterDiscovery -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> !PerformRouterDiscovery;' - - id: 8503 - title: "Ensure 'MSS: (TcpMaxDataRetransmissions IPv6) How many times unacknowledged data is retransmitted' is set to 'Enabled: 3'" - description: "This setting controls the number of times that TCP retransmits an individual data segment (non-connect segment) before the connection is aborted. The retransmission time-out is doubled with each successive retransmission on a connection. It is reset when responses resume. The base time-out value is dynamically determined by the measured round-trip time on the connection. The recommended state for this setting is: Enabled: 3." - rationale: "A malicious user could exhaust a target computer's resources if it never sent any acknowledgment messages for data that was transmitted by the target computer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 3: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(TcpMaxDataRetransmissions IPv6) How many times unacknowledged data is retransmitted Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.10" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> TcpMaxDataRetransmissions -> !3;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> !TcpMaxDataRetransmissions;' - - id: 8504 - title: "Ensure 'MSS: (TcpMaxDataRetransmissions) How many times unacknowledged data is retransmitted' is set to 'Enabled: 3'" - description: "This setting controls the number of times that TCP retransmits an individual data segment (non-connect segment) before the connection is aborted. The retransmission time-out is doubled with each successive retransmission on a connection. It is reset when responses resume. The base time-out value is dynamically determined by the measured round-trip time on the connection. The recommended state for this setting is: Enabled: 3." - rationale: "A malicious user could exhaust a target computer's resources if it never sent any acknowledgment messages for data that was transmitted by the target computer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 3: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(TcpMaxDataRetransmissions) How many times unacknowledged data is retransmitted Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.11" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> TcpMaxDataRetransmissions -> !3;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> !TcpMaxDataRetransmissions;' -# Section 18.5 - Network - - id: 8505 - title: "Ensure 'Turn on Mapper I/O (LLTDIO) driver' is set to 'Disabled'" - description: "This policy setting changes the operational behavior of the Mapper I/O network protocol driver. LLTDIO allows a computer to discover the topology of a network it's connected to. It also allows a computer to initiate Quality-of-Service requests such as bandwidth estimation and network health analysis. The recommended state for this setting is: Disabled." - rationale: "To help protect from potentially discovering and connecting to unauthorized devices, this setting should be disabled to prevent responding to network traffic for network topology discovery." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Link-Layer Topology Discovery\\Turn on Mapper I/O (LLTDIO) driver Note: This Group Policy path is provided by the Group Policy template LinkLayerTopologyDiscovery.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.5.9.1" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowLLTDIOOnDomain -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowLLTDIOOnPublicNet -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> EnableLLTDIO -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> ProhibitLLTDIOOnPrivateNet -> !0;' - - id: 8506 - title: "Ensure 'Turn on Responder (RSPNDR) driver' is set to 'Disabled'" - description: "This policy setting changes the operational behavior of the Responder network protocol driver. The Responder allows a computer to participate in Link Layer Topology Discovery requests so that it can be discovered and located on the network. It also allows a computer to participate in Quality-of-Service activities such as bandwidth estimation and network health analysis. The recommended state for this setting is: Disabled." - rationale: "To help protect from potentially discovering and connecting to unauthorized devices, this setting should be disabled to prevent responding to network traffic for network topology discovery." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Link-Layer Topology Discovery\\Turn on Responder (RSPNDR) driver Note: This Group Policy path is provided by the Group Policy template LinkLayerTopologyDiscovery.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.5.9.2" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowRspndrOnDomain -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowRspndrOnPublicNet -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> EnableRspndr -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> ProhibitRspndrOnPrivateNet -> !0;' - - id: 8507 - title: "Ensure 'Turn off Microsoft Peer-to-Peer Networking Services' is set to 'Enabled'" - description: "The Peer Name Resolution Protocol (PNRP) allows for distributed resolution of a name to an IPv6 address and port number. The protocol operates in the context of clouds. A cloud is a set of peer computers that can communicate with each other by using the same IPv6 scope. Peer-to-Peer protocols allow for applications in the areas of RTC, collaboration, content distribution and distributed processing. The recommended state for this setting is: Enabled." - rationale: "This setting enhances the security of the environment and reduces the overall risk exposure related to peer-to-peer networking." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Microsoft Peer-to-Peer Networking Services\\Turn off Microsoft Peer-to-Peer Networking Services Note: This Group Policy path is provided by the Group Policy template P2P- pnrp.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.5.10.2" - - cis_csc: "9.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Peernet -> Disabled -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Peernet -> !Disabled;' - - id: 8508 - title: "Disable IPv6 (Ensure TCPIP6 Parameter 'DisabledComponents' is set to '0xff (255)')" - description: "Internet Protocol version 6 (IPv6) is a set of protocols that computers use to exchange information over the Internet and over home and business networks. IPv6 allows for many more IP addresses to be assigned than IPv4 did. Older networking, hosts and operating systems may not support IPv6 natively. The recommended state for this setting is: DisabledComponents - 0xff (255)" - rationale: "Since the vast majority of private enterprise managed networks have no need to utilize IPv6 (because they have access to private IPv4 addressing), disabling IPv6 components reduces a possible attack surface that is also harder to monitor the traffic on. As a result, we recommend configuring IPv6 to a Disabled state when it is not needed." - remediation: "To establish the recommended configuration, set the following Registry value to 0xff (255) (DWORD): HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\TCPIP6\\Parameters:Disabl edComponents Note: This change does not take effect until the computer has been restarted. Note #2: Although Microsoft does not provide an ADMX template to configure this registry value, a custom .ADM template (Disable-IPv6-Components-KB929852.adm) is provided in the CIS Benchmark Remediation Kit to facilitate its configuration. Be aware though that simply turning off the group policy setting in the .ADM template will not 'undo' the change once applied. Instead, the opposite setting must be applied to change the registry value to the opposite state." - compliance: - - cis: "18.5.19.2.1" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> DisabledComponents -> !ff;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> !DisabledComponents;' - - id: 8509 - title: "Ensure 'Configuration of wireless settings using Windows Connect Now' is set to 'Disabled'" - description: "This policy setting allows the configuration of wireless settings using Windows Connect Now (WCN). The WCN Registrar enables the discovery and configuration of devices over Ethernet (UPnP) over in-band 802.11 Wi-Fi through the Windows Portable Device API (WPD) and via USB Flash drives. Additional options are available to allow discovery and configuration over a specific medium. The recommended state for this setting is: Disabled." - rationale: "This setting enhances the security of the environment and reduces the overall risk exposure related to user configuration of wireless settings." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Windows Connect Now\\Configuration of wireless settings using Windows Connect Now Note: This Group Policy path is provided by the Group Policy template WindowsConnectNow.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.5.20.1" - - cis_csc: "15.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> EnableRegistrars -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> !EnableRegistrars;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableUPnPRegistrar -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> !DisableUPnPRegistrar;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableInBand802DOT11Registrar -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> !DisableInBand802DOT11Registrar;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableFlashConfigRegistrar -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> !DisableFlashConfigRegistrar;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableWPDRegistrar -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> !DisableWPDRegistrar;' - - id: 8510 - title: "Ensure 'Prohibit access of the Windows Connect Now wizards' is set to 'Enabled'" - description: "This policy setting prohibits access to Windows Connect Now (WCN) wizards. The recommended state for this setting is: Enabled." - rationale: "Allowing standard users to access the Windows Connect Now wizard increases the risk and attack surface." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network\\Windows Connect Now\\Prohibit access of the Windows Connect Now wizards Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsConnectNow.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.5.20.2" - - cis_csc: "15.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\UI -> DisableWcnUi -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\UI -> !DisableWcnUi;' -# Section 18.8 - System - - id: 8511 - title: "Ensure 'Turn off downloading of print drivers over HTTP' is set to 'Enabled'" - description: "This policy setting controls whether the computer can download print driver packages over HTTP. To set up HTTP printing, printer drivers that are not available in the standard operating system installation might need to be downloaded over HTTP. The recommended state for this setting is: Enabled." - rationale: "Users might download drivers that include malicious code." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off downloading of print drivers over HTTP Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.1" - - cis_csc: "2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers -> DisableWebPnPDownload -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers -> !DisableWebPnPDownload;' - - id: 8512 - title: "Ensure 'Turn off handwriting personalization data sharing' is set to 'Enabled'" - description: "This setting turns off data sharing from the handwriting recognition personalization tool. The handwriting recognition personalization tool enables Tablet PC users to adapt handwriting recognition to their own writing style by providing writing samples. The tool can optionally share user writing samples with Microsoft to improve handwriting recognition in future versions of Windows. The tool generates reports and transmits them to Microsoft over a secure connection. The recommended state for this setting is: Enabled." - rationale: "A person's handwriting is Personally Identifiable Information (PII), especially when it comes to your signature. As such, it is unacceptable in many environments to automatically upload PII to a website without explicit approval by the user." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off handwriting personalization data sharing Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ShapeCollector.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.8.22.1.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\TabletPC -> PreventHandwritingDataSharing -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\TabletPC -> !PreventHandwritingDataSharing;' - - id: 8513 - title: "Ensure 'Turn off handwriting recognition error reporting' is set to 'Enabled'" - description: "Turns off the handwriting recognition error reporting tool. The handwriting recognition error reporting tool enables users to report errors encountered in Tablet PC Input Panel. The tool generates error reports and transmits them to Microsoft over a secure connection. Microsoft uses these error reports to improve handwriting recognition in future versions of Windows. The recommended state for this setting is: Enabled." - rationale: "A person's handwriting is Personally Identifiable Information (PII), especially when it comes to your signature. As such, it is unacceptable in many environments to automatically upload PII to a website without explicit approval by the user." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off handwriting recognition error reporting Note: This Group Policy path is provided by the Group Policy template InkWatson.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.3" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HandwritingErrorReports -> PreventHandwritingErrorReports -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HandwritingErrorReports -> !PreventHandwritingErrorReports;' - - id: 8514 - title: "Ensure 'Turn off Internet Connection Wizard if URL connection is referring to Microsoft.com' is set to 'Enabled'" - description: "This policy setting specifies whether the Internet Connection Wizard can connect to Microsoft to download a list of Internet Service Providers (ISPs). The recommended state for this setting is: Enabled." - rationale: "In an enterprise managed environment we want to lower the risk of a user unknowingly exposing sensitive data." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Internet Connection Wizard if URL connection is referring to Microsoft.com Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.4" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Internet Connection Wizard -> ExitOnMSICW -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Internet Connection Wizard -> !ExitOnMSICW;' - - id: 8515 - title: "Ensure 'Turn off Internet download for Web publishing and online ordering wizards' is set to 'Enabled'" - description: "This policy setting controls whether Windows will download a list of providers for the Web publishing and online ordering wizards. The recommended state for this setting is: Enabled." - rationale: "Although the risk is minimal, enabling this setting will reduce the possibility of a user unknowingly downloading malicious content through this feature." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Internet download for Web publishing and online ordering wizards Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.5" - - cis_csc: "7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoWebServices -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> !NoWebServices;' - - id: 8516 - title: "Ensure 'Turn off printing over HTTP' is set to 'Enabled'" - description: "This policy setting allows you to disable the client computer's ability to print over HTTP, which allows the computer to print to printers on the intranet as well as the Internet. The recommended state for this setting is: Enabled." - rationale: "Information that is transmitted over HTTP through this capability is not protected and can be intercepted by malicious users. For this reason, it is not often used in enterprise managed environments." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off printing over HTTP Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.6" - - cis_csc: "13.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers -> DisableHTTPPrinting -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers -> !DisableHTTPPrinting;' - - id: 8517 - title: "Ensure 'Turn off Registration if URL connection is referring to Microsoft.com' is set to 'Enabled'" - description: "This policy setting specifies whether the Windows Registration Wizard connects to Microsoft.com for online registration. The recommended state for this setting is: Enabled." - rationale: "Users in an enterprise managed environment should not be registering their own copies of Windows, providing their own PII in the process." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Registration if URL connection is referring to Microsoft.com Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Policies\Microsoft\Windows\Registration Wizard Control -> NoRegistration -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Policies\Microsoft\Windows\Registration Wizard Control -> !NoRegistration;' - - id: 8518 - title: "Ensure 'Turn off Search Companion content file updates' is set to 'Enabled'" - description: "This policy setting specifies whether Search Companion should automatically download content updates during local and Internet searches. The recommended state for this setting is: Enabled." - rationale: "There is a small risk that users will unknowingly reveal sensitive information because of the topics they are searching for. This risk is very low because even if this setting is enabled users still must submit search queries to the desired search engine in order to perform searches." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Search Companion content file updates Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.8" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SearchCompanion -> DisableContentFileUpdates -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SearchCompanion -> !DisableContentFileUpdates;' - - id: 8519 - title: "Ensure 'Turn off the \"Order Prints\" picture task' is set to 'Enabled'" - description: "This policy setting specifies whether the 'Order Prints Online' task is available from Picture Tasks in Windows folders. The Order Prints Online Wizard is used to download a list of providers and allow users to order prints online. The recommended state for this setting is: Enabled" - rationale: "In an enterprise managed environment we want to lower the risk of a user unknowingly exposing sensitive data." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the 'Order Prints' picture task Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.9" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoOnlinePrintsWizard -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> !NoOnlinePrintsWizard;' - - id: 8520 - title: "Ensure 'Turn off the \"Publish to Web\" task for files and folders' is set to 'Enabled'" - description: "This policy setting specifies whether the tasks Publish this file to the Web, Publish this folder to the Web, and Publish the selected items to the Web are available from File and Folder Tasks in Windows folders. The recommended state for this setting is: Enabled." - rationale: "Users may publish confidential or sensitive information to a public service outside of the control of the organization." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the 'Publish to Web' task for files and folders Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.10" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoPublishingWizard -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> !NoPublishingWizard;' - - id: 8521 - title: "Ensure 'Turn off the Windows Messenger Customer Experience Improvement Program' is set to 'Enabled'" - description: "This policy setting specifies whether Windows Messenger can collect anonymous information about how the Windows Messenger software and service is used. Microsoft uses information collected through the Customer Experience Improvement Program to detect software flaws so that they can be corrected more quickly, enabling this setting will reduce the amount of data Microsoft is able to gather for this purpose. The recommended state for this setting is: Enabled." - rationale: "Large enterprise managed environments may not want to have information collected by Microsoft from managed client computers." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the Windows Messenger Customer Experience Improvement Program Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.11" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Messenger\Client -> CEIP -> !2;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Messenger\Client -> !CEIP;' - - id: 8522 - title: "Ensure 'Turn off Windows Customer Experience Improvement Program' is set to 'Enabled'" - description: "This policy setting specifies whether Windows Messenger can collect anonymous information about how the Windows Messenger software and service is used. Microsoft uses information collected through the Windows Customer Experience Improvement Program to detect software flaws so that they can be corrected more quickly, enabling this setting will reduce the amount of data Microsoft is able to gather for this purpose. The recommended state for this setting is: Enabled." - rationale: "Large enterprise managed environments may not want to have information collected by Microsoft from managed client computers." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Windows Customer Experience Improvement Program Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.12" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SQMClient\Windows -> CEIPEnable -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SQMClient\Windows -> !CEIPEnable;' - - id: 8523 - title: "Ensure 'Turn off Windows Error Reporting' is set to 'Enabled'" - description: "This policy setting controls whether or not errors are reported to Microsoft. Error Reporting is used to report information about a system or application that has failed or has stopped responding and is used to improve the quality of the product. The recommended state for this setting is: Enabled." - rationale: "If a Windows Error occurs in a secure, enterprise managed environment, the error should be reported directly to IT staff for troubleshooting and remediation. There is no benefit to the corporation to report these errors directly to Microsoft, and there is some risk of unknowingly exposing sensitive data as part of the error." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Windows Error Reporting Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.22.1.13" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> Disabled -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> !Disabled;' - - id: 8524 - title: "Ensure 'Disallow copying of user input methods to the system account for sign-in' is set to 'Enabled'" - description: "This policy prevents automatic copying of user input methods to the system account for use on the sign-in screen. The user is restricted to the set of input methods that are enabled in the system account. The recommended state for this setting is: Enabled." - rationale: "This is a way to increase the security of the system account." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Locale Services\\Disallow copying of user input methods to the system account for sign-in Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Globalization.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.26.1" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Control Panel\International -> BlockUserInputMethodsForSignIn -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Control Panel\International -> !BlockUserInputMethodsForSignIn;' - - id: 8525 - title: "Ensure 'Require a password when a computer wakes (on battery)' is set to 'Enabled'" - description: "Specifies whether or not the user is prompted for a password when the system resumes from sleep. The recommended state for this setting is: Enabled." - rationale: "Enabling this setting ensures that anyone who wakes an unattended computer from sleep state will have to provide logon credentials before they can access the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Power Management\\Sleep Settings\\Require a password when a computer wakes (on battery) Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Power.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.33.6.1" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\0e796bdb-100d-47d6-a2d5-f7d2daa51f51 -> DCSettingIndex -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\0e796bdb-100d-47d6-a2d5-f7d2daa51f51 -> !DCSettingIndex;' - - id: 8526 - title: "Ensure 'Require a password when a computer wakes (plugged in)' is set to 'Enabled'" - description: "Specifies whether or not the user is prompted for a password when the system resumes from sleep. The recommended state for this setting is: Enabled." - rationale: "Enabling this setting ensures that anyone who wakes an unattended computer from sleep state will have to provide logon credentials before they can access the system. " - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Power Management\\Sleep Settings\\Require a password when a computer wakes (plugged in) Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Power.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.33.6.2" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\0e796bdb-100d-47d6-a2d5-f7d2daa51f51 -> ACSettingIndex -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\0e796bdb-100d-47d6-a2d5-f7d2daa51f51 -> !ACSettingIndex;' - - id: 8527 - title: "Ensure 'Microsoft Support Diagnostic Tool: Turn on MSDT interactive communication with support provider' is set to 'Disabled'" - description: "This policy setting configures Microsoft Support Diagnostic Tool (MSDT) interactive communication with the support provider. MSDT gathers diagnostic data for analysis by support professionals. The recommended state for this setting is: Disabled." - rationale: "Due to privacy concerns, data should never be sent to any 3rd party since this data could contain sensitive information. " - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Troubleshooting and Diagnostics\\Microsoft Support Diagnostic Tool\\Microsoft Support Diagnostic Tool: Turn on MSDT interactive communication with support provider Note: This Group Policy path may not exist by default. It is provided by the Group Policy template MSDT.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.44.5.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\ScriptedDiagnosticsProvider\Policy -> DisableQueryRemoteServer -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\ScriptedDiagnosticsProvider\Policy -> !DisableQueryRemoteServer;' - - id: 8528 - title: "Ensure 'Enable/Disable PerfTrack' is set to 'Disabled'" - description: "This policy setting specifies whether to enable or disable tracking of responsiveness events. The recommended state for this setting is: Disabled." - rationale: "When enabled the aggregated data of a given event will be transmitted to Microsoft. The option exists to restrict this feature for a specific user, set the consent level, and designate specific programs for which error reports could be sent. However, centrally restricting the ability to execute PerfTrack to limit the potential for unauthorized or undesired usage, data leakage, or unintentional communications is highly recommended." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Troubleshooting and Diagnostics\\Windows Performance PerfTrack\\Enable/Disable PerfTrack Note: This Group Policy path may not exist by default. It is provided by the Group Policy template PerformancePerftrack.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.8.44.11.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WDI\{9c5a40da-b965-4fc3-8781-88dd50a6299d} -> ScenarioExecutionEnabled -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WDI\{9c5a40da-b965-4fc3-8781-88dd50a6299d} -> !ScenarioExecutionEnabled;' - - id: 8529 - title: "Ensure 'Turn off the advertising ID' is set to 'Enabled'" - description: "This policy setting turns off the advertising ID, preventing apps from using the ID for experiences across apps. The recommended state for this setting is: Enabled." - rationale: "Tracking user activity for advertising purposes, even anonymously, may be a privacy concern. In an enterprise managed environment, applications should not need or require tracking for targeted advertising." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\User Profiles\\Turn off the advertising ID Note: This Group Policy path may not exist by default. It is provided by the Group Policy template UserProfiles.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.8.46.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo -> DisabledByGroupPolicy -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo -> !DisabledByGroupPolicy;' - - id: 8530 - title: "Ensure 'Enable Windows NTP Client' is set to 'Enabled'" - description: "This policy setting specifies whether the Windows NTP Client is enabled. Enabling the Windows NTP Client allows your computer to synchronize its computer clock with other NTP servers. You might want to disable this service if you decide to use a third-party time provider. The recommended state for this setting is: Enabled." - rationale: "A reliable and accurate account of time is important for a number of services and security requirements, including but not limited to distributed applications, authentication services, multi-user databases and logging services. The use of an NTP client (with secure operation) establishes functional accuracy and is a focal point when reviewing security relevant events" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Windows Time Service\\Time Providers\\Enable Windows NTP Client Note: This Group Policy path is provided by the Group Policy template W32Time.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.49.1.1" - - cis_csc: "6.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\W32Time\TimeProviders\NtpClient -> Enabled -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\W32Time\TimeProviders\NtpClient -> !Enabled;' -# Section 18.9 - System - - id: 8531 - title: "Ensure 'Turn off location' is set to 'Enabled'" - description: "This policy setting turns off the location feature for the computer. The recommended state for this setting is: Enabled." - rationale: "This setting affects the location feature (e.g. GPS or other location tracking). From a security perspective, it’s not a good idea to reveal your location to software in most cases, but there are legitimate uses, such as mapping software. However, they should not be used in high security environments." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Location and Sensors\\Turn off location Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Sensors.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.9.39.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors -> DisableLocation -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors -> !DisableLocation;' - - id: 8532 - title: "Ensure 'Restrict Remote Desktop Services users to a single Remote Desktop Services session' is set to 'Enabled'" - description: "This policy setting allows you to restrict users to a single Remote Desktop Services session. The recommended state for this setting is: Enabled." - rationale: "This setting ensures that users & administrators who Remote Desktop to a server will continue to use the same session - if they disconnect and reconnect, they will go back to the same session they were using before, preventing the creation of a second simultaneous session. This both prevents unnecessary resource usage by having the server host unnecessary additional sessions (which would put extra load on the server) and also ensures a consistency of experience for the user." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Connections\\Restrict Remote Desktop Services users to a single Remote Desktop Services session Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Restrict Terminal Services users to a single remote session, but it was renamed starting with the Windows 7 & Server 2008 R2 Administrative Templates." - compliance: - - cis: "18.9.58.3.2.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fSingleSessionPerUser -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fSingleSessionPerUser;' - - id: 8533 - title: "Ensure 'Do not allow COM port redirection' is set to 'Enabled'" - description: "This policy setting specifies whether to prevent the redirection of data to client COM ports from the remote computer in a Remote Desktop Services session. The recommended state for this setting is: Enabled." - rationale: "In a more security-sensitive environment, it is desirable to reduce the possible attack surface. The need for COM port redirection within a Remote Desktop session is very rare, so makes sense to reduce the number of unexpected avenues for data exfiltration and/or malicious code transfer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow COM port redirection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.3.1" - - cis_csc: "9.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableCcm -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fDisableCcm;' - - id: 8534 - title: "Ensure 'Do not allow LPT port redirection' is set to 'Enabled'" - description: "This policy setting specifies whether to prevent the redirection of data to client LPT ports during a Remote Desktop Services session. The recommended state for this setting is: Enabled." - rationale: "In a more security-sensitive environment, it is desirable to reduce the possible attack surface. The need for LPT port redirection within a Remote Desktop session is very rare, so makes sense to reduce the number of unexpected avenues for data exfiltration and/or malicious code transfer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow LPT port redirection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.3.3" - - cis_csc: "9.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableLPT -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fDisableLPT;' - - id: 8535 - title: "Ensure 'Do not allow supported Plug and Play device redirection' is set to 'Enabled'" - description: "This policy setting allows you to control the redirection of supported Plug and Play devices, such as Windows Portable Devices, to the remote computer in a Remote Desktop Services session. The recommended state for this setting is: Enabled." - rationale: "In a more security-sensitive environment, it is desirable to reduce the possible attack surface. The need for Plug and Play device redirection within a Remote Desktop session is very rare, so makes sense to reduce the number of unexpected avenues for data exfiltration and/or malicious code transfer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow supported Plug and Play device redirection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.3.4" - - cis_csc: "9.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisablePNPRedir -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fDisablePNPRedir;' - - id: 8536 - title: "Ensure 'Set time limit for active but idle Remote Desktop Services sessions' is set to 'Enabled: 15 minutes or less'" - description: "This policy setting allows you to specify the maximum amount of time that an active Remote Desktop Services session can be idle (without user input) before it is automatically disconnected. The recommended state for this setting is: Enabled: 15 minutes or less." - rationale: "This setting helps to prevent active Remote Desktop sessions from tying up the computer for long periods of time while not in use, preventing computing resources from being consumed by large numbers of inactive sessions. In addition, old, forgotten Remote Desktop sessions that are still active can cause password lockouts if the user's password has changed but the old session is still running. For systems that limit the number of connected users (e.g. servers in the default Administrative mode - 2 sessions only), other users' old but still active sessions can prevent another user from connecting, resulting in an effective denial of service." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 15 minutes or less: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Session Time Limits\\Set time limit for active but idle Remote Desktop Services sessions Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Set time limit for active but idle Terminal Services sessions, but it was renamed starting with the Windows 7 & Server 2008 R2 Administrative Templates." - compliance: - - cis: "18.9.58.3.10.1" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba2;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba3;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba4;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba5;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba6;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba7;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba8;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba9;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba\D;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbbb\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbbc\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbbd\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbbe\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbbf\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbc\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbd\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbe\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbf\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dc\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dd\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:de\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:df\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:e\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:f\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:\w\w\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !MaxIdleTime;' - - id: 8537 - title: "Ensure 'Set time limit for disconnected sessions' is set to 'Enabled: 1 minute'" - description: "This policy setting allows you to configure a time limit for disconnected Remote Desktop Services sessions. The recommended state for this setting is: Enabled: 1 minute." - rationale: "This setting helps to prevent active Remote Desktop sessions from tying up the computer for long periods of time while not in use, preventing computing resources from being consumed by large numbers of disconnected but still active sessions. In addition, old, forgotten Remote Desktop sessions that are still active can cause password lockouts if the user's password has changed but the old session is still running. For systems that limit the number of connected users (e.g. servers in the default Administrative mode - 2 sessions only), other users' old but still active sessions can prevent another user from connecting, resulting in an effective denial of service. This setting is important to ensure a disconnected session is properly terminated." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 1 minute: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Session Time Limits\\Set time limit for disconnected sessions Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.10.2" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxDisconnectionTime -> !EA60;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !MaxDisconnectionTime;' - - id: 8538 - title: "Ensure 'Set what information is shared in Search' is set to 'Enabled: Anonymous info'" - description: "Various levels of information can be shared with Bing in Search, to include user information and location. Configuring this setting prevents users from selecting the level of information shared and enables the most restrictive selection. The recommended state for this setting is: Enabled: Anonymous info." - rationale: "Limiting the search information shared with Microsoft Bing enhances privacy and security." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Anonymous info: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Set what information is shared in Search Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Search.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.9.60.3" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> ConnectedSearchPrivacy -> !3;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> !ConnectedSearchPrivacy;' - - id: 8539 - title: "Ensure 'Turn off KMS Client Online AVS Validation' is set to 'Enabled'" - description: "The Key Management Service (KMS) is a Microsoft license activation method that entails setting up a local server to store the software licenses. The KMS server itself needs to connect to Microsoft to activate the KMS service, but subsequent on-network clients can activate Microsoft Windows OS and/or their Microsoft Office via the KMS server instead of connecting directly to Microsoft. This policy setting lets you opt-out of sending KMS client activation data to Microsoft automatically. The recommended state for this setting is: Enabled." - rationale: "Even though the KMS licensing method does not require KMS clients to connect to Microsoft, they still send KMS client activation state data to Microsoft automatically. Preventing this information from being sent can help reduce privacy concerns in high security environments." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Software Protection Platform\\Turn off KMS Client Online AVS Validation Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AVSValidationGP.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." - compliance: - - cis: "18.9.65.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform -> NoGenTicket -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform -> !NoGenTicket;' - - id: 8540 - title: "Ensure 'Join Microsoft MAPS' is set to 'Disabled'" - description: "This policy setting allows you to join Microsoft Active Protection Service (MAPS), which Microsoft has now renamed to 'Windows Defender Antivirus Cloud Protection Service'. Microsoft MAPS / Windows Defender Antivirus Cloud Protection Service is the online community that helps you choose how to respond to potential threats. The community also helps stop the spread of new malicious software infections. You can choose to send basic or additional information about detected software. Additional information helps Microsoft create new definitions and help it to protect your computer. Possible options are:  - (0x0) Disabled (default)  - (0x1) Basic membership  - (0x2) Advanced membership Basic membership will send basic information to Microsoft about software that has been detected including where the software came from the actions that you apply or that are applied automatically and whether the actions were successful. Advanced membership in addition to basic information will send more information to Microsoft about malicious software spyware and potentially unwanted software including the location of the software file names how the software operates and how it has impacted your computer. The recommended state for this setting is: Disabled." - rationale: "The information that would be sent can include things like location of detected items on your computer if harmful software was removed. The information would be automatically collected and sent. In some instances personal information might unintentionally be sent to Microsoft. However, Microsoft states that it will not use this information to identify you or contact you. For privacy reasons in high security environments, it is best to prevent these data submissions altogether." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\MAPS\\Join Microsoft MAPS Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsDefender.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.9.76.3.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet -> SpynetReporting -> !0;' - - id: 8541 - title: "Ensure 'Prevent Internet Explorer security prompt for Windows Installer scripts' is set to 'Disabled'" - description: "This policy setting controls whether Web-based programs are allowed to install software on the computer without notifying the user. The recommended state for this setting is: Disabled." - rationale: "Suppressing the system warning can pose a security risk and increase the attack surface on the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Prevent Internet Explorer security prompt for Windows Installer scripts Note: This Group Policy path is provided by the Group Policy template MSI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Disable IE security prompt for Windows Installer scripts, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.85.3" - - cis_csc: "7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> SafeForScripting -> !0;' - - id: 8542 - title: "Ensure 'Allow remote server management through WinRM' is set to 'Disabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service automatically listens on the network for requests on the HTTP transport over the default HTTP port. The recommended state for this setting is: Disabled." - rationale: "Any feature is a potential avenue of attack, those that enable inbound network connections are particularly risky. Only enable the use of the Windows Remote Management (WinRM) service on trusted networks and when feasible employ additional controls such as IPsec." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow remote server management through WinRM Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Allow automatic configuration of listeners, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.97.2.2" - - cis_csc: "3.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowAutoConfig -> !0;' - - id: 8543 - title: "Ensure 'Allow Remote Shell Access' is set to 'Disabled'" - description: "This policy setting allows you to manage configuration of remote access to all supported shells to execute scripts and commands. The recommended state for this setting is: Disabled. Note: The GPME help text for this setting is incorrectly worded, implying that configuring it to Enabled will reject new Remote Shell connections, and setting it to Disabled will allow Remote Shell connections. The opposite is true (and is consistent with the title of the setting). This is a wording mistake by Microsoft in the Administrative Template." - rationale: "Any feature is a potential avenue of attack, those that enable inbound network connections are particularly risky. Only enable the use of the Windows Remote Shell on trusted networks and when feasible employ additional controls such as IPsec." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Administrative Templates\\Windows Components\\Windows Remote Shell\\Allow Remote Shell Access Note: This Group Policy path is provided by the Group Policy template WindowsRemoteShell.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.98.1" - - cis_csc: "3.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service\WinRS -> AllowRemoteShellAccess -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service\WinRS -> !AllowRemoteShellAccess;' diff --git a/sca/windows/cis_win2012r2_memberL1.yml b/sca/windows/cis_win2012r2_memberL1.yml new file mode 100644 index 000000000..4abe8ab0b --- /dev/null +++ b/sca/windows/cis_win2012r2_memberL1.yml @@ -0,0 +1,2310 @@ +# Security Configuration Assessment +# CIS Checks for Windows 2012 R2 Member Server L1 +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# +# Based on: +# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.3.0 - 03-30-2018 +# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.1.0 - 11-02-2015 +# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.0.0 - 09-30-2015 + +policy: + id: "cis_win2012r2_memberL1" + file: "cis_win2012r2_memberL1.yml" + name: "CIS benchmark for Windows 2012 R2 Member Server L1" + description: "This document provides prescriptive guidance for establishing a secure configuration posture for Microsoft Windows Server 2012 R2." + references: + - https://www.cisecurity.org/cis-benchmarks/ + +requirements: + title: "Check that the Windows platform is Windows Server 2012 R2" + description: "Requirements for running the CIS benchmark Member Server L1 under Windows Server 2012 R2" + condition: all + rules: + - 'r:HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion -> ProductName -> r:^Windows Server 2012 R2' + +checks: + +# Section 1.1 - Password Policies + - id: 12000 + title: "Ensure 'Maximum password age' is set to '60 or fewer days, but not 0'" + description: "This policy setting defines how long a user can use their password before it expires. Values for this policy setting range from 0 to 999 days. If you set the value to 0, the password will never expire. Because attackers can crack passwords, the more frequently you change the password the less opportunity an attacker has to use a cracked password. However, the lower this value is set, the higher the potential for an increase in calls to help desk support due to users having to change their password or forgetting which password is current. The recommended state for this setting is 60 or fewer days, but not 0." + rationale: "The longer a password exists the higher the likelihood that it will be compromised by a brute force attack, by an attacker gaining general knowledge about the user, or by the user sharing the password. Configuring the Maximum password age setting to 0 so that users are never required to change their passwords is a major security risk because that allows a compromised password to be used by the malicious user for as long as the valid user is authorized access." + remediation: "To establish the recommended configuration via GP, set the following UI path to 60 or fewer days, but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Account Policies\\Password Policy\\Maximum password age." + compliance: + - cis: ["1.1.2"] + - cis_csc: ["16.5"] + references: + - 'CCE-37167-4' + condition: all + rules: + - 'not r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> 0' + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> n:^(\d+) compare <= 60' + +# Section 2.3 - Security Options + - id: 12001 + title: "Ensure 'Accounts: Block Microsoft accounts' is set to 'Users can't add or log on with Microsoft accounts" + description: "This policy setting prevents users from adding new Microsoft accounts on this computer. The recommended state for this setting is: Users can't add or log on with Microsoft accounts." + rationale: "Organizations that want to effectively implement identity management policies and maintain firm control of what accounts are used to log onto their computers will probably want to block Microsoft accounts. Organizations may also need to block Microsoft accounts in order to meet the requirements of compliance standards that apply to their information systems." + remediation: "To establish the recommended configuration via GP, set the following UI path to Users can't add or log on with Microsoft accounts : Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Accounts: Block Microsoft accounts." + compliance: + - cis: ["2.3.1.2"] + - cis_csc: ["16"] + references: + - 'CCE-36147-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> NoConnectedUser -> 3' + + - id: 12002 + title: "Ensure 'Accounts: Limit local account use of blank passwords to console logon only' is set to 'Enabled'" + description: "This policy setting determines whether local accounts that are not password protected can be used to log on from locations other than the physical computer console. If you enable this policy setting, local accounts that have blank passwords will not be able to log on to the network from remote client computers. Such accounts will only be able to log on at the keyboard of the computer. The recommended state for this setting is: Enabled." + rationale: "Blank passwords are a serious threat to computer security and should be forbidden through both organizational policy and suitable technical measures. In fact, the default settings for Active Directory domains require complex passwords of at least seven characters. However, if users with the ability to create new accounts bypass your domain-based password policies, they could create accounts with blank passwords. For example, a user could build a stand-alone computer, create one or more accounts with blank passwords, and then join the computer to the domain. The local accounts with blank passwords would still function. Anyone who knows the name of one of these unprotected accounts could then use it to log on." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Accounts: Limit local account use of blank passwords to console logon only." + compliance: + - cis: ["2.3.1.4"] + - cis_csc: ["16"] + references: + - 'CCE-37615-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LimitBlankPasswordUse -> 1' + + - id: 12003 + title: "Ensure 'Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings' is set to 'Enabled'" + description: "This policy setting allows administrators to enable the more precise auditing capabilities present in Windows Vista. The Audit Policy settings available in Windows Server 2003 Active Directory do not yet contain settings for managing the new auditing subcategories. To properly apply the auditing policies prescribed in this baseline, the Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings setting needs to be configured to Enabled. The recommended state for this setting is: Enabled. *Important*: Be very cautious about audit settings that can generate a large volume of traffic. For example, if you enable either success or failure auditing for all of the Privilege Use subcategories, the high volume of audit events generated can make it difficult to find other types of entries in the Security log. Such a configuration could also have a significant impact on system performance." + rationale: "Prior to the introduction of auditing subcategories in Windows Vista, it was difficult to track events at a per-system or per-user level. The larger event categories created too many events and the key information that needed to be audited was difficult to find." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings." + compliance: + - cis: ["2.3.2.1"] + - cis_csc: ["6.2"] + references: + - 'CCE-37850-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> SCENoApplyLegacyAuditPolicy -> 1' + + - id: 12004 + title: "Ensure 'Audit: Shut down system immediately if unable to log security audits' is set to 'Disabled'" + description: "This policy setting determines whether the system shuts down if it is unable to log Security events. It is a requirement for Trusted Computer System Evaluation Criteria (TCSEC)-C2 and Common Criteria certification to prevent auditable events from occurring if the audit system is unable to log them. Microsoft has chosen to meet this requirement by halting the system and displaying a stop message if the auditing system experiences a failure. When this policy setting is enabled, the system will be shut down if a security audit cannot be logged for any reason. If the Audit: Shut down system immediately if unable to log security audits setting is enabled, unplanned system failures can occur. The administrative burden can be significant, especially if you also configure the Retention method for the Security log to Do not overwrite events (clear log manually). This configuration causes a repudiation threat (a backup operator could deny that they backed up or restored data) to become a denial of service (DoS) vulnerability, because a server could be forced to shut down if it is overwhelmed with logon events and other security events that are written to the Security log. Also, because the shutdown is not graceful, it is possible that irreparable damage to the operating system, applications, or data could result. Although the NTFS file system guarantees its integrity when an ungraceful computer shutdown occurs, it cannot guarantee that every data file for every application will still be in a usable form when the computer restarts. The recommended state for this setting is: Disabled." + rationale: "If the computer is unable to record events to the Security log, critical evidence or important troubleshooting information may not be available for review after a security incident. Also, an attacker could potentially generate a large volume of Security log events to purposely force a computer shutdown." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Audit: Shut down system immediately if unable to log security audits." + default_value: "Disabled." + compliance: + - cis: ["2.3.2.2"] + - cis_csc: ["6"] + references: + - 'CCE-35907-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> CrashOnAuditFail -> 0' + + - id: 12005 + title: "Ensure 'Devices: Allowed to format and eject removable media' is set to 'Administrators'" + description: "This policy setting determines who is allowed to format and eject removable NTFS media. You can use this policy setting to prevent unauthorized users from removing data on one computer to access it on another computer on which they have local administrator privileges. The recommended state for this setting is: Administrators." + rationale: "Users may be able to move data on removable disks to a different computer where they have administrative privileges. The user could then take ownership of any file, grant themselves full control, and view or modify any file. The fact that most removable storage devices will eject media by pressing a mechanical button diminishes the advantage of this policy setting." + remediation: "To establish the recommended configuration via GP, set the following UI path to Administrators: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Devices: Allowed to format and eject removable media." + compliance: + - cis: ["2.3.4.1"] + - cis_csc: ["5.1"] + references: + - 'CCE-37701-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> AllocateDASD -> 0' + + - id: 12006 + title: "Ensure 'Devices: Prevent users from installing printer drivers' is set to 'Enabled'" + description: "For a computer to print to a shared printer, the driver for that shared printer must be installed on the local computer. This security setting determines who is allowed to install a printer driver as part of connecting to a shared printer. The recommended state for this setting is: Enabled. Note: This setting does not affect the ability to add a local printer. This setting does not affect Administrators." + rationale: "It may be appropriate in some organizations to allow users to install printer drivers on their own workstations. However, you should allow only Administrators, not users, to do so on servers, because printer driver installation on a server may unintentionally cause the computer to become less stable. A malicious user could install inappropriate printer drivers in a deliberate attempt to damage the computer, or a user might accidentally install malicious software that masquerades as a printer driver. It is feasible for an attacker to disguise a Trojan horse program as a printer driver. The program may appear to users as if they must use it to print, but such a program could unleash malicious code on your computer network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Devices: Prevent users from installing printer drivers." + compliance: + - cis: ["2.3.4.2"] + - cis_csc: ["5.1"] + references: + - 'CCE-37942-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Providers\LanMan Print Services\Servers -> AddPrinterDrivers -> 1' + + - id: 12007 + title: "Ensure 'Domain member: Digitally encrypt or sign secure channel data (always)' is set to 'Enabled'" + description: "This policy setting determines whether all secure channel traffic that is initiated by the domain member must be signed or encrypted. The recommended state for this setting is: Enabled." + rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated-and sensitive information such as passwords are encrypted-but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally encrypt or sign secure channel data (always)." + compliance: + - cis: ["2.3.6.1"] + - cis_csc: ["13"] + references: + - 'CCE-36142-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> RequireSignOrSeal -> 1' + + - id: 12008 + title: "Ensure 'Domain member: Digitally encrypt secure channel data (when possible)' is set to 'Enabled'" + description: "This policy setting determines whether a domain member should attempt to negotiate encryption for all secure channel traffic that it initiates. The recommended state for this setting is: Enabled." + rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated-and sensitive information such as passwords are encrypted-but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally encrypt secure channel data (when possible)." + compliance: + - cis: ["2.3.6.2"] + - cis_csc: ["13"] + references: + - 'CCE-37130-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> SealSecureChannel -> 1' + + - id: 12009 + title: "Ensure 'Domain member: Digitally sign secure channel data (when possible)' is set to 'Enabled'" + description: "This policy setting determines whether a domain member should attempt to negotiate whether all secure channel traffic that it initiates must be digitally signed. Digital signatures protect the traffic from being modified by anyone who captures the data as it traverses the network. The recommended state for this setting is: Enabled." + rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated-and sensitive information such as passwords are encrypted-but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally sign secure channel data (when possible)." + compliance: + - cis: ["2.3.6.3"] + - cis_csc: ["13"] + references: + - 'CCE-37222-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> SignSecureChannel -> 1' + + - id: 12010 + title: "Ensure 'Domain member: Disable machine account password changes' is set to 'Disabled'" + description: "This policy setting determines whether a domain member can periodically change its computer account password. Computers that cannot automatically change their account passwords are potentially vulnerable, because an attacker might be able to determine the password for the system's domain account. The recommended state for this setting is: Disabled." + rationale: "The default configuration for Windows Server 2003-based computers that belong to a domain is that they are automatically required to change the passwords for their accounts every 30 days. If you disable this policy setting, computers that run Windows Server 2003 will retain the same passwords as their computer accounts. Computers that are no longer able to automatically change their account password are at risk from an attacker who could determine the password for the computer's domain account." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Disable machine account password changes." + compliance: + - cis: ["2.3.6.4"] + - cis_csc: ["16"] + references: + - 'CCE-37508-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> DisablePasswordChange -> 0' + + - id: 12011 + title: "Ensure 'Domain member: Require strong (Windows 2000 or later) session key' is set to 'Enabled'" + description: "When this policy setting is enabled, a secure channel can only be established with Domain Controllers that are capable of encrypting secure channel data with a strong (128-bit) session key. To enable this policy setting, all Domain Controllers in the domain must be able to encrypt secure channel data with a strong key, which means all Domain Controllers must be running Microsoft Windows 2000 or newer. The recommended state for this setting is: Enabled." + rationale: "Session keys that are used to establish secure channel communications between Domain Controllers and member computers are much stronger in Windows 2000 than they were in previous Microsoft operating systems. Whenever possible, you should take advantage of these stronger session keys to help protect secure channel communications from attacks that attempt to hijack network sessions and eavesdropping. (Eavesdropping is a form of hacking in which network data is read or altered in transit. The data can be modified to hide or change the sender, or be redirected)." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Require strong (Windows 2000 or later) session key." + compliance: + - cis: ["2.3.6.6"] + - cis_csc: ["13"] + references: + - 'CCE-37614-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> RequireStrongKey -> 1' + + - id: 12012 + title: "Ensure 'Interactive logon: Do not display last user name' is set to 'Enabled'" + description: "This policy setting determines whether the account name of the last user to log on to the client computers in your organization will be displayed in each computer's respective Windows logon screen. Enable this policy setting to prevent intruders from collecting account names visually from the screens of desktop or laptop computers in your organization. The recommended state for this setting is: Enabled." + rationale: "An attacker with access to the console (for example, someone with physical access or someone who is able to connect to the server through Remote Desktop Services) could view the name of the last user who logged on to the server. The attacker could then try to guess the password, use a dictionary, or use a brute-force attack to try and log on." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Do not display last user name." + compliance: + - cis: ["2.3.7.1"] + - cis_csc: ["13"] + references: + - 'CCE-36056-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> DontDisplayLastUserName -> 1' + + - id: 12013 + title: "Ensure 'Interactive logon: Do not require CTRL+ALT+DEL' is set to 'Disabled'" + description: "This policy setting determines whether users must press CTRL+ALT+DEL before they log on. The recommended state for this setting is: Disabled." + rationale: "Microsoft developed this feature to make it easier for users with certain types of physical impairments to log on to computers that run Windows. If users are not required to press CTRL+ALT+DEL, they are susceptible to attacks that attempt to intercept their passwords. If CTRL+ALT+DEL is required before logon, user passwords are communicated by means of a trusted path. An attacker could install a Trojan horse program that looks like the standard Windows logon dialog box and capture the user's password. The attacker would then be able to log on to the compromised account with whatever level of privilege that user has." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Do not require CTRL+ALT+DEL" + compliance: + - cis: ["2.3.7.2"] + - cis_csc: ["8"] + references: + - 'CCE-37637-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> DisableCAD -> 0' + + - id: 12014 + title: "Ensure 'Interactive logon: Machine inactivity limit' is set to '900 or fewer second(s), but not 0'" + description: "Windows notices inactivity of a logon session, and if the amount of inactive time exceeds the inactivity limit, then the screen saver will run, locking the session. The recommended state for this setting is: 900 or fewer second(s), but not 0. Note: A value of 0 does not conform to the benchmark as it disables the machine inactivity limit." + rationale: "If a user forgets to lock their computer when they walk away it's possible that a passerby will hijack it." + remediation: "To establish the recommended configuration via GP, set the following UI path to 900 or fewer seconds, but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Machine inactivity limit." + compliance: + - cis: ["2.3.7.3"] + - cis_csc: ["16.5"] + references: + - 'CCE-38235-8' + condition: all + rules: + - 'not r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 0' + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> n:^(\d+) compare <= 900' + + - id: 12015 + title: "Ensure 'Interactive logon: Prompt user to change password before expiration' is set to 'between 5 and 14 days'" + description: "This policy setting determines how far in advance users are warned that their password will expire. It is recommended that you configure this policy setting to at least 5 days but no more than 14 days to sufficiently warn users when their passwords will expire. The recommended state for this setting is: between 5 and 14 days." + rationale: "It is recommended that user passwords be configured to expire periodically. Users will need to be warned that their passwords are going to expire, or they may inadvertently be locked out of the computer when their passwords expire. This condition could lead to confusion for users who access the network locally, or make it impossible for users to access your organization's network through dial-up or virtual private network (VPN) connections." + remediation: "To establish the recommended configuration via GP, set the following UI path to a value between 5 and 14 days: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Prompt user to change password before expiration." + compliance: + - cis: ["2.3.7.7"] + - cis_csc: ["16"] + references: + - 'CCE-37622-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> n:^(\d+) compare >= 5' + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> n:^(\d+) compare <= 14' + + - id: 12016 + title: "Ensure 'Interactive logon: Require Domain Controller Authentication to unlock workstation' is set to 'Enabled'" + description: "Logon information is required to unlock a locked computer. For domain accounts, this security setting determines whether it is necessary to contact a Domain Controller to unlock a computer. The recommended state for this setting is: Enabled." + rationale: "By default, the computer caches in memory the credentials of any users who are authenticated locally. The computer uses these cached credentials to authenticate anyone who attempts to unlock the console. When cached credentials are used, any changes that have recently been made to the account - such as user rights assignments, account lockout, or the account being disabled - are not considered or applied after the account is authenticated. User privileges are not updated, and (more importantly) disabled accounts are still able to unlock the console of the computer." + remediation: "To implement the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Require Domain Controller Authentication to unlock workstation." + compliance: + - cis: ["2.3.7.8"] + - cis_csc: ["16.9"] + references: + - 'CCE-38240-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ForceUnlockLogon -> 1' + + - id: 12017 + title: "Ensure 'Interactive logon: Smart card removal behavior' is set to 'Lock Workstation' or higher" + description: "This policy setting determines what happens when the smart card for a logged-on user is removed from the smart card reader. The recommended state for this setting is: Lock Workstation. Configuring this setting to Force Logoff or Disconnect if a Remote Desktop Services session also conforms to the benchmark." + rationale: "Users sometimes forget to lock their workstations when they are away from them, allowing the possibility for malicious users to access their computers. If smart cards are used for authentication, the computer should automatically lock itself when the card is removed to ensure that only the user with the smart card is accessing resources using those credentials." + remediation: "To establish the recommended configuration via GP, set the following UI path to Lock Workstation (or, if applicable for your environment, Force Logoff or Disconnect if a Remote Desktop Services session): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Smart card removal behavior." + compliance: + - cis: ["2.3.7.9"] + - cis_csc: ["16.5"] + references: + - 'CCE-38333-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScRemoveOption -> r:^1$|^2$|^3$' + + - id: 12018 + title: "Ensure 'Microsoft network client: Digitally sign communications (always)' is set to 'Enabled'" + description: "This policy setting determines whether packet signing is required by the SMB client component. Note: When Windows Vista-based computers have this policy setting enabled and they connect to file or print shares on remote servers, it is important that the setting is synchronized with its companion setting, Microsoft network server: Digitally sign communications (always), on those servers. For more information about these settings, see the 'Microsoft network client and server: Digitally sign communications (four related settings)' section in Chapter 5 of the Threats and Countermeasures guide. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Digitally sign communications (always)." + compliance: + - cis: ["2.3.8.1"] + - cis_csc: ["13"] + references: + - 'CCE-36325-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> RequireSecuritySignature -> 1' + + - id: 12019 + title: "Ensure 'Microsoft network client: Digitally sign communications (if server agrees)' is set to 'Enabled'" + description: "This policy setting determines whether the SMB client will attempt to negotiate SMB packet signing. Note: Enabling this policy setting on SMB clients on your network makes them fully effective for packet signing with all clients and servers in your environment. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Digitally sign communications (if server agrees)." + compliance: + - cis: ["2.3.8.2"] + - cis_csc: ["13"] + references: + - 'CCE-36269-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> EnableSecuritySignature -> 1' + + - id: 12020 + title: "Ensure 'Microsoft network client: Send unencrypted password to third-party SMB servers' is set to 'Disabled'" + description: "This policy setting determines whether the SMB redirector will send plaintext passwords during authentication to third-party SMB servers that do not support password encryption. It is recommended that you disable this policy setting unless there is a strong business case to enable it. If this policy setting is enabled, unencrypted passwords will be allowed across the network. The recommended state for this setting is: Disabled." + rationale: "If you enable this policy setting, the server can transmit passwords in plaintext across the network to other computers that offer SMB services, which is a significant security risk. These other computers may not use any of the SMB security mechanisms that are included with Windows Server 2003." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Send unencrypted password to third-party SMB servers." + compliance: + - cis: ["2.3.8.3"] + - cis_csc: ["13"] + references: + - 'CCE-37863-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> EnablePlainTextPassword -> 0' + + - id: 12021 + title: "Ensure 'Microsoft network server: Amount of idle time required before suspending session' is set to '15 or fewer minute(s), but not 0'" + description: "This policy setting allows you to specify the amount of continuous idle time that must pass in an SMB session before the session is suspended because of inactivity. Administrators can use this policy setting to control when a computer suspends an inactive SMB session. If client activity resumes, the session is automatically reestablished. A value of 0 appears to allow sessions to persist indefinitely. The maximum value is 99999, which is over 69 days; in effect, this value disables the setting. The recommended state for this setting is: 15 or fewer minute(s), but not 0." + rationale: "Each SMB session consumes server resources, and numerous null sessions will slow the server or possibly cause it to fail. An attacker could repeatedly establish SMB sessions until the server's SMB services become slow or unresponsive." + remediation: "To establish the recommended configuration via GP, set the following UI path to 15 or fewer minute(s), but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Amount of idle time required before suspending session." + compliance: + - cis: ["2.3.9.1"] + - cis_csc: ["3"] + references: + - 'CCE-38046-9' + condition: all + rules: + - 'not r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> 0' + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> n:^(\d+) compare <= 15' + + - id: 12022 + title: "Ensure 'Microsoft network server: Digitally sign communications (always)' is set to 'Enabled'" + description: "This policy setting determines whether packet signing is required by the SMB server component. Enable this policy setting in a mixed environment to prevent downstream clients from using the workstation as a network server. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Digitally sign communications (always)." + compliance: + - cis: ["2.3.9.2"] + - cis_csc: ["13"] + references: + - 'CCE-37864-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> RequireSecuritySignature -> 1' + + - id: 12023 + title: "Ensure 'Microsoft network server: Digitally sign communications (if client agrees)' is set to 'Enabled'" + description: "This policy setting determines whether the SMB server will negotiate SMB packet signing with clients that request it. If no signing request comes from the client, a connection will be allowed without a signature if the Microsoft network server: Digitally sign communications (always) setting is not enabled. Note: Enable this policy setting on SMB clients on your network to make them fully effective for packet signing with all clients and servers in your environment. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Digitally sign communications (if client agrees)." + compliance: + - cis: ["2.3.9.3"] + - cis_csc: ["13"] + references: + - 'CCE-35988-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> EnableSecuritySignature -> 1' + + - id: 12024 + title: "Ensure 'Microsoft network server: Disconnect clients when logon hours expire' is set to 'Enabled'" + description: "This security setting determines whether to disconnect users who are connected to the local computer outside their user account's valid logon hours. This setting affects the Server Message Block (SMB) component. If you enable this policy setting you should also enable Network security: Force logoff when logon hours expire (Rule 2.3.11.6). If your organization configures logon hours for users, this policy setting is necessary to ensure they are effective. The recommended state for this setting is: Enabled." + rationale: "If your organization configures logon hours for users, then it makes sense to enable this policy setting. Otherwise, users who should not have access to network resources outside of their logon hours may actually be able to continue to use those resources with sessions that were established during allowed hours." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Disconnect clients when logon hours expire." + compliance: + - cis: ["2.3.9.4"] + - cis_csc: ["16"] + references: + - 'CCE-37972-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> EnableForcedLogOff -> 1' + + - id: 12025 + title: "Ensure 'Microsoft network server: Server SPN target name validation level' is set to 'Accept if provided by client' or higher" + description: "This policy setting controls the level of validation a computer with shared folders or printers (the server) performs on the service principal name (SPN) that is provided by the client computer when it establishes a session using the server message block (SMB) protocol. The server message block (SMB) protocol provides the basis for file and print sharing and other networking operations, such as remote Windows administration. The SMB protocol supports validating the SMB server service principal name (SPN) within the authentication blob provided by a SMB client to prevent a class of attacks against SMB servers referred to as SMB relay attacks. This setting will affect both SMB1 and SMB2. The recommended state for this setting is: Accept if provided by client. Configuring this setting to Required from client also conforms to the benchmark. Note: Since the release of the MS KB3161561 security patch, this setting can cause significant issues (such as replication problems, group policy editing issues and blue screen crashes) on Domain Controllers when used simultaneously with UNC path hardening (i.e. Rule 18.5.14.1). CIS therefore recommends against deploying this setting on Domain Controllers." + rationale: "The identity of a computer can be spoofed to gain unauthorized access to network resources." + remediation: "To establish the recommended configuration via GP, set the following UI path to Accept if provided by client (configuring to Required from client also conforms to the benchmark): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Server SPN target name validation level." + compliance: + - cis: ["2.3.9.5"] + - cis_csc: ["14"] + references: + - https://support.microsoft.com/en-us/help/3161561/ms16-075-and-ms16-076-description-of-the-security-update-for-windows-n + - 'CCE-36170-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters -> SMBServerNameHardeningLevel -> n:^(\d+) compare >= 1' + + - id: 12026 + title: "Ensure 'Network access: Do not allow anonymous enumeration of SAM accounts' is set to 'Enabled'" + description: "This policy setting controls the ability of anonymous users to enumerate the accounts in the Security Accounts Manager (SAM). If you enable this policy setting, users with anonymous connections will not be able to enumerate domain account user names on the systems in your environment. This policy setting also allows additional restrictions on anonymous connections. The recommended state for this setting is: Enabled. Note: This policy has no effect on Domain Controllers." + rationale: "An unauthorized user could anonymously list account names and use the information to attempt to guess passwords or perform social engineering attacks. (Social engineering attacks try to deceive users in some way to obtain passwords or some form of security information)" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow anonymous enumeration of SAM accounts." + compliance: + - cis: ["2.3.10.2"] + - cis_csc: ["16"] + references: + - 'CCE-36316-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -> RestrictAnonymousSAM -> 1' + + - id: 12027 + title: "Ensure 'Network access: Do not allow anonymous enumeration of SAM accounts and shares' is set to 'Enabled'" + description: "This policy setting controls the ability of anonymous users to enumerate SAM accounts as well as shares. If you enable this policy setting, anonymous users will not be able to enumerate domain account user names and network share names on the systems in your environment. The recommended state for this setting is: Enabled. Note: This policy has no effect on Domain Controllers." + rationale: "An unauthorized user could anonymously list account names and shared resources and use the information to attempt to guess passwords or perform social engineering attacks. (Social engineering attacks try to deceive users in some way to obtain passwords or some form of security information)" + remediation: "To establish the recommended configuration via GP, set the following U path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow anonymous enumeration of SAM accounts and shares." + compliance: + - cis: ["2.3.10.3"] + - cis_csc: ["16"] + references: + - 'CCE-36316-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -> RestrictAnonymous -> 1' + + - id: 12028 + title: "Ensure 'Network access: Let Everyone permissions apply to anonymous users' is set to 'Disabled'" + description: "This policy setting determines what additional permissions are assigned for anonymous connections to the computer. The recommended state for this setting is: Disabled." + rationale: "An unauthorized user could anonymously list account names and shared resources and use the information to attempt to guess passwords, perform social engineering attacks, or launch DoS attacks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Let Everyone permissions apply to anonymous users." + compliance: + - cis: ["2.3.10.5"] + - cis_csc: ["14", "16"] + references: + - 'CCE-36148-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> EveryoneIncludesAnonymous -> 0' + + - id: 12029 + title: "Configure 'Network access: Named Pipes that can be accessed anonymously'" + description: "This policy setting determines which communication sessions, or pipes, will have attributes and permissions that allow anonymous access. The recommended state for this setting is: - Level 1 - Domain Controller. The recommended state for this setting is: LSARPC, NETLOGON, SAMR and (when the legacy Computer Browser service is enabled) BROWSER. - Level 1 - Member Server. The recommended state for this setting is: (i.e. None), or (when the legacy Computer Browser service is enabled) BROWSER. Note: A Member Server that holds the Remote Desktop Services Role with Remote Desktop Licensing Role Service will require a special exception to this recommendation, to allow the HydraLSPipe and TermServLicensing Named Pipes to be accessed anonymously." + rationale: "Limiting named pipes that can be accessed anonymously will reduce the attack surface of the system." + remediation: "To establish the recommended configuration via GP, configure the following UI path: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Named Pipes that can be accessed anonymously." + compliance: + - cis: ["2.3.10.6"] + - cis_csc: ["14.1", "16"] + references: + - 'CCE-38258-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> NullSessionPipes -> r:\S*' + + - id: 12030 + title: "Configure 'Network access: Remotely accessible registry paths'" + description: "This policy setting determines which registry paths will be accessible over the network, regardless of the users or groups listed in the access control list (ACL) of the winreg registry key. Note: This setting does not exist in Windows XP. There was a setting with that name in Windows XP, but it is called 'Network access: Remotely accessible registry paths and sub- paths' in Windows Server 2003, Windows Vista, and Windows Server 2008 (non-R2). Note #2: When you configure this setting you specify a list of one or more objects. The delimiter used when entering the list is a line feed or carriage return, that is, type the first object on the list, press the Enter button, type the next object, press Enter again, etc. The setting value is stored as a comma-delimited list in group policy security templates. It is also rendered as a comma-delimited list in Group Policy Editor's display pane and the Resultant Set of Policy console. It is recorded in the registry as a line-feed delimited list in a REG_MULTI_SZ value." + rationale: "The registry is a database that contains computer configuration information, and much of the information is sensitive. An attacker could use this information to facilitate unauthorized activities. To reduce the risk of such an attack, suitable ACLs are assigned throughout the registry to help protect it from access by unauthorized users." + remediation: "To establish the recommended configuration via GP, set the following UI path to: System\\CurrentControlSet\\Control\\ProductOptions | System\\CurrentControlSet\\Control\\Server Applications | Software\\Microsoft\\Windows NT\\CurrentVersion. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Remotely accessible registry paths." + compliance: + - cis: ["2.3.10.7"] + - cis_csc: ["14", "16"] + references: + - 'CCE-37194-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedExactPaths -> Machine -> r:System\\CurrentControlSet\\Control\\ProductOptions|System\\CurrentControlSet\\Control\\Server Applications|Software\\Microsoft\\Windows NT\\CurrentVersion' + + - id: 12031 + title: "Configure 'Network access: Remotely accessible registry paths and sub-paths'" + description: "This policy setting determines which registry paths and sub-paths will be accessible over the network, regardless of the users or groups listed in the access control list (ACL) of the winreg registry key. Note: In Windows XP this setting is called 'Network access: Remotely accessible registry paths,' the setting with that same name in Windows Vista, Windows Server 2008 (non-R2), and Windows Server 2003 does not exist in Windows XP. Note #2: When you configure this setting you specify a list of one or more objects. The delimiter used when entering the list is a line feed or carriage return, that is, type the first object on the list, press the Enter button, type the next object, press Enter again, etc. The setting value is stored as a comma-delimited list in group policy security templates. It is also rendered as a comma-delimited list in Group Policy Editor's display pane and the Resultant Set of Policy console. It is recorded in the registry as a line-feed delimited list in a REG_MULTI_SZ value." + rationale: "The registry contains sensitive computer configuration information that could be used by an attacker to facilitate unauthorized activities. The fact that the default ACLs assigned throughout the registry are fairly restrictive and help to protect the registry from access by unauthorized users reduces the risk of such an attack." + remediation: "To establish the recommended configuration via GP, set the following UI path to: System\\CurrentControlSet\\Control\\Print\\Printers | System\\CurrentControlSet\\Services\\Eventlog Software\\Microsoft\\OLAP Server | Software\\Microsoft\\Windows NT\\CurrentVersion\\Print Software\\Microsoft\\Windows | NT\\CurrentVersion\\Windows System\\CurrentControlSet\\Control\\ContentIndex | System\\CurrentControlSet\\Control\\Terminal Server | System\\CurrentControlSet\\Control\\Terminal Server\\UserConfig | System\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration | Software\\Microsoft\\Windows NT\\CurrentVersion\\Perflib | System\\CurrentControlSet\\Services\\SysmonLog | Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local | Policies\\Security Options\\Network access: Remotely accessible registry paths | and sub-paths. When a server holds the Active Directory Certificate Services Role with Certification Authority Role Service, the above list should also include: System\\CurrentControlSet\\Services\\CertSvc. When a server has the WINS Server Feature installed, the above list should also include: System\\CurrentControlSet\\Services\\WINS" + compliance: + - cis: ["2.3.10.8"] + - cis_csc: ["14", "16"] + references: + - 'CCE-36347-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedPaths -> Machine -> r:Software\\Microsoft\\Windows NT\\CurrentVersion\\Print|Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows|System\\CurrentControlSet\\Control\\Print\\Printers|System\\CurrentControlSet\\Services\\Eventlog|Software\\Microsoft\\OLAP Server|System\\CurrentControlSet\\Control\\ContentIndex|System\\CurrentControlSet\\Control\\Terminal Server|System\\CurrentControlSet\\Control\\Terminal Server\\UserConfig|System\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration|Software\\Microsoft\\Windows NT\\CurrentVersion\\Perflib|System\\CurrentControlSet\\Services\\SysmonLog|System\\CurrentControlSet\\Services\\CertSvc|System\\CurrentControlSet\\Services\\WINS' + + - id: 12032 + title: "Ensure 'Network access: Restrict anonymous access to Named Pipes and Shares' is set to 'Enabled'" + description: "When enabled, this policy setting restricts anonymous access to only those shares and pipes that are named in the Network access: Named pipes that can be accessed anonymously and Network access: Shares that can be accessed anonymously settings. This policy setting controls null session access to shares on your computers by adding RestrictNullSessAccess with the value 1 in the HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\LanManServer\\Parameters registry key. This registry value toggles null session shares on or off to control whether the server service restricts unauthenticated clients' access to named resources. The recommended state for this setting is: Enabled." + rationale: "Null sessions are a weakness that can be exploited through shares (including the default shares) on computers in your environment." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Restrict anonymous access to Named Pipes and Shares." + compliance: + - cis: ["2.3.10.9"] + - cis_csc: ["14", "16"] + references: + - 'CCE-36021-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> RestrictNullSessAccess -> 1' + + - id: 12033 + title: "Ensure 'Network access: Shares that can be accessed anonymously' is set to 'None'" + description: "This policy setting determines which network shares can be accessed by anonymous users. The default configuration for this policy setting has little effect because all users have to be authenticated before they can access shared resources on the server. The recommended state for this setting is: (i.e. None)" + rationale: "It is very dangerous to allow any values in this setting. Any shares that are listed can be accessed by any network user, which could lead to the exposure or corruption of sensitive data." + remediation: "To establish the recommended configuration via GP, set the following UI path to (i.e. None): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Shares that can be accessed anonymously." + compliance: + - cis: ["2.3.10.10"] + - cis_csc: ["14", "16"] + references: + - 'CCE-38095-6' + condition: all + rules: + - 'not r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> NullSessionShares -> r:\.' + + - id: 12034 + title: "Ensure 'Network access: Sharing and security model for local accounts' is set to 'Classic - local users authenticate as themselves'" + description: "This policy setting determines how network logons that use local accounts are authenticated. The Classic option allows precise control over access to resources, including the ability to assign different types of access to different users for the same resource. The Guest only option allows you to treat all users equally. In this context, all users authenticate as Guest only to receive the same access level to a given resource. The recommended state for this setting is: Classic - local users authenticate as themselves. Note: This setting does not affect interactive logons that are performed remotely by using such services as Telnet or Remote Desktop Services (formerly called Terminal Services)" + rationale: "With the Guest only model, any user who can authenticate to your computer over the network does so with guest privileges, which probably means that they will not have write access to shared resources on that computer. Although this restriction does increase security, it makes it more difficult for authorized users to access shared resources on those computers because ACLs on those resources must include access control entries (ACEs) for the Guest account. With the Classic model, local accounts should be password protected. Otherwise, if Guest access is enabled, anyone can use those user accounts to access shared system resources." + remediation: "To establish the recommended configuration via GP, set the following UI path to Classic - local users authenticate as themselves: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Sharing and security model for local accounts." + compliance: + - cis: ["2.3.10.11"] + - cis_csc: ["14", "16"] + references: + - 'CCE-37623-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> ForceGuest -> 0' + + - id: 12035 + title: "Ensure 'Network security: Allow Local System to use computer identity for NTLM' is set to 'Enabled'" + description: "This policy setting determines whether Local System services that use Negotiate when reverting to NTLM authentication can use the computer identity. This policy is supported on at least Windows 7 or Windows Server 2008 R2. The recommended state for this setting is: Enabled." + rationale: "When connecting to computers running versions of Windows earlier than Windows Vista or Windows Server 2008 (non-R2), services running as Local System and using SPNEGO (Negotiate) that revert to NTLM use the computer identity. In Windows 7, if you are connecting to a computer running Windows Server 2008 or Windows Vista, then a system service uses either the computer identity or a NULL session. When connecting with a NULL session, a system-generated session key is created, which provides no protection but allows applications to sign and encrypt data without errors. When connecting with the computer identity, both signing and encryption is supported in order to provide data protection." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Allow Local System to use computer identity for NTLM." + compliance: + - cis: ["2.3.11.1"] + - cis_csc: ["14", "16"] + references: + - 'CCE-38341-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> UseMachineId -> 1' + + - id: 12036 + title: "Ensure 'Network security: Allow LocalSystem NULL session fallback' is set to 'Disabled'" + description: "This policy setting determines whether NTLM is allowed to fall back to a NULL session when used with LocalSystem. The recommended state for this setting is: Disabled." + rationale: "NULL sessions are less secure because by definition they are unauthenticated." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Allow LocalSystem NULL session fallback." + compliance: + - cis: ["2.3.11.2"] + - cis_csc: ["14"] + references: + - 'CCE-37035-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> allownullsessionfallback -> 0' + + - id: 12037 + title: "Ensure 'Network Security: Allow PKU2U authentication requests to this computer to use online identities' is set to 'Disabled'" + description: "This setting determines if online identities are able to authenticate to this computer. The Public Key Cryptography Based User-to-User (PKU2U) protocol introduced in Windows 7 and Windows Server 2008 R2 is implemented as a security support provider (SSP). The SSP enables peer-to-peer authentication, particularly through the Windows 7 media and file sharing feature called Homegroup, which permits sharing between computers that are not members of a domain. With PKU2U, a new extension was introduced to the Negotiate authentication package, Spnego.dll. In previous versions of Windows, Negotiate decided whether to use Kerberos or NTLM for authentication. The extension SSP for Negotiate, Negoexts.dll, which is treated as an authentication protocol by Windows, supports Microsoft SSPs including PKU2U. When computers are configured to accept authentication requests by using online IDs, Negoexts.dll calls the PKU2U SSP on the computer that is used to log on. The PKU2U SSP obtains a local certificate and exchanges the policy between the peer computers. When validated on the peer computer, the certificate within the metadata is sent to the logon peer for validation and associates the user's certificate to a security token and the logon process completes. The recommended state for this setting is: Disabled." + rationale: "The PKU2U protocol is a peer-to-peer authentication protocol - authentication should be managed centrally in most managed networks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network Security: Allow PKU2U authentication requests to this computer to use online identities." + compliance: + - cis: ["2.3.11.3"] + - cis_csc: ["16.9"] + references: + - 'CCE-38047-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\pku2u -> AllowOnlineID -> 0' + + - id: 12038 + title: "Ensure 'Network Security: Configure encryption types allowed for Kerberos' is set to 'RC4_HMAC_MD5, AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types'" + description: "This policy setting allows you to set the encryption types that Kerberos is allowed to use. The recommended state for this setting is: AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types. Note: Some legacy applications and OSes may require RC4_HMAC_MD5 - we recommend you test in your environment and verify whether you can safely remove it. For the purposes of scoring we have allowed the use of RC4_HMAC_MD5 as an optional setting." + rationale: "he strength of each encryption algorithm varies from one to the next, choosing stronger algorithms will reduce the risk of compromise however doing so may cause issues when the computer attempts to authenticate with systems that do not support them." + remediation: "To establish the recommended configuration via GP, set the following UI path to AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Configure encryption types allowed for Kerberos." + compliance: + - cis: ["2.3.11.4"] + - cis_csc: ["16.14"] + references: + - 'CCE-37755-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters -> SupportedEncryptionTypes -> 2147483644' + + - id: 12039 + title: "Ensure 'Network security: Do not store LAN Manager hash value on next password change' is set to 'Enabled'" + description: "This policy setting determines whether the LAN Manager (LM) hash value for the new password is stored when the password is changed. The LM hash is relatively weak and prone to attack compared to the cryptographically stronger Microsoft Windows NT hash. Since LM hashes are stored on the local computer in the security database, passwords can then be easily compromised if the database is attacked. Note: Older operating systems and some third-party applications may fail when this policy setting is enabled. Also, note that the password will need to be changed on all accounts after you enable this setting to gain the proper benefit. The recommended state for this setting is: Enabled." + rationale: "The SAM file can be targeted by attackers who seek access to username and password hashes. Such attacks use special tools to crack passwords, which can then be used to impersonate users and gain access to resources on your network. These types of attacks will not be prevented if you enable this policy setting, but it will be much more difficult for these types of attacks to succeed." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Do not store LAN Manager hash value on next password change." + compliance: + - cis: ["2.3.11.5"] + - cis_csc: ["16.14"] + references: + - 'CCE-36326-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> NoLMHash -> 1' + + - id: 12040 + title: "Ensure 'Network security: Force logoff when logon hours expire' is set to 'Enabled'" + description: "This policy setting determines whether to disconnect users who are connected to the local computer outside their user account's valid logon hours. This setting affects the Server Message Block (SMB) component. If you enable this policy setting you should also enable Microsoft network server: Disconnect clients when logon hours expire (Rule 2.3.9.4). The recommended state for this setting is: Enabled. Note: This recommendation is unscored because there is not a documented registry value that corresponds to it. We still strongly encourage that it be configured as Enabled, to ensure that logon hours (when configured) are properly enforced." + rationale: "If this setting is disabled, a user could remain connected to the computer outside of their allotted logon hours." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Force logoff when logon hours expire." + compliance: + - cis: ["2.3.11.6"] + - cis_csc: ["16"] + references: + - 'CCE-36270-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters -> EnableForcedLogOff -> 1' + + - id: 12041 + title: "Ensure 'Network security: LAN Manager authentication level' is set to 'Send NTLMv2 response only. Refuse LM & NTLM'" + description: "LAN Manager (LM) was a family of early Microsoft client/server software (predating Windows NT) that allowed users to link personal computers together on a single network. LM network capabilities included transparent file and print sharing, user security features, and network administration tools. In Active Directory domains, the Kerberos protocol is the default authentication protocol. However, if the Kerberos protocol is not negotiated for some reason, Active Directory will use LM, NTLM, or NTLMv2. LAN Manager authentication includes the LM, NTLM, and NTLM version 2 (NTLMv2) variants, and is the protocol that is used to authenticate all Windows clients when they perform the following operations: -Join a domain -Authenticate between Active Directory forests -Authenticate to down-level domains -Authenticate to computers that do not run Windows 2000, Windows Server 2003, or Windows XP -Authenticate to computers that are not in the domain. The Network security: LAN Manager authentication level setting determines which challenge/response authentication protocol is used for network logons. This choice affects the level of authentication protocol used by clients, the level of session security negotiated, and the level of authentication accepted by servers. The recommended state for this setting is: Send NTLMv2 response only. Refuse LM & NTLM." + rationale: "Windows 2000 and Windows XP clients were configured by default to send LM and NTLM authentication responses (Windows 95-based and Windows 98-based clients only send LM). The default settings in OSes predating Windows Vista / Windows Server 2008 (non- R2) allowed all clients to authenticate with servers and use their resources. However, this meant that LM responses - the weakest form of authentication response - were sent over the network, and it was potentially possible for attackers to sniff that traffic to more easily reproduce the user's password. The Windows 95, Windows 98, and Windows NT operating systems cannot use the Kerberos version 5 protocol for authentication. For this reason, in a Windows Server 2003 domain, these computers authenticate by default with both the LM and NTLM protocols for network authentication. You can enforce a more secure authentication protocol for Windows 95, Windows 98, and Windows NT by using NTLMv2. For the logon process, NTLMv2 uses a secure channel to protect the authentication process. Even if you use NTLMv2 for older clients and servers, Windows-based clients and servers that are members of the domain will use the Kerberos authentication protocol to authenticate with Windows Server 2003 or newer Domain Controllers. For these reasons, it is strongly preferred to restrict the use of LM & NTLM (non-v2) as much as possible." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Send NTLMv2 response only. Refuse LM & NTLM: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: LAN Manager authentication level." + compliance: + - cis: ["2.3.11.7"] + - cis_csc: ["13"] + references: + - 'CCE-36173-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 5' + - id: 12042 + title: "Ensure 'Network security: LDAP client signing requirements' is set to 'Negotiate signing' or higher" + description: "This policy setting determines the level of data signing that is requested on behalf of clients that issue LDAP BIND requests. Note: This policy setting does not have any impact on LDAP simple bind (ldap_simple_bind) or LDAP simple bind through SSL (ldap_simple_bind_s). No Microsoft LDAP clients that are included with Windows XP Professional use ldap_simple_bind or ldap_simple_bind_s to communicate with a Domain Controller. The recommended state for this setting is: Negotiate signing. Configuring this setting to Require signing also conforms to the benchmark." + rationale: "Unsigned network traffic is susceptible to man-in-the-middle attacks in which an intruder captures the packets between the client and server, modifies them, and then forwards them to the server. For an LDAP server, this susceptibility means that an attacker could cause a server to make decisions that are based on false or altered data from the LDAP queries. To lower this risk in your network, you can implement strong physical security measures to protect the network infrastructure. Also, you can make all types of man-in-the-middle attacks extremely difficult if you require digital signatures on all network packets by means of IPsec authentication headers." + remediation: "To establish the recommended configuration via GP, set the following UI path to Negotiate signing (configuring to Require signing also conforms to the benchmark): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: LDAP client signing requirements." + compliance: + - cis: ["2.3.11.8"] + - cis_csc: ["13"] + references: + - 'CCE-36858-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LDAP -> LDAPClientIntegrity -> n:(/d+) compare >= 1' + + - id: 12043 + title: "Ensure 'Network security: Minimum session security for NTLM SSP based (including secure RPC) clients' is set to 'Require NTLMv2 session security, Require 128-bit encryption'" + description: "This policy setting determines which behaviors are allowed by clients for applications using the NTLM Security Support Provider (SSP). The SSP Interface (SSPI) is used by applications that need authentication services. The setting does not modify how the authentication sequence works but instead require certain behaviors in applications that use the SSPI. The recommended state for this setting is: Require NTLMv2 session security, Require 128-bit encryption. Note: These values are dependent on the Network security: LAN Manager Authentication Level (Rule 2.3.11.7) security setting value." + rationale: "You can enable both options for this policy setting to help protect network traffic that uses the NTLM Security Support Provider (NTLM SSP) from being exposed or tampered with by an attacker who has gained access to the same network. In other words, these options help protect against man-in-the-middle attacks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Require NTLMv2 session security, Require 128-bit encryption: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Minimum session security for NTLM SSP based (including secure RPC) clients." + compliance: + - cis: ["2.3.11.9"] + - cis_csc: ["13"] + references: + - 'CCE-37553-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> NTLMMinClientSec -> 537395200' + + - id: 12044 + title: "Ensure 'Network security: Minimum session security for NTLM SSP based (including secure RPC) servers' is set to 'Require NTLMv2 session security, Require 128-bit encryption'" + description: "This policy setting determines which behaviors are allowed by servers for applications using the NTLM Security Support Provider (SSP). The SSP Interface (SSPI) is used by applications that need authentication services. The setting does not modify how the authentication sequence works but instead require certain behaviors in applications that use the SSPI. The recommended state for this setting is: Require NTLMv2 session security, Require 128-bit encryption. Note: These values are dependent on the Network security: LAN Manager Authentication Level (Rule 2.3.11.7) security setting value." + rationale: "You can enable all of the options for this policy setting to help protect network traffic that uses the NTLM Security Support Provider (NTLM SSP) from being exposed or tampered with by an attacker who has gained access to the same network. That is, these options help protect against man-in-the-middle attacks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Require NTLMv2 session security, Require 128-bit encryption: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Minimum session security for NTLM SSP based (including secure RPC) servers." + compliance: + - cis: ["2.3.11.10"] + - cis_csc: ["13"] + references: + - https://workbench.cisecurity.org/benchmarks/288 + - 'CCE-37835-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> NTLMMinServerSec -> 537395200' + + - id: 12045 + title: "Ensure 'Shutdown: Allow system to be shut down without having to log on' is set to 'Disabled'" + description: "This policy setting determines whether a computer can be shut down when a user is not logged on. If this policy setting is enabled, the shutdown command is available on the Windows logon screen. It is recommended to disable this policy setting to restrict the ability to shut down the computer to users with credentials on the system. The recommended state for this setting is: Disabled. Note: In Server 2008 R2 and older versions, this setting had no impact on Remote Desktop (RDP) / Terminal Services sessions - it only affected the local console. However, Microsoft changed the behavior in Windows Server 2012 (non-R2) and above, where if set to Enabled, RDP sessions are also allowed to shut down or restart the server." + rationale: "Users who can access the console locally could shut down the computer. Attackers could also walk to the local console and restart the server, which would cause a temporary DoS condition. Attackers could also shut down the server and leave all of its applications and services unavailable. As noted in the Description above, the Denial of Service (DoS) risk of enabling this setting dramatically increases in Windows Server 2012 (non-R2) and above, as even remote users could then shut down or restart the server from the logon screen of an RDP session." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Shutdown: Allow system to be shut down without having to log on." + compliance: + - cis: ["2.3.13.1"] + - cis_csc: ["5.1"] + references: + - 'CCE-36788-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ShutdownWithoutLogon -> 0' + + - id: 12046 + title: "Ensure 'System objects: Require case insensitivity for non-Windows subsystems' is set to 'Enabled'" + description: "This policy setting determines whether case insensitivity is enforced for all subsystems. The Microsoft Win32 subsystem is case insensitive. However, the kernel supports case sensitivity for other subsystems, such as the Portable Operating System Interface for UNIX (POSIX). Because Windows is case insensitive (but the POSIX subsystem will support case sensitivity), failure to enforce this policy setting makes it possible for a user of the POSIX subsystem to create a file with the same name as another file by using mixed case to label it. Such a situation can block access to these files by another user who uses typical Win32 tools, because only one of the files will be available. The recommended state for this setting is: Enabled." + rationale: "Because Windows is case-insensitive but the POSIX subsystem will support case sensitivity, failure to enable this policy setting would make it possible for a user of that subsystem to create a file with the same name as another file but with a different mix of upper and lower case letters. Such a situation could potentially confuse users when they try to access such files from normal Win32 tools because only one of the files will be available." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System objects: Require case insensitivity for non- Windows subsystems." + compliance: + - cis: ["2.3.15.1"] + references: + - 'CCE-37885-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Kernel -> ObCaseInsensitive -> 1' + + - id: 12047 + title: "Ensure 'System objects: Strengthen default permissions of internal system objects (e.g. Symbolic Links)' is set to 'Enabled'" + description: "This policy setting determines the strength of the default discretionary access control list (DACL) for objects. Active Directory maintains a global list of shared system resources, such as DOS device names, mutexes, and semaphores. In this way, objects can be located and shared among processes. Each type of object is created with a default DACL that specifies who can access the objects and what permissions are granted. The recommended state for this setting is: Enabled." + rationale: "This setting determines the strength of the default DACL for objects. Windows maintains a global list of shared computer resources so that objects can be located and shared among processes. Each type of object is created with a default DACL that specifies who can access the objects and with what permissions." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System objects: Strengthen default permissions of internal system objects (e.g. Symbolic Links)" + compliance: + - cis: ["2.3.15.2"] + - cis_csc: ["14.4"] + references: + - 'CCE-37644-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager -> ProtectionMode -> 1' + + - id: 12048 + title: "Ensure 'User Account Control: Admin Approval Mode for the Built-in Administrator account' is set to 'Enabled'" + description: "This policy setting controls the behavior of Admin Approval Mode for the built-in Administrator account. The recommended state for this setting is: Enabled." + rationale: "One of the risks that the User Account Control feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. An attack vector for these programs was to discover the password of the account named 'Administrator' because that user account was created for all installations of Windows. To address this risk, in Windows Vista and newer, the built-in Administrator account is now disabled by default. In a default installation of a new computer, accounts with administrative control over the computer are initially set up in one of two ways: - If the computer is not joined to a domain, the first user account you create has the equivalent permissions as a local administrator. - If the computer is joined to a domain, no local administrator accounts are created. The Enterprise or Domain Administrator must log on to the computer and create one if a local administrator account is warranted. Once Windows is installed, the built-in Administrator account may be manually enabled, but we strongly recommend that this account remain disabled." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Admin Approval Mode for the Built-in Administrator account." + compliance: + - cis: ["2.3.17.1"] + - cis_csc: ["5.1"] + references: + - 'CCE-36494-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> FilterAdministratorToken -> 1' + + - id: 12049 + title: "Ensure 'User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop' is set to 'Disabled'" + description: "This policy setting controls whether User Interface Accessibility (UIAccess or UIA) programs can automatically disable the secure desktop for elevation prompts used by a standard user. The recommended state for this setting is: Disabled." + rationale: "One of the risks that the UAC feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. This setting allows the administrator to perform operations that require elevated privileges while connected via Remote Assistance. This increases security in that organizations can use UAC even when end user support is provided remotely. However, it also reduces security by adding the risk that an administrator might allow an unprivileged user to share elevated privileges for an application that the administrator needs to use during the Remote Desktop session." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop." + compliance: + - cis: ["2.3.17.2"] + - cis_csc: ["16"] + references: + - 'CCE-36863-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableUIADesktopToggle -> 0' + + - id: 12050 + title: "Ensure 'User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode' is set to 'Prompt for consent on the secure desktop'" + description: "This policy setting controls the behavior of the elevation prompt for administrators. The recommended state for this setting is: Prompt for consent on the secure desktop." + rationale: "One of the risks that the UAC feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. This setting raises awareness to the administrator of elevated privilege operations and permits the administrator to prevent a malicious program from elevating its privilege when the program attempts to do so." + remediation: "To establish the recommended configuration via GP, set the following UI path to Prompt for consent on the secure desktop: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode." + compliance: + - cis: ["2.3.17.3"] + - cis_csc: ["5.1"] + references: + - 'CCE-37029-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ConsentPromptBehaviorAdmin -> r:^2$' + + - id: 12051 + title: "Ensure 'User Account Control: Behavior of the elevation prompt for standard users' is set to 'Automatically deny elevation requests'" + description: "This policy setting controls the behavior of the elevation prompt for standard users. The recommended state for this setting is: Automatically deny elevation requests." + rationale: "One of the risks that the User Account Control feature introduced with Windows Vista is trying to mitigate is that of malicious programs running under elevated credentials without the user or administrator being aware of their activity. This setting raises awareness to the user that a program requires the use of elevated privilege operations and requires that the user be able to supply administrative credentials in order for the program to run." + remediation: "To establish the recommended configuration via GP, set the following UI path to Automatically deny elevation requests: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Behavior of the elevation prompt for standard users." + compliance: + - cis: ["2.3.17.4"] + - cis_csc: ["5.1"] + references: + - 'CCE-36864-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ConsentPromptBehaviorUser -> 0' + + - id: 12052 + title: "Ensure 'User Account Control: Detect application installations and prompt for elevation' is set to 'Enabled'" + description: "This policy setting controls the behavior of application installation detection for the computer. The recommended state for this setting is: Enabled." + rationale: "Some malicious software will attempt to install itself after being given permission to run. For example, malicious software with a trusted application shell. The user may have given permission for the program to run because the program is trusted, but if they are then prompted for installation of an unknown component this provides another way of trapping the software before it can do damage." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Detect application installations and prompt for elevation." + compliance: + - cis: ["2.3.17.5"] + - cis_csc: ["5.1"] + references: + - 'CCE-36533-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableInstallerDetection -> 1' + + - id: 12053 + title: "Ensure 'User Account Control: Only elevate UIAccess applications that are installed in secure locations' is set to 'Enabled'" + description: "This policy setting controls whether applications that request to run with a User Interface Accessibility (UIAccess) integrity level must reside in a secure location in the file system. Secure locations are limited to the following: ...\\Program Files\\, including subfolders; ...\\Windows\\system32\\; ...\\Program Files (x86)\\, including subfolders (for 64-bit versions of Windows). Note: Windows enforces a public key infrastructure (PKI) signature check on any interactive application that requests to run with a UIAccess integrity level regardless of the state of this security setting. The recommended state for this setting is: Enabled." + rationale: "UIAccess Integrity allows an application to bypass User Interface Privilege Isolation (UIPI) restrictions when an application is elevated in privilege from a standard user to an administrator. This is required to support accessibility features such as screen readers that are transmitting user interfaces to alternative forms. A process that is started with UIAccess rights has the following abilities: - To set the foreground window. - To drive any application window using SendInput function. - To use read input for all integrity levels using low-level hooks, raw input, GetKeyState, GetAsyncKeyState, and GetKeyboardInput. - To set journal hooks. - To uses AttachThreadInput to attach a thread to a higher integrity input queue." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Only elevate UIAccess applications that are installed in secure locations." + compliance: + - cis: ["2.3.17.6"] + - cis_csc: ["5.1"] + references: + - 'CCE-37057-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableSecureUIAPaths -> 1' + + - id: 12054 + title: "Ensure 'User Account Control: Run all administrators in Admin Approval Mode' is set to 'Enabled'" + description: "This policy setting controls the behavior of all User Account Control (UAC) policy settings for the computer. If you change this policy setting, you must restart your computer. The recommended state for this setting is: Enabled. Note: If this policy setting is disabled, the Security Center notifies you that the overall security of the operating system has been reduced." + rationale: "This is the setting that turns on or off UAC. If this setting is disabled, UAC will not be used and any security benefits and risk mitigations that are dependent on UAC will not be present on the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Run all administrators in Admin Approval Mode." + compliance: + - cis: ["2.3.17.7"] + - cis_csc: ["5.1"] + references: + - 'CCE-36869-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableLUA -> 1' + + - id: 12055 + title: "Ensure 'User Account Control: Switch to the secure desktop when prompting for elevation' is set to 'Enabled'" + description: "This policy setting controls whether the elevation request prompt is displayed on the interactive user's desktop or the secure desktop. The recommended state for this setting is: Enabled." + rationale: "Standard elevation prompt dialog boxes can be spoofed, which may cause users to disclose their passwords to malicious software. The secure desktop presents a very distinct appearance when prompting for elevation, where the user desktop dims, and the elevation prompt UI is more prominent. This increases the likelihood that users who become accustomed to the secure desktop will recognize a spoofed elevation prompt dialog box and not fall for the trick." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Switch to the secure desktop when prompting for elevation." + compliance: + - cis: ["2.3.17.8"] + - cis_csc: ["5.1"] + references: + - 'CCE-36866-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> PromptOnSecureDesktop -> 1' + + - id: 12056 + title: "Ensure 'User Account Control: Virtualize file and registry write failures to per-user locations' is set to 'Enabled'" + description: "This policy setting controls whether application write failures are redirected to defined registry and file system locations. This policy setting mitigates applications that run as administrator and write run-time application data to: - %ProgramFiles% - %Windir% - %Windir%\\system32 - HKEY_LOCAL_MACHINE\\Software. The recommended state for this setting is: Enabled." + rationale: "This setting reduces vulnerabilities by ensuring that legacy applications only write data to permitted locations." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Virtualize file and registry write failures to per-user locations." + compliance: + - cis: ["2.3.17.9"] + references: + - 'CCE-37064-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableVirtualization -> 1' + +# Section 9.1 - Domain Profile + - id: 12057 + title: "Ensure 'Windows Firewall: Domain: Firewall state' is set to 'On'" + description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." + rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Firewall state." + compliance: + - cis: ["9.1.1"] + - cis_csc: ["9.2"] + references: + - 'CCE-36062-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> EnableFirewall -> 1' + + - id: 12058 + title: "Ensure 'Windows Firewall: Domain: Inbound connections' is set to 'Block (default)'" + description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." + rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Inbound connections." + compliance: + - cis: ["9.1.2"] + - cis_csc: ["9.2"] + references: + - 'CCE-38117-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DefaultInboundAction -> 1' + + - id: 12059 + title: "Ensure 'Windows Firewall: Domain: Outbound connections' is set to 'Allow (default)'" + description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default)." + rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." + remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Outbound connections." + compliance: + - cis: ["9.1.3"] + - cis_csc: ["9.2"] + references: + - 'CCE-36146-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DefaultOutboundAction -> 0' + + - id: 12060 + title: "Ensure 'Windows Firewall: Domain: Settings: Display a notification' is set to 'No'" + description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." + rationale: "Firewall notifications can be complex and may confuse the end users, who would not be able to address the alert." + remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Settings Customize\\Display a notification." + compliance: + - cis: ["9.1.4"] + references: + - 'CCE-38041-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DisableNotifications -> 1' + + - id: 12061 + title: "Ensure 'Windows Firewall: Domain: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log'" + description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Name." + compliance: + - cis: ["9.1.5"] + - cis_csc: ["6.2"] + references: + - 'CCE-37482-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFilePath -> r:%SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log' + + - id: 12062 + title: "Ensure 'Windows Firewall: Domain: Logging: Size limit (KB)' is set to '16384 KB or greater'" + description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Size limit (KB)." + compliance: + - cis: ["9.1.6"] + - cis_csc: ["6.3"] + references: + - 'CCE-36088-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> n:^(\d+) compare >= 16384' + + - id: 12063 + title: "Ensure 'Windows Firewall: Domain: Logging: Log dropped packets' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Log dropped packets." + compliance: + - cis: ["9.1.7"] + - cis_csc: ["6.2"] + references: + - 'CCE-37523-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogDroppedPackets -> 1' + + - id: 12064 + title: "Ensure 'Windows Firewall: Domain: Logging: Log successful connections' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Log successful connections." + compliance: + - cis: ["9.1.8"] + - cis_csc: ["6.2"] + references: + - 'CCE-36393-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogSuccessfulConnections -> 1' + +# Section 9.2 - Private Profile + - id: 12065 + title: "Ensure 'Windows Firewall: Private: Firewall state' is set to 'On'" + description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." + rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Firewall state." + compliance: + - cis: ["9.2.1"] + - cis_csc: ["9.2"] + references: + - 'CCE-38239-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> EnableFirewall -> 1' + + - id: 12066 + title: "Ensure 'Windows Firewall: Private: Inbound connections' is set to 'Block (default)'" + description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." + rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Inbound connections." + compliance: + - cis: ["9.2.2"] + - cis_csc: ["9.2"] + references: + - 'CCE-38042-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DefaultInboundAction -> 1' + + - id: 12067 + title: "Ensure 'Windows Firewall: Private: Outbound connections' is set to 'Allow (default)'" + description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default). Note: If you set Outbound connections to Block and then deploy the firewall policy by using a GPO, computers that receive the GPO settings cannot receive subsequent Group Policy updates unless you create and deploy an outbound rule that enables Group Policy to work. Predefined rules for Core Networking include outbound rules that enable Group Policy to work. Ensure that these outbound rules are active, and thoroughly test firewall profiles before deploying." + rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." + remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Outbound connections." + compliance: + - cis: ["9.2.3"] + - cis_csc: ["9.2"] + references: + - 'CCE-38332-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DefaultOutboundAction -> 0' + + - id: 12068 + title: "Ensure 'Windows Firewall: Private: Settings: Display a notification' is set to 'No'" + description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." + rationale: "Firewall notifications can be complex and may confuse the end users, who would not be able to address the alert." + remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Settings Customize\\Display a notification." + compliance: + - cis: ["9.2.4"] + references: + - 'CCE-37621-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DisableNotifications -> 1' + + - id: 12069 + title: "Ensure 'Windows Firewall: Private: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log'" + description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Name." + compliance: + - cis: ["9.2.5"] + - cis_csc: ["6.2"] + references: + - 'CCE-37569-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFilePath -> r:%SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log' + + - id: 12070 + title: "Ensure 'Windows Firewall: Private: Logging: Size limit (KB)' is set to '16384 KB or greater'" + description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Size limit (KB)." + compliance: + - cis: ["9.2.6"] + - cis_csc: ["6.3"] + references: + - 'CCE-38178-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> n:^(\d+) compare >= 16384' + + - id: 12071 + title: "Ensure 'Windows Firewall: Private: Logging: Log dropped packets' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Log dropped packets." + compliance: + - cis: ["9.2.7"] + - cis_csc: ["6.2"] + references: + - 'CCE-35972-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogDroppedPackets -> 1' + + - id: 12072 + title: "Ensure 'Windows Firewall: Private: Logging: Log successful connections' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Log successful connections." + compliance: + - cis: ["9.2.8"] + - cis_csc: ["6.2"] + references: + - 'CCE-37387-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogSuccessfulConnections -> 1' + +# Sectin 9.3 - Public Profile + - id: 12073 + title: "Ensure 'Windows Firewall: Public: Firewall state' is set to 'On'" + description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." + rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Firewall state." + compliance: + - cis: ["9.3.1"] + - cis_csc: ["9.2"] + references: + - 'CCE-37862-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> EnableFirewall -> 1' + + - id: 12074 + title: "Ensure 'Windows Firewall: Public: Inbound connections' is set to 'Block (default)'" + description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." + rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Inbound connections." + compliance: + - cis: ["9.3.2"] + - cis_csc: ["9.2"] + references: + - 'CCE-36057-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DefaultInboundAction -> 1' + + - id: 12075 + title: "Ensure 'Windows Firewall: Public: Outbound connections' is set to 'Allow (default)'" + description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default). Note: If you set Outbound connections to Block and then deploy the firewall policy by using a GPO, computers that receive the GPO settings cannot receive subsequent Group Policy updates unless you create and deploy an outbound rule that enables Group Policy to work. Predefined rules for Core Networking include outbound rules that enable Group Policy to work. Ensure that these outbound rules are active, and thoroughly test firewall profiles before deploying." + rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." + remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Outbound connections." + compliance: + - cis: ["9.3.3"] + - cis_csc: ["9.2"] + references: + - 'CCE-37434-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DefaultOutboundAction -> 0' + + - id: 12076 + title: "Ensure 'Windows Firewall: Public: Settings: Display a notification' is set to 'No'" + description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No." + rationale: "Some organizations may prefer to avoid alarming users when firewall rules block certain types of network activity. However, notifications can be helpful when troubleshooting network issues involving the firewall." + remediation: "To establish the recommended configuration via GP, set the following UI path to 'No': Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Display a notification." + compliance: + - cis: ["9.3.4"] + references: + - 'CCE-38043-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DisableNotifications -> 1' + + - id: 12077 + title: "Ensure 'Windows Firewall: Public: Settings: Apply local firewall rules' is set to 'No'" + description: "This setting controls whether local administrators are allowed to create local firewall rules that apply together with firewall rules configured by Group Policy. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." + rationale: "When in the Public profile, there should be no special local firewall exceptions per computer. These settings should be managed by a centralized policy." + remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Apply local firewall rules." + compliance: + - cis: ["9.3.5"] + - cis_csc: ["5.1"] + references: + - 'CCE-37861-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> AllowLocalPolicyMerge -> 1' + + - id: 12078 + title: "Ensure 'Windows Firewall: Public: Settings: Apply local connection security rules' is set to 'No'" + description: "This setting controls whether local administrators are allowed to create connection security rules that apply together with connection security rules configured by Group Policy. The recommended state for this setting is: No." + rationale: "Users with administrative privileges might create firewall rules that expose the system to remote attack." + remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Apply local connection security rules." + compliance: + - cis: ["9.3.6"] + - cis_csc: ["5.1"] + references: + - 'CCE-36268-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> AllowLocalIPsecPolicyMerge -> 1' + + - id: 12079 + title: "Ensure 'Windows Firewall: Private: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log'" + description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Name." + compliance: + - cis: ["9.3.7"] + - cis_csc: ["6.2"] + references: + - 'CCE-37266-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFilePath -> r:%SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log' + + - id: 12080 + title: "Ensure 'Windows Firewall: Public: Logging: Size limit (KB)' is set to '16384 KB or greater'" + description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Size limit (KB)." + compliance: + - cis: ["9.3.8"] + - cis_csc: ["6.3"] + references: + - 'CCE-36395-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> n:^(\d+) compare >= 16384' + + - id: 12081 + title: "Ensure 'Windows Firewall: Public: Logging: Log dropped packets' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Log dropped packets." + compliance: + - cis: ["9.3.9"] + - cis_csc: ["6.2"] + references: + - 'CCE-37265-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogDroppedPackets -> 1' + + - id: 12082 + title: "Ensure 'Windows Firewall: Public: Logging: Log successful connections' is set to 'Yes'" + description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Log successful connections." + compliance: + - cis: ["9.3.10"] + - cis_csc: ["6.2"] + references: + - 'CCE-36394-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogSuccessfulConnections -> 1' + +# Section 18.1 - Control Panel + - id: 12083 + title: "Ensure 'Prevent enabling lock screen camera' is set to 'Enabled'" + description: "Disables the lock screen camera toggle switch in PC Settings and prevents a camera from being invoked on the lock screen. The recommended state for this setting is: Enabled." + rationale: "Disabling the lock screen camera extends the protection afforded by the lock screen to camera features." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Personalization\\Prevent enabling lock screen camera Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ControlPanelDisplay.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.1.1.1"] + references: + - 'CCE-38347-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> NoLockScreenCamera -> 1' + + - id: 12084 + title: "Ensure 'Prevent enabling lock screen slide show' is set to 'Enabled'" + description: "Disables the lock screen slide show settings in PC Settings and prevents a slide show from playing on the lock screen. The recommended state for this setting is: Enabled." + rationale: "Disabling the lock screen slide show extends the protection afforded by the lock screen to slide show contents." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Personalization\\Prevent enabling lock screen slide show Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ControlPanelDisplay.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.1.1.2"] + references: + - 'CCE-38348-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> NoLockScreenSlideshow -> 1' + +# Section 18.2 - LAPS + - id: 12085 + title: "Ensure LAPS AdmPwd GPO Extension / CSE is installed" + description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." + rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." + remediation: "In order to utilize LAPS, a minor Active Directory Schema update is required, and a Group Policy Client Side Extension (CSE) must be installed on each managed computer. When LAPS is installed, the file AdmPwd.dll must be present in the following location and registered in Windows (the LAPS AdmPwd GPO Extension / CSE installation does this for you): C:\\Program Files\\LAPS\\CSE\\AdmPwd.dll" + compliance: + - cis: ["18.2.1"] + - cis_csc: ["16.9"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions\{D76B9641-3288-4f75-942D-087DE603E3EA}' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions\{D76B9641-3288-4f75-942D-087DE603E3EA} -> DllName' + + - id: 12086 + title: "Ensure 'Do not allow password expiration time longer than required by policy' is set to 'Enabled'" + description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." + rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Do not allow password expiration time longer than required by policy Note: This Group Policy path does not exist by default. An additional Group Policy template (AdmPwd.admx/adml) is required - it is included with Microsoft Local Administrator Password Solution (LAPS)." + compliance: + - cis: ["18.2.2"] + - cis_csc: ["16.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PwdExpirationProtectionEnabled -> 1' + + - id: 12087 + title: "Ensure 'Enable Local Admin Password Management' is set to 'Enabled'" + description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." + rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Enable Local Admin Password Management Note: This Group Policy path does not exist by default. An additional Group Policy template (AdmPwd.admx/adml) is required - it is included with Microsoft Local Administrator Password Solution (LAPS)." + compliance: + - cis: ["18.2.3"] + - cis_csc: ["16.9"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> AdmPwdEnabled -> 1' + + - id: 12088 + title: "Ensure 'Password Settings: Password Complexity' is set to 'Enabled: Large letters + small letters + numbers + special characters'" + description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled: Large letters + small letters + numbers + special characters. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." + rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, and configure the Password Complexity option to Large letters + small letters + numbers + special characters: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Password Settings Note: This Group Policy path does not exist by default. An additional Group Policy template (AdmPwd.admx/adml) is required - it is included with Microsoft Local Administrator Password Solution (LAPS)." + compliance: + - cis: ["18.2.4"] + - cis_csc: ["5.7"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordComplexity -> 4' + + - id: 12089 + title: "Ensure 'Password Settings: Password Length' is set to 'Enabled: 15 or more'" + description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled: 15 or more. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." + rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, and configure the Password Length option to 15 or more: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Password Settings Note: This Group Policy path does not exist by default. An additional Group Policy template (AdmPwd.admx/adml) is required - it is included with Microsoft Local Administrator Password Solution (LAPS)." + compliance: + - cis: ["18.2.5"] + - cis_csc: ["5.7"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordLength -> n:^(\d+) compare >= 15' + + - id: 12090 + title: "Ensure 'Password Settings: Password Age (Days)' is set to 'Enabled: 30 or fewer'" + description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled: 30 or fewer. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." + rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, and configure the Password Age (Days) option to 30 or fewer: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Password Settings Note: This Group Policy path does not exist by default. An additional Group Policy template (AdmPwd.admx/adml) is required - it is included with Microsoft Local Administrator Password Solution (LAPS)." + compliance: + - cis: ["18.2.6"] + - cis_csc: ["16.5"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> n:^(\d+) compare <= 30' + +# Section 18.3 - MS Security Guide + - id: 12091 + title: "Ensure 'Apply UAC restrictions to local accounts on network logons' is set to 'Enabled'" + description: "This setting controls whether local accounts can be used for remote administration via network logon (e.g., NET USE, connecting to C$, etc.). Local accounts are at high risk for credential theft when the same account and password is configured on multiple systems. Enabling this policy significantly reduces that risk. Enabled: Applies UAC token-filtering to local accounts on network logons. Membership in powerful group such as Administrators is disabled and powerful privileges are removed from the resulting access token. This configures the LocalAccountTokenFilterPolicy registry value to 0. This is the default behavior for Windows. Disabled: Allows local accounts to have full administrative rights when authenticating via network logon, by configuring the LocalAccountTokenFilterPolicy registry value to 1. For more information about local accounts and credential theft, review the 'Mitigating Pass-the-Hash (PtH) Attacks and Other Credential Theft Techniques' documents. For more information about LocalAccountTokenFilterPolicy, see Microsoft Knowledge Base article 951016: Description of User Account Control and remote restrictions in Windows Vista. The recommended state for this setting is: Enabled." + rationale: "Local accounts are at high risk for credential theft when the same account and password is configured on multiple systems. Ensuring this policy is Enabled significantly reduces that risk." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\Apply UAC restrictions to local accounts on network logons Note: This Group Policy path does not exist by default. An additional Group Policy template (SecGuide.admx/adml) is required - it is available from Microsoft." + compliance: + - cis: ["18.3.1"] + - cis_csc: ["5.8"] + references: + - https://www.microsoft.com/en-us/download/details.aspx?id=36036 + - https://support.microsoft.com/en-us/help/951016/description-of-user-account-control-and-remote-restrictions-in-windows + - https://blogs.technet.microsoft.com/secguide/2017/08/30/security-baseline-for-windows-10-creators-update-v1703-final/ + - 'CCE-37069-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> LocalAccountTokenFilterPolicy -> 0' + + - id: 12092 + title: "Ensure 'WDigest Authentication' is set to 'Disabled'" + description: "When WDigest authentication is enabled, Lsass.exe retains a copy of the user's plaintext password in memory, where it can be at risk of theft. If this setting is not configured, WDigest authentication is disabled in Windows 8.1 and in Windows Server 2012 R2; it is enabled by default in earlier versions of Windows and Windows Server. The recommended state for this setting is: Disabled." + rationale: "Preventing the plaintext storage of credentials in memory may reduce opportunity for credential theft." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\WDigest Authentication (disabling may require KB2871997) Note: This Group Policy path does not exist by default. An additional Group Policy template (SecGuide.admx/adml) is required - it is available from Microsoft." + compliance: + - cis: ["18.3.5"] + - cis_csc: ["16.14"] + references: + - https://www.microsoft.com/en-us/download/details.aspx?id=36036 + - https://support.microsoft.com/en-us/help/2871997/microsoft-security-advisory-update-to-improve-credentials-protection-a + - https://blogs.technet.microsoft.com/secguide/2017/08/30/security-baseline-for-windows-10-creators-update-v1703-final/ + - 'CCE-38444-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest -> UseLogonCredential -> 0' + +# Section 18.4 - MSS (Legacy) + - id: 12093 + title: "Ensure 'MSS: (AutoAdminLogon) Enable Automatic Logon (not recommended)' is set to 'Disabled'" + description: "This setting is separate from the Welcome screen feature in Windows XP and Windows Vista; if that feature is disabled, this setting is not disabled. If you configure a computer for automatic logon, anyone who can physically gain access to the computer can also gain access to everything that is on the computer, including any network or networks to which the computer is connected. Also, if you enable automatic logon, the password is stored in the registry in plaintext, and the specific registry key that stores this value is remotely readable by the Authenticated Users group. The recommended state for this setting is: Disabled." + rationale: "If you configure a computer for automatic logon, anyone who can physically gain access to the computer can also gain access to everything that is on the computer, including any network or networks that the computer is connected to. Also, if you enable automatic logon, the password is stored in the registry in plaintext. The specific registry key that stores this setting is remotely readable by the Authenticated Users group. As a result, this entry is appropriate only if the computer is physically secured and if you ensure that untrusted users cannot remotely see the registry." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (AutoAdminLogon) Enable Automatic Logon (not recommended) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.1"] + - cis_csc: ["16"] + references: + - https://support.microsoft.com/en-us/help/324737/how-to-turn-on-automatic-logon-in-windows + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-37067-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> AutoAdminLogon -> 0' + + - id: 12094 + title: "Ensure 'MSS: (DisableIPSourceRouting IPv6) IP source routing protection level (protects against packet spoofing)' is set to 'Enabled: Highest protection, source routing is completely disabled'" + description: "IP source routing is a mechanism that allows the sender to determine the IP route that a datagram should follow through the network. The recommended state for this setting is: Enabled: Highest protection, source routing is completely disabled." + rationale: "An attacker could use source routed packets to obscure their identity and location. Source routing allows a computer that sends a packet to specify the route that the packet takes." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Highest protection, source routing is completely disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (DisableIPSourceRouting IPv6) IP source routing protection level (protects against packet spoofing) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.2"] + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-36871-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -> DisableIPSourceRouting -> 2' + + - id: 12095 + title: "Ensure 'MSS: (DisableIPSourceRouting) IP source routing protection level (protects against packet spoofing)' is set to 'Enabled: Highest protection, source routing is completely disabled'" + description: "IP source routing is a mechanism that allows the sender to determine the IP route that a datagram should take through the network. It is recommended to configure this setting to Not Defined for enterprise environments and to Highest Protection for high security environments to completely disable source routing. The recommended state for this setting is: Enabled: Highest protection, source routing is completely disabled." + rationale: "An attacker could use source routed packets to obscure their identity and location. Source routing allows a computer that sends a packet to specify the route that the packet takes." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Highest protection, source routing is completely disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (DisableIPSourceRouting) IP source routing protection level (protects against packet spoofing) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.3"] + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-36535-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> DisableIPSourceRouting -> 2' + + - id: 12096 + title: "Ensure 'MSS: (EnableICMPRedirect) Allow ICMP redirects to override OSPF generated routes' is set to 'Disabled'" + description: "Internet Control Message Protocol (ICMP) redirects cause the IPv4 stack to plumb host routes. These routes override the Open Shortest Path First (OSPF) generated routes. The recommended state for this setting is: Disabled." + rationale: "This behavior is expected. The problem is that the 10 minute time-out period for the ICMP redirect-plumbed routes temporarily creates a network situation in which traffic will no longer be routed properly for the affected host. Ignoring such ICMP redirects will limit the system's exposure to attacks that will impact its ability to participate on the network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (EnableICMPRedirect) Allow ICMP redirects to override OSPF generated routes Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.4"] + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-37988-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> EnableICMPRedirect -> 0' + + - id: 12097 + title: "Ensure 'MSS: (NoNameReleaseOnDemand) Allow the computer to ignore NetBIOS name release requests except from WINS servers' is set to 'Enabled'" + description: "NetBIOS over TCP/IP is a network protocol that among other things provides a way to easily resolve NetBIOS names that are registered on Windows-based systems to the IP addresses that are configured on those systems. This setting determines whether the computer releases its NetBIOS name when it receives a name-release request. The recommended state for this setting is: Enabled." + rationale: "The NetBT protocol is designed not to use authentication, and is therefore vulnerable to spoofing. Spoofing makes a transmission appear to come from a user other than the user who performed the action. A malicious user could exploit the unauthenticated nature of the protocol to send a name-conflict datagram to a target computer, which would cause the computer to relinquish its name and not respond to queries. An attacker could send a request over the network and query a computer to release its NetBIOS name. As with any change that could affect applications, it is recommended that you test this change in a non-production environment before you change the production environment. The result of such an attack could be to cause intermittent connectivity issues on the target computer, or even to prevent the use of Network Neighborhood, domain logons, the NET SEND command, or additional NetBIOS name resolution." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (NoNameReleaseOnDemand) Allow the computer to ignore NetBIOS name release requests except from WINS servers Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.6"] + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-36879-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters -> NoNameReleaseOnDemand -> 1' + + - id: 12098 + title: "Ensure 'MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended)' is set to 'Enabled'" + description: "The DLL search order can be configured to search for DLLs that are requested by running processes in one of two ways: -Search folders specified in the system path first, and then search the current working folder. -Search current working folder first, and then search the folders specified in the system path. When enabled, the registry value is set to 1. With a setting of 1, the system first searches the folders that are specified in the system path and then searches the current working folder. When disabled the registry value is set to 0 and the system first searches the current working folder and then searches the folders that are specified in the system path. Applications will be forced to search for DLLs in the system path first. For applications that require unique versions of these DLLs that are included with the application, this entry could cause performance or stability problems. The recommended state for this setting is: Enabled." + rationale: "If a user unknowingly executes hostile code that was packaged with additional files that include modified versions of system DLLs, the hostile code could load its own versions of those DLLs and potentially increase the type and degree of damage the code can render." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.8"] + - cis_csc: ["8"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-36351-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager -> SafeDllSearchMode -> 1' + + - id: 12099 + title: "Ensure 'MSS: (ScreenSaverGracePeriod) The time in seconds before the screen saver grace period expires (0 recommended)' is set to 'Enabled: 5 or fewer seconds'" + description: "Windows includes a grace period between when the screen saver is launched and when the console is actually locked automatically when screen saver locking is enabled. The recommended state for this setting is: Enabled: 5 or fewer seconds." + rationale: "The default grace period that is allowed for user movement before the screen saver lock takes effect is five seconds. If you leave the default grace period configuration, your computer is vulnerable to a potential attack from someone who could approach the console and attempt to log on to the computer before the lock takes effect. An entry to the registry can be made to adjust the length of the grace period." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 5 or fewer seconds: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (ScreenSaverGracePeriod) The time in seconds before the screen saver grace period expires (0 recommended) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.9"] + - cis_csc: ["16.5"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-37993-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> n:^(\d+) compare <= 5' + + - id: 12100 + title: "Ensure 'MSS: (WarningLevel) Percentage threshold for the security event log at which the system will generate a warning' is set to 'Enabled: 90% or less'" + description: "This setting can generate a security audit in the Security event log when the log reaches a user-defined threshold. The recommended state for this setting is: Enabled: 90% or less. Note: If log settings are configured to Overwrite events as needed or Overwrite events older than x days, this event will not be generated." + rationale: "If the Security log reaches 90 percent of its capacity and the computer has not been configured to overwrite events as needed, more recent events will not be written to the log. If the log reaches its capacity and the computer has been configured to shut down when it can no longer record events to the Security log, the computer will shut down and will no longer be available to provide network services." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 90% or less: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (WarningLevel) Percentage threshold for the security event log at which the system will generate a warning Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis: ["18.4.12"] + - cis_csc: ["6.3"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + - 'CCE-36880-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> n:^(\d+) compare <= 90' + +# Section 18.5 - Network + - id: 12101 + title: "Ensure 'Prohibit installation and configuration of Network Bridge on your DNS domain network' is set to 'Enabled'" + description: "You can use this procedure to controls user's ability to install and configure a Network Bridge. The recommended state for this setting is: Enabled." + rationale: "The Network Bridge setting, if enabled, allows users to create a Layer 2 Media Access Control (MAC) bridge, enabling them to connect two or more physical network segments together. A Network Bridge thus allows a computer that has connections to two different networks to share data between those networks. In an enterprise managed environment, where there is a need to control network traffic to only authorized paths, allowing users to create a Network Bridge increases the risk and attack surface from the bridged network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Connections\\Prohibit installation and configuration of Network Bridge on your DNS domain network Note: This Group Policy path is provided by the Group Policy template NetworkConnections.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.5.11.2"] + - cis_csc: ["5.1"] + references: + - 'CCE-38002-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> NC_AllowNetBridge_NLA -> 0' + + - id: 12102 + title: "Ensure 'Require domain users to elevate when setting a network's location' is set to 'Enabled'" + description: "This policy setting determines whether to require domain users to elevate when setting a network's location. The recommended state for this setting is: Enabled." + rationale: "Allowing regular users to set a network location increases the risk and attack surface." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Connections\\Require domain users to elevate when setting a network's location Note: This Group Policy path may not exist by default. It is provided by the Group Policy template NetworkConnections.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.5.11.3"] + - cis_csc: ["5.1"] + references: + - 'CCE-38188-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> NC_StdDomainUserSetLocation -> 1' + + - id: 12103 + title: "Ensure 'Minimize the number of simultaneous connections to the Internet or a Windows Domain' is set to 'Enabled'" + description: "This policy setting prevents computers from connecting to both a domain based network and a non-domain based network at the same time. The recommended state for this setting is: Enabled." + rationale: "Blocking simultaneous connections can help prevent a user unknowingly allowing network traffic to flow between the Internet and the enterprise managed network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Windows Connection Manager\\Minimize the number of simultaneous connections to the Internet or a Windows Domain Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WCM.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.5.21.1"] + - cis_csc: ["12"] + references: + - 'CCE-38338-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\GroupPolicy -> fMinimizeConnections -> 1' + +# Section 18.8 - System + - id: 12104 + title: "Ensure 'Include command line in process creation events' is set to 'Disabled'" + description: "This policy setting determines what information is logged in security audit events when a new process has been created. The recommended state for this setting is: Disabled." + rationale: "When this policy setting is enabled, any user who has read access to the security events can read the command-line arguments for any successfully created process. Command-line arguments may contain sensitive or private information such as passwords or user data." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Audit Process Creation\\Include command line in process creation events Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AuditSettings.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.8.3.1"] + - cis_csc: ["16.14"] + references: + - 'CCE-36925-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit -> ProcessCreationIncludeCmdLine_Enabled -> 0' + + - id: 12105 + title: "Ensure 'Boot-Start Driver Initialization Policy' is set to 'Enabled: Good, unknown and bad but critical'" + description: "This policy setting allows you to specify which boot-start drivers are initialized based on a classification determined by an Early Launch Antimalware boot-start driver. The Early Launch Antimalware boot-start driver can return the following classifications for each boot-start driver: - Good: The driver has been signed and has not been tampered with. - Bad: The driver has been identified as malware. It is recommended that you do not allow known bad drivers to be initialized. - Bad, but required for boot: The driver has been identified as malware, but the computer cannot successfully boot without loading this driver. - Unknown: This driver has not been attested to by your malware detection application and has not been classified by the Early Launch Antimalware boot-start driver. If you enable this policy setting you will be able to choose which boot-start drivers to initialize the next time the computer is started. If your malware detection application does not include an Early Launch Antimalware boot- start driver or if your Early Launch Antimalware boot-start driver has been disabled, this setting has no effect and all boot-start drivers are initialized. The recommended state for this setting is: Enabled: Good, unknown and bad but critical." + rationale: "This policy setting helps reduce the impact of malware that has already infected your system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Good, unknown and bad but critical: Computer Configuration\\Policies\\Administrative Templates\\System\\Early Launch Antimalware\\Boot-Start Driver Initialization Policy Note: This Group Policy path may not exist by default. It is provided by the Group Policy template EarlyLaunchAM.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.14.1"] + - cis_csc: ["8"] + references: + - 'CCE-37912-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies\EarlyLaunch -> DriverLoadPolicy -> 3' + + - id: 12106 + title: "Ensure 'Configure registry policy processing: Do not apply during periodic background processing' is set to 'Enabled: FALSE'" + description: "The 'Do not apply during periodic background processing' option prevents the system from updating affected policies in the background while the computer is in use. When background updates are disabled, policy changes will not take effect until the next user logon or system restart. The recommended state for this setting is: Enabled: FALSE (unchecked)." + rationale: "Setting this option to false (unchecked) will ensure that domain policy changes take effect more quickly, as compared to waiting until the next user logon or system restart." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, then set the Do not apply during periodic background processing option to FALSE (unchecked): Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Configure registry policy processing Note: This Group Policy path may not exist by default. It is provided by the Group Policy template GroupPolicy.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.21.2"] + - cis_csc: ["3.7"] + references: + - 'CCE-36169-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> NoBackgroundPolicy -> 0' + + - id: 12107 + title: "Ensure 'Configure registry policy processing: Process even if the Group Policy objects have not changed' is set to 'Enabled: TRUE'" + description: "The 'Process even if the Group Policy objects have not changed' option updates and reapplies policies even if the policies have not changed. The recommended state for this setting is: Enabled: TRUE (checked)." + rationale: "Setting this option to true (checked) will ensure unauthorized changes that might have been configured locally are forced to match the domain-based Group Policy settings again." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, then set the Process even if the Group Policy objects have not changed option to TRUE (checked): Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Configure registry policy processing Note: This Group Policy path may not exist by default. It is provided by the Group Policy template GroupPolicy.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.21.3"] + - cis_csc: ["3.7"] + references: + - 'CCE-36169-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> NoGPOListChanges -> 0' + + - id: 12108 + title: "Ensure 'Turn off background refresh of Group Policy' is set to 'Disabled'" + description: "This policy setting prevents Group Policy from being updated while the computer is in use. This policy setting applies to Group Policy for computers, users and Domain Controllers. The recommended state for this setting is: Disabled." + rationale: "This setting ensures that group policy changes take effect more quickly, as compared to waiting until the next user logon or system restart." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Turn off background refresh of Group Policy Note: This Group Policy path is provided by the Group Policy template GroupPolicy.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.8.21.4"] + - cis_csc: ["3.7"] + references: + - 'CCE-37712-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> DisableBkGndGroupPolicy -> 0' + + - id: 12109 + title: "Ensure 'Do not display network selection UI' is set to 'Enabled'" + description: "This policy setting allows you to control whether anyone can interact with available networks UI on the logon screen. The recommended state for this setting is: Enabled." + rationale: "An unauthorized user could disconnect the PC from the network or can connect the PC to other available networks without signing into Windows." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Do not display network selection UI Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.8.27.1"] + - cis_csc: ["5"] + references: + - 'CCE-38353-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DontDisplayNetworkSelectionUI -> 1' + + - id: 12110 + title: "Ensure 'Do not enumerate connected users on domain-joined computers' is set to 'Enabled'" + description: "This policy setting prevents connected users from being enumerated on domain-joined computers. The recommended state for this setting is: Enabled." + rationale: "A malicious user could use this feature to gather account names of other users, that information could then be used in conjunction with other types of attacks such as guessing passwords or social engineering. The value of this countermeasure is small because a user with domain credentials could gather the same account information using other methods." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Do not enumerate connected users on domain-joined computers Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.27.2"] + - cis_csc: ["16.9"] + references: + - 'CCE-37838-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DontEnumerateConnectedUsers -> 1' + + - id: 12111 + title: "Ensure 'Enumerate local users on domain-joined computers' is set to 'Disabled'" + description: "This policy setting allows local users to be enumerated on domain-joined computers. The recommended state for this setting is: Disabled." + rationale: "A malicious user could use this feature to gather account names of other users, that information could then be used in conjunction with other types of attacks such as guessing passwords or social engineering. The value of this countermeasure is small because a user with domain credentials could gather the same account information using other methods." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Enumerate local users on domain-joined computers Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.27.3"] + - cis_csc: ["16.9"] + references: + - 'CCE-35894-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnumerateLocalUsers -> 0' + + - id: 12112 + title: "Ensure 'Turn off app notifications on the lock screen' is set to 'Enabled'" + description: "This policy setting allows you to prevent app notifications from appearing on the lock screen. The recommended state for this setting is: Enabled." + rationale: "App notifications might display sensitive business or personal data." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Turn off app notifications on the lock screen Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.27.4"] + - cis_csc: ["16.5"] + references: + - 'CCE-35893-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DisableLockScreenAppNotifications -> 1' + + - id: 12113 + title: "Ensure 'Turn on convenience PIN sign-in' is set to 'Disabled'" + description: "This policy setting allows you to control whether a domain user can sign in using a convenience PIN. In Windows 10, convenience PIN was replaced with Passport, which has stronger security properties. To configure Passport for domain users, use the policies under Computer Configuration\\Administrative Templates\\Windows Components\\Microsoft Passport for Work. Note: The user's domain password will be cached in the system vault when using this feature. The recommended state for this setting is: Disabled." + rationale: "A PIN is created from a much smaller selection of characters than a password, so in most cases a PIN will be much less robust than a password." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Turn on convenience PIN sign-in Note: This Group Policy path may not exist by default. It is provided by the Group Policy template CredentialProviders.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer). Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Turn on PIN sign-in, but it was renamed starting with the Windows 10 Release 1511 Administrative Templates." + compliance: + - cis: ["18.8.27.6"] + - cis_csc: ["16.5"] + references: + - 'CCE-37528-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> AllowDomainPINLogon -> 0' + + - id: 12114 + title: "Ensure 'Configure Offer Remote Assistance' is set to 'Disabled'" + description: "This policy setting allows you to turn on or turn off Offer (Unsolicited) Remote Assistance on this computer. Help desk and support personnel will not be able to proactively offer assistance, although they can still respond to user assistance requests. The recommended state for this setting is: Disabled." + rationale: "A user might be tricked and accept an unsolicited Remote Assistance offer from a malicious user." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Assistance\\Configure Offer Remote Assistance Note: This Group Policy path may not exist by default. It is provided by the Group Policy template RemoteAssistance.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.35.1"] + - cis_csc: ["9.1"] + references: + - 'CCE-36388-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fAllowUnsolicited -> 0' + + - id: 12115 + title: "Ensure 'Configure Solicited Remote Assistance' is set to 'Disabled'" + description: "This policy setting allows you to turn on or turn off Solicited (Ask for) Remote Assistance on this computer. The recommended state for this setting is: Disabled." + rationale: "There is slight risk that a rogue administrator will gain access to another user's desktop session, however, they cannot connect to a user's computer unannounced or control it without permission from the user. When an expert tries to connect, the user can still choose to deny the connection or give the expert view-only privileges. The user must explicitly click the Yes button to allow the expert to remotely control the workstation." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Assistance\\Configure Solicited Remote Assistance Note: This Group Policy path may not exist by default. It is provided by the Group Policy template RemoteAssistance.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.35.2"] + - cis_csc: ["5.1"] + references: + - 'CCE-37281-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fAllowToGetHelp -> 0' + + - id: 12116 + title: "Ensure 'Enable RPC Endpoint Mapper Client Authentication' is set to 'Enabled'" + description: "This policy setting controls whether RPC clients authenticate with the Endpoint Mapper Service when the call they are making contains authentication information. The Endpoint Mapper Service on computers running Windows NT4 (all service packs) cannot process authentication information supplied in this manner. This policy setting can cause a specific issue with 1-way forest trusts if it is applied to the trusting domain DCs (see Microsoft KB3073942), so we do not recommend applying it to Domain Controllers. Note: This policy will not be in effect until the system is rebooted. The recommended state for this setting is: Enabled." + rationale: "Anonymous access to RPC services could result in accidental disclosure of information to unauthenticated users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Procedure Call\\Enable RPC Endpoint Mapper Client Authentication Note: This Group Policy path may not exist by default. It is provided by the Group Policy template RPC.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.8.36.1"] + - cis_csc: ["9.1"] + references: + - https://support.microsoft.com/en-us/help/3073942/rpc-endpoint-mapper-client-authentication-prevents-users-and-groups-fr + - 'CCE-37346-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Rpc -> EnableAuthEpResolution -> 1' + +# Section 18.9 - Windows Components + - id: 12117 + title: "Ensure 'Allow Microsoft accounts to be optional' is set to 'Enabled'" + description: "This policy setting lets you control whether Microsoft accounts are optional for Windows Store apps that require an account to sign in. This policy only affects Windows Store apps that support it. The recommended state for this setting is: Enabled." + rationale: "Enabling this setting allows an organization to use their enterprise user accounts instead of using their Microsoft accounts when accessing Windows store apps. This provides the organization with greater control over relevant credentials. Microsoft accounts cannot be centrally managed and as such enterprise credential security policies cannot be applied to them, which could put any information accessed by using Microsoft accounts at risk." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\App runtime\\Allow Microsoft accounts to be optional Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AppXRuntime.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.6.1"] + - cis_csc: ["16.9"] + references: + - 'CCE-38354-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> MSAOptional -> 1' + + - id: 12118 + title: "Ensure 'Disallow Autoplay for non-volume devices' is set to 'Enabled'" + description: "This policy setting disallows AutoPlay for MTP devices like cameras or phones. The recommended state for this setting is: Enabled." + rationale: "An attacker could use this feature to launch a program to damage a client computer or data on the computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Disallow Autoplay for non-volume devices Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AutoPlay.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.9.8.1"] + - cis_csc: ["8.3"] + references: + - 'CCE-37636-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoAutoplayfornonVolume -> 1' + + - id: 12119 + title: "Ensure 'Set the default behavior for AutoRun' is set to 'Enabled: Do not execute any autorun commands'" + description: "This policy setting sets the default behavior for Autorun commands. Autorun commands are generally stored in autorun.inf files. They often launch the installation program or other routines. The recommended state for this setting is: Enabled: Do not execute any autorun commands." + rationale: "Prior to Windows Vista, when media containing an autorun command is inserted, the system will automatically execute the program without user intervention. This creates a major security concern as code may be executed without user's knowledge. The default behavior starting with Windows Vista is to prompt the user whether autorun command is to be run. The autorun command is represented as a handler in the Autoplay dialog." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Do not execute any autorun commands: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Set the default behavior for AutoRun Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AutoPlay.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.9.8.2"] + - cis_csc: ["8.3"] + references: + - 'CCE-38217-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoAutorun -> 1' + + - id: 12120 + title: "Ensure 'Turn off Autoplay' is set to 'Enabled: All drives'" + description: "Autoplay starts to read from a drive as soon as you insert media in the drive, which causes the setup file for programs or audio media to start immediately. An attacker could use this feature to launch a program to damage the computer or data on the computer. Autoplay is disabled by default on some removable drive types, such as floppy disk and network drives, but not on CD-ROM drives. Note: You cannot use this policy setting to enable Autoplay on computer drives in which it is disabled by default, such as floppy disk and network drives. The recommended state for this setting is: Enabled: All drives." + rationale: "An attacker could use this feature to launch a program to damage a client computer or data on the computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: All drives: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Turn off Autoplay Note: This Group Policy path is provided by the Group Policy template AutoPlay.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.8.3"] + - cis_csc: ["8.3"] + references: + - 'CCE-36875-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoDriveTypeAutoRun -> 255' + + - id: 12121 + title: "Ensure 'Do not display the password reveal button' is set to 'Enabled'" + description: "This policy setting allows you to configure the display of the password reveal button in password entry user experiences. The recommended state for this setting is: Enabled." + rationale: "This is a useful feature when entering a long and complex password, especially when using a touchscreen. The potential risk is that someone else may see your password while surreptitiously observing your screen." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Credential User Interface\\Do not display the password reveal button Note: This Group Policy path may not exist by default. It is provided by the Group Policy template CredUI.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.9.15.1"] + - cis_csc: ["16"] + references: + - 'CCE-37534-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredUI -> DisablePasswordReveal -> 1' + + - id: 12122 + title: "Ensure 'Enumerate administrator accounts on elevation' is set to 'Disabled'" + description: "This policy setting controls whether administrator accounts are displayed when a user attempts to elevate a running application. The recommended state for this setting is: Disabled." + rationale: "Users could see the list of administrator accounts, making it slightly easier for a malicious user who has logged onto a console session to try to crack the passwords of those accounts." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Credential User Interface\\Enumerate administrator accounts on elevation Note: This Group Policy path is provided by the Group Policy template CredUI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.15.2"] + - cis_csc: ["16"] + references: + - 'CCE-36512-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\CredUI -> EnumerateAdministrators -> 0' + + - id: 12123 + title: "Ensure 'Application: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" + description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." + rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Application\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.1.1"] + - cis_csc: ["6.3"] + references: + - 'CCE-37775-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> Retention -> 0' + + - id: 12124 + title: "Ensure 'Application: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" + description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 32,768 or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Application\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.1.2"] + - cis_csc: ["6.3"] + references: + - 'CCE-37948-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> n:^(\d+) compare >= 32768' + + - id: 12125 + title: "Ensure 'Security: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" + description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." + rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Security\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.2.1"] + - cis_csc: ["6.3"] + references: + - 'CCE-37145-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> Retention -> 0' + + - id: 12126 + title: "Ensure 'Security: Specify the maximum log file size (KB)' is set to 'Enabled: 196,608 or greater'" + description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 196,608 or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 196,608 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Security\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.2.2"] + - cis_csc: ["6.3"] + references: + - 'CCE-37695-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> n:^(\d+) compare >= 196608' + + - id: 12127 + title: "Ensure 'Setup: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" + description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." + rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Setup\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.3.1"] + - cis_csc: ["6.3"] + references: + - 'CCE-38276-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> Retention -> 0' + + - id: 12128 + title: "Ensure 'Setup: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" + description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 32,768 or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Setup\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.3.2"] + - cis_csc: ["6.3"] + references: + - 'CCE-37526-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> n:^(\d+) compare >= 32768' + + - id: 12129 + title: "Ensure 'System: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" + description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." + rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\System\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.4.1"] + - cis_csc: ["6.3"] + references: + - 'CCE-36160-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> Retention -> 0' + + - id: 12130 + title: "Ensure 'System: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" + description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 32,768 or greater." + rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\System\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.26.4.2"] + - cis_csc: ["6.3"] + references: + - 'CCE-36092-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> n:^(\d+) compare >= 32768' + + - id: 12131 + title: "Ensure 'Turn off Data Execution Prevention for Explorer' is set to 'Disabled'" + description: "Disabling Data Execution Prevention can allow certain legacy plug-in applications to function without terminating Explorer. The recommended state for this setting is: Disabled." + rationale: "Data Execution Prevention is an important security feature supported by Explorer that helps to limit the impact of certain types of malware." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off Data Execution Prevention for Explorer Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Explorer.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.30.2"] + - cis_csc: ["8.4"] + references: + - 'CCE-37809-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoDataExecutionPrevention -> 0' + + - id: 12132 + title: "Ensure 'Turn off heap termination on corruption' is set to 'Disabled'" + description: "This policy setting allows you to configure the amount of functionality that the shell protocol can have. When using the full functionality of this protocol, applications can open folders and launch files. The protected mode reduces the functionality of this protocol allowing applications to only open a limited set of folders. Applications are not able to open files with this protocol when it is in the protected mode. It is recommended to leave this protocol in the protected mode to increase the security of Windows. The recommended state for this setting is: Disabled." + rationale: "Limiting the opening of files and folders to a limited set reduces the attack surface of the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off shell protocol protected mode Note: This Group Policy path is provided by the Group Policy template WindowsExplorer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.30.3"] + - cis_csc: ["8.4"] + references: + - 'CCE-36660-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoHeapTerminationOnCorruption -> 0' + + - id: 12133 + title: "Ensure 'Turn off shell protocol protected mode' is set to 'Disabled'" + description: "This policy setting allows you to configure the amount of functionality that the shell protocol can have. When using the full functionality of this protocol, applications can open folders and launch files. The protected mode reduces the functionality of this protocol allowing applications to only open a limited set of folders. Applications are not able to open files with this protocol when it is in the protected mode. It is recommended to leave this protocol in the protected mode to increase the security of Windows. The recommended state for this setting is: Disabled." + rationale: "Limiting the opening of files and folders to a limited set reduces the attack surface of the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off shell protocol protected mode Note: This Group Policy path is provided by the Group Policy template WindowsExplorer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.30.4"] + - cis_csc: ["8.4"] + references: + - 'CCE-36809-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> PreXPSP2ShellProtocolBehavior -> 0' + + - id: 12134 + title: "Ensure 'Prevent the usage of OneDrive for file storage' is set to 'Enabled'" + description: "This policy setting lets you prevent apps and features from working with files on OneDrive using the Next Generation Sync Client. The recommended state for this setting is: Enabled." + rationale: "Enabling this setting prevents users from accidentally uploading confidential or sensitive corporate information to the OneDrive cloud service using the Next Generation Sync Client." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\OneDrive\\Prevent the usage of OneDrive for file storage Note: This Group Policy path may not exist by default. It is provided by the Group Policy template SkyDrive.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer). However, we strongly recommend you only use the version included with the Microsoft Windows 10 Release 1607 & Server 2016 Administrative Templates (or newer). Older versions of the templates had conflicting settings in different template files for both OneDrive & SkyDrive, until it was cleaned up properly in the above version. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Prevent the usage of SkyDrive for file storage, but it was renamed starting with the Windows 10 RTM (Release 1507) Administrative Templates." + compliance: + - cis: ["18.9.52.1"] + - cis_csc: ["13"] + references: + - 'CCE-36939-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\OneDrive -> DisableFileSyncNGSC -> 1' + + - id: 12135 + title: "Ensure 'Prevent the usage of OneDrive for file storage on Windows 8.1' is set to 'Enabled'" + description: "This policy setting lets you prevent apps and features from working with files on OneDrive using the legacy OneDrive/SkyDrive client. The recommended state for this setting is: Enabled. Note: Despite the name of this setting, it is applicable to the legacy OneDrive client on any Windows OS." + rationale: "Enabling this setting prevents users from accidentally uploading confidential or sensitive corporate information to the OneDrive cloud service using the legacy OneDrive/SkyDrive client." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\OneDrive\\Prevent the usage of OneDrive for file storage on Windows 8.1 Note: This Group Policy path may not exist by default. It is provided by the Group Policy template SkyDrive.admx/adml that is included with the Microsoft Windows 10 Release 1607 & Server 2016 Administrative Templates (or newer). We strongly recommend you only use either that version of the template or a newer one. Older versions of the templates had conflicting settings in different template files for both OneDrive & SkyDrive, until it was cleaned up properly in the above version." + compliance: + - cis: ["18.9.52.2"] + - cis_csc: ["13"] + references: + - 'CCE-36939-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Skydrive -> DisableFileSync -> 1' + + - id: 12136 + title: "Ensure 'Do not allow passwords to be saved' is set to 'Enabled'" + description: "This policy setting helps prevent Remote Desktop clients from saving passwords on a computer. The recommended state for this setting is: Enabled. Note: If this policy setting was previously configured as Disabled or Not configured, any previously saved passwords will be deleted the first time a Remote Desktop client disconnects from any server." + rationale: "An attacker with physical access to the computer may be able to break the protection guarding saved passwords. An attacker who compromises a user's account and connects to their computer could use saved passwords to gain access to additional hosts." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Connection Client\\Do not allow passwords to be saved Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.2.2"] + - cis_csc: ["16.4"] + references: + - 'CCE-36223-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> DisablePasswordSaving -> 1' + + - id: 12137 + title: "Ensure 'Do not allow drive redirection' is set to 'Enabled'" + description: "This policy setting prevents users from sharing the local drives on their client computers to Remote Desktop Servers that they access. Mapped drives appear in the session folder tree in Windows Explorer in the following format: \\\\TSClient\\$ If local drives are shared they are left vulnerable to intruders who want to exploit the data that is stored on them. The recommended state for this setting is: Enabled." + rationale: "Data could be forwarded from the user's Remote Desktop Services session to the user's local computer without any direct user interaction. Malicious software already present on a compromised server would have direct and stealthy disk access to the user's local computer during the Remote Desktop session." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow drive redirection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.3.2"] + - cis_csc: ["13"] + references: + - 'CCE-36509-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableCdm -> 1' + + - id: 12138 + title: "Ensure 'Always prompt for password upon connection' is set to 'Enabled'" + description: "This policy setting specifies whether Remote Desktop Services always prompts the client computer for a password upon connection. You can use this policy setting to enforce a password prompt for users who log on to Remote Desktop Services, even if they already provided the password in the Remote Desktop Connection client. The recommended state for this setting is: Enabled." + rationale: "Users have the option to store both their username and password when they create a new Remote Desktop Connection shortcut. If the server that runs Remote Desktop Services allows users who have used this feature to log on to the server but not enter their password, then it is possible that an attacker who has gained physical access to the user's computer could connect to a Remote Desktop Server through the Remote Desktop Connection shortcut, even though they may not know the user's password." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Always prompt for password upon connection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In the Microsoft Windows Vista Administrative Templates, this setting was named Always prompt client for password upon connection, but it was renamed starting with the Windows Server 2008 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.58.3.9.1"] + - cis_csc: ["16.14"] + references: + - 'CCE-37929-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fPromptForPassword -> 1' + + - id: 12139 + title: "Ensure 'Require secure RPC communication' is set to 'Enabled'" + description: "This policy setting allows you to specify whether Remote Desktop Services requires secure Remote Procedure Call (RPC) communication with all clients or allows unsecured communication. You can use this policy setting to strengthen the security of RPC communication with clients by allowing only authenticated and encrypted requests. The recommended state for this setting is: Enabled." + rationale: "Allowing unsecure RPC communication can exposes the server to man in the middle attacks and data disclosure attacks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Require secure RPC communication Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.9.2"] + - cis_csc: ["3.4"] + references: + - 'CCE-37567-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fEncryptRPCTraffic -> 1' + + - id: 12140 + title: "Ensure 'Set client connection encryption level' is set to 'Enabled: High Level'" + description: "This policy setting specifies whether to require the use of a specific encryption level to secure communications between client computers and RD Session Host servers during Remote Desktop Protocol (RDP) connections. This policy only applies when you are using native RDP encryption. However, native RDP encryption (as opposed to SSL encryption) is not recommended. This policy does not apply to SSL encryption. The recommended state for this setting is: Enabled: High Level." + rationale: "If Remote Desktop client connections that use low level encryption are allowed, it is more likely that an attacker will be able to decrypt any captured Remote Desktop Services network traffic." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: High Level: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Set client connection encryption level Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.9.3"] + - cis_csc: ["3.4"] + references: + - 'CCE-36627-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MinEncryptionLevel -> 3' + + - id: 12141 + title: "Ensure 'Do not delete temp folders upon exit' is set to 'Disabled'" + description: "This policy setting specifies whether Remote Desktop Services retains a user's per-session temporary folders at logoff. The recommended state for this setting is: Disabled." + rationale: "Sensitive information could be contained inside the temporary folders and visible to other administrators that log into the system." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Temporary Folders\\Do not delete temp folders upon exit Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Do not delete temp folder upon exit, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.58.3.11.1"] + - cis_csc: ["14.4"] + references: + - 'CCE-37946-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> DeleteTempDirsOnExit -> 1' + + - id: 12142 + title: "Ensure 'Do not use temporary folders per session' is set to 'Disabled'" + description: "By default, Remote Desktop Services creates a separate temporary folder on the RD Session Host server for each active session that a user maintains on the RD Session Host server. The temporary folder is created on the RD Session Host server in a Temp folder under the user's profile folder and is named with the sessionid. This temporary folder is used to store individual temporary files. To reclaim disk space, the temporary folder is deleted when the user logs off from a session. The recommended state for this setting is: Disabled." + rationale: "Disabling this setting keeps the cached data independent for each session, both reducing the chance of problems from shared cached data between sessions, and keeping possibly sensitive data separate to each user session." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Temporary Folders\\Do not use temporary folders per session Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.58.3.11.2"] + - cis_csc: ["14.4"] + references: + - 'CCE-38180-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> PerSessionTempDir -> 1' + + - id: 12143 + title: "Ensure 'Prevent downloading of enclosures' is set to 'Enabled'" + description: "This policy setting prevents the user from having enclosures (file attachments) downloaded from an RSS feed to the user's computer. The recommended state for this setting is: Enabled." + rationale: "Allowing attachments to be downloaded through the RSS feed can introduce files that could have malicious intent." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\RSS Feeds\\Prevent downloading of enclosures Note: This Group Policy path is provided by the Group Policy template InetRes.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Turn off downloading of enclosures, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.59.1"] + - cis_csc: ["7.2"] + references: + - 'CCE-37126-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Feeds -> DisableEnclosureDownload -> 1' + + - id: 12144 + title: "Ensure 'Allow indexing of encrypted files' is set to 'Disabled'" + description: "This policy setting controls whether encrypted items are allowed to be indexed. When this setting is changed, the index is rebuilt completely. Full volume encryption (such as BitLocker Drive Encryption or a non-Microsoft solution) must be used for the location of the index to maintain security for encrypted files. The recommended state for this setting is: Disabled." + rationale: "Indexing and allowing users to search encrypted files could potentially reveal confidential data stored within the encrypted files." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Allow indexing of encrypted files Note: This Group Policy path is provided by the Group Policy template Search.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.60.2"] + - cis_csc: ["13.1"] + references: + - 'CCE-38277-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> AllowIndexingEncryptedStoresOrItems -> 0' + + - id: 12145 + title: "Ensure 'Configure Windows Defender SmartScreen' is set to 'Enabled: Warn and prevent bypass'" + description: "This policy setting allows you to manage the behavior of Windows SmartScreen. Windows SmartScreen helps keep PCs safer by warning users before running unrecognized programs downloaded from the Internet. Some information is sent to Microsoft about files and programs run on PCs with this feature enabled. The recommended state for this setting is: Enabled: Warn and prevent bypass." + rationale: "Windows SmartScreen helps keep PCs safer by warning users before running unrecognized programs downloaded from the Internet. However, due to the fact that some information is sent to Microsoft about files and programs run on PCs some organizations may prefer to disable it." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Warn and prevent bypass: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender SmartScreen\\Explorer\\Configure Windows Defender SmartScreen Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsExplorer.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer). Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Configure Windows SmartScreen, but it was renamed starting with the Windows 10 Release 1703 Administrative Templates." + compliance: + - cis: ["18.9.80.1.1"] + - cis_csc: ["2"] + references: + - 'CCE-35859-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnableSmartScreen -> 2' + + - id: 12146 + title: "Ensure 'Configure Default consent' is set to 'Enabled: Always ask before sending data'" + description: "This setting allows you to set the default consent handling for error reports. The recommended state for this setting is: Enabled: Always ask before sending data." + rationale: "Error reports may contain sensitive information and should not be sent to anyone automatically." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Always ask before sending data: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Error Reporting\\Consent\\Configure Default consent Note: This Group Policy path is provided by the Group Policy template ErrorReporting.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.81.2.1"] + - cis_csc: ["13"] + references: + - 'CCE-37112-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent -> DefaultConsent -> 1' + + - id: 12147 + title: "Ensure 'Automatically send memory dumps for OS-generated error reports' is set to 'Disabled'" + description: "This policy setting controls whether memory dumps in support of OS-generated error reports can be sent to Microsoft automatically. This policy does not apply to error reports generated by 3rd-party products, or additional data other than memory dumps. The recommended state for this setting is: Disabled." + rationale: "Memory dumps may contain sensitive information and should not be automatically sent to anyone." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Error Reporting\\Automatically send memory dumps for OS- generated error reports Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ErrorReporting.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.81.3"] + - cis_csc: ["13"] + references: + - 'CCE-36978-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> AutoApproveOSDumps -> 0' + + - id: 12148 + title: "Ensure 'Allow user control over installs' is set to 'Disabled'" + description: "This setting controls whether users are permitted to change installation options that typically are available only to system administrators. The security features of Windows Installer normally prevent users from changing installation options that are typically reserved for system administrators, such as specifying the directory to which files are installed. If Windows Installer detects that an installation package has permitted the user to change a protected option, it stops the installation and displays a message. These security features operate only when the installation program is running in a privileged security context in which it has access to directories denied to the user. The recommended state for this setting is: Disabled." + rationale: "In an enterprise managed environment, only IT staff with administrative rights should be installing or changing software on a system. Allowing users the ability to have any control over installs can risk unapproved software from being installed or removed from a system, which could cause the system to become vulnerable to compromise." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Allow user control over installs Note: This Group Policy path is provided by the Group Policy template MSI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Enable user control over installs, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." + compliance: + - cis: ["18.9.85.1"] + - cis_csc: ["5.1"] + references: + - 'CCE-36400-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> EnableUserControl -> 0' + + - id: 12149 + title: "Ensure 'Always install with elevated privileges' is set to 'Disabled'" + description: "This setting controls whether or not Windows Installer should use system permissions when it installs any program on the system. Note: This setting appears both in the Computer Configuration and User Configuration folders. To make this setting effective, you must enable the setting in both folders. Caution: If enabled, skilled users can take advantage of the permissions this setting grants to change their privileges and gain permanent access to restricted files and folders. Note that the User Configuration version of this setting is not guaranteed to be secure. The recommended state for this setting is: Disabled." + rationale: "Users with limited privileges can exploit this feature by creating a Windows Installer installation package that creates a new local account that belongs to the local built-in Administrators group, adds their current account to the local built-in Administrators group, installs malicious software, or performs other unauthorized activities." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Always install with elevated privileges Note: This Group Policy path is provided by the Group Policy template MSI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.85.2"] + - cis_csc: ["5.1"] + references: + - 'CCE-36919-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> AlwaysInstallElevated -> 0' + + - id: 12150 + title: "Ensure 'Sign-in last interactive user automatically after a system-initiated restart' is set to 'Disabled'" + description: "This policy setting controls whether a device will automatically sign-in the last interactive user after Windows Update restarts the system. The recommended state for this setting is: Disabled." + rationale: "Disabling this feature will prevent the caching of user's credentials and unauthorized use of the device, and also ensure the user is aware of the restart." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Logon Options\\Sign-in last interactive user automatically after a system-initiated restart Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WinLogon.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." + compliance: + - cis: ["18.9.86.1"] + - cis_csc: ["16.5"] + references: + - 'CCE-36977-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> DisableAutomaticRestartSignOn -> 1' + + - id: 12151 + title: "Ensure 'Turn on PowerShell Script Block Logging' is set to 'Disabled'" + description: "This policy setting enables logging of all PowerShell script input to the Microsoft-Windows- PowerShell/Operational event log. The recommended state for this setting is: Disabled. Note: In Microsoft's own hardening guidance, they recommend the opposite value, Enabled, because having this data logged improves investigations of PowerShell attack incidents. However, the default ACL on the PowerShell Operational log allows Interactive User (i.e. any logged on user) to read it, and therefore possibly expose passwords or other sensitive information to unauthorized users. If Microsoft locks down the default ACL on that log in the future (e.g. to restrict it only to Administrators), then we will revisit this recommendation in a future release." + rationale: "There are potential risks of capturing passwords in the PowerShell logs. This setting should only be needed for debugging purposes, and not in normal operation, it is important to ensure this is set to Disabled." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows PowerShell\\Turn on PowerShell Script Block Logging Note: This Group Policy path may not exist by default. It is provided by the Group Policy template PowerShellExecutionPolicy.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." + compliance: + - cis: ["18.9.95.1"] + - cis_csc: ["16.4"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging -> EnableScriptBlockLogging -> 0' + + - id: 12152 + title: "Ensure 'Turn on PowerShell Transcription' is set to 'Disabled'" + description: "This Policy setting lets you capture the input and output of Windows PowerShell commands into text-based transcripts. The recommended state for this setting is: Disabled." + rationale: "If this setting is enabled there is a risk that passwords could get stored in plain text in the PowerShell_transcript output file." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows PowerShell\\Turn on PowerShell Transcription Note: This Group Policy path may not exist by default. It is provided by the Group Policy template PowerShellExecutionPolicy.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." + compliance: + - cis: ["18.9.95.2"] + - cis_csc: ["16.4"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription -> EnableTranscripting -> 0' + + - id: 12153 + title: "Ensure 'Allow Basic authentication' is set to 'Disabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client uses Basic authentication. The recommended state for this setting is: Disabled." + rationale: "Basic authentication is less robust than other authentication methods available in WinRM because credentials including passwords are transmitted in plain text. An attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Allow Basic authentication Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.97.1.1"] + - cis_csc: ["16.13"] + references: + - 'CCE-36310-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowBasic -> 0' + + - id: 12154 + title: "Ensure 'Allow unencrypted traffic' is set to 'Disabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client sends and receives unencrypted messages over the network. The recommended state for this setting is: Disabled." + rationale: "Encrypting WinRM network traffic reduces the risk of an attacker viewing or modifying WinRM messages as they transit the network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Allow unencrypted traffic Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.97.1.2"] + - cis_csc: ["16.13"] + references: + - 'CCE-37726-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowUnencryptedTraffic -> 0' + + - id: 12155 + title: "Ensure 'Disallow Digest authentication' is set to 'Enabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client will not use Digest authentication. The recommended state for this setting is: Enabled." + rationale: "Digest authentication is less robust than other authentication methods available in WinRM, an attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Disallow Digest authentication Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.97.1.3"] + - cis_csc: ["16.13"] + references: + - 'CCE-38318-2' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowDigest -> 0' + + - id: 12156 + title: "Ensure 'Allow Basic authentication' is set to 'Disabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service accepts Basic authentication from a remote client. The recommended state for this setting is: Disabled." + rationale: "Basic authentication is less robust than other authentication methods available in WinRM because credentials including passwords are transmitted in plain text. An attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow Basic authentication Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.97.2.1"] + - cis_csc: ["16.13"] + references: + - 'CCE-36254-1' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowBasic -> 0' + + - id: 12157 + title: "Ensure 'Allow unencrypted traffic' is set to 'Disabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service sends and receives unencrypted messages over the network. The recommended state for this setting is: Disabled." + rationale: "Encrypting WinRM network traffic reduces the risk of an attacker viewing or modifying WinRM messages as they transit the network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow unencrypted traffic Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.97.2.3"] + - cis_csc: ["16.13"] + references: + - 'CCE-38223-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowUnencryptedTraffic -> 0' + + - id: 12158 + title: "Ensure 'Disallow WinRM from storing RunAs credentials' is set to 'Enabled'" + description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service will allow RunAs credentials to be stored for any plug-ins. The recommended state for this setting is: Enabled. Note: If you enable and then disable this policy setting, any values that were previously configured for RunAsPassword will need to be reset." + rationale: "Although the ability to store RunAs credentials is a convenient feature it increases the risk of account compromise slightly. For example, if you forget to lock your desktop before leaving it unattended for a few minutes another person could access not only the desktop of your computer but also any hosts you manage via WinRM with cached RunAs credentials." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Disallow WinRM from storing RunAs credentials Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis: ["18.9.97.2.4"] + - cis_csc: ["16.4"] + references: + - 'CCE-36000-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> DisableRunAs -> 1' + + - id: 12159 + title: "Ensure 'Configure Automatic Updates' is set to 'Enabled'" + description: "This policy setting specifies whether computers in your environment will receive security updates from Windows Update or WSUS. If you configure this policy setting to Enabled, the operating system will recognize when a network connection is available and then use the network connection to search Windows Update or your designated intranet site for updates that apply to them. After you configure this policy setting to Enabled, select one of the following three options in the Configure Automatic Updates Properties dialog box to specify how the service will work: - 2 - Notify for download and auto install (Notify before downloading any updates) - 3 - Auto download and notify for install (Download the updates automatically and notify when they are ready to be installed.) (Default setting) - 4 - Auto download and schedule the install (Automatically download updates and install them on the schedule specified below.)) - 5 - Allow local admin to choose setting (Leave decision on above choices up to the local Administrators (Not Recommended)) The recommended state for this setting is: Enabled. Note: The sub-setting 'Configure automatic updating:' has 4 possible values - all of them are valid depending on specific organizational needs, however if feasible we suggest using a value of 4 - Auto download and schedule the install. This suggestion is not a scored requirement. Note #2: Organizations that utilize a 3rd-party solution for patching may choose to exempt themselves from this setting, and instead configure it to Disabled so that the native Windows Update mechanism does not interfere with the 3rd-party patching process." + rationale: "Although each version of Windows is thoroughly tested before release, it is possible that problems will be discovered after the products are shipped. The Configure Automatic Updates setting can help you ensure that the computers in your environment will always have the most recent critical operating system updates and service packs installed." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Configure Automatic Updates Note: This Group Policy path is provided by the Group Policy template WindowsUpdate.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.101.2"] + - cis_csc: ["4.5"] + references: + - 'CCE-36172-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> NoAutoUpdate -> 0' + + - id: 12160 + title: "Ensure 'Configure Automatic Updates: Scheduled install day' is set to '0 - Every day'" + description: "This policy setting specifies when computers in your environment will receive security updates from Windows Update or WSUS. The recommended state for this setting is: 0 - Every day. Note: This setting is only applicable if 4 - Auto download and schedule the install is selected in Rule 18.9.101.2. It will have no impact if any other option is selected." + rationale: "Although each version of Windows is thoroughly tested before release, it is possible that problems will be discovered after the products are shipped. The Configure Automatic Updates setting can help you ensure that the computers in your environment will always have the most recent critical operating system updates and service packs installed." + remediation: "To establish the recommended configuration via GP, set the following UI path to 0 - Every day: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Configure Automatic Updates: Scheduled install day Note: This Group Policy path is provided by the Group Policy template WindowsUpdate.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis: ["18.9.101.3"] + - cis_csc: ["4.5"] + references: + - 'CCE-36172-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> ScheduledInstallDay -> 0' + + - id: 12161 + title: "Ensure 'No auto-restart with logged on users for scheduled automatic updates installations' is set to 'Disabled'" + description: "This policy setting specifies that Automatic Updates will wait for computers to be restarted by the users who are logged on to them to complete a scheduled installation. The recommended state for this setting is: Disabled. Note: This setting applies only when you configure Automatic Updates to perform scheduled update installations. If you configure the Configure Automatic Updates setting to Disabled, this setting has no effect." + rationale: "Some security updates require that the computer be restarted to complete an installation. If the computer cannot restart automatically, then the most recent update will not completely install and no new updates will download to the computer until it is restarted. Without the auto-restart functionality, users who are not security-conscious may choose to indefinitely delay the restart, therefore keeping the computer in a less secure state." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\No auto-restart with logged on users for scheduled automatic updates installations Note: This Group Policy path is provided by the Group Policy template WindowsUpdate.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named No auto-restart for scheduled Automatic Updates installations, but it was renamed starting with the Windows 7 & Server 2008 R2 Administrative Templates." + compliance: + - cis: ["18.9.101.4"] + - cis_csc: ["4.5"] + references: + - 'CCE-37027-0' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> NoAutoRebootWithLoggedOnUsers -> 0' diff --git a/sca/windows/cis_win2012r2_memberL1_rcl.yml b/sca/windows/cis_win2012r2_memberL1_rcl.yml deleted file mode 100644 index 282f898f6..000000000 --- a/sca/windows/cis_win2012r2_memberL1_rcl.yml +++ /dev/null @@ -1,2103 +0,0 @@ -# Security Configuration assessment -# CIS Checks for Windows 2012 R2 Member Server L1 -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# -# Based on: -# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.3.0 - 03-30-2018 -# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.1.0 - 11-02-2015 -# Center for Internet Security Benchmark for Microsoft Windows Server 2012 R2 v2.0.0 - 09-30-2015 - -policy: - id: "cis_win2012r2_memberL1" - file: "cis_win2012r2_memberL1_rcl.yml" - name: "CIS benchmark for Windows 2012 R2 Member Server L1" - description: "This document provides prescriptive guidance for establishing a secure configuration posture for Microsoft Windows Server 2012 R2." - references: - - https://www.cisecurity.org/cis-benchmarks/ - -requirements: - title: "Check that the Windows platform is Windows Server 2012 R2" - description: "Requirements for running the CIS benchmark Member Server L1 under Windows Server 2012 R2" - condition: "any required" - rules: - - 'r:HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion -> ProductName -> r:^Windows Server 2012 R2;' - -checks: -# Section 1.1 - Password Policies - - id: 9000 - title: "Ensure 'Maximum password age' is set to '60 or fewer days, but not 0'" - description: "This policy setting defines how long a user can use their password before it expires. Values for this policy setting range from 0 to 999 days. If you set the value to 0, the password will never expire. Because attackers can crack passwords, the more frequently you change the password the less opportunity an attacker has to use a cracked password. However, the lower this value is set, the higher the potential for an increase in calls to help desk support due to users having to change their password or forgetting which password is current. The recommended state for this setting is 60 or fewer days, but not 0 ." - rationale: "The longer a password exists the higher the likelihood that it will be compromised by a brute force attack, by an attacker gaining general knowledge about the user, or by the user sharing the password. Configuring the Maximum password age setting to 0 so that users are never required to change their passwords is a major security risk because that allows a compromised password to be used by the malicious user for as long as the valid user is authorized access." - remediation: "To establish the recommended configuration via GP, set the following UI path to 60 or fewer days, but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Account Policies\\Password Policy\\Maximum password age." - compliance: - - cis: "1.1.2" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> 0;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> 3D;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> 3E;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> 3F;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:4\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:5\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:6\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:7\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:8\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:9\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:A\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:B\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:C\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:D\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:E\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:F\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> MaximumPasswordAge -> r:\w\w\w+;' -# Section 2.3 - Security Options - - id: 9001 - title: "Ensure 'Accounts: Block Microsoft accounts' is set to 'Users can't add or log on with Microsoft accounts" - description: "This policy setting prevents users from adding new Microsoft accounts on this computer. The recommended state for this setting is: Users can't add or log on with Microsoft accounts." - rationale: "Organizations that want to effectively implement identity management policies and maintain firm control of what accounts are used to log onto their computers will probably want to block Microsoft accounts. Organizations may also need to block Microsoft accounts in order to meet the requirements of compliance standards that apply to their information systems." - remediation: "To establish the recommended configuration via GP, set the following UI path to Users can't add or log on with Microsoft accounts : Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Accounts: Block Microsoft accounts." - compliance: - - cis: "2.3.1.2" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> NoConnectedUser -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> NoConnectedUser -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !NoConnectedUser;' - - id: 9002 - title: "Ensure 'Accounts: Limit local account use of blank passwords to console logon only' is set to 'Enabled" - description: "This policy setting determines whether local accounts that are not password protected can be used to log on from locations other than the physical computer console. If you enable this policy setting, local accounts that have blank passwords will not be able to log on to the network from remote client computers. Such accounts will only be able to log on at the keyboard of the computer. The recommended state for this setting is: Enabled." - rationale: "Blank passwords are a serious threat to computer security and should be forbidden through both organizational policy and suitable technical measures. In fact, the default settings for Active Directory domains require complex passwords of at least seven characters. However, if users with the ability to create new accounts bypass your domain-based password policies, they could create accounts with blank passwords. For example, a user could build a stand-alone computer, create one or more accounts with blank passwords, and then join the computer to the domain. The local accounts with blank passwords would still function. Anyone who knows the name of one of these unprotected accounts could then use it to log on." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Accounts: Limit local account use of blank passwords to console logon only." - compliance: - - cis: "2.3.1.4" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LimitBlankPasswordUse -> 0;' - - id: 9003 - title: "Ensure 'Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings' is set to 'Enabled'" - description: "This policy setting allows administrators to enable the more precise auditing capabilities present in Windows Vista. The Audit Policy settings available in Windows Server 2003 Active Directory do not yet contain settings for managing the new auditing subcategories. To properly apply the auditing policies prescribed in this baseline, the Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings setting needs to be configured to Enabled. The recommended state for this setting is: Enabled. *Important*: Be very cautious about audit settings that can generate a large volume of traffic. For example, if you enable either success or failure auditing for all of the Privilege Use subcategories, the high volume of audit events generated can make it difficult to find other types of entries in the Security log. Such a configuration could also have a significant impact on system performance." - rationale: "Prior to the introduction of auditing subcategories in Windows Vista, it was difficult to track events at a per-system or per-user level. The larger event categories created too many events and the key information that needed to be audited was difficult to find." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings" - compliance: - - cis: "2.3.2.1" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> SCENoApplyLegacyAuditPolicy -> !1;' - - id: 9004 - title: "Ensure 'Audit: Shut down system immediately if unable to log security audits' is set to 'Disabled'" - description: "This policy setting determines whether the system shuts down if it is unable to log Security events. It is a requirement for Trusted Computer System Evaluation Criteria (TCSEC)-C2 and Common Criteria certification to prevent auditable events from occurring if the audit system is unable to log them. Microsoft has chosen to meet this requirement by halting the system and displaying a stop message if the auditing system experiences a failure. When this policy setting is enabled, the system will be shut down if a security audit cannot be logged for any reason. If the Audit: Shut down system immediately if unable to log security audits setting is enabled, unplanned system failures can occur. The administrative burden can be significant, especially if you also configure the Retention method for the Security log to Do not overwrite events (clear log manually). This configuration causes a repudiation threat (a backup operator could deny that they backed up or restored data) to become a denial of service (DoS) vulnerability, because a server could be forced to shut down if it is overwhelmed with logon events and other security events that are written to the Security log. Also, because the shutdown is not graceful, it is possible that irreparable damage to the operating system, applications, or data could result. Although the NTFS file system guarantees its integrity when an ungraceful computer shutdown occurs, it cannot guarantee that every data file for every application will still be in a usable form when the computer restarts. The recommended state for this setting is: Disabled." - rationale: "If the computer is unable to record events to the Security log, critical evidence or important troubleshooting information may not be available for review after a security incident. Also, an attacker could potentially generate a large volume of Security log events to purposely force a computer shutdown." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Audit: Shut down system immediately if unable to log security audits" - default_value: "Disabled." - compliance: - - cis: "2.3.2.2" - - cis_csc: "6" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> CrashOnAuditFail -> 1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> CrashOnAuditFail -> 2;' - - id: 9005 - title: "Ensure 'Devices: Allowed to format and eject removable media' is set to 'Administrators'" - description: "This policy setting determines who is allowed to format and eject removable NTFS media. You can use this policy setting to prevent unauthorized users from removing data on one computer to access it on another computer on which they have local administrator privileges. The recommended state for this setting is: Administrators." - rationale: "Users may be able to move data on removable disks to a different computer where they have administrative privileges. The user could then take ownership of any file, grant themselves full control, and view or modify any file. The fact that most removable storage devices will eject media by pressing a mechanical button diminishes the advantage of this policy setting." - remediation: "To establish the recommended configuration via GP, set the following UI path to Administrators: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Devices: Allowed to format and eject removable media" - compliance: - - cis: "2.3.4.1" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> AllocateDASD -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> AllocateDASD -> 2;' - - id: 9006 - title: "Ensure 'Devices: Prevent users from installing printer drivers' is set to 'Enabled'" - description: "For a computer to print to a shared printer, the driver for that shared printer must be installed on the local computer. This security setting determines who is allowed to install a printer driver as part of connecting to a shared printer. The recommended state for this setting is: Enabled. Note: This setting does not affect the ability to add a local printer. This setting does not affect Administrators." - rationale: "It may be appropriate in some organizations to allow users to install printer drivers on their own workstations. However, you should allow only Administrators, not users, to do so on servers, because printer driver installation on a server may unintentionally cause the computer to become less stable. A malicious user could install inappropriate printer drivers in a deliberate attempt to damage the computer, or a user might accidentally install malicious software that masquerades as a printer driver. It is feasible for an attacker to disguise a Trojan horse program as a printer driver. The program may appear to users as if they must use it to print, but such a program could unleash malicious code on your computer network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Devices: Prevent users from installing printer drivers" - compliance: - - cis: "2.3.4.2" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Providers\LanMan Print Services\Servers -> AddPrinterDrivers -> !1;' - - id: 9007 - title: "Ensure 'Domain member: Digitally encrypt or sign secure channel data (always)' is set to 'Enabled'" - description: "This policy setting determines whether all secure channel traffic that is initiated by the domain member must be signed or encrypted. The recommended state for this setting is: Enabled." - rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated—and sensitive information such as passwords are encrypted—but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally encrypt or sign secure channel data (always)" - compliance: - - cis: "2.3.6.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> RequireSignOrSeal -> 0;' - - id: 9008 - title: "Ensure 'Domain member: Digitally encrypt secure channel data (when possible)' is set to 'Enabled'" - description: "This policy setting determines whether a domain member should attempt to negotiate encryption for all secure channel traffic that it initiates. The recommended state for this setting is: Enabled." - rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated—and sensitive information such as passwords are encrypted—but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally encrypt secure channel data (when possible)" - compliance: - - cis: "2.3.6.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> SealSecureChannel -> 0;' - - id: 9009 - title: "Ensure 'Domain member: Digitally sign secure channel data (when possible)' is set to 'Enabled'" - description: "This policy setting determines whether a domain member should attempt to negotiate whether all secure channel traffic that it initiates must be digitally signed. Digital signatures protect the traffic from being modified by anyone who captures the data as it traverses the network. The recommended state for this setting is: Enabled." - rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated—and sensitive information such as passwords are encrypted—but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally sign secure channel data (when possible)" - compliance: - - cis: "2.3.6.3" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> SignSecureChannel -> 0;' - - id: 9010 - title: "Ensure 'Domain member: Disable machine account password changes' is set to 'Disabled'" - description: "This policy setting determines whether a domain member can periodically change its computer account password. Computers that cannot automatically change their account passwords are potentially vulnerable, because an attacker might be able to determine the password for the system's domain account. The recommended state for this setting is: Disabled." - rationale: "The default configuration for Windows Server 2003-based computers that belong to a domain is that they are automatically required to change the passwords for their accounts every 30 days. If you disable this policy setting, computers that run Windows Server 2003 will retain the same passwords as their computer accounts. Computers that are no longer able to automatically change their account password are at risk from an attacker who could determine the password for the computer's domain account." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Disable machine account password changes" - compliance: - - cis: "2.3.6.4" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> DisablePasswordChange -> 1;' - - id: 9011 - title: "Ensure 'Domain member: Require strong (Windows 2000 or later) session key' is set to 'Enabled'" - description: "When this policy setting is enabled, a secure channel can only be established with Domain Controllers that are capable of encrypting secure channel data with a strong (128-bit) session key. To enable this policy setting, all Domain Controllers in the domain must be able to encrypt secure channel data with a strong key, which means all Domain Controllers must be running Microsoft Windows 2000 or newer. The recommended state for this setting is: Enabled." - rationale: "Session keys that are used to establish secure channel communications between Domain Controllers and member computers are much stronger in Windows 2000 than they were in previous Microsoft operating systems. Whenever possible, you should take advantage of these stronger session keys to help protect secure channel communications from attacks that attempt to hijack network sessions and eavesdropping. (Eavesdropping is a form of hacking in which network data is read or altered in transit. The data can be modified to hide or change the sender, or be redirected.)" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Require strong (Windows 2000 or later) session key" - compliance: - - cis: "2.3.6.6" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> RequireStrongKey -> 0;' - - id: 9012 - title: "Ensure 'Interactive logon: Do not display last user name' is set to 'Enabled'" - description: "This policy setting determines whether the account name of the last user to log on to the client computers in your organization will be displayed in each computer's respective Windows logon screen. Enable this policy setting to prevent intruders from collecting account names visually from the screens of desktop or laptop computers in your organization. The recommended state for this setting is: Enabled." - rationale: "An attacker with access to the console (for example, someone with physical access or someone who is able to connect to the server through Remote Desktop Services) could view the name of the last user who logged on to the server. The attacker could then try to guess the password, use a dictionary, or use a brute-force attack to try and log on." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Do not display last user name" - compliance: - - cis: "2.3.7.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> DontDisplayLastUserName -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !DontDisplayLastUserName;' - - id: 9013 - title: "Ensure 'Interactive logon: Do not require CTRL+ALT+DEL' is set to 'Disabled'" - description: "This policy setting determines whether users must press CTRL+ALT+DEL before they log on. The recommended state for this setting is: Disabled." - rationale: "Microsoft developed this feature to make it easier for users with certain types of physical impairments to log on to computers that run Windows. If users are not required to press CTRL+ALT+DEL, they are susceptible to attacks that attempt to intercept their passwords. If CTRL+ALT+DEL is required before logon, user passwords are communicated by means of a trusted path. An attacker could install a Trojan horse program that looks like the standard Windows logon dialog box and capture the user's password. The attacker would then be able to log on to the compromised account with whatever level of privilege that user has." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Do not require CTRL+ALT+DEL" - compliance: - - cis: "2.3.7.2" - - cis_csc: "8" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> DisableCAD -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !DisableCAD;' - - id: 9014 - title: "Ensure 'Interactive logon: Machine inactivity limit' is set to '900 or fewer second(s), but not 0'" - description: "Windows notices inactivity of a logon session, and if the amount of inactive time exceeds the inactivity limit, then the screen saver will run, locking the session. The recommended state for this setting is: 900 or fewer second(s), but not 0. Note: A value of 0 does not conform to the benchmark as it disables the machine inactivity limit." - rationale: "If a user forgets to lock their computer when they walk away it's possible that a passerby will hijack it." - remediation: "To establish the recommended configuration via GP, set the following UI path to 900 or fewer seconds, but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Machine inactivity limit" - compliance: - - cis: "2.3.7.3" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 385;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 386;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 387;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 388;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> 389;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:38\D;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:39\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:3\D\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:4\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:5\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:6\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:7\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:8\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:9\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:\D\w\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> InactivityTimeoutSecs -> r:\w\w\w\w+;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !InactivityTimeoutSecs;' - - id: 9015 - title: "Ensure 'Interactive logon: Prompt user to change password before expiration' is set to 'between 5 and 14 days'" - description: "This policy setting determines how far in advance users are warned that their password will expire. It is recommended that you configure this policy setting to at least 5 days but no more than 14 days to sufficiently warn users when their passwords will expire. The recommended state for this setting is: between 5 and 14 days." - rationale: "It is recommended that user passwords be configured to expire periodically. Users will need to be warned that their passwords are going to expire, or they may inadvertently be locked out of the computer when their passwords expire. This condition could lead to confusion for users who access the network locally, or make it impossible for users to access your organization's network through dial-up or virtual private network (VPN) connections." - remediation: "To establish the recommended configuration via GP, set the following UI path to a value between 5 and 14 days: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Prompt user to change password before expiration" - compliance: - - cis: "2.3.7.7" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 2;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 3;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 4;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> 0F;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:1\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:2\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:3\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:4\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:5\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:6\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:7\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:8\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:9\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:\D\w;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> r:\w\w\w+;' - - id: 9016 - title: "Ensure 'Interactive logon: Require Domain Controller Authentication to unlock workstation' is set to 'Enabled'" - description: "Logon information is required to unlock a locked computer. For domain accounts, this security setting determines whether it is necessary to contact a Domain Controller to unlock a computer. The recommended state for this setting is: Enabled." - rationale: "By default, the computer caches in memory the credentials of any users who are authenticated locally. The computer uses these cached credentials to authenticate anyone who attempts to unlock the console. When cached credentials are used, any changes that have recently been made to the account - such as user rights assignments, account lockout, or the account being disabled - are not considered or applied after the account is authenticated. User privileges are not updated, and (more importantly) disabled accounts are still able to unlock the console of the computer." - remediation: "To implement the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Require Domain Controller Authentication to unlock workstation" - compliance: - - cis: "2.3.7.8" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ForceUnlockLogon -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> !ForceUnlockLogon;' - - id: 9017 - title: "Ensure 'Interactive logon: Smart card removal behavior' is set to 'Lock Workstation' or higher" - description: "This policy setting determines what happens when the smart card for a logged-on user is removed from the smart card reader. The recommended state for this setting is: Lock Workstation. Configuring this setting to Force Logoff or Disconnect if a Remote Desktop Services session also conforms to the benchmark." - rationale: "Users sometimes forget to lock their workstations when they are away from them, allowing the possibility for malicious users to access their computers. If smart cards are used for authentication, the computer should automatically lock itself when the card is removed to ensure that only the user with the smart card is accessing resources using those credentials." - remediation: "To establish the recommended configuration via GP, set the following UI path to Lock Workstation (or, if applicable for your environment, Force Logoff or Disconnect if a Remote Desktop Services session): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Smart card removal behavior" - compliance: - - cis: "2.3.7.9" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScRemoveOption -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> !ScRemoveOption;' - - id: 9018 - title: "Ensure 'Microsoft network client: Digitally sign communications (always)' is set to 'Enabled'" - description: "This policy setting determines whether packet signing is required by the SMB client component. Note: When Windows Vista-based computers have this policy setting enabled and they connect to file or print shares on remote servers, it is important that the setting is synchronized with its companion setting, Microsoft network server: Digitally sign communications (always), on those servers. For more information about these settings, see the 'Microsoft network client and server: Digitally sign communications (four related settings)' section in Chapter 5 of the Threats and Countermeasures guide. The recommended state for this setting is: Enabled." - rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Digitally sign communications (always)" - compliance: - - cis: "2.3.8.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> RequireSecuritySignature -> !1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> !RequireSecuritySignature;' - - id: 9019 - title: "Ensure 'Microsoft network client: Digitally sign communications (if server agrees)' is set to 'Enabled'" - description: "This policy setting determines whether the SMB client will attempt to negotiate SMB packet signing. Note: Enabling this policy setting on SMB clients on your network makes them fully effective for packet signing with all clients and servers in your environment. The recommended state for this setting is: Enabled." - rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Digitally sign communications (if server agrees)" - compliance: - - cis: "2.3.8.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> EnableSecuritySignature -> !1;' - - id: 9020 - title: "Ensure 'Microsoft network client: Send unencrypted password to third-party SMB servers' is set to 'Disabled'" - description: "This policy setting determines whether the SMB redirector will send plaintext passwords during authentication to third-party SMB servers that do not support password encryption. It is recommended that you disable this policy setting unless there is a strong business case to enable it. If this policy setting is enabled, unencrypted passwords will be allowed across the network. The recommended state for this setting is: Disabled." - rationale: "If you enable this policy setting, the server can transmit passwords in plaintext across the network to other computers that offer SMB services, which is a significant security risk. These other computers may not use any of the SMB security mechanisms that are included with Windows Server 2003." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Send unencrypted password to third-party SMB servers" - compliance: - - cis: "2.3.8.3" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> EnablePlainTextPassword -> !0;' - - id: 9021 - title: "Ensure 'Microsoft network server: Amount of idle time required before suspending session' is set to '15 or fewer minute(s), but not 0'" - description: "This policy setting allows you to specify the amount of continuous idle time that must pass in an SMB session before the session is suspended because of inactivity. Administrators can use this policy setting to control when a computer suspends an inactive SMB session. If client activity resumes, the session is automatically reestablished. A value of 0 appears to allow sessions to persist indefinitely. The maximum value is 99999, which is over 69 days; in effect, this value disables the setting. The recommended state for this setting is: 15 or fewer minute(s), but not 0." - rationale: "Each SMB session consumes server resources, and numerous null sessions will slow the server or possibly cause it to fail. An attacker could repeatedly establish SMB sessions until the server's SMB services become slow or unresponsive." - remediation: "To establish the recommended configuration via GP, set the following UI path to 15 or fewer minute(s), but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Amount of idle time required before suspending session" - compliance: - - cis: "2.3.9.1" - - cis_csc: "3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> 0;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:1\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:2\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:3\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:4\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:5\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:6\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:7\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:8\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:9\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:\D\w;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> r:\w\w\w+;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> !AutoDisconnect;' - - id: 9022 - title: "Ensure 'Microsoft network server: Digitally sign communications (always)' is set to 'Enabled'" - description: "This policy setting determines whether packet signing is required by the SMB server component. Enable this policy setting in a mixed environment to prevent downstream clients from using the workstation as a network server. The recommended state for this setting is: Enabled." - rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Digitally sign communications (always)" - compliance: - - cis: "2.3.9.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> RequireSecuritySignature -> !1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> !RequireSecuritySignature;' - - id: 9023 - title: "Ensure 'Microsoft network server: Digitally sign communications (if client agrees)' is set to 'Enabled'" - description: "This policy setting determines whether the SMB server will negotiate SMB packet signing with clients that request it. If no signing request comes from the client, a connection will be allowed without a signature if the Microsoft network server: Digitally sign communications (always) setting is not enabled. Note: Enable this policy setting on SMB clients on your network to make them fully effective for packet signing with all clients and servers in your environment. The recommended state for this setting is: Enabled." - rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Digitally sign communications (if client agrees)" - compliance: - - cis: "2.3.9.3" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> EnableSecuritySignature -> !1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> !EnableSecuritySignature;' - - id: 9024 - title: "Ensure 'Microsoft network server: Disconnect clients when logon hours expire' is set to 'Enabled'" - description: "This security setting determines whether to disconnect users who are connected to the local computer outside their user account's valid logon hours. This setting affects the Server Message Block (SMB) component. If you enable this policy setting you should also enable Network security: Force logoff when logon hours expire (Rule 2.3.11.6). If your organization configures logon hours for users, this policy setting is necessary to ensure they are effective. The recommended state for this setting is: Enabled." - rationale: "If your organization configures logon hours for users, then it makes sense to enable this policy setting. Otherwise, users who should not have access to network resources outside of their logon hours may actually be able to continue to use those resources with sessions that were established during allowed hours." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Disconnect clients when logon hours expire" - compliance: - - cis: "2.3.9.4" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> EnableForcedLogOff -> !1;' - - id: 9025 - title: "Ensure 'Microsoft network server: Server SPN target name validation level' is set to 'Accept if provided by client' or higher" - description: "This policy setting controls the level of validation a computer with shared folders or printers (the server) performs on the service principal name (SPN) that is provided by the client computer when it establishes a session using the server message block (SMB) protocol. The server message block (SMB) protocol provides the basis for file and print sharing and other networking operations, such as remote Windows administration. The SMB protocol supports validating the SMB server service principal name (SPN) within the authentication blob provided by a SMB client to prevent a class of attacks against SMB servers referred to as SMB relay attacks. This setting will affect both SMB1 and SMB2. The recommended state for this setting is: Accept if provided by client. Configuring this setting to Required from client also conforms to the benchmark. Note: Since the release of the MS KB3161561 security patch, this setting can cause significant issues (such as replication problems, group policy editing issues and blue screen crashes) on Domain Controllers when used simultaneously with UNC path hardening (i.e. Rule 18.5.14.1). CIS therefore recommends against deploying this setting on Domain Controllers." - rationale: "The identity of a computer can be spoofed to gain unauthorized access to network resources." - remediation: "To establish the recommended configuration via GP, set the following UI path to Accept if provided by client (configuring to Required from client also conforms to the benchmark): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Server SPN target name validation level" - compliance: - - cis: "2.3.9.5" - - cis_csc: "14" - references: - - https://support.microsoft.com/en-us/help/3161561/ms16-075-and-ms16-076-description-of-the-security-update-for-windows-n - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters -> SMBServerNameHardeningLevel -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters -> !SMBServerNameHardeningLevel;' - - id: 9026 - title: "Ensure 'Network access: Do not allow anonymous enumeration of SAM accounts' is set to 'Enabled'" - description: "This policy setting controls the ability of anonymous users to enumerate the accounts in the Security Accounts Manager (SAM). If you enable this policy setting, users with anonymous connections will not be able to enumerate domain account user names on the systems in your environment. This policy setting also allows additional restrictions on anonymous connections. The recommended state for this setting is: Enabled. Note: This policy has no effect on Domain Controllers." - rationale: "An unauthorized user could anonymously list account names and use the information to attempt to guess passwords or perform social engineering attacks. (Social engineering attacks try to deceive users in some way to obtain passwords or some form of security information.)" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow anonymous enumeration of SAM accounts" - compliance: - - cis: "2.3.10.2" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -> RestrictAnonymousSAM -> 0;' - - id: 9027 - title: "Ensure 'Network access: Do not allow anonymous enumeration of SAM accounts and shares' is set to 'Enabled'" - description: "This policy setting controls the ability of anonymous users to enumerate SAM accounts as well as shares. If you enable this policy setting, anonymous users will not be able to enumerate domain account user names and network share names on the systems in your environment. The recommended state for this setting is: Enabled. Note: This policy has no effect on Domain Controllers." - rationale: "An unauthorized user could anonymously list account names and shared resources and use the information to attempt to guess passwords or perform social engineering attacks. (Social engineering attacks try to deceive users in some way to obtain passwords or some form of security information.)" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow anonymous enumeration of SAM accounts and shares" - compliance: - - cis: "2.3.10.3" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -> RestrictAnonymous -> !1;' - - id: 9028 - title: "Ensure 'Network access: Let Everyone permissions apply to anonymous users' is set to 'Disabled'" - description: "This policy setting determines what additional permissions are assigned for anonymous connections to the computer. The recommended state for this setting is: Disabled." - rationale: "An unauthorized user could anonymously list account names and shared resources and use the information to attempt to guess passwords, perform social engineering attacks, or launch DoS attacks." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Let Everyone permissions apply to anonymous users" - compliance: - - cis: "2.3.10.5" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> EveryoneIncludesAnonymous -> 1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> EveryoneIncludesAnonymous -> 2;' - - id: 9029 - title: "Configure 'Network access: Named Pipes that can be accessed anonymously'" - description: "This policy setting determines which communication sessions, or pipes, will have attributes and permissions that allow anonymous access. The recommended state for this setting is:  Level 1 - Domain Controller. The recommended state for this setting is: LSARPC, NETLOGON, SAMR and (when the legacy Computer Browser service is enabled) BROWSER. Level 1 - Member Server. The recommended state for this setting is: (i.e. None), or (when the legacy Computer Browser service is enabled) BROWSER. Note: A Member Server that holds the Remote Desktop Services Role with Remote Desktop Licensing Role Service will require a special exception to this recommendation, to allow the HydraLSPipe and TermServLicensing Named Pipes to be accessed anonymously." - rationale: "Limiting named pipes that can be accessed anonymously will reduce the attack surface of the system." - remediation: "To establish the recommended configuration via GP, configure the following UI path: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Named Pipes that can be accessed anonymously" - compliance: - - cis: "2.3.10.6" - - cis_csc: "14.1, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> NullSessionPipes -> r:\S*;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> !NullSessionPipes;' - - id: 9030 - title: "Configure 'Network access: Remotely accessible registry paths'" - description: "This policy setting determines which registry paths will be accessible over the network, regardless of the users or groups listed in the access control list (ACL) of the winreg registry key. Note: This setting does not exist in Windows XP. There was a setting with that name in Windows XP, but it is called 'Network access: Remotely accessible registry paths and sub- paths' in Windows Server 2003, Windows Vista, and Windows Server 2008 (non-R2). Note #2: When you configure this setting you specify a list of one or more objects. The delimiter used when entering the list is a line feed or carriage return, that is, type the first object on the list, press the Enter button, type the next object, press Enter again, etc. The setting value is stored as a comma-delimited list in group policy security templates. It is also rendered as a comma-delimited list in Group Policy Editor's display pane and the Resultant Set of Policy console. It is recorded in the registry as a line-feed delimited list in a REG_MULTI_SZ value." - rationale: "The registry is a database that contains computer configuration information, and much of the information is sensitive. An attacker could use this information to facilitate unauthorized activities. To reduce the risk of such an attack, suitable ACLs are assigned throughout the registry to help protect it from access by unauthorized users." - remediation: "To establish the recommended configuration via GP, set the following UI path to: System\\CurrentControlSet\\Control\\ProductOptions | System\\CurrentControlSet\\Control\\Server Applications | Software\\Microsoft\\Windows NT\\CurrentVersion. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Remotely accessible registry paths" - compliance: - - cis: "2.3.10.7" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedExactPaths -> Machine -> !r:System\\CurrentControlSet\\Control\\ProductOptions|System\\CurrentControlSet\\Control\\Server Applications|Software\\Microsoft\\Windows NT\\CurrentVersion;' - - id: 9031 - title: "Configure 'Network access: Remotely accessible registry paths and sub-paths'" - description: "This policy setting determines which registry paths and sub-paths will be accessible over the network, regardless of the users or groups listed in the access control list (ACL) of the winreg registry key. Note: In Windows XP this setting is called 'Network access: Remotely accessible registry paths,' the setting with that same name in Windows Vista, Windows Server 2008 (non-R2), and Windows Server 2003 does not exist in Windows XP. Note #2: When you configure this setting you specify a list of one or more objects. The delimiter used when entering the list is a line feed or carriage return, that is, type the first object on the list, press the Enter button, type the next object, press Enter again, etc. The setting value is stored as a comma-delimited list in group policy security templates. It is also rendered as a comma-delimited list in Group Policy Editor's display pane and the Resultant Set of Policy console. It is recorded in the registry as a line-feed delimited list in a REG_MULTI_SZ value." - rationale: "The registry contains sensitive computer configuration information that could be used by an attacker to facilitate unauthorized activities. The fact that the default ACLs assigned throughout the registry are fairly restrictive and help to protect the registry from access by unauthorized users reduces the risk of such an attack." - remediation: "To establish the recommended configuration via GP, set the following UI path to: System\\CurrentControlSet\\Control\\Print\\Printers | System\\CurrentControlSet\\Services\\Eventlog Software\\Microsoft\\OLAP Server | Software\\Microsoft\\Windows NT\\CurrentVersion\\Print Software\\Microsoft\\Windows | NT\\CurrentVersion\\Windows System\\CurrentControlSet\\Control\\ContentIndex | System\\CurrentControlSet\\Control\\Terminal Server | System\\CurrentControlSet\\Control\\Terminal Server\\UserConfig | System\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration | Software\\Microsoft\\Windows NT\\CurrentVersion\\Perflib | System\\CurrentControlSet\\Services\\SysmonLog | Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local | Policies\\Security Options\\Network access: Remotely accessible registry paths | and sub-paths. When a server holds the Active Directory Certificate Services Role with Certification Authority Role Service, the above list should also include: System\\CurrentControlSet\\Services\\CertSvc. When a server has the WINS Server Feature installed, the above list should also include: System\\CurrentControlSet\\Services\\WINS" - compliance: - - cis: "2.3.10.8" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedPaths -> Machine -> !r:Software\\Microsoft\\Windows NT\\CurrentVersion\\Print|Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows|System\\CurrentControlSet\\Control\\Print\\Printers|System\\CurrentControlSet\\Services\\Eventlog|Software\\Microsoft\\OLAP Server|System\\CurrentControlSet\\Control\\ContentIndex|System\\CurrentControlSet\\Control\\Terminal Server|System\\CurrentControlSet\\Control\\Terminal Server\\UserConfig|System\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration|Software\\Microsoft\\Windows NT\\CurrentVersion\\Perflib|System\\CurrentControlSet\\Services\\SysmonLog|System\\CurrentControlSet\\Services\\CertSvc|System\\CurrentControlSet\\Services\\WINS;' - - id: 9032 - title: "Ensure 'Network access: Restrict anonymous access to Named Pipes and Shares' is set to 'Enabled'" - description: "When enabled, this policy setting restricts anonymous access to only those shares and pipes that are named in the Network access: Named pipes that can be accessed anonymously and Network access: Shares that can be accessed anonymously settings. This policy setting controls null session access to shares on your computers by adding RestrictNullSessAccess with the value 1 in the HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\LanManServer\\Parameters registry key. This registry value toggles null session shares on or off to control whether the server service restricts unauthenticated clients' access to named resources. The recommended state for this setting is: Enabled." - rationale: "Null sessions are a weakness that can be exploited through shares (including the default shares) on computers in your environment." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Restrict anonymous access to Named Pipes and Shares" - compliance: - - cis: "2.3.10.9" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> RestrictNullSessAccess -> !1;' - - id: 9033 - title: "Ensure 'Network access: Shares that can be accessed anonymously' is set to 'None'" - description: "This policy setting determines which network shares can be accessed by anonymous users. The default configuration for this policy setting has little effect because all users have to be authenticated before they can access shared resources on the server. The recommended state for this setting is: (i.e. None)." - rationale: "It is very dangerous to allow any values in this setting. Any shares that are listed can be accessed by any network user, which could lead to the exposure or corruption of sensitive data." - remediation: "To establish the recommended configuration via GP, set the following UI path to (i.e. None): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Shares that can be accessed anonymously" - compliance: - - cis: "2.3.10.10" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> NullSessionShares -> r:\S*;' - - id: 9034 - title: "Ensure 'Network access: Sharing and security model for local accounts' is set to 'Classic - local users authenticate as themselves'" - description: "This policy setting determines how network logons that use local accounts are authenticated. The Classic option allows precise control over access to resources, including the ability to assign different types of access to different users for the same resource. The Guest only option allows you to treat all users equally. In this context, all users authenticate as Guest only to receive the same access level to a given resource. The recommended state for this setting is: Classic - local users authenticate as themselves. Note: This setting does not affect interactive logons that are performed remotely by using such services as Telnet or Remote Desktop Services (formerly called Terminal Services)." - rationale: "With the Guest only model, any user who can authenticate to your computer over the network does so with guest privileges, which probably means that they will not have write access to shared resources on that computer. Although this restriction does increase security, it makes it more difficult for authorized users to access shared resources on those computers because ACLs on those resources must include access control entries (ACEs) for the Guest account. With the Classic model, local accounts should be password protected. Otherwise, if Guest access is enabled, anyone can use those user accounts to access shared system resources." - remediation: "To establish the recommended configuration via GP, set the following UI path to Classic - local users authenticate as themselves: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Sharing and security model for local accounts" - compliance: - - cis: "2.3.10.11" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> ForceGuest -> 1;' - - id: 9035 - title: "Ensure 'Network security: Allow Local System to use computer identity for NTLM' is set to 'Enabled'" - description: "This policy setting determines whether Local System services that use Negotiate when reverting to NTLM authentication can use the computer identity. This policy is supported on at least Windows 7 or Windows Server 2008 R2. The recommended state for this setting is: Enabled." - rationale: "When connecting to computers running versions of Windows earlier than Windows Vista or Windows Server 2008 (non-R2), services running as Local System and using SPNEGO (Negotiate) that revert to NTLM use the computer identity. In Windows 7, if you are connecting to a computer running Windows Server 2008 or Windows Vista, then a system service uses either the computer identity or a NULL session. When connecting with a NULL session, a system-generated session key is created, which provides no protection but allows applications to sign and encrypt data without errors. When connecting with the computer identity, both signing and encryption is supported in order to provide data protection." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Allow Local System to use computer identity for NTLM" - compliance: - - cis: "2.3.11.1" - - cis_csc: "14, 16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> UseMachineId -> !1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> !UseMachineId;' - - id: 9036 - title: "Ensure 'Network security: Allow LocalSystem NULL session fallback' is set to 'Disabled'" - description: "This policy setting determines whether NTLM is allowed to fall back to a NULL session when used with LocalSystem. The recommended state for this setting is: Disabled." - rationale: "NULL sessions are less secure because by definition they are unauthenticated." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Allow LocalSystem NULL session fallback" - compliance: - - cis: "2.3.11.2" - - cis_csc: "14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> allownullsessionfallback -> 1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> !allownullsessionfallback;' - - id: 9037 - title: "Ensure 'Network Security: Allow PKU2U authentication requests to this computer to use online identities' is set to 'Disabled'" - description: "This setting determines if online identities are able to authenticate to this computer. The Public Key Cryptography Based User-to-User (PKU2U) protocol introduced in Windows 7 and Windows Server 2008 R2 is implemented as a security support provider (SSP). The SSP enables peer-to-peer authentication, particularly through the Windows 7 media and file sharing feature called Homegroup, which permits sharing between computers that are not members of a domain. With PKU2U, a new extension was introduced to the Negotiate authentication package, Spnego.dll. In previous versions of Windows, Negotiate decided whether to use Kerberos or NTLM for authentication. The extension SSP for Negotiate, Negoexts.dll, which is treated as an authentication protocol by Windows, supports Microsoft SSPs including PKU2U. When computers are configured to accept authentication requests by using online IDs, Negoexts.dll calls the PKU2U SSP on the computer that is used to log on. The PKU2U SSP obtains a local certificate and exchanges the policy between the peer computers. When validated on the peer computer, the certificate within the metadata is sent to the logon peer for validation and associates the user's certificate to a security token and the logon process completes. The recommended state for this setting is: Disabled." - rationale: "The PKU2U protocol is a peer-to-peer authentication protocol - authentication should be managed centrally in most managed networks." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network Security: Allow PKU2U authentication requests to this computer to use online identities" - compliance: - - cis: "2.3.11.3" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\pku2u -> AllowOnlineID -> !0;' - - id: 9038 - title: "Ensure 'Network Security: Configure encryption types allowed for Kerberos' is set to 'RC4_HMAC_MD5, AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types'" - description: "This policy setting allows you to set the encryption types that Kerberos is allowed to use. The recommended state for this setting is: AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types. Note: Some legacy applications and OSes may require RC4_HMAC_MD5 - we recommend you test in your environment and verify whether you can safely remove it. For the purposes of scoring we have allowed the use of RC4_HMAC_MD5 as an optional setting." - rationale: "he strength of each encryption algorithm varies from one to the next, choosing stronger algorithms will reduce the risk of compromise however doing so may cause issues when the computer attempts to authenticate with systems that do not support them." - remediation: "To establish the recommended configuration via GP, set the following UI path to AES128_HMAC_SHA1, AES256_HMAC_SHA1, Future encryption types: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Configure encryption types allowed for Kerberos" - compliance: - - cis: "2.3.11.4" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters -> SupportedEncryptionTypes -> !2147483644;' - - id: 9039 - title: "Ensure 'Network security: Do not store LAN Manager hash value on next password change' is set to 'Enabled'" - description: "This policy setting determines whether the LAN Manager (LM) hash value for the new password is stored when the password is changed. The LM hash is relatively weak and prone to attack compared to the cryptographically stronger Microsoft Windows NT hash. Since LM hashes are stored on the local computer in the security database, passwords can then be easily compromised if the database is attacked. Note: Older operating systems and some third-party applications may fail when this policy setting is enabled. Also, note that the password will need to be changed on all accounts after you enable this setting to gain the proper benefit. The recommended state for this setting is: Enabled." - rationale: "The SAM file can be targeted by attackers who seek access to username and password hashes. Such attacks use special tools to crack passwords, which can then be used to impersonate users and gain access to resources on your network. These types of attacks will not be prevented if you enable this policy setting, but it will be much more difficult for these types of attacks to succeed." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Do not store LAN Manager hash value on next password change" - compliance: - - cis: "2.3.11.5" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> NoLMHash -> 0;' - - id: 9040 - title: "Ensure 'Network security: Force logoff when logon hours expire' is set to 'Enabled'" - description: "This policy setting determines whether to disconnect users who are connected to the local computer outside their user account's valid logon hours. This setting affects the Server Message Block (SMB) component. If you enable this policy setting you should also enable Microsoft network server: Disconnect clients when logon hours expire (Rule 2.3.9.4). The recommended state for this setting is: Enabled. Note: This recommendation is unscored because there is not a documented registry value that corresponds to it. We still strongly encourage that it be configured as Enabled, to ensure that logon hours (when configured) are properly enforced." - rationale: "If this setting is disabled, a user could remain connected to the computer outside of their allotted logon hours." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled. Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Force logoff when logon hours expire" - compliance: - - cis: "2.3.11.6" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters -> EnableForcedLogOff -> !1;' - - id: 9041 - title: "Ensure 'Network security: LAN Manager authentication level' is set to 'Send NTLMv2 response only. Refuse LM & NTLM'" - description: "LAN Manager (LM) was a family of early Microsoft client/server software (predating Windows NT) that allowed users to link personal computers together on a single network. LM network capabilities included transparent file and print sharing, user security features, and network administration tools. In Active Directory domains, the Kerberos protocol is the default authentication protocol. However, if the Kerberos protocol is not negotiated for some reason, Active Directory will use LM, NTLM, or NTLMv2. LAN Manager authentication includes the LM, NTLM, and NTLM version 2 (NTLMv2) variants, and is the protocol that is used to authenticate all Windows clients when they perform the following operations: -Join a domain -Authenticate between Active Directory forests -Authenticate to down-level domains -Authenticate to computers that do not run Windows 2000, Windows Server 2003, or Windows XP -Authenticate to computers that are not in the domain. The Network security: LAN Manager authentication level setting determines which challenge/response authentication protocol is used for network logons. This choice affects the level of authentication protocol used by clients, the level of session security negotiated, and the level of authentication accepted by servers. The recommended state for this setting is: Send NTLMv2 response only. Refuse LM & NTLM." - rationale: "Windows 2000 and Windows XP clients were configured by default to send LM and NTLM authentication responses (Windows 95-based and Windows 98-based clients only send LM). The default settings in OSes predating Windows Vista / Windows Server 2008 (non- R2) allowed all clients to authenticate with servers and use their resources. However, this meant that LM responses - the weakest form of authentication response - were sent over the network, and it was potentially possible for attackers to sniff that traffic to more easily reproduce the user's password. The Windows 95, Windows 98, and Windows NT operating systems cannot use the Kerberos version 5 protocol for authentication. For this reason, in a Windows Server 2003 domain, these computers authenticate by default with both the LM and NTLM protocols for network authentication. You can enforce a more secure authentication protocol for Windows 95, Windows 98, and Windows NT by using NTLMv2. For the logon process, NTLMv2 uses a secure channel to protect the authentication process. Even if you use NTLMv2 for older clients and servers, Windows-based clients and servers that are members of the domain will use the Kerberos authentication protocol to authenticate with Windows Server 2003 or newer Domain Controllers. For these reasons, it is strongly preferred to restrict the use of LM & NTLM (non-v2) as much as possible." - remediation: "To establish the recommended configuration via GP, set the following UI path to: Send NTLMv2 response only. Refuse LM & NTLM: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: LAN Manager authentication level" - compliance: - - cis: "2.3.11.7" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 0;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 2;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 3;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 4;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> !LmCompatibilityLevel;' - - id: 9042 - title: "Ensure 'Network security: LDAP client signing requirements' is set to 'Negotiate signing' or higher" - description: "This policy setting determines the level of data signing that is requested on behalf of clients that issue LDAP BIND requests. Note: This policy setting does not have any impact on LDAP simple bind (ldap_simple_bind) or LDAP simple bind through SSL (ldap_simple_bind_s). No Microsoft LDAP clients that are included with Windows XP Professional use ldap_simple_bind or ldap_simple_bind_s to communicate with a Domain Controller. The recommended state for this setting is: Negotiate signing. Configuring this setting to Require signing also conforms to the benchmark." - rationale: "Unsigned network traffic is susceptible to man-in-the-middle attacks in which an intruder captures the packets between the client and server, modifies them, and then forwards them to the server. For an LDAP server, this susceptibility means that an attacker could cause a server to make decisions that are based on false or altered data from the LDAP queries. To lower this risk in your network, you can implement strong physical security measures to protect the network infrastructure. Also, you can make all types of man-in-the-middle attacks extremely difficult if you require digital signatures on all network packets by means of IPsec authentication headers." - remediation: "To establish the recommended configuration via GP, set the following UI path to Negotiate signing (configuring to Require signing also conforms to the benchmark): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: LDAP client signing requirements" - compliance: - - cis: "2.3.11.8" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LDAP -> LDAPClientIntegrity -> !1;' - - id: 9043 - title: "Ensure 'Network security: Minimum session security for NTLM SSP based (including secure RPC) clients' is set to 'Require NTLMv2 session security, Require 128-bit encryption'" - description: "This policy setting determines which behaviors are allowed by clients for applications using the NTLM Security Support Provider (SSP). The SSP Interface (SSPI) is used by applications that need authentication services. The setting does not modify how the authentication sequence works but instead require certain behaviors in applications that use the SSPI. The recommended state for this setting is: Require NTLMv2 session security, Require 128-bit encryption. Note: These values are dependent on the Network security: LAN Manager Authentication Level (Rule 2.3.11.7) security setting value." - rationale: "You can enable both options for this policy setting to help protect network traffic that uses the NTLM Security Support Provider (NTLM SSP) from being exposed or tampered with by an attacker who has gained access to the same network. In other words, these options help protect against man-in-the-middle attacks." - remediation: "To establish the recommended configuration via GP, set the following UI path to Require NTLMv2 session security, Require 128-bit encryption: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Minimum session security for NTLM SSP based (including secure RPC) clients" - compliance: - - cis: "2.3.11.9" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> NTLMMinClientSec -> !537395200;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> !NTLMMinClientSec;' - - id: 9044 - title: "Ensure 'Network security: Minimum session security for NTLM SSP based (including secure RPC) servers' is set to 'Require NTLMv2 session security, Require 128-bit encryption'" - description: "This policy setting determines which behaviors are allowed by servers for applications using the NTLM Security Support Provider (SSP). The SSP Interface (SSPI) is used by applications that need authentication services. The setting does not modify how the authentication sequence works but instead require certain behaviors in applications that use the SSPI. The recommended state for this setting is: Require NTLMv2 session security, Require 128-bit encryption. Note: These values are dependent on the Network security: LAN Manager Authentication Level (Rule 2.3.11.7) security setting value." - rationale: "You can enable all of the options for this policy setting to help protect network traffic that uses the NTLM Security Support Provider (NTLM SSP) from being exposed or tampered with by an attacker who has gained access to the same network. That is, these options help protect against man-in-the-middle attacks." - remediation: "To establish the recommended configuration via GP, set the following UI path to Require NTLMv2 session security, Require 128-bit encryption: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Minimum session security for NTLM SSP based (including secure RPC) servers" - compliance: - - cis: "2.3.11.10" - - cis_csc: "13" - references: - - https://workbench.cisecurity.org/benchmarks/288 - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> NTLMMinServerSec -> !537395200;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> !NTLMMinServerSec;' - - id: 9045 - title: "Ensure 'Shutdown: Allow system to be shut down without having to log on' is set to 'Disabled'" - description: "This policy setting determines whether a computer can be shut down when a user is not logged on. If this policy setting is enabled, the shutdown command is available on the Windows logon screen. It is recommended to disable this policy setting to restrict the ability to shut down the computer to users with credentials on the system. The recommended state for this setting is: Disabled. Note: In Server 2008 R2 and older versions, this setting had no impact on Remote Desktop (RDP) / Terminal Services sessions - it only affected the local console. However, Microsoft changed the behavior in Windows Server 2012 (non-R2) and above, where if set to Enabled, RDP sessions are also allowed to shut down or restart the server." - rationale: "Users who can access the console locally could shut down the computer. Attackers could also walk to the local console and restart the server, which would cause a temporary DoS condition. Attackers could also shut down the server and leave all of its applications and services unavailable. As noted in the Description above, the Denial of Service (DoS) risk of enabling this setting dramatically increases in Windows Server 2012 (non-R2) and above, as even remote users could then shut down or restart the server from the logon screen of an RDP session." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Shutdown: Allow system to be shut down without having to log on" - compliance: - - cis: "2.3.13.1" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ShutdownWithoutLogon -> 1;' - - id: 9046 - title: "Ensure 'System objects: Require case insensitivity for non-Windows subsystems' is set to 'Enabled'" - description: "This policy setting determines whether case insensitivity is enforced for all subsystems. The Microsoft Win32 subsystem is case insensitive. However, the kernel supports case sensitivity for other subsystems, such as the Portable Operating System Interface for UNIX (POSIX). Because Windows is case insensitive (but the POSIX subsystem will support case sensitivity), failure to enforce this policy setting makes it possible for a user of the POSIX subsystem to create a file with the same name as another file by using mixed case to label it. Such a situation can block access to these files by another user who uses typical Win32 tools, because only one of the files will be available. The recommended state for this setting is: Enabled." - rationale: "Because Windows is case-insensitive but the POSIX subsystem will support case sensitivity, failure to enable this policy setting would make it possible for a user of that subsystem to create a file with the same name as another file but with a different mix of upper and lower case letters. Such a situation could potentially confuse users when they try to access such files from normal Win32 tools because only one of the files will be available." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System objects: Require case insensitivity for non- Windows subsystems" - compliance: - - cis: "2.3.15.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Kernel -> ObCaseInsensitive -> !1;' - - id: 9047 - title: "Ensure 'System objects: Strengthen default permissions of internal system objects (e.g. Symbolic Links)' is set to 'Enabled'" - description: "This policy setting determines the strength of the default discretionary access control list (DACL) for objects. Active Directory maintains a global list of shared system resources, such as DOS device names, mutexes, and semaphores. In this way, objects can be located and shared among processes. Each type of object is created with a default DACL that specifies who can access the objects and what permissions are granted. The recommended state for this setting is: Enabled." - rationale: "This setting determines the strength of the default DACL for objects. Windows maintains a global list of shared computer resources so that objects can be located and shared among processes. Each type of object is created with a default DACL that specifies who can access the objects and with what permissions." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System objects: Strengthen default permissions of internal system objects (e.g. Symbolic Links)" - compliance: - - cis: "2.3.15.2" - - cis_csc: "14.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager -> ProtectionMode -> !1;' - - id: 9048 - title: "Ensure 'User Account Control: Admin Approval Mode for the Built-in Administrator account' is set to 'Enabled'" - description: "This policy setting controls the behavior of Admin Approval Mode for the built-in Administrator account. The recommended state for this setting is: Enabled." - rationale: "One of the risks that the User Account Control feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. An attack vector for these programs was to discover the password of the account named 'Administrator' because that user account was created for all installations of Windows. To address this risk, in Windows Vista and newer, the built-in Administrator account is now disabled by default. In a default installation of a new computer, accounts with administrative control over the computer are initially set up in one of two ways: -If the computer is not joined to a domain, the first user account you create has the equivalent permissions as a local administrator. -If the computer is joined to a domain, no local administrator accounts are created. The Enterprise or Domain Administrator must log on to the computer and create one if a local administrator account is warranted. Once Windows is installed, the built-in Administrator account may be manually enabled, but we strongly recommend that this account remain disabled." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Admin Approval Mode for the Built-in Administrator account" - compliance: - - cis: "2.3.17.1" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> FilterAdministratorToken -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !FilterAdministratorToken;' - - id: 9049 - title: "Ensure 'User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop' is set to 'Disabled'" - description: "This policy setting controls whether User Interface Accessibility (UIAccess or UIA) programs can automatically disable the secure desktop for elevation prompts used by a standard user. The recommended state for this setting is: Disabled." - rationale: "One of the risks that the UAC feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. This setting allows the administrator to perform operations that require elevated privileges while connected via Remote Assistance. This increases security in that organizations can use UAC even when end user support is provided remotely. However, it also reduces security by adding the risk that an administrator might allow an unprivileged user to share elevated privileges for an application that the administrator needs to use during the Remote Desktop session." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop" - compliance: - - cis: "2.3.17.2" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableUIADesktopToggle -> 1;' - - id: 9050 - title: "Ensure 'User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode' is set to 'Prompt for consent on the secure desktop'" - description: "This policy setting controls the behavior of the elevation prompt for administrators. The recommended state for this setting is: Prompt for consent on the secure desktop." - rationale: "One of the risks that the UAC feature introduced with Windows Vista is trying to mitigate is that of malicious software running under elevated credentials without the user or administrator being aware of its activity. This setting raises awareness to the administrator of elevated privilege operations and permits the administrator to prevent a malicious program from elevating its privilege when the program attempts to do so." - remediation: "To establish the recommended configuration via GP, set the following UI path to Prompt for consent on the secure desktop: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode" - compliance: - - cis: "2.3.17.3" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ConsentPromptBehaviorAdmin -> 0;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ConsentPromptBehaviorAdmin -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !ConsentPromptBehaviorAdmin;' - - id: 9051 - title: "Ensure 'User Account Control: Behavior of the elevation prompt for standard users' is set to 'Automatically deny elevation requests'" - description: "This policy setting controls the behavior of the elevation prompt for standard users. The recommended state for this setting is: Automatically deny elevation requests." - rationale: "One of the risks that the User Account Control feature introduced with Windows Vista is trying to mitigate is that of malicious programs running under elevated credentials without the user or administrator being aware of their activity. This setting raises awareness to the user that a program requires the use of elevated privilege operations and requires that the user be able to supply administrative credentials in order for the program to run." - remediation: "To establish the recommended configuration via GP, set the following UI path to Automatically deny elevation requests: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Behavior of the elevation prompt for standard users" - compliance: - - cis: "2.3.17.4" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> ConsentPromptBehaviorUser -> 1;' - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !ConsentPromptBehaviorUser;' - - id: 9052 - title: "Ensure 'User Account Control: Detect application installations and prompt for elevation' is set to 'Enabled'" - description: "This policy setting controls the behavior of application installation detection for the computer. The recommended state for this setting is: Enabled." - rationale: "Some malicious software will attempt to install itself after being given permission to run. For example, malicious software with a trusted application shell. The user may have given permission for the program to run because the program is trusted, but if they are then prompted for installation of an unknown component this provides another way of trapping the software before it can do damage" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Detect application installations and prompt for elevation" - compliance: - - cis: "2.3.17.5" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableInstallerDetection -> 0;' - - 'r:HKEY_LOCAL_MACHINE\MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> !EnableInstallerDetection;' - - id: 9053 - title: "Ensure 'User Account Control: Only elevate UIAccess applications that are installed in secure locations' is set to 'Enabled'" - description: "This policy setting controls whether applications that request to run with a User Interface Accessibility (UIAccess) integrity level must reside in a secure location in the file system. Secure locations are limited to the following: ...\\Program Files\\, including subfolders; ...\\Windows\\system32\\; ...\\Program Files (x86)\\, including subfolders (for 64-bit versions of Windows). Note: Windows enforces a public key infrastructure (PKI) signature check on any interactive application that requests to run with a UIAccess integrity level regardless of the state of this security setting. The recommended state for this setting is: Enabled." - rationale: "UIAccess Integrity allows an application to bypass User Interface Privilege Isolation (UIPI) restrictions when an application is elevated in privilege from a standard user to an administrator. This is required to support accessibility features such as screen readers that are transmitting user interfaces to alternative forms. A process that is started with UIAccess rights has the following abilities: -To set the foreground window.  -To drive any application window using SendInput function. -To use read input for all integrity levels using low-level hooks, raw input, GetKeyState, GetAsyncKeyState, and GetKeyboardInput. -To set journal hooks. -To uses AttachThreadInput to attach a thread to a higher integrity input queue." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Only elevate UIAccess applications that are installed in secure locations" - compliance: - - cis: "2.3.17.6" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableSecureUIAPaths -> 0;' - - id: 9054 - title: "Ensure 'User Account Control: Run all administrators in Admin Approval Mode' is set to 'Enabled'" - description: "This policy setting controls the behavior of all User Account Control (UAC) policy settings for the computer. If you change this policy setting, you must restart your computer. The recommended state for this setting is: Enabled. Note: If this policy setting is disabled, the Security Center notifies you that the overall security of the operating system has been reduced." - rationale: "This is the setting that turns on or off UAC. If this setting is disabled, UAC will not be used and any security benefits and risk mitigations that are dependent on UAC will not be present on the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Run all administrators in Admin Approval Mode" - compliance: - - cis: "2.3.17.7" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableLUA -> 0;' - - id: 9055 - title: "Ensure 'User Account Control: Switch to the secure desktop when prompting for elevation' is set to 'Enabled'" - description: "This policy setting controls whether the elevation request prompt is displayed on the interactive user's desktop or the secure desktop. The recommended state for this setting is: Enabled." - rationale: "Standard elevation prompt dialog boxes can be spoofed, which may cause users to disclose their passwords to malicious software. The secure desktop presents a very distinct appearance when prompting for elevation, where the user desktop dims, and the elevation prompt UI is more prominent. This increases the likelihood that users who become accustomed to the secure desktop will recognize a spoofed elevation prompt dialog box and not fall for the trick." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Switch to the secure desktop when prompting for elevation" - compliance: - - cis: "2.3.17.8" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> PromptOnSecureDesktop -> 0;' - - id: 9056 - title: "Ensure 'User Account Control: Virtualize file and registry write failures to per-user locations' is set to 'Enabled'" - description: "This policy setting controls whether application write failures are redirected to defined registry and file system locations. This policy setting mitigates applications that run as administrator and write run-time application data to: - %ProgramFiles% - %Windir% - %Windir%\\system32 - HKEY_LOCAL_MACHINE\\Software. The recommended state for this setting is: Enabled." - rationale: "This setting reduces vulnerabilities by ensuring that legacy applications only write data to permitted locations." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\User Account Control: Virtualize file and registry write failures to per-user locations" - compliance: - - cis: "2.3.17.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> EnableVirtualization -> 0;' -# Section 9.1 - Domain Profile - - id: 9057 - title: "Ensure 'Windows Firewall: Domain: Firewall state' is set to 'On'" - description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." - rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Firewall state" - compliance: - - cis: "9.1.1" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> EnableFirewall -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile -> EnableFirewall -> 0;' - - id: 9058 - title: "Ensure 'Windows Firewall: Domain: Inbound connections' is set to 'Block (default)'" - description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." - rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Inbound connections" - compliance: - - cis: "9.1.2" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DefaultInboundAction -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile -> DefaultInboundAction -> 0;' - - id: 9059 - title: "Ensure 'Windows Firewall: Domain: Outbound connections' is set to 'Allow (default)'" - description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default)." - rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." - remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Outbound connections" - compliance: - - cis: "9.1.3" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DefaultOutboundAction -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile -> DefaultOutboundAction -> 1;' - - id: 9060 - title: "Ensure 'Windows Firewall: Domain: Settings: Display a notification' is set to 'No'" - description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." - rationale: "Firewall notifications can be complex and may confuse the end users, who would not be able to address the alert" - remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Settings Customize\\Display a notification" - compliance: - - cis: "9.1.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> DisableNotifications -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile -> !DisableNotifications;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile -> DisableNotifications -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile -> !DisableNotifications;' - - id: 9061 - title: "Ensure 'Windows Firewall: Domain: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log'" - description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\domainfw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Name" - compliance: - - cis: "9.1.5" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\domainfw\plog;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\domainfw\plog;' - - id: 9062 - title: "Ensure 'Windows Firewall: Domain: Logging: Size limit (KB)' is set to '16384 KB or greater'" - description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Size limit (KB)" - compliance: - - cis: "9.1.6" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - id: 9063 - title: "Ensure 'Windows Firewall: Domain: Logging: Log dropped packets' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Log dropped packets" - compliance: - - cis: "9.1.7" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogDroppedPackets -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogDroppedPackets -> 0;' - - id: 9064 - title: "Ensure 'Windows Firewall: Domain: Logging: Log successful connections' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Domain Profile\\Logging Customize\\Log successful connections" - compliance: - - cis: "9.1.8" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging -> LogSuccessfulConnections -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\Logging -> LogSuccessfulConnections -> 0;' -# Section 9.2 - Private Profile - - id: 9065 - title: "Ensure 'Windows Firewall: Private: Firewall state' is set to 'On'" - description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." - rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Firewall state" - compliance: - - cis: "9.2.1" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> EnableFirewall -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile -> EnableFirewall -> 0;' - - id: 9066 - title: "Ensure 'Windows Firewall: Private: Inbound connections' is set to 'Block (default)'" - description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)." - rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Inbound connections" - compliance: - - cis: "9.2.2" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DefaultInboundAction -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile -> DefaultInboundAction -> 0;' - - id: 9067 - title: "Ensure 'Windows Firewall: Private: Outbound connections' is set to 'Allow (default)'" - description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default). Note: If you set Outbound connections to Block and then deploy the firewall policy by using a GPO, computers that receive the GPO settings cannot receive subsequent Group Policy updates unless you create and deploy an outbound rule that enables Group Policy to work. Predefined rules for Core Networking include outbound rules that enable Group Policy to work. Ensure that these outbound rules are active, and thoroughly test firewall profiles before deploying." - rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." - remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Outbound connections" - compliance: - - cis: "9.2.3" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DefaultOutboundAction -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile -> DefaultOutboundAction -> 1;' - - id: 9068 - title: "Ensure 'Windows Firewall: Private: Settings: Display a notification' is set to 'No'" - description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." - rationale: "Firewall notifications can be complex and may confuse the end users, who would not be able to address the alert." - remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Settings Customize\\Display a notification" - compliance: - - cis: "9.2.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> DisableNotifications -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile -> DisableNotifications -> 0;' - - id: 9069 - title: "Ensure 'Windows Firewall: Private: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log'" - description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\privatefw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Name" - compliance: - - cis: "9.2.5" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\privatefw\plog;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\privatefw\plog;' - - id: 9070 - title: "Ensure 'Windows Firewall: Private: Logging: Size limit (KB)' is set to '16384 KB or greater'" - description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Size limit (KB)" - compliance: - - cis: "9.2.6" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - id: 9071 - title: "Ensure 'Windows Firewall: Private: Logging: Log dropped packets' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Log dropped packets" - compliance: - - cis: "9.2.7" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogDroppedPackets -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogDroppedPackets -> 0;' - - id: 9072 - title: "Ensure 'Windows Firewall: Private: Logging: Log successful connections' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Logging Customize\\Log successful connections" - compliance: - - cis: "9.2.8" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging -> LogSuccessfulConnections -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\Logging -> LogSuccessfulConnections -> 0;' -# Sectin 9.3 - Public Profile - - id: 9073 - title: "Ensure 'Windows Firewall: Public: Firewall state' is set to 'On'" - description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." - rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Firewall state" - compliance: - - cis: "9.3.1" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> EnableFirewall -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> EnableFirewall -> 0;' - - id: 9074 - title: "Ensure 'Windows Firewall: Public: Inbound connections' is set to 'Block (default)'" - description: "This setting determines the behavior for inbound connections that do not match an inbound firewall rule. The recommended state for this setting is: Block (default)" - rationale: "If the firewall allows all traffic to access the system then an attacker may be more easily able to remotely exploit a weakness in a network service." - remediation: "To establish the recommended configuration via GP, set the following UI path to Block (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Inbound connections" - compliance: - - cis: "9.3.2" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DefaultInboundAction -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> DefaultInboundAction -> 0;' - - id: 9075 - title: "Ensure 'Windows Firewall: Public: Outbound connections' is set to 'Allow (default)'" - description: "This setting determines the behavior for outbound connections that do not match an outbound firewall rule. The recommended state for this setting is: Allow (default). Note: If you set Outbound connections to Block and then deploy the firewall policy by using a GPO, computers that receive the GPO settings cannot receive subsequent Group Policy updates unless you create and deploy an outbound rule that enables Group Policy to work. Predefined rules for Core Networking include outbound rules that enable Group Policy to work. Ensure that these outbound rules are active, and thoroughly test firewall profiles before deploying." - rationale: "Some people believe that it is prudent to block all outbound connections except those specifically approved by the user or administrator. Microsoft disagrees with this opinion, blocking outbound connections by default will force users to deal with a large number of dialog boxes prompting them to authorize or block applications such as their web browser or instant messaging software. Additionally, blocking outbound traffic has little value because if an attacker has compromised the system they can reconfigure the firewall anyway." - remediation: "To establish the recommended configuration via GP, set the following UI path to Allow (default): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Outbound connections" - compliance: - - cis: "9.3.3" - - cis_csc: "9.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DefaultOutboundAction -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> DefaultOutboundAction -> 1;' - - id: 9076 - title: "Ensure 'Windows Firewall: Public: Settings: Display a notification' is set to 'No'" - description: "Select this option to have Windows Firewall with Advanced Security display notifications to the user when a program is blocked from receiving inbound connections. The recommended state for this setting is: No." - rationale: "Some organizations may prefer to avoid alarming users when firewall rules block certain types of network activity. However, notifications can be helpful when troubleshooting network issues involving the firewall." - remediation: "To establish the recommended configuration via GP, set the following UI path to 'No': Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Display a notification" - compliance: - - cis: "9.3.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> DisableNotifications -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> DisableNotifications -> 1;' - - id: 9077 - title: "Ensure 'Windows Firewall: Public: Settings: Apply local firewall rules' is set to 'No'" - description: "This setting controls whether local administrators are allowed to create local firewall rules that apply together with firewall rules configured by Group Policy. The recommended state for this setting is: No. Note: When the Apply local firewall rules setting is configured to No, it's recommended to also configure the Display a notification setting to No. Otherwise, users will continue to receive messages that ask if they want to unblock a restricted inbound connection, but the user's response will be ignored." - rationale: "When in the Public profile, there should be no special local firewall exceptions per computer. These settings should be managed by a centralized policy." - remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Apply local firewall rules" - compliance: - - cis: "9.3.5" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> AllowLocalPolicyMerge -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> AllowLocalPolicyMerge -> 0;' - - id: 9078 - title: "Ensure 'Windows Firewall: Public: Settings: Apply local connection security rules' is set to 'No'" - description: "This setting controls whether local administrators are allowed to create connection security rules that apply together with connection security rules configured by Group Policy. The recommended state for this setting is: No." - rationale: "Users with administrative privileges might create firewall rules that expose the system to remote attack." - remediation: "To establish the recommended configuration via GP, set the following UI path to No: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Settings Customize\\Apply local connection security rules" - compliance: - - cis: "9.3.6" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> AllowLocalIPsecPolicyMerge -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile -> AllowLocalIPsecPolicyMerge -> 0;' - - id: 9079 - title: "Ensure 'Windows Firewall: Private: Logging: Name' is set to '%SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log'" - description: "Use this option to specify the path and name of the file in which Windows Firewall will write its log information. The recommended state for this setting is: %SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to %SYSTEMROOT%\\System32\\logfiles\\firewall\\publicfw.log: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Name" - compliance: - - cis: "9.3.7" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\publicfw\plog;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFilePath -> r:\psystemroot\p\\system32\logfiles\firewall\publicfw\plog;' - - id: 9080 - title: "Ensure 'Windows Firewall: Public: Logging: Size limit (KB)' is set to '16384 KB or greater'" - description: "Use this option to specify the size limit of the file in which Windows Firewall will write its log information. The recommended state for this setting is: 16,384 KB or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to 16,384 KB or greater: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Size limit (KB)" - compliance: - - cis: "9.3.8" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogFileSize -> r:3\w\w\w;' - - id: 9081 - title: "Ensure 'Windows Firewall: Public: Logging: Log dropped packets' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security discards an inbound packet for any reason. The log records why and when the packet was dropped. Look for entries with the word DROP in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Log dropped packets" - compliance: - - cis: "9.3.9" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogDroppedPackets -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogDroppedPackets -> 0;' - - id: 9082 - title: "Ensure 'Windows Firewall: Public: Logging: Log successful connections' is set to 'Yes'" - description: "Use this option to log when Windows Firewall with Advanced Security allows an inbound connection. The log records why and when the connection was formed. Look for entries with the word ALLOW in the action column of the log. The recommended state for this setting is: Yes." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Yes: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Logging Customize\\Log successful connections" - compliance: - - cis: "9.3.10" - - cis_csc: "6.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging -> LogSuccessfulConnections -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\PublicProfile\Logging -> LogSuccessfulConnections -> 0;' -# Section 18.1 - Control Panel - - id: 9083 - title: "Ensure 'Prevent enabling lock screen camera' is set to 'Enabled'" - description: "Disables the lock screen camera toggle switch in PC Settings and prevents a camera from being invoked on the lock screen. The recommended state for this setting is: Enabled." - rationale: "Disabling the lock screen camera extends the protection afforded by the lock screen to camera features." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Personalization\\Prevent enabling lock screen camera Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ControlPanelDisplay.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer). " - compliance: - - cis: "18.1.1.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> NoLockScreenCamera -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> !NoLockScreenCamera;' - - id: 9084 - title: "Ensure 'Prevent enabling lock screen slide show' is set to 'Enabled'" - description: "Disables the lock screen slide show settings in PC Settings and prevents a slide show from playing on the lock screen. The recommended state for this setting is: Enabled." - rationale: "Disabling the lock screen slide show extends the protection afforded by the lock screen to slide show contents." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Control Panel\\Personalization\\Prevent enabling lock screen slide show Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ControlPanelDisplay.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.1.1.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> NoLockScreenSlideshow -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization -> !NoLockScreenSlideshow;' -# Section 18.2 - LAPS - - id: 9085 - title: "Ensure LAPS AdmPwd GPO Extension / CSE is installed" - description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." - rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." - remediation: "In order to utilize LAPS, a minor Active Directory Schema update is required, and a Group Policy Client Side Extension (CSE) must be installed on each managed computer. When LAPS is installed, the file AdmPwd.dll must be present in the following location and registered in Windows (the LAPS AdmPwd GPO Extension / CSE installation does this for you): C:\\Program Files\\LAPS\\CSE\\AdmPwd.dll" - compliance: - - cis: "18.2.1" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions\{D76B9641-3288-4f75-942D-087DE603E3EA} -> !DllName;' - - id: 9086 - title: "Ensure 'Do not allow password expiration time longer than required by policy' is set to 'Enabled'" - description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." - rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Do not allow password expiration time longer than required by policy Note: This Group Policy path does not exist by default. An additional Group Policy template (AdmPwd.admx/adml) is required - it is included with Microsoft Local Administrator Password Solution (LAPS)." - compliance: - - cis: "18.2.2" - - cis_csc: "16.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PwdExpirationProtectionEnabled -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> !PwdExpirationProtectionEnabled;' - - id: 9087 - title: "Ensure 'Enable Local Admin Password Management' is set to 'Enabled'" - description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." - rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Enable Local Admin Password Management Note: This Group Policy path does not exist by default. An additional Group Policy template (AdmPwd.admx/adml) is required - it is included with Microsoft Local Administrator Password Solution (LAPS)." - compliance: - - cis: "18.2.3" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> AdmPwdEnabled -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> !AdmPwdEnabled;' - - id: 9088 - title: "Ensure 'Password Settings: Password Complexity' is set to 'Enabled: Large letters + small letters + numbers + special characters'" - description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled: Large letters + small letters + numbers + special characters. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." - rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, and configure the Password Complexity option to Large letters + small letters + numbers + special characters: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Password Settings Note: This Group Policy path does not exist by default. An additional Group Policy template (AdmPwd.admx/adml) is required - it is included with Microsoft Local Administrator Password Solution (LAPS)." - compliance: - - cis: "18.2.4" - - cis_csc: "5.7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordComplexity -> !4;' - - id: 9089 - title: "Ensure 'Password Settings: Password Length' is set to 'Enabled: 15 or more'" - description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled: 15 or more. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." - rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, and configure the Password Length option to 15 or more: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Password Settings Note: This Group Policy path does not exist by default. An additional Group Policy template (AdmPwd.admx/adml) is required - it is included with Microsoft Local Administrator Password Solution (LAPS)." - compliance: - - cis: "18.2.5" - - cis_csc: "5.7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordLength -> r:\d;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordLength -> r:a;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordLength -> r:b;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordLength -> r:c;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordLength -> r:d;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordLength -> r:e;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> !PasswordLength;' - - id: 9090 - title: "Ensure 'Password Settings: Password Age (Days)' is set to 'Enabled: 30 or fewer'" - description: "In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) tool, which is free and supported software that allows an organization to automatically set randomized and unique local Administrator account passwords on domain-attached workstations and Member Servers. The passwords are stored in a confidential attribute of the domain computer account and can be retrieved from Active Directory by approved Sysadmins when needed. The LAPS tool requires a small Active Directory Schema update in order to implement, as well as installation of a Group Policy Client Side Extension (CSE) on targeted computers. Please see the LAPS documentation for details. LAPS supports Windows Vista or newer workstation OSes, and Server 2003 or newer server OSes. LAPS does not support standalone computers - they must be joined to a domain. The recommended state for this setting is: Enabled: 30 or fewer. Note: Organizations that utilize 3rd-party commercial software to manage unique & complex local Administrator passwords on domain members may opt to disregard these LAPS recommendations. Note #2: LAPS is only designed to manage local Administrator passwords, and is therefore not recommended (or supported) for use directly on Domain Controllers, which do not have a traditional local Administrator account. We strongly encourage you to only deploy the LAPS CSE and LAPS GPO settings to member servers and workstations." - rationale: "Due to the difficulty in managing local Administrator passwords, many organizations choose to use the same password on all workstations and/or Member Servers when deploying them. This creates a serious attack surface security risk because if an attacker manages to compromise one system and learn the password to its local Administrator account, then they can leverage that account to instantly gain access to all other computers that also use that password for their local Administrator account." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, and configure the Password Age (Days) option to 30 or fewer: Computer Configuration\\Policies\\Administrative Templates\\LAPS\\Password Settings Note: This Group Policy path does not exist by default. An additional Group Policy template (AdmPwd.admx/adml) is required - it is included with Microsoft Local Administrator Password Solution (LAPS)." - compliance: - - cis: "18.2.6" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> 1F;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:2\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:3\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:4\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:5\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:6\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:7\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:8\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:9\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:\D\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft Services\AdmPwd -> PasswordAgeDays -> r:\w\w\w+;' -# Section 18.3 - MS Security Guide - - id: 9091 - title: "Ensure 'Apply UAC restrictions to local accounts on network logons' is set to 'Enabled'" - description: "This setting controls whether local accounts can be used for remote administration via network logon (e.g., NET USE, connecting to C$, etc.). Local accounts are at high risk for credential theft when the same account and password is configured on multiple systems. Enabling this policy significantly reduces that risk. Enabled: Applies UAC token-filtering to local accounts on network logons. Membership in powerful group such as Administrators is disabled and powerful privileges are removed from the resulting access token. This configures the LocalAccountTokenFilterPolicy registry value to 0. This is the default behavior for Windows. Disabled: Allows local accounts to have full administrative rights when authenticating via network logon, by configuring the LocalAccountTokenFilterPolicy registry value to 1. For more information about local accounts and credential theft, review the 'Mitigating Pass-the-Hash (PtH) Attacks and Other Credential Theft Techniques' documents. For more information about LocalAccountTokenFilterPolicy, see Microsoft Knowledge Base article 951016: Description of User Account Control and remote restrictions in Windows Vista. The recommended state for this setting is: Enabled." - rationale: "Local accounts are at high risk for credential theft when the same account and password is configured on multiple systems. Ensuring this policy is Enabled significantly reduces that risk." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\Apply UAC restrictions to local accounts on network logons Note: This Group Policy path does not exist by default. An additional Group Policy template (SecGuide.admx/adml) is required - it is available from Microsoft." - compliance: - - cis: "18.3.1" - - cis_csc: "5.8" - references: - - https://www.microsoft.com/en-us/download/details.aspx?id=36036 - - https://support.microsoft.com/en-us/help/951016/description-of-user-account-control-and-remote-restrictions-in-windows - - https://blogs.technet.microsoft.com/secguide/2017/08/30/security-baseline-for-windows-10-creators-update-v1703-final/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> LocalAccountTokenFilterPolicy -> !0;' - - id: 9092 - title: "Ensure 'WDigest Authentication' is set to 'Disabled'" - description: "When WDigest authentication is enabled, Lsass.exe retains a copy of the user's plaintext password in memory, where it can be at risk of theft. If this setting is not configured, WDigest authentication is disabled in Windows 8.1 and in Windows Server 2012 R2; it is enabled by default in earlier versions of Windows and Windows Server. The recommended state for this setting is: Disabled." - rationale: "Preventing the plaintext storage of credentials in memory may reduce opportunity for credential theft." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\WDigest Authentication (disabling may require KB2871997) Note: This Group Policy path does not exist by default. An additional Group Policy template (SecGuide.admx/adml) is required - it is available from Microsoft." - compliance: - - cis: "18.3.5" - - cis_csc: "16.14" - references: - - https://www.microsoft.com/en-us/download/details.aspx?id=36036 - - https://support.microsoft.com/en-us/help/2871997/microsoft-security-advisory-update-to-improve-credentials-protection-a - - https://blogs.technet.microsoft.com/secguide/2017/08/30/security-baseline-for-windows-10-creators-update-v1703-final/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest -> UseLogonCredential -> !0;' -# Section 18.4 - MSS (Legacy) - - id: 9093 - title: "Ensure 'MSS: (AutoAdminLogon) Enable Automatic Logon (not recommended)' is set to 'Disabled'" - description: "This setting is separate from the Welcome screen feature in Windows XP and Windows Vista; if that feature is disabled, this setting is not disabled. If you configure a computer for automatic logon, anyone who can physically gain access to the computer can also gain access to everything that is on the computer, including any network or networks to which the computer is connected. Also, if you enable automatic logon, the password is stored in the registry in plaintext, and the specific registry key that stores this value is remotely readable by the Authenticated Users group. The recommended state for this setting is: Disabled." - rationale: "If you configure a computer for automatic logon, anyone who can physically gain access to the computer can also gain access to everything that is on the computer, including any network or networks that the computer is connected to. Also, if you enable automatic logon, the password is stored in the registry in plaintext. The specific registry key that stores this setting is remotely readable by the Authenticated Users group. As a result, this entry is appropriate only if the computer is physically secured and if you ensure that untrusted users cannot remotely see the registry." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (AutoAdminLogon) Enable Automatic Logon (not recommended) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.1" - - cis_csc: "16" - references: - - https://support.microsoft.com/en-us/help/324737/how-to-turn-on-automatic-logon-in-windows - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> AutoAdminLogon -> !0;' - - id: 9094 - title: "Ensure 'MSS: (DisableIPSourceRouting IPv6) IP source routing protection level (protects against packet spoofing)' is set to 'Enabled: Highest protection, source routing is completely disabled'" - description: "IP source routing is a mechanism that allows the sender to determine the IP route that a datagram should follow through the network. The recommended state for this setting is: Enabled: Highest protection, source routing is completely disabled." - rationale: "An attacker could use source routed packets to obscure their identity and location. Source routing allows a computer that sends a packet to specify the route that the packet takes." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Highest protection, source routing is completely disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (DisableIPSourceRouting IPv6) IP source routing protection level (protects against packet spoofing) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.2" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -> DisableIPSourceRouting -> !2;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -> !DisableIPSourceRouting;' - - id: 9095 - title: "Ensure 'MSS: (DisableIPSourceRouting) IP source routing protection level (protects against packet spoofing)' is set to 'Enabled: Highest protection, source routing is completely disabled'" - description: "IP source routing is a mechanism that allows the sender to determine the IP route that a datagram should take through the network. It is recommended to configure this setting to Not Defined for enterprise environments and to Highest Protection for high security environments to completely disable source routing. The recommended state for this setting is: Enabled: Highest protection, source routing is completely disabled." - rationale: "An attacker could use source routed packets to obscure their identity and location. Source routing allows a computer that sends a packet to specify the route that the packet takes." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Highest protection, source routing is completely disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (DisableIPSourceRouting) IP source routing protection level (protects against packet spoofing) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.3" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> DisableIPSourceRouting -> !2;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> !DisableIPSourceRouting;' - - id: 9096 - title: "Ensure 'MSS: (EnableICMPRedirect) Allow ICMP redirects to override OSPF generated routes' is set to 'Disabled'" - description: "Internet Control Message Protocol (ICMP) redirects cause the IPv4 stack to plumb host routes. These routes override the Open Shortest Path First (OSPF) generated routes. The recommended state for this setting is: Disabled." - rationale: "This behavior is expected. The problem is that the 10 minute time-out period for the ICMP redirect-plumbed routes temporarily creates a network situation in which traffic will no longer be routed properly for the affected host. Ignoring such ICMP redirects will limit the system's exposure to attacks that will impact its ability to participate on the network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (EnableICMPRedirect) Allow ICMP redirects to override OSPF generated routes Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.4" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> EnableICMPRedirect -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> !EnableICMPRedirect;' - - id: 9097 - title: "Ensure 'MSS: (NoNameReleaseOnDemand) Allow the computer to ignore NetBIOS name release requests except from WINS servers' is set to 'Enabled'" - description: "NetBIOS over TCP/IP is a network protocol that among other things provides a way to easily resolve NetBIOS names that are registered on Windows-based systems to the IP addresses that are configured on those systems. This setting determines whether the computer releases its NetBIOS name when it receives a name-release request. The recommended state for this setting is: Enabled." - rationale: "The NetBT protocol is designed not to use authentication, and is therefore vulnerable to spoofing. Spoofing makes a transmission appear to come from a user other than the user who performed the action. A malicious user could exploit the unauthenticated nature of the protocol to send a name-conflict datagram to a target computer, which would cause the computer to relinquish its name and not respond to queries. An attacker could send a request over the network and query a computer to release its NetBIOS name. As with any change that could affect applications, it is recommended that you test this change in a non-production environment before you change the production environment. The result of such an attack could be to cause intermittent connectivity issues on the target computer, or even to prevent the use of Network Neighborhood, domain logons, the NET SEND command, or additional NetBIOS name resolution." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (NoNameReleaseOnDemand) Allow the computer to ignore NetBIOS name release requests except from WINS servers Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.6" - - cis_csc: "9" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters -> NoNameReleaseOnDemand -> !1;' - - id: 9098 - title: "Ensure 'MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended)' is set to 'Enabled'" - description: "The DLL search order can be configured to search for DLLs that are requested by running processes in one of two ways: -Search folders specified in the system path first, and then search the current working folder. -Search current working folder first, and then search the folders specified in the system path. When enabled, the registry value is set to 1. With a setting of 1, the system first searches the folders that are specified in the system path and then searches the current working folder. When disabled the registry value is set to 0 and the system first searches the current working folder and then searches the folders that are specified in the system path. Applications will be forced to search for DLLs in the system path first. For applications that require unique versions of these DLLs that are included with the application, this entry could cause performance or stability problems. The recommended state for this setting is: Enabled." - rationale: "If a user unknowingly executes hostile code that was packaged with additional files that include modified versions of system DLLs, the hostile code could load its own versions of those DLLs and potentially increase the type and degree of damage the code can render." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.8" - - cis_csc: "8" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager -> SafeDllSearchMode -> 0;' - - id: 9099 - title: "Ensure 'MSS: (ScreenSaverGracePeriod) The time in seconds before the screen saver grace period expires (0 recommended)' is set to 'Enabled: 5 or fewer seconds'" - description: "Windows includes a grace period between when the screen saver is launched and when the console is actually locked automatically when screen saver locking is enabled. The recommended state for this setting is: Enabled: 5 or fewer seconds." - rationale: "The default grace period that is allowed for user movement before the screen saver lock takes effect is five seconds. If you leave the default grace period configuration, your computer is vulnerable to a potential attack from someone who could approach the console and attempt to log on to the computer before the lock takes effect. An entry to the registry can be made to adjust the length of the grace period." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 5 or fewer seconds: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (ScreenSaverGracePeriod) The time in seconds before the screen saver grace period expires (0 recommended) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.9" - - cis_csc: "16.5" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> 6;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> 7;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> 8;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> 9;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> r:\w\w+;' - - id: 9100 - title: "Ensure 'MSS: (WarningLevel) Percentage threshold for the security event log at which the system will generate a warning' is set to 'Enabled: 90% or less'" - description: "This setting can generate a security audit in the Security event log when the log reaches a user-defined threshold. The recommended state for this setting is: Enabled: 90% or less. Note: If log settings are configured to Overwrite events as needed or Overwrite events older than x days, this event will not be generated." - rationale: "If the Security log reaches 90 percent of its capacity and the computer has not been configured to overwrite events as needed, more recent events will not be written to the log. If the log reaches its capacity and the computer has been configured to shut down when it can no longer record events to the Security log, the computer will shut down and will no longer be available to provide network services." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 90% or less: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (WarningLevel) Percentage threshold for the security event log at which the system will generate a warning Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings – Microsoft Security Guidance blog" - compliance: - - cis: "18.4.12" - - cis_csc: "6.3" - references: - - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> 5B;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> 5C;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> 5D;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> 5E;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> 5F;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:6\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:7\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:8\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:9\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:\D\w;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> r:\w\w\w+;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> !WarningLevel;' -# Section 18.5 - Network - - id: 9101 - title: "Ensure 'Prohibit installation and configuration of Network Bridge on your DNS domain network' is set to 'Enabled'" - description: "You can use this procedure to controls user's ability to install and configure a Network Bridge. The recommended state for this setting is: Enabled" - rationale: "The Network Bridge setting, if enabled, allows users to create a Layer 2 Media Access Control (MAC) bridge, enabling them to connect two or more physical network segments together. A Network Bridge thus allows a computer that has connections to two different networks to share data between those networks. In an enterprise managed environment, where there is a need to control network traffic to only authorized paths, allowing users to create a Network Bridge increases the risk and attack surface from the bridged network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Connections\\Prohibit installation and configuration of Network Bridge on your DNS domain network Note: This Group Policy path is provided by the Group Policy template NetworkConnections.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.5.11.2" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> NC_AllowNetBridge_NLA -> 1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> !NC_AllowNetBridge_NLA;' - - id: 9102 - title: "Ensure 'Require domain users to elevate when setting a network's location' is set to 'Enabled'" - description: "This policy setting determines whether to require domain users to elevate when setting a network's location. The recommended state for this setting is: Enabled." - rationale: "Allowing regular users to set a network location increases the risk and attack surface." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Network Connections\\Require domain users to elevate when setting a network's location Note: This Group Policy path may not exist by default. It is provided by the Group Policy template NetworkConnections.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.5.11.3" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> NC_StdDomainUserSetLocation -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections -> !NC_StdDomainUserSetLocation;' - - id: 9103 - title: "Ensure 'Minimize the number of simultaneous connections to the Internet or a Windows Domain' is set to 'Enabled'" - description: "This policy setting prevents computers from connecting to both a domain based network and a non-domain based network at the same time. The recommended state for this setting is: Enabled." - rationale: "Blocking simultaneous connections can help prevent a user unknowingly allowing network traffic to flow between the Internet and the enterprise managed network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Windows Connection Manager\\Minimize the number of simultaneous connections to the Internet or a Windows Domain Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WCM.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.5.21.1" - - cis_csc: "12" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\GroupPolicy -> fMinimizeConnections -> !1;' -# Section 18.8 - System - - id: 9104 - title: "Ensure 'Include command line in process creation events' is set to 'Disabled'" - description: "This policy setting determines what information is logged in security audit events when a new process has been created. The recommended state for this setting is: Disabled. " - rationale: "When this policy setting is enabled, any user who has read access to the security events can read the command-line arguments for any successfully created process. Command-line arguments may contain sensitive or private information such as passwords or user data." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Audit Process Creation\\Include command line in process creation events Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AuditSettings.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.8.3.1" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit -> ProcessCreationIncludeCmdLine_Enabled -> !0;' - - id: 9105 - title: "Ensure 'Boot-Start Driver Initialization Policy' is set to 'Enabled: Good, unknown and bad but critical'" - description: "This policy setting allows you to specify which boot-start drivers are initialized based on a classification determined by an Early Launch Antimalware boot-start driver. The Early Launch Antimalware boot-start driver can return the following classifications for each boot-start driver:  -Good: The driver has been signed and has not been tampered with.  -Bad: The driver has been identified as malware. It is recommended that you do not allow known bad drivers to be initialized.  -Bad, but required for boot: The driver has been identified as malware, but the computer cannot successfully boot without loading this driver.  -Unknown: This driver has not been attested to by your malware detection application and has not been classified by the Early Launch Antimalware boot-start driver. If you enable this policy setting you will be able to choose which boot-start drivers to initialize the next time the computer is started. If your malware detection application does not include an Early Launch Antimalware boot- start driver or if your Early Launch Antimalware boot-start driver has been disabled, this setting has no effect and all boot-start drivers are initialized. The recommended state for this setting is: Enabled: Good, unknown and bad but critical." - rationale: "This policy setting helps reduce the impact of malware that has already infected your system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Good, unknown and bad but critical: Computer Configuration\\Policies\\Administrative Templates\\System\\Early Launch Antimalware\\Boot-Start Driver Initialization Policy Note: This Group Policy path may not exist by default. It is provided by the Group Policy template EarlyLaunchAM.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.14.1" - - cis_csc: "8" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies\EarlyLaunch -> DriverLoadPolicy -> !3;' - - id: 9106 - title: "Ensure 'Configure registry policy processing: Do not apply during periodic background processing' is set to 'Enabled: FALSE'" - description: "The 'Do not apply during periodic background processing' option prevents the system from updating affected policies in the background while the computer is in use. When background updates are disabled, policy changes will not take effect until the next user logon or system restart. The recommended state for this setting is: Enabled: FALSE (unchecked)." - rationale: "Setting this option to false (unchecked) will ensure that domain policy changes take effect more quickly, as compared to waiting until the next user logon or system restart." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, then set the Do not apply during periodic background processing option to FALSE (unchecked): Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Configure registry policy processing Note: This Group Policy path may not exist by default. It is provided by the Group Policy template GroupPolicy.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.21.2" - - cis_csc: "3.7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> NoBackgroundPolicy -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> !NoBackgroundPolicy;' - - id: 9107 - title: "Ensure 'Configure registry policy processing: Process even if the Group Policy objects have not changed' is set to 'Enabled: TRUE'" - description: "The 'Process even if the Group Policy objects have not changed' option updates and reapplies policies even if the policies have not changed. The recommended state for this setting is: Enabled: TRUE (checked)." - rationale: "Setting this option to true (checked) will ensure unauthorized changes that might have been configured locally are forced to match the domain-based Group Policy settings again." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, then set the Process even if the Group Policy objects have not changed option to TRUE (checked): Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Configure registry policy processing Note: This Group Policy path may not exist by default. It is provided by the Group Policy template GroupPolicy.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.21.3" - - cis_csc: "3.7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> NoGPOListChanges -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> !NoGPOListChanges;' - - id: 9108 - title: "Ensure 'Turn off background refresh of Group Policy' is set to 'Disabled'" - description: "This policy setting prevents Group Policy from being updated while the computer is in use. This policy setting applies to Group Policy for computers, users and Domain Controllers. The recommended state for this setting is: Disabled." - rationale: "This setting ensures that group policy changes take effect more quickly, as compared to waiting until the next user logon or system restart." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Turn off background refresh of Group Policy Note: This Group Policy path is provided by the Group Policy template GroupPolicy.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.8.21.4" - - cis_csc: "3.7" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> DisableBkGndGroupPolicy -> !0;' - - id: 9109 - title: "Ensure 'Do not display network selection UI' is set to 'Enabled'" - description: "This policy setting allows you to control whether anyone can interact with available networks UI on the logon screen. The recommended state for this setting is: Enabled." - rationale: "An unauthorized user could disconnect the PC from the network or can connect the PC to other available networks without signing into Windows." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Do not display network selection UI Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.8.27.1" - - cis_csc: "5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DontDisplayNetworkSelectionUI -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !DontDisplayNetworkSelectionUI;' - - id: 9110 - title: "Ensure 'Do not enumerate connected users on domain-joined computers' is set to 'Enabled'" - description: "This policy setting prevents connected users from being enumerated on domain-joined computers. The recommended state for this setting is: Enabled." - rationale: "A malicious user could use this feature to gather account names of other users, that information could then be used in conjunction with other types of attacks such as guessing passwords or social engineering. The value of this countermeasure is small because a user with domain credentials could gather the same account information using other methods." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Do not enumerate connected users on domain-joined computers Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.27.2" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DontEnumerateConnectedUsers -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !DontEnumerateConnectedUsers;' - - id: 9111 - title: "Ensure 'Enumerate local users on domain-joined computers' is set to 'Disabled'" - description: "This policy setting allows local users to be enumerated on domain-joined computers. The recommended state for this setting is: Disabled." - rationale: "A malicious user could use this feature to gather account names of other users, that information could then be used in conjunction with other types of attacks such as guessing passwords or social engineering. The value of this countermeasure is small because a user with domain credentials could gather the same account information using other methods." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Enumerate local users on domain-joined computers Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.27.3" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnumerateLocalUsers -> !0;' - - id: 9112 - title: "Ensure 'Turn off app notifications on the lock screen' is set to 'Enabled'" - description: "This policy setting allows you to prevent app notifications from appearing on the lock screen. The recommended state for this setting is: Enabled." - rationale: "App notifications might display sensitive business or personal data." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Turn off app notifications on the lock screen Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Logon.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.27.4" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> DisableLockScreenAppNotifications -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !DisableLockScreenAppNotifications;' - - id: 9113 - title: "Ensure 'Turn on convenience PIN sign-in' is set to 'Disabled'" - description: "This policy setting allows you to control whether a domain user can sign in using a convenience PIN. In Windows 10, convenience PIN was replaced with Passport, which has stronger security properties. To configure Passport for domain users, use the policies under Computer Configuration\\Administrative Templates\\Windows Components\\Microsoft Passport for Work. Note: The user's domain password will be cached in the system vault when using this feature. The recommended state for this setting is: Disabled." - rationale: "A PIN is created from a much smaller selection of characters than a password, so in most cases a PIN will be much less robust than a password." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Logon\\Turn on convenience PIN sign-in Note: This Group Policy path may not exist by default. It is provided by the Group Policy template CredentialProviders.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer). Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Turn on PIN sign-in, but it was renamed starting with the Windows 10 Release 1511 Administrative Templates." - compliance: - - cis: "18.8.27.6" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> AllowDomainPINLogon -> !0;' - - id: 9114 - title: "Ensure 'Configure Offer Remote Assistance' is set to 'Disabled'" - description: "This policy setting allows you to turn on or turn off Offer (Unsolicited) Remote Assistance on this computer. Help desk and support personnel will not be able to proactively offer assistance, although they can still respond to user assistance requests. The recommended state for this setting is: Disabled" - rationale: "A user might be tricked and accept an unsolicited Remote Assistance offer from a malicious user." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Assistance\\Configure Offer Remote Assistance Note: This Group Policy path may not exist by default. It is provided by the Group Policy template RemoteAssistance.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.35.1" - - cis_csc: "9.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fAllowUnsolicited -> !0;' - - id: 9115 - title: "Ensure 'Configure Solicited Remote Assistance' is set to 'Disabled'" - description: "This policy setting allows you to turn on or turn off Solicited (Ask for) Remote Assistance on this computer. The recommended state for this setting is: Disabled." - rationale: "There is slight risk that a rogue administrator will gain access to another user's desktop session, however, they cannot connect to a user's computer unannounced or control it without permission from the user. When an expert tries to connect, the user can still choose to deny the connection or give the expert view-only privileges. The user must explicitly click the Yes button to allow the expert to remotely control the workstation." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Assistance\\Configure Solicited Remote Assistance Note: This Group Policy path may not exist by default. It is provided by the Group Policy template RemoteAssistance.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.35.2" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fAllowToGetHelp -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fAllowToGetHelp;' - - id: 9116 - title: "Ensure 'Enable RPC Endpoint Mapper Client Authentication' is set to 'Enabled'" - description: "This policy setting controls whether RPC clients authenticate with the Endpoint Mapper Service when the call they are making contains authentication information. The Endpoint Mapper Service on computers running Windows NT4 (all service packs) cannot process authentication information supplied in this manner. This policy setting can cause a specific issue with 1-way forest trusts if it is applied to the trusting domain DCs (see Microsoft KB3073942), so we do not recommend applying it to Domain Controllers. Note: This policy will not be in effect until the system is rebooted. The recommended state for this setting is: Enabled." - rationale: "Anonymous access to RPC services could result in accidental disclosure of information to unauthenticated users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Procedure Call\\Enable RPC Endpoint Mapper Client Authentication Note: This Group Policy path may not exist by default. It is provided by the Group Policy template RPC.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.8.36.1" - - cis_csc: "9.1" - references: - - https://support.microsoft.com/en-us/help/3073942/rpc-endpoint-mapper-client-authentication-prevents-users-and-groups-fr - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Rpc -> EnableAuthEpResolution -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Rpc -> !EnableAuthEpResolution;' -# Section 18.9 - Windows Components - - id: 9117 - title: "Ensure 'Allow Microsoft accounts to be optional' is set to 'Enabled'" - description: "This policy setting lets you control whether Microsoft accounts are optional for Windows Store apps that require an account to sign in. This policy only affects Windows Store apps that support it. The recommended state for this setting is: Enabled." - rationale: "Enabling this setting allows an organization to use their enterprise user accounts instead of using their Microsoft accounts when accessing Windows store apps. This provides the organization with greater control over relevant credentials. Microsoft accounts cannot be centrally managed and as such enterprise credential security policies cannot be applied to them, which could put any information accessed by using Microsoft accounts at risk." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\App runtime\\Allow Microsoft accounts to be optional Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AppXRuntime.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.9.6.1" - - cis_csc: "16.9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> MSAOptional -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> !MSAOptional;' - - id: 9118 - title: "Ensure 'Disallow Autoplay for non-volume devices' is set to 'Enabled'" - description: "This policy setting disallows AutoPlay for MTP devices like cameras or phones. The recommended state for this setting is: Enabled." - rationale: "An attacker could use this feature to launch a program to damage a client computer or data on the computer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Disallow Autoplay for non-volume devices Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AutoPlay.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.9.8.1" - - cis_csc: "8.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoAutoplayfornonVolume -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> !NoAutoplayfornonVolume;' - - id: 9119 - title: "Ensure 'Set the default behavior for AutoRun' is set to 'Enabled: Do not execute any autorun commands'" - description: "This policy setting sets the default behavior for Autorun commands. Autorun commands are generally stored in autorun.inf files. They often launch the installation program or other routines. The recommended state for this setting is: Enabled: Do not execute any autorun commands." - rationale: "Prior to Windows Vista, when media containing an autorun command is inserted, the system will automatically execute the program without user intervention. This creates a major security concern as code may be executed without user's knowledge. The default behavior starting with Windows Vista is to prompt the user whether autorun command is to be run. The autorun command is represented as a handler in the Autoplay dialog." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Do not execute any autorun commands: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Set the default behavior for AutoRun Note: This Group Policy path may not exist by default. It is provided by the Group Policy template AutoPlay.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.9.8.2" - - cis_csc: "8.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoAutorun -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> !NoAutorun;' - - id: 9120 - title: "Ensure 'Turn off Autoplay' is set to 'Enabled: All drives'" - description: "Autoplay starts to read from a drive as soon as you insert media in the drive, which causes the setup file for programs or audio media to start immediately. An attacker could use this feature to launch a program to damage the computer or data on the computer. Autoplay is disabled by default on some removable drive types, such as floppy disk and network drives, but not on CD-ROM drives. Note: You cannot use this policy setting to enable Autoplay on computer drives in which it is disabled by default, such as floppy disk and network drives. The recommended state for this setting is: Enabled: All drives." - rationale: "An attacker could use this feature to launch a program to damage a client computer or data on the computer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: All drives: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Turn off Autoplay Note: This Group Policy path is provided by the Group Policy template AutoPlay.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.8.3" - - cis_csc: "8.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer-> NoDriveTypeAutoRun -> !ff;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer-> !NoDriveTypeAutoRun;' - - id: 9121 - title: "Ensure 'Do not display the password reveal button' is set to 'Enabled'" - description: "This policy setting allows you to configure the display of the password reveal button in password entry user experiences. The recommended state for this setting is: Enabled." - rationale: "This is a useful feature when entering a long and complex password, especially when using a touchscreen. The potential risk is that someone else may see your password while surreptitiously observing your screen." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Credential User Interface\\Do not display the password reveal button Note: This Group Policy path may not exist by default. It is provided by the Group Policy template CredUI.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.9.15.1" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredUI -> DisablePasswordReveal -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredUI -> !DisablePasswordReveal;' - - id: 9122 - title: "Ensure 'Enumerate administrator accounts on elevation' is set to 'Disabled'" - description: "This policy setting controls whether administrator accounts are displayed when a user attempts to elevate a running application. The recommended state for this setting is: Disabled." - rationale: "Users could see the list of administrator accounts, making it slightly easier for a malicious user who has logged onto a console session to try to crack the passwords of those accounts." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Credential User Interface\\Enumerate administrator accounts on elevation Note: This Group Policy path is provided by the Group Policy template CredUI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.15.2" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\CredUI -> EnumerateAdministrators -> !0;' - - id: 9123 - title: "Ensure 'Application: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" - description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." - rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Application\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.1.1" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> Retention -> !0;' - - id: 9124 - title: "Ensure 'Application: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" - description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 32,768 or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Application\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.1.2" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:0\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:4\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:5\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:6\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> MaxSize -> r:7\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Application -> !MaxSize;' - - id: 9125 - title: "Ensure 'Security: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" - description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." - rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Security\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.2.1" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> Retention -> !0;' - - id: 9126 - title: "Ensure 'Security: Specify the maximum log file size (KB)' is set to 'Enabled: 196,608 or greater'" - description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 196,608 or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 196,608 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Security\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.2.2" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:0\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:1\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> MaxSize -> r:2\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Security -> !MaxSize;' - - id: 9127 - title: "Ensure 'Setup: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" - description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." - rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Setup\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.3.1" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> Retention -> !0;' - - id: 9128 - title: "Ensure 'Setup: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" - description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 32,768 or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Setup\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.3.2" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:0\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:4\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:5\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:6\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> MaxSize -> r:7\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\Setup -> !MaxSize;' - - id: 9129 - title: "Ensure 'System: Control Event Log behavior when the log file reaches its maximum size' is set to 'Disabled'" - description: "This policy setting controls Event Log behavior when the log file reaches its maximum size. The recommended state for this setting is: Disabled. Note: Old events may or may not be retained according to the Backup log automatically when full policy setting." - rationale: "If new events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\System\\Control Event Log behavior when the log file reaches its maximum size Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Retain old events, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.4.1" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> Retention -> !0;' - - id: 9130 - title: "Ensure 'System: Specify the maximum log file size (KB)' is set to 'Enabled: 32,768 or greater'" - description: "This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments. The recommended state for this setting is: Enabled: 32,768 or greater." - rationale: "If events are not recorded it may be difficult or impossible to determine the root cause of system problems or the unauthorized activities of malicious users" - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 32,768 or greater: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\System\\Specify the maximum log file size (KB) Note: This Group Policy path is provided by the Group Policy template EventLog.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Maximum Log Size (KB), but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.26.4.2" - - cis_csc: "6.3" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:0\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:1\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:2\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:3\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:4\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:5\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:6\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> MaxSize -> r:7\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog\System -> !MaxSize;' - - id: 9131 - title: "Ensure 'Turn off Data Execution Prevention for Explorer' is set to 'Disabled'" - description: "Disabling Data Execution Prevention can allow certain legacy plug-in applications to function without terminating Explorer. The recommended state for this setting is: Disabled." - rationale: "Data Execution Prevention is an important security feature supported by Explorer that helps to limit the impact of certain types of malware." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off Data Execution Prevention for Explorer Note: This Group Policy path may not exist by default. It is provided by the Group Policy template Explorer.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.9.30.2" - - cis_csc: "8.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoDataExecutionPrevention -> !0;' - - id: 9132 - title: "Ensure 'Turn off heap termination on corruption' is set to 'Disabled'" - description: "This policy setting allows you to configure the amount of functionality that the shell protocol can have. When using the full functionality of this protocol, applications can open folders and launch files. The protected mode reduces the functionality of this protocol allowing applications to only open a limited set of folders. Applications are not able to open files with this protocol when it is in the protected mode. It is recommended to leave this protocol in the protected mode to increase the security of Windows. The recommended state for this setting is: Disabled." - rationale: "Limiting the opening of files and folders to a limited set reduces the attack surface of the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off shell protocol protected mode Note: This Group Policy path is provided by the Group Policy template WindowsExplorer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.30.3" - - cis_csc: "8.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer -> NoHeapTerminationOnCorruption -> !0;' - - id: 9133 - title: "Ensure 'Turn off shell protocol protected mode' is set to 'Disabled'" - description: "This policy setting allows you to configure the amount of functionality that the shell protocol can have. When using the full functionality of this protocol, applications can open folders and launch files. The protected mode reduces the functionality of this protocol allowing applications to only open a limited set of folders. Applications are not able to open files with this protocol when it is in the protected mode. It is recommended to leave this protocol in the protected mode to increase the security of Windows. The recommended state for this setting is: Disabled." - rationale: "Limiting the opening of files and folders to a limited set reduces the attack surface of the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\File Explorer\\Turn off shell protocol protected mode Note: This Group Policy path is provided by the Group Policy template WindowsExplorer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.30.4" - - cis_csc: "8.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> PreXPSP2ShellProtocolBehavior -> !0;' - - id: 9134 - title: "Ensure 'Prevent the usage of OneDrive for file storage' is set to 'Enabled'" - description: "This policy setting lets you prevent apps and features from working with files on OneDrive using the Next Generation Sync Client. The recommended state for this setting is: Enabled." - rationale: "Enabling this setting prevents users from accidentally uploading confidential or sensitive corporate information to the OneDrive cloud service using the Next Generation Sync Client." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\OneDrive\\Prevent the usage of OneDrive for file storage Note: This Group Policy path may not exist by default. It is provided by the Group Policy template SkyDrive.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer). However, we strongly recommend you only use the version included with the Microsoft Windows 10 Release 1607 & Server 2016 Administrative Templates (or newer). Older versions of the templates had conflicting settings in different template files for both OneDrive & SkyDrive, until it was cleaned up properly in the above version. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Prevent the usage of SkyDrive for file storage, but it was renamed starting with the Windows 10 RTM (Release 1507) Administrative Templates" - compliance: - - cis: "18.9.52.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\OneDrive -> DisableFileSyncNGSC -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\OneDrive -> !DisableFileSyncNGSC;' - - id: 9135 - title: "Ensure 'Prevent the usage of OneDrive for file storage on Windows 8.1' is set to 'Enabled'" - description: "This policy setting lets you prevent apps and features from working with files on OneDrive using the legacy OneDrive/SkyDrive client. The recommended state for this setting is: Enabled. Note: Despite the name of this setting, it is applicable to the legacy OneDrive client on any Windows OS." - rationale: "Enabling this setting prevents users from accidentally uploading confidential or sensitive corporate information to the OneDrive cloud service using the legacy OneDrive/SkyDrive client." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\OneDrive\\Prevent the usage of OneDrive for file storage on Windows 8.1 Note: This Group Policy path may not exist by default. It is provided by the Group Policy template SkyDrive.admx/adml that is included with the Microsoft Windows 10 Release 1607 & Server 2016 Administrative Templates (or newer). We strongly recommend you only use either that version of the template or a newer one. Older versions of the templates had conflicting settings in different template files for both OneDrive & SkyDrive, until it was cleaned up properly in the above version." - compliance: - - cis: "18.9.52.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Skydrive -> DisableFileSync -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Skydrive -> !DisableFileSync;' - - id: 9136 - title: "Ensure 'Do not allow passwords to be saved' is set to 'Enabled'" - description: "This policy setting helps prevent Remote Desktop clients from saving passwords on a computer. The recommended state for this setting is: Enabled. Note: If this policy setting was previously configured as Disabled or Not configured, any previously saved passwords will be deleted the first time a Remote Desktop client disconnects from any server." - rationale: "An attacker with physical access to the computer may be able to break the protection guarding saved passwords. An attacker who compromises a user's account and connects to their computer could use saved passwords to gain access to additional hosts." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Connection Client\\Do not allow passwords to be saved Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.2.2" - - cis_csc: "16.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> DisablePasswordSaving -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !DisablePasswordSaving;' - - id: 9137 - title: "Ensure 'Do not allow drive redirection' is set to 'Enabled'" - description: "This policy setting prevents users from sharing the local drives on their client computers to Remote Desktop Servers that they access. Mapped drives appear in the session folder tree in Windows Explorer in the following format: \\\\TSClient\\$ If local drives are shared they are left vulnerable to intruders who want to exploit the data that is stored on them. The recommended state for this setting is: Enabled." - rationale: "Data could be forwarded from the user's Remote Desktop Services session to the user's local computer without any direct user interaction. Malicious software already present on a compromised server would have direct and stealthy disk access to the user's local computer during the Remote Desktop session." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow drive redirection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.3.2" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableCdm -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fDisableCdm;' - - id: 9138 - title: "Ensure 'Always prompt for password upon connection' is set to 'Enabled'" - description: "This policy setting specifies whether Remote Desktop Services always prompts the client computer for a password upon connection. You can use this policy setting to enforce a password prompt for users who log on to Remote Desktop Services, even if they already provided the password in the Remote Desktop Connection client. The recommended state for this setting is: Enabled." - rationale: "Users have the option to store both their username and password when they create a new Remote Desktop Connection shortcut. If the server that runs Remote Desktop Services allows users who have used this feature to log on to the server but not enter their password, then it is possible that an attacker who has gained physical access to the user's computer could connect to a Remote Desktop Server through the Remote Desktop Connection shortcut, even though they may not know the user's password." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Always prompt for password upon connection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In the Microsoft Windows Vista Administrative Templates, this setting was named Always prompt client for password upon connection, but it was renamed starting with the Windows Server 2008 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.58.3.9.1" - - cis_csc: "16.14" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fPromptForPassword -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fPromptForPassword;' - - id: 9139 - title: "Ensure 'Require secure RPC communication' is set to 'Enabled'" - description: "This policy setting allows you to specify whether Remote Desktop Services requires secure Remote Procedure Call (RPC) communication with all clients or allows unsecured communication. You can use this policy setting to strengthen the security of RPC communication with clients by allowing only authenticated and encrypted requests. The recommended state for this setting is: Enabled." - rationale: "Allowing unsecure RPC communication can exposes the server to man in the middle attacks and data disclosure attacks." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Require secure RPC communication Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.9.2" - - cis_csc: "3.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fEncryptRPCTraffic -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fEncryptRPCTraffic;' - - id: 9140 - title: "Ensure 'Set client connection encryption level' is set to 'Enabled: High Level'" - description: "This policy setting specifies whether to require the use of a specific encryption level to secure communications between client computers and RD Session Host servers during Remote Desktop Protocol (RDP) connections. This policy only applies when you are using native RDP encryption. However, native RDP encryption (as opposed to SSL encryption) is not recommended. This policy does not apply to SSL encryption. The recommended state for this setting is: Enabled: High Level." - rationale: "If Remote Desktop client connections that use low level encryption are allowed, it is more likely that an attacker will be able to decrypt any captured Remote Desktop Services network traffic." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: High Level: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Set client connection encryption level Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.9.3" - - cis_csc: "3.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MinEncryptionLevel -> !3;' - - id: 9141 - title: "Ensure 'Do not delete temp folders upon exit' is set to 'Disabled'" - description: "This policy setting specifies whether Remote Desktop Services retains a user's per-session temporary folders at logoff. The recommended state for this setting is: Disabled." - rationale: "Sensitive information could be contained inside the temporary folders and visible to other administrators that log into the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Temporary Folders\\Do not delete temp folders upon exit Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Do not delete temp folder upon exit, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.58.3.11.1" - - cis_csc: "14.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> DeleteTempDirsOnExit -> !1;' - - id: 9142 - title: "Ensure 'Do not use temporary folders per session' is set to 'Disabled'" - description: "By default, Remote Desktop Services creates a separate temporary folder on the RD Session Host server for each active session that a user maintains on the RD Session Host server. The temporary folder is created on the RD Session Host server in a Temp folder under the user's profile folder and is named with the sessionid. This temporary folder is used to store individual temporary files. To reclaim disk space, the temporary folder is deleted when the user logs off from a session. The recommended state for this setting is: Disabled." - rationale: "Disabling this setting keeps the cached data independent for each session, both reducing the chance of problems from shared cached data between sessions, and keeping possibly sensitive data separate to each user session." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Temporary Folders\\Do not use temporary folders per session Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.58.3.11.2" - - cis_csc: "14.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> PerSessionTempDir -> !1;' - - id: 9143 - title: "Ensure 'Prevent downloading of enclosures' is set to 'Enabled'" - description: "This policy setting prevents the user from having enclosures (file attachments) downloaded from an RSS feed to the user's computer. The recommended state for this setting is: Enabled." - rationale: "Allowing attachments to be downloaded through the RSS feed can introduce files that could have malicious intent." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\RSS Feeds\\Prevent downloading of enclosures Note: This Group Policy path is provided by the Group Policy template InetRes.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Turn off downloading of enclosures, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.59.1" - - cis_csc: "7.2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Feeds -> DisableEnclosureDownload -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Feeds -> !DisableEnclosureDownload;' - - id: 9144 - title: "Ensure 'Allow indexing of encrypted files' is set to 'Disabled'" - description: "This policy setting controls whether encrypted items are allowed to be indexed. When this setting is changed, the index is rebuilt completely. Full volume encryption (such as BitLocker Drive Encryption or a non-Microsoft solution) must be used for the location of the index to maintain security for encrypted files. The recommended state for this setting is: Disabled." - rationale: "Indexing and allowing users to search encrypted files could potentially reveal confidential data stored within the encrypted files." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Allow indexing of encrypted files Note: This Group Policy path is provided by the Group Policy template Search.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.60.2" - - cis_csc: "13.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> AllowIndexingEncryptedStoresOrItems -> !0;' - - id: 9145 - title: "Ensure 'Configure Windows Defender SmartScreen' is set to 'Enabled: Warn and prevent bypass'" - description: "This policy setting allows you to manage the behavior of Windows SmartScreen. Windows SmartScreen helps keep PCs safer by warning users before running unrecognized programs downloaded from the Internet. Some information is sent to Microsoft about files and programs run on PCs with this feature enabled. The recommended state for this setting is: Enabled: Warn and prevent bypass." - rationale: "Windows SmartScreen helps keep PCs safer by warning users before running unrecognized programs downloaded from the Internet. However, due to the fact that some information is sent to Microsoft about files and programs run on PCs some organizations may prefer to disable it." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Warn and prevent bypass: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender SmartScreen\\Explorer\\Configure Windows Defender SmartScreen Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsExplorer.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer). Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named Configure Windows SmartScreen, but it was renamed starting with the Windows 10 Release 1703 Administrative Templates." - compliance: - - cis: "18.9.80.1.1" - - cis_csc: "2" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> EnableSmartScreen -> !2;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System -> !EnableSmartScreen;' - - id: 9146 - title: "Ensure 'Configure Default consent' is set to 'Enabled: Always ask before sending data'" - description: "This setting allows you to set the default consent handling for error reports. The recommended state for this setting is: Enabled: Always ask before sending data" - rationale: "Error reports may contain sensitive information and should not be sent to anyone automatically." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Always ask before sending data: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Error Reporting\\Consent\\Configure Default consent Note: This Group Policy path is provided by the Group Policy template ErrorReporting.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.81.2.1" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent -> DefaultConsent -> !1;' - - id: 9147 - title: "Ensure 'Automatically send memory dumps for OS-generated error reports' is set to 'Disabled'" - description: "This policy setting controls whether memory dumps in support of OS-generated error reports can be sent to Microsoft automatically. This policy does not apply to error reports generated by 3rd-party products, or additional data other than memory dumps. The recommended state for this setting is: Disabled." - rationale: "Memory dumps may contain sensitive information and should not be automatically sent to anyone." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Error Reporting\\Automatically send memory dumps for OS- generated error reports Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ErrorReporting.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.9.81.3" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> AutoApproveOSDumps -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> !AutoApproveOSDumps;' - - id: 9148 - title: "Ensure 'Allow user control over installs' is set to 'Disabled'" - description: "This setting controls whether users are permitted to change installation options that typically are available only to system administrators. The security features of Windows Installer normally prevent users from changing installation options that are typically reserved for system administrators, such as specifying the directory to which files are installed. If Windows Installer detects that an installation package has permitted the user to change a protected option, it stops the installation and displays a message. These security features operate only when the installation program is running in a privileged security context in which it has access to directories denied to the user. The recommended state for this setting is: Disabled." - rationale: "In an enterprise managed environment, only IT staff with administrative rights should be installing or changing software on a system. Allowing users the ability to have any control over installs can risk unapproved software from being installed or removed from a system, which could cause the system to become vulnerable to compromise." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Allow user control over installs Note: This Group Policy path is provided by the Group Policy template MSI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was named Enable user control over installs, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates." - compliance: - - cis: "18.9.85.1" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> EnableUserControl -> !0;' - - id: 9149 - title: "Ensure 'Always install with elevated privileges' is set to 'Disabled'" - description: "This setting controls whether or not Windows Installer should use system permissions when it installs any program on the system. Note: This setting appears both in the Computer Configuration and User Configuration folders. To make this setting effective, you must enable the setting in both folders. Caution: If enabled, skilled users can take advantage of the permissions this setting grants to change their privileges and gain permanent access to restricted files and folders. Note that the User Configuration version of this setting is not guaranteed to be secure. The recommended state for this setting is: Disabled." - rationale: "Users with limited privileges can exploit this feature by creating a Windows Installer installation package that creates a new local account that belongs to the local built-in Administrators group, adds their current account to the local built-in Administrators group, installs malicious software, or performs other unauthorized activities." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Always install with elevated privileges Note: This Group Policy path is provided by the Group Policy template MSI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.85.2" - - cis_csc: "5.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> AlwaysInstallElevated -> !0;' - - id: 9150 - title: "Ensure 'Sign-in last interactive user automatically after a system-initiated restart' is set to 'Disabled'" - description: "This policy setting controls whether a device will automatically sign-in the last interactive user after Windows Update restarts the system. The recommended state for this setting is: Disabled." - rationale: "Disabling this feature will prevent the caching of user's credentials and unauthorized use of the device, and also ensure the user is aware of the restart." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Logon Options\\Sign-in last interactive user automatically after a system-initiated restart Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WinLogon.admx/adml that is included with the Microsoft Windows 8.1 & Server 2012 R2 Administrative Templates (or newer)." - compliance: - - cis: "18.9.86.1" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> DisableAutomaticRestartSignOn -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> !DisableAutomaticRestartSignOn;' - - id: 9151 - title: "Ensure 'Turn on PowerShell Script Block Logging' is set to 'Disabled'" - description: "This policy setting enables logging of all PowerShell script input to the Microsoft-Windows- PowerShell/Operational event log. The recommended state for this setting is: Disabled. Note: In Microsoft's own hardening guidance, they recommend the opposite value, Enabled, because having this data logged improves investigations of PowerShell attack incidents. However, the default ACL on the PowerShell Operational log allows Interactive User (i.e. any logged on user) to read it, and therefore possibly expose passwords or other sensitive information to unauthorized users. If Microsoft locks down the default ACL on that log in the future (e.g. to restrict it only to Administrators), then we will revisit this recommendation in a future release." - rationale: "There are potential risks of capturing passwords in the PowerShell logs. This setting should only be needed for debugging purposes, and not in normal operation, it is important to ensure this is set to Disabled." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows PowerShell\\Turn on PowerShell Script Block Logging Note: This Group Policy path may not exist by default. It is provided by the Group Policy template PowerShellExecutionPolicy.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." - compliance: - - cis: "18.9.95.1" - - cis_csc: "16.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging -> EnableScriptBlockLogging -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging -> !EnableScriptBlockLogging;' - - id: 9152 - title: "Ensure 'Turn on PowerShell Transcription' is set to 'Disabled'" - description: "This Policy setting lets you capture the input and output of Windows PowerShell commands into text-based transcripts. The recommended state for this setting is: Disabled." - rationale: "If this setting is enabled there is a risk that passwords could get stored in plain text in the PowerShell_transcript output file." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows PowerShell\\Turn on PowerShell Transcription Note: This Group Policy path may not exist by default. It is provided by the Group Policy template PowerShellExecutionPolicy.admx/adml that is included with the Microsoft Windows 10 RTM (Release 1507) Administrative Templates (or newer)." - compliance: - - cis: "18.9.95.2" - - cis_csc: "16.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription -> EnableTranscripting -> !0;' - - id: 9153 - title: "Ensure 'Allow Basic authentication' is set to 'Disabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client uses Basic authentication. The recommended state for this setting is: Disabled." - rationale: "Basic authentication is less robust than other authentication methods available in WinRM because credentials including passwords are transmitted in plain text. An attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Allow Basic authentication Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.97.1.1" - - cis_csc: "16.13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowBasic -> !0;' - - id: 9154 - title: "Ensure 'Allow unencrypted traffic' is set to 'Disabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client sends and receives unencrypted messages over the network. The recommended state for this setting is: Disabled." - rationale: "Encrypting WinRM network traffic reduces the risk of an attacker viewing or modifying WinRM messages as they transit the network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Allow unencrypted traffic Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.97.1.2" - - cis_csc: "16.13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowUnencryptedTraffic -> !0;' - - id: 9155 - title: "Ensure 'Disallow Digest authentication' is set to 'Enabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) client will not use Digest authentication. The recommended state for this setting is: Enabled." - rationale: "Digest authentication is less robust than other authentication methods available in WinRM, an attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Client\\Disallow Digest authentication Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.97.1.3" - - cis_csc: "16.13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> AllowDigest -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client -> !AllowDigest;' - - id: 9156 - title: "Ensure 'Allow Basic authentication' is set to 'Disabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service accepts Basic authentication from a remote client. The recommended state for this setting is: Disabled." - rationale: "Basic authentication is less robust than other authentication methods available in WinRM because credentials including passwords are transmitted in plain text. An attacker who is able to capture packets on the network where WinRM is running may be able to determine the credentials used for accessing remote hosts via WinRM." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow Basic authentication Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.97.2.1" - - cis_csc: "16.13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowBasic -> !0;' - - id: 9157 - title: "Ensure 'Allow unencrypted traffic' is set to 'Disabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service sends and receives unencrypted messages over the network. The recommended state for this setting is: Disabled." - rationale: "Encrypting WinRM network traffic reduces the risk of an attacker viewing or modifying WinRM messages as they transit the network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow unencrypted traffic Note: This Group Policy path is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.97.2.3" - - cis_csc: "16.13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowUnencryptedTraffic -> !0;' - - id: 9158 - title: "Ensure 'Disallow WinRM from storing RunAs credentials' is set to 'Enabled'" - description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service will allow RunAs credentials to be stored for any plug-ins. The recommended state for this setting is: Enabled. Note: If you enable and then disable this policy setting, any values that were previously configured for RunAsPassword will need to be reset." - rationale: "Although the ability to store RunAs credentials is a convenient feature it increases the risk of account compromise slightly. For example, if you forget to lock your desktop before leaving it unattended for a few minutes another person could access not only the desktop of your computer but also any hosts you manage via WinRM with cached RunAs credentials." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Disallow WinRM from storing RunAs credentials Note: This Group Policy path may not exist by default. It is provided by the Group Policy template WindowsRemoteManagement.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." - compliance: - - cis: "18.9.97.2.4" - - cis_csc: "16.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> DisableRunAs -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> !DisableRunAs;' - - id: 9159 - title: "Ensure 'Configure Automatic Updates' is set to 'Enabled'" - description: "This policy setting specifies whether computers in your environment will receive security updates from Windows Update or WSUS. If you configure this policy setting to Enabled, the operating system will recognize when a network connection is available and then use the network connection to search Windows Update or your designated intranet site for updates that apply to them. After you configure this policy setting to Enabled, select one of the following three options in the Configure Automatic Updates Properties dialog box to specify how the service will work:  2 - Notify for download and auto install (Notify before downloading any updates)  3 - Auto download and notify for install (Download the updates automatically and notify when they are ready to be installed.) (Default setting)  4 - Auto download and schedule the install (Automatically download updates and install them on the schedule specified below.))  5 - Allow local admin to choose setting (Leave decision on above choices up to the local Administrators (Not Recommended)) The recommended state for this setting is: Enabled. Note: The sub-setting 'Configure automatic updating:' has 4 possible values – all of them are valid depending on specific organizational needs, however if feasible we suggest using a value of 4 - Auto download and schedule the install. This suggestion is not a scored requirement. Note #2: Organizations that utilize a 3rd-party solution for patching may choose to exempt themselves from this setting, and instead configure it to Disabled so that the native Windows Update mechanism does not interfere with the 3rd-party patching process." - rationale: "Although each version of Windows is thoroughly tested before release, it is possible that problems will be discovered after the products are shipped. The Configure Automatic Updates setting can help you ensure that the computers in your environment will always have the most recent critical operating system updates and service packs installed." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Configure Automatic Updates Note: This Group Policy path is provided by the Group Policy template WindowsUpdate.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.101.2" - - cis_csc: "4.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> NoAutoUpdate -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> !NoAutoUpdate;' - - id: 9160 - title: "Ensure 'Configure Automatic Updates: Scheduled install day' is set to '0 - Every day'" - description: "This policy setting specifies when computers in your environment will receive security updates from Windows Update or WSUS. The recommended state for this setting is: 0 - Every day. Note: This setting is only applicable if 4 - Auto download and schedule the install is selected in Rule 18.9.101.2. It will have no impact if any other option is selected." - rationale: "Although each version of Windows is thoroughly tested before release, it is possible that problems will be discovered after the products are shipped. The Configure Automatic Updates setting can help you ensure that the computers in your environment will always have the most recent critical operating system updates and service packs installed." - remediation: "To establish the recommended configuration via GP, set the following UI path to 0 - Every day: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Configure Automatic Updates: Scheduled install day Note: This Group Policy path is provided by the Group Policy template WindowsUpdate.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." - compliance: - - cis: "18.9.101.3" - - cis_csc: "4.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> ScheduledInstallDay -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> !ScheduledInstallDay;' - - id: 9161 - title: "Ensure 'No auto-restart with logged on users for scheduled automatic updates installations' is set to 'Disabled'" - description: "This policy setting specifies that Automatic Updates will wait for computers to be restarted by the users who are logged on to them to complete a scheduled installation. The recommended state for this setting is: Disabled. Note: This setting applies only when you configure Automatic Updates to perform scheduled update installations. If you configure the Configure Automatic Updates setting to Disabled, this setting has no effect." - rationale: "Some security updates require that the computer be restarted to complete an installation. If the computer cannot restart automatically, then the most recent update will not completely install and no new updates will download to the computer until it is restarted. Without the auto-restart functionality, users who are not security-conscious may choose to indefinitely delay the restart, therefore keeping the computer in a less secure state." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\No auto-restart with logged on users for scheduled automatic updates installations Note: This Group Policy path is provided by the Group Policy template WindowsUpdate.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named No auto-restart for scheduled Automatic Updates installations, but it was renamed starting with the Windows 7 & Server 2008 R2 Administrative Templates." - compliance: - - cis: "18.9.101.4" - - cis_csc: "4.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> NoAutoRebootWithLoggedOnUsers -> !0;' diff --git a/sca/windows/cis_win2012r2_memberL2_rcl.yml b/sca/windows/cis_win2012r2_memberL2.yml similarity index 65% rename from sca/windows/cis_win2012r2_memberL2_rcl.yml rename to sca/windows/cis_win2012r2_memberL2.yml index 70d04b502..03c8747d2 100644 --- a/sca/windows/cis_win2012r2_memberL2_rcl.yml +++ b/sca/windows/cis_win2012r2_memberL2.yml @@ -1,8 +1,8 @@ -# Security Configuration assessment +# Security Configuration Assessment # CIS Checks for Windows 2012 R2 Member Server L2 # Copyright (C) 2015-2019, Wazuh Inc. # -# This program is a free software; you can redistribute it +# This program is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public # License (version 2) as published by the FSF - Free Software # Foundation @@ -11,7 +11,7 @@ policy: id: "cis_win2012r2_memberL2" - file: "cis_win2012r2_memberL2_rcl.yml" + file: "cis_win2012r2_memberL2.yml" name: "CIS benchmark for Windows 2012 R2 Member Server L2" description: "This document provides prescriptive guidance for establishing a secure configuration posture for Microsoft Windows Server 2012 R2." references: @@ -20,619 +20,660 @@ policy: requirements: title: "Check that the Windows platform is Windows Server 2012 R2" description: "Requirements for running the CIS benchmark Member Server L2 under Windows Server 2012 R2" - condition: "any required" + condition: all rules: - - 'r:HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion -> ProductName -> r:^Windows Server 2012 R2;' + - 'r:HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion -> ProductName -> r:^Windows Server 2012 R2' checks: # Section 2.3.7 - Interactive logon - - id: 9500 - title: "Ensure 'Ensure 'Interactive logon: Number of previous logons to cache (in case domain controller is not available)' is set to '4 or fewer logon(s)'" + - id: 12500 + title: "Ensure 'Interactive logon: Number of previous logons to cache (in case domain controller is not available)' is set to '4 or fewer logon(s)'" description: "This policy setting determines whether a user can log on to a Windows domain using cached account information." rationale: "The number that is assigned to this policy setting indicates the number of users whose logon information the computer will cache locally." - remediation: "To establish the recommended configuration via GP, set the following UI path to 4 or fewer logon(s): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Number of previous logons to cache (in case domain controller is not available)" - compliance: - - cis: "2.3.7.6" - - cis_csc: "16" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> CachedLogonsCount -> 5;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> CachedLogonsCount -> 6;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> CachedLogonsCount -> 7;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> CachedLogonsCount -> 8;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> CachedLogonsCount -> 9;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> CachedLogonsCount -> a;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> CachedLogonsCount -> b;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> CachedLogonsCount -> c;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> CachedLogonsCount -> d;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> CachedLogonsCount -> e;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> CachedLogonsCount -> f;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> CachedLogonsCount -> \w\w+;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> !CachedLogonsCount;' + remediation: "To establish the recommended configuration via GP, set the following UI path to 4 or fewer logon(s): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Number of previous logons to cache (in case domain controller is not available)." + compliance: + - cis: ["2.3.7.6"] + - cis_csc: ["16"] + references: + - 'CCE-38240-8' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> CachedLogonsCount -> r:^0$|^1$|^2$|^3$|^4$' + # Section 2.3.10 - Network access - - id: 9501 + - id: 12501 title: "Ensure 'Network access: Do not allow storage of passwords and credentials for network authentication' is set to 'Enabled'" description: "This policy setting determines whether Credential Manager (formerly called Stored User Names and Passwords) saves passwords or credentials for later use when it gains domain authentication." rationale: "Passwords that are cached can be accessed by the user when logged on to the computer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow storage of passwords and credentials for network authentication" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow storage of passwords and credentials for network authentication." compliance: - - cis: "2.3.10.4" - - cis_csc: "16.14" - condition: any + - cis: ["2.3.10.4"] + - cis_csc: ["16.14"] + references: + - 'CCE-38119-4' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> DisableDomainCreds -> !1;' - - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> !DisableDomainCreds;' + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> DisableDomainCreds -> 1' + # Section 18.4 - MSS (Legacy) - - id: 9502 + - id: 12502 title: "Ensure 'MSS: (KeepAliveTime) How often keep-alive packets are sent in milliseconds' is set to 'Enabled: 300,000 or 5 minutes (recommended)'" description: "This value controls how often TCP attempts to verify that an idle connection is still intact by sending a keep-alive packet." rationale: "An attacker who is able to connect to network applications could establish numerous connections to cause a DoS condition." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 300,000 or 5 minutes (recommended): Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (KeepAliveTime) How often keep-alive packets are sent in milliseconds" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 300,000 or 5 minutes (recommended): Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (KeepAliveTime) How often keep-alive packets are sent in milliseconds." compliance: - - cis: "18.4.5" - - cis_csc: "9" - condition: any + - cis: ["18.4.5"] + - cis_csc: ["9"] + references: + - 'CCE-36868-8' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> KeepAliveTime -> !493e0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> !KeepAliveTime;' - - id: 9503 + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> KeepAliveTime -> 300000' + + - id: 12503 title: "Ensure 'MSS: (PerformRouterDiscovery) Allow IRDP to detect and configure Default Gateway addresses (could lead to DoS)' is set to 'Disabled'" description: "This setting is used to enable or disable the Internet Router Discovery Protocol (IRDP), which allows the system to detect and configure default gateway addresses automatically as described in RFC 1256 on a per-interface basis." rationale: "An attacker who has gained control of a computer on the same network segment could configure a computer on the network to impersonate a router." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (PerformRouterDiscovery) Allow IRDP to detect and configure Default Gateway addresses (could lead to DoS)" + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (PerformRouterDiscovery) Allow IRDP to detect and configure Default Gateway addresses (could lead to DoS)." compliance: - - cis: "18.4.7" - - cis_csc: "9" - condition: any + - cis: ["18.4.7"] + - cis_csc: ["9"] + references: + - 'CCE-38065-9' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> PerformRouterDiscovery -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> !PerformRouterDiscovery;' - - id: 9504 + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> PerformRouterDiscovery -> 0' + + - id: 12504 title: "Ensure 'MSS: (TcpMaxDataRetransmissions IPv6) How many times unacknowledged data is retransmitted' is set to 'Enabled: 3'" description: "This setting controls the number of times that TCP retransmits an individual data segment (non-connect segment) before the connection is aborted." rationale: "A malicious user could exhaust a target computer's resources if it never sent any acknowledgment messages for data that was transmitted by the target computer." - remedtiation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 3: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(TcpMaxDataRetransmissions IPv6) How many times unacknowledged data is retransmitted" - compliance: - - cis: "18.4.10" - - cis_csc: "5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> TcpMaxDataRetransmissions -> !3;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> !TcpMaxDataRetransmissions;' - - id: 9505 + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 3: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(TcpMaxDataRetransmissions IPv6) How many times unacknowledged data is retransmitted." + compliance: + - cis: ["18.4.10"] + - cis_csc: ["9"] + references: + - 'CCE-37846-3' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> TcpMaxDataRetransmissions -> 3' + + - id: 12505 title: "Ensure 'MSS: (TcpMaxDataRetransmissions) How many times unacknowledged data is retransmitted' is set to 'Enabled: 3'" description: "This setting controls the number of times that TCP retransmits an individual data segment (non-connect segment) before the connection is aborted." rationale: "A malicious user could exhaust a target computer's resources if it never sent any acknowledgment messages for data that was transmitted by the target computer." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 3: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(TcpMaxDataRetransmissions) How many times unacknowledged data is retransmitted" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 3: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(TcpMaxDataRetransmissions) How many times unacknowledged data is retransmitted." compliance: - - cis: "18.4.11" - - cis_csc: "5" - condition: any + - cis: ["18.4.11"] + - cis_csc: ["9"] + references: + - 'CCE-36051-1' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> TcpMaxDataRetransmissions -> !3;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> !TcpMaxDataRetransmissions;' + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> TcpMaxDataRetransmissions -> 3' + # Section 18.5.9 - Link-Layer Topology Discovery - - id: 9506 + - id: 12506 title: "Ensure 'Turn on Mapper I/O (LLTDIO) driver' is set to 'Disabled'" description: "This policy setting changes the operational behavior of the Mapper I/O network protocol driver." rationale: "To help protect from potentially discovering and connecting to unauthorized devices, this setting should be disabled to prevent responding to network traffic for network topology discovery." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Link-Layer Topology Discovery\\Turn on Mapper I/O (LLTDIO) driver" - compliance: - - cis: "18.5.9.1" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowLLTDIOOnDomain -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowLLTDIOOnPublicNet -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> EnableLLTDIO -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> ProhibitLLTDIOOnPrivateNet -> !0;' - - id: 9507 + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Link-Layer Topology Discovery\\Turn on Mapper I/O (LLTDIO) driver." + compliance: + - cis: ["18.5.9.1"] + - cis_csc: ["9"] + references: + - 'CCE-38170-7' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowLLTDIOOnDomain -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowLLTDIOOnPublicNet -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> EnableLLTDIO -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> ProhibitLLTDIOOnPrivateNet -> 0' + + - id: 12507 title: "Ensure 'Turn on Responder (RSPNDR) driver' is set to 'Disabled'" description: "This policy setting changes the operational behavior of the Responder network protocol driver." rationale: "To help protect from potentially discovering and connecting to unauthorized devices, this setting should be disabled to prevent responding to network traffic for network topology discovery." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Link-Layer Topology Discovery\\Turn on Responder (RSPNDR) driver" - compliance: - - cis: "18.5.9.2" - - cis_csc: "9" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowRspndrOnDomain -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowRspndrOnPublicNet -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> EnableRspndr -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> ProhibitRspndrOnPrivateNet -> !0;' + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Link-Layer Topology Discovery\\Turn on Responder (RSPNDR) driver." + compliance: + - cis: ["18.5.9.2"] + - cis_csc: ["9"] + references: + - 'CCE-37959-4' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowRspndrOnDomain -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> AllowRspndrOnPublicNet -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> EnableRspndr -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LLTD -> ProhibitRspndrOnPrivateNet -> 0' + # Section 18.5.10 - Microsoft Peer-to-Peer Networking Services - - id: 9508 + - id: 12508 title: "Ensure 'Turn off Microsoft Peer-to-Peer Networking Services' is set to 'Enabled'" description: "The Peer Name Resolution Protocol (PNRP) allows for distributed resolution of a name to an IPv6 address and port number." rationale: "This setting enhances the security of the environment and reduces the overall risk exposure related to peer-to-peer networking." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Microsoft Peer-to-Peer Networking Services\\Turn off Microsoft Peer-to-Peer Networking Services" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Microsoft Peer-to-Peer Networking Services\\Turn off Microsoft Peer-to-Peer Networking Services." compliance: - - cis: "18.5.10.2" - - cis_csc: "9.1" - condition: any + - cis: ["18.5.10.2"] + - cis_csc: ["9.1"] + references: + - 'CCE-37699-6' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Peernet -> Disabled -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Peernet -> !Disabled;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Peernet -> Disabled -> 1' + # Section 18.5.19.2 - Parameters - - id: 9509 + - id: 12509 title: "Disable IPv6 (Ensure TCPIP6 Parameter 'DisabledComponents' is set to '0xff (255)')" rationale: "Since the vast majority of private enterprise managed networks have no need to utilize IPv6 (because they have access to private IPv4 addressing), disabling IPv6 components reduces a possible attack surface that is also harder to monitor the traffic on." - remediation: "To establish the recommended configuration, set the following Registry value to 0xff (255) (DWORD): HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\TCPIP6\\Parameters:DisabledComponents" + remediation: "To establish the recommended configuration, set the following Registry value to 0xff (255) (DWORD): HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\TCPIP6\\Parameters:DisabledComponents." compliance: - - cis: "18.5.19.2.1" - - cis_csc: "9" - condition: any + - cis: ["18.5.19.2.1"] + - cis_csc: ["9"] + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> DisabledComponents -> !ff;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> !DisabledComponents;' + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> DisabledComponents -> 255' + # Section 18.5.20 - Windows Connect Now - - id: 9510 + - id: 12510 title: "Ensure 'Configuration of wireless settings using Windows Connect Now' is set to 'Disabled'" description: "This policy setting allows the configuration of wireless settings using Windows Connect Now (WCN)." rationale: "This setting enhances the security of the environment and reduces the overall risk exposure related to user configuration of wireless settings." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Windows Connect Now\\Configuration of wireless settings using Windows Connect Now" - compliance: - - cis: "18.5.20.1" - - cis_csc: "15.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> EnableRegistrars -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> !EnableRegistrars;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableUPnPRegistrar -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> !DisableUPnPRegistrar;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableInBand802DOT11Registrar -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> !DisableInBand802DOT11Registrar;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableFlashConfigRegistrar -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> !DisableFlashConfigRegistrar;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableWPDRegistrar -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> !DisableWPDRegistrar;' - - id: 9511 + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Network\\Windows Connect Now\\Configuration of wireless settings using Windows Connect Now." + compliance: + - cis: ["18.5.20.1"] + - cis_csc: ["15.4"] + references: + - 'CCE-37481-9' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> EnableRegistrars -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableUPnPRegistrar -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableInBand802DOT11Registrar -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableFlashConfigRegistrar -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\Registrars -> DisableWPDRegistrar -> 0' + + - id: 12511 title: "Ensure 'Prohibit access of the Windows Connect Now wizards' is set to 'Enabled'" description: "This policy setting prohibits access to Windows Connect Now (WCN) wizards." - rationale: "Allowing standard users to access the Windows Connect Now wizard increases the risk and attack surface." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\Network\Network\\Windows Connect Now\\Prohibit access of the Windows Connect Now wizards" + rationale: "Allowing standard users to access the Windows Connect Now wizard increases the risk and attack surface." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\Network\Network\\Windows Connect Now\\Prohibit access of the Windows Connect Now wizards." compliance: - - cis: "18.5.20.2" - - cis_csc: "15.4" - condition: any + - cis: ["18.5.20.2"] + - cis_csc: ["15.4"] + references: + - 'CCE-36109-7' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\UI -> DisableWcnUi -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\UI -> !DisableWcnUi;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WCN\UI -> DisableWcnUi -> 1' + # Section 18.5.21 - Windows Connection Manager - - id: 9512 + - id: 12512 title: "Ensure 'Prohibit connection to non-domain networks when connected to domain authenticated network' is set to 'Enabled'" description: "This policy setting prevents computers from connecting to both a domain based network and a non-domain based network at the same time." rationale: "The potential concern is that a user would unknowingly allow network traffic to flow between the insecure public network and the enterprise managed network." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\Network\\Windows Connection Manager\\Prohibit connection to non-domain networks when connected to domain authenticated network" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\Network\\Windows Connection Manager\\Prohibit connection to non-domain networks when connected to domain authenticated network." compliance: - - cis: "18.5.21.2" - - cis_csc: "12" - condition: any + - cis: ["18.5.21.2"] + - cis_csc: ["12"] + references: + - 'CCE-37627-7' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\GroupPolicy -> fBlockNonDomain -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\GroupPolicy -> !fBlockNonDomain;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\GroupPolicy -> fBlockNonDomain -> 1' + # Section 18.8.22.1 - Internet Communication settings - - id: 9513 + - id: 12513 title: "Ensure 'Turn off handwriting personalization data sharing' is set to 'Enabled'" description: "This setting turns off data sharing from the handwriting recognition personalization tool." rationale: "A person's handwriting is Personally Identifiable Information (PII), especially when it comes to your signature." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off handwriting personalization data sharing" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off handwriting personalization data sharing." compliance: - - cis: "18.8.22.1.2" - - cis_csc: "13" - condition: any + - cis: ["18.8.22.1.2"] + - cis_csc: ["13"] + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\TabletPC -> PreventHandwritingDataSharing -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\TabletPC -> !PreventHandwritingDataSharing;' - - id: 9514 + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\TabletPC -> PreventHandwritingDataSharing -> 1' + + - id: 12514 title: "Ensure 'Turn off handwriting recognition error reporting' is set to 'Enabled'" description: "Turns off the handwriting recognition error reporting tool." rationale: "A person's handwriting is Personally Identifiable Information (PII), especially when it comes to your signature." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off handwriting recognition error reporting" - compliance: - - cis: "18.8.22.1.3" - - cis_csc: "13" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HandwritingErrorReports -> PreventHandwritingErrorReports -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HandwritingErrorReports -> !PreventHandwritingErrorReports;' - - id: 9515 + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off handwriting recognition error reporting." + compliance: + - cis: ["18.8.22.1.3"] + - cis_csc: ["13"] + references: + - 'CCE-37911-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HandwritingErrorReports -> PreventHandwritingErrorReports -> 1' + + - id: 12515 title: "Ensure 'Turn off Internet Connection Wizard if URL connection is referring to Microsoft.com' is set to 'Enabled'" description: "This policy setting specifies whether the Internet Connection Wizard can connect to Microsoft to download a list of Internet Service Providers (ISPs)." rationale: "In an enterprise managed environment we want to lower the risk of a user unknowingly exposing sensitive data." remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Internet Connection Wizard if URL connection is referring to Microsoft.com" compliance: - - cis: "18.8.22.1.4" - - cis_csc: "13" - condition: any + - cis: ["18.8.22.1.4"] + - cis_csc: ["13"] + references: + - 'CCE-37163-3' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Internet Connection Wizard -> ExitOnMSICW -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Internet Connection Wizard -> !ExitOnMSICW;' - - id: 9516 + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Internet Connection Wizard -> ExitOnMSICW -> 1' + + - id: 12516 title: "Ensure 'Turn off Registration if URL connection is referring to Microsoft.com' is set to 'Enabled'" description: "This policy setting specifies whether the Windows Registration Wizard connects to Microsoft.com for online registration." rationale: "Users in an enterprise managed environment should not be registering their own copies of Windows, providing their own PII in the process." remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Registration if URL connection is referring to Microsoft.com" compliance: - - cis: "18.8.22.1.7" - - cis_csc: "" - condition: any + - cis: ["18.8.22.1.7"] + references: + - 'CCE-36352-3' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\Policies\Microsoft\Windows\Registration Wizard Control -> NoRegistration -> !1;' - - 'r:HKEY_LOCAL_MACHINE\Policies\Microsoft\Windows\Registration Wizard Control -> !NoRegistration;' - - id: 9517 + - 'r:HKEY_LOCAL_MACHINE\Policies\Microsoft\Windows\Registration Wizard Control -> NoRegistration -> 1' + + - id: 12517 title: "Ensure 'Turn off Search Companion content file updates' is set to 'Enabled'" description: "This policy setting specifies whether Search Companion should automatically download content updates during local and Internet searches." rationale: "There is a small risk that users will unknowingly reveal sensitive information because of the topics they are searching for." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Search Companion content file updates" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Search Companion content file updates." compliance: - - cis: "18.8.22.1.8" - - cis_csc: "13" - condition: any + - cis: ["18.8.22.1.8"] + - cis_csc: ["13"] + references: + - 'CCE-36884-5' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SearchCompanion -> DisableContentFileUpdates -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SearchCompanion -> !DisableContentFileUpdates;' - - id: 9518 + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SearchCompanion -> DisableContentFileUpdates -> 1' + + - id: 12518 title: "Ensure 'Turn off the \"Order Prints\" picture task' is set to 'Enabled'" description: "This policy setting specifies whether the \"Order Prints Online\" task is available from Picture Tasks in Windows folders." rationale: "In an enterprise managed environment we want to lower the risk of a user unknowingly exposing sensitive data." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the \"Order Prints\" picture task" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the \"Order Prints\" picture task." compliance: - - cis: 18.8.22.1.9" - - cis_csc: "13" - condition: any + - cis: ["18.8.22.1.9"] + - cis_csc: ["13"] + references: + - 'CCE-38275-4' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoOnlinePrintsWizard -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> !NoOnlinePrintsWizard;' - - id: 9519 + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoOnlinePrintsWizard -> 1' + + - id: 12519 title: "Ensure 'Turn off the \"Publish to Web\" task for files and folders' is set to 'Enabled'" description: "This policy setting specifies whether the tasks Publish this file to the Web, Publish this folder to the Web, and Publish the selected items to the Web are available from File and Folder Tasks in Windows folders." rationale: "Users may publish confidential or sensitive information to a public service outside of the control of the organization." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the \"Publish to Web\" task for files and folders" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the \"Publish to Web\" task for files and folders." compliance: - - cis: "18.8.22.1.10" - - cis_csc: "13" - condition: any + - cis: ["18.8.22.1.10"] + - cis_csc: ["13"] + references: + - 'CCE-37090-8' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoPublishingWizard -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> !NoPublishingWizard;' - - id: 9520 + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoPublishingWizard -> 1' + + - id: 12520 title: "Ensure 'Turn off the Windows Messenger Customer Experience Improvement Program' is set to 'Enabled'" description: "This policy setting specifies whether Windows Messenger can collect anonymous information about how the Windows Messenger software and service is used." rationale: "Large enterprise managed environments may not want to have information collected by Microsoft from managed client computers." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the Windows Messenger Customer Experience Improvement Program" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the Windows Messenger Customer Experience Improvement Program." compliance: - - cis: "18.8.22.1.11" - - cis_csc: "13" - condition: any + - cis: ["18.8.22.1.11"] + - cis_csc: ["13"] + references: + - 'CCE-36628-6' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Messenger\Client -> CEIP -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Messenger\Client -> !CEIP;' - - id: 9521 + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Messenger\Client -> CEIP -> 2' + + - id: 12521 title: "Ensure 'Turn off Windows Customer Experience Improvement Program' is set to 'Enabled'" description: "This policy setting specifies whether Windows Messenger can collect anonymous information about how the Windows Messenger software and service is used." rationale: "Large enterprise managed environments may not want to have information collected by Microsoft from managed client computers." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Windows Customer Experience Improvement Program" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Windows Customer Experience Improvement Program." compliance: - - cis: "18.8.22.1.12" - - cis_csc: "13" - condition: any + - cis: ["18.8.22.1.12"] + - cis_csc: ["13"] + references: + - 'CCE-36174-1' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SQMClient\Windows -> CEIPEnable -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SQMClient\Windows -> !CEIPEnable;' - - id: 9522 + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SQMClient\Windows -> CEIPEnable -> 0' + + - id: 12522 title: "Ensure 'Turn off Windows Error Reporting' is set to 'Enabled'" description: "This policy setting controls whether or not errors are reported to Microsoft." rationale: "If a Windows Error occurs in a secure, enterprise managed environment, the error should be reported directly to IT staff for troubleshooting and remediation." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Windows Error Reporting" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Windows Error Reporting." compliance: - - cis: "18.8.22.1.13" - - cis_csc: "13" - condition: any + - cis: ["18.8.22.1.13"] + - cis_csc: ["13"] + references: + - 'CCE-35964-6' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> Disabled -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> !Disabled;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PCHealth\ErrorReporting -> DoReport -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PCHealth\ErrorReporting -> !DoReport;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> Disabled -> 1' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PCHealth\ErrorReporting -> DoReport -> 0' + # Section 18.8.26 - Locale Services - - id: 9523 + - id: 12523 title: Ensure 'Disallow copying of user input methods to the system account for sign-in' is set to 'Enabled'" description: "This policy prevents automatic copying of user input methods to the system account for use on the sign-in screen." rationale: "This is a way to increase the security of the system account." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Locale Services\\Disallow copying of user input methods to the system account for sign-in" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Locale Services\\Disallow copying of user input methods to the system account for sign-in." compliance: - - cis: "18.8.26.1" - - cis_csc: "16.5" - condition: any + - cis: ["18.8.26.1"] + - cis_csc: ["16.5"] + references: + - 'CCE-36343-2' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Control Panel\International -> BlockUserInputMethodsForSignIn -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Control Panel\International -> !BlockUserInputMethodsForSignIn;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Control Panel\International -> BlockUserInputMethodsForSignIn -> 1' + # Section 18.8.36 - Remote Procedure Call - - id: 9524 + - id: 12524 title: "Ensure 'Restrict Unauthenticated RPC clients' is set to 'Enabled: Authenticated'" description: "This policy setting controls how the RPC server runtime handles unauthenticated RPC clients connecting to RPC servers." rationale: "Unauthenticated RPC communication can create a security vulnerability." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Authenticated: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Procedure Call\\Restrict Unauthenticated RPC clients" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Authenticated: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Procedure Call\\Restrict Unauthenticated RPC clients." compliance: - - cis: "18.8.36.2" - - cis_csc: "9.1" - condition: any + - cis: ["18.8.36.2"] + - cis_csc: ["9.1"] + references: + - 'CCE-36559-3' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Rpc -> RestrictRemoteClients -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Rpc -> !RestrictRemoteClients;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Rpc -> RestrictRemoteClients -> 1' + # Section 18.8.44.5 - Microsoft Support Diagnostic Tool - - id: 9525 + - id: 12525 title: "Ensure 'Microsoft Support Diagnostic Tool: Turn on MSDT interactive communication with support provider' is set to 'Disabled'" description: "This policy setting configures Microsoft Support Diagnostic Tool (MSDT) interactive communication with the support provider." rationale: "Due to privacy concerns, data should never be sent to any 3rd party since this data could contain sensitive information." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Troubleshooting and Diagnostics\\Microsoft Support Diagnostic Tool\\Microsoft Support Diagnostic Tool: Turn on MSDT interactive communication with support provider" + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Troubleshooting and Diagnostics\\Microsoft Support Diagnostic Tool\\Microsoft Support Diagnostic Tool: Turn on MSDT interactive communication with support provider." compliance: - - cis: "18.8.44.5.1" - - cis_csc: "13" - condition: any + - cis: ["18.8.44.5.1"] + - cis_csc: ["13"] + references: + - 'CCE-38161-6' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\ScriptedDiagnosticsProvider\Policy -> DisableQueryRemoteServer -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\ScriptedDiagnosticsProvider\Policy -> !DisableQueryRemoteServer;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\ScriptedDiagnosticsProvider\Policy -> DisableQueryRemoteServer -> 0' + # Section 18.8.44.11 - Windows Performance PerfTrack - - id: 9526 + - id: 12526 title: "Ensure 'Enable/Disable PerfTrack' is set to 'Disabled'" description: "This policy setting specifies whether to enable or disable tracking of responsiveness events." rationale: "When enabled the aggregated data of a given event will be transmitted to Microsoft." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Troubleshooting and Diagnostics\\Windows Performance PerfTrack\\Enable/Disable PerfTrack" + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Troubleshooting and Diagnostics\\Windows Performance PerfTrack\\Enable/Disable PerfTrack." compliance: - - cis: "18.8.44.11.1" - - cis_csc: "13" - condition: any + - cis: ["18.8.44.11.1"] + - cis_csc: ["13"] + references: + - 'CCE-36648-4' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WDI\{9c5a40da-b965-4fc3-8781-88dd50a6299d} -> ScenarioExecutionEnabled -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WDI\{9c5a40da-b965-4fc3-8781-88dd50a6299d} -> !ScenarioExecutionEnabled;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WDI\{9c5a40da-b965-4fc3-8781-88dd50a6299d} -> ScenarioExecutionEnabled -> 0' + # Section 18.8.46 User Profiles - - id: 9527 + - id: 12527 title: "Ensure 'Turn off the advertising ID' is set to 'Enabled'" description: "This policy setting turns off the advertising ID, preventing apps from using the ID for experiences across apps." rationale: "Tracking user activity for advertising purposes, even anonymously, may be a privacy concern." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\User Profiles\\Turn off the advertising ID" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\User Profiles\\Turn off the advertising ID." compliance: - - cis: "18.8.46.1" - - cis_csc: "13" - condition: any + - cis: ["18.8.46.1"] + - cis_csc: ["13"] + references: + - 'CCE-36931-4' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo -> DisabledByGroupPolicy -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo -> !DisabledByGroupPolicy;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo -> DisabledByGroupPolicy -> 1' + # Section 18.8.49.1 - Time Providers - - id: 9528 + - id: 12528 title: "Ensure 'Enable Windows NTP Client' is set to 'Enabled'" description: "This policy setting specifies whether the Windows NTP Client is enabled." rationale: "A reliable and accurate account of time is important for a number of services and security requirements, including but not limited to distributed applications, authentication services, multi-user databases and logging services." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Windows Time Service\\Time Providers\\Enable Windows NTP Client" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Windows Time Service\\Time Providers\\Enable Windows NTP Client." compliance: - - cis: "18.8.49.1.1" - - cis_csc: "6.1" - condition: any + - cis: ["18.8.49.1.1"] + - cis_csc: ["6.1"] + references: + - 'CCE-37843-0' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\W32Time\TimeProviders\NtpClient -> Enabled -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\W32Time\TimeProviders\NtpClient -> !Enabled;' - - id: 9529 + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\W32Time\TimeProviders\NtpClient -> Enabled -> 1' + + - id: 12529 title: "Ensure 'Enable Windows NTP Server' is set to 'Disabled'" description: "This policy setting allows you to specify whether the Windows NTP Server is enabled." rationale: "The configuration of proper time synchronization is critically important in an enterprise managed environment both due to the sensitivity of Kerberos authentication timestamps and also to ensure accurate security logging." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Windows Time Service\\Time Providers\\Enable Windows NTP Server" + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Windows Time Service\\Time Providers\\Enable Windows NTP Server." compliance: - - cis: "18.8.49.1.2" - - cis_csc: "9.1" - condition: any + - cis: ["18.8.49.1.2"] + - cis_csc: ["9.1"] + references: + - 'CCE-37319-1' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\W32Time\TimeProviders\NtpServer -> Enabled -> !0;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\W32Time\TimeProviders\NtpServer -> Enabled -> 0' + # Section 18.9.39 - Location and Sensors - - id: 9530 + - id: 12530 title: "Ensure 'Turn off Windows Location Provider' is set to 'Enabled'" description: "This policy setting turns off the Windows Location Provider feature for the computer." rationale: "This setting affects the Windows Location Provider feature (e.g. GPS or other location tracking)." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Location and Sensors\\Windows Location Provider\\Turn off Windows Location Provider" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Location and Sensors\\Windows Location Provider\\Turn off Windows Location Provider." compliance: - - cis: "18.9.39.1.1" - - cis_csc: "" - condition: any + - cis: ["18.9.39.1.1"] + references: + - 'CCE-38225-9' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors -> DisableWindowsLocationProvider -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors -> !DisableWindowsLocationProvider;' - - id: 9531 + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors -> DisableWindowsLocationProvider -> 1' + + - id: 12531 title: "Ensure 'Turn off location' is set to 'Enabled'" description: "This policy setting turns off the location feature for the computer." rationale: "This setting affects the location feature (e.g. GPS or other location tracking)." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Location and Sensors\\Turn off location" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Location and Sensors\\Turn off location." compliance: - - cis: "18.9.39.2" - - cis_csc: "13" - condition: any + - cis: ["18.9.39.2"] + - cis_csc: ["13"] + references: + - 'CCE-36886-0' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors -> DisableLocation -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors -> !DisableLocation;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors -> DisableLocation -> 1' + # Section 18.9.58.3.2 - Connections - - id: 9532 + - id: 12532 title: "Ensure 'Restrict Remote Desktop Services users to a single Remote Desktop Services session' is set to 'Enabled'" description: "This policy setting allows you to restrict users to a single Remote Desktop Services session." rationale: "This setting ensures that users & administrators who Remote Desktop to a server will continue to use the same session - if they disconnect and reconnect, they will go back to the same session they were using before, preventing the creation of a second simultaneous session." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Connections\\Restrict Remote Desktop Services users to a single Remote Desktop Services session" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Connections\\Restrict Remote Desktop Services users to a single Remote Desktop Services session." compliance: - - cis: "18.9.58.3.2.1" - - cis_csc: "" - condition: any + - cis: ["18.9.58.3.2.1"] + references: + - 'CCE-37708-5' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fSingleSessionPerUser -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fSingleSessionPerUser;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fSingleSessionPerUser -> 1' + # Section 18.9.58.3.3 Device and Resource Redirection - - id: 9533 + - id: 12533 title: "Ensure 'Do not allow COM port redirection' is set to 'Enabled'" description: "This policy setting specifies whether to prevent the redirection of data to client COM ports from the remote computer in a Remote Desktop Services session." rationale: "In a more security-sensitive environment, it is desirable to reduce the possible attack surface." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow COM port redirection" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow COM port redirection." compliance: - - cis: "18.9.58.3.3.1" - - cis_csc: "9.1" - condition: any + - cis: ["18.9.58.3.3.1"] + - cis_csc: ["9.1"] + references: + - 'CCE-37696-2' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableCcm -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fDisableCcm;' - - id: 9534 + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableCcm -> 1' + + - id: 12534 title: "Ensure 'Do not allow LPT port redirection' is set to 'Enabled'" description: "This policy setting specifies whether to prevent the redirection of data to client LPT ports during a Remote Desktop Services session." rationale: "In a more security-sensitive environment, it is desirable to reduce the possible attack surface." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow LPT port redirection" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow LPT port redirection." compliance: - - cis: "18.9.58.3.3.3" - - cis_csc: "9.1" - condition: any + - cis: ["18.9.58.3.3.3"] + - cis_csc: ["9.1"] + references: + - 'CCE-37778-8' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableLPT -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fDisableLPT;' - - id: 9535 + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableLPT -> 1' + + - id: 12535 title: "Ensure 'Do not allow supported Plug and Play device redirection' is set to 'Enabled'" description: "This policy setting allows you to control the redirection of supported Plug and Play devices, such as Windows Portable Devices, to the remote computer in a Remote Desktop Services session." rationale: "In a more security-sensitive environment, it is desirable to reduce the possible attack surface." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow supported Plug and Play device redirection" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow supported Plug and Play device redirection." compliance: - - cis: "18.9.58.3.3.4" - - cis_csc: "9.1" - condition: any + - cis: ["18.9.58.3.3.4"] + - cis_csc: ["9.1"] + references: + - 'CCE-37477-7' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisablePNPRedir -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !fDisablePNPRedir;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisablePNPRedir -> 1' + # Section 18.9.58.3.10 - Session Time Limits - - id: 9536 + - id: 12536 title: "Ensure 'Set time limit for active but idle Remote Desktop Services sessions' is set to 'Enabled: 15 minutes or less'" description: "This policy setting allows you to specify the maximum amount of time that an active Remote Desktop Services session can be idle (without user input) before it is automatically disconnected." rationale: "This setting helps to prevent active Remote Desktop sessions from tying up the computer for long periods of time while not in use, preventing computing resources from being consumed by large numbers of inactive sessions." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 15 minutes or less: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Session Time Limits\\Set time limit for active but idle Remote Desktop Services sessions" - compliance: - - cis: "18.9.58.3.10.1" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba2;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba3;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba4;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba5;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba6;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba7;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba8;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba9;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbba\D;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbbb\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbbc\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbbd\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbbe\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbbf\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbc\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbd\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbe\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dbf\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dc\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:dd\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:de\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:df\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:e\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:f\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> r:\w\w\w\w\w\w;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !MaxIdleTime;' - - id: 9537 + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 15 minutes or less: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Session Time Limits\\Set time limit for active but idle Remote Desktop Services sessions." + compliance: + - cis: ["18.9.58.3.10.1"] + - cis_csc: ["16.5"] + references: + - 'CCE-37562-6' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxIdleTime -> n:^(\d+) compare <= 900000' + + - id: 12537 title: "Ensure 'Set time limit for disconnected sessions' is set to 'Enabled: 1 minute'" description: "This policy setting allows you to configure a time limit for disconnected Remote Desktop Services sessions." rationale: "This setting helps to prevent active Remote Desktop sessions from tying up the computer for long periods of time while not in use, preventing computing resources from being consumed by large numbers of disconnected but still active sessions." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 1 minute: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Session Time Limits\\Set time limit for disconnected sessions" - compliance: - - cis: "18.9.58.3.10.2" - - cis_csc: "16.5" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxDisconnectionTime -> !EA60;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> !MaxDisconnectionTime;' + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 1 minute: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Session Time Limits\\Set time limit for disconnected sessions." + compliance: + - cis: ["18.9.58.3.10.2"] + - cis_csc: ["16.5"] + references: + - 'CCE-37949-5' + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MaxDisconnectionTime -> 60000' + # Section 18.9.60.1 - OCR - - id: 9538 + - id: 12538 title: "Ensure 'Set what information is shared in Search' is set to 'Enabled: Anonymous info'" description: "Various levels of information can be shared with Bing in Search, to include user information and location." rationale: "Limiting the search information shared with Microsoft Bing enhances privacy and security." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Anonymous info: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Set what information is shared in Search" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Anonymous info: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Search\\Set what information is shared in Search." compliance: - - cis: "18.9.60.3" - - cis_csc: "13" - condition: any + - cis: ["18.9.60.3"] + - cis_csc: ["13"] + references: + - 'CCE-36937-1' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> ConnectedSearchPrivacy -> !3;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> !ConnectedSearchPrivacy;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search -> ConnectedSearchPrivacy -> 3' + # Section 18.9.56 - Software Protection Platform - - id: 9539 + - id: 12539 title: "Ensure 'Turn off KMS Client Online AVS Validation' is set to 'Enabled'" description: "The Key Management Service (KMS) is a Microsoft license activation method that entails setting up a local server to store the software licenses." rationale: "Even though the KMS licensing method does not require KMS clients to connect to Microsoft, they still send KMS client activation state data to Microsoft automatically." - remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Software Protection Platform\\Turn off KMS Client Online AVS Validation" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Software Protection Platform\\Turn off KMS Client Online AVS Validation." compliance: - - cis: "18.9.65.1" - - cis_csc: "" - condition: any + - cis: ["18.9.65.1"] + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform -> NoGenTicket -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform -> !NoGenTicket;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform -> NoGenTicket -> 1' + # Section 18.9.76.3 - MAPS - - id: 9540 + - id: 12540 title: "Ensure 'Join Microsoft MAPS' is set to 'Disabled'" description: "This policy setting allows you to join Microsoft Active Protection Service (MAPS), which Microsoft has now renamed to \"Windows Defender Antivirus Cloud Protection Service\"." rationale: "The information that would be sent can include things like location of detected items on your computer if harmful software was removed." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\MAPS\\Join Microsoft MAPS" + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\MAPS\\Join Microsoft MAPS." compliance: - - cis: "18.9.76.3.2" - - cis_csc: "" - condition: any + - cis: ["18.9.76.3.2"] + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet -> SpynetReporting -> !0;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet -> SpynetReporting -> 0' + # Section - 18.9.76.9 - Reporting - - id: 9541 + - id: 12541 title: "Ensure 'Configure Watson events' is set to 'Disabled'" description: "This policy setting allows you to configure whether or not Watson events are sent." rationale: "Watson events are the reports that get sent to Microsoft when a program or service crashes or fails, including the possibility of automatic submission." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Reporting\\Configure Watson events" + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Defender Antivirus\\Reporting\\Configure Watson events." compliance: - - cis: "18.9.76.9.1" - - cis_csc: "13" - condition: any + - cis: ["18.9.76.9.1"] + - cis_csc: ["13"] + references: + - 'CCE-36950-4' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Reporting -> DisableGenericRePorts -> !1;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Reporting -> !DisableGenericRePorts;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Reporting -> DisableGenericRePorts -> 1' + # Section 18.9.85 - Windows Installer - - id: 9542 + - id: 12542 title: "Ensure 'Prevent Internet Explorer security prompt for Windows Installer scripts' is set to 'Disabled'" description: "This policy setting controls whether Web-based programs are allowed to install software on the computer without notifying the user." rationale: "Suppressing the system warning can pose a security risk and increase the attack surface on the system." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Prevent Internet Explorer security prompt for Windows Installer scripts" - compliance: - - cis: "18.9.85.3" - - cis_csc: "7" - condition: any + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Prevent Internet Explorer security prompt for Windows Installer scripts." + compliance: + - cis: ["18.9.85.3"] + - cis_csc: ["7"] + references: + - 'CCE-37524-6' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> SafeForScripting -> !0;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> SafeForScripting -> 0' + # Section 18.9.97.2 - WinRM Service - - id: 9543 + - id: 12543 title: "Ensure 'Allow remote server management through WinRM' is set to 'Disabled'" description: "This policy setting allows you to manage whether the Windows Remote Management (WinRM) service automatically listens on the network for requests on the HTTP transport over the default HTTP port." rationale: "Any feature is a potential avenue of attack, those that enable inbound network connections are particularly risky." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow remote server management through WinRM" + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Administrative Templates\\Windows Components\\Windows Remote Management (WinRM)\\WinRM Service\\Allow remote server management through WinRM." compliance: - - cis: "18.9.97.2.2" - - cis_csc: "3.4" - condition: any + - cis: ["18.9.97.2.2"] + - cis_csc: ["3.4"] + references: + - 'CCE-37927-1' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowAutoConfig -> !0;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service -> AllowAutoConfig -> 0' + # Section 18.9.98 - Windows Remote Shell - - id: 9544 + - id: 12544 title: "Ensure 'Allow Remote Shell Access' is set to 'Disabled'" description: "This policy setting allows you to manage configuration of remote access to all supported shells to execute scripts and commands." rationale: "Any feature is a potential avenue of attack, those that enable inbound network connections are particularly risky." - remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Administrative Templates\\Windows Components\\Windows Remote Shell\\Allow Remote Shell Access" + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Administrative Templates\\Windows Components\\Windows Remote Shell\\Allow Remote Shell Access." compliance: - - cis: "18.9.98.1" - - cis_csc: "3.4" - condition: any + - cis: ["18.9.98.1"] + - cis_csc: ["3.4"] + references: + - 'CCE-36499-2' + condition: all rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service\WinRS -> AllowRemoteShellAccess -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service\WinRS -> !AllowRemoteShellAccess;' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service\WinRS -> AllowRemoteShellAccess -> 0' diff --git a/sca/windows/sca_win_audit.yml b/sca/windows/sca_win_audit.yml new file mode 100644 index 000000000..4681d4c43 --- /dev/null +++ b/sca/windows/sca_win_audit.yml @@ -0,0 +1,823 @@ +# Security Configuration Assessment +# Checks for Windows audit +# Copyright (C) 2015-2019, Wazuh Inc. +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation +# + +policy: + id: "sca_win_audit" + file: "sca_win_audit.yml" + name: "Benchmark for Windows audit" + description: "This document provides a way of ensuring the security of the Windows systems." + +requirements: + title: "Check for Windows platform" + description: "Requirements for running the audit policy under a Windows platform" + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SAM\SAM' + +checks: + - id: 14000 + title: "Ensure 'Accounts: Limit local account use of blank passwords to console logon only' is set to 'Enabled'" + description: "This policy setting determines whether local accounts that are not password protected can be used to log on from locations other than the physical computer console. If you enable this policy setting, local accounts that have blank passwords will not be able to log on to the network from remote client computers. Such accounts will only be able to log on at the keyboard of the computer. The recommended state for this setting is: Enabled." + rationale: "Blank passwords are a serious threat to computer security and should be forbidden through both organizational policy and suitable technical measures. In fact, the default settings for Active Directory domains require complex passwords of at least seven characters. However, if users with the ability to create new accounts bypass your domainbased password policies, they could create accounts with blank passwords. For example, a user could build a stand-alone computer, create one or more accounts with blank passwords, and then join the computer to the domain. The local accounts with blank passwords would still function. Anyone who knows the name of one of these unprotected accounts could then use it to log on." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Accounts: Limit local account use of blank passwords to console logon only." + compliance: + - cis_csc: ["16"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LimitBlankPasswordUse -> 1' + + - id: 14001 + title: "Ensure 'Audit: Shut down system immediately if unable to log security audits' is set to 'Disabled'" + description: "This policy setting determines whether the system shuts down if it is unable to log Security events. It is a requirement for Trusted Computer System Evaluation Criteria (TCSEC)-C2 and Common Criteria certification to prevent auditable events from occurring if the audit system is unable to log them. Microsoft has chosen to meet this requirement by halting the system and displaying a stop message if the auditing system experiences a failure. When this policy setting is enabled, the system will be shut down if a security audit cannot be logged for any reason. The recommended state for this setting is: Disabled." + rationale: "If the computer is unable to record events to the Security log, critical evidence or important troubleshooting information may not be available for review after a security incident. Also, an attacker could potentially generate a large volume of Security log events to purposely force a computer shutdown." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Audit: Shut down system immediately if unable to log security audits." + compliance: + - cis_csc: ["6"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> CrashOnAuditFail -> 0' + + - id: 14002 + title: "Ensure 'Devices: Allowed to format and eject removable media' is set to 'Administrators'" + description: "This policy setting determines who is allowed to format and eject removable NTFS media. You can use this policy setting to prevent unauthorized users from removing data on one computer to access it on another computer on which they have local administrator privileges. The recommended state for this setting is: Administrators." + rationale: "Users may be able to move data on removable disks to a different computer where they have administrative privileges. The user could then take ownership of any file, grant themselves full control, and view or modify any file. The fact that most removable storage devices will eject media by pressing a mechanical button diminishes the advantage of this policy setting." + remediation: "To establish the recommended configuration via GP, set the following UI path to Administrators and Interactive Users: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Devices: Allowed to format and eject removable media." + compliance: + - cis_csc: ["5.1"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> AllocateDASD -> 0' + + - id: 14003 + title: "Ensure 'Devices: Prevent users from installing printer drivers' is set to 'Enabled'" + description: "For a computer to print to a shared printer, the driver for that shared printer must be installed on the local computer. This security setting determines who is allowed to install a printer driver as part of connecting to a shared printer. The recommended state for this setting is: Enabled. Note: This setting does not affect the ability to add a local printer. This setting does not affect Administrators." + rationale: "It may be appropriate in some organizations to allow users to install printer drivers on their own workstations. However, in a high security environment, you should allow only Administrators, not users, to do this, because printer driver installation may unintentionally cause the computer to become less stable. A malicious user could install inappropriate printer drivers in a deliberate attempt to damage the computer, or a user might accidentally install malicious software that masquerades as a printer driver. It is feasible for an attacker to disguise a Trojan horse program as a printer driver. The program may appear to users as if they must use it to print, but such a program could unleash malicious code on your computer network." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Devices: Prevent users from installing printer drivers." + compliance: + - cis_csc: ["5.1"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Providers\LanMan Print Services\Servers -> AddPrinterDrivers -> 1' + + - id: 14004 + title: "Ensure 'Domain member: Digitally encrypt or sign secure channel data (always)' is set to 'Enabled'" + description: "This policy setting determines whether all secure channel traffic that is initiated by the domain member must be signed or encrypted. The recommended state for this setting is: Enabled." + rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated and sensitive information such as passwords are encrypted-but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally encrypt or sign secure channel data (always)" + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> RequireSignOrSeal -> 1' + + - id: 14005 + title: "Ensure 'Domain member: Digitally encrypt secure channel data (when possible)' is set to 'Enabled'" + description: "This policy setting determines whether a domain member should attempt to negotiate encryption for all secure channel traffic that it initiates. The recommended state for this setting is: Enabled." + rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated-and sensitive information such as passwords are encrypted-but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally encrypt secure channel data (when possible)" + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> SealSecureChannel -> 1' + - id: 14006 + title: "Ensure 'Domain member: Digitally sign secure channel data (when possible)' is set to 'Enabled'" + description: "This policy setting determines whether a domain member should attempt to negotiate whether all secure channel traffic that it initiates must be digitally signed. Digital signatures protect the traffic from being modified by anyone who captures the data as it traverses the network. The recommended state for this setting is: Enabled." + rationale: "When a computer joins a domain, a computer account is created. After it joins the domain, the computer uses the password for that account to create a secure channel with the Domain Controller for its domain every time that it restarts. Requests that are sent on the secure channel are authenticated-and sensitive information such as passwords are encrypted-but the channel is not integrity-checked, and not all information is encrypted. Digital encryption and signing of the secure channel is a good idea where it is supported. The secure channel protects domain credentials as they are sent to the Domain Controller." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Digitally sign secure channel data (when possible)" + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> SignSecureChannel -> 1' + + - id: 14007 + title: "Ensure 'Domain member: Disable machine account password changes' is set to 'Disabled'" + description: "This policy setting determines whether a domain member can periodically change its computer account password. Computers that cannot automatically change their account passwords are potentially vulnerable, because an attacker might be able to determine the password for the system's domain account. The recommended state for this setting is: Disabled." + rationale: "The default configuration for Windows Server 2003-based computers that belong to a domain is that they are automatically required to change the passwords for their accounts every 30 days. If you disable this policy setting, computers that run Windows Server 2003 will retain the same passwords as their computer accounts. Computers that are no longer able to automatically change their account password are at risk from an attacker who could determine the password for the computer's domain account." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Disable machine account password changes." + compliance: + - cis_csc: ["16"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> DisablePasswordChange -> 0' + + - id: 14008 + title: "Ensure 'Domain member: Require strong (Windows 2000 or later) session key' is set to 'Enabled'" + description: "When this policy setting is enabled, a secure channel can only be established with Domain Controllers that are capable of encrypting secure channel data with a strong (128-bit) session key. To enable this policy setting, all Domain Controllers in the domain must be able to encrypt secure channel data with a strong key, which means all Domain Controllers must be running Microsoft Windows 2000 or newer. The recommended state for this setting is: Enabled." + rationale: "Session keys that are used to establish secure channel communications between Domain Controllers and member computers are much stronger in Windows 2000 than they were in previous Microsoft operating systems. Whenever possible, you should take advantage of these stronger session keys to help protect secure channel communications from attacks that attempt to hijack network sessions and eavesdropping. (Eavesdropping is a form of hacking in which network data is read or altered in transit. The data can be modified to hide or change the sender, or be redirected.)" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Domain member: Require strong (Windows 2000 or later) session key." + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters -> RequireStrongKey -> 1' + + - id: 14009 + title: "Ensure 'Interactive logon: Do not display last user name' is set to 'Enabled'" + description: "This policy setting determines whether the account name of the last user to log on to the client computers in your organization will be displayed in each computer's respective Windows logon screen. Enable this policy setting to prevent intruders from collecting account names visually from the screens of desktop or laptop computers in your organization. The recommended state for this setting is: Enabled." + rationale: "An attacker with access to the console (for example, someone with physical access or someone who is able to connect to the server through Remote Desktop Services) could view the name of the last user who logged on to the server. The attacker could then try to guess the password, use a dictionary, or use a brute-force attack to try and log on." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Do not display last user name." + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> DontDisplayLastUserName -> 1' + + - id: 14010 + title: "Ensure 'Interactive logon: Do not require CTRL+ALT+DEL' is set to 'Disabled'" + description: "This policy setting determines whether users must press CTRL+ALT+DEL before they log on. The recommended state for this setting is: Disabled." + rationale: "Microsoft developed this feature to make it easier for users with certain types of physical impairments to log on to computers that run Windows. If users are not required to press CTRL+ALT+DEL, they are susceptible to attacks that attempt to intercept their passwords. If CTRL+ALT+DEL is required before logon, user passwords are communicated by means of a trusted path. An attacker could install a Trojan horse program that looks like the standard Windows logon dialog box and capture the user's password. The attacker would then be able to log on to the compromised account with whatever level of privilege that user has." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Do not require CTRL+ALT+DEL" + compliance: + - cis_csc: ["8"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -> DisableCAD -> 0' + + - id: 14011 + title: "Ensure 'Interactive logon: Prompt user to change password before expiration' is set to 'between 5 and 14 days'" + description: "This policy setting determines how far in advance users are warned that their password will expire. It is recommended that you configure this policy setting to at least 5 days but no more than 14 days to sufficiently warn users when their passwords will expire. The recommended state for this setting is: between 5 and 14 days." + rationale: "It is recommended that user passwords be configured to expire periodically. Users will need to be warned that their passwords are going to expire, or they may inadvertently be locked out of the computer when their passwords expire. This condition could lead to confusion for users who access the network locally, or make it impossible for users to access your organization's network through dial-up or virtual private network (VPN) connections." + remediation: "To establish the recommended configuration via GP, set the following UI path to a value between 5 and 14 days: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Prompt user to change password before expiration." + compliance: + - cis_csc: ["16"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> PasswordExpiryWarning -> n:^(\d+) compare >= 5 && n:^(\d+) compare <= 14' + + - id: 14012 + title: "Ensure 'Interactive logon: Smart card removal behavior' is set to 'Lock Workstation' or higher" + description: "This policy setting determines what happens when the smart card for a logged-on user is removed from the smart card reader. The recommended state for this setting is: Lock Workstation. Configuring this setting to Force Logoff or Disconnect if a Remote Desktop Services session also conforms to the benchmark." + rationale: "Users sometimes forget to lock their workstations when they are away from them, allowing the possibility for malicious users to access their computers. If smart cards are used for authentication, the computer should automatically lock itself when the card is removed to ensure that only the user with the smart card is accessing resources using those credentials." + remediation: "To establish the recommended configuration via GP, set the following UI path to Lock Workstation (or, if applicable for your environment, Force Logoff or Disconnect if a Remote Desktop Services session): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Interactive logon: Smart card removal behavior." + compliance: + - cis_csc: ["16.5"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScRemoveOption -> r:^1$|^2$|^3$' + + - id: 14013 + title: "Ensure 'Microsoft network client: Digitally sign communications (always)' is set to 'Enabled'" + description: "This policy setting determines whether packet signing is required by the SMB client component. Note: When Windows Vista-based computers have this policy setting enabled and they connect to file or print shares on remote servers, it is important that the setting is synchronized with its companion setting, Microsoft network server: Digitally sign communications (always), on those servers. For more information about these settings, see the 'Microsoft network client and server: Digitally sign communications (four related settings)' section in Chapter 5 of the Threats and Countermeasures guide. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Digitally sign communications (always)" + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> RequireSecuritySignature -> 1' + + - id: 14014 + title: "Ensure 'Microsoft network client: Digitally sign communications (if server agrees)' is set to 'Enabled'" + description: "This policy setting determines whether the SMB client will attempt to negotiate SMB packet signing. Note: Enabling this policy setting on SMB clients on your network makes them fully effective for packet signing with all clients and servers in your environment. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Digitally sign communications (if server agrees)" + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> EnableSecuritySignature -> 1' + + - id: 14015 + title: "Ensure 'Microsoft network client: Send unencrypted password to third-party SMB servers' is set to 'Disabled'" + description: "This policy setting determines whether the SMB redirector will send plaintext passwords during authentication to third-party SMB servers that do not support password encryption. It is recommended that you disable this policy setting unless there is a strong business case to enable it. If this policy setting is enabled, unencrypted passwords will be allowed across the network. The recommended state for this setting is: Disabled." + rationale: "If you enable this policy setting, the server can transmit passwords in plaintext across the network to other computers that offer SMB services, which is a significant security risk. These other computers may not use any of the SMB security mechanisms that are included with Windows Server 2003." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network client: Send unencrypted password to third-party SMB servers." + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters -> EnablePlainTextPassword -> 0' + + - id: 14016 + title: "Ensure 'Microsoft network server: Amount of idle time required before suspending session' is set to '15 or fewer minute(s), but not 0'" + description: "This policy setting allows you to specify the amount of continuous idle time that must pass in an SMB session before the session is suspended because of inactivity. Administrators can use this policy setting to control when a computer suspends an inactive SMB session. If client activity resumes, the session is automatically reestablished. A value of 0 appears to allow sessions to persist indefinitely. The maximum value is 99999, which is over 69 days; in effect, this value disables the setting. The recommended state for this setting is: 15 or fewer minute(s), but not 0." + rationale: "Each SMB session consumes server resources, and numerous null sessions will slow the server or possibly cause it to fail. An attacker could repeatedly establish SMB sessions until the server's SMB services become slow or unresponsive." + remediation: "To establish the recommended configuration via GP, set the following UI path to 15 or fewer minute(s), but not 0: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Amount of idle time required before suspending session." + compliance: + - cis_csc: ["3"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> AutoDisconnect -> n:^(\d+) compare <= 15' + + - id: 14017 + title: "Ensure 'Microsoft network server: Digitally sign communications (always)' is set to 'Enabled'" + description: "This policy setting determines whether packet signing is required by the SMB server component. Enable this policy setting in a mixed environment to prevent downstream clients from using the workstation as a network server. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Digitally sign communications (always)" + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> RequireSecuritySignature -> 1' + + - id: 14018 + title: "Ensure 'Microsoft network server: Digitally sign communications (if client agrees)' is set to 'Enabled'" + description: "This policy setting determines whether the SMB server will negotiate SMB packet signing with clients that request it. If no signing request comes from the client, a connection will be allowed without a signature if the Microsoft network server: Digitally sign communications (always) setting is not enabled. Note: Enable this policy setting on SMB clients on your network to make them fully effective for packet signing with all clients and servers in your environment. The recommended state for this setting is: Enabled." + rationale: "Session hijacking uses tools that allow attackers who have access to the same network as the client or server to interrupt, end, or steal a session in progress. Attackers can potentially intercept and modify unsigned SMB packets and then modify the traffic and forward it so that the server might perform undesirable actions. Alternatively, the attacker could pose as the server or client after legitimate authentication and gain unauthorized access to data. SMB is the resource sharing protocol that is supported by many Windows operating systems. It is the basis of NetBIOS and many other protocols. SMB signatures authenticate both users and the servers that host the data. If either side fails the authentication process, data transmission will not take place." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Microsoft network server: Digitally sign communications (if client agrees)" + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> EnableSecuritySignature -> 1' + + - id: 14019 + title: "Ensure 'Network access: Do not allow anonymous enumeration of SAM accounts' is set to 'Enabled'" + description: "This policy setting controls the ability of anonymous users to enumerate the accounts in the Security Accounts Manager (SAM). If you enable this policy setting, users with anonymous connections will not be able to enumerate domain account user names on the systems in your environment. This policy setting also allows additional restrictions on anonymous connections. The recommended state for this setting is: Enabled. Note: This policy has no effect on Domain Controllers." + rationale: "An unauthorized user could anonymously list account names and use the information to attempt to guess passwords or perform social engineering attacks. (Social engineering attacks try to deceive users in some way to obtain passwords or some form of security information.)" + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow anonymous enumeration of SAM accounts." + compliance: + - cis_csc: ["16"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -> RestrictAnonymousSAM -> 1' + + - id: 14020 + title: "Ensure 'Network access: Do not allow storage of passwords and credentials for network authentication' is set to 'Enabled'" + description: "This policy setting determines whether Credential Manager (formerly called Stored User Names and Passwords) saves passwords or credentials for later use when it gains domain authentication. The recommended state for this setting is: Enabled. Note: Changes to this setting will not take effect until Windows is restarted." + rationale: "Passwords that are cached can be accessed by the user when logged on to the computer. Although this information may sound obvious, a problem can arise if the user unknowingly executes hostile code that reads the passwords and forwards them to another, unauthorized user." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Do not allow storage of passwords and credentials for network authentication." + compliance: + - cis_csc: ["16.14"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> DisableDomainCreds -> 1' + + - id: 14021 + title: "Ensure 'Network access: Let Everyone permissions apply to anonymous users' is set to 'Disabled'" + description: "This policy setting determines what additional permissions are assigned for anonymous connections to the computer. The recommended state for this setting is: Disabled." + rationale: "An unauthorized user could anonymously list account names and shared resources and use the information to attempt to guess passwords, perform social engineering attacks, or launch DoS attacks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Let Everyone permissions apply to anonymous users." + compliance: + - cis_csc: ["14, 16"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> EveryoneIncludesAnonymous -> 0' + + - id: 14022 + title: "Ensure 'Network access: Restrict anonymous access to Named Pipes and Shares' is set to 'Enabled'" + description: "When enabled, this policy setting restricts anonymous access to only those shares and pipes that are named in the Network access: Named pipes that can be accessed anonymously and Network access: Shares that can be accessed anonymously settings. This policy setting controls null session access to shares on your computers by adding RestrictNullSessAccess with the value 1 in the HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\LanManServer\\Parameters registry key. This registry value toggles null session shares on or off to control whether the server service restricts unauthenticated clients' access to named resources. The recommended state for this setting is: Enabled." + rationale: "Null sessions are a weakness that can be exploited through shares (including the default shares) on computers in your environment." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Restrict anonymous access to Named Pipes and Shares." + compliance: + - cis_csc: ["14, 16"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> RestrictNullSessAccess -> 1' + + - id: 14023 + title: "Ensure 'Network access: Shares that can be accessed anonymously' is set to 'None'" + description: "This policy setting determines which network shares can be accessed by anonymous users. The default configuration for this policy setting has little effect because all users have to be authenticated before they can access shared resources on the server. The recommended state for this setting is: (i.e. None)." + rationale: "It is very dangerous to allow any values in this setting. Any shares that are listed can be accessed by any network user, which could lead to the exposure or corruption of sensitive data." + remediation: "To establish the recommended configuration via GP, set the following UI path to (i.e. None): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Shares that can be accessed anonymously." + compliance: + - cis_csc: ["14, 16"] + condition: all + rules: + - 'not r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> NullSessionShares -> r:\.' + + - id: 14024 + title: "Ensure 'Network access: Sharing and security model for local accounts' is set to 'Classic - local users authenticate as themselves'" + description: "This policy setting determines how network logons that use local accounts are authenticated. The Classic option allows precise control over access to resources, including the ability to assign different types of access to different users for the same resource. The Guest only option allows you to treat all users equally. In this context, all users authenticate as Guest only to receive the same access level to a given resource. The recommended state for this setting is: Classic - local users authenticate as themselves. Note: This setting does not affect interactive logons that are performed remotely by using such services as Telnet or Remote Desktop Services (formerly called Terminal Services)." + rationale: "With the Guest only model, any user who can authenticate to your computer over the network does so with guest privileges, which probably means that they will not have write access to shared resources on that computer. Although this restriction does increase security, it makes it more difficult for authorized users to access shared resources on those computers because ACLs on those resources must include access control entries (ACEs) for the Guest account. With the Classic model, local accounts should be password protected. Otherwise, if Guest access is enabled, anyone can use those user accounts to access shared system resources." + remediation: "To establish the recommended configuration via GP, set the following UI path to Classic - local users authenticate as themselves: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Sharing and security model for local accounts." + compliance: + - cis_csc: ["14, 16"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> ForceGuest -> 0' + + - id: 14025 + title: "Ensure 'Network security: Do not store LAN Manager hash value on next password change' is set to 'Enabled'" + description: "This policy setting determines whether the LAN Manager (LM) hash value for the new password is stored when the password is changed. The LM hash is relatively weak and prone to attack compared to the cryptographically stronger Microsoft Windows NT hash. Since LM hashes are stored on the local computer in the security database, passwords can then be easily compromised if the database is attacked. Note: Older operating systems and some third-party applications may fail when this policy setting is enabled. Also, note that the password will need to be changed on all accounts after you enable this setting to gain the proper benefit. The recommended state for this setting is: Enabled." + rationale: "The SAM file can be targeted by attackers who seek access to username and password hashes. Such attacks use special tools to crack passwords, which can then be used to impersonate users and gain access to resources on your network. These types of attacks will not be prevented if you enable this policy setting, but it will be much more difficult for these types of attacks to succeed." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Do not store LAN Manager hash value on next password change." + compliance: + - cis_csc: ["16.14"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> NoLMHash -> 1' + + - id: 14026 + title: "Ensure 'Network security: LAN Manager authentication level' is set to 'Send NTLMv2 response only. Refuse LM & NTLM'" + description: "LAN Manager (LM) was a family of early Microsoft client/server software (predating Windows NT) that allowed users to link personal computers together on a single network. LM network capabilities included transparent file and print sharing, user security features, and network administration tools. In Active Directory domains, the Kerberos protocol is the default authentication protocol. However, if the Kerberos protocol is not negotiated for some reason, Active Directory will use LM, NTLM, or NTLMv2. LAN Manager authentication includes the LM, NTLM, and NTLM version 2 (NTLMv2) variants, and is the protocol that is used to authenticate all Windows clients when they perform the following operations: -Join a domain -Authenticate between Active Directory forests -Authenticate to down-level domains -Authenticate to computers that do not run Windows 2000, Windows Server 2003, or Windows XP -Authenticate to computers that are not in the domain. The Network security: LAN Manager authentication level setting determines which challenge/response authentication protocol is used for network logons. This choice affects the level of authentication protocol used by clients, the level of session security negotiated, and the level of authentication accepted by servers. The recommended state for this setting is: Send NTLMv2 response only. Refuse LM & NTLM." + rationale: "Windows 2000 and Windows XP clients were configured by default to send LM and NTLM authentication responses (Windows 95-based and Windows 98-based clients only send LM). The default settings in OSes predating Windows Vista / Windows Server 2008 (non- R2) allowed all clients to authenticate with servers and use their resources. However, this meant that LM responses - the weakest form of authentication response - were sent over the network, and it was potentially possible for attackers to sniff that traffic to more easily reproduce the user's password. The Windows 95, Windows 98, and Windows NT operating systems cannot use the Kerberos version 5 protocol for authentication. For this reason, in a Windows Server 2003 domain, these computers authenticate by default with both the LM and NTLM protocols for network authentication. You can enforce a more secure authentication protocol for Windows 95, Windows 98, and Windows NT by using NTLMv2. For the logon process, NTLMv2 uses a secure channel to protect the authentication process. Even if you use NTLMv2 for older clients and servers, Windows-based clients and servers that are members of the domain will use the Kerberos authentication protocol to authenticate with Windows Server 2003 or newer Domain Controllers. For these reasons, it is strongly preferred to restrict the use of LM & NTLM (non-v2) as much as possible." + remediation: "To establish the recommended configuration via GP, set the following UI path to: Send NTLMv2 response only. Refuse LM & NTLM: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: LAN Manager authentication level." + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa -> LmCompatibilityLevel -> 5' + + - id: 14027 + title: "Ensure 'Network security: LDAP client signing requirements' is set to 'Negotiate signing' or higher" + description: "This policy setting determines the level of data signing that is requested on behalf of clients that issue LDAP BIND requests. Note: This policy setting does not have any impact on LDAP simple bind (ldap_simple_bind) or LDAP simple bind through SSL (ldap_simple_bind_s). No Microsoft LDAP clients that are included with Windows XP Professional use ldap_simple_bind or ldap_simple_bind_s to communicate with a Domain Controller. The recommended state for this setting is: Negotiate signing. Configuring this setting to Require signing also conforms to the benchmark." + rationale: "Unsigned network traffic is susceptible to man-in-the-middle attacks in which an intruder captures the packets between the client and server, modifies them, and then forwards them to the server. For an LDAP server, this susceptibility means that an attacker could cause a server to make decisions that are based on false or altered data from the LDAP queries. To lower this risk in your network, you can implement strong physical security measures to protect the network infrastructure. Also, you can make all types of man-in-the-middle attacks extremely difficult if you require digital signatures on all network packets by means of IPsec authentication headers." + remediation: "To establish the recommended configuration via GP, set the following UI path to Negotiate signing (configuring to Require signing also conforms to the benchmark): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: LDAP client signing requirements." + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LDAP -> LDAPClientIntegrity -> n:^(\d+) compare >= 1' + + - id: 14028 + title: "Ensure 'Network security: Minimum session security for NTLM SSP based (including secure RPC) clients' is set to 'Require NTLMv2 session security, Require 128-bit encryption'" + description: "This policy setting determines which behaviors are allowed by clients for applications using the NTLM Security Support Provider (SSP). The SSP Interface (SSPI) is used by applications that need authentication services. The setting does not modify how the authentication sequence works but instead require certain behaviors in applications that use the SSPI. The recommended state for this setting is: Require NTLMv2 session security, Require 128-bit encryption. Note: These values are dependent on the Network security." + rationale: "You can enable both options for this policy setting to help protect network traffic that uses the NTLM Security Support Provider (NTLM SSP) from being exposed or tampered with by an attacker who has gained access to the same network. In other words, these options help protect against man-in-the-middle attacks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Require NTLMv2 session security, Require 128-bit encryption: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Minimum session security for NTLM SSP based (including secure RPC) clients." + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> NTLMMinClientSec -> 537395200' + + - id: 14029 + title: "Ensure 'Network security: Minimum session security for NTLM SSP based (including secure RPC) servers' is set to 'Require NTLMv2 session security, Require 128-bit encryption'" + description: "This policy setting determines which behaviors are allowed by servers for applications using the NTLM Security Support Provider (SSP). The SSP Interface (SSPI) is used by applications that need authentication services. The setting does not modify how the authentication sequence works but instead require certain behaviors in applications that use the SSPI. The recommended state for this setting is: Require NTLMv2 session security, Require 128-bit encryption. Note: These values are dependent on the Network security." + rationale: "You can enable all of the options for this policy setting to help protect network traffic that uses the NTLM Security Support Provider (NTLM SSP) from being exposed or tampered with by an attacker who has gained access to the same network. That is, these options help protect against man-in-the-middle attacks." + remediation: "To establish the recommended configuration via GP, set the following UI path to Require NTLMv2 session security, Require 128-bit encryption: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network security: Minimum session security for NTLM SSP based (including secure RPC) servers." + compliance: + - cis_csc: ["13"] + references: + - https://workbench.cisecurity.org/benchmarks/288 + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0 -> NTLMMinServerSec -> 537395200' + + - id: 14030 + title: "Ensure 'System objects: Require case insensitivity for non-Windows subsystems' is set to 'Enabled'" + description: "This policy setting determines whether case insensitivity is enforced for all subsystems. The Microsoft Win32 subsystem is case insensitive. However, the kernel supports case sensitivity for other subsystems, such as the Portable Operating System Interface for UNIX (POSIX). Because Windows is case insensitive (but the POSIX subsystem will support case sensitivity), failure to enforce this policy setting makes it possible for a user of the POSIX subsystem to create a file with the same name as another file by using mixed case to label it. Such a situation can block access to these files by another user who uses typical Win32 tools, because only one of the files will be available. The recommended state for this setting is: Enabled." + rationale: "Because Windows is case-insensitive but the POSIX subsystem will support case sensitivity, failure to enable this policy setting would make it possible for a user of that subsystem to create a file with the same name as another file but with a different mix of upper and lower case letters. Such a situation could potentially confuse users when they try to access such files from normal Win32 tools because only one of the files will be available." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System objects: Require case insensitivity for non- Windows subsystems." + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Kernel -> ObCaseInsensitive -> 1' + + - id: 14031 + title: "Ensure 'System objects: Strengthen default permissions of internal system objects (e.g. Symbolic Links)' is set to 'Enabled'" + description: "This policy setting determines the strength of the default discretionary access control list (DACL) for objects. Active Directory maintains a global list of shared system resources, such as DOS device names, mutexes, and semaphores. In this way, objects can be located and shared among processes. Each type of object is created with a default DACL that specifies who can access the objects and what permissions are granted. The recommended state for this setting is: Enabled." + rationale: "This setting determines the strength of the default DACL for objects. Windows maintains a global list of shared computer resources so that objects can be located and shared among processes. Each type of object is created with a default DACL that specifies who can access the objects and with what permissions." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\System objects: Strengthen default permissions of internal system objects (e.g. Symbolic Links)." + compliance: + - cis_csc: ["14.4"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager -> ProtectionMode -> 1' + + - id: 14032 + title: "Ensure 'Windows Firewall: Private: Firewall state' is set to 'On'" + description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." + rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Private Profile\\Firewall state." + compliance: + - cis_csc: ["9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile -> EnableFirewall -> 1' + + - id: 14033 + title: "Ensure 'Windows Firewall: Public: Firewall state' is set to 'On'" + description: "Select On (recommended) to have Windows Firewall with Advanced Security use the settings for this profile to filter network traffic. If you select Off, Windows Firewall with Advanced Security will not use any of the firewall rules or connection security rules for this profile. The recommended state for this setting is: On (recommended)." + rationale: "If the firewall is turned off all traffic will be able to access the system and an attacker may be more easily able to remotely exploit a weakness in a network service." + remediation: "To establish the recommended configuration via GP, set the following UI path to On (recommended): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Windows Firewall with Advanced Security\\Windows Firewall with Advanced Security\\Windows Firewall Properties\\Public Profile\\Firewall state." + compliance: + - cis_csc: ["9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile -> EnableFirewall -> 1' + + - id: 14034 + title: "Ensure Registry tools set is enabled" + compliance: + - pci_dss: ["10.6.1"] + - hipaa: ["164.312.b"] + - nist_800_53: ["AU.6"] + condition: all + rules: + - 'r:HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System -> DisableRegistryTools -> 0' + + - id: 14035 + title: "Ensure DCOM is enabled" + description: "The Distributed Component Object Model (DCOM) is a protocol that enables software components to communicate directly over a network." + compliance: + - pci_dss: ["10.6.1"] + - hipaa: ["164.312.b"] + - nist_800_53: ["AU.6"] + references: + - https://support.microsoft.com/es-es/help/825750/how-to-disable-dcom-support-in-windows + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\OLE -> EnableDCOM -> Y' + + - id: 14036 + title: "Ensure LM authentication is not allowed (disable weak passwords)" + compliance: + - pci_dss: ["10.6.1", "11.4"] + - hipaa: ["164.312.b"] + - nist_800_53: ["AU.6", "SI.4"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA -> LMCompatibilityLevel -> r:^5$' + +# Disabled by some Malwares (sometimes by McAfee and Symantec +# security center too). + - id: 14037 + title: "Ensure Firewall/Anti Virus notifications are enabled" + compliance: + - pci_dss: ["10.6.1"] + - hipaa: ["164.312.b"] + - nist_800_53: ["AU.6"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center -> FirewallDisableNotify -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center -> antivirusoverride -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center -> firewalldisablenotify -> 0' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center -> firewalldisableoverride -> 0' + +# Checking for the microsoft firewall. + - id: 14038 + title: "Ensure Microsoft Firewall is enabled" + compliance: + - pci_dss: ["10.6.1", "1.4"] + - hipaa: ["164.312.b", "164.312.a.1"] + - nist_800_53: ["AU.6", "SC.7"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\software\policies\microsoft\windowsfirewall\domainprofile -> enablefirewall -> 1' + + - id: 14039 + title: "Ensure Null sessions are not allowed" + compliance: + - pci_dss: ["11.4"] + - nist_800_53: ["SI.4"] + condition: all + rules: + - 'r:HKLM\System\CurrentControlSet\Control\Lsa -> RestrictAnonymous -> 1' + + - id: 14040 + title: "Ensure Turn off Windows Error reporting is enabled" + compliance: + - pci_dss: ["10.6.1"] + - hipaa: ["164.312.b"] + - nist_800_53: ["AU.6"] + references: + - https://windowsir.blogspot.com/2007/04/something-new-to-look-for.html + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> Disabled -> 1' + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PCHealth\ErrorReporting -> DoReport -> 0' + + - id: 14041 + title: "Ensure Automatic Logon is disabled" + compliance: + - pci_dss: ["10.6.1"] + - hipaa: ["164.312.b"] + - nist_800_53: ["AU.6"] + condition: any + rules: + - 'not r:HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> DefaultPassword' + - 'r:HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> AutoAdminLogon -> 0' + + - id: 14042 + title: "Ensure Winpcap packet filter driver is not present" + compliance: + - pci_dss: ["10.6.1"] + - hipaa: ["164.312.b"] + - nist_800_53: ["AU.6"] + condition: none + rules: + - 'f:%WINDIR%\System32\drivers\npf.sys' + - 'f:%WINDIR%\Sysnative\drivers\npf.sys' + + - id: 14043 + title: "Ensure 'MSS: (AutoAdminLogon) Enable Automatic Logon (not recommended)' is set to 'Disabled'" + description: "This setting is separate from the Welcome screen feature in Windows XP and Windows Vista; if that feature is disabled, this setting is not disabled. If you configure a computer for automatic logon, anyone who can physically gain access to the computer can also gain access to everything that is on the computer, including any network or networks to which the computer is connected. Also, if you enable automatic logon, the password is stored in the registry in plaintext, and the specific registry key that stores this value is remotely readable by the Authenticated Users group. The recommended state for this setting is: Disabled." + rationale: "If you configure a computer for automatic logon, anyone who can physically gain access to the computer can also gain access to everything that is on the computer, including any network or networks that the computer is connected to. Also, if you enable automatic logon, the password is stored in the registry in plaintext. The specific registry key that stores this setting is remotely readable by the Authenticated Users group. As a result, this entry is appropriate only if the computer is physically secured and if you ensure that untrusted users cannot remotely see the registry." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (AutoAdminLogon) Enable Automatic Logon (not recommended) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis_csc: ["16"] + references: + - https://support.microsoft.com/en-us/help/324737/how-to-turn-on-automatic-logon-in-windows + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> AutoAdminLogon -> 0' + + - id: 14044 + title: "Ensure 'MSS: (DisableIPSourceRouting IPv6) IP source routing protection level (protects against packet spoofing)' is set to 'Enabled: Highest protection, source routing is completely disabled'" + description: "IP source routing is a mechanism that allows the sender to determine the IP route that a datagram should follow through the network. The recommended state for this setting is: Enabled: Highest protection, source routing is completely disabled." + rationale: "An attacker could use source routed packets to obscure their identity and location. Source routing allows a computer that sends a packet to specify the route that the packet takes." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Highest protection, source routing is completely disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (DisableIPSourceRouting IPv6) IP source routing protection level (protects against packet spoofing) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -> DisableIPSourceRouting -> 2' + + - id: 14045 + title: "Ensure 'MSS: (DisableIPSourceRouting) IP source routing protection level (protects against packet spoofing)' is set to 'Enabled: Highest protection, source routing is completely disabled'" + description: "IP source routing is a mechanism that allows the sender to determine the IP route that a datagram should take through the network. It is recommended to configure this setting to Not Defined for enterprise environments and to Highest Protection for high security environments to completely disable source routing. The recommended state for this setting is: Enabled: Highest protection, source routing is completely disabled." + rationale: "An attacker could use source routed packets to obscure their identity and location. Source routing allows a computer that sends a packet to specify the route that the packet takes." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Highest protection, source routing is completely disabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (DisableIPSourceRouting) IP source routing protection level (protects against packet spoofing) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> DisableIPSourceRouting -> 2' + + - id: 14046 + title: "Ensure 'MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended)' is set to 'Enabled'" + description: "The DLL search order can be configured to search for DLLs that are requested by running processes in one of two ways: -Search folders specified in the system path first, and then search the current working folder. -Search current working folder first, and then search the folders specified in the system path. When enabled, the registry value is set to 1. With a setting of 1, the system first searches the folders that are specified in the system path and then searches the current working folder. When disabled the registry value is set to 0 and the system first searches the current working folder and then searches the folders that are specified in the system path. Applications will be forced to search for DLLs in the system path first. For applications that require unique versions of these DLLs that are included with the application, this entry could cause performance or stability problems. The recommended state for this setting is: Enabled." + rationale: "If a user unknowingly executes hostile code that was packaged with additional files that include modified versions of system DLLs, the hostile code could load its own versions of those DLLs and potentially increase the type and degree of damage the code can render." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis_csc: ["8"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager -> SafeDllSearchMode -> 1' + + - id: 14047 + title: "Ensure 'MSS: (ScreenSaverGracePeriod) The time in seconds before the screen saver grace period expires (0 recommended)' is set to 'Enabled: 5 or fewer seconds'" + description: "Windows includes a grace period between when the screen saver is launched and when the console is actually locked automatically when screen saver locking is enabled. The recommended state for this setting is: Enabled: 5 or fewer seconds." + rationale: "The default grace period that is allowed for user movement before the screen saver lock takes effect is five seconds. If you leave the default grace period configuration, your computer is vulnerable to a potential attack from someone who could approach the console and attempt to log on to the computer before the lock takes effect. An entry to the registry can be made to adjust the length of the grace period." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 5 or fewer seconds: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (ScreenSaverGracePeriod) The time in seconds before the screen saver grace period expires (0 recommended) Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis_csc: ["16.5"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> ScreenSaverGracePeriod -> n:^(\d+) compare <= 5' + + - id: 14048 + title: "Ensure 'MSS: (WarningLevel) Percentage threshold for the security event log at which the system will generate a warning' is set to 'Enabled: 90% or less'" + description: "This setting can generate a security audit in the Security event log when the log reaches a user-defined threshold. The recommended state for this setting is: Enabled: 90% or less. Note: If log settings are configured to Overwrite events as needed or Overwrite events older than x days, this event will not be generated." + rationale: "If the Security log reaches 90 percent of its capacity and the computer has not been configured to overwrite events as needed, more recent events will not be written to the log. If the log reaches its capacity and the computer has been configured to shut down when it can no longer record events to the Security log, the computer will shut down and will no longer be available to provide network services." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 90% or less: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS: (WarningLevel) Percentage threshold for the security event log at which the system will generate a warning Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog.)" + compliance: + - cis_csc: ["6.3"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security -> WarningLevel -> n:^(\d+) compare <= 90' + + - id: 14049 + title: "Ensure 'Configure registry policy processing: Do not apply during periodic background processing' is set to 'Enabled: FALSE'" + description: "The 'Do not apply during periodic background processing' option prevents the system from updating affected policies in the background while the computer is in use. When background updates are disabled, policy changes will not take effect until the next user logon or system restart. The recommended state for this setting is: Enabled: FALSE (unchecked)." + rationale: "Setting this option to false (unchecked) will ensure that domain policy changes take effect more quickly, as compared to waiting until the next user logon or system restart." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled, then set the Do not apply during periodic background processing option to FALSE (unchecked): Computer Configuration\\Policies\\Administrative Templates\\System\\Group Policy\\Configure registry policy processing Note: This Group Policy path may not exist by default. It is provided by the Group Policy template GroupPolicy.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis_csc: ["3.7"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2} -> NoBackgroundPolicy -> 0' + + - id: 14050 + title: "Ensure 'Turn off downloading of print drivers over HTTP' is set to 'Enabled'" + description: "This policy setting controls whether the computer can download print driver packages over HTTP. To set up HTTP printing, printer drivers that are not available in the standard operating system installation might need to be downloaded over HTTP. The recommended state for this setting is: Enabled." + rationale: "Users might download drivers that include malicious code." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off downloading of print drivers over HTTP Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis_csc: ["2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers -> DisableWebPnPDownload -> 1' + + - id: 14051 + title: "Ensure 'Turn off Internet download for Web publishing and online ordering wizards' is set to 'Enabled'" + description: "This policy setting controls whether Windows will download a list of providers for the Web publishing and online ordering wizards. The recommended state for this setting is: Enabled." + rationale: "Although the risk is minimal, enabling this setting will reduce the possibility of a user unknowingly downloading malicious content through this feature." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Internet download for Web publishing and online ordering wizards Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis_csc: ["7"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoWebServices -> 1' + + - id: 14052 + title: "Ensure 'Turn off printing over HTTP' is set to 'Enabled'" + description: "This policy setting allows you to disable the client computer's ability to print over HTTP, which allows the computer to print to printers on the intranet as well as the Internet. The recommended state for this setting is: Enabled." + rationale: "Information that is transmitted over HTTP through this capability is not protected and can be intercepted by malicious users. For this reason, it is not often used in enterprise managed environments." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off printing over HTTP Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis_csc: ["13.1"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers -> DisableHTTPPrinting -> 1' + + - id: 14053 + title: "Ensure 'Configure Offer Remote Assistance' is set to 'Disabled'" + description: "This policy setting allows you to turn on or turn off Offer (Unsolicited) Remote Assistance on this computer. Help desk and support personnel will not be able to proactively offer assistance, although they can still respond to user assistance requests. The recommended state for this setting is: Disabled" + rationale: "A user might be tricked and accept an unsolicited Remote Assistance offer from a malicious user." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Assistance\\Configure Offer Remote Assistance Note: This Group Policy path may not exist by default. It is provided by the Group Policy template RemoteAssistance.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis_csc: ["9.1"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fAllowUnsolicited -> 0' + + - id: 14054 + title: "Ensure 'Configure Solicited Remote Assistance' is set to 'Disabled'" + description: "This policy setting allows you to turn on or turn off Solicited (Ask for) Remote Assistance on this computer. The recommended state for this setting is: Disabled." + rationale: "There is slight risk that a rogue administrator will gain access to another user's desktop session, however, they cannot connect to a user's computer unannounced or control it without permission from the user. When an expert tries to connect, the user can still choose to deny the connection or give the expert view-only privileges. The user must explicitly click the Yes button to allow the expert to remotely control the workstation." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Assistance\\Configure Solicited Remote Assistance Note: This Group Policy path may not exist by default. It is provided by the Group Policy template RemoteAssistance.admx/adml that is included with the Microsoft Windows 8.0 & Server 2012 (non-R2) Administrative Templates (or newer)." + compliance: + - cis_csc: ["5.1"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fAllowToGetHelp -> 0' + + - id: 14055 + title: "Ensure 'Turn off Autoplay' is set to 'Enabled: All drives'" + description: "Autoplay starts to read from a drive as soon as you insert media in the drive, which causes the setup file for programs or audio media to start immediately. An attacker could use this feature to launch a program to damage the computer or data on the computer. Autoplay is disabled by default on some removable drive types, such as floppy disk and network drives, but not on CD-ROM drives. Note: You cannot use this policy setting to enable Autoplay on computer drives in which it is disabled by default, such as floppy disk and network drives. The recommended state for this setting is: Enabled: All drives." + rationale: "An attacker could use this feature to launch a program to damage a client computer or data on the computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: All drives: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\AutoPlay Policies\\Turn off Autoplay Note: This Group Policy path is provided by the Group Policy template AutoPlay.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis_csc: ["8.3"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoDriveTypeAutoRun -> 255' + + - id: 14056 + title: "Ensure 'Do not allow passwords to be saved' is set to 'Enabled'" + description: "This policy setting helps prevent Remote Desktop clients from saving passwords on a computer. The recommended state for this setting is: Enabled. Note: If this policy setting was previously configured as Disabled or Not configured, any previously saved passwords will be deleted the first time a Remote Desktop client disconnects from any server." + rationale: "An attacker with physical access to the computer may be able to break the protection guarding saved passwords. An attacker who compromises a user's account and connects to their computer could use saved passwords to gain access to additional hosts." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Connection Client\\Do not allow passwords to be saved Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis_csc: ["16.4"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> DisablePasswordSaving -> 1' + + - id: 14057 + title: "Ensure 'Do not allow drive redirection' is set to 'Enabled'" + description: "This policy setting prevents users from sharing the local drives on their client computers to Remote Desktop Servers that they access. Mapped drives appear in the session folder tree in Windows Explorer in the following format: \\\\TSClient\\$ If local drives are shared they are left vulnerable to intruders who want to exploit the data that is stored on them. The recommended state for this setting is: Enabled." + rationale: "Data could be forwarded from the user's Remote Desktop Services session to the user's local computer without any direct user interaction. Malicious software already present on a compromised server would have direct and stealthy disk access to the user's local computer during the Remote Desktop session." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Device and Resource Redirection\\Do not allow drive redirection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fDisableCdm -> 1' + + - id: 14058 + title: "Ensure 'Always prompt for password upon connection' is set to 'Enabled'" + description: "This policy setting specifies whether Remote Desktop Services always prompts the client computer for a password upon connection. You can use this policy setting to enforce a password prompt for users who log on to Remote Desktop Services, even if they already provided the password in the Remote Desktop Connection client. The recommended state for this setting is: Enabled." + rationale: "Users have the option to store both their username and password when they create a new Remote Desktop Connection shortcut. If the server that runs Remote Desktop Services allows users who have used this feature to log on to the server but not enter their password, then it is possible that an attacker who has gained physical access to the user's computer could connect to a Remote Desktop Server through the Remote Desktop Connection shortcut, even though they may not know the user's password." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Always prompt for password upon connection Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In the Microsoft Windows Vista Administrative Templates, this setting was named Always prompt client for password upon connection, but it was renamed starting with the Windows Server 2008 (non-R2) Administrative Templates." + compliance: + - cis_csc: ["16.14"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> fPromptForPassword -> 1' + + - id: 14059 + title: "Ensure 'Set client connection encryption level' is set to 'Enabled: High Level'" + description: "This policy setting specifies whether to require the use of a specific encryption level to secure communications between client computers and RD Session Host servers during Remote Desktop Protocol (RDP) connections. This policy only applies when you are using native RDP encryption. However, native RDP encryption (as opposed to SSL encryption) is not recommended. This policy does not apply to SSL encryption. The recommended state for this setting is: Enabled: High Level." + rationale: "If Remote Desktop client connections that use low level encryption are allowed, it is more likely that an attacker will be able to decrypt any captured Remote Desktop Services network traffic." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: High Level: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Set client connection encryption level Note: This Group Policy path is provided by the Group Policy template TerminalServer.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis_csc: ["3.4"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services -> MinEncryptionLevel -> 3' + + - id: 14060 + title: "Ensure 'Always install with elevated privileges' is set to 'Disabled'" + description: "This setting controls whether or not Windows Installer should use system permissions when it installs any program on the system. Note: This setting appears both in the Computer Configuration and User Configuration folders. To make this setting effective, you must enable the setting in both folders. Caution: If enabled, skilled users can take advantage of the permissions this setting grants to change their privileges and gain permanent access to restricted files and folders. Note that the User Configuration version of this setting is not guaranteed to be secure. The recommended state for this setting is: Disabled." + rationale: "Users with limited privileges can exploit this feature by creating a Windows Installer installation package that creates a new local account that belongs to the local built-in Administrators group, adds their current account to the local built-in Administrators group, installs malicious software, or performs other unauthorized activities." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Installer\\Always install with elevated privileges Note: This Group Policy path is provided by the Group Policy template MSI.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis_csc: ["5.1"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer -> AlwaysInstallElevated -> 0' + - id: 14061 + title: "Ensure 'Configure Automatic Updates' is set to 'Enabled'" + description: "This policy setting specifies whether computers in your environment will receive security updates from Windows Update or WSUS. If you configure this policy setting to Enabled, the operating system will recognize when a network connection is available and then use the network connection to search Windows Update or your designated intranet site for updates that apply to them. After you configure this policy setting to Enabled, select one of the following three options in the Configure Automatic Updates Properties dialog box to specify how the service will work: 2) - Notify for download and auto install (Notify before downloading any updates) 3) - Auto download and notify for install (Download the updates automatically and notify when they are ready to be installed.) (Default setting) 4) - Auto download and schedule the install (Automatically download updates and install them on the schedule specified below.)) 5) - Allow local admin to choose setting (Leave decision on above choices up to the local Administrators (Not Recommended)) The recommended state for this setting is: Enabled. Note: The sub-setting 'Configure automatic updating:' has 4 possible values - all of them are valid depending on specific organizational needs, however if feasible we suggest using a value of 4 - Auto download and schedule the install. This suggestion is not a scored requirement. Note #2: Organizations that utilize a 3rd-party solution for patching may choose to exempt themselves from this setting, and instead configure it to Disabled so that the native Windows Update mechanism does not interfere with the 3rd-party patching process." + rationale: "Although each version of Windows is thoroughly tested before release, it is possible that problems will be discovered after the products are shipped. The Configure Automatic Updates setting can help you ensure that the computers in your environment will always have the most recent critical operating system updates and service packs installed." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\Configure Automatic Updates Note: This Group Policy path is provided by the Group Policy template WindowsUpdate.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis_csc: ["4.5"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> NoAutoUpdate -> 0' + + - id: 14062 + title: "Ensure 'No auto-restart with logged on users for scheduled automatic updates installations' is set to 'Disabled'" + description: "This policy setting specifies that Automatic Updates will wait for computers to be restarted by the users who are logged on to them to complete a scheduled installation. The recommended state for this setting is: Disabled. Note: This setting applies only when you configure Automatic Updates to perform scheduled update installations. If you configure the Configure Automatic Updates setting to Disabled, this setting has no effect." + rationale: "Some security updates require that the computer be restarted to complete an installation. If the computer cannot restart automatically, then the most recent update will not completely install and no new updates will download to the computer until it is restarted. Without the auto-restart functionality, users who are not security-conscious may choose to indefinitely delay the restart, therefore keeping the computer in a less secure state." + remediation: "To establish the recommended configuration via GP, set the following UI path to Disabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Update\\No auto-restart with logged on users for scheduled automatic updates installations Note: This Group Policy path is provided by the Group Policy template WindowsUpdate.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates. Note #2: In older Microsoft Windows Administrative Templates, this setting was initially named No auto-restart for scheduled Automatic Updates installations, but it was renamed starting with the Windows 7 & Server 2008 R2 Administrative Templates." + compliance: + - cis_csc: ["4.5"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -> NoAutoRebootWithLoggedOnUsers -> 0' + + - id: 14063 + title: "Ensure 'MSS: (TcpMaxDataRetransmissions IPv6) How many times unacknowledged data is retransmitted' is set to 'Enabled: 3'" + description: "This setting controls the number of times that TCP retransmits an individual data segment (non-connect segment) before the connection is aborted. The retransmission time-out is doubled with each successive retransmission on a connection. It is reset when responses resume. The base time-out value is dynamically determined by the measured round-trip time on the connection. The recommended state for this setting is: Enabled: 3." + rationale: "A malicious user could exhaust a target computer's resources if it never sent any acknowledgment messages for data that was transmitted by the target computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 3: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(TcpMaxDataRetransmissions IPv6) How many times unacknowledged data is retransmitted Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters -> TcpMaxDataRetransmissions -> 3' + + - id: 14064 + title: "Ensure 'MSS: (TcpMaxDataRetransmissions) How many times unacknowledged data is retransmitted' is set to 'Enabled: 3'" + description: "This setting controls the number of times that TCP retransmits an individual data segment (non-connect segment) before the connection is aborted. The retransmission time-out is doubled with each successive retransmission on a connection. It is reset when responses resume. The base time-out value is dynamically determined by the measured round-trip time on the connection. The recommended state for this setting is: Enabled: 3." + rationale: "A malicious user could exhaust a target computer's resources if it never sent any acknowledgment messages for data that was transmitted by the target computer." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: 3: Computer Configuration\\Policies\\Administrative Templates\\MSS (Legacy)\\MSS:(TcpMaxDataRetransmissions) How many times unacknowledged data is retransmitted Note: This Group Policy path does not exist by default. An additional Group Policy template (MSS-legacy.admx/adml) is required - it is available from this TechNet blog post: The MSS settings - Microsoft Security Guidance blog." + compliance: + - cis_csc: ["9"] + references: + - https://blogs.technet.microsoft.com/secguide/2016/10/02/the-mss-settings/ + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -> TcpMaxDataRetransmissions -> 3' + + - id: 14065 + title: "Ensure 'Turn off Search Companion content file updates' is set to 'Enabled'" + description: "This policy setting specifies whether Search Companion should automatically download content updates during local and Internet searches. The recommended state for this setting is: Enabled." + rationale: "There is a small risk that users will unknowingly reveal sensitive information because of the topics they are searching for. This risk is very low because even if this setting is enabled users still must submit search queries to the desired search engine in order to perform searches." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Search Companion content file updates Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SearchCompanion -> DisableContentFileUpdates -> 1' + + - id: 14066 + title: "Ensure 'Turn off the \"Publish to Web\" task for files and folders' is set to 'Enabled'" + description: "This policy setting specifies whether the tasks Publish this file to the Web, Publish this folder to the Web, and Publish the selected items to the Web are available from File and Folder Tasks in Windows folders. The Web Publishing wizard is used to download a list of providers and allow users to publish content to the Web. The recommended state for this setting is: Enabled." + rationale: "Users may publish confidential or sensitive information to a public service outside of the control of the organization." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the \"Publish to Web\" task for files and folders Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -> NoPublishingWizard -> 1' + + - id: 14067 + title: "Ensure 'Turn off the Windows Messenger Customer Experience Improvement Program' is set to 'Enabled'" + description: "This policy setting specifies whether Windows Messenger can collect anonymous information about how the Windows Messenger software and service is used. Microsoft uses information collected through the Customer Experience Improvement Program to detect software flaws so that they can be corrected more quickly, enabling this setting will reduce the amount of data Microsoft is able to gather for this purpose. The recommended state for this setting is: Enabled." + rationale: "Large enterprise managed environments may not want to have information collected by Microsoft from managed client computers." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off the Windows Messenger Customer Experience Improvement Program Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Messenger\Client -> CEIP -> 2' + + - id: 14068 + title: "Ensure 'Turn off Windows Error Reporting' is set to 'Enabled'" + description: "This policy setting controls whether or not errors are reported to Microsoft. Error Reporting is used to report information about a system or application that has failed or has stopped responding and is used to improve the quality of the product. The recommended state for this setting is: Enabled." + rationale: "If a Windows Error occurs in a secure, enterprise managed environment, the error should be reported directly to IT staff for troubleshooting and remediation. There is no benefit to the corporation to report these errors directly to Microsoft, and there is some risk of unknowingly exposing sensitive data as part of the error." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Internet Communication Management\\Internet Communication settings\\Turn off Windows Error Reporting Note: This Group Policy path is provided by the Group Policy template ICM.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates." + compliance: + - cis_csc: ["13"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting -> Disabled -> 1' + + - id: 14069 + title: "Ensure 'Enable RPC Endpoint Mapper Client Authentication' is set to 'Enabled'" + description: "This policy setting controls whether RPC clients authenticate with the Endpoint Mapper Service when the call they are making contains authentication information. The Endpoint Mapper Service on computers running Windows NT4 (all service packs) cannot process authentication information supplied in this manner. This policy setting can cause a specific issue with 1-way forest trusts if it is applied to the trusting domain DCs (see Microsoft KB3073942), so we do not recommend applying it to Domain Controllers." + rationale: "Anonymous access to RPC services could result in accidental disclosure of information to unauthenticated users." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Procedure Call\\Enable RPC Endpoint Mapper Client Authentication." + compliance: + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Rpc -> EnableAuthEpResolution -> 1' + + - id: 14070 + title: "Ensure 'Restrict Unauthenticated RPC clients' is set to 'Enabled: Authenticated'" + description: "This policy setting controls how the RPC server runtime handles unauthenticated RPC clients connecting to RPC servers. This policy setting impacts all RPC applications. In a domain environment this policy setting should be used with caution as it can impact a wide range of functionality including group policy processing itself. Reverting a change to this policy setting can require manual intervention on each affected machine. This policy setting should never be applied to a Domain Controller. A client will be considered an authenticated client if it uses a named pipe to communicate with the server or if it uses RPC Security. RPC Interfaces that have specifically requested to be accessible by unauthenticated clients may be exempt from this restriction, depending on the selected value for this policy setting. -- None allows all RPC clients to connect to RPC Servers running on the machine on which the policy setting is applied. -- Authenticated allows only authenticated RPC Clients (per the definition above) to connect to RPC Servers running on the machine on which the policy setting is applied. Exemptions are granted to interfaces that have requested them. -- Authenticated without exceptions allows only authenticated RPC Clients (per the definition above) to connect to RPC Servers running on the machine on which the policy setting is applied. No exceptions are allowed. This value has the potential to cause serious problems and is not recommended.'" + rationale: "Unauthenticated RPC communication can create a security vulnerability." + remediation: "To establish the recommended configuration via GP, set the following UI path to Enabled: Authenticated: Computer Configuration\\Policies\\Administrative Templates\\System\\Remote Procedure Call\\Restrict Unauthenticated RPC clients." + compliance: + - cis_csc: ["9.1", "9.2"] + condition: all + rules: + - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Rpc -> RestrictRemoteClients -> 1' diff --git a/sca/windows/win_audit_rcl.yml b/sca/windows/win_audit_rcl.yml deleted file mode 100644 index 4cdde4ef1..000000000 --- a/sca/windows/win_audit_rcl.yml +++ /dev/null @@ -1,108 +0,0 @@ -# Security Configuration assessment -# Checks for Windows audit -# Copyright (C) 2015-2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation -# - -policy: - id: "win_audit" - file: "win_audit_rcl.yml" - name: "Benchmark for Windows audit" - description: "This document provides a way of ensuring the security of the Windows systems." - -requirements: - title: "Check for Windows platform" - description: "Requirements for running the audit policy under a Windows platform" - condition: "any required" - rules: - - 'r:HKEY_LOCAL_MACHINE\SAM\SAM;' - -checks: - - id: 2500 - title: "Disabled Registry tools set" - compliance: - - pci_dss: "10.6.1" - condition: any - rules: - - 'r:HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System -> DisableRegistryTools -> 1;' - - 'r:HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System -> DisableRegistryTools -> 1;' - - id: 2501 - title: "DCOM disabled" - description: "The Distributed Component Object Model (DCOM) is a protocol that enables software components to communicate directly over a network." - compliance: - - pci_dss: "10.6.1" - references: - - https://support.microsoft.com/es-es/help/825750/how-to-disable-dcom-support-in-windows - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\Software\Microsoft\OLE -> EnableDCOM -> N;' - - id: 2502 - title: "LM authentication allowed (weak passwords)" - compliance: - - pci_dss: "10.6.1, 11.4" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA -> LMCompatibilityLevel -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA -> LMCompatibilityLevel -> 1;' -# Disabled by some Malwares (sometimes by McAfee and Symantec -# security center too). - - id: 2503 - title: "Firewall/Anti Virus notification disabled" - compliance: - - pci_dss: "10.6.1" - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center -> FirewallDisableNotify -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center -> antivirusoverride -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center -> firewalldisablenotify -> !0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center -> firewalldisableoverride -> !0;' -# Checking for the microsoft firewall. - - id: 2504 - title: "Microsoft Firewall disabled" - compliance: - - pci_dss: "10.6.1, 1.4" - condition: all - rules: - - 'r:HKEY_LOCAL_MACHINE\software\policies\microsoft\windowsfirewall\domainprofile -> enablefirewall -> 0;' - - 'r:HKEY_LOCAL_MACHINE\software\policies\microsoft\windowsfirewall\standardprofile -> enablefirewall -> 0;' - - id: 2505 - title: "Null sessions allowed" - compliance: - - pci_dss: "11.4" - condition: any - rules: - - 'r:HKLM\System\CurrentControlSet\Control\Lsa -> RestrictAnonymous -> 0;' - - id: 2506 - title: "Error reporting disabled" - compliance: - - pci_dss: "10.6.1" - references: - - https://windowsir.blogspot.com/2007/04/something-new-to-look-for.html - condition: any - rules: - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting -> DoReport -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting -> IncludeKernelFaults -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting -> IncludeMicrosoftApps -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting -> IncludeWindowsApps -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting -> IncludeShutdownErrs -> 0;' - - 'r:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting -> ShowUI -> 0;' - - id: 2507 - title: "Automatic Logon enabled" - compliance: - - pci_dss: "10.6.1" - condition: any - rules: - - 'r:HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> DefaultPassword;' - - 'r:HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon -> AutoAdminLogon -> 1;' - - id: 2508 - title: "Winpcap packet filter driver found" - compliance: - - pci_dss: "10.6.1" - condition: any - rules: - - 'f:%WINDIR%\System32\drivers\npf.sys;' - - 'f:%WINDIR%\Sysnative\drivers\npf.sys;'