Packet Captures: Difference between revisions
Content added Content deleted
m (→TCPDump Filters: tcp) |
(→TCPDump Filters: added) |
||
Line 280: | Line 280: | ||
*Capture packets with IP address without DNS resolution |
*Capture packets with IP address without DNS resolution |
||
tcpdump -n -i eth0 |
tcpdump -n -i eth0 |
||
⚫ | |||
⚫ | |||
*Capture packets with proper readable timestamp |
*Capture packets with proper readable timestamp |
||
Line 309: | Line 306: | ||
<br /> |
<br /> |
||
<br /> |
<br /> |
||
=== Reading PCAPs === |
|||
⚫ | |||
⚫ | |||
tcpdump -e -nn -vv -r traffic.dump |
|||
tcpdump -XX -r eth0_Merged.pcap |
|||
=== TCPDump Parameters === |
=== TCPDump Parameters === |
||
====Modifiers==== |
|||
<pre> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
</pre> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
<pre> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
</pre> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
<pre> |
|||
arp ether |
arp ether |
||
icmp ip |
icmp ip |
||
Line 333: | Line 339: | ||
rarp tcp |
rarp tcp |
||
udp wlan |
udp wlan |
||
</pre> |
|||
====TCP Flags==== |
|||
<pre> |
|||
tcp-urg tcp-rst |
tcp-urg tcp-rst |
||
tcp-ack tcp-syn |
tcp-ack tcp-syn |
||
tcp-psh tcp-fin |
tcp-psh tcp-fin |
||
</pre> |
|||
====Capture Filter Primitives==== |
|||
<pre> |
|||
[src|dst] host <host> Matches a host as the IP source, destination, or either |
[src|dst] host <host> Matches a host as the IP source, destination, or either |
||
ether [src|dst] host <ehost> Matches a host as the Ethernet source, destination, or either |
ether [src|dst] host <ehost> Matches a host as the Ethernet source, destination, or either |
||
Line 359: | Line 365: | ||
mpls [<label>] Matches MPLS packets, optionally with a label of label |
mpls [<label>] Matches MPLS packets, optionally with a label of label |
||
<expr> <relop> <expr> Matches packets by an arbitrary expression |
<expr> <relop> <expr> Matches packets by an arbitrary expression |
||
</pre> |
|||
====Command Line Options==== |
|||
<pre> |
|||
-A Print frame payload in ASCII |
-A Print frame payload in ASCII |
||
-c <count> Exit after capturing count packets |
-c <count> Exit after capturing count packets |
||
Line 386: | Line 392: | ||
-X Print frame payload in hex and ASCII |
-X Print frame payload in hex and ASCII |
||
-y <type> Specify the data link type |
-y <type> Specify the data link type |
||
</pre> |
|||
<br /> |
<br /> |
||