V8.00.000.2025.06.17
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -34,7 +34,7 @@ install_verification() {
|
||||
chroot_script "${TARGET}" "
|
||||
export INITRD=No
|
||||
apt-get install -y --no-install-recommends --no-install-suggests auditd 2>&1 | tee -a ${var_logfile}
|
||||
echo ExitCode: \$? >> ${var_logfile}
|
||||
echo ExitCode of PIPESTATUS[0]: [\${PIPESTATUS[0]}] >> ${var_logfile}
|
||||
"
|
||||
|
||||
rm -f "${TARGET}/etc/audit/rules.d/audit.rules"
|
||||
@@ -339,14 +339,14 @@ EOF
|
||||
|
||||
chroot_script "${TARGET}" "
|
||||
systemctl enable auditd.service 2>&1 | tee -a ${var_logfile}
|
||||
echo ExitCode: \$? >> ${var_logfile}
|
||||
echo ExitCode of PIPESTATUS[0]: [\${PIPESTATUS[0]}] >> ${var_logfile}
|
||||
"
|
||||
|
||||
### Validate and build audit rules now; fail early if syntax is wrong.
|
||||
chroot_script "${TARGET}" "
|
||||
if command -v augenrules >/dev/null 2>&1; then
|
||||
augenrules --load 2>&1 | tee -a ${var_logfile}
|
||||
echo ExitCode: \$? >> ${var_logfile}
|
||||
echo ExitCode of PIPESTATUS[0]: [\${PIPESTATUS[0]}] >> ${var_logfile}
|
||||
else
|
||||
### Fallback: build consolidated rules file without loading into the kernel.
|
||||
if command -v bash >/dev/null 2>&1; then
|
||||
@@ -358,7 +358,7 @@ EOF
|
||||
chroot_script "${TARGET}" "
|
||||
export INITRD=No
|
||||
apt-get install -y --no-install-recommends --no-install-suggests aide aide-common 2>&1 | tee -a ${var_logfile}
|
||||
echo ExitCode: \$? >> ${var_logfile}
|
||||
echo ExitCode of PIPESTATUS[0]: [\${PIPESTATUS[0]}] >> ${var_logfile}
|
||||
sed -i 's/Checksums = H/Checksums = sha512/' /etc/aide/aide.conf
|
||||
aideinit > /dev/null 2>> ${var_logfile}
|
||||
"
|
||||
@@ -366,7 +366,7 @@ EOF
|
||||
chroot_script "${TARGET}" "
|
||||
export INITRD=No
|
||||
apt-get install -y --no-install-recommends --no-install-suggests debsums 2>&1 | tee -a ${var_logfile}
|
||||
echo ExitCode: \$? >> ${var_logfile}
|
||||
echo ExitCode of PIPESTATUS[0]: [\${PIPESTATUS[0]}] >> ${var_logfile}
|
||||
if ! debsums -g >> ${var_logfile} 2>> ${var_logfile}; then
|
||||
printf 'Running debsums -g - encountered errors.' >> ${var_logfile}
|
||||
fi
|
||||
@@ -374,7 +374,7 @@ EOF
|
||||
|
||||
chroot_script "${TARGET}" "
|
||||
rkhunter --propupd 2>&1 | tee -a ${var_logfile}
|
||||
echo ExitCode: \$? >> ${var_logfile}
|
||||
echo ExitCode of PIPESTATUS[0]: [\${PIPESTATUS[0]}] >> ${var_logfile}
|
||||
"
|
||||
|
||||
guard_dir && return 0
|
||||
|
||||
Reference in New Issue
Block a user