First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

calling chained dissector only once and modifying payload for further processing

Hi!

I want to modify payload of a packet before it is processed by its desired dissector. I've written a chained dissector in lua, which modifies the tvb and then calls the next dissector with the modified tvb. The plugins is working correctly. The issue I'm facing is that the dissector is called every time, upon applying filter or opening the io graph, which makes it slower. I can call my dissector only once by checking the value of pinfo.visited. But doing so the payload is not modified and the desired dissector processes the original payload after the first run. I'm looking for a solution so that my dissector is called only onces, which will processes and modifies the payload on the first run. The modified payload should persist so that whenever the packet is visited again(by applying filters or IO graph or Endpoints) the desired dissector would process the modifed payload rather than the original one

updated 2018-04-12 10:57:04 +0000
This post is a wiki. Anyone with karma >750 is welcome to improve it.
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

In what way do you modify the tvb? Do you go in (by illegal means) and modify the contained data? That is off-limits.

The way to go about this is as decryption layers go about this. They take the original data, decrpyt it, add is as a data source to the tvb and pass that on to the subsequent dissector. See this part or the developer guide.

Jaap's avatar
13.7k
Jaap
answered 2018-04-12 14:59:58 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer