FIX(4.1.11): add SUDO to find suid files

This commit is contained in:
Thibault Ayanides 2021-04-12 11:58:24 +02:00 committed by Thibault Ayanides
parent d26ad48416
commit f6c6e6a0a8

View File

@ -17,8 +17,9 @@ HARDENING_LEVEL=4
# shellcheck disable=2034
DESCRIPTION="Collect use of privileged commands."
SUDO_CMD='sudo -n'
# Find all files with setuid or setgid set
AUDIT_PARAMS=$(find / -xdev \( -perm -4000 -o -perm -2000 \) -type f |
AUDIT_PARAMS=$($SUDO_CMD find / -xdev \( -perm -4000 -o -perm -2000 \) -type f |
awk '{print "-a always,exit -F path=" $1 " -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged" }')
FILE='/etc/audit/audit.rules'