Buffer-Overflow Vulnerability Lab
Lab OverviewThe learning objective of this lab is for students to gain the first-hand experience on buffer-overflow vulnerability by putting what they have learned about the vulnerability from class into actions. Buffer overflow is defined as the condition in which a program attempts to write data beyond the boundaries of pre-allocated fixed length buffers. This vulnerability can be utilized by a malicious user to alter the flow control of the program, even execute arbitrary pieces of code. This vulnerability arises due to the mixing of the storage for data (e.g. buffers) and the storage for controls (e.g. return addresses): an overflow in the data part can affect the control flow of the program, because an overflow can change the return address.
In this lab, students will be given a program with a buffer-overflow vulnerability; their task is to develop a scheme to exploit the vulnerability and finally to gain the root privilege. In addition to the attacks, we will walk through several protection schemes that have been implemented in Fedora to counter against the buffer-overflow attacks. We will evaluate whether these schemes work or not.
It should be noted that the outcome of this lab is operating system dependent. Our description and discussion are based on Fedora Linux (Core 4 or 5); it should also work for the most recent version of Fedora. However, if you use different operating systems, different problems and issues might come up.
Lab Description and Tasks (PDF)
Lecture Video: (watch)
Files that are Needed
Student FeedbacksTo help us understand how effectively this lab has enhanced students' learning in computer security, we asked students to fill out an anonymous survey right after they finish the lab. We started to conduct the survey since 2007. The survey results depicted in the following are aggregate results over several years.