TMA-IIS-3.9
Ensure 'MachineKey validation method - .Net 4.5' is configured
Mô tả
The machineKey element of the ASP.NET web.config specifies the algorithm and keys that ASP.NET will use for encryption. The Machine Key feature can be managed to specify hashing and encryption settings for application services such as view state, Forms authentication, membership and roles, and anonymous identification. The following validation methods are available ... The .NET 4.x root web.config machineKey validation must be HMACSHA256 (HMACSHA384/512 are also accepted as stronger). PowerShell 5.1 with the WebAdministration module; run elevated.
Cách kiểm tra
Phương pháp kiểm tra: Lệnh shell
Import-Module WebAdministration -ErrorAction Stop; $c = Get-WebConfiguration -Filter 'system.web/machineKey' -PSPath 'MACHINE/WEBROOT'; if ([string]$c.validation -in @('HMACSHA256', 'HMACSHA384', 'HMACSHA512')) { 'compliant' } else { 'noncompliant' }- Đầ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' -Filter system.web/machineKey -Name validation -Value HMACSHA256
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- iisaspnetcrypto
- Tham chiếu
- CIS Microsoft IIS 10 Benchmark v1.2.1 - 3.9 Ensure 'MachineKey validation method - .Net 4.5' is configured
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.
tmaegis scan --target iis