TMAegis
iis のその他のルール

TMA-IIS-4.7

Ensure Unlisted File Extensions are not allowed

中レベル 1自動iis

説明

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.

チェック方法

監査方法: シェルコマンド

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' }
期待される出力
compliant

修正方法

修正方法: ガイダンスまたは IaC パッチ

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)

プロパティ

オペレーティングシステム
すべて
タグ
iisrequest-filtering
参照
CIS Microsoft IIS 10 Benchmark v1.2.1 - 4.7 Ensure Unlisted File Extensions are not allowed

このホストをチェック

監査が許可されているマシンで実行してください。スキャンは読み取り専用です。

shell
tmaegis scan --target iis