Tcpdump Aufgaben

Aus xinux.net
Zur Navigation springen Zur Suche springen

Aufgabe 1

Erstellen Sie einen dump von eth0

10:33:08.963022 IP 192.168.240.1.2049 > 192.168.241.1.983: Flags [.], ack 10240, win 501, options [nop,nop,TS val 203528357 ecr 2601352], length 0
10:33:08.963129 IP 192.168.240.1.2049 > 192.168.241.1.501920070: reply ok 136 write [|nfs]
10:33:08.963142 IP 192.168.241.1.983 > 192.168.240.1.2049: Flags [.], ack 1629, win 41566, options [nop,nop,TS val 2601352 ecr 203528357], length 0
10:33:08.963542 IP 192.168.240.1.2049 > 192.168.241.1.983: Flags [.], ack 13136, win 501, options [nop,nop,TS val 203528357 ecr 2601352], length 0
10:33:08.963618 IP 192.168.240.1.2049 > 192.168.241.1.518697286: reply ok 136
10:33:08.963630 IP 192.168.241.1.983 > 192.168.240.1.2049: Flags [.], ack 1769, win 41564, options [nop,nop,TS val 2601352 ecr 203528357], length 0

tcpdump -ni eth0

Aufgabe 2

Schreiben Sie einen dump in eine Datei

tcpdump -nr datei.dump

Aufgabe 3

Filtern Sie nach Paketen mit ausschlieslich gesetztem PSH Flag

10:57:25.261098 IP 192.168.241.1.3001 > 192.168.240.1.80: Flags [P], seq 132626702:132628082, win 4096, length 1380
10:59:37.190124 IP 192.168.241.1.3001 > 192.168.240.1.80: Flags [P], seq 1110679339:1110680719, win 4096, length 1380
10:59:41.444859 IP 192.168.241.1.3001 > 192.168.240.1.80: Flags [P], seq 498723014:498724394, win 4096, length 1380
10:59:42.156874 IP 192.168.241.1.3001 > 192.168.240.1.80: Flags [P], seq 1684377667:1684379047, win 4096, length 1380

tcpdump -n tcp[13] == 8

Filtern sie Pkaete mit mindestens gesetztem PSH Flag

tcpdump -n tcp[13] & 8 == 8

Erläuterung

Durch die AND-Verknüpfung des 13. TCP Oktetts mit 8 werden auch Pakete mit mehr als nur gesetztem PSH Flag gefiltert

Aufgabe 4