CSCI 379 Topics in Computer Science - Spring 2006
Fundamentals of Computer Security

Homework 5

(Teams of 2 students)

Goals:

This assigment builds upon the dirhash you wrote for Homework 4 and represent our final step toward constructing a program which can be used to monitor modifications to a set of files.

Your main goal in this assignment is to create a program called boobytrap which takes as input a configuration file that lists all the directories or standalone file that are to be monitored for integrity. The program will produce hashes for all the files indicated in the configuration file and store the results in a file formatted according to specifications for dirhash in Homework 4. (Remember that you use HMACs in dirhash and that somewhere, somehow, you will need to allow the user of boobytrap to define the passphrase to apply in the hashing process.)

In pursuing this goal you must continue to follow the best practices guidelines for secure programming.

Setup

This project must be developed in a Linux workstation. It is highly recommended that you work in one of the lab machines in B164 or B167. Create a directory for your work called boobytrap and use it to store all the files in your project. Your directory must contain a Makefile that builds the executable boobytrap. In this Makefile you must have a rule called clean, which remove the executable, all core dump files, all object files, and any other "save" files (those with names that start with # or end with ~) that your editor may have created. Remember to run make clean on this directory before you build a tarball for submission!

Specifications

You're "mostly" on your own to define the specifications this time. There are a few minimal requirements that your program will have to satisfy:
/bin/cat      (file)
/bin/chmod    (file)
/bin/tcsh     (file)
/usr/bin      (directory)
/sbin         (directory)
-g: Generate the encrypted, digitally signed hash database. (default)
-i: Name of the input configuration file. (default: boobytrap.conf)
-o: Name of the hash database file produced as output. (default: boobytrap.db)
-d: Decrypt the database file indicated and display on the standard output.
-c: Compare the two database files indicated and display the results on the standard output.

Examples of valid usage:
openssl enc -e -salt -des-cbc -in dbfile -out dbfile.enc -pass pass:PASSPHRASE

In order to have boobytrap make a call to another program, you will have to use something like the system call (look in section 3 of the Linux manual), which can create security exposures if not used properly. (Do some research to discover what the risks are.) (You can score bonus points if instead of using the system call, you use directly OpenSSL's API for file encryption.)

Hand In

A tarball with your source code sent to the instructor by e-mail. Make sure to use a Makefile to build your code and to include it in your tarball. If you have dificulties creating a Makefile see your instructor as soon as possible.

Expectations

  1. User manual explaining how one runs your program: 10% of grade.
  2. Programmer's manual explaining how you structured your program (think block diagram and specification of the interfaces between components), what you have done to make your program secure, and risk assessment  (any known security exposures it may have): 10% of grade.
  3. Conformance to specifications for user interface:  10% of grade.
  4. Correct functionality: 40% of grade.
  5. Program security: 20% of grade.
  6. Improvements to specifications (innovations): 10% of grade.

Recommendations