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:3880
# The system must not have unnecessary features installed.
# 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:
# - file_object (file_test) -- Verifes Windows Media Center feature is not installed: cannot derive an existence probe for this object type
# - file_object (file_test) -- Verifes TFTP Client feature is not installed: cannot derive an existence probe for this object type
# - file_object (file_test) -- Verifes Telnet Client feature is not installed: cannot derive an existence probe for this object type
# - file_object (file_test) -- Verifes Games feature is not installed: cannot derive an existence probe for this object type
# Verifes Telnet Server feature is not installed
# registry_object (registry_test)
function test_3 {
return (-not ($null -ne (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services' -Name 'tlntsvr')))
}
# Verifes Simple TCPIP Services feature is not installed
# registry_object (registry_test)
function test_5 {
return (-not ($null -ne (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\simptcp' -Name 'DisplayName')))
}
if ((test_3 -and test_5)) {
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:3880
$featuresToCheck = @(
@{Path = "C:\Windows\eHome\ehshell.exe"; ExpectedExistence = "none_exist"},
@{Path = "C:\Windows\System32\tftp.exe"; ExpectedExistence = "none_exist"},
@{RegistryPath = "HKLM:\SYSTEM\CurrentControlSet\Services\tlntsvr"; ExpectedExistence = "none_exist"},
@{Path = "C:\Windows\System32\telnet.exe"; ExpectedExistence = "none_exist"},
@{RegistryPath = "HKLM:\SYSTEM\CurrentControlSet\Services\simptcp"; ExpectedExistence = "none_exist"},
@{Path = "C:\Program Files\WindowsApps\Microsoft.XboxGameOverlay_1.3.1001.0_x64__8wekyb3d8bbwe"; ExpectedExistence = "none_exist"}
)
foreach ($feature in $featuresToCheck) {
if ($feature.RegistryPath) {
if (Get-ItemProperty -Path $feature.RegistryPath -ErrorAction SilentlyContinue) {
Write-Output "FAIL"
exit 1
}
} else {
if (Test-Path -Path $feature.Path -PathType Leaf -ErrorAction SilentlyContinue) {
Write-Output "FAIL"
exit 1
}
}
}
Write-Output "PASS"
exit 0