
CVE-2023-21554 PoC
This repository contains a ready-to-run proof of concept that targets Microsoft Message Queuing listening on TCP port 1801. This work is based on and uses materials from the original project at
https://github.com/leongxudong/MSMQ-Vulnerability
This repository uses the binary artifacts provided by that project. The binary files included and referenced by the PoC are:
establish_connection.binconnection_parameters.binuser_message.binThis PoC attempts to reproduce the condition described in CVE 2023 21554 by sending a sequence of MSMQ protocol frames to a target host on port 1801. The PoC scripts only perform network-level activity and do not perform any post-exploitation actions. This project is intended for analysis and defensive verification in an isolated lab environment only.
CVE-2023-21554.py — original PoC script that sends the three binary blobs in sequenceCVE-2023-21554.py — attacker-side helper script that logs responses, hexdumps, timestamps, and socket-level errors. Use this script to obtain more useful attacker-side evidenceestablish_connection.bin — binary stage one payload from the original repositoryconnection_parameters.bin — binary stage two payload from the original repositoryuser_message.bin — binary stage three payload from the original repositoryREADME.md — this filePlace the three binary files in the same folder as the PoC script
Edit the PoC script or CVE-2023-21554.py to set the target IP address
Start a network capture on your attacker machine for the target IP and port. Example command in a separate shell (replace the IP with your target):
sudo tcpdump -i eth0 host 10.0.2.15 and port 1801 -w msmq_test.pcap
Run the enhanced check script to get timestamped logs and hexdumps
python3 CVE-2023-21554.py
Save the PoC output and the network capture file for analysis
CVE-2023-21554.py reports connection_reset or orderly_close immediately after a payload stage (these are explicit statuses printed by the helper).mqsvc.exe crashes or restarts at the time of the test.mqsvc.exe.mqsvc process.Replace <TARGET> with your target IP for each filter.
Show all traffic between attacker and target on the MSMQ port:
ip.addr == <TARGET> && tcp.port == 1801
Show only server-originating TCP RSTs:
ip.src == <TARGET> && tcp.port == 1801 && tcp.flags.reset == 1
Show packets that contain application data (non-empty TCP payloads):
ip.addr == <TARGET> && tcp.port == 1801 && tcp.len > 0
Show zero-length segments or FINs:
ip.addr == <TARGET> && tcp.port == 1801 && (tcp.len == 0 || tcp.flags.fin == 1)
Show retransmissions and TCP anomalies:
tcp.analysis.retransmission || tcp.analysis.fast_retransmission || tcp.analysis.duplicate_ack
tcp.len values or the packet immediately before an RST.server_reply.hex).CVE-2023-21554.py to a text filemsmq_test.pcap)mqsvc.exe using procdump and save it for analysisThis code may cause service crashes and instability on target hosts. Do not run it against systems you do not own or do not have explicit permission to test. Always test in an isolated lab environment and take a VM snapshot before running tests. The original work is credited to the upstream project at:
https://github.com/leongxudong/MSMQ-Vulnerability
This repository is derived from the original project at:
https://github.com/leongxudong/MSMQ-Vulnerability
If you add detection helpers or evidence collection scripts please document them and include instructions for safe lab use
Refer to the upstream repository at the link above for original context and binary artifacts. For defensive guidance consult vendor advisories and published writeups about CVE 2023 21554