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:424
# Event log sizes do not meet minimum requirements.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# registry_object (registry_test)
function test_1 {
return (((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Application' -Name 'MaxSize' -ErrorAction SilentlyContinue) | Select-Object -ExpandProperty 'MaxSize') -ge 32768)
}
# registry_object (registry_test)
function test_2 {
return (-not ($null -ne (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Application' -Name 'MaxSize')))
}
# registry_object (registry_test)
function test_3 {
return ($null -ne (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Application' -Name 'MaxSize'))
}
# registry_object (registry_test)
function test_4 {
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\EventLog\Application').GetValueKind('MaxSize').ToString()]) -eq 'reg_dword')
}
# registry_object (registry_test)
function test_5 {
return (-not ($null -ne (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Application' -Name 'MaxSize')))
}
# registry_object (registry_test)
function test_6 {
return ($null -ne (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Security' -Name 'MaxSize'))
}
# registry_object (registry_test)
function test_7 {
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\EventLog\Security').GetValueKind('MaxSize').ToString()]) -eq 'reg_dword')
}
# registry_object (registry_test)
function test_8 {
return (-not ($null -ne (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Security' -Name 'MaxSize')))
}
# registry_object (registry_test)
function test_9 {
return (((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Security' -Name 'MaxSize' -ErrorAction SilentlyContinue) | Select-Object -ExpandProperty 'MaxSize') -ge 81920)
}
# registry_object (registry_test)
function test_10 {
return (-not ($null -ne (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Security' -Name 'MaxSize')))
}
# registry_object (registry_test)
function test_11 {
return (((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Setup' -Name 'MaxSize' -ErrorAction SilentlyContinue) | Select-Object -ExpandProperty 'MaxSize') -ge 32768)
}
# registry_object (registry_test)
function test_12 {
return (-not ($null -ne (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Setup' -Name 'MaxSize')))
}
# registry_object (registry_test)
function test_13 {
return ($null -ne (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Setup' -Name 'MaxSize'))
}
# registry_object (registry_test)
function test_14 {
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\EventLog\Setup').GetValueKind('MaxSize').ToString()]) -eq 'reg_dword')
}
# registry_object (registry_test)
function test_15 {
return (-not ($null -ne (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Setup' -Name 'MaxSize')))
}
# registry_object (registry_test)
function test_16 {
return (((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\System' -Name 'MaxSize' -ErrorAction SilentlyContinue) | Select-Object -ExpandProperty 'MaxSize') -ge 32768)
}
# registry_object (registry_test)
function test_17 {
return (-not ($null -ne (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\System' -Name 'MaxSize')))
}
# registry_object (registry_test)
function test_18 {
return ($null -ne (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\System' -Name 'MaxSize'))
}
# registry_object (registry_test)
function test_19 {
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\EventLog\System').GetValueKind('MaxSize').ToString()]) -eq 'reg_dword')
}
# registry_object (registry_test)
function test_20 {
return (-not ($null -ne (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\System' -Name 'MaxSize')))
}
if (((test_1 -or test_2) -and test_3 -and (test_4 -or test_5) -and test_6 -and (test_7 -or test_8) -and (test_9 -or test_10) -and (test_11 -or test_12) -and test_13 -and (test_14 -or test_15) -and (test_16 -or test_17) -and test_18 -and (test_19 -or test_20))) {
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:mil.disa.fso.windows:def:424
$compliant = $true
if(Test-Path -Path "HKLM:\Software\Policies\Microsoft\Windows\EventLog\Application" -ErrorAction SilentlyContinue){
$regPath = "HKLM:\Software\Policies\Microsoft\Windows\EventLog\Application"
$regValue = (Get-ItemProperty -Path $regPath -Name "MaxSize").MaxSize
if(!($regValue -ge 32768)){$compliant = $false}
}else{$compliant = $false}
if(Test-Path -Path "HKLM:\Software\Policies\Microsoft\Windows\EventLog\Security" -ErrorAction SilentlyContinue){
$regPath = "HKLM:\Software\Policies\Microsoft\Windows\EventLog\Security"
$regValue = (Get-ItemProperty -Path $regPath -Name "MaxSize").MaxSize
if(!($regValue -ge 81920)){$compliant = $false}
}else{$compliant = $false}
if(Test-Path -Path "HKLM:\Software\Policies\Microsoft\Windows\EventLog\Setup" -ErrorAction SilentlyContinue){
$regPath = "HKLM:\Software\Policies\Microsoft\Windows\EventLog\Setup"
$regValue = (Get-ItemProperty -Path $regPath -Name "MaxSize").MaxSize
if(!($regValue -ge 32768)){$compliant = $false}
}else{$compliant = $false}
if(Test-Path -Path "HKLM:\Software\Policies\Microsoft\Windows\EventLog\System" -ErrorAction SilentlyContinue){
$regPath = "HKLM:\Software\Policies\Microsoft\Windows\EventLog\System"
$regValue = (Get-ItemProperty -Path $regPath -Name "MaxSize").MaxSize
if(!($regValue -ge 32768)){$compliant = $false}
}else{$compliant = $false}
if($compliant){Write-Output "PASS";Exit 0}else{Write-Output "FAIL";Exit 1}