One of my site was infested with malware once and since then I am seeing every alternate day the header.php files are getting reverted back to older versions (possibly by a script) and a malicious script is inserted somewhere in the file:
I have cleansed the server many a times but in vein.
I am fully aware that the best option is to reinstall the entire site but I am afraid it's a risky affair as too much customizations have been done over the past and it will take a whole lot of effort to recreate the entire setup.
How do I encounter this issue? How to identify the script(s) responsible by running one more bash script maybe? Running
inotify isn't a possibility as Hostgator doesn't allow us to install.