Microsoft IIS
TMA-IIS-1.2
Ensure 'Host headers' are on all sites
MoyenneNiveau 1Automatiséeiis
Description
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. Note: Wildcard host headers are now supported. Every http binding must include a host name (IP:port:host); bindings such as *:80: fail. PowerShell 5.1 with the WebAdministration module; run elevated.
Méthode de vérification
Méthode d'audit: Commande shell
shell
Import-Module WebAdministration -ErrorAction Stop; $bad = @(Get-WebBinding | Where-Object { $_.protocol -eq 'http' -and ($_.bindingInformation -split ':')[2] -eq '' }); if ($bad.Count -eq 0) { 'compliant' } else { 'noncompliant' }- Sortie attendue
compliant
Méthode de correction
Méthode de correction: Recommandation ou correctif d'infrastructure
Set-WebBinding -Name '<site>' -BindingInformation '*:80:' -PropertyName HostHeader -Value '<fqdn>'
Propriétés
- Systèmes d'exploitation
- Tous
- Étiquettes
- iisnetwork
- Référence
- CIS Microsoft IIS 10 Benchmark v1.2.1 - 1.2 Ensure 'Host headers' are on all sites
Vérifier cet hôte
Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.
shell
tmaegis scan --target iis