登陆时,点忘记密码来到密码找回页面...
选择邮箱或者手机号找回,这里拿手机号测试先...
点下一步,系统会发送一个6位数字验证码到用户手机,这里随便填一个,并且抓包...
对ticket参数进行暴力 破解 ,得到真实验证码输入即可重置密码...
其中可能出现的问题:
如果严重码破解出来了但又超过了验证码有效时间(10分钟)可以用下面的缺陷重置密码..
破解验证码时候对比数据返回包可以发现问题,如下:
失败验证码返回数据:
HTTP/1.1 200 OK Server: zws Date: Thu, 25 Jul 2013 13:35:28 GMT Content-Type: text/ html ; charset=UTF-8 Connection: close Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-Length: 57 {"state":-1,"msg":"\u9519\u8bef\u7684\u9a8c\u8bc1\u7801"}
成功验证码返回数据:
HTTP/1.1 200 OK Server: zws Date: Thu, 25 Jul 2013 13:35:28 GMT Content-Type: text/html; charset=UTF-8 Connection: close Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-Length: 76 {"state":1,"url":"\/retrieve\/setpass_mode_1_vid_2****2_ticket_04***8_w_1"}
其中*号为打码部分
从数据中发现"url":"\/retrieve\/setpass_mode_1_vid_2****2_ticket_04***8_w_1"
组合url:
https://login.zhubajie测试数据/+
访问即可重置密码...
修复方案: 你们懂吧
查看更多关于猪八戒任意用户密码重置 - 网站安全 - 自学php的详细内容...