23 lines
938 B
Bash
23 lines
938 B
Bash
#!/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
|
|
sh ./gotifypush.sh "CHK Scan handycat cloud" "$OUT" 5 $TOKEN
|
|
else
|
|
echo "[chkrootkit] system clean"
|
|
fi
|