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:504
# System audit tool executables must not have extended ACLs.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# Tools used for manipulating audit logs must not have ACL's.
# file_object (file_test)
test_1() {
(stat -c '%A' '/sbin/auditctl' | awk '{print (index($0,"+")>0)?"true":"false"}') | grep -qxF 'true'
}
# Tools used for manipulating audit logs must not have ACL's.
# file_object (file_test)
test_2() {
(stat -c '%A' '/sbin/auditd' | awk '{print (index($0,"+")>0)?"true":"false"}') | grep -qxF 'true'
}
# Tools used for manipulating audit logs must not have ACL's.
# file_object (file_test)
test_3() {
(stat -c '%A' '/sbin/ausearch' | awk '{print (index($0,"+")>0)?"true":"false"}') | grep -qxF 'true'
}
# Tools used for manipulating audit logs must not have ACL's.
# file_object (file_test)
test_4() {
(stat -c '%A' '/sbin/aureport' | awk '{print (index($0,"+")>0)?"true":"false"}') | grep -qxF 'true'
}
# Tools used for manipulating audit logs must not have ACL's.
# file_object (file_test)
test_5() {
(stat -c '%A' '/sbin/autrace' | awk '{print (index($0,"+")>0)?"true":"false"}') | grep -qxF 'true'
}
# Tools used for manipulating audit logs must not have ACL's.
# file_object (file_test)
test_6() {
(stat -c '%A' '/sbin/audispd' | awk '{print (index($0,"+")>0)?"true":"false"}') | grep -qxF 'true'
}
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 Definition: oval:mil.disa.fso.rhel11:def:504
if [ ! -d "/sbin" ]; then echo "PASS"; exit 0; fi
for file in auditctl auditd ausearch aureport autrace; do
if [ -f "/sbin/$file" ]; then
if [ "$(stat -c '%A' "/sbin/$file")" != "*-wx------" ] && \
grep -q "^/sbin/$file.*acl" /etc/fstab || \
! getfacl "/sbin/$file" | grep -q "access:"; then
echo "PASS"; exit 0;
fi
fi
done
echo "FAIL"; exit 1