Skip to content

Commit

Permalink
FIX(4.1.11): add SUDO to find suid files
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultserti committed Apr 13, 2021
1 parent d26ad48 commit f6c6e6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/hardening/4.1.11_record_privileged_commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit f6c6e6a

Please sign in to comment.