Projects#
Because this topic is so big, we'll explore a few key projects to help you understand what's going on and hopefully visually see networking in action.
To complete thse projects, you'll need to familiarise yourself (and possibly download) with the following tools:
- Wireshark
- Python 3
curl
Once you have these in place and can use them (and exercise left to you, dear reader), then we can get on with some cool projects.
TCP Sockets#
Using Wireshark, tell us what TCP sockets you have open on your local system.
- How many of them are listening for inbound connections?
- How many are outbound and are connected to a remote server?
- Of the sockets you have listening locally, what are the Application Level protocols they're listening for?
Write a short report on how you found the sockets, what tool(s) you used and options, and what they're open for.
Some things can be ignored
Some sockets might have a special meaning, so if you cannot information about the protocol don't worry about it. Just move on.
Remote HTTP Traffic#
Now we're going to use a special Python 3 module that will allow us to create a local web server that we can then use to analyse the traffic.
Place the following content in a file called index.html
somewhere in an empty folder of your choice:
1 |
|
Now open a terminal up in the location of the file and run this: python3 -m http.server
Here's how I did this on Linux:
1 2 3 4 5 6 7 |
|
Now I have an HTTP server running locally, but what now?
We want you to analyse the traffic to that server:
- Using Wireshark, filter for HTTP traffic to
localhost:9000
(you should know what protocol is being used: TCP or UDP?) - Now use
curl
to send simple requests to the server, likecurl http://localhost:9000/index.html
- what do you get back? - What happens if you request a missing or nonexistent resource?
- What happens if you add an image to the same directory as
index.html
and then request it? - Use the
-I
flag oncurl
and explain what you're seeing - break down each header in the repsonse.
Whilst doing all of the above, you should be using Wireshark to analyse and breakdown the traffic you're seeing. Write a small report on the protocols being used for each requets you're making:
- How many packets are being sent?
- What protocol is being used?
- Show use a capture of a single packet and explain some of the details you're seeing