31778713-tcpdump

Upload: surinder-pal

Post on 06-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 31778713-tcpdump

    1/2

    TCPDUMPCommand Line Options -A -c -D -e -F -G -i -K -L -n -pPrint frame payload in ASCII Exit after capturing count packets List availableinterfaces Print link-level headers Use file as the filter expression Rotate thedump file every n seconds Specifies the capture interface Don't verify TCP checksums List data link types for the interface Don't convert addresses to names Don't capture in promiscuous mode -q -r -s -S -t -v[v[v]] -w -

    x -X -y -Z Quick output Read packets from file

    packetlife.net

    Capture up to len bytes per packet Print absolute TCP sequence numbers Don't print timestamps Print more verbose output Write captured packets to file Print frame payload in hex Print frame payload in hex and ASCII Specify the data link type Drop privileges from root to user

    Capture Filter Primitives [srcdst] host ether [srcdst] host gateway host [srcdst] net / [tcpudp] [srcdst] port Matches a host as the IP source, destination, or either Matches a host as the Eth

    ernet source, destination, or either Matches packets which used host as a gateway Matches packets to or from an endpoint residing in network Matches TCP or UDPpackets sent to/from port

    [tcpudp] [srcdst] portrange - Matches TCP or UDP packets to/from a port in the given range less greater (etheripip6) proto (etherip) broadcast (etheripip6) multicast Matches packets less than or equal to length Matches packets greater than or equal to length Matches an Ethernet, IPv4, or IPv6 protocol Matches Ethernet or IPv4 broadcasts Matches Ethernet,IPv4, or IPv6 multicasts

    type (mgtctldata) [subtype ] Matches 802.11 frames based on type andoptional subtype vlan [] mpls [] Protocols ar

    p ether fddi icmp ip ip6 link ppp radio rarp TCP Flags tcp-urg tcp-ack tcp-psh tcp-rst tcp-syn tcp-fin slip tcp tr udp wlan icmp-echoreply icmp-unreach icmp-sourcequench icmp-redirect icmp-echo Modifiers ! or not && or and or or udp dstport not 53 Matches 802.1Q frames, optionally with a VLAN ID of vlan Matches MPLS packets, optionally with a label of label Matches packets by an arbitrary expression Examples UDP not bound for port 53

    host 10.0.0.1 && host 10.0.0.2 Traffic between these hosts tcp dst port 80 or 8080 ICMP Types icmp-routeradvert icmp-routersolicit icmp-timxceed icmp-paramprobicmp-tstamp icmp-tstampreply icmp-ireq icmp-ireqreply icmp-maskreq icmp-maskreply v2.0 Packets to either TCP port

    by Jeremy Stretch

  • 8/3/2019 31778713-tcpdump

    2/2