Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scapy Fails to Reassemble Large MQTT CONNECT Packets with WILL message Across Multiple TCP Segments #4595

Open
arefehkr opened this issue Nov 20, 2024 · 0 comments

Comments

@arefehkr
Copy link

Brief description

While processing a pcap file containing MQTT traffic, I encountered an issue where Scapy fails to correctly reassemble large MQTT CONNECT packets that are fragmented across multiple TCP segments. This issue occurs when the CONNECT packet includes a large Will message (size 1514 bytes) that spans three TCP segments. Scapy handles the first TCP segment correctly but fails to combine it with the subsequent segments to form the complete CONNECT packet.

Scapy version

2.5.0

Python version

3.8

Operating system

Windows

Additional environment information

  • The first TCP segment of the CONNECT packet is processed correctly.
  • The second and third TCP segments are not combined with the first segment, resulting in incorrect packet interpretation.
  • Scapy outputs unrelated packet types (e.g., PUBREL, PUBCOMP).
  • I attached the scapy result that couldnt handle large WILL payload.
  • scapy_print.txt

How to reproduce

Here is the pcap file:
WILL_DoS_selected.zip
image

Actual result

No response

Expected result

No response

Related resources

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant