Changes between Initial Version and Version 1 of netsec2018wireshark


Ignore:
Timestamp:
Jun 6, 2018, 6:45:47 AM (7 years ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • netsec2018wireshark

    v1 v1  
     1= Capture and Analise Packets =
     2
     3In this lab session we will use tcpdump and wireshark to capture packets. To analise them we will use wireshark.
     4
     5== Packet Capturing ==
     6
     7=== tcpdump ===
     8
     9 - Go to the ubuntu VM
     10
     11 - use tcpdump command to pacture packets
     12{{{
     13tcpdump -nn
     14}}}
     15
     16 - you will get outputs like following
     17{{{
     18IP 199.59.148.139.443 > 192.168.1.8.54343: Flags [P.], seq 53:106,
     19ack 1, win 67, options [nop,nop,TS val 854797891 ecr 376933204],
     20length 53
     21}}}
     22
     23 - You can try tcpdump with different attributes
     24{{{
     25tcpdump –nni eth0 host 10.10.10.10
     26tcpdump –nni eth0 dst host 10.10.10.10 and tcp
     27tcpdump –nni eth0 src net 10.10.10.0/24 and tcp and portrange 1-1024
     28tcpdump –nni eth0 –s0
     29tcpdump –nni eth0 not port 22 –s0 –c 1000
     30tcpdump –nni eth0 not port 22 and dst host 10.10.10.10 and not src net 10.20.30.0/24
     31
     32-nn = don’t use DNS to resolve IPs and display port no
     33-i = interface to watch
     34dst = watch only traffic des0ned to a net, host or port
     35src = watch only traffic whose src is a net, host or port
     36net = specifies network
     37host = specifies host
     38port = specifies a port
     39proto = protocol ie tcp or udp
     40-s0 = seIng samples length to 0 m
     41-c = number of packets
     42}}}
     43
     44 - You can capture packets and save them to a file
     45{{{
     46# tcpdump –nni eth0 -w capture.pcap –vv –c 1000
     47# tcpdump –nni eth0 –r capture.pcap port 80
     48 
     49-w capture.pcap = save capture packet to capture.pcap
     50–vv =  display number of packet captured
     51-r capture.pcap = read capt
     52}}}