![]() |
|
Guide CloudPanel Site Hacked? How to Find Malware, Clean Up and Lock It Down - Printable Version +- AdminsForum (https://adminsforum.com) +-- Forum: Free & open-source control panels (https://adminsforum.com/Forum-free-open-source-control-panels) +--- Forum: CloudPanel (https://adminsforum.com/Forum-cloudpanel) +---- Forum: CloudPanel Guides & Tutorials (https://adminsforum.com/Forum-cloudpanel-guides-tutorials) +----- Forum: CloudPanel Security Guides (https://adminsforum.com/Forum-cloudpanel-security-guides) +----- Thread: Guide CloudPanel Site Hacked? How to Find Malware, Clean Up and Lock It Down (/Thread-guide-cloudpanel-site-hacked-how-to-find-malware-clean-up-and-lock-it-down) |
CloudPanel Site Hacked? How to Find Malware, Clean Up and Lock It Down - JAY - 10-23-2026 CloudPanel site hacked? How to find malware, clean up and lock it down Spam pages in Google, visitors redirected to strange sites, a hosting abuse email, or the server suddenly at 100% CPU: these are the classic signs of a hacked site. Don't panic, and don't just delete the one bad file you found. Attackers almost always leave more than one way back in. This guide gives you a calm, ordered way to deal with it on a CloudPanel server. Step 1: Contain it
Step 2: Find what changed Recently changed PHP files (adjust the date to a few days before you noticed the problem): Code: find /home/siteuser/htdocs -name '*.php' -newermt '2026-10-01' -type f | head -100Code: find /home/siteuser/htdocs -path '*uploads*' -name '*.php'Code: grep -rlE 'eval\(base64_decode|gzinflate\(base64|str_rot13\(|assert\(\$_(POST|GET|REQUEST)' /home/siteuser/htdocs | head -50Code: crontab -l -u siteuser
crontab -lCode: ps aux --sort=-%cpu | head -15
ss -tnp | grep -v '127.0.0.1' | head -30Code: wp user list --role=administratorStep 3: Find out how they got in Cleaning without closing the hole means you'll be hacked again next week. The usual entry points:
Code: grep -E 'POST' /home/siteuser/logs/nginx/access.log | awk '{print $7}' | sort | uniq -c | sort -rn | head -20Step 4: Clean up (or restore) Best option: restore a clean backup from before the hack, then update everything right away. See How to restore a site from a CloudPanel backup. Check the backup's date against the first bad file you found; a backup taken after the break-in is infected too. No clean backup? For WordPress:
Step 5: Change every password Assume everything stored on the server was read: CloudPanel users (clpctl user:reset:password), SSH/SFTP users, database passwords (update the app's config afterwards), WordPress admins, API keys and SMTP passwords in config files. Also generate new WordPress salts in Code: wp-config.phpStep 6: Make it harder next time
If you're not sure whether a file is malicious, post the file name and a few lines (never passwords) in this section and ask. Sources: WP-CLI: verify-checksums ยท Google: help for hacked sites More CloudPanel troubleshooting
Applies to CloudPanel v2 on Ubuntu and Debian, October 2026. Replace Code: example.comCode: siteuser |