Forum Moderators: rogerd
Should I just forget about it, pull another beer out of the fridge, and watch the football? Or is this a cause for concern? The board is operating fine otherwise.
Anyone else experiencing this?
It's a PR7 board that's becoming more and more of a challenge to keep on top of. It's turned into a big enough target that even with all the hardening against automateds, the manual link-spam is getting a tad brutal.
Whilst applying the 2.0.11 update will prevent the exploit, it doesn't stop the attacks.
One way to limit the consequences is to put this in the .htaccess:
RewriteEngine on
RewriteCond %{QUERY_STRING} ^(.*)echr(.*) [OR]
RewriteCond %{QUERY_STRING} ^(.*)highlight=\%2527
RewriteRule ^.*$ - [F,L]
I did put following code into my phpBB common.php file:
/**
* Block Perl Worm
*
*/
function blocker()
{
if (preg_match('#' . preg_quote('system(chr(99)') . '¦' . preg_quote('wget') . '#', $_SERVER['REQUEST_URI'])) {
$check = 1;
}
if (preg_match('#' . preg_quote('lwp-trivial') . '¦' . preg_quote('LWP::Simple') . '#', getenv('HTTP_USER_AGENT'))) {
$check = 1;
}
if (isset($check)) {
header('HTTP/1.0 403 Forbidden', true);
header('Location: http://' . $_SERVER['REMOTE_HOST'] . $_SERVER['REQUEST_URI']);
exit;
}
} It checks for two different characteristics in request uri and user agent. Then it redirects to the source server including the request uri. I hope that will awake the admins of the infected servers.
NN
if(stristr($QUERY_STRING,'%2527')) {
die();
}
Stuff in common.php isn't needed as the exploit only targets viewtopic.php, also if you are including common.php or any other files then that increases the load. By having the above code at the very top of viewtopic.php no CPU is wasted.