You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently working on zaproxy/zaproxy#4812 , and I want to use this library to retrieve HTTP traffic to be interpreted on my end. To achieve this however, support for organizing TCP traffic into streams is needed to pair HTTP request and responses together.
For this reason I am currently working out how to contribute a TCPStream interface (extending the Stream interface), a DefaultTCPStream class (implementing TCPStream), and a TCPStreamHandler class (implementing the StreamHandler interface). Once I believe I have something that can be worked with, I'll open a PR.
Here is how I am thinking of defining a TCP stream:
A stream is identified using it's 5-tuple, that is it's source and destination addresses, source and destination ports, and it's layer 4 protocol (in this case TCP). Any TCP packet going from that source to that destination or from that destination to that source would belong to that stream.
Any encountered packet with a new 5-tuple would start a different stream
TCP streams CAN start with a TCP handshake, but not necessarily
TCP streams CAN end, either abruptly with a RST flag, or gracefully with a 3 or 4-way handshake with the FIN flag. If a stream ends, any new packet with the same 5-tuple than an ended stream would start a new stream instead of being added to it.
If on a non-ended stream, a packet with a SYN flag is encountered indicating that a new handshake is being started, the stream is assumed to have ended and a new stream is opened starting from the SYN packet.
This definition does not take into account mismatching sequence numbers. I know software like wireshark will notice odd sequence numbers and report it (as per this post that helped me define a TCP stream). In this case I believe such analysis to be somewhat out of scope of the work i am doing, so for the definition I am proposing, there is no soundness guarantee for sequence numbers among packets placed in the same TCP streams. Edit: analysis based on sequence numbers could simply be done by a StreamListener, leaving it up to the user to do any such analysis (which could include mismatches, duplication detection, etc...)
Does such a definition look like it would fit? Do you have any specific expectation for such a contribution? Anything you would like to see it address?
The text was updated successfully, but these errors were encountered:
Hi,
I am currently working on zaproxy/zaproxy#4812 , and I want to use this library to retrieve HTTP traffic to be interpreted on my end. To achieve this however, support for organizing TCP traffic into streams is needed to pair HTTP request and responses together.
For this reason I am currently working out how to contribute a TCPStream interface (extending the Stream interface), a DefaultTCPStream class (implementing TCPStream), and a TCPStreamHandler class (implementing the StreamHandler interface). Once I believe I have something that can be worked with, I'll open a PR.
Here is how I am thinking of defining a TCP stream:
This definition does not take into account mismatching sequence numbers. I know software like wireshark will notice odd sequence numbers and report it (as per this post that helped me define a TCP stream). In this case I believe such analysis to be somewhat out of scope of the work i am doing, so for the definition I am proposing, there is no soundness guarantee for sequence numbers among packets placed in the same TCP streams. Edit: analysis based on sequence numbers could simply be done by a StreamListener, leaving it up to the user to do any such analysis (which could include mismatches, duplication detection, etc...)
Does such a definition look like it would fit? Do you have any specific expectation for such a contribution? Anything you would like to see it address?
The text was updated successfully, but these errors were encountered: