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:2031
# Unapproved Users have access to Debug programs.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# accesstoken_object (accesstoken_test)
function test_1 {
return (($__tmp = "$env:TEMP\scc_userrights_$([guid]::NewGuid().Guid).cfg"; secedit /export /cfg $__tmp /areas USER_RIGHTS /quiet | Out-Null; $__m = Select-String -Path $__tmp -Pattern '^SeDebugPrivilege\s*=\s*(.+)$'; Remove-Item $__tmp -ErrorAction SilentlyContinue; if ($__m -and $__m.Matches[0].Groups[1].Value.Trim().Length -gt 0) { '1' } else { '0' }) -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 windows_vista target this check assesses.
# OVAL Definition: oval:mil.disa.fso.windows:def:2031
$seDebugPrivilege = (Get-CimInstance -ClassName Win32_Account -Filter "Name LIKE 'SeDebugPrivilege'").PasswordRequired
if ($seDebugPrivilege -eq $false) { Write-Output "PASS"; exit 0 } else { Write-Output "FAIL"; exit 1 }