Fairweb

Développement WordPress, WordPress Mu, BuddyPress

gestionnaire-connexions-reseau-icone-9676-128

eval(base64_decode web virus

| 0 comments

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 :

  1. Either open each file and delete the unwanted code. This may be a nightmare if you are using a CMS featuring hundreds of files.
  2. 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.

Share

Author: Fairweb

Développement php/mysql, conception de sites internet

Leave a Reply

Required fields are marked *.

*