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.windows11:def:253452
# Anonymous SID/Name translation must not be allowed.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# 'Network access: Allow anonymous SID/Name translation' is set to 'Disabled'
# passwordpolicy_object (passwordpolicy_test)
function test_1 {
return (($__tmp = "$env:TEMP\scc_securitypolicy_$([guid]::NewGuid().Guid).cfg"; secedit /export /cfg $__tmp /areas SECURITYPOLICY /quiet | Out-Null; $__m = Select-String -Path $__tmp -Pattern '^LSAAnonymousNameLookup\s*=\s*(\d+)'; Remove-Item $__tmp -ErrorAction SilentlyContinue; if ($__m) { $__m.Matches[0].Groups[1].Value.Trim() } else { '' }) -eq '0')
}
if (test_1) {
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_11 target this check assesses.
# OVAL Definition: oval:mil.disa.stig.windows11:def:253452
$policySetting = Get-ItemProperty -ErrorAction SilentlyContinue -Path 'HKLM:\System\CurrentControlSet\Services\LanmanServer\Parameters'
if ($policySetting -and $policySetting.AnonymousNameLookup -eq 0) { Write-Output "PASS"; Exit 0 } else { Write-Output "FAIL"; Exit 1 }