Nothing Special   »   [go: up one dir, main page]

Networks - W3

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 24

COMPUTER NETWORKS

( 00207N )

Week 3
Topics

■ HTTP Definition
■ HTTP vs HTTPS
■ HTTP Message Types
■ Wireshark Overview
■ Basic HTTP GET/response interaction
■ HTTP CONDITIONAL GET/response interaction
■ Retrieving Long Documents
■ HTTP Authentication
■ Authentication (Wireshark)
■ Reference
HTTP Definition

■ HTTP stands for Hypertext Transfer Protocol used for transferring data over a network.
Most information that is sent over the Internet, including website content and API calls,
uses the HTTP protocol.
– There are two main kinds of HTTP messages: requests and responses.
HTTP vs HTTPS Protocols
HTTP Message Types
HTTP Request message
HTTP Response Message
HTTP Overview

http://www.mit.edu
Wireshark Overview
Wireshark Overview
Basic HTTP GET/response interaction

■ URL : http://gaia.cs.umass.edu/wireshark-labs/HTTP-wireshark-file1.html
■ Operation 1 , Steps:
– Start Wireshark
– Load above URL
– Stop Wireshark
Basic HTTP GET/response interaction

■ 1. Is your browser running HTTP version 1.0 or 1.1? What version of HTTP is the
server running?
■ 2. What languages (if any) does your browser indicate that it can accept to the server?
■ 3. What is the IP address of your computer? Of the gaia.cs.umass.edu server?
■ 4. What is the status code returned from the server to your browser?
Basic HTTP GET/response interaction

■ 5. When was the HTML file that you are retrieving last modified at the server?
– Must clear cache of the browser
■ 6. How many bytes of content are being returned to your browser?
■ 7. By inspecting the raw data in the packet content window, do you see any headers
within the data that are not displayed in the packet-listing window? If so, name one.
HTTP CONDITIONAL GET/response
interaction
■ URL : http://gaia.cs.umass.edu/wireshark-labs/HTTP-wireshark-file2.html
■ Operation 2 , Steps:
– Clear your browser cache
– Start Wireshark
– Load above URL twice
– Stop Wireshark
HTTP CONDITIONAL GET/response
interaction
HTTP CONDITIONAL GET/response
interaction
■ 1. Inspect the contents of the first HTTP GET request from your browser to the server.
Do you see an “IF-MODIFIED-SINCE” line in the HTTP GET?
■ 2. Inspect the contents of the server response. Did the server explicitly return the
contents of the file? How can you tell?
■ 3. Now inspect the contents of the second HTTP GET request from your browser to the
server. Do you see an “IF-MODIFIED-SINCE:” line in the HTTP GET? If so, what
information follows the “IF-MODIFIED-SINCE:” header?
■ 4. What is the HTTP status code and phrase returned from the server in response to this
second HTTP GET? Did the server explicitly return the contents of the file? Explain.
Retrieving Long Documents

■ URL : http://gaia.cs.umass.edu/wireshark-labs/HTTP-wireshark-file3.html
■ Operation 3 , Steps:
– Clear your browser cache
– Start Wireshark
– Load above URL
– Stop Wireshark
Retrieving Long Documents

■ 1. How many HTTP GET request messages did your browser send? Which packet
number in the trace contains the GET message for the Bill of Rights?
■ 2. Which packet number in the trace contains the status code and phrase associated with
the response to the HTTP GET request?
■ 3. What is the status code and phrase in the response?
■ 4. How many data-containing TCP segments were needed to carry the single HTTP
response and the text of the Bill of Rights?
HTTP Authentication

■ URL : http://gaia.cs.umass.edu/wireshark-labs/protected_pages/HTTP-wireshark-
file5.html
■ Operation 5 , Steps:
– Clear your browser cache
– Start Wireshark
– Load above URL
– Username : wireshark-students , Password : network
– Stop Wireshark
HTTP Authentication

■ 1. What is the server’s response (status code and phrase) in response to the initial HTTP
GET message from your browser?
■ 2. When your browser’s sends the HTTP GET message for the second time, what new
field is included in the HTTP GET message?
Revision (HTTP vs HTTPS Protocols)
Authentication (Wireshark)
■ HTTP
Authentication (Wireshark)
■ HTTPS
– We can’t sniff it with Wireshark using normal methods because it’s encrypted
– This is how it looks like if we tried to do it normally :
Reference

■ https://www-net.cs.umass.edu/wireshark-labs/Wireshark_HTTP_v7.0.pdf

You might also like