Upload
luigi-taglione
View
41
Download
0
Tags:
Embed Size (px)
Citation preview
Sometime, when two or more objects want to exchange information, they use a communication protocol.
Context 2/2
OBJ1 OBJN
msg1
msg2
msg3
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?
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
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
Data Protocol: ◦ UDP destination port 2; ◦ Count, Unsigned Integer 4 bytes; ◦ Time, Unsigned Integer 8 bytes;
Example 1/9
count time
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