Ask Your Question
0

calling chained dissector only once and modifying payload for further processing

asked 2018-04-12 10:57:04 +0000

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-04-12 14:59:58 +0000

Jaap gravatar image

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.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-04-12 10:57:04 +0000

Seen: 219 times

Last updated: Apr 12 '18