2022-09-29 12:27:20 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
|
|
|
|
|
|
|
|
# vars gotify
|
|
|
|
readonly TOKEN="<TOKEN_GOTIFY_APP>"
|
|
|
|
|
|
|
|
#vars chkrootkit
|
|
|
|
SNIFFERS_WHITELIST="dhclient"
|
|
|
|
FILES_WHITELIST="/usr/lib/ruby/vendor_ruby/rubygems/ssl_certs/.document "
|
|
|
|
FILES_WHITELIST="${FILES_WHITELIST} /usr/lib/python3/dist-packages/fail2ban/tests/files/config/apache-auth/*/.htaccess "
|
|
|
|
FILES_WHITELIST="${FILES_WHITELIST} /usr/lib/python3/dist-packages/fail2ban/tests/files/config/apache-auth/*/.htpasswd "
|
|
|
|
FILES_WHITELIST="${FILES_WHITELIST} /usr/lib/python3/dist-packages/fail2ban/tests/files/config/apache-auth/*/*/.htaccess "
|
|
|
|
FILES_WHITELIST="${FILES_WHITELIST} /usr/lib/python3/dist-packages/fail2ban/tests/files/config/apache-auth/*/*/.htpasswd"
|
|
|
|
|
|
|
|
OUT=$(chkrootkit -q -s "$SNIFFERS_WHITELIST" -e "$FILES_WHITELIST")
|
|
|
|
if [ -n "$OUT" ]
|
|
|
|
then
|
2023-07-20 12:52:12 +02:00
|
|
|
sh ./utils/gotifypush.sh "CHK Scan $(hostname)" "$OUT" 5 $TOKEN
|
2022-09-29 12:27:20 +02:00
|
|
|
else
|
|
|
|
echo "[chkrootkit] system clean"
|
|
|
|
fi
|