Lab: 2FA bypass using a brute-force attack:暴力破解双重验证靶场复盘(困难级别)

靶场内容:

This lab’s two-factor authentication is vulnerable to brute-forcing. You have already obtained a valid username and password, but do not have access to the user’s 2FA verification code. To solve the lab ,brute-force the 2FA code and access Carlos’s account page.

Victim’s credentials: carlos:montoya

你需要结合 Burp 宏和 Burp Intruder 来解决这个实验。有关宏的更多信息,请参阅Burp Suite 文档。精通 Python 的用户可能更喜欢使用Turbo Intruder扩展,该扩展可从 BApp 商店获得。

漏洞分析

  • 这个靶场真的很难,不看答案根本不知道,因为它有一个如果输入两次错误,就会登出
  • 但是burpsuit有个工具模块可以自动登录
  • 具体打开方式如下
    • 在最上面一栏找到"Project options" > “Sessions”.
    • 在 “Session Handling Rules” 的模块里, 点击 “Add”.
    • 一个叫"Session handling rule editor"对话框被打开.
    • 在这个对话框里,点击 “Scope” 模块.
    • 在 "URL Scope"模块下, 选择选项 “Include all URLs”.
    • 回到 “Details” 模块,然后在 "Rule Actions"模块下, 点击 “Add” > “Run a macro”.
    • 在 “Select macro"下点击"Add” ,然后打开了 “Macro Recorder”.
    • 长按Ctrl键选择以下三个报文:
      GET /login
      POST /login
      GET /login2
    • 然后单击 “OK”.
    • “Macro Editor” 对话被打开.
    • 点击"Test macro" 然后检查报文里面有没有生成一个让你: provide the 4-digit security code. 这就代表着操作有效。
    • 一直点击 "OK"去关掉所有的对话框直到你回到了最开始的框框内
    • 然后现在你每发送一个请求,macro 都会自动得去登录你的账户
    • 所以接下来开始攻击
  • 将POST /login2请求发送给 Burp Intruder。
  • 在 Burp Intruder 中,向mfa-code参数添加payload
  • 之后在字典里选择Number类型,设置范围为 0 - 9999 ,步长为1,,设置 min/max integer digits 为4, max fraction digits 为 0. (或者自己写脚本)
  • 还要在设置Recourse Pool线程为1
  • 经过漫长的等待~~~~~~~~~~
  • 是真的漫长
  • 等了半小时了,还是没有出结果……
  • 算了一个半小时了,我不配……有时间再做吧

关键截图:

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

posted @ 2021-08-19 17:01  Zeker62  阅读(244)  评论(0编辑  收藏  举报