3. Context 1/2
Obj 1 Obj N
Msg(Obj1,ObjN) …..10101010101
Msg(ObjN,Obj1)…..01010010101
4. Sometime, when two or more objects want to
exchange information, they use a
communication protocol.
Context 2/2
OBJ1 OBJN
msg1
msg2
msg3
5. When we want analyze or test the
communication between two or more objects,
is necessary to pull out the messages.
We suppose that the communication is
ethernet.
WireShark [3] is a useful tool to analyze the
communication protocols.
Why?
9. Now?
Big problem. In general WireShark doesn't
know our custom protocol!!!
In the next step,probably, we will cut binary
data and we will past it in Ultra Edit, in hex
mode, and after that, we will parse it
manually!!!!. Help me!!!!!
The error probability is 100%.
Do you know? 4/5
10. No problem. There is a solution.
Do you know lua language [1]?
It’s a scripting language, like Python, and it’s
compatible with WireShark.
What mean? We can define our custom
protocol in WireShark!!!!
Do you know? 5/5
11. Data Protocol:
◦ UDP destination port 2;
◦ Count, Unsigned Integer 4 bytes;
◦ Time, Unsigned Integer 8 bytes;
Example 1/9
count time
12. With a text editor [2], we create, in WireShark
home directory, a Lua file, for example
myprotocol.lua.
Open, in WireSharke home directory, the file
init.lua.
Append on the end of file the following row:
dofile(DATA_DIR..”myprotocol.lua”)
Save and exit init.lua file.
Example 2/9