Wordpress Injected with strange URLS - need to mass scan files

Discussion in 'Security' started by skaterkee, Nov 5, 2009.

  1. #1
    Hi guys, my wordpress seems to have been compromised, now whenever you go on any page two urls are loaded in the background

    aventurapark.com.ec/anuncios/direccion.php
    and
    npnonline.in

    They don't actually appear to be doing any damage and none of my users anti-virus software is picking it up, so I wanna get rid of it quick before google or something slaps me with a "this is an attack site" warning.

    I can't seem to pin point the javascript or code or whatever, and only seem to have found a few instances in the source of pages, but this loads on every PHP page!

    The initial virus was cleaned off the server by my host, but the results are still within the pages.

    I need some kind of mass search script I can install on my sever to search for instances of the above urls and remove them. There's no way I can thought each one.
     
    skaterkee, Nov 5, 2009 IP
  2. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #2
    We just had a pair of threads on this a few days back although I don't recall the posters ever got back to us. Chances are you;re running a "free premium theme" from somewhere where the theme's footer.php file is encrypted with a loader. if so, you probably should unencrypt the file and get the code out of there or install a new theme without any encryption.

    A link to your site would be a plus so we can double check.
     
    theapparatus, Nov 5, 2009 IP
  3. ilook

    ilook Well-Known Member

    Messages:
    1,602
    Likes Received:
    15
    Best Answers:
    1
    Trophy Points:
    165
    #3
    Yes it happen a lot to "free" themes or themes downloaded from warez sites.
     
    ilook, Nov 5, 2009 IP
  4. brox4nite

    brox4nite Member

    Messages:
    39
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #4
    Learn Linux.

    Then you can just do things like:

    grep -lR "aventurapark.com.ec" /path/to/wordpress | xargs sed -i 's/string containing hacked things//g'

    That would find all files containing "aventurapark.com.ec" and replace the string "string containing hacked things" with nothing.

    Very fast and efficient.
     
    brox4nite, Nov 9, 2009 IP
  5. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #5
    And won't work. If the theme file is calling an offsite script, that url is being provided offsite and not in any local file.

    edit: And since the file in question in encoded with javascript, the string won't be found either.
     
    theapparatus, Nov 9, 2009 IP
  6. brox4nite

    brox4nite Member

    Messages:
    39
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #6
    That's just a technicality to adjust to that. The main point is that if you want to make a nice $$$ on your own quickly and efficiently, you absolutely must know Linux.

    I think I'll write a book about my success later.
     
    brox4nite, Nov 9, 2009 IP
  7. ilook

    ilook Well-Known Member

    Messages:
    1,602
    Likes Received:
    15
    Best Answers:
    1
    Trophy Points:
    165
    #7
    Use this:

    http://wordpress.org/extend/plugins/tac/

    TAC stands for Theme Authenticity Checker. Currently, TAC searches the source files of every installed theme for signs of malicious code. If such code is found, TAC displays the path to the theme file, the line number, and a small snippet of the suspect code. As of v1.3 TAC also searches for and displays static links.
     
    ilook, Nov 9, 2009 IP
  8. brox4nite

    brox4nite Member

    Messages:
    39
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #8
    brox4nite, Nov 9, 2009 IP
  9. skaterkee

    skaterkee Well-Known Member

    Messages:
    651
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    138
    #9
    Thanks guys - I had a chat with the host and they eventually got rid of it. I think they got through some old image gallery pluguin.
     
    skaterkee, Nov 12, 2009 IP
  10. SecureCP

    SecureCP Guest

    Messages:
    226
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I've found that old unpatched versions of anything that utilizes Tinymce is affected to. Not sure if it applies to you, but just adding information to the thread.

    Glad you got this squared away :)
     
    SecureCP, Nov 13, 2009 IP