TMAegis
Thêm quy tắc cho iis

Microsoft IIS

TMA-IIS-4.8

Ensure Handler is not granted Write and Script/Execute

CaoCấp 1Tự độngiis

Mô tả

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.

Cách kiểm tra

Phương pháp kiểm tra: Lệnh shell

shell
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' }
Đầu ra mong đợi
compliant

Cách khắc phục

Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng

Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' -Filter system.webServer/handlers -Name accessPolicy -Value 'Read,Script'

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
iisrequest-filtering
Tham chiếu
CIS Microsoft IIS 10 Benchmark v1.2.1 - 4.8 Ensure Handler is not granted Write and Script/Execute

Kiểm tra máy này

Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.

shell
tmaegis scan --target iis