CMSC 838F, Spring 2008

Language-Based Security

Project 1: Buffer Overflows

Due: Feb 18, 2008

Updates

Description

I am a bad programmer. I'm such a bad programmer, I introduce bugs in other people's code on purpose. I've taken a simple http server I found on the web and introduced several potential buffer overflows in it.

Here is the web server: tinyhttpd-broken.tar.gz

Your job is to develop a program that exploits a buffer overflow to take over the httpd process, causing it to print a message "Now I pwn your computer":

             (machine 1) host2$ ./httpd
             http running on port 42709
             ...
             Now I pwn your computer

             (machine 2) host1$ ./exploit httpd 42709

Here ... can be empty, or may be some additional output caused by your attack. Your exploit file takes the httpd file as input (at your discretion; if you change this, be sure to mention it in your instructions). Your exploit must work on fireball.cs.umd.edu, when I compile httpd with gcc 3.2.3.

Tips:

Project Submission Instructions

Resources

Acknowledgements

Inspired by a similar project from Steve Zdancewic.