Information Assurance

Clay Shields


front | classes | research | personal | contact

Information Assurance

Project 1 - Unix Familiarization
This semester we will be doing several projects on a instructional linux system dediated specifically to this class. If you have used unix or linux before, then some of this material will be new. Some of it may not be.

For this assignment, you are to use your account on the ia-class.georgetown.edu machine. The account has been created for you with your netid. The default password will be told to you in class.

You will have to use ssh to reach ia-class. A free ssh client (for Windows) is available at:

ftp://ftp.ssh.com/pub/ssh/SSHSecureShellClient-3.2.9.exe

Mac OS X already has a ssh client available through the terminal application. It is also available from the command line of most linux systems.

You will quickly notice that linux has a command line interface. You will have to type commands you want executed. This is good and bad. You have more control over what happens, but you have a lot to learn. I have been using unix and linux for about 10 years now, and keep learning things. For an unrelated discussion of the relative merits of different operating systems, take a look at In the Beginning Was the Command Line.

First Off

I would recommend using tcsh as a shell - in unix, the shell is the program that runs as your interface to the operating system. bash is good too, but most of the tutorials cover using tcsh. On ia-class, your default shell is tcsh.

Also, you need to know is that you can get what passes for help for any command on a linux system by typing:
man <command>

where <command> is the command you want information about. The man pages are not always useful in a tutorial sense, but they will explain the variety of options available for each command.

Try "man man" to see what man can tell you.

Reference information


A number of good tutorials exist that will teach you all you need to know about unix, and more. You should look through these tutorials as you answer the questions below.

http://www.ee.surrey.ac.uk/Teaching/unix/
http://www.ctssn.com/
http://heather.cs.ucdavis.edu/~matloff/unix.html
http://wks.uts.ohio-state.edu/unix_course/
http://wks.uts.ohio-state.edu/sysadm_course/sysadm.html

The last two links are also available as printable books. They seem like good references to me.

Intro to unix
http://wks.uts.ohio-state.edu/unix_course/unix_book.pdf

Intro to System Administration (more in-depth)
http://wks.uts.ohio-state.edu/sysadm_course/sysadm_book.pdf

You should also look in the text, as it has very useful relevant information.

Use the class text, man pages and the tutorials referenced above (other on-line sources are fine too, but ask me before you talk to others about the assignment) to figure out how to do the following things on a unix system.

File System Manipulation

Commands to learn:

ls, rm, mkdir, rmdir, cd, pwd, ln, chmod, umask

1) How do you find out what directory you are working in?

2) What one command could you use to list every file on the entire system, showing their owner, location, and access time?

3) How do you list hidden files, i.e., file names that begin with '.'?

4) How do you print a list of all files just within the subdirectories of the current directory? You should not list files in the subdirectories of the subdirectories or below.

5) Where can you store files temporarily that are too large to fit within your account

6) How would you create a file named "~/fred" that, when opened, actually opened the /etc/passwd file?

7) What command would you use to delete a directory named test, assuming it contained other files and directories and you wanted them to be deleted as well?

8) What command would you use to make a file readable by anyone on the system?

9) What command would you use to make a file readable only by you (assiming it was your file)

10) Assuming you had root access, what command would you use to make a file execute as root when run?

11) What command would you use to make the default permissions for all the files you create be such that only you could read, write, or execute them?

Finding and examining files

Commands to learn:

which, whereis, file, strings, more (or less)

12) How would you find the path to the ping command?

13) Asuume you found a file named /tmp/hacker-leftover. What command could you use to find out what type of file this was?

14) If the /tmp/hacker-leftover file was a binary executable, what command could you use to extract any readable information from the file without running it?

Commands to learn:

grep, find, locate

15) What command would you use to determine what files in a particular directory contained the string "d00d"?

16) What command would you use to determine what files in a particular directory contained either of the strings "d00d" or "hax0r3d"?

17) What command would you use to determine what files in a particular directory contained a string similar to "owned", except in some varying letter case (e.g. OwnEd)?

18) What command would you use to find all the files on a system that had been accessed within the last week?

19) What command would you use to find all the files on a system that were suid root?

20) What command would you use to quickly find all the files on a system that had the work "tape" in their name?

21) What command would you use to file all files on a system that had a name ending in .txt that contained the string "qbert"?

User Accounting

Commands to learn:

finger, w, who, whoami, last

22) What command would you use to show what users were on a local system, and what their idle times were?

23) What command would you use to show what users were on a local system, and what processes they were running?

24) What command would you use to show what users were on a local system, and where they were logged in from?

25) What command would you use to find out the last time a user named "clay" was logged onto the system?

26) What command might you be able to use to determine what users are on a remote system?

Useful utilities

Commands to learn:

cut, sort

27) What command line (a series of commands) could you use to get a list of just the user IDs of people who had logged into a local system?

28) What command line could you use to get a list of remote systems that had been used to log into the local system?

Process Management and Information

Commands to learn:

top, ps, nice, nohup, kill, signal

29) What command can you use to show all the processes that you are running?

30) What is the process ID of the shell you are currently using?

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

32) What command can you use to see the top few most active processes on a system?

33) How could you cause a command to run with a lower priority than it otherwise would?

34) What command can you use to send signals to running processes?

35) What signal would you send to a process on ia-class to susped a process?

What to turn in:

All you need to include is the appropriate list of commands. Please format them in the following manner: a pound sign, the question number, and then on the next line, the command. For example, if question zero were "How do you determine the hostname of the system you are on?", the answer would be:

#0
hostname

Please e-mail you solutions in the body of the message (not as an attachment, and not as html) to the instructor.