A network tools scavenger hunt

File: misc/tools.txt

You may work with other people on this assignment, but write up and submit your own solutions.

Goals

Rubric

1 - author name at the top of misc/tools.txt 1 * 9 - the questions 2 - citations

Your job

This is a short-answer assignment, so keep it brief—just a list of commands should be sufficient for most of the questions.

For each of the following, provide at least one Unix command that answers the question. Make sure these commands work in either the macOS Terminal, the WSL terminal on Windows, or the terminal on our Kali virtual machine. I'm not interested (today) in answers that involve GUI programs, so restrict your answers to command-line commands.

You'll need to have some familiarity with some beginning concepts related to IP (addresses), TCP (ports), and HTTP (headers). So you should watch my video A brief introduction to HTTP before jumping into those questions. (I know that some of you already know this stuff, but the video might be useful just to learn how I think about this material. Of course, those of you who have watched this video before shouldn't feel obligated to do it again.)

Go ahead and use whatever internet resources you find, but cite your sources for each problem. For this assignment, an URL is sufficient citation. Ultimately, the answers are in each command's documentation, no matter how you found the command in the first place, but (1) I'd love to have links to resources you found useful, and (2) I want you to get into the habit of citing your sources for this class.

How to hand it in

In your GitHub repository for this course, put your answers in a text file named tools.txt in the misc directory you created during the setup assignment. I really do want this to be a text file (not PDF, not .docx, not .rtf, etc.). When you're ready, git add/commit/push to put your answers into the GitHub copy of your repository.

The questions

  1. What's your computer's IP address for its current Internet connection? (0-point bonus: how can you tell the difference between your Ethernet IP and your wireless IP if you have both connections active?)
  2. How can you determine the IP address associated with a given host name?
  3. How can you determine the host name(s) associated with a given IP address?
  4. How can you copy a file from one computer to another? Or more to the point, if you create a file on the Kali virtual machine and you want to put it someplace where you can save it, like your your account on mantis.mathcs.carleton.edu, how do you go about it from the Kali command-line interface?
  5. How can you tell whether there's a process listening on a given port (e.g. port 80 or port 22) on a given host?
  6. How can you tell which ports have processes listening on them on a given host?
  7. How can you retrieve and save a given web page (say https://google.com/ or https://carleton.edu/) in a file on your system?
  8. How can you view the HTTP headers sent back from a specified web server when you request one of its pages?
  9. How can you view the HTTP headers that your computer sends to the web server when you do the tasks in the previous two questions?

Some commands that you might find interesting: nc (also known as netcat), nmap, curl, wget. There are other relevant commands, of course, so use your internet-searching powers.

Have fun!