We have just had a hacking attempt on some of my sites using an exploit with a numerical php file (random number like 105242.php) with a unique .htaccess file. Maybe this Pivot Web Forum thread will help explain the techniques used.
http://www.pivotlog.net/forum/viewtopic.php?t=11298&sid=ce8447cb5a8b2dcaf2bfa9349e1323e1They cracked into a big server for one of my sites by some method we cant discover. Left 20 of these numeric.php files in 20 different directories plus a unique .htaccess file alongside the php file. The htaccess had just two lines like these;
Options -MultiViews
ErrorDocument 404 //administrator/backups/92328.php
The php file had content similar to that shown in the above-mentioned Forum thread.
The clue that folders had been hit was they they had been set to 777 instead of my usual 755 permissions and the date matched right through the site.
Let me close with a couple of quotes from the above-mentioned thread:
"The beauty of this setup is that the attacker, when he wants to run the uploaded PHP files, doesn't have to access the files directly. Rather he (or she) access a file that doesn't exist ... Hence, there is no trace at all of using there two PHP files in the webserver logs..."
...
"What does this mean? When these scripts are run, they include/download PHP code from one of two servers above and since this remote code can be anything, the attacker can do anything (that can be done within PHP)!!"
and lastly they said, "This type of attack, inclusion of remote PHP code, requires that allow_url_fopen is On. If it's off, you'll always be safe."
That's why I make certain that there are no "world" accessible directories that they can reach. Once they access a server then your site is owned, and every other site within the server.