Run the following script:
bash <(curl -s https://raw.githubusercontent.com/lukapaunovic/chkrootkit-install-script/refs/heads/master/install.sh)
To run a server check:
/usr/local/bin/chkrootkit | grep -v -E "not(hing)? (infected|found|tested)"

Run the following script:
bash <(curl -s https://raw.githubusercontent.com/lukapaunovic/chkrootkit-install-script/refs/heads/master/install.sh)
To run a server check:
/usr/local/bin/chkrootkit | grep -v -E "not(hing)? (infected|found|tested)"

Date of Incident: May 5, 2025
Affected System: AlmaLinux 9.5 with cPanel & PostgreSQL
A Linux server running cPanel with PostgreSQL was compromised through a misconfigured PostgreSQL service, which allowed an attacker to upload and execute a malicious binary called cpu_hu. This ELF executable is part of a known crypto mining malware campaign, which abuses PostgreSQL’s permissions to spawn unauthorized processes.
/var/lib/pgsql/data/base/13494/cpu_hupostgres user triggering binary execution/usr/bin/s-nail, /usr/sbin/sendmail, and /usr/sbin/exim with UID 26 (PostgreSQL user)/var/log/messages showing:Killing process <PID> (cpu_hu) with signal SIGKILLThe attacker exploited a misconfigured PostgreSQL installation with either:
trust authentication enabledCOPY TO PROGRAMOnce inside, the attacker used the postgres user to:
pkill -f cpu_hu
find / -type f -name '*cpu_hu*' -delete
crontab -u postgres -r
Edit postgresql.conf and add:
session_preload_libraries = ''
Restart service.
-- Inside psql:
ALTER USER postgres PASSWORD 'new-strong-password';
REVOKE EXECUTE ON FUNCTION pg_ls_dir(text) FROM PUBLIC;
REVOKE EXECUTE ON FUNCTION pg_read_file(text) FROM PUBLIC;
REVOKE EXECUTE ON FUNCTION pg_stat_file(text) FROM PUBLIC;
chown -R postgres:postgres /var/lib/pgsql/data
chmod 700 /var/lib/pgsql/data
systemctl restart postgresql
iptables -A INPUT -p tcp --dport 5432 -s <trusted_ip> -j ACCEPT
iptables -A INPUT -p tcp --dport 5432 -j DROP
COPY TO PROGRAM unless absolutely requiredaudictl -a always,exit -F arch=b64 -S execve -F uid=26 -F path=/usr/bin/s-nail -k mail_postgres_exec
/var/lib/ and /tmpStatus: Resolved