TMAegis
iis 관련 규칙 더 보기

TMA-IIS-2.5

Ensure 'cookie protection mode' is configured for forms authentication

보통레벨 1자동iis

설명

The cookie protection mode defines the protection Forms Authentication cookies will be given within a configured application. The four cookie protection modes that can be defined are: Encryption and validation - Specifies that the application use both data validation and encryption to help protect the cookie; this option uses the configured data validation algorithm (based on the machine key) and triple-DES ... Wherever forms authentication is used, forms protection must be All (encryption and validation). Compliant when forms authentication is not used. 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 { $a = Get-WebConfiguration -Filter 'system.web/authentication' -PSPath $_; $f = Get-WebConfiguration -Filter 'system.web/authentication/forms' -PSPath $_; [string]$a.mode -eq 'Forms' -and ([string]$f.protection -ne 'All') }); if ($bad.Count -eq 0) { 'compliant' } else { 'noncompliant' }
예상 출력
compliant

조치 방법

조치 방식: 가이드 또는 인프라 패치

Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST/<site>' -Filter system.web/authentication/forms -Name protection -Value All

속성

운영 체제
모두
태그
iisauthentication
참고 자료
CIS Microsoft IIS 10 Benchmark v1.2.1 - 2.5 Ensure 'cookie protection mode' is configured for forms authentication

이 호스트 점검하기

감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.

shell
tmaegis scan --target iis