TMAegis
Más reglas para iis

TMA-IIS-3.12

Ensure Server Header is removed

BajaNivel 2Automatizadaiis

Descripción

The server header headers specify the underlying technology used by the application. requestFiltering removeServerHeader must be true at server level (IIS 10 1709 or later). PowerShell 5.1 with the WebAdministration module; run elevated. CIS marks this recommendation Manual; the automated check implements its audit procedure.

Cómo se verifica

Método de auditoría: Comando de shell

shell
Import-Module WebAdministration -ErrorAction Stop; $c = Get-WebConfiguration -Filter 'system.webServer/security/requestFiltering' -PSPath 'MACHINE/WEBROOT/APPHOST'; if ($c.removeServerHeader -eq $true) { 'compliant' } else { 'noncompliant' }
Salida esperada
compliant

Cómo se corrige

Método de corrección: Guía o parche de infraestructura

Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' -Filter system.webServer/security/requestFiltering -Name removeServerHeader -Value True

Propiedades

Sistemas operativos
Cualquiera
Etiquetas
iisinformation-disclosure
Referencia
CIS Microsoft IIS 10 Benchmark v1.2.1 - 3.12 Ensure Server Header is removed

Verificar este host

Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.

shell
tmaegis scan --target iis --level 2