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.fso.windows:def:4978
# Anonymous access to the registry must be restricted.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
#
# MANUAL REVIEW REQUIRED -- the module(s) below could not be reconstructed
# into working code from curated SCC reference data, and are excluded from
# the automated result:
# - regkeyeffectiverights53_object (regkeyeffectiverights53_test) -- Winreg key has no non-(admin,backup,localsvc) rights to check: <set> composition (base object oval:mil.disa.fso.windows:obj:497802): member unresolved -- no extractor for field "key_wow64_res"
# - regkeyeffectiverights53_object (regkeyeffectiverights53_test) -- Winreg key has no bad rights for non-(admin,backup,localsvc): <set> composition (base object oval:mil.disa.fso.windows:obj:497802): member unresolved -- cannot derive an existence probe for this object type
# - regkeyeffectiverights53_object (regkeyeffectiverights53_test) -- Winreg key has no non-admin rights to check: <set> composition (base object oval:mil.disa.fso.windows:obj:497802): member unresolved -- no extractor for field "key_wow64_res"
# - regkeyeffectiverights53_object (regkeyeffectiverights53_test) -- Winreg key has no bad rights for non-admin: <set> composition (base object oval:mil.disa.fso.windows:obj:497802): member unresolved -- cannot derive an existence probe for this object type
# Winreg key exists
# registry_object (registry_test)
function test_1 {
return ($null -ne (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg' -Name ''))
}
if (test_1) {
Write-Output "PASS (automated portion only -- MANUAL REVIEW still required, see notes above)"
} else {
Write-Output "FAIL (or see MANUAL REVIEW note above)"
} 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 windows_7 target this check assesses.
# OVAL Definition: oval:mil.disa.fso.windows:def:4978
if (!(Test-Path 'HKLM:\System\CurrentControlSet\Control\SecurePipeServers\winreg') -or `
!(Get-Acl 'HKLM:\System\CurrentControlSet\Control\SecurePipeServers\winreg').Access.IsPresent -or `
!(Get-Acl 'HKLM:\System\CurrentControlSet\Control\SecurePipeServers\winreg').Access[0].AccessControlType -eq 'Allow' -or `
!(Get-Acl 'HKLM:\System\CurrentControlSet\Control\SecurePipeServers\winreg').Access[0].FileSystemRights -eq 'FullControl' -or `
!(Get-Acl 'HKLM:\System\CurrentControlSet\Control\SecurePipeServers\winreg').Access[1].IdentityReference -eq 'BUILTIN\Administrators' -or `
!(Get-Acl 'HKLM:\System\CurrentControlSet\Control\SecurePipeServers\winreg').Access[1].AccessControlType -eq 'Allow' -or `
!(Get-Acl 'HKLM:\System\CurrentControlSet\Control\SecurePipeServers\winreg').Access[1].PropagationFlags -eq 0) {
Write-Output "FAIL"; exit 1
}
Write-Output "PASS"; exit 0