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

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

缺陷编号:wooyun-2015-0104782

漏洞标题:泛微Eoffice多个文件SQL注入(无需登录)

相关厂商:泛微eoffice

漏洞作者: pandas

提交时间:2015-03-31 17:43

修复时间:2015-07-03 18:46

公开时间:2015-07-03 18:46

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:15

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-03-31: 细节已通知厂商并且等待厂商处理中
2015-04-04: 厂商已经确认,细节仅向厂商公开
2015-04-07: 细节向第三方安全合作伙伴开放
2015-05-29: 细节向核心白帽子及相关领域专家公开
2015-06-08: 细节向普通白帽子公开
2015-06-18: 细节向实习白帽子公开
2015-07-03: 细节向公众公开

简要描述:

翻阅了乌云已公开的泛微eoffice的漏洞发现,漏洞利用均需要测试账号登陆,如coody牛的http://www.wooyun.org/bugs/wooyun-2010-074972、applychen牛的http://www.wooyun.org/bugs/wooyun-2010-034523等。
洞是好洞,但在日常渗透测试中遇到目标站点没有测试账号的情况下就略显鸡肋了,在此提交几处无需登陆的SQL注射。

详细说明:

代码zend加密了,没有解密全,挑了一个目录下的文件来分析
漏洞函数:
eoffice\api\email.class.php

public function getEmailById( $id, $box = "" )
{
global $connection;
$sql = " select * from email where email_id = '{$id}' ";
$cursor = exequery( $connection, $sql );
$row = mysql_fetch_array( $cursor, MYSQL_ASSOC );
$inArray = array(
$row
);
$inArray = $this->replaceUserStr( "TO_ID", "TO_NAME", $inArray );
$inArray = $this->replaceUserStr( "TO_ID2", "TO_NAME2", $inArray );
$inArray = $this->replaceUserStr( "FROM_ID", "FROM_NAME", $inArray );
if ( $box == "" )
{
$this->updateReadflag( $id );
}
return $inArray[0];
}


继续跟踪updateReadflag函数:

public function updateReadflag( $email_id )
{
global $connection;
$q = "UPDATE email SET READ_FLAG = '1' WHERE EMAIL_ID = {$email_id}";
$rs = exequery( $connection, $q );
return $rs;
}


在updateReadflag函数中email_id变量未过滤即进入数据库执行,造成SQL注入漏洞。
受此函数影响的文件有很多:
1./E-mobile/source_page.php
2./E-mobile/emailreply_page.php
3./E-mobile/email_page.php
在此仅以第一处文件作演示,其余两处原理一样:
E-mobile/source_page.php

<?php
/*********************/
/* */
/* Version : 5.1.0 */
/* Author : RM */
/* Comment : 071223 */
/* */
/*********************/
include_once( "api/news.class.php" );
include_once( "api/notify.class.php" );
include_once( "api/email.class.php" );
include_once( "api/file.class.php" );
include_once( "api/diary.class.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/conn.php" );
include_once( "E-mobile/func_all.php" );
include_once( "wap/function.php" );
include_once( "inc/document_function.php" );
$diff = $_REQUEST['pagediff'];
switch ( $diff )
{
...省略...
case "email" :
$emailid = $_REQUEST['emailid'];
$userid = $_REQUEST['userid'];
$UserInfor['user_id'] = $userid;
$email = new email( $UserInfor );
$emailInfor = $email->getEmailById( $emailid, "" );
$contents = $emailInfor['CONTENT'];
$title = "邮件原文";
break;
...省略...


漏洞很明显

漏洞证明:

利用方式:http://eoffice8.weaver.cn:8028/E-mobile/source_page.php?pagediff=email&emailid=1

QQ20150330-2@2x.png


附上第2处和第3处的利用方式:
http://122.224.149.30:8082/E-mobile/emailreply_page.php?detailid=1
http://122.224.149.30:8082/E-mobile/email_page.php?detailid=1
http://219.232.254.131:8082/E-mobile/source_page.php?pagediff=email&emailid=1
http://61.163.107.26:8082/E-mobile/source_page.php?pagediff=email&emailid=1

修复方案:

过滤.

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:11

确认时间:2015-04-04 18:44

厂商回复:

CNVD确认并复现所述情况,已经由CNVD通过网站公开联系方式(或以往建立的处置渠道)向网站管理单位(软件生产厂商)通报。

最新状态:

暂无