ì Computer Networking - Pacific Networking and Computer ...ì Wireshark can read a collection of...

13
ì Computer Networking COMP 177 | Fall 2020 | University of the Pacific | Jeff Shafer Introducing Wireshark

Transcript of ì Computer Networking - Pacific Networking and Computer ...ì Wireshark can read a collection of...

Page 1: ì Computer Networking - Pacific Networking and Computer ...ì Wireshark can read a collection of already-captured packets in a file. ì File with suffix: .cap, .pcap, .pcapng ì Such

ìComputer NetworkingCOMP 177 | Fall 2020 | University of the Pacific | Jeff Shafer

Introducing Wireshark

Page 2: ì Computer Networking - Pacific Networking and Computer ...ì Wireshark can read a collection of already-captured packets in a file. ì File with suffix: .cap, .pcap, .pcapng ì Such

Recap

Past Topicsì An overview of computer

networking

Today’s Topicì Introduce Wireshark

ì General architectureì GUI

Fall 2020Computer Networking

2

Page 3: ì Computer Networking - Pacific Networking and Computer ...ì Wireshark can read a collection of already-captured packets in a file. ì File with suffix: .cap, .pcap, .pcapng ì Such

Why are we learning about Wireshark?

ì To understand how protocols work, it is helpful to ì Observe the sequence of packets communicated

between network nodes ì Study the packet details and how protocols work in

practice ì Cause the protocol to do a specific action and check

out the result

ì Wireshark is a free tool that provides such servicesì Supports all major operating systems

Fall 2020Computer Networking

3

https://www.wireshark.org/

Page 4: ì Computer Networking - Pacific Networking and Computer ...ì Wireshark can read a collection of already-captured packets in a file. ì File with suffix: .cap, .pcap, .pcapng ì Such

Reading & Parsing Packets

ì Wireshark is capable of reading a packet and parsing it into ì Different protocols headers ì Different fields in each protocol header ì … plus reporting some meta-data about the fields

ì This does not appear directly in the packet header but is based on Wireshark analysis of this packet or even a sequence of packets

Fall 2020Computer Networking

4

Page 5: ì Computer Networking - Pacific Networking and Computer ...ì Wireshark can read a collection of already-captured packets in a file. ì File with suffix: .cap, .pcap, .pcapng ì Such

Reading & Parsing Packets

Fall 2020Computer Networking

5

Physical

Ethernet

IP

TCP

HTTP HTTP message

TCP header

IP header

Ethernetheader

A collection of bits

TCP payload

IP payload

Ethernet payload

HTTP message

HTTP message

HTTP message

TCP header

TCPheaderIP header Ethernet

trailer

Page 6: ì Computer Networking - Pacific Networking and Computer ...ì Wireshark can read a collection of already-captured packets in a file. ì File with suffix: .cap, .pcap, .pcapng ì Such

Reading Packets

ì Two major ways to obtain packets for analysis:ì Wireshark can read a collection of already-captured packets in a

file.ì File with suffix: .cap, .pcap, .pcapngì Such a file may include packets from a remote network

ì Wireshark can capture packets from a given network interfaceì This is called packet sniffingì A packet sniffer collects copies of the sent/received packets, parses,

and reports them to the userì A packet sniffer acts passively, i.e.,

ì It does not send packets to other machines by itselfì It does not spoof the packets

ì There are many other packet sniffers beside Wiresharkì tshark, tcpdump, dumpcap, ettercap, etc.

Fall 2020Computer Networking

6

Page 7: ì Computer Networking - Pacific Networking and Computer ...ì Wireshark can read a collection of already-captured packets in a file. ì File with suffix: .cap, .pcap, .pcapng ì Such

System levelUser level

Packet Sni er

PacketAnalyzer

PacketCapture

Packet Sniffer Architecture

ì A packet sniffer consists of two major components:ì Packet capture library

ì Runs in system level (operating system)

ì Reads the packets from network interface of the machine

ì Packet analyzer libraryì Runs in user levelì Parses and reports the packets

to the user

Fall 2020Computer Networking

7

Page 8: ì Computer Networking - Pacific Networking and Computer ...ì Wireshark can read a collection of already-captured packets in a file. ì File with suffix: .cap, .pcap, .pcapng ì Such

Packet Capturing

ì To capture a packet with all encapsulated headers, it suffices to get a copy of the data link layer frame

Fall 2020Computer Networking

8

System levelUser level

Packet Sniffer

PacketAnalyzer

PacketCapture

Data Link

Network

Transport

Application

Application layer messageTransportlayer header

Application layer messageTransportlayer header

Networklayer header

Application layer messageTransportlayer header

Networklayer header

Linklayer header

Linklayer trailer

Transport layer payload

Network layer payload

Data link layer payload

Application layer message

Reads

Page 9: ì Computer Networking - Pacific Networking and Computer ...ì Wireshark can read a collection of already-captured packets in a file. ì File with suffix: .cap, .pcap, .pcapng ì Such

Running Wireshark (Linux)

ì Installì $ sudo apt-get install wireshark

ì Configure so non-root users have permission to capture packets (insert your Linux username into the second command)ì $ sudo dpkg-reconfigure wireshark-common

$ sudo usermod -a -G wireshark USERNAME

ì Run Wiresharkì $ wireshark

ì Next, interfaces are listed. Selecting one of the interfaces will start capturing packets on that interface.

Fall 2020Computer Networking

9

Page 10: ì Computer Networking - Pacific Networking and Computer ...ì Wireshark can read a collection of already-captured packets in a file. ì File with suffix: .cap, .pcap, .pcapng ì Such

Running Wireshark

Fall 2020Computer Networking

10

Page 11: ì Computer Networking - Pacific Networking and Computer ...ì Wireshark can read a collection of already-captured packets in a file. ì File with suffix: .cap, .pcap, .pcapng ì Such

Fall 2020Computer Networking

11Toolbar

Packet List

Packet Details

Packet Bytes

Display Filter

Page 12: ì Computer Networking - Pacific Networking and Computer ...ì Wireshark can read a collection of already-captured packets in a file. ì File with suffix: .cap, .pcap, .pcapng ì Such

Wrapup

Recapì Today we discussed

ì Why we need to learn about a packet sniffer

ì The architecture of packet sniffers

ì Wireshark and its GUI

Next Classì Start discussing data link

layer protocolsì Ethernet (802.3)ì WiFi (802.11)

Fall 2020Computer Networking

12

Page 13: ì Computer Networking - Pacific Networking and Computer ...ì Wireshark can read a collection of already-captured packets in a file. ì File with suffix: .cap, .pcap, .pcapng ì Such

Fall 2020Computer Networking

13

Class Activity

CA.1 – Introducing Wireshark

Due tonight at 11:59pm