3 крупных уязвимости обнаружили ребята из ru-24 team.
SQL-инъекции: 2 штуки, а также раскрытие полного пути. От себя добавлю несколько таких раскрытй в IPB 2.0.х.
Подробно читаем далее:
1) SQL Injection
В скрипте calendar.php в функции cal_event_save( $type='add' ) отсутствует проверка на тип в переменной event_id
PHP код:
$event_id = $this->ipsclass->input['event_id'];
Далее эта переменная подставляется напрямую в запрос к БД
PHP код:
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'cal_events', 'where' => "event_id=$event_id" ) );
И еще один запрос Это позволяет модифицировать запрос к базе данных
PHP код:
http://path_to_forum/index.php?act=calendar&code=doedit&type=qqq&event_id=your_SQL
Для успешной эксплуатации данной уязвимоти необходимо обладать правами для манипуляции с событиями календаря (добавление, редактирование)
Для исправления данной уязвимости достаточно
PHP код:
$event_id = $this->ipsclass->input['event_id'];
заменить на
PHP код:
$event_id = intval($this->ipsclass->input['event_id']);
2) Из-за ошибок в скриптах можно определить полный путь к установочной дирректории форума обратившись к одному из следующих скриптов напрямую:
path_to_forum/sources/loginauth/ldap/auth.php
path_to_forum/sources/loginauth/internal/auth.php
path_to_forum/sources/loginauth/external/auth.php
path_to_forum/sources/loginauth/convert/auth.php
path_to_forum/sources/loginauth/convert/auth.php.bak
path_to_forum/sources/lib/search_mysql_man.php
path_to_forum/sources/lib/search_mysql_ftext.php
path_to_forum/sources/classes/post/class_post_edit.php
path_to_forum/sources/classes/post/class_post_new.php
path_to_forum/sources/classes/post/class_post_reply.php
path_to_forum/sources/classes/editor/class_editor_std.php
path_to_forum/sources/classes/editor/class_editor_rte.php
path_to_forum/sources/classes/bbcode/class_bbcode.php
path_to_forum/sources/classes/bbcode/class_bbcode_legacy.php
path_to_forum/sources/acp_loaders/acp_pages_components.php
path_to_forum/ips_kernel/PEAR/Text/Diff3.php
path_to_forum/ips_kernel/PEAR/Text/Diff/Renderer/inline.php
path_to_forum/ips_kernel/PEAR/Text/Diff/Renderer/unified.php
Уязвимости найдены в форуме v2.1.3.Возможно уязвимы и другие версии.
От себя добавлю, что в ipb 2.0.x в файлах из папки mysql_queries такаяже уязвимость.
3) SQL-injecrion exploit
Можно получить ссылку на смену пароля админа или любого юзера.
Есть условия: подходящая MySQL версия и включенный CURL-module.
ru24_ipb21
damagelab.org