TMAegis
Više pravila za iis

Microsoft IIS

TMA-IIS-3.5

Ensure ASP.NET stack tracing is not enabled

NiskaNivo 2Automatskaiis

Opis

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.

Kako se proverava

Metod provere: Komanda ljuske

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' }
Očekivani izlaz
compliant

Kako se ispravlja

Metod ispravke: Smernica ili zakrpa infrastrukture

Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST/<site>' -Filter system.web/trace -Name enabled -Value False

Svojstva

Operativni sistemi
Bilo koji
Oznake
iisinformation-disclosure
Referenca
CIS Microsoft IIS 10 Benchmark v1.2.1 - 3.5 Ensure ASP.NET stack tracing is not enabled

Proverite ovaj računar

Pokrenite ovo na računaru za koji imate dozvolu za proveru. Skeniranje radi u režimu samo za čitanje.

shell
tmaegis scan --target iis --level 2