# # (C) 2017 Tenable Network Security, Inc. # # This script is released under the Tenable Subscription License and # may not be used from within scripts released under another license # without authorization from Tenable Network Security, Inc. # # See the following licenses for details: # # http://static.tenable.com/prod_docs/Nessus_6_SLA_and_Subscription_Agreement.pdf # # @PROFESSIONALFEED@ # $Revision: 1.0 $ # $Date: 2017/05/04 $ # # Description : This .audit is designed to query targets against the CIS Microsoft IIS 10 Benchmark. # # https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf # # #CIS IIS 10 v1.0.0 Level 1 type : REG_CHECK description : "Verify IIS is installed." value_type : POLICY_TEXT value_data : "HKLM\Software\Microsoft\Inetstp" reg_option : MUST_EXIST type : REGISTRY_SETTING description : "Verify IIS 10 installed." value_type : POLICY_TEXT value_data : "^Version 10\.0[\s]*$" reg_key : "HKLM\Software\Microsoft\Inetstp" reg_item : "VersionString" check_type : CHECK_REGEX type : REGISTRY_SETTING description : "Windows Server 2016 or 2019" value_type : POLICY_TEXT value_data : "^[a-zA-Z0-9\(\)\s]*2019|2016[a-zA-Z0-9\(\)\s]*$" reg_key : "HKLM\Software\Microsoft\Windows Nt\Currentversion" reg_item : "ProductName" check_type : CHECK_REGEX #added |2016 regex to account for IIS 10 running on 2016 or 2019 type : AUDIT_IIS_APPCMD description : "1.1 Ensure web content is on non-system partition" info : "Web resources published through IIS are mapped, via Virtual Directories, to physical locations on disk. It is recommended to map all Virtual Directories to a non-system disk volume. Rationale: Isolating web content from system files may reduce the probability of: * Web sites/applications exhausting system disk space * ob体育 IO vulnerability in the web site/application from affecting the confidentiality and/or integrity of system files" reference : "800-53|CM-6,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,800-171|3.4.2,CSF|PR.IP-1,ITSG-33|CM-6,CSCv6|14,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "1. Browse to web content in C:\\inetpub\\wwwroot\\ 2. Copy or cut content onto a dedicated and restricted web folder on a non-system drive such as D:\\webroot\\ 3. Change mappings for any applications or Virtual Directories to reflect the new location To change the mapping for the application named app1 which resides under the Default Web Site, open IIS Manager: 1. Expand the server node 2. Expand Sites 3. Expand Default Web Site 4. Click on app1 5. In the Actions pane, select Basic Settings 6. In the Physical path text box, put the new location of the application, D:\\wwwroot\\app1 in the example above Default Value: The default location for web content is: %systemdrive%\inetpub\wwwroot." value_type : POLICY_TEXT value_data : "physicalPath:(\%SystemDrive\%|C:)" appcmd_args : "list vdir" check_type : CHECK_NOT_REGEX type : AUDIT_IIS_APPCMD description : "1.2 Ensure 'host headers' are on all sites" info : "Host headers provide the ability to host multiple websites on the same IP address and port. It is recommended that host headers be configured for all sites. Wildcard host headers are now supported. Rationale: Requiring a Host header for all sites may reduce the probability of: * DNS rebinding attacks successfully compromising or abusing site data or functionality * IP-based scans successfully identifying or interacting with a target application hosted on IIS Note: If a wildcard DNS entry exists and a wildcard host header is used, you may be serving data to more domains than intended." reference : "800-53|CM-6,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,800-171|3.4.2,CSF|PR.IP-1,ITSG-33|CM-6,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "Obtain a listing of all sites by using the following appcmd.exe command: %systemroot%\system32\inetsrv\appcmd list sites Perform the following in IIS Manager to configure host headers for the Default Web Site: 1. Open IIS Manager 2. In the Connections pane expand the Sites node and select Default Web Site 3. In the Actions pane click Bindings 4. In the Site Bindings dialog box, select the binding for which host headers are going to be configured, Port 80 in this example 5. Click Edit 6. Under host name, enter the sites FQDN, such as 7. Click OK, then Close Note: Requiring a host header may impair site functionality for HTTP/1.0 clients. Default Value: By default, host headers are not required or set up automatically." value_type : POLICY_TEXT value_data : "\(id:[0-9]*,bindings:.*https*/[0-9\.\*]+:[0-9]*:,.*state:[A-Za-z]*\)" appcmd_args : "list sites" check_type : CHECK_NOT_REGEX type : AUDIT_IIS_APPCMD description : "1.3 Ensure 'directory browsing' is set to disabled" info : "Directory browsing allows the contents of a directory to be displayed upon request from a web client. If directory browsing is enabled for a directory in Internet Information Services, users receive a page that lists the contents of the directory when the following two conditions are met: 1. No specific file is requested in the URL 2. The Default Documents feature is disabled in IIS, or if it is enabled, IIS is unable to locate a file in the directory that matches a name specified in the IIS default document list It is recommended that directory browsing be disabled. Rationale: Ensuring that directory browsing is disabled may reduce the probability of disclosing sensitive content that is inadvertently accessible via IIS." reference : "800-53|CM-7,CIP|007-6-R1,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,800-171|3.4.6,800-171|3.4.7,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "Directory Browsing can be set by using the UI, running appcmd.exe commands, by editing configuration files directly, or by writing WMI scripts. To disable directory browsing at the server level using an appcmd.exe command: %systemroot%\system32\inetsrv\appcmd set config /section:directoryBrowse /enabled:false Default Value: In IIS, directory browsing is disabled by default." value_type : POLICY_TEXT value_data : "false" appcmd_args : "list config /section:directoryBrowse /text:enabled" type : AUDIT_IIS_APPCMD description : "1.4 Ensure 'application pool identity' is configured for all application pools" info : "Application Pool Identities are the actual users/authorities that will run the worker process - w3wp.exe. Assigning the correct user authority will help ensure that applications can function properly, while not giving overly permissive permissions on the system. These identities can further be used in ACLs to protect system content. It is recommended that each Application Pool run under a unique identity. IIS has additional built-in least privilege identities intended for use by Application Pools. It is recommended that the default Application Pool Identity be changed to a least privilege principle other than Network Service. Furthermore, it is recommended that all application pool identities be assigned a unique least privilege principal. To achieve isolation in IIS, application pools can be run as separate identities. IIS can be configured to automatically use the application pool identity if no anonymous user account is configured for a Web site. This can greatly reduce the number of accounts needed for Web sites and make management of the accounts easier. It is recommended the Application Pool Identity be set as the Anonymous User Identity. The name of the Application Pool account corresponds to the name of the Application Pool. Application Pool Identities were introduced in Windows Server 2008 SP2. It is recommended that Application Pools be set to run as ApplicationPoolIdentity unless there is an underlying reason that the application pool needs to run as a specified end user account. One example where this is needed is for web farms using Kerberos authentication. Rationale: Setting Application Pools to use unique least privilege identities such as ApplicationPoolIdentity reduces the potential harm the identity could cause should the application ever become compromised. Additionally, it will simplify application pools configuration and account management." reference : "CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "The default Application Pool identity may be set for an application using the IIS Manager GUI, using AppCmd.exe commands in a command-line window, directly editing the configuration files, or by writing WMI scripts. Perform the following to change the default identity to the built-in ApplicationPoolIdentity in the IIS Manager GUI: 1. Open the IIS Manager GUI 2. In the connections pane, expand the server node and click Application Pools 3. On the Application Pools page, select the DefaultAppPool, and then click Advanced Settings in the Actions pane 4. For the Identity property, click the '...' button to open the Application Pool Identity dialog box 5. Select the Built-in account option choose ApplicationPoolIdentity from the list, or input a unique application user created for this purpose 6. Restart IIS To change the ApplicationPool identity to the built-in ApplicationPoolIdentity using AppCmd.exe, run the following from a command prompt: %systemroot%\system32\inetsrv\appcmd set config /section:applicationPools /[name=''].processModel.identityType:ApplicationPoolIdentity The example code above will set just the DefaultAppPool. Run this command for each configured Application Pool. Additionally, ApplicationPoolIdentity can be made the default for all Application Pools by using the Set Application Pool Defaults action on the Application Pools node. If using a custom defined Windows user such as a dedicated service account, that user will need to be a member of the IIS_IUSRS group. The IIS_IUSRS group has access to all the necessary file and system resources so that an account, when added to this group, can seamlessly act as an application pool identity. Default Value: By Default, the DefaultAppPool in IIS is configured to use the ApplicationPoolIdentity account." value_type : POLICY_TEXT value_data : "^(ApplicationPoolIdentity|SpecificUser)[\s]*$" appcmd_args : "list config /section:applicationpools /text:[name='{}'].processModel.identityType" appcmd_list : "list AppPools" check_type : CHECK_REGEX type : FILE_CHECK description : "Confirm applicationHost.config is available in standard location." value_type : POLICY_TEXT value_data : "%systemroot%\system32\inetsrv\config\applicationHost.config" file_option : MUST_EXIST type : FILE_CONTENT_CHECK description : "1.6 Ensure 'application pool identity' is configured for anonymous user identity" info : "To achieve isolation in IIS, application pools can be run as separate identities. IIS can be configured to automatically use the application pool identity if no anonymous user account is configured for a Web site. This can greatly reduce the number of accounts needed for Web sites and make management of the accounts easier. It is recommended the Application Pool Identity be set as the Anonymous User Identity. Rationale: Configuring the anonymous user identity to use the application pool identity will help ensure site isolation - provided sites are set to use the application pool identity. Since a unique principal will run each application pool, it will ensure the identity is least privilege. Additionally, it will simplify Site management." reference : "800-53|CM-6,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,800-171|3.4.2,CSF|PR.IP-1,ITSG-33|CM-6,CSCv6|14.4,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "The Anonymous User Identity can be set to Application Pool Identity by using the IIS Manager GUI, using AppCmd.exe commands in a command-line window, directly editing the configuration files, or by writing WMI scripts. Perform the following to set the username attribute of the anonymousAuthentication node in the IIS Manager GUI: 1. Open the IIS Manager GUI and navigate to the desired server, site, or application 2. In Features View, find and double-click the Authentication icon 3. Select the Anonymous Authentication option and in the Actions pane select Edit... 4. Choose Application pool identity in the modal window and then press the OK button Default Value: The default identity for the anonymous user is the IUSR virtual account." value_type : POLICY_TEXT value_data : "%systemroot%\system32\inetsrv\config\applicationHost.config" regex : "^[\s]* description : "1.6 Ensure 'application pool identity' is configured for anonymous user identity" info : "To achieve isolation in IIS, application pools can be run as separate identities. IIS can be configured to automatically use the application pool identity if no anonymous user account is configured for a Web site. This can greatly reduce the number of accounts needed for Web sites and make management of the accounts easier. It is recommended the Application Pool Identity be set as the Anonymous User Identity. Rationale: Configuring the anonymous user identity to use the application pool identity will help ensure site isolation - provided sites are set to use the application pool identity. Since a unique principal will run each application pool, it will ensure the identity is least privilege. Additionally, it will simplify Site management." reference : "CSCv6|14.4,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "The Anonymous User Identity can be set to Application Pool Identity by using the IIS Manager GUI, using AppCmd.exe commands in a command-line window, directly editing the configuration files, or by writing WMI scripts. Perform the following to set the username attribute of the anonymousAuthentication node in the IIS Manager GUI: 1. Open the IIS Manager GUI and navigate to the desired server, site, or application 2. In Features View, find and double-click the Authentication icon 3. Select the Anonymous Authentication option and in the Actions pane select Edit... 4. Choose Application pool identity in the modal window and then press the OK button Default Value: The default identity for the anonymous user is the IUSR virtual account." type : AUDIT_IIS_APPCMD description : "2.1 Ensure 'global authorization rule' is set to restrict access" info : "IIS introduced URL Authorization, which allows the addition of Authorization rules to the actual URL, instead of the underlying file system resource, as a way to protect it. Authorization rules can be configured at the server, web site, folder (including Virtual Directories), or file level. The native URL Authorization module applies to all requests, whether they are .NET managed or other types of files (e.g. static files or ASP files). It is recommended that URL Authorization be configured to only grant access to the necessary security principals. Rationale: Configuring a global Authorization rule that restricts access will ensure inheritance of the settings down through the hierarchy of web directories; if that content is copied elsewhere, the authorization rules flow with it. This will ensure access to current and future content is only granted to the appropriate principals, mitigating risk of accidental or unauthorized access." reference : "800-53|AC-3,800-171|3.1.1,CSF|PR.AC-4,CSF|PR.PT-3,ISO/IEC-27001|A.9.4.1,ITSG-33|AC-3,CSCv6|18,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To configure URL Authorization at the server level using IIS Manager: 1. Connect to Internet Information Services (IIS Manager) 2. Select the server 3. Select Authorization Rules 4. Remove the 'Allow All Users' rule 5. Click Add Allow Rule... 6. Allow access to the user(s), user groups, or roles that are authorized across all of the web sites and applications (e.g. the Administrators group) Default Value: The default server-level setting is to allow all users access." value_type : POLICY_TEXT value_data : "" appcmd_args : "list config /section:system.web/authorization" check_type : CHECK_NOT_REGEX type : AUDIT_IIS_APPCMD description : "Check IIS for Anonymous authentication" value_type : POLICY_TEXT value_data : "false" appcmd_args : "list config /section:system.webserver/security/authentication/anonymousAuthentication /text:enabled" type : AUDIT_IIS_APPCMD description : "Check IIS for Forms authentication" value_type : POLICY_TEXT value_data : "Forms" appcmd_args : "list config /section:system.web/authentication /text:mode" description : "2.2 Ensure access to sensitive site features is restricted to authenticated principals only - Default" info : "IIS supports both challenge-based and login redirection-based authentication methods. Challenge-based authentication methods, such as Integrated Windows Authentication, require a client to respond correctly to a server-initiated challenge. A login redirection-based authentication method such as Forms Authentication relies on redirection to a login page to determine the identity of the principal. Challenge-based authentication and login redirection-based authentication methods cannot be used in conjunction with one another. Public servers/sites are typically configured to use Anonymous Authentication. This method typically works, provided the content or services is intended for use by the public. When sites, applications, or specific content containers are not intended for anonymous public use, an appropriate authentication mechanism should be utilized. Authentication will help confirm the identity of clients who request access to sites, application, and content. IIS provides the following authentication modules by default: * Anonymous Authentication - allows anonymous users to access sites, applications, and/or content * Integrated Windows Authentication - authenticates users using the NTLM or Kerberos protocols; Kerberos v5 requires a connection to Active Directory * ASP.NET Impersonation - allows ASP.NET applications to run under a security context different from the default security context for an application * Forms Authentication - enables a user to login to the configured space with a valid user name and password which is then validated against a database or other credentials store * Basic authentication - requires a valid user name and password to access content * Client Certificate Mapping Authentication - allows automatic authentication of users who log on with client certificates that have been configured; requires SSL * Digest Authentication - uses Windows domain controller to authenticate users who request access Note that none of the challenge-based authentication modules can be used at the same time Forms Authentication is enabled for certain applications/content. Forms Authentication does not rely on IIS authentication, so anonymous access for the ASP.NET application can be configured if Forms Authentication will be used. It is recommended that sites containing sensitive information, confidential data, or non-public web services be configured with a credentials-based authentication mechanism. Rationale: Configuring authentication will help mitigate the risk of unauthorized users accessing data and/or services, and in some cases reduce the potential harm that can be done to a system." reference : "CSCv6|14.4,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "When configuring an authentication module for the first time, each mechanism must be completely configured before use. Enabling authentication can be performed by using the user interface (UI), running AppCmd.exe commands in a command-line window, editing configuration files directly, or by writing WMI scripts. To verify an authentication mechanism is in place for sensitive content using the IIS Manager GUI: 1. Open IIS Manager and navigate to level with sensitive content 2. In Features View, double-click Authentication 3. On the Authentication page, make sure an authentication module is enabled, while anonymous authentication is enabled (Forms Authentication can have anonymous as well) 4. If necessary, select the desired authentication module, then in the Actions pane, click Enable Default Value: The default installation of IIS supports Anonymous Authentication without further electing additional methods." description : "2.2 Ensure access to sensitive site features is restricted to authenticated principals only - Default" info : "IIS supports both challenge-based and login redirection-based authentication methods. Challenge-based authentication methods, such as Integrated Windows Authentication, require a client to respond correctly to a server-initiated challenge. A login redirection-based authentication method such as Forms Authentication relies on redirection to a login page to determine the identity of the principal. Challenge-based authentication and login redirection-based authentication methods cannot be used in conjunction with one another. Public servers/sites are typically configured to use Anonymous Authentication. This method typically works, provided the content or services is intended for use by the public. When sites, applications, or specific content containers are not intended for anonymous public use, an appropriate authentication mechanism should be utilized. Authentication will help confirm the identity of clients who request access to sites, application, and content. IIS provides the following authentication modules by default: * Anonymous Authentication - allows anonymous users to access sites, applications, and/or content * Integrated Windows Authentication - authenticates users using the NTLM or Kerberos protocols; Kerberos v5 requires a connection to Active Directory * ASP.NET Impersonation - allows ASP.NET applications to run under a security context different from the default security context for an application * Forms Authentication - enables a user to login to the configured space with a valid user name and password which is then validated against a database or other credentials store * Basic authentication - requires a valid user name and password to access content * Client Certificate Mapping Authentication - allows automatic authentication of users who log on with client certificates that have been configured; requires SSL * Digest Authentication - uses Windows domain controller to authenticate users who request access Note that none of the challenge-based authentication modules can be used at the same time Forms Authentication is enabled for certain applications/content. Forms Authentication does not rely on IIS authentication, so anonymous access for the ASP.NET application can be configured if Forms Authentication will be used. It is recommended that sites containing sensitive information, confidential data, or non-public web services be configured with a credentials-based authentication mechanism. Rationale: Configuring authentication will help mitigate the risk of unauthorized users accessing data and/or services, and in some cases reduce the potential harm that can be done to a system." reference : "CSCv6|14.4,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "When configuring an authentication module for the first time, each mechanism must be completely configured before use. Enabling authentication can be performed by using the user interface (UI), running AppCmd.exe commands in a command-line window, editing configuration files directly, or by writing WMI scripts. To verify an authentication mechanism is in place for sensitive content using the IIS Manager GUI: 1. Open IIS Manager and navigate to level with sensitive content 2. In Features View, double-click Authentication 3. On the Authentication page, make sure an authentication module is enabled, while anonymous authentication is enabled (Forms Authentication can have anonymous as well) 4. If necessary, select the desired authentication module, then in the Actions pane, click Enable Default Value: The default installation of IIS supports Anonymous Authentication without further electing additional methods." type : REGISTRY_SETTING description : "Verify .net extensibility is installed - NetFxExtensibility45" value_type : POLICY_DWORD value_data : 1 reg_key : "HKLM\Software\Microsoft\Inetstp\Components" reg_item : "NetFxExtensibility45" reg_option : CAN_NOT_BE_NULL type : REGISTRY_SETTING description : "Verify .net extensibility is installed - ASPNET45" value_type : POLICY_DWORD value_data : 1 reg_key : "HKLM\Software\Microsoft\Inetstp\Components" reg_item : "ASPNET45" reg_option : CAN_NOT_BE_NULL type : AUDIT_IIS_APPCMD description : "2.5 Ensure 'cookie protection mode' is configured for forms authentication - Default" info : "The cookie protection mode defines the protection Forms Authentication cookies will be given within a configured application. The four cookie protection modes that can be defined are: * Encryption and validation - Specifies that the application use both data validation and encryption to help protect the cookie; this option uses the configured data validation algorithm (based on the machine key) and triple-DES (3DES) for encryption, if available and if the key is long enough (48 bytes or more) * None - Specifies that both encryption and validation are disabled for sites that are using cookies only for personalization and have weaker security requirements * Encryption - Specifies that the cookie is encrypted by using Triple-DES or DES, but data validation is not performed on the cookie; cookies used in this manner might be subject to plain text attacks * Validation - Specifies that a validation scheme verifies that the contents of an encrypted cookie have not been changed in transit It is recommended that cookie protection mode always encrypt and validate Forms Authentication cookies. Rationale: By encrypting and validating the cookie, the confidentiality and integrity of data within the cookie is assured. This helps mitigate the risk of attacks such as session hijacking and impersonation." reference : "800-53|SC-28,800-171|3.13.16,CSF|PR.DS-1,ITSG-33|SC-28,TBA-FIISB|28.1,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "Cookie protection mode can be configured by using the user interface (UI), by running Appcmd.exe commands in a command-line window, by editing configuration files directly, or by writing WMI scripts. Using IIS Manager: 1. Open IIS Manager and navigate to the level where Forms Authentication is enabled 2. In Features View, double-click Authentication 3. On the Authentication page, select Forms Authentication 4. In the Actions pane, click Edit 5. In the Cookie settings section, verify the drop-down for Protection mode is set for Encryption and validation Default Value: When cookies are used for Forms Authentication, the default cookie protection mode is All, meaning the application encrypts and validates the cookie." value_type : POLICY_TEXT value_data : "All" appcmd_args : "list config /section:system.web/authentication /text:forms.protection" type : AUDIT_IIS_APPCMD description : "2.5 Ensure 'cookie protection mode' is configured for forms authentication - Applications" info : "The cookie protection mode defines the protection Forms Authentication cookies will be given within a configured application. The four cookie protection modes that can be defined are: * Encryption and validation - Specifies that the application use both data validation and encryption to help protect the cookie; this option uses the configured data validation algorithm (based on the machine key) and triple-DES (3DES) for encryption, if available and if the key is long enough (48 bytes or more) * None - Specifies that both encryption and validation are disabled for sites that are using cookies only for personalization and have weaker security requirements * Encryption - Specifies that the cookie is encrypted by using Triple-DES or DES, but data validation is not performed on the cookie; cookies used in this manner might be subject to plain text attacks * Validation - Specifies that a validation scheme verifies that the contents of an encrypted cookie have not been changed in transit It is recommended that cookie protection mode always encrypt and validate Forms Authentication cookies. Rationale: By encrypting and validating the cookie, the confidentiality and integrity of data within the cookie is assured. This helps mitigate the risk of attacks such as session hijacking and impersonation." reference : "800-53|SC-28,800-171|3.13.16,CSF|PR.DS-1,ITSG-33|SC-28,TBA-FIISB|28.1,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "Cookie protection mode can be configured by using the user interface (UI), by running Appcmd.exe commands in a command-line window, by editing configuration files directly, or by writing WMI scripts. Using IIS Manager: 1. Open IIS Manager and navigate to the level where Forms Authentication is enabled 2. In Features View, double-click Authentication 3. On the Authentication page, select Forms Authentication 4. In the Actions pane, click Edit 5. In the Cookie settings section, verify the drop-down for Protection mode is set for Encryption and validation Default Value: When cookies are used for Forms Authentication, the default cookie protection mode is All, meaning the application encrypts and validates the cookie." value_type : POLICY_TEXT value_data : "All" appcmd_list : "list apps" appcmd_filter : "list config {} /section:system.web/authentication /text:mode" appcmd_filter_value : "Forms" appcmd_args : "list config {} /section:system.web/authentication /text:forms.protection" description : "2.5 Ensure 'cookie protection mode' is configured for forms authentication" info : "The cookie protection mode defines the protection Forms Authentication cookies will be given within a configured application. The four cookie protection modes that can be defined are: * Encryption and validation - Specifies that the application use both data validation and encryption to help protect the cookie; this option uses the configured data validation algorithm (based on the machine key) and triple-DES (3DES) for encryption, if available and if the key is long enough (48 bytes or more) * None - Specifies that both encryption and validation are disabled for sites that are using cookies only for personalization and have weaker security requirements * Encryption - Specifies that the cookie is encrypted by using Triple-DES or DES, but data validation is not performed on the cookie; cookies used in this manner might be subject to plain text attacks * Validation - Specifies that a validation scheme verifies that the contents of an encrypted cookie have not been changed in transit It is recommended that cookie protection mode always encrypt and validate Forms Authentication cookies. Rationale: By encrypting and validating the cookie, the confidentiality and integrity of data within the cookie is assured. This helps mitigate the risk of attacks such as session hijacking and impersonation. NOTE: This requires .Net Extensibility or ASPNET45 component, but neiter component was not found." reference : "CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" type : REGISTRY_SETTING description : "Verify basic authentication is installed" value_type : POLICY_DWORD value_data : 1 reg_key : "HKLM\Software\Microsoft\Inetstp\Components" reg_item : "BasicAuthentication" reg_option : CAN_NOT_BE_NULL type : AUDIT_IIS_APPCMD description : "2.6 Ensure transport layer security for 'basic authentication' is configured" info : "Basic Authentication can pass credentials across the network in clear text. It is therefore imperative that the traffic between client and server be encrypted, especially in cases where the site is publicly accessible and is recommended that TLS be configured and required for any Site or Application using Basic Authentication. Rationale: Credentials sent in clear text can be easily intercepted by malicious code or persons. Enforcing the use of Transport Layer Security will help mitigate the chances of hijacked credentials." reference : "800-53|IA-5,PCI-DSSv3.1|8.2.1,PCI-DSSv3.2|8.2.1,800-171|3.5.10,CSF|PR.AC-1,ITSG-33|IA-5,TBA-FIISB|26.1,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To protect Basic Authentication with transport layer security: 1. Open IIS Manager 2. In the Connections pane on the left, select the server to be configured 3. In the Connections pane, expand the server, then expand Sites and select the site to be configured 4. In the Actions pane, click Bindings; the Site Bindings dialog appears 5. If an HTTPS binding is available, click Close and see below 'To require SSL' 6. If no HTTPS binding is visible, perform the following steps To add an HTTPS binding: 1. In the Site Bindings dialog, click Add; the Add Site Binding dialog appears 2. Under Type, select https 3. Under SSL certificate, select an X.509 certificate 4. Click OK, then close To require SSL: 1. In Features View, double-click SSL Settings 2. On the SSL Settings page, select Require SSL. 3. In the Actions pane, click Apply Default Value: Transport Layer Security is not enabled by default when Basic Authentication is configured." value_type : POLICY_TEXT value_data : "^Ssl(,.*|)[\s]*$" appcmd_args : "list config {} /section:system.webServer/security/access /text:sslFlags" appcmd_filter : "list config {} /section:system.webServer/security/authentication/basicAuthentication /text:enabled" appcmd_filter_value : "true" appcmd_list : "list apps" check_type : CHECK_REGEX description : "2.6 Ensure transport layer security for 'basic authentication' is configured" info : "Basic Authentication can pass credentials across the network in clear text. It is therefore imperative that the traffic between client and server be encrypted, especially in cases where the site is publicly accessible and is recommended that TLS be configured and required for any Site or Application using Basic Authentication. Rationale: Credentials sent in clear text can be easily intercepted by malicious code or persons. Enforcing the use of Transport Layer Security will help mitigate the chances of hijacked credentials. NOTE: Basic Authentication has not been identified as installed on the target." reference : "CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" type : AUDIT_IIS_APPCMD description : "2.7 Ensure 'passwordFormat' is not set to clear - Default" info : "The element of the element allows optional definitions of name and password for IIS Manager User accounts within the configuration file. Forms based authentication also uses these elements to define the users. IIS Manager Users can use the administration interface to connect to sites and applications in which they've been granted authorization. Note that the element only applies when the default provider, ConfigurationAuthenticationProvider, is configured as the authentication provider. It is recommended that passwordFormat be set to a value other than Clear, such as SHA1. Rationale: Authentication credentials should always be protected to reduce the risk of stolen authentication credentials." reference : "800-53|IA-5,PCI-DSSv3.1|8.2.1,PCI-DSSv3.2|8.2.1,800-171|3.5.10,CSF|PR.AC-1,ITSG-33|IA-5,TBA-FIISB|26.1,CSCv6|16.14,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "Authentication mode is configurable at the machine.config, root-level web.config, or application-level web.config: 1. Locate and open the configuration file where the credentials are stored 2. Find the element 3. If present, ensure passwordFormat is not set to Clear 4. Change passwordFormatto SHA1 The clear text passwords will need to be replaced with the appropriate hashed version. Default Value: The default passwordFormatmethod is SHA1." value_type : POLICY_TEXT value_data : "Clear" appcmd_args : "list config /section:system.web/authentication /text:forms.credentials.passwordFormat" check_type : CHECK_NOT_EQUAL type : AUDIT_IIS_APPCMD description : "2.7 Ensure 'passwordFormat' is not set to clear - Applications" info : "The element of the element allows optional definitions of name and password for IIS Manager User accounts within the configuration file. Forms based authentication also uses these elements to define the users. IIS Manager Users can use the administration interface to connect to sites and applications in which they've been granted authorization. Note that the element only applies when the default provider, ConfigurationAuthenticationProvider, is configured as the authentication provider. It is recommended that passwordFormat be set to a value other than Clear, such as SHA1. Rationale: Authentication credentials should always be protected to reduce the risk of stolen authentication credentials." reference : "800-53|IA-5,PCI-DSSv3.1|8.2.1,PCI-DSSv3.2|8.2.1,800-171|3.5.10,CSF|PR.AC-1,ITSG-33|IA-5,TBA-FIISB|26.1,CSCv6|16.14,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "Authentication mode is configurable at the machine.config, root-level web.config, or application-level web.config: 1. Locate and open the configuration file where the credentials are stored 2. Find the element 3. If present, ensure passwordFormat is not set to Clear 4. Change passwordFormatto SHA1 The clear text passwords will need to be replaced with the appropriate hashed version. Default Value: The default passwordFormatmethod is SHA1." value_type : POLICY_TEXT value_data : "Clear" appcmd_args : "list config {} /section:system.web/authentication /text:forms.credentials.passwordFormat" appcmd_filter : "list config {} /section:system.web/authentication /text:mode" appcmd_filter_value : "Forms" appcmd_list : "list apps" check_type : CHECK_NOT_EQUAL type : REGISTRY_SETTING description : "Verify .net extensibility is installed - ASPNET45" value_type : POLICY_DWORD value_data : 1 reg_key : "HKLM\Software\Microsoft\Inetstp\Components" reg_item : "ASPNET45" reg_option : CAN_NOT_BE_NULL type : REGISTRY_SETTING description : "Verify .net extensibility is installed - NetFxExtensibility45" value_type : POLICY_DWORD value_data : 1 reg_key : "HKLM\Software\Microsoft\Inetstp\Components" reg_item : "NetFxExtensibility45" reg_option : CAN_NOT_BE_NULL type : AUDIT_IIS_APPCMD description : "3.1 Ensure 'deployment method retail' is set" info : "The switch is intended for use by production IIS servers. This switch is used to help applications run with the best possible performance and least possible security information leakages by disabling the application's ability to generate trace output on a page, disabling the ability to display detailed error messages to end users, and disabling the debug switch. Often times, switches and options that are developer-focused, such as failed request tracing and debugging, are enabled during active development. It is recommended that the deployment method on any production server be set to retail. Rationale: Utilizing the switch specifically intended for production IIS servers will eliminate the risk of vital application and system information leakages that would otherwise occur if tracing or debug were to be left enabled, or customErrors were to be left off." reference : "800-53|CM-6,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,800-171|3.4.2,CSF|PR.IP-1,ITSG-33|CM-6,CSCv6|18.9,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "1. Open the machine.config file located in: %systemroot%\\Microsoft.NET\\Framework\\\\CONFIG 2. Add the line within the section 3. If systems are 64-bit, do the same for the machine.config located in: %systemroot%\\Microsoft.NET\\Framework\\\\CONFIG Default Value: The tag is not included in the machine.config by default." value_type : POLICY_TEXT value_data : "true" appcmd_args : "list config /section:system.web/deployment /text:retail" type : AUDIT_IIS_APPCMD description : "3.4 Ensure IIS HTTP detailed errors are hidden from displaying remotely - Default" info : "A Web site's error pages are often set to show detailed error information for troubleshooting purposes during testing or initial deployment. To prevent unauthorized users from viewing this privileged information, detailed error pages must not be seen by remote users. This setting can be modified in the errorMode attribute setting for a Web site's error pages. By default, the errorMode attribute is set in the Web.config file for the Web site or application and is located in the element of the section. It is recommended that custom errors be prevented from displaying remotely. Rationale: The information contained in custom error messages can provide clues as to how applications function, opening up unnecessary attack vectors. Ensuring custom errors are never displayed remotely can help mitigate the risk of malicious persons obtaining information as to how the application works." reference : "800-53|SI-11,ITSG-33|SI-11,CSCv6|18.5,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "The following describes how to change the errorMode attribute to DetailedLocalOnly or Custom for a Web site by using IIS Manager: 1. Open IIS Manager with Administrative privileges 2. In the Connections pane on the left, expand the server, then expand the Sites folder 3. Select the Web site or application to be configured 4. In Features View, select Error Pages, in the Actions pane, select Open Feature 5. In the Actions pane, select Edit Feature Settings 6. In the Edit Error Pages Settings dialog, under Error Responses, select either Custom error pages or Detailed errors for local requests and custom error pages for remote requests 7. Click OK and exit the Edit Error Pages Settings dialog Default Value: The default errorMode is DetailedLocalOnly." value_type : POLICY_TEXT value_data : "DetailedLocalOnly" || "Custom" appcmd_args : "list config /section:system.webServer/httpErrors /text:errorMode" type : AUDIT_IIS_APPCMD description : "3.4 Ensure IIS HTTP detailed errors are hidden from displaying remotely - Applications" info : "A Web site's error pages are often set to show detailed error information for troubleshooting purposes during testing or initial deployment. To prevent unauthorized users from viewing this privileged information, detailed error pages must not be seen by remote users. This setting can be modified in the errorMode attribute setting for a Web site's error pages. By default, the errorMode attribute is set in the Web.config file for the Web site or application and is located in the element of the section. It is recommended that custom errors be prevented from displaying remotely. Rationale: The information contained in custom error messages can provide clues as to how applications function, opening up unnecessary attack vectors. Ensuring custom errors are never displayed remotely can help mitigate the risk of malicious persons obtaining information as to how the application works." reference : "800-53|SI-11,ITSG-33|SI-11,CSCv6|18.5,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "The following describes how to change the errorMode attribute to DetailedLocalOnly or Custom for a Web site by using IIS Manager: 1. Open IIS Manager with Administrative privileges 2. In the Connections pane on the left, expand the server, then expand the Sites folder 3. Select the Web site or application to be configured 4. In Features View, select Error Pages, in the Actions pane, select Open Feature 5. In the Actions pane, select Edit Feature Settings 6. In the Edit Error Pages Settings dialog, under Error Responses, select either Custom error pages or Detailed errors for local requests and custom error pages for remote requests 7. Click OK and exit the Edit Error Pages Settings dialog Default Value: The default errorMode is DetailedLocalOnly." value_type : POLICY_TEXT value_data : "DetailedLocalOnly" || "Custom" appcmd_args : "list config {} /section:system.webServer/httpErrors /text:errorMode" appcmd_list : "list apps" type : AUDIT_IIS_APPCMD description : "3.7 Ensure 'cookies' are set with HttpOnly attribute - Default" info : "The httpOnlyCookies attribute of the httpCookies node determines if IIS will set the HttpOnly flag on HTTP cookies it sets. The HttpOnly flag indicates to the user agent that the cookie must not be accessible by client-side script (i.e document.cookie). It is recommended that the httpOnlyCookies attribute be set to true. Rationale: When cookies are set with the HttpOnly flag, they cannot be accessed by client side scripting running in the user's browser. Preventing client-side scripting from accessing cookie content may reduce the probability of a cross site scripting attack materializing into a successful session hijack." reference : "800-53|AC-6,PCI-DSSv3.1|7.1.2,PCI-DSSv3.2|7.1.2,800-171|3.1.5,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CSF|PR.AC-4,CSF|PR.DS-5,ITSG-33|AC-6,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "1. Locate and open the application's web.config file 2. Add the tag within : Setting the value of the httpOnlyCookies attribute of the httpCookies element to true will add the HttpOnly flag to all the cookies set by the application. All modern versions of browsers recognize HttpOnly attribute; older versions will either treat them as normal cookies or simply ignore them altogether. Default Value: By default, ASP.NET 2.0 does not force cookies to httpOnly." value_type : POLICY_TEXT value_data : "true" appcmd_args : "list config /section:system.web/httpCookies /text:httpOnlyCookies" type : AUDIT_IIS_APPCMD description : "3.7 Ensure 'cookies' are set with HttpOnly attribute - Applications" info : "The httpOnlyCookies attribute of the httpCookies node determines if IIS will set the HttpOnly flag on HTTP cookies it sets. The HttpOnly flag indicates to the user agent that the cookie must not be accessible by client-side script (i.e document.cookie). It is recommended that the httpOnlyCookies attribute be set to true. Rationale: When cookies are set with the HttpOnly flag, they cannot be accessed by client side scripting running in the user's browser. Preventing client-side scripting from accessing cookie content may reduce the probability of a cross site scripting attack materializing into a successful session hijack." reference : "800-53|AC-6,PCI-DSSv3.1|7.1.2,PCI-DSSv3.2|7.1.2,800-171|3.1.5,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CSF|PR.AC-4,CSF|PR.DS-5,ITSG-33|AC-6,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "1. Locate and open the application's web.config file 2. Add the tag within : Setting the value of the httpOnlyCookies attribute of the httpCookies element to true will add the HttpOnly flag to all the cookies set by the application. All modern versions of browsers recognize HttpOnly attribute; older versions will either treat them as normal cookies or simply ignore them altogether. Default Value: By default, ASP.NET 2.0 does not force cookies to httpOnly." value_type : POLICY_TEXT value_data : "true" appcmd_args : "list config {} /section:system.web/httpCookies /text:httpOnlyCookies" appcmd_list : "list apps" type : REG_CHECK description : "Verify .Net 2.0 is installed" value_type : POLICY_TEXT value_data : "HKLM\Software\Microsoft\Net Framework Setup\Ndp\V2.0.50727" reg_option : MUST_EXIST type : REGISTRY_SETTING description : "Verify asp.net is installed" value_type : POLICY_DWORD value_data : 1 reg_key : "HKLM\Software\Microsoft\Net Framework Setup\Ndp\V2.0.50727" reg_item : "Install" type : AUDIT_IIS_APPCMD description : "3.10 Ensure global .NET trust level is configured - Default" info : "This only applies to .Net 2.0. Future versions have stopped supporting this feature. An application's trust level determines the permissions that are granted by the ASP.NET code access security (CAS) policy. CAS defines two trust categories: full trust and partial trust. An application that has full trust permissions may access all resource types on a server and perform privileged operations, while applications that run with partial trust have varying levels of operating permissions and access to resources. The possible values for the Level property of the TrustSection class are: * Full: Specifies unrestricted permissions and grants the ASP.NET application permissions to access any resource that is subject to operating system security; all privileged operations are supported * High: specifies a high level of code access security which limits the application from doing the following: o Call unmanaged code o Call serviced components o Write to the event log o Access Microsoft Windows Message Queuing queues o Access ODBC, OLD DB, or Oracle data sources * Medium: specifies a medium level of code access security, which means that in addition to the restrictions for High, the ASP.NET application cannot do any of the following things: o Access files outside the application directory o Access the registry * Low: specifies a low level of code access security, which means that in addition to the restrictions for Medium, the application is prevented from performing any of the following actions: o Write to the file system o Call the System.Security.CodeAccessPermission.Assert method to expand permissions to resources o Minimal: specifies a minimal level of code access security, which means that the application has only execute permission It is recommended that the global .NET Trust Level be set to Medium or lower. Rationale: The CAS determines the permissions that are granted to the application on the server. Setting a minimal level of trust that is compatible with the applications will limit the potential harm that a compromised application could cause to a system." reference : "800-53|AC-6,PCI-DSSv3.1|7.1.2,PCI-DSSv3.2|7.1.2,800-171|3.1.5,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CSF|PR.AC-4,CSF|PR.DS-5,ITSG-33|AC-6,CSCv6|14.4,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "Trust level can be set by using the UI, running appcmd.exe commands, by editing configuration files directly, or by writing WMI scripts. To set the .Net Trust Level to Medium at the server level using an appcmd.exe command: %systemroot%\system32\inetsrv\appcmd set config /commit:WEBROOT /section:trust /level:Medium When Appcmd.exe is used to configure the element at the global level in IIS, the /commit:WEBROOT switch must be included so that configuration changes are made to the root web.config file instead of ApplicationHost.config. Default Value: By default, ASP.NET web applications run under the full trust setting." value_type : POLICY_TEXT value_data : "^(Medium|Low|Minimal)[\s]*$" appcmd_args : "list config /section:trust /text:level" check_type : CHECK_REGEX type : AUDIT_IIS_APPCMD description : "3.10 Ensure global .NET trust level is configured - Applications" info : "This only applies to .Net 2.0. Future versions have stopped supporting this feature. An application's trust level determines the permissions that are granted by the ASP.NET code access security (CAS) policy. CAS defines two trust categories: full trust and partial trust. An application that has full trust permissions may access all resource types on a server and perform privileged operations, while applications that run with partial trust have varying levels of operating permissions and access to resources. The possible values for the Level property of the TrustSection class are: * Full: Specifies unrestricted permissions and grants the ASP.NET application permissions to access any resource that is subject to operating system security; all privileged operations are supported * High: specifies a high level of code access security which limits the application from doing the following: o Call unmanaged code o Call serviced components o Write to the event log o Access Microsoft Windows Message Queuing queues o Access ODBC, OLD DB, or Oracle data sources * Medium: specifies a medium level of code access security, which means that in addition to the restrictions for High, the ASP.NET application cannot do any of the following things: o Access files outside the application directory o Access the registry * Low: specifies a low level of code access security, which means that in addition to the restrictions for Medium, the application is prevented from performing any of the following actions: o Write to the file system o Call the System.Security.CodeAccessPermission.Assert method to expand permissions to resources o Minimal: specifies a minimal level of code access security, which means that the application has only execute permission It is recommended that the global .NET Trust Level be set to Medium or lower. Rationale: The CAS determines the permissions that are granted to the application on the server. Setting a minimal level of trust that is compatible with the applications will limit the potential harm that a compromised application could cause to a system." reference : "800-53|AC-6,PCI-DSSv3.1|7.1.2,PCI-DSSv3.2|7.1.2,800-171|3.1.5,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CSF|PR.AC-4,CSF|PR.DS-5,ITSG-33|AC-6,CSCv6|14.4,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "Trust level can be set by using the UI, running appcmd.exe commands, by editing configuration files directly, or by writing WMI scripts. To set the .Net Trust Level to Medium at the server level using an appcmd.exe command: %systemroot%\system32\inetsrv\appcmd set config /commit:WEBROOT /section:trust /level:Medium When Appcmd.exe is used to configure the element at the global level in IIS, the /commit:WEBROOT switch must be included so that configuration changes are made to the root web.config file instead of ApplicationHost.config. Default Value: By default, ASP.NET web applications run under the full trust setting." value_type : POLICY_TEXT value_data : "^(Medium|Low|Minimal)[\s]*$" appcmd_args : "list config {} /section:trust /text:level" appcmd_list : "list apps" check_type : CHECK_REGEX description : "3.10 Ensure global .NET trust level is configured - Applications" info : "This only applies to .Net 2.0. Future versions have stopped supporting this feature. An application's trust level determines the permissions that are granted by the ASP.NET code access security (CAS) policy. CAS defines two trust categories: full trust and partial trust. An application that has full trust permissions may access all resource types on a server and perform privileged operations, while applications that run with partial trust have varying levels of operating permissions and access to resources. The possible values for the Level property of the TrustSection class are: * Full: Specifies unrestricted permissions and grants the ASP.NET application permissions to access any resource that is subject to operating system security; all privileged operations are supported * High: specifies a high level of code access security which limits the application from doing the following: o Call unmanaged code o Call serviced components o Write to the event log o Access Microsoft Windows Message Queuing queues o Access ODBC, OLD DB, or Oracle data sources * Medium: specifies a medium level of code access security, which means that in addition to the restrictions for High, the ASP.NET application cannot do any of the following things: o Access files outside the application directory o Access the registry * Low: specifies a low level of code access security, which means that in addition to the restrictions for Medium, the application is prevented from performing any of the following actions: o Write to the file system o Call the System.Security.CodeAccessPermission.Assert method to expand permissions to resources o Minimal: specifies a minimal level of code access security, which means that the application has only execute permission It is recommended that the global .NET Trust Level be set to Medium or lower. Rationale: The CAS determines the permissions that are granted to the application on the server. Setting a minimal level of trust that is compatible with the applications will limit the potential harm that a compromised application could cause to a system." reference : "CSCv6|14.4,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" description : "3.1 Ensure 'deployment method retail' is set" info : "The switch is intended for use by production IIS servers. This switch is used to help applications run with the best possible performance and least possible security information leakages by disabling the application's ability to generate trace output on a page, disabling the ability to display detailed error messages to end users, and disabling the debug switch. Often times, switches and options that are developer-focused, such as failed request tracing and debugging, are enabled during active development. It is recommended that the deployment method on any production server be set to retail. Rationale: Utilizing the switch specifically intended for production IIS servers will eliminate the risk of vital application and system information leakages that would otherwise occur if tracing or debug were to be left enabled, or customErrors were to be left off. NOTE: This section requires ASP.NET, but ASPNET45 and .Net Extensibility have not been found." reference : "CSCv6|18.9,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" description : "3.4 Ensure IIS HTTP detailed errors are hidden from displaying remotely - Applications" info : "A Web site's error pages are often set to show detailed error information for troubleshooting purposes during testing or initial deployment. To prevent unauthorized users from viewing this privileged information, detailed error pages must not be seen by remote users. This setting can be modified in the errorMode attribute setting for a Web site's error pages. By default, the errorMode attribute is set in the Web.config file for the Web site or application and is located in the element of the section. It is recommended that custom errors be prevented from displaying remotely. Rationale: The information contained in custom error messages can provide clues as to how applications function, opening up unnecessary attack vectors. Ensuring custom errors are never displayed remotely can help mitigate the risk of malicious persons obtaining information as to how the application works. NOTE: This section requires ASP.NET, but ASPNET45 and .Net Extensibility have not been found." reference : "CSCv6|18.5,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" description : "3.7 Ensure 'cookies' are set with HttpOnly attribute - Applications" info : "The httpOnlyCookies attribute of the httpCookies node determines if IIS will set the HttpOnly flag on HTTP cookies it sets. The HttpOnly flag indicates to the user agent that the cookie must not be accessible by client-side script (i.e document.cookie). It is recommended that the httpOnlyCookies attribute be set to true. Rationale: When cookies are set with the HttpOnly flag, they cannot be accessed by client side scripting running in the user's browser. Preventing client-side scripting from accessing cookie content may reduce the probability of a cross site scripting attack materializing into a successful session hijack. NOTE: This section requires ASP.NET, but ASPNET45 and .Net Extensibility have not been found." reference : "CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" description : "3.9 Ensure 'MachineKey validation method - .Net 4.5' is configured - Applications" info : "The machineKey element of the ASP.NET web.config specifies the algorithm and keys that ASP.NET will use for encryption. The Machine Key feature can be managed to specify hashing and encryption settings for application services such as view state, Forms authentication, membership and roles, and anonymous identification. The following validation methods are available: * Advanced Encryption Standard (AES) is relatively easy to implement and requires little memory. AES has a key size of 128, 192, or 256 bits. This method uses the same private key to encrypt and decrypt data, whereas a public-key method must use a pair of keys * Message Digest 5 (MD5) is used for digital signing of applications. This method produces a 128-bit message digest, which is a compressed form of the original data * Secure Hash Algorithm (SHA1) is considered more secure than MD5 because it produces a 160-bit message digest * Triple Data Encryption Standard (TripleDES) is a minor variation of Data Encryption Standard (DES). It is three times slower than regular DES but can be more secure because it has a key size of 192 bits. If performance is not a primary consideration, consider using TripleDES * Secure Hash Algorithm (SHA-2) is a family of two similar hash functions, with different block sizes known as SHA-256 and SHA-512. They differ in the word size; SHAS-256 used 32-bit words and SHA-512 uses 64-bit words. It is recommended that SHA-2 methods be configured for use at the global level. Rationale: SHA-2 is the strongest hashing algorithm supported by the validation property so it should be used as the validation method for the MachineKey in .Net 4.5. NOTE: This section requires ASP.NET, but ASPNET45 and .Net Extensibility have not been found." reference : "CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" type : AUDIT_IIS_APPCMD description : "4.5 Ensure Double-Encoded requests will be rejected - Default" info : "This Request Filter feature prevents attacks that rely on double-encoded requests and applies if an attacker submits a double-encoded request to IIS. When the double-encoded requests filter is enabled, IIS will go through a two iteration process of normalizing the request. If the first normalization differs from the second, the request is rejected and the error code is logged as a 404.11. The double-encoded requests filter was the VerifyNormalization option in UrlScan. It is recommended that double-encoded requests be rejected. Rationale: This feature will help prevent attacks that rely on URLs that have been crafted to contain double-encoded request(s)." reference : "800-53|CM-6,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,800-171|3.4.2,CSF|PR.IP-1,ITSG-33|CM-6,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "The allowDoubleEscaping Request Filter may be set for a server, website, or application using the IIS Manager GUI, using AppCmd.exe commands in a command-line window, and/or directly editing the configuration files. To configure using the IIS Manager GUI: 1. Open Internet Information Services (IIS) Manager 2. In the Connections pane, select the site, application, or directory to be configured 3. In the Home pane, double-click Request Filtering 4. Click Edit Feature Settings... in the Actions pane 5. Under the General section, uncheck Allow double escaping If a file name in a URL includes '+' then allowDoubleEscaping must be set to true to allow functionality. To set this Request Filter using an AppCmd.exe command, run the following command at an elevated command prompt: %systemroot%\system32\inetsrv\appcmd set config /section:requestfiltering /allowDoubleEscaping:false Default Value: When Request Filtering is installed on a system, the default behavior is to not allow double-encoded requests." value_type : POLICY_TEXT value_data : "false" appcmd_args : "list config /section:system.webServer/security/requestFiltering /text:allowDoubleEscaping" type : AUDIT_IIS_APPCMD description : "4.5 Ensure Double-Encoded requests will be rejected - Applications" info : "This Request Filter feature prevents attacks that rely on double-encoded requests and applies if an attacker submits a double-encoded request to IIS. When the double-encoded requests filter is enabled, IIS will go through a two iteration process of normalizing the request. If the first normalization differs from the second, the request is rejected and the error code is logged as a 404.11. The double-encoded requests filter was the VerifyNormalization option in UrlScan. It is recommended that double-encoded requests be rejected. Rationale: This feature will help prevent attacks that rely on URLs that have been crafted to contain double-encoded request(s)." reference : "800-53|CM-6,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,800-171|3.4.2,CSF|PR.IP-1,ITSG-33|CM-6,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "The allowDoubleEscaping Request Filter may be set for a server, website, or application using the IIS Manager GUI, using AppCmd.exe commands in a command-line window, and/or directly editing the configuration files. To configure using the IIS Manager GUI: 1. Open Internet Information Services (IIS) Manager 2. In the Connections pane, select the site, application, or directory to be configured 3. In the Home pane, double-click Request Filtering 4. Click Edit Feature Settings... in the Actions pane 5. Under the General section, uncheck Allow double escaping If a file name in a URL includes '+' then allowDoubleEscaping must be set to true to allow functionality. To set this Request Filter using an AppCmd.exe command, run the following command at an elevated command prompt: %systemroot%\system32\inetsrv\appcmd set config /section:requestfiltering /allowDoubleEscaping:false Default Value: When Request Filtering is installed on a system, the default behavior is to not allow double-encoded requests." value_type : POLICY_TEXT value_data : "false" appcmd_args : "list config {} /section:system.webServer/security/requestFiltering /text:allowDoubleEscaping" appcmd_list : "list apps" type : AUDIT_IIS_APPCMD description : "4.6 Ensure 'HTTP Trace Method' is disabled - Default" info : "The HTTP TRACE method returns the contents of client HTTP requests in the entity-body of the TRACE response. Attackers could leverage this behavior to access sensitive information, such as authentication data or cookies, contained in the HTTP headers of the request. One such way to mitigate this is by using the element of the collection. The element replaces the [AllowVerbs] and [DenyVerbs] features in UrlScan. It is recommended the HTTP TRACE method be denied. Rationale: Attackers may abuse HTTP TRACE functionality to gain access to information in HTTP headers such as cookies and authentication data. This risk can be mitigated by not allowing the TRACE verb." reference : "800-53|CM-6,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,800-171|3.4.2,CSF|PR.IP-1,ITSG-33|CM-6,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "1. Open Internet Information Services (IIS) Manager 2. In the Connections pane, select the site, application, or directory to be configured 3. In the Home pane, double-click Request Filtering 4. In the Request Filtering pane, click the HTTP verbs tab, and then click Deny Verb... in the Actions pane 5. In the Deny Verb dialog box, enter the TRACE, and then click OK To set this Request Filter using an AppCmd.exe command, run the following command at an elevated command prompt: %systemroot%\system32\inetsrv\appcmd set config /section:requestfiltering /+verbs.[verb='TRACE',allowed='false'] Default Value: The TRACE verb is not filtered by default." value_type : POLICY_TEXT value_data : "" appcmd_args : "list config /section:system.webServer/security/requestFiltering /xml:*" check_type : CHECK_REGEX type : AUDIT_IIS_APPCMD description : "4.6 Ensure 'HTTP Trace Method' is disabled - Applications" info : "The HTTP TRACE method returns the contents of client HTTP requests in the entity-body of the TRACE response. Attackers could leverage this behavior to access sensitive information, such as authentication data or cookies, contained in the HTTP headers of the request. One such way to mitigate this is by using the element of the collection. The element replaces the [AllowVerbs] and [DenyVerbs] features in UrlScan. It is recommended the HTTP TRACE method be denied. Rationale: Attackers may abuse HTTP TRACE functionality to gain access to information in HTTP headers such as cookies and authentication data. This risk can be mitigated by not allowing the TRACE verb." reference : "800-53|CM-6,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,800-171|3.4.2,CSF|PR.IP-1,ITSG-33|CM-6,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "1. Open Internet Information Services (IIS) Manager 2. In the Connections pane, select the site, application, or directory to be configured 3. In the Home pane, double-click Request Filtering 4. In the Request Filtering pane, click the HTTP verbs tab, and then click Deny Verb... in the Actions pane 5. In the Deny Verb dialog box, enter the TRACE, and then click OK To set this Request Filter using an AppCmd.exe command, run the following command at an elevated command prompt: %systemroot%\system32\inetsrv\appcmd set config /section:requestfiltering /+verbs.[verb='TRACE',allowed='false'] Default Value: The TRACE verb is not filtered by default." value_type : POLICY_TEXT value_data : "" appcmd_args : "list config /section:system.webServer/security/requestFiltering /xml:*" appcmd_list : "list apps" check_type : CHECK_REGEX type : AUDIT_IIS_APPCMD description : "4.7 Ensure Unlisted ob体育 Extensions are not allowed - Default" info : "The ob体育Extensions Request Filter allows administrators to define specific extensions their web server(s) will allow and disallow. The property allowUnlisted will cover all other file extensions not explicitly allowed or denied. Often times, extensions such as .config, .bat, .exe, to name a few, should never be served. The AllowExtensions and DenyExtensions options are the UrlScan equivalents. It is recommended that all extensions be unallowed at the most global level possible, with only those necessary being allowed. Rationale: Disallowing all but the necessary file extensions can greatly reduce the attack surface of applications and servers." reference : "800-53|CM-7,800-171|3.4.8,CSF|PR.IP-1,CSF|PR.PT-3,ISO/IEC-27001|A.12.6.2,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "The allowUnlisted Request Filter may be set for a server, website, or application using the IIS Manager GUI, using AppCmd.exe commands in a command-line window, and/or directly editing the configuration files. To configure at the server level using the IIS Manager GUI: 1. Open Internet Information Services (IIS) Manager 2. In the Connections pane, select the server 3. In the Home pane, double-click Request Filtering 4. Click Edit Feature Settings... in the Actions pane 5. Under the General section, uncheck Allow unlisted file name extensions To set this Request Filter using an AppCmd.exe command, run the following command at an elevated command prompt: %systemroot%\system32\inetsrv\appcmd set config /section:requestfiltering /fileExtensions.allowunlisted:false Default Value: The default Request Filtering configuration allows all unlisted file extensions to be requested." value_type : POLICY_TEXT value_data : "false" appcmd_args : "list config /section:system.webServer/security/requestFiltering /text:fileExtensions.allowUnlisted" type : AUDIT_IIS_APPCMD description : "4.7 Ensure Unlisted ob体育 Extensions are not allowed - Applications" info : "The ob体育Extensions Request Filter allows administrators to define specific extensions their web server(s) will allow and disallow. The property allowUnlisted will cover all other file extensions not explicitly allowed or denied. Often times, extensions such as .config, .bat, .exe, to name a few, should never be served. The AllowExtensions and DenyExtensions options are the UrlScan equivalents. It is recommended that all extensions be unallowed at the most global level possible, with only those necessary being allowed. Rationale: Disallowing all but the necessary file extensions can greatly reduce the attack surface of applications and servers." reference : "800-53|CM-7,800-171|3.4.8,CSF|PR.IP-1,CSF|PR.PT-3,ISO/IEC-27001|A.12.6.2,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "The allowUnlisted Request Filter may be set for a server, website, or application using the IIS Manager GUI, using AppCmd.exe commands in a command-line window, and/or directly editing the configuration files. To configure at the server level using the IIS Manager GUI: 1. Open Internet Information Services (IIS) Manager 2. In the Connections pane, select the server 3. In the Home pane, double-click Request Filtering 4. Click Edit Feature Settings... in the Actions pane 5. Under the General section, uncheck Allow unlisted file name extensions To set this Request Filter using an AppCmd.exe command, run the following command at an elevated command prompt: %systemroot%\system32\inetsrv\appcmd set config /section:requestfiltering /fileExtensions.allowunlisted:false Default Value: The default Request Filtering configuration allows all unlisted file extensions to be requested." value_type : POLICY_TEXT value_data : "false" appcmd_args : "list config {} /section:system.webServer/security/requestFiltering /text:fileExtensions.allowUnlisted" appcmd_list : "list apps" type : AUDIT_IIS_APPCMD description : "4.8 Ensure Handler is not granted Write and Script/Execute - Default" info : "Handler mappings can be configured to give permissions to Read, Write, Script, or Execute depending on what the use is for - reading static content, uploading files, executing scripts, etc. It is recommended to grant a handler either Execute/``Script or Write permissions, but not both. Rationale: By allowing both Execute/_Script_ and Write permissions, a handler can run malicious code on the target server. Ensuring these two permissions are never together will help lower the risk of malicious code being executed on the server." reference : "800-53|AC-6,PCI-DSSv3.1|7.1.2,PCI-DSSv3.2|7.1.2,800-171|3.1.5,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CSF|PR.AC-4,CSF|PR.DS-5,ITSG-33|AC-6,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "The accessPolicy attribute in the section of either the ApplicationHost.config (server-wide) or web.config (site or application) must not have Write present when Script or Execute are present. To resolve this issue for a Web server, the attribute in the section of the ApplicationHost.config file for the server must manually be edited. To edit the ApplicationHost.config file by using Notepad, perform the following steps: 1. Open Notepad as Administrator 2. Open the ApplicationHost.config file in %systemroot%\\system32\\inetsrv\\config 3. Edit the section accessPolicy attribute so that Write is not present when Script or Execute are present To set this Request Filter using an AppCmd.exe command, run the following command at an elevated command prompt: %systemroot%\system32\inetsrv\appcmd set config /section:handlers /accessPolicy:Read,Script Note: This configuration change cannot be made by using IIS Manager. Default Value: The default handlers accessPolicy is Read, Script." value_type : POLICY_TEXT value_data : "Write.*[\s](Execute|Script).*[\s]*$" appcmd_args : "list config /section:system.webServer/handlers /text:accessPolicy" check_type : CHECK_NOT_REGEX type : AUDIT_IIS_APPCMD description : "4.8 Ensure Handler is not granted Write and Script/Execute - Applications" info : "Handler mappings can be configured to give permissions to Read, Write, Script, or Execute depending on what the use is for - reading static content, uploading files, executing scripts, etc. It is recommended to grant a handler either Execute/``Script or Write permissions, but not both. Rationale: By allowing both Execute/_Script_ and Write permissions, a handler can run malicious code on the target server. Ensuring these two permissions are never together will help lower the risk of malicious code being executed on the server." reference : "800-53|AC-6,PCI-DSSv3.1|7.1.2,PCI-DSSv3.2|7.1.2,800-171|3.1.5,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CSF|PR.AC-4,CSF|PR.DS-5,ITSG-33|AC-6,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "The accessPolicy attribute in the section of either the ApplicationHost.config (server-wide) or web.config (site or application) must not have Write present when Script or Execute are present. To resolve this issue for a Web server, the attribute in the section of the ApplicationHost.config file for the server must manually be edited. To edit the ApplicationHost.config file by using Notepad, perform the following steps: 1. Open Notepad as Administrator 2. Open the ApplicationHost.config file in %systemroot%\\system32\\inetsrv\\config 3. Edit the section accessPolicy attribute so that Write is not present when Script or Execute are present To set this Request Filter using an AppCmd.exe command, run the following command at an elevated command prompt: %systemroot%\system32\inetsrv\appcmd set config /section:handlers /accessPolicy:Read,Script Note: This configuration change cannot be made by using IIS Manager. Default Value: The default handlers accessPolicy is Read, Script." value_type : POLICY_TEXT value_data : "Write.*[\s](Execute|Script).*[\s]*$" appcmd_args : "list config {} /section:system.webServer/handlers /text:accessPolicy" appcmd_list : "list apps" check_type : CHECK_NOT_REGEX type : AUDIT_IIS_APPCMD description : "4.9 Ensure 'notListedIsapisAllowed' is set to false" info : "The notListedIsapisAllowed attribute is a server-level setting that is located in the ApplicationHost.config file in the element of the section under . This element ensures that malicious users cannot copy unauthorized ISAPI binaries to the Web server and then run them. It is recommended that notListedIsapisAllowed be set to false. Rationale: Restricting this attribute to falsewill help prevent potentially malicious ISAPI extensions from being run." reference : "800-53|SC-18,800-171|3.13.13,CSF|DE.CM-5,ITSG-33|SC-18,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To use IIS Manager to set the notListedIsapisAllowed attribute to false: 1. Open IIS Manager as Administrator 2. In the Connections pane on the left, select server to be configured 3. In Features View, select ISAPI and CGI Restrictions; in the Actions pane, select Open Feature 4. In the Actions pane, select Edit Feature Settings 5. In the Edit ISAPI and CGI Restrictions Settings dialog, clear the Allow unspecified ISAPI modules check box, if checked 6. Click OK To set this Request Filter using an AppCmd.exe command, run the following command at an elevated command prompt: %systemroot%\system32\inetsrv\appcmd.exe set config -section:system.webServer/security/isapiCgiRestriction /notListedIsapisAllowed:false Default Value: The default value for notListedIsapisAllowed is false." value_type : POLICY_TEXT value_data : "false" appcmd_args : "list config /section:system.webServer/security/isapiCgiRestriction /text:notListedIsapisAllowed" type : AUDIT_IIS_APPCMD description : "4.10 Ensure 'notListedCgisAllowed' is set to false" info : "The notListedCgisAllowed attribute is a server-level setting that is located in the ApplicationHost.config file in the element of the section under . This element ensures that malicious users cannot copy unauthorized CGI binaries to the Web server and then run them. It is recommended that notListedCgisAllowed be set to false. Rationale: Restricting this attribute to false will help prevent unlisted CGI extensions, including potentially malicious CGI scripts from being run." reference : "800-53|SC-18,800-171|3.13.13,CSF|DE.CM-5,ITSG-33|SC-18,CSCv6|18,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To set the notListedCgisAllowed attribute to false using IIS Manager: 1. Open IIS Manager as Administrator 2. In the Connections pane on the left, select the server to configure 3. In Features View, select ISAPI and CGI Restrictions; in the Actions pane, select Open Feature 4. In the Actions pane, select Edit Feature Settings 5. In the Edit ISAPI and CGI Restrictions Settings dialog, clear the Allow unspecified CGI modules check box 6. Click OK To set this Request Filter using an AppCmd.exe command, run the following command at an elevated command prompt: %systemroot%\system32\inetsrv\appcmd.exe set config -section:system.webServer/security/isapiCgiRestriction /notListedCgisAllowed:false Default Value: The default value for notListedCgisAllowed is false." value_type : POLICY_TEXT value_data : "false" appcmd_args : "list config /section:system.webServer/security/isapiCgiRestriction /text:notListedCgisAllowed" type : REGISTRY_SETTING description : "Verify IP Security is installed" value_type : POLICY_DWORD value_data : 1 reg_key : "HKLM\Software\Microsoft\Inetstp\Components" reg_item : "IPSecurity" reg_option : CAN_NOT_BE_NULL type : AUDIT_IIS_APPCMD description : "4.11 Ensure 'Dynamic IP Address Restrictions' is enabled - Deny By Request Rate" info : "IIS Dynamic IP Address Restrictions capability can be used to thwart DDos attacks. This is complimentary to the IP Addresses and Domain names Restrictions lists that can be manually maintained within IIS. In contrast, Dynamic IP address filtering allows administrators to configure the server to block access for IPs that exceed the specified request threshold. The default action Deny action for restrictions is to return a Forbidden response to the client. Rationale: Dynamic IP address filtering allows administrators to configure the server to block access for IPs that exceed the specified number of requests or requests frequency. Ensure that you receive the Forbidden page once the block has been enforced." reference : "800-53|SC-5,CSF|DE.CM-1,CSF|PR.DS-4,ITSG-33|SC-5,CSCv6|9.6,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "1. Open IIS Manager. 2. Open the IP Address and Domain Restrictions feature. 3. Click Edit Dynamic Restrictions Settings.. 4. Check the Deny IP Address based on the number of concurrent requests and the Deny IP Address based on the number of requests over a period of time boxes. The values can be tweaked as needed for your specific environment. Default Value: By default Dynamic IP Restrictions are not enabled." value_type : POLICY_TEXT value_data : "true" appcmd_args : "list config /section:system.webServer/security/dynamicIpSecurity /text:denyByRequestRate.enabled" type : AUDIT_IIS_APPCMD description : "4.11 Ensure 'Dynamic IP Address Restrictions' is enabled - Deny By Concurrent Requests" info : "IIS Dynamic IP Address Restrictions capability can be used to thwart DDos attacks. This is complimentary to the IP Addresses and Domain names Restrictions lists that can be manually maintained within IIS. In contrast, Dynamic IP address filtering allows administrators to configure the server to block access for IPs that exceed the specified request threshold. The default action Deny action for restrictions is to return a Forbidden response to the client. Rationale: Dynamic IP address filtering allows administrators to configure the server to block access for IPs that exceed the specified number of requests or requests frequency. Ensure that you receive the Forbidden page once the block has been enforced." reference : "800-53|SC-5,CSF|DE.CM-1,CSF|PR.DS-4,ITSG-33|SC-5,CSCv6|9.6,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "1. Open IIS Manager. 2. Open the IP Address and Domain Restrictions feature. 3. Click Edit Dynamic Restrictions Settings.. 4. Check the Deny IP Address based on the number of concurrent requests and the Deny IP Address based on the number of requests over a period of time boxes. The values can be tweaked as needed for your specific environment. Default Value: By default Dynamic IP Restrictions are not enabled." value_type : POLICY_TEXT value_data : "true" appcmd_args : "list config /section:system.webServer/security/dynamicIpSecurity /text:denyByConcurrentRequests.enabled" type : AUDIT_IIS_APPCMD description : "If deny by concurrent requests, then confirm Blocking" value_type : POLICY_TEXT value_data : "true" appcmd_args : "list config /section:system.webServer/security/dynamicIpSecurity /text:denyByConcurrentRequests.enabled" type : AUDIT_IIS_APPCMD description : "If deny by request rate, then confirm Blocking" value_type : POLICY_TEXT value_data : "true" appcmd_args : "list config /section:system.webServer/security/dynamicIpSecurity /text:denyByRequestRate.enabled" type : AUDIT_IIS_APPCMD description : "4.11 Ensure 'Dynamic IP Address Restrictions' is enabled - Not Logging Only Mode" info : "IIS Dynamic IP Address Restrictions capability can be used to thwart DDos attacks. This is complimentary to the IP Addresses and Domain names Restrictions lists that can be manually maintained within IIS. In contrast, Dynamic IP address filtering allows administrators to configure the server to block access for IPs that exceed the specified request threshold. The default action Deny action for restrictions is to return a Forbidden response to the client. Rationale: Dynamic IP address filtering allows administrators to configure the server to block access for IPs that exceed the specified number of requests or requests frequency. Ensure that you receive the Forbidden page once the block has been enforced." reference : "800-53|SC-5,CSF|DE.CM-1,CSF|PR.DS-4,ITSG-33|SC-5,CSCv6|9.6,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "1. Open IIS Manager. 2. Open the IP Address and Domain Restrictions feature. 3. Click Edit Dynamic Restrictions Settings.. 4. Check the Deny IP Address based on the number of concurrent requests and the Deny IP Address based on the number of requests over a period of time boxes. The values can be tweaked as needed for your specific environment. Default Value: By default Dynamic IP Restrictions are not enabled." value_type : POLICY_TEXT value_data : "false" appcmd_args : "list config /section:system.webServer/security/dynamicIpSecurity /text:enableLoggingOnlyMode" description : "4.11 Ensure 'Dynamic IP Address Restrictions' is enabled - Deny By Concurrent Requests" info : "IIS Dynamic IP Address Restrictions capability can be used to thwart DDos attacks. This is complimentary to the IP Addresses and Domain names Restrictions lists that can be manually maintained within IIS. In contrast, Dynamic IP address filtering allows administrators to configure the server to block access for IPs that exceed the specified request threshold. The default action Deny action for restrictions is to return a Forbidden response to the client. Rationale: Dynamic IP address filtering allows administrators to configure the server to block access for IPs that exceed the specified number of requests or requests frequency. Ensure that you receive the Forbidden page once the block has been enforced." reference : "CSCv6|9.6,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "1. Open IIS Manager. 2. Open the IP Address and Domain Restrictions feature. 3. Click Edit Dynamic Restrictions Settings.. 4. Check the Deny IP Address based on the number of concurrent requests and the Deny IP Address based on the number of requests over a period of time boxes. The values can be tweaked as needed for your specific environment. Default Value: By default Dynamic IP Restrictions are not enabled." type : AUDIT_IIS_APPCMD description : "5.1 Ensure Default IIS web log location is moved" info : "IIS will log relatively detailed information on every request. These logs are usually the first item looked at in a security response, and can be the most valuable. Malicious users are aware of this, and will often try to remove evidence of their activities. It is therefore recommended that the default location for IIS log files be changed to a restricted, non-system drive. Rationale: Moving IIS logging to a restricted, non-system drive will help mitigate the risk of logs being maliciously altered, removed, or lost in the event of system drive failure(s)." reference : "800-53|AU-9,800-171|3.3.8,CN-L3|7.1.2.3(d),CN-L3|7.1.3.3(f),CSF|PR.PT-1,ISO/IEC-27001|A.12.4.2,ITSG-33|AU-9,CSCv6|6.3,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "Moving the default log location can be easily accomplished using the Logging feature in the IIS Management UI or AppCmd.exe. To change to D:\Logob体育s using AppCmd.exe: %systemroot%\system32\inetsrv\appcmd set config -section:sites -siteDefaults.logfile.directory:'D:\Logob体育s' Moving log file stores to a non-system drive or partition separate from where web applications run and/or content is served is preferred. Additionally, folder-level NTFS permissions should be set as restrictive as possible; Administrators and SYSTEM are typically the only principals requiring access. While standard IIS logs can be moved and edited using IIS Manager, additional management tool add-ons are required in order to manage logs generated by other IIS features, such as Request Filtering and IIS Advanced Logging. These add-ons can be obtained using the Web Platform Installer or from Microsoft's site. The HTTPErr logging location can be changed by adding a registry key. Default Value: The default location for web logs in IIS is: %SystemDrive%\inetpub\logs\Logob体育s." value_type : POLICY_TEXT value_data : "^(\%SystemDrive\%|C:)" appcmd_args : "list config /section:system.applicationHost/sites /text:siteDefaults.logfile.directory" check_type : CHECK_NOT_REGEX type : AUDIT_IIS_APPCMD description : "Verify log format is W3c" value_type : POLICY_TEXT value_data : "W3C" appcmd_args : "list config /section:system.applicationHost/sites /text:siteDefaults.logfile.logFormat" type : AUDIT_IIS_APPCMD description : "5.3 Ensure 'ETW Logging' is enabled - Default ETW" info : "IIS introduces a new logging method. Administrators can now send logging information to Event Tracing for Windows (ETW) Rationale: IIS flushes log information to disk, therefore prior to IIS, administrators do not have access to real-time logging information. Text-based log files can also be difficult and time consuming to process. By enabling ETW, administrators have access to use standard query tools for viewing real-time logging information." reference : "800-53|AU-3,PCI-DSSv3.1|10.3,PCI-DSSv3.2|10.3,800-171|3.3.1,800-171|3.3.2,CN-L3|7.1.2.3(a),CN-L3|7.1.2.3(b),CN-L3|7.1.3.3(a),CSF|PR.PT-1,ITSG-33|AU-3,CSCv6|6.6,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To configure ETW logging: 1. Open IIS Manager 2. Select the server or site to enable ETW 3. Select Logging. 4. Ensure Log file format is W3C. 5. Select Both log file and ETW event 6. Save your settings." value_type : POLICY_TEXT value_data : "^.*ETW.*[\s]*$" appcmd_args : "list config /section:system.applicationHost/sites /text:siteDefaults.logfile.logTargetW3C" check_type : CHECK_REGEX type : AUDIT_IIS_APPCMD description : "5.3 Ensure 'ETW Logging' is enabled - Default W3C" info : "IIS introduces a new logging method. Administrators can now send logging information to Event Tracing for Windows (ETW) Rationale: IIS flushes log information to disk, therefore prior to IIS, administrators do not have access to real-time logging information. Text-based log files can also be difficult and time consuming to process. By enabling ETW, administrators have access to use standard query tools for viewing real-time logging information." reference : "800-53|AU-3,PCI-DSSv3.1|10.3,PCI-DSSv3.2|10.3,800-171|3.3.1,800-171|3.3.2,CN-L3|7.1.2.3(a),CN-L3|7.1.2.3(b),CN-L3|7.1.3.3(a),CSF|PR.PT-1,ITSG-33|AU-3,CSCv6|6.6,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To configure ETW logging: 1. Open IIS Manager 2. Select the server or site to enable ETW 3. Select Logging. 4. Ensure Log file format is W3C. 5. Select Both log file and ETW event 6. Save your settings." value_type : POLICY_TEXT value_data : "W3C" appcmd_args : "list config /section:system.applicationHost/sites /text:siteDefaults.logfile.logFormat" type : AUDIT_IIS_APPCMD description : "5.3 Ensure 'ETW Logging' is enabled - Sites logFormat W3C with ETW target" info : "IIS introduces a new logging method. Administrators can now send logging information to Event Tracing for Windows (ETW) Rationale: IIS flushes log information to disk, therefore prior to IIS, administrators do not have access to real-time logging information. Text-based log files can also be difficult and time consuming to process. By enabling ETW, administrators have access to use standard query tools for viewing real-time logging information." reference : "800-53|AU-3,PCI-DSSv3.1|10.3,PCI-DSSv3.2|10.3,800-171|3.3.1,800-171|3.3.2,CN-L3|7.1.2.3(a),CN-L3|7.1.2.3(b),CN-L3|7.1.3.3(a),CSF|PR.PT-1,ITSG-33|AU-3,CSCv6|6.6,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To configure ETW logging: 1. Open IIS Manager 2. Select the server or site to enable ETW 3. Select Logging. 4. Ensure Log file format is W3C. 5. Select Both log file and ETW event 6. Save your settings." value_type : POLICY_TEXT value_data : "^.*ETW.*[\s]*$" appcmd_args : "list config /section:system.applicationHost/sites /text:[name='{}'].logfile.logTargetW3C" appcmd_filter : "list config /section:system.applicationHost/sites /text:[name='{}'].logfile.logFormat" appcmd_filter_value : "W3C" appcmd_list : "list sites" check_type : CHECK_REGEX type : AUDIT_IIS_APPCMD description : "5.3 Ensure 'ETW Logging' is enabled - Sites logFormat W3C" info : "IIS introduces a new logging method. Administrators can now send logging information to Event Tracing for Windows (ETW) Rationale: IIS flushes log information to disk, therefore prior to IIS, administrators do not have access to real-time logging information. Text-based log files can also be difficult and time consuming to process. By enabling ETW, administrators have access to use standard query tools for viewing real-time logging information." reference : "800-53|AU-3,PCI-DSSv3.1|10.3,PCI-DSSv3.2|10.3,800-171|3.3.1,800-171|3.3.2,CN-L3|7.1.2.3(a),CN-L3|7.1.2.3(b),CN-L3|7.1.3.3(a),CSF|PR.PT-1,ITSG-33|AU-3,CSCv6|6.6,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To configure ETW logging: 1. Open IIS Manager 2. Select the server or site to enable ETW 3. Select Logging. 4. Ensure Log file format is W3C. 5. Select Both log file and ETW event 6. Save your settings." value_type : POLICY_TEXT value_data : "W3C" appcmd_args : "list config /section:system.applicationHost/sites /text:[name='{}'].logfile.logFormat" appcmd_list : "list sites" type : REGISTRY_SETTING description : "Verify FTP service is installed" value_type : POLICY_DWORD value_data : 1 reg_key : "HKLM\Software\Microsoft\Inetstp\Components" reg_item : "FTPSvc" reg_option : CAN_NOT_BE_NULL type : AUDIT_IIS_APPCMD description : "6.1 Ensure FTP requests are encrypted - Control Channel Default" info : "The new FTP Publishing Service for IIS supports adding an SSL certificate to an FTP site. Using an SSL certificate with an FTP site is also known as FTP-S or FTP over Secure Socket Layers (SSL). FTP-S is an RFC standard (RFC 4217) where an SSL certificate is added to an FTP site and thereby making it possible to perform secure file transfers. Rationale: By using SSL, the FTP transmission is encrypted and secured from point to point and all FTP traffic as well as credentials are thereby guarded against interception." reference : "800-53|SC-8,800-171|3.13.8,CSF|PR.DS-2,CSF|PR.DS-5,ISO/IEC-27001|A.13.2.3,ITSG-33|SC-8,TBA-FIISB|29.1,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To secure an existing FTP site using a SSL Certificate, a certificate must first be installed on the system. Production systems should always use a third party certificate from a trusted root, such as VeriSign. Once that certificate is installed for use in IIS, follow the steps below to configure the FTP site for SSL: 1. Open IIS Manager, select the FTP server and choose FTP SSL Settings in the Features View pane 2. Under the SSL Certificate dropdown, choose the X.509 certificate to be configured for use 3. In the SSL Policy section, click the radio button next to Require SSL connections; it is important to require SSL, because allow SSL still permits non-SSL FTP 4. Click Apply in the Actions pane Default Value: By default, FTP sites are not SSL enabled." value_type : POLICY_TEXT value_data : "SslRequire" appcmd_args : "list config /section:system.applicationHost/sites /text:siteDefaults.ftpServer.security.ssl.controlChannelPolicy" type : AUDIT_IIS_APPCMD description : "6.1 Ensure FTP requests are encrypted - Data Channel Default" info : "The new FTP Publishing Service for IIS supports adding an SSL certificate to an FTP site. Using an SSL certificate with an FTP site is also known as FTP-S or FTP over Secure Socket Layers (SSL). FTP-S is an RFC standard (RFC 4217) where an SSL certificate is added to an FTP site and thereby making it possible to perform secure file transfers. Rationale: By using SSL, the FTP transmission is encrypted and secured from point to point and all FTP traffic as well as credentials are thereby guarded against interception." reference : "800-53|SC-8,800-171|3.13.8,CSF|PR.DS-2,CSF|PR.DS-5,ISO/IEC-27001|A.13.2.3,ITSG-33|SC-8,TBA-FIISB|29.1,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To secure an existing FTP site using a SSL Certificate, a certificate must first be installed on the system. Production systems should always use a third party certificate from a trusted root, such as VeriSign. Once that certificate is installed for use in IIS, follow the steps below to configure the FTP site for SSL: 1. Open IIS Manager, select the FTP server and choose FTP SSL Settings in the Features View pane 2. Under the SSL Certificate dropdown, choose the X.509 certificate to be configured for use 3. In the SSL Policy section, click the radio button next to Require SSL connections; it is important to require SSL, because allow SSL still permits non-SSL FTP 4. Click Apply in the Actions pane Default Value: By default, FTP sites are not SSL enabled." value_type : POLICY_TEXT value_data : "SslRequire" appcmd_args : "list config /section:system.applicationHost/sites /text:siteDefaults.ftpServer.security.ssl.dataChannelPolicy" appcmd_list : "list sites" type : AUDIT_IIS_APPCMD description : "6.1 Ensure FTP requests are encrypted - Control Channel Sites" info : "The new FTP Publishing Service for IIS supports adding an SSL certificate to an FTP site. Using an SSL certificate with an FTP site is also known as FTP-S or FTP over Secure Socket Layers (SSL). FTP-S is an RFC standard (RFC 4217) where an SSL certificate is added to an FTP site and thereby making it possible to perform secure file transfers. Rationale: By using SSL, the FTP transmission is encrypted and secured from point to point and all FTP traffic as well as credentials are thereby guarded against interception." reference : "800-53|SC-8,800-171|3.13.8,CSF|PR.DS-2,CSF|PR.DS-5,ISO/IEC-27001|A.13.2.3,ITSG-33|SC-8,TBA-FIISB|29.1,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To secure an existing FTP site using a SSL Certificate, a certificate must first be installed on the system. Production systems should always use a third party certificate from a trusted root, such as VeriSign. Once that certificate is installed for use in IIS, follow the steps below to configure the FTP site for SSL: 1. Open IIS Manager, select the FTP server and choose FTP SSL Settings in the Features View pane 2. Under the SSL Certificate dropdown, choose the X.509 certificate to be configured for use 3. In the SSL Policy section, click the radio button next to Require SSL connections; it is important to require SSL, because allow SSL still permits non-SSL FTP 4. Click Apply in the Actions pane Default Value: By default, FTP sites are not SSL enabled." value_type : POLICY_TEXT value_data : "SslRequire" appcmd_args : "list config /section:system.applicationHost/sites /text:[name='{}'].ftpServer.security.ssl.controlChannelPolicy" appcmd_filter : "list config /section:system.applicationHost/sites /text:[name='{}'].bindings.[protocol='ftp'].protocol" appcmd_filter_value : "ftp" appcmd_list : "list sites" type : AUDIT_IIS_APPCMD description : "6.1 Ensure FTP requests are encrypted - Data Channel Sites" info : "The new FTP Publishing Service for IIS supports adding an SSL certificate to an FTP site. Using an SSL certificate with an FTP site is also known as FTP-S or FTP over Secure Socket Layers (SSL). FTP-S is an RFC standard (RFC 4217) where an SSL certificate is added to an FTP site and thereby making it possible to perform secure file transfers. Rationale: By using SSL, the FTP transmission is encrypted and secured from point to point and all FTP traffic as well as credentials are thereby guarded against interception." reference : "800-53|SC-8,800-171|3.13.8,CSF|PR.DS-2,CSF|PR.DS-5,ISO/IEC-27001|A.13.2.3,ITSG-33|SC-8,TBA-FIISB|29.1,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To secure an existing FTP site using a SSL Certificate, a certificate must first be installed on the system. Production systems should always use a third party certificate from a trusted root, such as VeriSign. Once that certificate is installed for use in IIS, follow the steps below to configure the FTP site for SSL: 1. Open IIS Manager, select the FTP server and choose FTP SSL Settings in the Features View pane 2. Under the SSL Certificate dropdown, choose the X.509 certificate to be configured for use 3. In the SSL Policy section, click the radio button next to Require SSL connections; it is important to require SSL, because allow SSL still permits non-SSL FTP 4. Click Apply in the Actions pane Default Value: By default, FTP sites are not SSL enabled." value_type : POLICY_TEXT value_data : "SslRequire" appcmd_args : "list config /section:system.applicationHost/sites /text:[name='{}'].ftpServer.security.ssl.dataChannelPolicy" appcmd_filter : "list config /section:system.applicationHost/sites /text:[name='{}'].bindings.[protocol='ftp'].protocol" appcmd_filter_value : "ftp" appcmd_list : "list sites" description : "6.1 Ensure FTP requests are encrypted" info : "The new FTP Publishing Service for IIS supports adding an SSL certificate to an FTP site. Using an SSL certificate with an FTP site is also known as FTP-S or FTP over Secure Socket Layers (SSL). FTP-S is an RFC standard (RFC 4217) where an SSL certificate is added to an FTP site and thereby making it possible to perform secure file transfers. Rationale: By using SSL, the FTP transmission is encrypted and secured from point to point and all FTP traffic as well as credentials are thereby guarded against interception. NOTE: This check requires FTP services insalled, and FTP services have not been found as being installed on the target." reference : "CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" type : REGISTRY_SETTING description : "Verify FTP service is installed" value_type : POLICY_DWORD value_data : 1 reg_key : "HKLM\Software\Microsoft\Inetstp\Components" reg_item : "FTPSvc" reg_option : CAN_NOT_BE_NULL type : AUDIT_IIS_APPCMD description : "6.2 Ensure FTP Logon attempt restrictions is enabled - Deny By Failure Enabled" info : "IIS introduced a built-in network security feature to automatically block brute force FTP attacks. This can be used to mitigate a malicious client from attempting a brute-force attack on a discovered account, such as the local administrator account. Rationale: Successful brute force FTP attacks can allow an otherwise unauthorized user to make changes to data that should not be made. This could allow the unauthorized user to modify website code by uploading malicious software or even changing functionality for items such as online payments." reference : "800-53|SC-7,800-171|3.13.1,ITSG-33|SC-7,CSCv6|16.7,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "1. Open IIS Manager 2. At the server level, open the FTP Logon Attempt Restrictions feature. 3. Check Enable FTP Logon Attempt Restrictions and enter the maximum number of failed attempts and the time period. Enable Deny IP addresses based on the number of failed login attempts. 4. Click Apply Default Value: By default, this feature is not enabled when FTP is installed." value_type : POLICY_TEXT value_data : "true" appcmd_args : "list config /section:system.ftpServer/security/authentication /text:denyByFailure.enabled" type : AUDIT_IIS_APPCMD description : "Check deny IP address" value_type : POLICY_TEXT value_data : "true" appcmd_args : "list config /section:system.ftpServer/security/authentication /text:denyByFailure.enabled" type : AUDIT_IIS_APPCMD description : "6.2 Ensure FTP Logon attempt restrictions is enabled - Deny IP Address" info : "IIS introduced a built-in network security feature to automatically block brute force FTP attacks. This can be used to mitigate a malicious client from attempting a brute-force attack on a discovered account, such as the local administrator account. Rationale: Successful brute force FTP attacks can allow an otherwise unauthorized user to make changes to data that should not be made. This could allow the unauthorized user to modify website code by uploading malicious software or even changing functionality for items such as online payments." reference : "800-53|AU-12,800-171|3.3.1,800-171|3.3.2,CN-L3|7.1.3.3(a),CN-L3|7.1.3.3(b),CN-L3|7.1.3.3(c),CSF|DE.CM-1,CSF|DE.CM-3,CSF|DE.CM-7,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.1,ITSG-33|AU-12,TBA-FIISB|45.1.1,CSCv6|16.7,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "1. Open IIS Manager 2. At the server level, open the FTP Logon Attempt Restrictions feature. 3. Check Enable FTP Logon Attempt Restrictions and enter the maximum number of failed attempts and the time period. Enable Deny IP addresses based on the number of failed login attempts. 4. Click Apply Default Value: By default, this feature is not enabled when FTP is installed." value_type : POLICY_TEXT value_data : "false" appcmd_args : "list config /section:system.ftpServer/security/authentication /text:denyByFailure.loggingOnlyMode" description : "6.2 Ensure FTP Logon attempt restrictions is enabled - Deny IP Address" info : "IIS introduced a built-in network security feature to automatically block brute force FTP attacks. This can be used to mitigate a malicious client from attempting a brute-force attack on a discovered account, such as the local administrator account. Rationale: Successful brute force FTP attacks can allow an otherwise unauthorized user to make changes to data that should not be made. This could allow the unauthorized user to modify website code by uploading malicious software or even changing functionality for items such as online payments. NOTE: This check requires FTP services insalled, and FTP services have not been found as being installed on the target." reference : "CSCv6|16.7,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" type : REG_CHECK description : "SSL 2.0 key exists" value_type : POLICY_TEXT value_data : "HKLM\System\Currentcontrolset\Control\Securityproviders\Schannel\Protocols\Ssl 2.0" reg_option : MUST_EXIST type : REGISTRY_SETTING description : "7.2 Ensure SSLv2 is disabled" info : "This protocol is not considered cryptographically secure. Disabling it is recommended. This protocol is disabled by default if the registry key is not present. A reboot is required for these changes to be reflected. Rationale: Disabling weak protocols will help ensure the confidentiality and integrity of in-transit data." reference : "800-53|CM-7,CIP|007-6-R1,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,800-171|3.4.6,800-171|3.4.7,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "Perform the following to disable SSL 2.0: 1. If the following key is not present, SSL 2.0 is disabled. You can delete the key to disable the protocol. If you delete the key, steps 2 and 3 are not necessary. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0 2. If the key exists, set it to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server\Enabled Default Value: Enabled" value_type : POLICY_DWORD value_data : 0 reg_key : "HKLM\System\Currentcontrolset\Control\Securityproviders\Schannel\Protocols\Ssl 2.0\Server" reg_item : "Enabled" reg_option : CAN_NOT_BE_NULL description : "7.2 Ensure SSLv2 is disabled" info : "This protocol is not considered cryptographically secure. Disabling it is recommended. This protocol is disabled by default if the registry key is not present. A reboot is required for these changes to be reflected. Rationale: Disabling weak protocols will help ensure the confidentiality and integrity of in-transit data. NOTE: SSLv2 key was not found in the registry." reference : "CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" type : REGISTRY_SETTING description : "7.3 Ensure SSLv3 is disabled" info : "This protocol is not considered cryptographically secure. Disabling it is recommended. Rationale: Disabling weak protocols will help ensure the confidentiality and integrity of in-transit data." reference : "800-53|CM-7,CIP|007-6-R1,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,800-171|3.4.6,800-171|3.4.7,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "Perform the following to disable SSL 3.0: 1. Set the following keyto 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server\Enabled Default Value: Enabled" value_type : POLICY_DWORD value_data : 0 reg_key : "HKLM\System\Currentcontrolset\Control\Securityproviders\Schannel\Protocols\Ssl 3.0\Server" reg_item : "Enabled" reg_option : CAN_NOT_BE_NULL type : REGISTRY_SETTING description : "7.5 Ensure TLS 1.1 is enabled" info : "Enabling TLS 1.1 is required for backward compatibility. Rationale: This item is Not Scored for the following reasons: * Enabling TLS 1.2 is recommended. * This protocol does not suffer from known practical attacks." reference : "800-53|SC-8,800-171|3.13.8,CSF|PR.DS-2,CSF|PR.DS-5,ISO/IEC-27001|A.13.2.3,ITSG-33|SC-8,TBA-FIISB|29.1,CSCv6|14.2,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "Set the following registry locations to enable TLS 1.1. Set Enabled to 1. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server\Enabled" value_type : POLICY_DWORD value_data : 1 reg_key : "HKLM\System\Currentcontrolset\Control\Securityproviders\Schannel\Protocols\Tls 1.1\Server" reg_item : "Enabled" reg_option : CAN_BE_NULL type : REG_CHECK description : "Protocols TLS 1.2 key exists" value_type : POLICY_TEXT value_data : "HKLM\System\Currentcontrolset\Control\Securityproviders\Schannel\Protocols\Tls 1.2" reg_option : MUST_EXIST type : REGISTRY_SETTING description : "7.6 Ensure TLS 1.2 is enabled" info : "TLS 1.2 is the most recent and mature protocol for protecting the confidentiality and integrity of HTTP traffic. Enabling TLS 1.2 is recommended. This protocol is enabled by default if the registry key is not present. As with any registry changes, a reboot is required for changes to take effect. Rationale: Enabling this protocol will help ensure the confidentiality and integrity of data in transit." reference : "800-53|SC-8,800-171|3.13.8,CSF|PR.DS-2,CSF|PR.DS-5,ISO/IEC-27001|A.13.2.3,ITSG-33|SC-8,TBA-FIISB|29.1,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "Perform the following to enable TLS 1.2: 1. Check to see if the following key exists. If it doesn't, TLS 1.2 is enabled by default. If it does, you can delete it or follow step 2. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\ 2. If the key exists, set the following key to 0xFFFFFFFF HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server\Enabled" value_type : POLICY_DWORD value_data : 4294967295 reg_key : "HKLM\System\Currentcontrolset\Control\Securityproviders\Schannel\Protocols\Tls 1.2\Server" reg_item : "Enabled" reg_option : CAN_NOT_BE_NULL description : "7.6 Ensure TLS 1.2 is enabled" info : "TLS 1.2 is the most recent and mature protocol for protecting the confidentiality and integrity of HTTP traffic. Enabling TLS 1.2 is recommended. This protocol is enabled by default if the registry key is not present. As with any registry changes, a reboot is required for changes to take effect. Rationale: Enabling this protocol will help ensure the confidentiality and integrity of data in transit. NOTE: TLS 1.1 key was not found in the registry." reference : "CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" type : REGISTRY_SETTING description : "7.7 Ensure NULL Cipher Suites is disabled" info : "The NULL cipher does not provide data confidentiality or integrity. It is recommended that the NULL cipher be disabled. Rationale: By disabling the NULL cipher, there is a better chance of maintaining data confidentiality and integrity." reference : "800-53|SC-8,800-171|3.13.8,CSF|PR.DS-2,CSF|PR.DS-5,ISO/IEC-27001|A.13.2.3,ITSG-33|SC-8,TBA-FIISB|29.1,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To disable the NULL cipher, ensure the following key is absent. If the key is present, ensure it is set to 0. HKLM System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\NULL\Enabled" value_type : POLICY_DWORD value_data : 0 reg_key : "HKLM\System\Currentcontrolset\Control\Securityproviders\Schannel\Ciphers\Null" reg_item : "Enabled" reg_option : CAN_BE_NULL type : REGISTRY_SETTING description : "7.8 Ensure DES Cipher Suites is disabled" info : "DES is a weak symmetric-key cipher. It is recommended that it be disabled. Rationale: By disabling DES, there is a better chance of maintaining data confidentiality and integrity." reference : "800-53|SC-8,800-171|3.13.8,CSF|PR.DS-2,CSF|PR.DS-5,ISO/IEC-27001|A.13.2.3,ITSG-33|SC-8,TBA-FIISB|29.1,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To disable DES 56/56, ensure the following key is absent. If the key is present, ensure it is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\DES 56/56\Enabled" value_type : POLICY_DWORD value_data : 0 reg_key : "HKLM\System\Currentcontrolset\Control\Securityproviders\Schannel\Ciphers\Des 56/56" reg_item : "Enabled" reg_option : CAN_BE_NULL type : REGISTRY_SETTING description : "7.9 Ensure RC4 Cipher Suites is disabled - RC4 56/128" info : "RC4 is a stream cipher that has known practical attacks. It is recommended that RC4 be disabled. The only RC4 cipher enabled by default on Server 2012 and 2012 R2 is RC4 128/128. Rationale: The use of RC4 may increase an adversaries ability to read sensitive information sent over SSL/TLS." reference : "800-53|SC-8,800-171|3.13.8,CSF|PR.DS-2,CSF|PR.DS-5,ISO/IEC-27001|A.13.2.3,ITSG-33|SC-8,TBA-FIISB|29.1,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To disable RC4 40/128, ensure the following key is absent. If the key is present, ensure it is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 40/128\Enabled To disable RC4 56/128, ensure the following key is absent. If the key is present, ensure it is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 56/128\Enabled To disable RC4 64/128, ensure the following key is absent. If the key is present, ensure it is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 64/128\Enabled To disable RC4 128/128, ensure the following key is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 128/128\Enabled" value_type : POLICY_DWORD value_data : 0 reg_key : "HKLM\System\Currentcontrolset\Control\Securityproviders\Schannel\Ciphers\Rc4 40/128" reg_item : "Enabled" reg_option : CAN_BE_NULL type : REGISTRY_SETTING description : "7.9 Ensure RC4 Cipher Suites is disabled - RC4 40/128" info : "RC4 is a stream cipher that has known practical attacks. It is recommended that RC4 be disabled. The only RC4 cipher enabled by default on Server 2012 and 2012 R2 is RC4 128/128. Rationale: The use of RC4 may increase an adversaries ability to read sensitive information sent over SSL/TLS." reference : "800-53|SC-8,800-171|3.13.8,CSF|PR.DS-2,CSF|PR.DS-5,ISO/IEC-27001|A.13.2.3,ITSG-33|SC-8,TBA-FIISB|29.1,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To disable RC4 40/128, ensure the following key is absent. If the key is present, ensure it is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 40/128\Enabled To disable RC4 56/128, ensure the following key is absent. If the key is present, ensure it is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 56/128\Enabled To disable RC4 64/128, ensure the following key is absent. If the key is present, ensure it is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 64/128\Enabled To disable RC4 128/128, ensure the following key is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 128/128\Enabled" value_type : POLICY_DWORD value_data : 0 reg_key : "HKLM\System\Currentcontrolset\Control\Securityproviders\Schannel\Ciphers\Rc4 56/128" reg_item : "Enabled" reg_option : CAN_BE_NULL type : REGISTRY_SETTING description : "7.9 Ensure RC4 Cipher Suites is disabled - RC4 64/128" info : "RC4 is a stream cipher that has known practical attacks. It is recommended that RC4 be disabled. The only RC4 cipher enabled by default on Server 2012 and 2012 R2 is RC4 128/128. Rationale: The use of RC4 may increase an adversaries ability to read sensitive information sent over SSL/TLS." reference : "800-53|SC-8,800-171|3.13.8,CSF|PR.DS-2,CSF|PR.DS-5,ISO/IEC-27001|A.13.2.3,ITSG-33|SC-8,TBA-FIISB|29.1,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To disable RC4 40/128, ensure the following key is absent. If the key is present, ensure it is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 40/128\Enabled To disable RC4 56/128, ensure the following key is absent. If the key is present, ensure it is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 56/128\Enabled To disable RC4 64/128, ensure the following key is absent. If the key is present, ensure it is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 64/128\Enabled To disable RC4 128/128, ensure the following key is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 128/128\Enabled" value_type : POLICY_DWORD value_data : 0 reg_key : "HKLM\System\Currentcontrolset\Control\Securityproviders\Schannel\Ciphers\Rc4 64/128" reg_item : "Enabled" reg_option : CAN_BE_NULL type : REGISTRY_SETTING description : "7.9 Ensure RC4 Cipher Suites is disabled - RC4 128/128" info : "RC4 is a stream cipher that has known practical attacks. It is recommended that RC4 be disabled. The only RC4 cipher enabled by default on Server 2012 and 2012 R2 is RC4 128/128. Rationale: The use of RC4 may increase an adversaries ability to read sensitive information sent over SSL/TLS." reference : "800-53|SC-8,800-171|3.13.8,CSF|PR.DS-2,CSF|PR.DS-5,ISO/IEC-27001|A.13.2.3,ITSG-33|SC-8,TBA-FIISB|29.1,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To disable RC4 40/128, ensure the following key is absent. If the key is present, ensure it is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 40/128\Enabled To disable RC4 56/128, ensure the following key is absent. If the key is present, ensure it is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 56/128\Enabled To disable RC4 64/128, ensure the following key is absent. If the key is present, ensure it is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 64/128\Enabled To disable RC4 128/128, ensure the following key is set to 0. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 128/128\Enabled" value_type : POLICY_DWORD value_data : 0 reg_key : "HKLM\System\Currentcontrolset\Control\Securityproviders\Schannel\Ciphers\Rc4 128/128" reg_item : "Enabled" reg_option : CAN_BE_NULL type : REGISTRY_SETTING description : "7.10 Triple DES Cipher Suite is allowable" info : "Triple DES Cipher Suites is now considered a weak cipher and is not recommended for use but is allowed per NIST Rationale: This item is Not Scored for the following reasons: * Enabling AES 256/256 is recommended. * This cipher does not suffer from known practical attacks." reference : "800-53|SC-8,800-171|3.13.8,CSF|PR.DS-2,CSF|PR.DS-5,ISO/IEC-27001|A.13.2.3,ITSG-33|SC-8,TBA-FIISB|29.1,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To disable Triple DES 168/168, ensure the following key is set to 00000000. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\Triple DES 168/168\Enabled CIS Controls:" value_type : POLICY_DWORD value_data : 4294967295 reg_key : "HKLM\System\Currentcontrolset\Control\Securityproviders\Schannel\Ciphers\Triple Des 168/168" reg_item : "Enabled" || "Disabled" reg_option : CAN_BE_NULL type : REGISTRY_SETTING description : "7.11 Ensure AES 128/128 Cipher Suite is configured" info : "Enabling AES 128/128 may be required for client compatibility. Enable or disable this cipher suite accordingly. Rationale: This item is Not Scored for the following reasons: * Enabling AES 256/256 is recommended. * This cipher does not suffer from known practical attacks." reference : "800-53|SC-8,800-171|3.13.8,CSF|PR.DS-2,CSF|PR.DS-5,ISO/IEC-27001|A.13.2.3,ITSG-33|SC-8,TBA-FIISB|29.1,CSCv6|14.2,LEVEL|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To enable the AES 128/128 cipher, ensure the following key is set to 0xFFFFFFFF: HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\AES 128/128\Enabled" value_type : POLICY_DWORD value_data : 4294967295 reg_key : "HKLM\System\Currentcontrolset\Control\Securityproviders\Schannel\Ciphers\Aes 128/128" reg_item : "Enabled" reg_option : CAN_NOT_BE_NULL type : REG_CHECK description : "AES 256/256 key exists" value_type : POLICY_TEXT value_data : "HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\AES 256/256" reg_option : MUST_EXIST type : REGISTRY_SETTING description : "7.12 Ensure AES 256/256 Cipher Suite is enabled" info : "AES 256/256 is the most recent and mature cipher suite for protecting the confidentiality and integrity of HTTP traffic. Enabling AES 256/256 is recommended. This is enabled by default on Server 2012 and 2012 R2. Rationale: Enabling this cipher will help ensure the confidentiality and integrity of data in transit." reference : "800-53|SC-8,800-171|3.13.8,CSF|PR.DS-2,CSF|PR.DS-5,ISO/IEC-27001|A.13.2.3,ITSG-33|SC-8,TBA-FIISB|29.1,CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" solution : "To enable the AES 256/256 cipher: 1. Ensure that the following key does not exist. If it does exist, you can either delete the key or proceed to step 2. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\AES 256/256\ 2. If the key exists, ensure the following is set to 0xFFFFFFFF. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\AES 256/256\Enabled" value_type : POLICY_DWORD value_data : 4294967295 reg_key : "HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\AES 256/256" reg_item : "Enabled" reg_option : CAN_NOT_BE_NULL description : "7.12 Ensure AES 256/256 Cipher Suite is enabled" info : "AES 256/256 is the most recent and mature cipher suite for protecting the confidentiality and integrity of HTTP traffic. Enabling AES 256/256 is recommended. This is enabled by default on Server 2012 and 2012 R2. Rationale: Enabling this cipher will help ensure the confidentiality and integrity of data in transit. NOTE: The AES 256/256 key was not found in the registry." reference : "CSCv6|14.2,LEVEL|1S" see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf" description : "CIS Microsoft IIS 10 Benchmark v1.1.0 Level 1" info : "This audit checks the testable Level 1 guidance in the CIS Microsoft IIS 10 Benchmark v1.0.0 document against Microsoft IIS 10 running on Microsoft Windows Server 2016. Microsoft IIS 10 or Windows Server 2016 is not found as installed on the target." see_also : "https://benchmarks.cisecurity.org/tools2/iis/CIS_Microsoft_IIS_10_Benchmark_v1.0.0.pdf"