ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Warning to shared dreamhost users + how to repair hack

March 06, 2012 9:40am

Subscribe [6]
  • #1 / Mar 06, 2012 9:40am

    inc11

    13 posts

    I’m not sure if this has been brought up before but I thought i’d give you all a warning.

    As i’m sure you are aware, dreamhost was hacked late January, as a result of this 20 of our websites hosted on their shared hosting servers where hacked. I’ve spotted the cause and fixed the hack but it’s proving to be a big job. I’d recommend anyone who is hosting with dreamhost to first check their index.php and admin.php files, if this code is on the first line:

    <?php /**/ eval(base64_decode("aWYoZnVuY3Rpb25fZXhpc3RzKCdvYl9zdGFydCcpJiYhaXNzZXQoJF9TRVJWRVJbJ21yX25vJ10pKXsgICRfU0VSVkVSWydtcl9ubyddPTE7ICAgIGlmKCFmdW5jdGlvbl9leGlz….....

    Then you may have been hacked, another way to check is to view the source of your home page, if you have this just before the closing body tag:

    script src="http://sweepstakesandcontestsdo.com/nl.php?p=d"

    Then you have been hacked. This hack adds a script to your pages for malware, it adds this base64_decode to ALL of your php pages, I found the only way to remove this is to manually do so.

    1. First thing’s first is to back up all of your files.

    2. Follow the instructions for updating and installing a fresh copy of your EE build. (http://ellislab.com/expressionengine/user-guide/installation/update.html&#41;

    3. OK, now you’ve done a fresh install, all of your files should be clean, except the ones you need to replace from your back-up, these are usually:

    index.php
    admin.php
    third_party plug-in php files
    third_party theme plug-in php files

    4. Manually go into all of your old php files and remove the first line, replace this simply with

    <?php

    .

    5. Another place to look would be your template files, this hack usually adds a “files.php” file into the templates, delete this file completely.

    Hope this helps. This worked for me and all looks good, I have to do this 20 more times now…

  • #2 / Mar 07, 2012 11:40am

    Shane Eckert

    7174 posts

    Hey inc11,

    That’s awesome! Thank you for sharing this information. I am going to move this over to the Community Help Forum forum so more people can benefit from this.

    Thanks for making the community more awesome!

    Cheers,

  • #3 / Mar 07, 2012 12:55pm

    jwmatlock

    14 posts

    I just discovered this on a few sites this weekend. What a pain. Good tips for repairing all the hacked files. Thanks!

  • #4 / Mar 08, 2012 9:48am

    moogaloo

    200 posts

    Also just found this on a clients Dreamhost site.
    Can’t find old versions of the system files so had to down the lot and do a Find and Replace on all the 369 files it found, the re-upload.
    Ball ache, but solved.

    At least it’s good to know about shared hosting - strengthens advice to client to avoid it.

  • #5 / Apr 08, 2012 6:54am

    clorentzen

    11 posts

    Hi—

    Just went through this on one of my sites… One other thing I wanted to mention: I found an additional mean-spirited file inserted in the system/expressionengine/cache/ directory. In my case the file was called “insta2.php”.

    If you’re replacing all the core ExpressionEngine files obviously this wouldn’t be a problem, but if you’re cleaning things up “manually,” it’s worth looking around for…

    Best,

    —Carl.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases