Support » Fixing WordPress » 3.3.1 Hacked by redirect

  • Hi everyone, I have just been hacked. I am a web developer, and have about 20-30 WordPress sites, all of them running 3.3.1. They all seem to have been hacked. Here’s one you can look at, if you search google for and click on the link from Google, you will see that it goes to first then to Can anyone please help me find the code? I really don’t want to have to try to restore all my sites from backups.

    Thank you all.


Viewing 15 replies - 1 through 15 (of 98 total)
  • Looks like they got into the .htaccess file, not sure how though. Also, I am not sure if they got into any of the other files too?

    If I get rid of the hackers code in the .htaccess file, how do I stop it from coming back? The sites are running the latest version (3.3.1), and all the plugins are updated.

    Looks like its running some kind of code that replaces the redirect code in the .htaccess. I cleaned the code out, uploaded the file, but when I re-download the .htaccess the malicious code is back in there 🙁

    Grrrrrr!!!!!! 🙁

    This is currently happening to me as well, I would like to get this fixed as soon as possible.

    I believe the latest version of wordpress introduced this problem we’re all facing. My temporary solution until this if fix is to create a cronjob to delete the .htaccess file since it continues on getting re-created even after it is deleted.

    # delete
    * * * * * rm -fr ./public_html/.htaccess > /dev/null 2>&1

    Anyone else here on shared hosting? I am just curious, as I am finding the same .htaccess file in root folders that are not even WP sites.

    Wondering if this is a FTP hack rather than a WP hack?
    If I delete the file, it gets replace or recreated within 30 minutes or so.

    I am on shared hosting with hostgator. I sent in a security request to them telling them about the malware on my account and they have been quick to respond.

    They believe the cause of the problem is in timthumb.php. A script that many wordpress plugins use for resizing images. They have already fixed up my problem.

    Hmmm, I had seen a security patch for timthumb.php about 6 months ago or so, so i am not sure that is my problem. I am on 1and1, and they are slow to respond, I have been refered to their “security” team who is only there from 9am-5pm 😛

    same problem but I use zyma, also bad support and slow regarding on this issues…

    Well, I have the same problem.

    I am currently trying to solve everything

    Shared hosting in banahosting

    Ok, so I have been working on this for hours and hours and still no luck. Here is what seems to be happening now:

    I picked one of my simple WP installs, one that has is running twenty ten theme, and no plugins running. (its running 3.3.1)

    I delete the .htaccess file, but the malicious redirect is still happening, even without an .htaccess file.

    When I do a security check at it says:
    Malware found on javascript file:
    When I look for this file, I can’t find it anywhere, there doesn’t seem to be a 404javascript.js file anywhere?

    Thanks Roy, I had looked at these links before, and have read through them at length. I have been working on this for about 7 hours now, and I am more convinced that it is a problem with my shared hosting environment (1and1) but from what I have seen so far, they are absolutely and completely incompitent, and I would highly reccomend not using them for hosting. I have had nothing but bad experiences time after time with them. Their solution for me that they just sent in an email was to “create a .htaccess file and place it in the root of my site”. So stupid 🙁

    My problem is, if I am to change hosting providers, then my sites are still messed up, i need to figure out how to clean out the malware, and see if 1and1 can plug the holes, or look at the crappy task of moving all my sites over to somewhere else. So lame 🙁

    Also, when you replace your .htaccess file(s) set them to a file permission of 444 or something similar so that no one can write to them.

    I registered here so I could help you. I had this exact problem and found this page with Google.

    There was a PHP file in my main directory that had a weird file name. I first deleted that and changed my FTP/cPanel passwords. I also had to delete the added crap that was in EVERY .htaccess file within my site — it’s all identical and was probably placed by a bot. There is something at the top and at the very bottom of each file(be sure to scroll ALL the way down).

    I noticed that my site was still being redirected and was failing the test on so I added a 404 redirect link in my .htaccess file and that fixed it! Let me know if this works for you

    BTW, when I say that I added a “404 redirect link”, I mean that I added a line similar to this in my .htaccess file:

    ErrorDocument 404 /example-404.html

Viewing 15 replies - 1 through 15 (of 98 total)
  • The topic ‘3.3.1 Hacked by redirect’ is closed to new replies.