Of gebruik tcpdump:
code:
1
| tcpdump -i eth0 -s 0 -nvX port bootps or port bootpc or port tftp |
Parameters:
-i eth0: Listen to traffic on eth0
-s 0: Do not truncate packets
-n: Do not convert IP addresses to names
-v: Verbose output (give me a pretty summary of what the packet means)
-X: Print the contents of the packet in ASCII and hex
Dit geeft mij de volgende resultaten bij een request:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| 15:43:18.443435 IP (tos 0x0, ttl 255, id 51183, offset 0, flags [none], proto: UDP (17), length: 328) 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:30:65:0a:84:b0, length: 300, xid:0x208e93e3, flags: [none]
Client Ethernet Address: 00:30:65:0a:84:b0
Vendor-rfc1048:
DHCP:REQUEST
PR:SM+DG+NS+DN+NI+NITAG+SLP-DA+SLP-SCOPE+LDAP+T252
MSZ:1500
CID:[ether]00:30:65:0a:84:b0
RQ:131.211.45.120
LT:7776000
HN:"pbg4tp"
0x0000: 4500 0148 c7ef 0000 ff11 f2b5 0000 0000 E..H............
0x0010: ffff ffff 0044 0043 0134 ab1d 0101 0600 .....D.C.4......
0x0020: 208e 93e3 0000 0000 0000 0000 0000 0000 ................
0x0030: 0000 0000 0000 0000 0030 650a 84b0 0000 .........0e.....
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0100: 0000 0000 0000 0000 6382 5363 3501 0337 ........c.Sc5..7
0x0110: 0a01 0306 0f70 714e 4f5f fc39 0205 dc3d .....pqNO_.9...=
0x0120: 0701 0030 650a 84b0 3204 83d3 2d78 3304 ...0e...2...-x3.
0x0130: 0076 a700 0c06 7062 6734 7470 ff00 0000 .v....pbg4tp....
0x0140: 0000 0000 0000 0000 ........ |
En bij een acknowledge:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
| 15:43:03.814897 IP (tos 0x0, ttl 64, id 9082, offset 0, flags [DF], proto: UDP (17), length: 328) 131.211.44.5.67 > 131.211.45.18.68: BOOTP/DHCP, Reply, length: 300, xid:0x1213c319, flags: [none]
Client IP: 131.211.45.18
Your IP: 131.211.45.18
Server IP: 131.211.44.5
Client Ethernet Address: 00:60:08:5f:53:c7
Vendor-rfc1048:
DHCP:ACK
SID:131.211.44.5
LT:1800
SM:255.255.254.0
DN:"phys.uu.nl"
DG:131.211.44.1
NS:131.211.32.73,131.211.32.72
WNS:131.211.39.25
WNT:h-node
0x0000: 4500 0148 237a 4000 4011 b56d 83d3 2c05 E..H#z@.@..m..,.
0x0010: 83d3 2d12 0043 0044 0134 71c9 0201 0600 ..-..C.D.4q.....
0x0020: 1213 c319 0000 0000 83d3 2d12 83d3 2d12 ..........-...-.
0x0030: 83d3 2c05 0000 0000 0060 085f 53c7 0000 ..,......`._S...
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0100: 0000 0000 0000 0000 6382 5363 3501 0536 ........c.Sc5..6
0x0110: 0483 d32c 0533 0400 0007 0801 04ff fffe ...,.3..........
0x0120: 000f 0a70 6879 732e 7575 2e6e 6c03 0483 ...phys.uu.nl...
0x0130: d32c 0106 0883 d320 4983 d320 482c 0483 .,......I...H,..
0x0140: d327 192e 0108 ff00 .'...... |
met het ip van de server erin.
Succes!