The reconstructed evaluation script behind this rule's OVAL check(s) — every module a compound check combines, with this rule's own concrete values and DISA's SCC tool's real per-module mechanism curated from static teardown of SCC releases.
# Windows PowerShell
# Reconstructed from oval:mil.disa.stig.windows:def:19
# Hardened UNC paths must be defined to require mutual authentication and integrity for at least the \\*\SYSVOL and \\*\NETLOGON shares.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# DomainRole is 0 or 2
# wmi_object (wmi_test)
function test_1 {
return ((((Get-CimInstance -Namespace 'root\cimv2' -Query 'SELECT DomainRole FROM Win32_ComputerSystem' | Select-Object -First 1) | Select-Object -ExpandProperty 'DomainRole') -eq 0) -or (((Get-CimInstance -Namespace 'root\cimv2' -Query 'SELECT DomainRole FROM Win32_ComputerSystem' | Select-Object -First 1) | Select-Object -ExpandProperty 'DomainRole') -eq 2))
}
# Mutual Authentication and Integrity for \\*\SYSVOL
# registry_object (registry_test)
function test_2 {
return ((((@{String='reg_sz';ExpandString='reg_expand_sz';Binary='reg_binary';DWord='reg_dword';MultiString='reg_multi_sz';QWord='reg_qword';None='reg_none'}[(Get-Item -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths').GetValueKind('\\*\SYSVOL').ToString()]) -eq 'reg_sz') -and (((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths' -Name '\\*\SYSVOL' -ErrorAction SilentlyContinue) | Select-Object -ExpandProperty '\\*\SYSVOL') -match '(^| *, *)RequireMutualAuthentication=1( *, *|$)')) -and (((@{String='reg_sz';ExpandString='reg_expand_sz';Binary='reg_binary';DWord='reg_dword';MultiString='reg_multi_sz';QWord='reg_qword';None='reg_none'}[(Get-Item -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths').GetValueKind('\\*\SYSVOL').ToString()]) -eq 'reg_sz') -and (((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths' -Name '\\*\SYSVOL' -ErrorAction SilentlyContinue) | Select-Object -ExpandProperty '\\*\SYSVOL') -match '(^|[ *, *])RequireMutualAuthentication=(?!1( *, *|$))')) -and (((@{String='reg_sz';ExpandString='reg_expand_sz';Binary='reg_binary';DWord='reg_dword';MultiString='reg_multi_sz';QWord='reg_qword';None='reg_none'}[(Get-Item -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths').GetValueKind('\\*\SYSVOL').ToString()]) -eq 'reg_sz') -and (((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths' -Name '\\*\SYSVOL' -ErrorAction SilentlyContinue) | Select-Object -ExpandProperty '\\*\SYSVOL') -match '(^| *, *)RequireIntegrity=1( *, *|$)')) -and (((@{String='reg_sz';ExpandString='reg_expand_sz';Binary='reg_binary';DWord='reg_dword';MultiString='reg_multi_sz';QWord='reg_qword';None='reg_none'}[(Get-Item -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths').GetValueKind('\\*\SYSVOL').ToString()]) -eq 'reg_sz') -and (((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths' -Name '\\*\SYSVOL' -ErrorAction SilentlyContinue) | Select-Object -ExpandProperty '\\*\SYSVOL') -match '(^| *, *)RequireIntegrity=(?!1( *, *|$))')))
}
# Mutual Authentication and Integrity for \\*\NETLOGON
# registry_object (registry_test)
function test_3 {
return ((((@{String='reg_sz';ExpandString='reg_expand_sz';Binary='reg_binary';DWord='reg_dword';MultiString='reg_multi_sz';QWord='reg_qword';None='reg_none'}[(Get-Item -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths').GetValueKind('\\*\NETLOGON').ToString()]) -eq 'reg_sz') -and (((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths' -Name '\\*\NETLOGON' -ErrorAction SilentlyContinue) | Select-Object -ExpandProperty '\\*\NETLOGON') -match '(^| *, *)RequireMutualAuthentication=1( *, *|$)')) -and (((@{String='reg_sz';ExpandString='reg_expand_sz';Binary='reg_binary';DWord='reg_dword';MultiString='reg_multi_sz';QWord='reg_qword';None='reg_none'}[(Get-Item -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths').GetValueKind('\\*\NETLOGON').ToString()]) -eq 'reg_sz') -and (((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths' -Name '\\*\NETLOGON' -ErrorAction SilentlyContinue) | Select-Object -ExpandProperty '\\*\NETLOGON') -match '(^|[ *, *])RequireMutualAuthentication=(?!1( *, *|$))')) -and (((@{String='reg_sz';ExpandString='reg_expand_sz';Binary='reg_binary';DWord='reg_dword';MultiString='reg_multi_sz';QWord='reg_qword';None='reg_none'}[(Get-Item -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths').GetValueKind('\\*\NETLOGON').ToString()]) -eq 'reg_sz') -and (((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths' -Name '\\*\NETLOGON' -ErrorAction SilentlyContinue) | Select-Object -ExpandProperty '\\*\NETLOGON') -match '(^| *, *)RequireIntegrity=1( *, *|$)')) -and (((@{String='reg_sz';ExpandString='reg_expand_sz';Binary='reg_binary';DWord='reg_dword';MultiString='reg_multi_sz';QWord='reg_qword';None='reg_none'}[(Get-Item -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths').GetValueKind('\\*\NETLOGON').ToString()]) -eq 'reg_sz') -and (((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths' -Name '\\*\NETLOGON' -ErrorAction SilentlyContinue) | Select-Object -ExpandProperty '\\*\NETLOGON') -match '(^| *, *)RequireIntegrity=(?!1( *, *|$))')))
}
if ((test_1 -or (test_2 -and test_3))) {
Write-Output "PASS"
} else {
Write-Output "FAIL"
} Assessment Script Powered by AISyntax-verified
A standalone PowerShell script to assess this control automatically. Review before running it in your environment.
Syntax-checked as valid PowerShell. Not executed here — running it for real needs the actual ms_windows_server_2016 target this check assesses.
# OVAL Definition: oval:mil.disa.stig.windows:def:19
$sysvolPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths"
$netlogonPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths"
$sysvolValue = "RequireMutualAuthentication=1, RequireIntegrity=1"
$netlogonValue = "RequireMutualAuthentication=1, RequireIntegrity=1"
if ((Get-ItemProperty -Path $sysvolPath -ErrorAction SilentlyContinue).Value -match "$sysvolValue" -and
(Get-ItemProperty -Path $netlogonPath -ErrorAction SilentlyContinue).Value -match "$netlogonValue") {
Write-Output "PASS"
exit 0
} else {
Write-Output "FAIL"
exit 1
}