Can php add cron jobs?
I am cleaning up an infected account of a client, hosting on Hostmonster using their cpanel shared hosting. There are 47 infected sites on the account, mostly Wordpress but a few other cms's as well. One of the symptoms is that there is an executable being written into /var/temp, and then a cron job being set up to call that file every 15 minutes. I get how the scripts are able to write to /var/temp, but should setting up cron jobs like that be possible via php? Or would this mean that the cpanel account itself was most likely compromised?
I deleted both the file in question and the cron job, and it was re-created the following day. I have as of yet not finished cleaning out all of the infected scripts so if it is possible for scripts to set the cron jobs then obviously that is how it is happening, but I wasn't sure if that was the case or not.
Thanks.
-Michael
-
I have seen instances where the shell/cpanel password is not compromised, but the crontab was changed by an infected web application. You should 'stat' the /var/spool/cron/$username file to get a timestamp, and consult the domain access logs and other relevant logs. 0 -
Hello :) I have as of yet not finished cleaning out all of the infected scripts so if it is possible for scripts to set the cron jobs then obviously that is how it is happening, but I wasn't sure if that was the case or not.
Feel free to update us with the outcome after you have finished cleaning out the infected scripts, or let us know if you found anything in the domain access logs. Thank you.0
Please sign in to leave a comment.
Comments
2 comments