CIS Microsoft IIS 10 Benchmark

Secure configuration guidelines for Internet Information Services 10

v1.2.1 March 2025

Overview

▶

This CIS Benchmark provides prescriptive guidance for establishing a secure configuration posture for Microsoft Internet Information Services (IIS) 10. Recommendations cover module management, authentication, request filtering, TLS, logging, application pool hardening, and security headers.

~90Recommendations
7Sections
2Profile Levels
SectionAreaFocus
1Basic ConfigurationInstallation, modules
2AuthenticationAuth modes, request filtering
3ASP.NETMachine key, ViewState, sessions
4Transport SecurityTLS, HSTS
5LoggingIIS logs, ETW
6App PoolsIdentity, recycling, limits
7Headers & ErrorsSecurity headers, custom errors

Profile Definitions

▶
ProfileDescriptionIntended Use
L1Level 1 — IIS 10Essential security settings applicable to all IIS deployments.
L2Level 2 — IIS 10Defense-in-depth settings that may reduce functionality or require additional configuration.

1 — Basic Configuration

▶

1.1 Installation

▶
1.1.1 Ensure IIS Is Installed on a Dedicated Server (Manual)
L1 Manual
Description
IIS should be installed on a dedicated server to reduce attack surface and simplify security management.
Rationale

Failure to iIS Is Installed on a Dedicated Server may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WindowsFeature Web-Server | Select-Object Name, Installed
# Verify no other major roles (AD DS, DNS, DHCP) are installed
Remediation
# Install IIS on a dedicated server/VM only
1.1.2 Ensure Web Content Is on a Non-System Drive (Automated)
L1 Auto
Description

This recommendation verifies that web Content Is on a Non-System Drive on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to web Content Is on a Non-System Drive may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-Website | Select-Object Name, PhysicalPath
# Verify no sites use C:\inetpub\wwwroot
Remediation
# Move site content to a non-system drive (e.g., D:\WebSites\)
Set-ItemProperty "IIS:\Sites\Default Web Site" -Name physicalPath -Value "D:\WebSites\Default"
1.1.3 Ensure the Default IIS Website Is Removed or Stopped (Automated)
L1 Auto
Description

the Default IIS Website should be removed from the IIS 10 web server when not required. Removing unnecessary components reduces the attack surface and limits the number of potential vulnerabilities that need to be managed.

Rationale

Retaining the Default IIS Website when it is not needed increases the attack surface. Unpatched or unused components are frequent targets for exploitation and should be removed as part of system hardening.

Audit
Get-Website "Default Web Site" | Select-Object State
Remediation
Stop-Website "Default Web Site"
Remove-Website "Default Web Site"

1.2 Module Management

▶
1.2.1 Ensure Only Required IIS Features Are Installed (Manual)
L1 Manual
Description

This recommendation verifies that only Required IIS Features Are Installed on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to only Required IIS Features Are Installed may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WindowsFeature | Where-Object {$_.Installed -and $_.Name -like "Web-*"} | Select-Object Name
Remediation
# Remove unneeded features:
Uninstall-WindowsFeature Web-DAV-Publishing
Uninstall-WindowsFeature Web-Ftp-Server
1.2.2 Ensure WebDAV Is Disabled (Automated)
L1 Auto
Description

This setting controls whether WebDAV is disabled on the IIS 10 web server. Disabling this feature reduces the attack surface by removing unnecessary functionality that could be exploited by an attacker.

Rationale

Leaving WebDAV enabled when it is not required unnecessarily expands the attack surface. An attacker could leverage this feature to gain unauthorized access or escalate privileges on the IIS 10 web server.

Audit
Get-WindowsFeature Web-DAV-Publishing | Select-Object Installed
Remediation
Uninstall-WindowsFeature Web-DAV-Publishing
1.2.3 Ensure ISAPI Filters Point to Valid DLLs (Automated)
L1 Auto
Description

This recommendation verifies that iSAPI Filters Point to Valid DLLs on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to iSAPI Filters Point to Valid DLLs may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -pspath 'MACHINE/WEBROOT' -filter "system.webServer/isapiFilters" -name "."
Remediation
# Remove any ISAPI filter entries pointing to non-existent DLLs

2 — Authentication & Authorization

▶

2.1 Authentication Modes

▶
2.1.1 Ensure Anonymous Authentication Is Disabled Where Not Needed (Automated)
L1 Auto
Description

This recommendation verifies that anonymous Authentication Is Disabled Where Not Needed on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to anonymous Authentication Is Disabled Where Not Needed may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -pspath 'MACHINE/WEBROOT' -filter "system.webServer/security/authentication/anonymousAuthentication" -name "enabled"
Remediation
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST/<SiteName>' -filter "system.webServer/security/authentication/anonymousAuthentication" -name "enabled" -value "False"
2.1.2 Ensure Basic Authentication Is Not Used Without TLS (Manual)
L1 Manual
Description
Basic authentication sends credentials as Base64-encoded plaintext. It must only be used over HTTPS.
Rationale

Failure to basic Authentication Is Not Used Without TLS may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -pspath 'MACHINE/WEBROOT' -filter "system.webServer/security/authentication/basicAuthentication" -name "enabled"
# Verify TLS is required for any site using Basic auth
Remediation
# Either disable Basic auth:
Set-WebConfigurationProperty -filter "system.webServer/security/authentication/basicAuthentication" -name "enabled" -value "False"
# Or ensure Require SSL is set on the site
2.1.3 Ensure Windows Authentication Uses Kerberos (Automated)
L2 Auto
Description

This recommendation verifies that windows Authentication Uses Kerberos on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to windows Authentication Uses Kerberos may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.webServer/security/authentication/windowsAuthentication/providers" -name "."
Remediation
# Ensure Negotiate is listed before NTLM in providers:
# IIS Manager > Site > Authentication > Windows Authentication > Providers
# Move "Negotiate" to the top

2.2 Request Filtering

▶
2.2.1 Ensure maxAllowedContentLength Is Set (Automated)
L1 Auto
Description

This recommendation verifies that maxAllowedContentLength Is Set on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to maxAllowedContentLength Is Set may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.webServer/security/requestFiltering/requestLimits" -name "maxAllowedContentLength"
Remediation
<system.webServer>
  <security>
    <requestFiltering>
      <requestLimits maxAllowedContentLength="30000000" />
    </requestFiltering>
  </security>
</system.webServer>
2.2.2 Ensure maxUrl and maxQueryString Are Configured (Automated)
L1 Auto
Description

This recommendation addresses the proper configuration of maxUrl and maxQueryString on the IIS 10 web server. Proper configuration ensures the component operates securely and in accordance with organizational security policies.

Rationale

Misconfiguration of maxUrl and maxQueryString can lead to security gaps that may be exploited by attackers. A properly configured IIS 10 web server reduces exposure to both known vulnerabilities and configuration drift.

Audit
Get-WebConfigurationProperty -filter "system.webServer/security/requestFiltering/requestLimits" -name "maxUrl"
Get-WebConfigurationProperty -filter "system.webServer/security/requestFiltering/requestLimits" -name "maxQueryString"
Remediation
<requestLimits maxUrl="4096" maxQueryString="2048" />
2.2.3 Ensure Non-ASCII Characters in URLs Are Not Allowed (Automated)
L1 Auto
Description

Non-ASCII Characters in URLs should not be allowed on the IIS 10 web server. Removing or disabling this component reduces the attack surface and prevents potential exploitation of unnecessary services or features.

Rationale

If Non-ASCII Characters in URLs remains allowed, it presents an unnecessary risk vector that attackers could exploit. Removing or disabling unused components is a fundamental principle of secure system hardening.

Audit
Get-WebConfigurationProperty -filter "system.webServer/security/requestFiltering" -name "allowHighBitCharacters"
Remediation
<requestFiltering allowHighBitCharacters="false" />
2.2.4 Ensure Double-Encoded Requests Are Rejected (Automated)
L1 Auto
Description

This recommendation verifies that double-Encoded Requests Are Rejected on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to double-Encoded Requests Are Rejected may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.webServer/security/requestFiltering" -name "allowDoubleEscaping"
Remediation
<requestFiltering allowDoubleEscaping="false" />
2.2.5 Ensure Unlisted File Extensions Are Not Served (Automated)
L2 Auto
Description

This recommendation verifies that unlisted File Extensions Are Not Served on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to unlisted File Extensions Are Not Served may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.webServer/security/requestFiltering/fileExtensions" -name "allowUnlisted"
Remediation
<fileExtensions allowUnlisted="false">
  <add fileExtension=".html" allowed="true" />
  <add fileExtension=".css" allowed="true" />
  <add fileExtension=".js" allowed="true" />
  <add fileExtension=".aspx" allowed="true" />
</fileExtensions>

3 — ASP.NET Configuration

▶

3.1 Machine Key & ViewState

▶
3.1.1 Ensure Machine Key Validation Method Is AES or SHA256 (Automated)
L1 Auto
Description

This recommendation verifies that machine Key Validation Method Is AES or SHA256 on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to machine Key Validation Method Is AES or SHA256 may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.web/machineKey" -name "validation"
Remediation
<system.web>
  <machineKey validation="HMACSHA256" decryption="AES" />
</system.web>
3.1.2 Ensure ViewState MAC Validation Is Enabled (Automated)
L1 Auto
Description

This setting controls whether ViewState MAC Validation is enabled on the IIS 10 web server. Enabling this feature strengthens the security posture by enforcing the recommended configuration via IIS Manager, applicationHost.config, or PowerShell cmdlets.

Rationale

Without ViewState MAC Validation enabled, the IIS 10 web server may lack critical protections against known attack vectors. Enabling this control mitigates risk and aligns the deployment with industry-accepted security baselines.

Audit
Get-WebConfigurationProperty -filter "system.web/pages" -name "enableViewStateMac"
Remediation
<pages enableViewStateMac="true" />

3.2 Session State

▶
3.2.1 Ensure Session State Is Configured with 'cookieless=UseCookies' (Automated)
L1 Auto
Description

This recommendation verifies that session State Is Configured with 'cookieless=UseCookies' on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to session State Is Configured with 'cookieless=UseCookies' may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.web/sessionState" -name "cookieless"
Remediation
<sessionState cookieless="UseCookies" cookieName="ASP.NET_SessionId" />
3.2.2 Ensure Session Cookie Is HttpOnly (Automated)
L1 Auto
Description

This recommendation verifies that session Cookie Is HttpOnly on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to session Cookie Is HttpOnly may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.web/httpCookies" -name "httpOnlyCookies"
Remediation
<httpCookies httpOnlyCookies="true" requireSSL="true" />
3.2.3 Ensure Session Timeout Is ≤ 20 Minutes (Automated)
L1 Auto
Description

This recommendation configures the timeout for Session on the IIS 10 web server. Appropriate timeout values limit the window of opportunity for attacks and ensure resources are released in a timely manner.

Rationale

Failure to session Timeout Is ≤ 20 Minutes may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.web/sessionState" -name "timeout"
Remediation
<sessionState timeout="20" />

4 — Transport Security

▶

4.1 TLS Configuration

▶
4.1.1 Ensure SSL 2.0, SSL 3.0, TLS 1.0, TLS 1.1 Are Disabled (Automated)
L1 Auto
Description

This setting controls whether SSL 2.0, SSL 3.0, TLS 1.0, TLS 1.1 is disabled on the IIS 10 web server. Disabling this feature reduces the attack surface by removing unnecessary functionality that could be exploited by an attacker.

Rationale

Leaving SSL 2.0, SSL 3.0, TLS 1.0, TLS 1.1 enabled when it is not required unnecessarily expands the attack surface. An attacker could leverage this feature to gain unauthorized access or escalate privileges on the IIS 10 web server.

Audit
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server" -Name "Enabled" -ErrorAction SilentlyContinue
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server" -Name "Enabled" -ErrorAction SilentlyContinue
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server" -Name "Enabled" -ErrorAction SilentlyContinue
Remediation
# Disable legacy protocols via registry:
New-Item "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server" -Force
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server" -Name "Enabled" -Value 0 -Type DWord
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server" -Name "DisabledByDefault" -Value 1 -Type DWord
# Repeat for SSL 2.0, SSL 3.0, TLS 1.1
4.1.2 Ensure TLS 1.2 and/or TLS 1.3 Are Enabled (Automated)
L1 Auto
Description

This setting controls whether TLS 1.2 and/or TLS 1.3 is enabled on the IIS 10 web server. Enabling this feature strengthens the security posture by enforcing the recommended configuration via IIS Manager, applicationHost.config, or PowerShell cmdlets.

Rationale

Without TLS 1.2 and/or TLS 1.3 enabled, the IIS 10 web server may lack critical protections against known attack vectors. Enabling this control mitigates risk and aligns the deployment with industry-accepted security baselines.

Audit
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server" -Name "Enabled" -ErrorAction SilentlyContinue
Remediation
New-Item "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server" -Force
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server" -Name "Enabled" -Value 1 -Type DWord
4.1.3 Ensure Weak Cipher Suites Are Disabled (Automated)
L1 Auto
Description

This setting controls whether Weak Cipher Suites is disabled on the IIS 10 web server. Disabling this feature reduces the attack surface by removing unnecessary functionality that could be exploited by an attacker.

Rationale

Leaving Weak Cipher Suites enabled when it is not required unnecessarily expands the attack surface. An attacker could leverage this feature to gain unauthorized access or escalate privileges on the IIS 10 web server.

Audit
# Check cipher suite order:
Get-TlsCipherSuite | Select-Object Name
Remediation
Disable-TlsCipherSuite -Name "TLS_RSA_WITH_AES_128_CBC_SHA"
Disable-TlsCipherSuite -Name "TLS_RSA_WITH_AES_256_CBC_SHA"
Disable-TlsCipherSuite -Name "TLS_RSA_WITH_3DES_EDE_CBC_SHA"
# Keep only ECDHE and AES-GCM based suites

4.2 HSTS & Redirects

▶
4.2.1 Ensure HSTS Is Enabled (Automated)
L1 Auto
Description

This setting controls whether HSTS is enabled on the IIS 10 web server. Enabling this feature strengthens the security posture by enforcing the recommended configuration via IIS Manager, applicationHost.config, or PowerShell cmdlets.

Rationale

Without HSTS enabled, the IIS 10 web server may lack critical protections against known attack vectors. Enabling this control mitigates risk and aligns the deployment with industry-accepted security baselines.

Audit
Get-WebConfigurationProperty -filter "system.webServer/httpProtocol/customHeaders" -name "." | Where-Object {$_.name -eq "Strict-Transport-Security"}
Remediation
# IIS 10+ native HSTS:
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -location '<SiteName>' -filter "system.webServer/hsts" -name "enabled" -value "True"
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -location '<SiteName>' -filter "system.webServer/hsts" -name "max-age" -value "31536000"
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -location '<SiteName>' -filter "system.webServer/hsts" -name "includeSubDomains" -value "True"
4.2.2 Ensure HTTP to HTTPS Redirect Is Configured (Automated)
L1 Auto
Description

This recommendation addresses the proper configuration of HTTP to HTTPS Redirect on the IIS 10 web server. Proper configuration ensures the component operates securely and in accordance with organizational security policies.

Rationale

Misconfiguration of HTTP to HTTPS Redirect can lead to security gaps that may be exploited by attackers. A properly configured IIS 10 web server reduces exposure to both known vulnerabilities and configuration drift.

Audit
# Check URL Rewrite rules:
Get-WebConfiguration -filter "system.webServer/rewrite/rules" -PSPath 'IIS:\Sites\<SiteName>'
Remediation
<rewrite>
  <rules>
    <rule name="HTTP to HTTPS" stopProcessing="true">
      <match url="(.*)" />
      <conditions>
        <add input="{HTTPS}" pattern="off" ignoreCase="true" />
      </conditions>
      <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
    </rule>
  </rules>
</rewrite>

5 — Logging & Monitoring

▶

5.1 Log Settings

▶
5.1.1 Ensure IIS Logging Is Enabled for All Sites (Automated)
L1 Auto
Description

This recommendation verifies that iIS Logging Is Enabled for All Sites on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to iIS Logging Is Enabled for All Sites may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-Website | ForEach-Object { Get-WebConfigurationProperty -pspath "IIS:\Sites\$($_.Name)" -filter "system.webServer/httpLogging" -name "dontLog" }
Remediation
Set-WebConfigurationProperty -filter "system.webServer/httpLogging" -name "dontLog" -value "False"
5.1.2 Ensure W3C Log Format Is Used (Automated)
L1 Auto
Description

This recommendation verifies that w3C Log Format Is Used on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to w3C Log Format Is Used may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.applicationHost/sites/siteDefaults/logFile" -name "logFormat"
Remediation
Set-WebConfigurationProperty -filter "system.applicationHost/sites/siteDefaults/logFile" -name "logFormat" -value "W3C"
5.1.3 Ensure Log Fields Include All Essential Fields (Automated)
L1 Auto
Description

This recommendation verifies that log Fields Include All Essential Fields on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to log Fields Include All Essential Fields may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.applicationHost/sites/siteDefaults/logFile" -name "logExtFileFlags"
Remediation
# Ensure at minimum: Date, Time, ClientIP, UserName, Method, UriStem, UriQuery, HttpStatus, Win32Status, TimeTaken, ServerIP, UserAgent, Referer
Set-WebConfigurationProperty -filter "system.applicationHost/sites/siteDefaults/logFile" -name "logExtFileFlags" -value "Date,Time,ClientIP,UserName,Method,UriStem,UriQuery,HttpStatus,Win32Status,TimeTaken,ServerIP,UserAgent,Referer"

5.2 ETW & Custom Logging

▶
5.2.1 Ensure ETW Logging Is Enabled (Automated)
L2 Auto
Description

This setting controls whether ETW Logging is enabled on the IIS 10 web server. Enabling this feature strengthens the security posture by enforcing the recommended configuration via IIS Manager, applicationHost.config, or PowerShell cmdlets.

Rationale

Without ETW Logging enabled, the IIS 10 web server may lack critical protections against known attack vectors. Enabling this control mitigates risk and aligns the deployment with industry-accepted security baselines.

Audit
Get-WebConfigurationProperty -filter "system.applicationHost/sites/siteDefaults/logFile" -name "logTargetW3C"
Remediation
Set-WebConfigurationProperty -filter "system.applicationHost/sites/siteDefaults/logFile" -name "logTargetW3C" -value "File,ETW"
5.2.2 Ensure Logs Are Stored on a Non-System Partition (Automated)
L1 Auto
Description

This recommendation verifies that logs Are Stored on a Non-System Partition on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to logs Are Stored on a Non-System Partition may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.applicationHost/sites/siteDefaults/logFile" -name "directory"
Remediation
Set-WebConfigurationProperty -filter "system.applicationHost/sites/siteDefaults/logFile" -name "directory" -value "D:\IISLogs"

6 — Application Pools & Worker Processes

▶

6.1 Application Pool Identity

▶
6.1.1 Ensure Application Pool Identity Is 'ApplicationPoolIdentity' (Automated)
L1 Auto
Description

This recommendation verifies that application Pool Identity Is 'ApplicationPoolIdentity' on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to application Pool Identity Is 'ApplicationPoolIdentity' may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.applicationHost/applicationPools/applicationPoolDefaults/processModel" -name "identityType"
Remediation
Set-WebConfigurationProperty -filter "system.applicationHost/applicationPools/applicationPoolDefaults/processModel" -name "identityType" -value "ApplicationPoolIdentity"
6.1.2 Ensure Each Site Has Its Own Application Pool (Manual)
L1 Manual
Description

This recommendation verifies that each Site Has Its Own Application Pool on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to each Site Has Its Own Application Pool may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-Website | Select-Object Name, ApplicationPool | Group-Object ApplicationPool | Where-Object {$_.Count -gt 1}
Remediation
# Create dedicated app pools:
New-WebAppPool -Name "SiteName_Pool"
Set-ItemProperty "IIS:\Sites\SiteName" -Name applicationPool -Value "SiteName_Pool"

6.2 Recycling & Limits

▶
6.2.1 Ensure Regular Recycling Interval Is Set (Automated)
L1 Auto
Description

This recommendation configures the interval for Regular Recycling on the IIS 10 web server. Appropriate interval values limit the window of opportunity for attacks and ensure resources are released in a timely manner.

Rationale

Failure to regular Recycling Interval Is Set may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.applicationHost/applicationPools/applicationPoolDefaults/recycling/periodicRestart" -name "time"
Remediation
Set-WebConfigurationProperty -filter "system.applicationHost/applicationPools/applicationPoolDefaults/recycling/periodicRestart" -name "time" -value "29:00:00"
6.2.2 Ensure Virtual Memory Limit Is Configured (Automated)
L2 Auto
Description

This recommendation addresses the proper configuration of Virtual Memory Limit on the IIS 10 web server. Proper configuration ensures the component operates securely and in accordance with organizational security policies.

Rationale

Misconfiguration of Virtual Memory Limit can lead to security gaps that may be exploited by attackers. A properly configured IIS 10 web server reduces exposure to both known vulnerabilities and configuration drift.

Audit
Get-WebConfigurationProperty -filter "system.applicationHost/applicationPools/applicationPoolDefaults/recycling/periodicRestart" -name "memory"
Remediation
Set-WebConfigurationProperty -filter "system.applicationHost/applicationPools/applicationPoolDefaults/recycling/periodicRestart" -name "memory" -value "4194304"
6.2.3 Ensure Idle Timeout Is ≤ 20 Minutes (Automated)
L1 Auto
Description

This recommendation configures the timeout for Idle on the IIS 10 web server. Appropriate timeout values limit the window of opportunity for attacks and ensure resources are released in a timely manner.

Rationale

Failure to idle Timeout Is ≤ 20 Minutes may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.applicationHost/applicationPools/applicationPoolDefaults/processModel" -name "idleTimeout"
Remediation
Set-WebConfigurationProperty -filter "system.applicationHost/applicationPools/applicationPoolDefaults/processModel" -name "idleTimeout" -value "00:20:00"

7 — Headers & Error Pages

▶

7.1 Security Headers

▶
7.1.1 Ensure X-Content-Type-Options Is Set to 'nosniff' (Automated)
L1 Auto
Description

This recommendation configures X-Content-Type-Options to 'nosniff' on the IIS 10 web server. Setting this value appropriately ensures the system operates within the security parameters defined by the CIS benchmark.

Rationale

An improperly configured value for X-Content-Type-Options could weaken security controls or allow unintended behavior. Setting this to 'nosniff' ensures the IIS 10 web server operates within a well-defined security boundary.

Audit
Get-WebConfigurationProperty -filter "system.webServer/httpProtocol/customHeaders" -name "." | Where-Object {$_.name -eq "X-Content-Type-Options"}
Remediation
Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.webServer/httpProtocol/customHeaders" -name "." -value @{name='X-Content-Type-Options';value='nosniff'}
7.1.2 Ensure X-Frame-Options Is Set (Automated)
L1 Auto
Description

This recommendation verifies that x-Frame-Options Is Set on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to x-Frame-Options Is Set may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.webServer/httpProtocol/customHeaders" -name "." | Where-Object {$_.name -eq "X-Frame-Options"}
Remediation
Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.webServer/httpProtocol/customHeaders" -name "." -value @{name='X-Frame-Options';value='SAMEORIGIN'}
7.1.3 Ensure Content-Security-Policy Header Is Set (Manual)
L2 Manual
Description

This recommendation verifies that content-Security-Policy Header Is Set on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to content-Security-Policy Header Is Set may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check response headers:
Invoke-WebRequest https://<site> | Select-Object -ExpandProperty Headers | Select-String "Content-Security-Policy"
Remediation
Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.webServer/httpProtocol/customHeaders" -name "." -value @{name='Content-Security-Policy';value="default-src 'self'"}
7.1.4 Ensure the 'Server' Header Is Removed (Automated)
L1 Auto
Description

the 'Server' Header should be removed from the IIS 10 web server when not required. Removing unnecessary components reduces the attack surface and limits the number of potential vulnerabilities that need to be managed.

Rationale

Retaining the 'Server' Header when it is not needed increases the attack surface. Unpatched or unused components are frequent targets for exploitation and should be removed as part of system hardening.

Audit
Get-WebConfigurationProperty -filter "system.webServer/security/requestFiltering" -name "removeServerHeader"
Remediation
Set-WebConfigurationProperty -filter "system.webServer/security/requestFiltering" -name "removeServerHeader" -value "True"

7.2 Custom Errors

▶
7.2.1 Ensure Detailed Errors Are Not Sent to Clients (Automated)
L1 Auto
Description

This recommendation verifies that detailed Errors Are Not Sent to Clients on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to detailed Errors Are Not Sent to Clients may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.webServer/httpErrors" -name "errorMode"
Remediation
Set-WebConfigurationProperty -filter "system.webServer/httpErrors" -name "errorMode" -value "DetailedLocalOnly"
7.2.2 Ensure Custom Error Pages Are Configured for Common Errors (Manual)
L1 Manual
Description

This recommendation verifies that custom Error Pages Are Configured for Common Errors on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to custom Error Pages Are Configured for Common Errors may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.webServer/httpErrors/error" -name "."
Remediation
<httpErrors errorMode="DetailedLocalOnly">
  <remove statusCode="404" />
  <error statusCode="404" path="/errors/404.html" responseMode="ExecuteURL" />
  <remove statusCode="500" />
  <error statusCode="500" path="/errors/500.html" responseMode="ExecuteURL" />
</httpErrors>
7.2.3 Ensure ASP.NET Custom Errors Mode Is 'On' or 'RemoteOnly' (Automated)
L1 Auto
Description

This recommendation verifies that aSP.NET Custom Errors Mode Is 'On' or 'RemoteOnly' on the IIS 10 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to aSP.NET Custom Errors Mode Is 'On' or 'RemoteOnly' may leave the IIS 10 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
Get-WebConfigurationProperty -filter "system.web/customErrors" -name "mode"
Remediation
<customErrors mode="RemoteOnly" defaultRedirect="/errors/generic.html" />