Ask Your Question
0

Inconsistent filter results

asked 2025-02-19 09:44:58 +0000

Mick B gravatar image

updated 2025-02-19 11:31:59 +0000

grahamb gravatar image

I am using Wireshark v4.4.3 and have noticed that reloading a file with a filter active finds more packets than opening the capture and then running the filter. e.g.

  1. open file SIP_capture.pcap
  2. run a simple "sip" filter - e.g. 1000 packets are found to match the filter
  3. use view/reload with the same active filter - now, e.g. 1100 packets match the filter
  4. re-run the "sip" filter and it is back to 1000 packets
  5. reload again and it is back to 1100 packets

You can drag and drop the file into the Wireshark window, this works the same as the reload

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2025-02-19 12:00:33 +0000

johnthacker gravatar image

Without seeing the file, my guess is that this is related to SIP PDUs that are segmented across multiple TCP segments, and where the SIP dissector is called on the first pass, doesn't actually dissect any data because it needs to be combined with a later segment, and tells the TCP dissector that. On the second pass, the SIP dissector is not called at all for those frames.

When you open/reload a file with a filter active, you apply the filter on the first linear pass through the packets. That is, it's a case of https://gitlab.com/wireshark/wireshar... Usually that results in finding fewer packets (e.g., things like fields that refer to "what later frame had the response for this frame?" don't work on the first pass) but this is the opposite case.

edit flag offensive delete link more

Comments

If you compare the frames that are filtered in the first case but not the second, do they appear as dissected as TCP-only frames, with payload that is indicated as a TCP segment being reassembled and dissected in another frame?

johnthacker gravatar imagejohnthacker ( 2025-02-19 12:02:01 +0000 )edit

I'm not sure this is the issue, I just tried with a pcap file with one http request/response where the response is reassembled from two TCP segments and the issue does not occur. I think there must be a different mechanism causing this issue, but a pcap of the issue would be needed to investigate.

SYN-bit gravatar imageSYN-bit ( 2025-02-19 15:46:12 +0000 )edit

Another possibility that can cause different dissection in two passes is something like another heuristic dissector claiming the packet before the SIP dissector on the second pass but not the first pass, because that second dissector is normally later in the list of heuristic dissectors, but matched a later packet and then got moved up the list of heuristic dissectors to try. I saw some issues related to that recently (not on 4.4) with the HiPerConTracer heuristic dissector being too eager and messing up QUIC

johnthacker gravatar imagejohnthacker ( 2025-02-19 18:17:22 +0000 )edit

Interesting case, must be something like that. @Mick B Are you able to share (part) of the file or would that expose sensitive data?

SYN-bit gravatar imageSYN-bit ( 2025-02-20 07:55:01 +0000 )edit

Hi @SYN-bit, at the moment I cannot share any of the capture files as they do contain sensitive data. I will attempt to find a way to anonymise an example trace.

@johnthacker, it is very difficult to see which frames are additional. The capture files that I am comparing are large captures, e.g. the smallest varies between 11065 and 11946 packets matching the "sip" filter. I know that I should be able to trim a small part where the issue occurs, but there's still sensitive data present. So far I can confirm that, at least in one case, the extra captured packet is a TCP segment with SIP content, however, there are many instances of that found in both cases of filtering so I don't know why that one is different to other similar ones.

Mick B gravatar imageMick B ( 2025-02-20 08:57:17 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2025-02-19 09:44:58 +0000

Seen: 25 times

Last updated: Feb 19