Microsoft IIS
TMA-IIS-3.12
Ensure Server Header is removed
ThấpCấp 2Tự độngiis
Mô tả
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ách kiểm tra
Phương pháp kiểm tra: Lệnh 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' }- Đầu ra mong đợi
compliant
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' -Filter system.webServer/security/requestFiltering -Name removeServerHeader -Value True
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- iisinformation-disclosure
- Tham chiếu
- CIS Microsoft IIS 10 Benchmark v1.2.1 - 3.12 Ensure Server Header is removed
Kiểm tra máy này
Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.
shell
tmaegis scan --target iis --level 2