tcpdump Flashcards
[CMD, tcpdump] List all available network interfaces
ip a s
[CMD, tcpdump] Specify interface to listen on
-i {INTERFACE}
[CMD, tcpdump] Listen on all interfaces
-i any
[CMD, tcpdump] Save to a file
-w FILE
[CMD, tcpdump] Read from a file
-r FILE
[CMD, tcpdump] Specify number of packets to capture
-c {COUNT}
[CMD, tcpdump] Avoid DNS lookup
-n
[CMD, tcpdump] Avoid both DNS and port look up
-nn
[CMD, tcpdump] Limit packages to a certain source based on IP or hostname
-src host HOSTNAME or -src host ip
[CMD, tcpdump] Limit packages to a certain destination IP or hostname
-dst host HOSTNAME or -dst host ip
Explain this command:
tcpdump -i eth0 host example.com and tcp port 443 -w https.pcap
Listen on interface eth0 with a host DNS example.com with TCP only filter on port 443 and write the packets captured to https.pcap
What is the library associated with tcpdump called?
lipbcap
[CMD] Count packets using protocol icmp, read from a file
tcpdump -r FILE icmp | wc -l
[CMD] Read from file, which ip asked for the MAC address of a destination ip? And what protocol is used for these types of things?
tcpdump -nn -r traffic.pcap arp and dst host ip
ARP is used (Address resolution protocol)