CSE509 Spring 2006. Computer Security


Note: If you would like to do a different class project, feel free to come discuss you project ideas with me.

Phase I: A Secure File Server

Write a secure remote file server that supports the following protocol:



Suppose (small values are used for convenience, values are not guaranteed to be correct or even make sense)
  1. Client -> Server "rob\r\n"
  2. Server -> Client "41436197399383046674769, 31142868322202020882931, 1234567890123456, 0123456789012345\r\n"
  3. Client computes m = AES-CBC^-1("hehe\0\0\0\0\0\0\0\0\0\0\0\0", 1234567890123456)
    (if things worked, then m = "26841096087855436504571")
    d = (parse m to get integer)
    t = "(0123456789012345, foo/bar)"
    x = (interpret bytes of t as an integer, big-endian)
    R = x^d mod N
  4. Client -> Server "56789123\r\n"
  5. Server performs similar computation
  6. Server computes S = random(128-bits)
    t = "4235546"
    x = (interpret bytes of t as an integer, big-endian)
    y = x^e mod N
    Z = AES-CBC(S, FILE)
  7. Server -> Client "y, Z"

You may work in teams of 2. You must not share code or ideas with other teams. You are encouraged to test your programs with programs written by other teams to check that you adhere to the specification (i.e. you can test whether your client can work with another team's server and vice-versa). You should implement 3 programs:

The K-generator program should take as input a file containing N, e, and d, and a password read from the user, and generate a .sfs file. K-generator does not need to generate N,e,d triples. As a test input, you may use (N, e, d, one per line):


You do not need to implement AES, or CBC mode of AES. You do not need to implement modular multiplication, but you should implement your own modular exponentiation. You are encouraged to use existing libraries for AES, CBC mode, and basic modular arithmetic of big integers (see Java BigInt class or the GNU MP Bignum library). For testing purposes, your code should run on the departmental machine minix.cs.sunysb.edu.

You should also write a 1-page description of the security goals this server should maintain.

Phase II

Your team will be given the servers written by 2 other teams. Find as many security bugs as you can in their implementation. Security bugs are not limited to simple programming bugs like buffer overflows. Any attack you can develop that violates a security goal of the server and that the server could be modified to prevent is acceptable.

You should analyze each project for all the relevant security bugs you can find. Note that there are bugs in the above protocol, and you may write up a description of those bugs as a seperate report. However, don't include protocol bugs in your report on the implementation. You should look for things like buffer overflows, format string bugs, timing attacks, etc. For each bug you find, please include a 1 paragraph description. Your description should include:

If you find several similar bugs in a project, then you can combine those into one paragraph. Describe one of the bugs as above, and add a comment indicating that you think the rest are similar. If you can't find any security holes in a project, then write a 1/2-1 page report on your methodology for analyzing the project and your conclusions about its security.