-
Notifications
You must be signed in to change notification settings - Fork 5
Netdiscover Protocol
The following data has been recorded using Wireshark while using the NetDiscover.exe utility from Koukaam.
send the following bytes via UDP to 255.255.255.0 or to <broadcast> on port 4000
50 43 45 64 69 74 02 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00
02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
PCEdit\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
This request is 63 bytes long.
byte 0-5: “PCEdit”
byte 6 & 25 & 34: “\x02”
bytes up to 62: “\x00”
if you listen on port 4000 on this machine now you will get an answer like this:
49 50 43 61 6d 00 65 74 68 31 c0 a8 66 04 00 92 58
00 6f 07 ff ff ff 00 00 67 77 c0 a8 66 01 00 4e 45
54 49 4f 20 5a 61 72 61 74 68 75 73 74 72 61 62 63
64 65 66 00 30 30 38 30 00 30
this is equivalent to:
IPCam\x00eth1\xc0\xa8f\x04\x00\x92X\x00o\x07\xff\xff\xff\x00\x00gw\xc0\xa8f\x01\x00NETIO Zarathustrabcdef\x000080\x000
zero based bytes:
bytes 0-4: always “IPCam”
byte 5: always “\x00”
byte 6-9 always “eth1”
byte 10-13: IP address of the device
byte 14-19: MAC address of the device
byte 20-23: Subnet Mask of the device
byte 24-26: always “\x00gw”
byte 27-30: Gateway of the device
byte 31: always \x00
byte 32-37: always “NETIO\x20”
byte 38- (up to 53) (up to 16 bytes): Device Name (zero terminated: “\x00”)
directly after the zero-terminated device name string follows (depending on the length of the device name) the sequence “\x30\x30\x38\x30\x00\x30\x30\x30\x30” (=0080.0000) or its shortest variant (when cut by the end of the 61 bytes is reached): “\x30\x30\x38\x30\x00\x30” (=0080.0)
bytes up to 60: if any empty bytes remain they are filled with “\x00”
This response is 61 bytes long.
For example to change the IP to 192.168.102.5 send the following 62 bytes of data to 255.255.255.0 on port 4000:
50 43 45 64 69 74 01 65 74 68 31 c0 a8 66 05 00 92
58 00 6f 07 ff ff ff 00 01 67 77 c0 a8 66 01 01 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01 38 30 00 00 00 00 00 00 00 00 00
this is equivalent to:
PCEdit\x01eth1\xc0\xa8f\x05\x00\x92X\x00o\x07\xff\xff\xff\x00\x01gw\xc0\xa8f\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0180\x00\x00\x00\x00\x00\x00\x00\x00\x00
This request is 63 bytes long.
byte 0 – 5: “PCEdit”
byte 6: “\x01”
byte 7-10: “eth1”
byte 11-14: new IP address of the device (can be changed)
byte 15-20: MAC address of the device (cannot be changed)
byte 21-24: Subnet Mask of the device
byte 25-27: “\x01gw”
byte 28-31: Gateway of the device
byte 32: “\x01”
bytes up to 62: “\x00” except bytes 51-53: “\x01\x38\x30”