Cpanel Account Hacked, Or Just The Wp Sites?

crwilliams

Well-Known Member
Sep 10, 2002
49
0
156
I'm helping out someone who's on a hosting account elsewhere from my own servers, so I'm missing WHM tools. But I was thinking of letting the person move to one of my servers, so I wanted to see what I was getting into first.

I'm basically trying to determine whether this person has had their entire cPanel account compromised or if there is a lingering backdoor on one or all three WordPress sites on the cPanel account.

Ordinarily, I'd admit I missed something when cleaning up the sites for them. But I'm seeing something I haven't before. As soon as I log out of SSH on their account, the hackers have the nav-menu.php on all three of their sites injected with their malicious code. And they're apparently using a touch command along the way to set the modification date. So to see the actual change time, I have to stat nav-menu.php.

All three copies of that file, on the three separate wordpress installs, have nearly identical results when I stat that file after it's been hacked again. Does that provide any relevance to the nature of the compromise and if it's the whole account?

Thanks for any advice or nudges in the right direction!
 

quizknows

Well-Known Member
Oct 20, 2009
1,008
87
78
cPanel Access Level
DataCenter Provider
Generally with add-on domains, if one site gets hit they all get hit. At least it's only three.

What you need to do with that stat time is consult the domain access logs; likely another hacked file is being used to change that one. Look for POST requests especially, or anything that matches the change time.

Usually with stuff like this it's just the WP sites, but you can always change the cpanel password to help be sure, and review the cpanel access log if you can for any unauthorized IPs or file manager access.

edit; also humor yourself and check the crontab or any .bash* files in the users home directory.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,229
463