Lab 1
Lab 1
The Hardware
You will be using the 14740 Network Testbeds (the “Racks”) located on the second oor of
the Information Networking Institute (INI) building inside the Quiet Study Room (shown
in the image below). These testbeds are a self-contained simulation of a minimal internet
network. The most prominent feature of the testbeds is a computer monitor mounted on an
arm from the top of the rack. There is also a keyboard and a mouse to control the computer.
On the back of the Racks, there is a row of power switches. An Ethernet cable is
hanging out of the top of the Racks.
1 Version 7
Go ahead and peek in the glass doors to admire the hardware inside. Lots of switches,
Raspberry Pis (small computers), and wires. At this point, you should be thinking, "It looks
complicated." And, you would be right to think so. It is complicated! But most of that
complexity is hidden, to make this lab experience clear and standard for all of you. Similarly,
the complexity of the Internet is hidden by the layers of abstraction. For now, imagine the
testbeds have a network connecting the PC to many di erent servers. Oh, when I say "the
PC," I mean the Next Unit of Computing (NUC) computer running the screen and
keyboard/mouse that will be your interface to the network. You will use it to create
network tra c. That tra c will travel through various switches and over wired links to
the servers, each of which is running on a Raspberry Pi.
That Ethernet cable hanging out of the top of the rack is your view (capture
point) of that tra c. The other end of that wire is connected to a switch with a mirror
tap enabled. That mirrors all the tra c in the Network Testbeds (our mini Internet), so it
will be visible to any computer connected to that Ethernet cable (i.e., your computer
running Wireshark).
Your laptop will be connected to the Ethernet cable and you will run Wireshark
(on your computer) to examine the network tra c between the Rack’s PCs and
the various servers (inside the testbed). Enough talk! Let's get started!
Procedures
1. Verify that power switch nine (9) (on the power rail behind the racks as shown in the
following gure) is turned on.2
2. Verify that the top Netgear switches inside the Racks display the numbers one (1)
and two (2) as shown in the image below.
2Please, NEVER turn o Power Switch 9 on the back of the “Racks” as it can cause a cascade e ect of miscon gurations in the
Racks.
3. Turn on (Restart if it is already on) the PC by powering on/o switch eight (8) (on the
power rail behind the rack). BE CAREFUL! The PC must be rebooted between
students, as that is set up to clear out the memory and lesystem.
4. Login to the Racks’ PC using the following credentials:
Username: student
Password: 740Rocks$
5. If the power switch one (1) is ON, turn it OFF and wait for ve (5) seconds (static
charge can keep the devices on for a second or two) to continue with the next step.
6. Turn ON the power switch one (1) (on the power rail behind the rack) and wait about
thirty (30) seconds for the hosts to boot up.
7. Open the Lab 1 user interface (application) on the PC’s desktop and make sure that the
status line at the bottom reads Status: All hosts are up. If not wait for a few
more seconds, reopen the Lab 1 user interface (application), and proceed with the next
step.
8. Repeat steps ve (5) to seven (7) if any hosts are still down.
9. If you are having issues at any point with the Lab devices (e.g., servers), you can always
restart all the components of Lab 1 by repeating steps 5-7.
10. Connect the Ethernet cable (on the top of the rack) to your laptop and start
Wireshark (on your laptop).
11. When you are done with the lab, shut down the computer and turn o all the
power switches EXCEPT 9!
The Lab 1 interface has eight (8) major components, numbered in the above picture (red
numbers):
1. The Address Bar allows you to specify URIs to make general HTTP requests.
The drop-down menu (box) on the left allows you to change the method of the
HTTP request from GET to POST. The middle part allows you to type in the
address (URI) of the website. The Go! button on the right will execute the HTTP
request using the speci ed method (GET or POST), the options provided (e.g.,
Range), and the address that you entered (URI).
2. The Post Parameter [Optional] Field allows you to send parameters in an
HTTP POST request. As noted, this is optional (For instance, it will not be included
in a GET request). In an HTTP POST request, you should type in a key/value pair
separated by an equal sign (key=value) when posting information. For example, if
you want to send a password parameter (key) with the value 1234, simply type
password=1234 in this eld to complete the POST request.
3. The GET Range [Optional] Field provides a space for you to enter the details of a
GET Range to create a Conditional GET HTTP request. The value typed here will be
put into the appropriate header of the request3. For instance, if you want to retrieve the
rst 115 bytes of a given webpage (URI), you can type 0-115 in the Range eld.
3 If you want to learn more about GET requests with the Range option please check this document.
4. The Proxy Request Checkbox (Use Proxy) is used in part three (3) of this Lab.
Check this box and the Network Testbed’s Web Proxy (Cache) will be used. This is
a Web Proxy (Cache) and it is di erent from the Browser Cache that is available
in the Lab 1 application. Do not activate this option until indicated in the handout.
5. This window will render (display) the contents of the web page you load (requested
HTML le), much like your web browser does (e.g., Google Chrome).
6. This is the host status line for all the components (e.g., servers) that are needed in
the Lab, make sure this eld always shows Status: All hosts are Up!
7. The Start DNS Spoofer button (bottom-right corner) is used in part six (6) of
this Lab, Click this button and the spoofer will start.4
8. The Clear Browser Cache button is pushed to clear the Browser Cache of
the Lab 1 user interface. This is a very useful tool to avoid getting a cached copy of
the webpages that you want to render and instead get the webpages directly from the
Origin server for your analysis. So make sure to use it whenever indicated in
this handout.
Part 1
Let’s begin our exploration of HTTP by downloading a very simple HTML le (i.e., a
webpage), one that contains a couple of elements. Do the following:
• Before starting Wireshark (on your computer), make sure the Rack’s
Ethernet cable (on top of the rack) is connected to your computer5.
• Start up the Wireshark packet sni er (on your computer), as described in Introductory
Lab # 0. Make sure to start the packet capture on your Wired Ethernet connection6
(but do not yet begin packet capture). To better help you with your analysis, you
might want to Filter for http or dns tra c so that you only capture HTTP or DNS
messages that will be displayed later in the packet-listing window. We are only
interested in these protocols in this Lab and do not want to see the clutter of all
captured packets. This is just a piece of advice, feel free to capture the tra c without
any capture lter and then use Wireshark’s Display lter (http or dns) to show
only the information that you need. Both approaches are valid and correct for this lab!
• Start the Wireshark capture on your Laptop (using the correct interface connected
to the Rack).
• Using the Lab 1 interface, display the following page. Make sure you clear the Browser
Cache before requesting the web page by using the available button7.
4Do not press this button until you arrive at the corresponding part of the lab. Otherwise, you will need to restart the lab
components to complete all the other steps.
5If needed you can use one of the Ethernet adapters (“dongles”) available in the basket next to the Rack. Make sure to select the
correct interface in your Wireshark window.
6 To avoid issues we advice students to turn o their Wi-Fi connection.
7 You might want to click on the Clear Browse Cache button at least two to three times to make sure the cache is cleared.
http://cool.com
• The PC’s browser (the Lab 1 GUI) should display a simple page with one line of text and
a picture.
• Stop the Wireshark packet capture and save the PCAP le for your future
analysis8.
Part 2
Let's see what happens with a more complex DNS and HTTP interaction. Do the following:
• Start up a new Wireshark packet capture (on your computer).
8 We advise you to save a di erent PCAP le for each part/question of the lab (e.g., Part 1.pcap). This will help you in your
analysis as you will only need to analyze the packets corresponding to that particular part. We advise you to do this with ALL the
labs and ALL the parts/questions.
9 If you have never drawn a sequence diagram, you can nd multiple examples by doing a quick Internet search.
• Clear the Browser Cache by clicking on the Clear Browser Cache button at least a
couple of times to be completely sure that the Cache is cleared.
• Enter the following URL into the PC’s browser (Lab 1 application interface)10.
http://bill.com (It will take slightly longer to load than the previous (simpler)
website)
• Your browser should display a simple version of the old course website.
• Stop Wireshark packet capture and save the PCAP le for your future analysis11.
Part 3
Now, let's look at HTTP interactions in more detail. In particular, let’s analyze the interactions
of the Rack’s computer with a Web Proxy (Cache) in the network. Do the following:
• Start up a new Wireshark packet capture (on your computer).
10If nothing is loaded after waiting some time (15 seconds), repeat the steps a couple of times until the webpage is fully loaded and
you see the HTTP packets being captured in your Computer/Wireshark.
11For the analysis of the following questions, we advise you to use a display lter to observe both http and dns tra c at the
same time.
12This will cause the Client (the PC that you are using) to rst contact the local Web Proxy/Cache available in the Rack, instead
of going directly to the Origin Web Server hosting the webpage that you are trying to obtain.
Each interaction will be composed of multiple HTTP requests/responses among the Client, the Proxy/Cache, and the Origin
13
Server.
14 The iterations include ALL the HTTP requests/responses between the Client, Proxy/Cache, and Origin Server for each of the
rst two iterations.
Part 4
Let's examine how the Range header works in a conditional HTTP GET. Do the following:
• Start up a new Wireshark packet capture (on your computer).
• Using the Range input eld in the Lab 1 application (browser) try to make a Conditional
GET Range request that retrieves only the text from the webpage: http://cool.com.
You might want to rst reanalyze the HTTP interactions (e.g., bytes received) without a
Range request to check where the text starts and nishes. This can give you a good idea of
the values to use in the Range eld (e.g., 0-115)
• Stop Wireshark packet capture and save the PCAP le for your future analysis.
http://cool.com/movie.ogv
• You should be able to watch a “Game of Thrones” clip.
• Use the seek/skip bar on the video player to skip to the end of the clip.
• A string (some random text) is displayed during the last few seconds of the video.
The iterations include ALL the HTTP requests/responses between the Client, Proxy/Cache, and Origin Server for each of the
15
• Stop Wireshark packet capture and save the PCAP le for your future analysis.
Part 5
Use the knowledge you have gained in a less structured exercise. Try to solve a really easy
Capture the Flag (CTF) game by investigating the contents of the HTTP messages to nd
some hidden information. To solve this, you might need to do an internet search on CTF basics.
Do the following:
• Start up a new Wireshark packet capture (on your laptop).
• Use the Lab1 application to browse to http://ctf.game.com
• Look around the HTTP messages and nd the secrets of the CTF game. In other words,
you will nd the steps that you will need to follow and the information that you will use to get
the ag.
• The CTF ag process is completed once you nd the Flag (a webpage with a 200 OK status
code and the Flag is displayed on the webpage).
• Stop Wireshark packet capture and save the PCAP le for your future analysis.
Part 6
The TA who built this rack was a security student, so he could not resist adding a malicious
computer to the network. This computer looks for DNS requests coming from the Resolver and
pretends to be an authoritative name server responding with a spoofed reply. Normally, the
spoofed reply would not be obvious, so we have arranged a way that you can distinguish it. DNS
replies coming from the malicious computer will contain an extra "unused record” along with a
message to make it obvious.
Do the following:
• Close the Lab 1 application (browser) and reopen it to ush the cache (just in case clear the
cache before starting).
• Start up a new Wireshark packet capture.
• Click the Start DNS spoofer button at the bottom of the browser, read the disclaimer,
accept by clicking Yes, and wait for about twenty (20) seconds for the script to start.
• Visit the following URI in your browser:
http://bill.cmu.edu
• Then, visit the following URI in your browser:
http://cool.com
• Stop Wireshark packet capture and save the PCAP le for your future analysis.
Make sure to reboot the PC to clear out the lesystem and memory of any of your work.
Turn-in
Before writing your Lab # 1 Report, go back to Lab # 0 and re-read the Some Comments
About Lab Reports section. This will provide you with a refresher of what is expected in
each Lab report.
Write a report of your interactions and answer the questions. Make sure to include enough
details to ensure we understand that you understand what is going on. For instance, your
(many, many, many) included screenshots should probably be annotated to show
where a number came from -- do not assume that because you know how to read a
Wireshark screen we know that you know it. Our graders will not make that assumption.
So, prove it to us by describing/annotating every value you nd from Wireshark
and your screenshots.
Turn in your answers in a single PDF le and submit it to the Lab 1 Assignment on
Gradescope.