Assn 3
Assn 3
Lab 1: Applications
Objective
Having gotten our feet wet with the Wireshark packet sniffer in the introductory lab,
we’re now ready to use Wireshark to investigate protocols in operation. In this lab, we’ll
explore several aspects of the HTTP protocol: the basic GET/response interaction,
HTTP message formats, retrieving large HTML files, retrieving HTML files with
embedded objects, and HTTP authentication and security. Before beginning these labs,
you might want to review Section 2.2 of the text.
The example in Figure 1 shows in the packet-listing window that eight HTTP messages
were captured: four GET messages and four responses. Two of the messages are of
interest, the rest are attempts by my browser to get favicons and other decorative
bangles. You might have similar attempts or even HTTP requests generated by other
software you had running at the time (dropbox, for instance). As many utilities use
HTTP, it is very possible that you will have similar messages that are not germane to this
1
Wikipedia's page at wikipedia.org/wiki/Wikipedia:REFRESH describes how to clear the cache
on just about any browser
PAGE 1 OF 8
14-740 VERSION 1.4.6.1
lab. Inspect them to determine their source and then ignore them for the rest of the
lab.2
The packet-contents window shows details of the selected message (in this case the
HTTP GET message, which is highlighted in the packet-listing window). Recall that
since the HTTP message was carried inside a TCP segment, which was carried inside an
IP datagram, which was carried within an Ethernet frame, Wireshark displays the
Frame, Ethernet, IP, and TCP packet information as well. We want to minimize the
amount of non-HTTP data displayed (we’re interested in HTTP here, and will be
investigating these other protocols is later labs), so make sure the information for
2
On my local network, I get tons of SSDP messages, which are sent in HTTP format, so they
show up when I filter on HTTP. To get rid of SSDP messages, add "and not (udp.port eq 1900)"
to your filter.
PAGE 2 OF 8
14-740 VERSION 1.4.6.1
Frame, Ethernet, IP and TCP lines are collapsed (by clicking the plus sign or twisting the
triangle on the left of each line). Similarly, make sure the HTTP line displays all the
information about each HTTP message (by similarly twisting the triangle or clicking to
get a minus sign).
By looking at the information in the HTTP GET and response messages, answer the
following questions. When answering any questions in this lab, describe your work. You
don't need to provide screenshots for everything, but we need to ensure you understand
your answers. That's a difficult task, given that your particular network capture will be
unique. If you just give us a number (or whatever), we can't check your understanding.
If we can't check your understanding, we can't give you points for it. So, give us a
description of the number (or whatever) and where you found it. You are encouraged to
give us a screenshot if that will clarify where you got the answer.
1. Is your browser running HTTP version 1.0 or 1.1? What version of HTTP is the
server running? (2 points)
2. What languages (if any) does your browser indicate that it can accept? (2 points)
3. What was the round-trip-time for the request (i.e. time between sending the request
and capturing the response)? (3 points)
4. What is the status code returned from the server to your browser? What does that
status code mean? (2 points)
5. When was the HTML file that you are retrieving last modified at the server? (2
points)
6. How many bytes of content are being returned to your browser? (2 points)
7. How many bytes are in the HTTP header (just the header, don't include data)? (3
points)
http://www.ietf.org/rfc/rfc2616.txt
• Your browser should display the HTTP RFC, which is a moderately lengthy
document.
• Stop Wireshark packet capture.
In the packet-listing window, you should see your HTTP GET message, followed by a
multiple-packet response to your HTTP GET request. This multiple-packet response
deserves a bit of explanation. Recall from Section 2.2 (see Figure 2.9 in the text) that the
HTTP response message consists of a status line, followed by header lines, followed by a
blank line, followed by the entity body. In the case of our HTTP GET, the entity body in
the response is the entire requested HTML file. In our case here, the HTML file is rather
PAGE 3 OF 8
14-740 VERSION 1.4.6.1
long, and at 422KBytes is too large to fit in one TCP packet. The single HTTP response
message is thus broken into several pieces by TCP, with each piece being contained
within a separate TCP segment (see Figure 1.24 in the text). Each TCP segment is
recorded as a separate packet by Wireshark, and the fact that the single HTTP response
was fragmented across multiple TCP packets is indicated by the “Reassembled TCP
Segments” phrase displayed by Wireshark.
Answer the following questions (again, make sure to explain your answers thoroughly):
8. How many HTTP GET request messages were sent by your browser? (2 points)
9. How many TCP segments were needed to carry the single HTTP response? (3
points)
10. How many bytes of overhead was generated in TCP to transport the response?
What percentage is the TCP overhead of the entire TCP + HTTP + Data
transmission? (Yes, we are deliberately ignoring IP and Ethernet for this question).
Make sure to explain what you think is overhead. (6 points)
11. What is the status code and phrase associated with the response to the HTTP GET
request? (2 points)
12. Are there any HTTP status lines in the transmitted data associated with a TCP-
induced “Reassembly of TCP Segments?” (3 points)
• http://www.andrew.cmu.edu/course/14-740-s18/applications/labs/assn3/b.html
• Your browser should display a short HTML file with three images. The first two
images are hosted on the ini740.com web server. The third is hosted elsewhere.
Your browser will have to retrieve these image files from the indicated web sites
using separate GET requests.
• Stop Wireshark packet capture.
PAGE 4 OF 8
14-740 VERSION 1.4.6.1
• http://www.andrew.cmu.edu/course/14-740-s18/applications/labs/assn3/a.html
• Enter the same URL into your browser again (or simply select the refresh button on
your browser)
• Stop Wireshark packet capture, and examine the messages you’ve caught.
PAGE 5 OF 8
14-740 VERSION 1.4.6.1
• http://www.andrew.cmu.edu/course/14-740-s18/applications/labs/assn3/c.html
• In the page that gets downloaded, you’ll see an extremely simple form with two
fields, mimicking a login page. Fill in any data you’d like in the two fields and press
the submit button.
• Stop Wireshark packet capture, and examine the messages you’ve caught.
Step 6: Authentication
Clearly the login form of the previous step isn’t sufficient to actually protect anyone. We
saw the password is sent in the clear. Let’s try a bit more sophisticated mechanism.
Do the following:
• Start up the Wireshark packet capture with your (by now) favorite filter.
• Enter the following URL into your browser:
• http://www.cs.cmu.edu/afs/cs/academic/class/15213-s02/www/assn3/d.html
• (Yes, the above is a weird URL. It was just a place that worked)
• You will have to enter a username and password before the page will be displayed.
Use the username SmartStudent and the password PoorPassword.
• After you see the authenticated page, stop Wireshark packet capture, and examine
the messages you’ve caught.
Answer the following questions:
PAGE 6 OF 8
14-740 VERSION 1.4.6.1
22. Is there anything different or strange in the first GET message sent from the
browser? At this point in time, does the browser know the webpage is protected? (2
points)
23. Examine the first response message. What is the status code? What is the content
of this message (i.e. the data section) (3 points)
24. Examine the next GET message from the browser. The Authorization header
looks like:
Authorization: Basic U21hcnRTdHVkZW50OlBvb3JQYXNzd29yZA==
“Basic” is the authorization type. It matches the WWW-Authenticate header in the
first response message.
The U21...A== string looks interesting. Is it the encrypted password? Copy it into
the Base64 Decoder at:
http://www.opinionatedgeek.com/dotnet/tools/Base64Decode.
What do you find? If you twist the triangle on the Authorization header in
Wireshark, you’ll discover the same thing. What is Base64? Does it protect the
password from people with Wireshark? (8 points)
PAGE 7 OF 8
14-740 VERSION 1.4.6.1
27. Can you tell if the first request was cached or if the nameserver went out and found
it somewhere? What’s your evidence? If you think it was cached, repeat the
experiment until you find a non-cached domain name. (3 points)
28. Can you tell if the second request was cached? (3 points)
29. My computer sends lots of DNS queries with type = AAAA. Does yours? What are
those? (4 points)
30. If I remove the ip.addr filter (but keep the DNS display filter), I see some traffic
where the protocol is listed as LLMNR and MDNS (even though I’m only asking for
DNS). What is LLMNR? MNDS? Why would I see it, even though I’m specifically
filtering only for DNS? What display filter might I use to show DNS traffic, but get
rid of LLMNR and MDNS traffic? (4 points)
Complete
You’re done now. Feel free to play around with Wireshark and learn a bit more. Submit
your answers as a single PDF file to the Assignment on Canvas.
PAGE 8 OF 8