Microsoft IIS
TMA-IIS-3.5
Ensure ASP.NET stack tracing is not enabled
低レベル 2自動iis
説明
The trace element configures the ASP.NET code tracing service that controls how trace results are gathered, stored, and displayed. When tracing is enabled, each page request generates trace messages that can be appended to the page output or stored in an application trace log. ASP.NET trace must not be enabled in the root web.config or any site (page-level Trace="true" is not checked). PowerShell 5.1 with the WebAdministration module; run elevated.
チェック方法
監査方法: シェルコマンド
shell
Import-Module WebAdministration -ErrorAction Stop; $paths = @('MACHINE/WEBROOT') + @(Get-Website | ForEach-Object { "IIS:\Sites\$($_.Name)" }); $bad = @($paths | Where-Object { $c = Get-WebConfiguration -Filter 'system.web/trace' -PSPath $_; $c.enabled -eq $true }); if ($bad.Count -eq 0) { 'compliant' } else { 'noncompliant' }- 期待される出力
compliant
修正方法
修正方法: ガイダンスまたは IaC パッチ
Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST/<site>' -Filter system.web/trace -Name enabled -Value False
プロパティ
- オペレーティングシステム
- すべて
- タグ
- iisinformation-disclosure
- 参照
- CIS Microsoft IIS 10 Benchmark v1.2.1 - 3.5 Ensure ASP.NET stack tracing is not enabled
このホストをチェック
監査が許可されているマシンで実行してください。スキャンは読み取り専用です。
shell
tmaegis scan --target iis --level 2