Skip to content
Permalink
gh-pages
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

Lab: Working with the Command Line

Part 1, The Basics

Because this is largely a hands-on course, it is essential that you learn many of the fundamental Linux commands, an important skill for any good security practitioner.

If you are using macOS, you can also use the Terminal app. If you are using Windows 10, you can use the Linux subsystem. See instructions at https://docs.microsoft.com/en-us/windows/wsl/install-win10.

Please learn and tinker with the commands below and answer the questions below. Many commands will require flags.

Commands: ls, rm, mkdir, rmdir, cd, wget, pwd, ln, sudo, chmod, umask, ping, cut, sort, which, grep, whereis, finger, w, who, whoami, last, file, strings, top, ps, nice, nohup, kill, signal, more, less, ifconfig, arp, nslookup, cat, uname, history, netstat, curl, ifconfig, traceroute, shred, dig, man, lsof, whois, crontab, nc, uniq, id, groups, df, du, dd, openssl, tar, clear, touch

In addition, please read "The command-line, for cybersec" by Rob Graham: https://blog.erratasec.com/2017/01/the-command-line-for-cybersec.html

Answer the questions below. Answers may vary depending on operating system used.

  1. How would you find the path (i.e., location) to the gcc command?

  2. How would you download a file from the Internet?

  3. What is the full command to read the manual page of the command that formats and displays the on-line manual pages? (NOTE: there is no typo to this question)

  4. What command can you use to find out your IP address and MAC address?

  5. What command can you use to show all the processes that are running on the system?

  6. What command can you use to get more details about running processes listening on ports?

  7. What command with flag could you use to list every file, including hidden files, on the entire system, showing their owner, location, and access time? Please also note the flags that you used with command.

  8. Assume you found a file named warrent.pdf. What command could you use to find out what type of file this was?

  9. So you discovered that warrent.pdf is a binary executable. What command could you use to extract any readable information from the file without running it? Also, try this on a compressed file such a ZIP or JAR

  10. What command can you use to find the IP address-to-MAC address mappings for systems on the local network?

  11. Consider the following IP address: 46[dot]252[dot]26[dot]153. Where is the computer with that IP address located --in what country?

  12. For the previous question, what command did you use to determine the location of the computer?

  13. What command can you use to securely delete a file?

  14. What command can you use to see if you are a computer administrator or superuser?

  15. What command can you use to see list of previous commands you have entered on command line?

  16. What command can you use to see list of scheduled tasks running on your computer?

Part 2, Wargames

Let's further hone your basic security skills by playing wargames. This set of wargames is offered by OverTheWire (http://overthewire.org/wargames/).

Play the Bandit wargame at http://overthewire.org/wargames/bandit/, beginning with level 0. Play as many levels as you can. To get credit, show proof that you have played the Bandit wargames by submitting a screenshot of your terminal screen that shows the highest level you have completed (e.g., via Canvas).

This part is dedicated to Olivia MacDougal, Class of 2018

Submitting This Lab

For students officially enrolled in the course, submit lab on Canvas.