(This topic is related to another one I posted yesterday.)
A company has approached me to help with their site which was compromised by the Pharma hack on their site running EE 1.6.8.
The upshot is that we’ve decided to move their presence to another host and get their site running in the current version. I’m hoping to get some advice on process.
I’ve read through all the threads I could find here describing other users’ experiences, as well as articles on this particular type of hack in the greater web community. Very grateful to the community for sharing experiences, info and resources.
Most of the articles online discuss this hack as it specifically pertains to WordPress, with the exception of Noah Stokes’ blog post which is specific to EE. My client’s situation is similar to Noah’s, with some variations.
Whereas Noah cleaned his installation, I’m hesitant to take this route. The client reports that for the past five months, other developers have attempted to clean the site, declared the site clean, only to see the spammy content crop up again. Yes, back doors…
Now, I’ve grepped and tracked down many files on the server with malicious code, and I see the back doors, and I can kind of trace what’s going on. But in my sleuthing, I can also see that the intruder has been clever (and continually, and recently, active), and I’m wary of missing something in my clean up and ending back at square one.
So here is the approach I’m considering:
1- export the current database and scan/clean it for malicious strings
2- import sanitized copy of database on new host
3- install fresh copy of 1.6.8 on new host and point it to cleaned database
4- go through update/upgrade process to get EE current on new host
I’m already into step 1, but I could use some help—whereas in the server files I knew to start with searching for “base64_encode” and then could track down other malicious code from there, I’m not sure what to look out for in the mysql export, that might prove harmul if I failed to catch it.
I’ve searched for answers to this question online but could only find notes on how to clean mysql for the WP Pharma hack (e.g. Sucuri.net has one). The database cleanup didn’t seem to apply to EE databases, but I tried these searches just for kicks and turned up nothing. Does anyone have any advice to share on this? Also wondering if there are scanners (free or for purchase) that look for bad strings/code in mysql databases?
I’d also love to hear if anyone thinks there’s a better overall approach, if I’m missing a critical step, or if some aspect of the steps I outlined above is not feasible.
I welcome any feedback or advice anyone would like to share. Thanks in advance!