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.defenderantivirus:def:37
# Microsoft Defender AV must be configured to block Win32 imports from macro code in Office.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# Verify Windows 10 is release id 1709 or newer
# registry_object (registry_test)
function test_1 {
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\Microsoft\Windows NT\CurrentVersion').GetValueKind('ReleaseId').ToString()]) -eq 'reg_sz') -and (((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' -Name 'ReleaseId' -ErrorAction SilentlyContinue) | Select-Object -ExpandProperty 'ReleaseId') -ge '1709'))
}
# Computer Configuration\Administrative Templates\Windows Components\Microsoft Defender Antivirus\Microsoft Defender Exploit Guard\Attack Surface Reduction\Configure Attack Surface Reduction rules
# 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 Defender\Windows Defender Exploit Guard\ASR\Rules').GetValueKind('92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B').ToString()]) -eq 'reg_sz') -and (((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules' -Name '92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B' -ErrorAction SilentlyContinue) | Select-Object -ExpandProperty '92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B') -eq '1'))
}
if ((test_1 -or test_2)) {
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_defender_antivirus target this check assesses.
# OVAL Definition: oval:mil.disa.stig.defenderantivirus:def:37
$releaseId = (Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion" -Name "ReleaseId").ReleaseId
if ($releaseId -ge 1709 -or (Test-Path -Path "HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules\92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B" -and ((Get-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules\92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B").Value -eq "1"))){
Write-Output "PASS"
exit 0
} else {
Write-Output "FAIL"
exit 1
}