Lab3 - Introduction to Computer Systems, Spring 2011 Lab...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Introduction to Computer Systems, Spring 2011 Lab Assignment L3: The Buffer Bomb Assigned: May 20 Due: June 2, 17:59 Introduction This assignment helps you develop a detailed understanding of the calling stack organization on an IA32(x86) processor. It involves applying a series of buffer overflow attacks on an executable file bufbomb in the lab directory. Note: In this lab, you will gain firsthand experience with one of the methods commonly used to exploit security weaknesses in operating systems and network servers. Our purpose is to help you learn about the runtime operation of programs and to understand the nature of this form of security weakness so that you can avoid it when you write system code. We do not condone the use of these or any other form of attack to gain unauthorized access to any system resources. There are criminal statutes governing such activities. Logistics You should work alone(only one people) in solving the problems for this assignment. The only “hand-in” will be an automated logging of your successful attacks. Any clarifications and revisions to the assignment will be posted on the course Web page or fudan BBS. Hand Out Instructions The lab handout is now available on the course web page (http://10.132.143.100/jpkc/labs.html), where you can also obtain your lab status information. Start by copying buflab-handout.tar to a (protected) directory in which you plan to do your work. Then give the command “ tar xvf buflab-handout.tar ”. This will cause a number of files to be unpacked in the directory: MAKECOOKIE : Generates a “cookie” based on your team name. BUFBOMB : The code you will attack. 1 SENDSTRING : A utility to help convert between string formats. All of these programs are compiled to run on Linux machines. In the following instructions, we will assume that you have copied the three programs to a protected local directory, and that you are executing them in that local directory. Team Name and Cookie It is required that each team consists of exactly one student. So the team name is exactly your ICS SVN id (e.g. ics10302010007). A cookie is a string of eight hexadecimal digits that is (with high probability) uniquely generated for your team. You can generate your cookie with the makecookie program giving your team name as the argu- ment. For example: unix> ./makecookie ics10302010007 0x7b2259d0 In your four buffer attacks, your objective will be to make your cookie show up in places where it ordinarily would not. The B UFBOMB Program The BUFBOMB program reads a string from standard input with a function getbuf having the following C code: 1 int getbuf() 2 { 3 char buf[12]; 4 Gets(buf); 5 return 1; 6 } The function Gets is similar to the standard library function gets —it reads a string from standard input (terminated by ‘ \n ’ or end-of-file) and stores it (along with a null terminator) at the specified destination....
View Full Document

This note was uploaded on 10/19/2011 for the course CS 000 taught by Professor Jing during the Fall '10 term at Fudan University.

Page1 / 9

Lab3 - Introduction to Computer Systems, Spring 2011 Lab...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online