TMA-IIS-4.8
Ensure Handler is not granted Write and Script/Execute
説明
Handler mappings can be configured to give permissions to Read, Write, Script, or Execute depending on what the use is for - reading static content, uploading files, executing scripts, etc. It is recommended to grant a handler either Execute/Script or Write permissions, but not both. The server-level handlers accessPolicy must not contain Write together with Script or Execute. PowerShell 5.1 with the WebAdministration module; run elevated. CIS marks this recommendation Manual; the automated check implements its audit procedure.
チェック方法
監査方法: シェルコマンド
Import-Module WebAdministration -ErrorAction Stop; $p = [string](Get-WebConfiguration -Filter 'system.webServer/handlers' -PSPath 'MACHINE/WEBROOT/APPHOST').accessPolicy; if ($p -match 'Write' -and $p -match 'Script|Execute') { 'noncompliant' } else { 'compliant' }- 期待される出力
compliant
修正方法
修正方法: ガイダンスまたは IaC パッチ
Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' -Filter system.webServer/handlers -Name accessPolicy -Value 'Read,Script'
プロパティ
- オペレーティングシステム
- すべて
- タグ
- iisrequest-filtering
- 参照
- CIS Microsoft IIS 10 Benchmark v1.2.1 - 4.8 Ensure Handler is not granted Write and Script/Execute
このホストをチェック
監査が許可されているマシンで実行してください。スキャンは読み取り専用です。
tmaegis scan --target iis