A web virus has been attacking php website files for a while now. It injects a code which begins by
eval(base64_decode...
This function executes an encoded script and generally puts the website down.
You then have two options :
- Either open each file and delete the unwanted code. This may be a nightmare if you are using a CMS featuring hundreds of files.
- Or do the same think with a ssh command and you will save a lot of time.
find . \( -name "*.php" \) -exec grep -Hn "<\?php /\*\*/eval(base64_decode(.*));.*\?>" {} \; -exec sed -i '/<\?php \/\*\*\/eval(base64_decode(.*));.*\?>/d' {} \;
Although the virus does not particularly target WordPress websites, you will find more information on this topic in the WordPress codex.
Don’t forget to change your ftp password.
