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.
#!/bin/bash
# Reconstructed from oval:mil.disa.fso.rhel11:def:46
# The FTPS/FTP service on the system must be configured with the Department of Defense (DoD) login banner.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# VSFTP not installed
# rpminfo_object (rpminfo_test)
test_1() {
! ( rpm -q --quiet 'vsftpd' &>/dev/null )
}
# DoD Banner message exist
# textfilecontent54_object (textfilecontent54_test)
test_2() {
grep -Pq '^\s*banner_file\s*=\s*(\S+)' '/etc/vsftpd/vsftpd.conf' &>/dev/null
}
# vsftp warning banner
# textfilecontent54_object (textfilecontent54_test)
test_3() {
grep -P '(^\s*You\s+are\s+accessing\s+a\s+U\.S\.\s+Government\s+\(USG\)\s+Information\s+System\s+\(IS\)\s+that\s+is\s+provided\s+for\s+USG[-]authorized\s+use\s+only\.\s+By\s+using\s+this\s+IS\s+\(which\s+includes\s+any\s+device\s+attached\s+to\s+this\s+IS\),\s+you\s+consent\s+to\s+the\s+following\s+conditions:\s+[-]+\s*The\s+USG\s+routinely\s+intercepts\s+and\s+monitors\s+communications\s+on\s+this\s+IS\s+for\s+purposes\s+including,\s+but\s+not\s+limited\s+to,\s+penetration\s+testing,\s+COMSEC\s+monitoring,\s+network\s+operations\s+and\s+defense,\s+personnel\s+misconduct\s+\(PM\),\s+law\s+enforcement\s+\(LE\),\s+and\s+counterintelligence\s+\(CI\)\s+investigations\.\s+[-]+\s*At\s+any\s+time,\s+the\s+USG\s+may\s+inspect\s+and\s+seize\s+data\s+stored\s+on\s+this\s+IS\.\s+[-]+\s*Communications\s+using,\s+or\s+data\s+stored\s+on,\s+this\s+IS\s+are\s+not\s+private,\s+are\s+subject\s+to\s+routine\s+monitoring,\s+interception,\s+and\s+search,\s+and\s+may\s+be\s+disclosed\s+or\s+used\s+for\s+any\s+USG[-]authorized\s+purpose\.\s+[-]+\s*This\s+IS\s+includes\s+security\s+measures\s+\(e\.g\.,\s+authentication\s+and\s+access\s+controls\)\s+to\s+protect\s+USG\s+interests[-]+\s*[-]+\s*not\s+for\s+your\s+personal\s+benefit\s+or\s+privacy\.\s+[-]+\s*Notwithstanding\s+the\s+above,\s+using\s+this\s+IS\s+does\s+not\s+constitute\s+consent\s+to\s+PM,\s+LE\s+or\s+CI\s+investigative\s+searching\s+or\s+monitoring\s+of\s+the\s+content\s+of\s+privileged\s+communications,\s+or work product,\s+related\s+to\s+personal\s+representation\s+or\s+services\s+by\s+attorneys,\s+psychotherapists,\s+or\s+clergy,\s+and\s+their\s+assistants\.\s+Such\s+communications\s+and\s+work\s+product\s+are\s+private\s+and\s+confidential\.\s+See\s+User\s+Agreement\s+for\s+details\.|I've\s+read\s+&\s+consent\s+to\s+terms\s+in\s+IS\s+user\s+agreem't\.)' &>/dev/null
}
# gssftp not installed
# file_object (file_test)
test_4() {
! ( test -e '/etc/xinetd.d/gssftp' &>/dev/null )
}
# DoD Banner message exist
# textfilecontent54_object (textfilecontent54_test)
test_5() {
grep -Pq '^\s*banner\s+=\s+(\S+)' '/etc/xinetd.d/gssftp' &>/dev/null
}
# gssftp warning banner
# textfilecontent54_object (textfilecontent54_test)
test_6() {
grep -P '(^\s*You\s+are\s+accessing\s+a\s+U\.S\.\s+Government\s+\(USG\)\s+Information\s+System\s+\(IS\)\s+that\s+is\s+provided\s+for\s+USG[-]authorized\s+use\s+only\.\s+By\s+using\s+this\s+IS\s+\(which\s+includes\s+any\s+device\s+attached\s+to\s+this\s+IS\),\s+you\s+consent\s+to\s+the\s+following\s+conditions:\s+[-]+\s*The\s+USG\s+routinely\s+intercepts\s+and\s+monitors\s+communications\s+on\s+this\s+IS\s+for\s+purposes\s+including,\s+but\s+not\s+limited\s+to,\s+penetration\s+testing,\s+COMSEC\s+monitoring,\s+network\s+operations\s+and\s+defense,\s+personnel\s+misconduct\s+\(PM\),\s+law\s+enforcement\s+\(LE\),\s+and\s+counterintelligence\s+\(CI\)\s+investigations\.\s+[-]+\s*At\s+any\s+time,\s+the\s+USG\s+may\s+inspect\s+and\s+seize\s+data\s+stored\s+on\s+this\s+IS\.\s+[-]+\s*Communications\s+using,\s+or\s+data\s+stored\s+on,\s+this\s+IS\s+are\s+not\s+private,\s+are\s+subject\s+to\s+routine\s+monitoring,\s+interception,\s+and\s+search,\s+and\s+may\s+be\s+disclosed\s+or\s+used\s+for\s+any\s+USG[-]authorized\s+purpose\.\s+[-]+\s*This\s+IS\s+includes\s+security\s+measures\s+\(e\.g\.,\s+authentication\s+and\s+access\s+controls\)\s+to\s+protect\s+USG\s+interests[-]+\s*[-]+\s*not\s+for\s+your\s+personal\s+benefit\s+or\s+privacy\.\s+[-]+\s*Notwithstanding\s+the\s+above,\s+using\s+this\s+IS\s+does\s+not\s+constitute\s+consent\s+to\s+PM,\s+LE\s+or\s+CI\s+investigative\s+searching\s+or\s+monitoring\s+of\s+the\s+content\s+of\s+privileged\s+communications,\s+or work product,\s+related\s+to\s+personal\s+representation\s+or\s+services\s+by\s+attorneys,\s+psychotherapists,\s+or\s+clergy,\s+and\s+their\s+assistants\.\s+Such\s+communications\s+and\s+work\s+product\s+are\s+private\s+and\s+confidential\.\s+See\s+User\s+Agreement\s+for\s+details\.|I've\s+read\s+&\s+consent\s+to\s+terms\s+in\s+IS\s+user\s+agreem't\.)' &>/dev/null
}
if ( ( test_1 || ( test_2 && test_3 ) ) && ( test_4 || ( test_5 && test_6 ) ) ); then
echo "PASS"
else
echo "FAIL"
fi Assessment Script Powered by AISandbox-executed
A standalone Shell script to assess this control automatically. Review before running it in your environment.
Syntax-checked and actually executed in an isolated sandbox (not the real system this checks) — confirmed to run without errors.
#!/bin/sh
# oval:mil.disa.fso.rhel11:def:46 compliant Shell script
if ! command -v rpm &> /dev/null; then
echo "FAIL"
exit 1
fi
if ! grep -q "^banner_file\\s*=\\s*/etc/banner/vsftp" /etc/vsftpd.conf; then
echo "FAIL"
exit 1
fi
if ! [ -f "/etc/banner/vsftp" ]; then
echo "FAIL"
exit 1
fi
if ! grep -q "You are accessing a U.S. Government \(USG\) Information System" /etc/banner/vsftp; then
echo "FAIL"
exit 1
fi
echo "PASS"
exit 0