TMAegis
Aturan lainnya untuk iis

TMA-IIS-4.7

Ensure Unlisted File Extensions are not allowed

SedangLevel 1Otomatisiis

Deskripsi

The FileExtensions 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. requestFiltering fileExtensions allowUnlisted must be false at server level (then allow only required extensions). PowerShell 5.1 with the WebAdministration module; run elevated.

Cara pemeriksaan

Metode audit: Perintah shell

shell
Import-Module WebAdministration -ErrorAction Stop; $c = Get-WebConfiguration -Filter 'system.webServer/security/requestFiltering/fileExtensions' -PSPath 'MACHINE/WEBROOT/APPHOST'; if ($c.allowUnlisted -eq $false) { 'compliant' } else { 'noncompliant' }
Output yang diharapkan
compliant

Cara perbaikan

Metode perbaikan: Panduan atau patch infrastruktur

Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' -Filter system.webServer/security/requestFiltering/fileExtensions -Name allowUnlisted -Value False (after adding <add fileExtension='.aspx' allowed='true'/> etc. for required types)

Properti

Sistem operasi
Apa saja
Tag
iisrequest-filtering
Referensi
CIS Microsoft IIS 10 Benchmark v1.2.1 - 4.7 Ensure Unlisted File Extensions are not allowed

Periksa host ini

Jalankan ini pada mesin yang diizinkan untuk Anda audit. Pemindaian bersifat hanya baca.

shell
tmaegis scan --target iis