23.11.2014 Views

CRIPTOGRAFIA - FESP

CRIPTOGRAFIA - FESP

CRIPTOGRAFIA - FESP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

"x" switch) even though, when using this ASCII switch, hex is often displayed<br />

whether demanded or not. To display ASCII we employ the "X" switch:<br />

# tcpdump -qec1xX<br />

On another system this gave me info on some Samba exchanges:<br />

21:04:34.339233 0:c:6e:77:68:8d 0:c0:4f:ac:12:3b 107: bureau.danville.ca.2343 > candyman.dan<br />

0x0000 4500 005d 138d 4000 8006 635e c0a8 013f E..]..@...c^...?<br />

0x0010 c0a8 0120 0927 008b 8fba 2130 aa33 e823 .....'....!0.3.#<br />

0x0020 5018 fe64 030d 0000 0000 0031 ff53 4d42 P..d.......1.SMB<br />

0x0030 2b00 0000 0018 43c0 0000 0000 0000 0000 +.....C.........<br />

0x0040 0000 0000 ffff fffe 0000 feff 0101 000c ................<br />

0x0050 004a .J<br />

3. what traffic to capture<br />

We can capture traffic based on:<br />

1. address<br />

2. protocol<br />

3. port<br />

4. packet characteristics<br />

5. combinations thereof<br />

address filtering<br />

• An address can refer to a host, a network, a multicast/broadcast,<br />

or a mac/ethernet address<br />

• An address can be a source or a destination<br />

So if I am interested in all IP traffic involving host mudra:<br />

# tcpdump host mudra<br />

Let's say I want only traffic where mudra is the destination:<br />

# tcpdump dst host mudra<br />

Obviously, if you use names (instead of IP addresses) name resolution<br />

must be set up.<br />

Below we capture IP traffic involving a source ethernet address of<br />

0:a0:3b:3:e1:1d<br />

# tcpdump ether src host 0:a0:3b:3:e1:1d<br />

Note the syntax: ether host {mac address}<br />

Here we will display the first 100 packets involving network<br />

192.168.1.0 with a netmask of 255.255.255.0 and save everything to a

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!