
Another word for scripting language is interpreted or managed language. Lua is a scripting language in that Lua code is read from a plain text script/source file and then executed by the Lua interpreter-a compiled executable itself-dynamically at runtime. Wireshark has a Lua implementation that makes it easy for people who are unfamiliar with C to write dissectors. The only thing you need is a text editor. Wireshark Generic Dissector does not require a development environment.

Interpreted text files are simple to use but slow for dissecting packets. Wireshark reads the protocol definitions from the file(s). In this method, you describe your data using a specific format and save it in text file(s).
WIRESHARK TUTORIAL FULL
It is fast and efficient but It requires a full fledged development environment. Most of Wireshark dissectors are written in C/C++ programing language. There are 3 ways commonly used ways to write your own dissector: Chained dissectors are handy for extending an existing dissector without having to rewrite it completely, whereas post-dissectors are useful for adding a new dissector that provides additional context based on what other fields are set.ĭifferent ways to write Wireshark Dissectors The difference is that a chained dissector doesn't run against every packet, only those packets that are handled by the dissector off of which you are chaining. The second byte will be used for the content of the "answer" or the "question".ĪLSO READ: Kerberos Authentication Packet Analysis with Wireshark The first byte is used to distinguish whether the message type is a " question" or an " answer". The server will response the client with a relevant answer. The client will be able to query the service status on the server. The server responses back, informing the service is up or down.įor sake of simplicity, we will create 2 bytes protocol, which will be working in client and server architecture. With this protocol a client can ask the server if the service on the server is up or not. The protocol is based on a request and response.

We will create a simple protocol and write a dissector for it. After the TCP connection has established, the client sends some data that Wireshark’s dissectors do not understand in packet number 4. The first 3 packets belong to the TCP 3-way handshaking. I will create a dissector for the following payload (the data). Wireshark dissectors can be useful when you are working with a custom protocol that Wireshark doesn’t already have a dissector for. Once it finds the traffic, it interprets the payload. A Wireshark dissector is simply a decoder, which is interesting in a specific type of traffic.
