Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Clients regularly call me do disinfect their non-backed up, PHP malware infected sites, on host servers they have no control over.</p> <p>If I can get shell access, here is a script I wrote to run:</p> <pre><code>( set -x; pwd; date; time grep -rl zend_framework --include=*.php --exclude=*\"* --exclude=*\^* --exclude=*\%* . |perl -lne 'print quotemeta' |xargs -rt -P3 -n4 sed -i.$(date +%Y%m%d.%H%M%S).bak 's/&lt;?php $zend_framework=.*?&gt;//g'; date ; ls -atrFl ) 2&gt;&amp;1 | tee -a ./$(date +%Y%m%d.%H%M%S).$$.log`; </code></pre> <p>It may take a while but ONLY modifies PHP files containing the trojan's signature <code>&lt;?php $zend_framework=</code></p> <p>It makes a backup of the infected <code>.php</code> versions to <code>.bak</code> so that when re-scanned, will skip those.</p> <p>If I cannot get shell access, eg. FTP only, then I create a short cleaner.php file containing basically that code for php to exec, but often the webserver times out the script execution before it goes through all subdirectories though.</p> <p>WORKAROUND for your problem:</p> <p>I put this in a crontab / at job to run eg. every 12 hours if such access to process scheduling directly on the server is possible, otherwise, there are also more convoluted approaches depending on what is permitted, eg. calling the cleaner php from the outside once in a while, but making it start with different folders each time via <code>sort --random</code> (because after 60sec or so it will get terminated by the web server anyway).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload