buflab - CS 2400 Fall 2010 Lab Assignment 3 The Buffer Bomb...

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

View Full Document Right Arrow Icon
CS 2400, Fall 2010 Lab Assignment 3: The Buffer Bomb Introduction This assignment helps you develop a detailed understanding of the calling stack organization on an IA32 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. Assuming you have lots of time on your hand, you might want to read “Smashing the Stack For Fun And Profit” at http://insecure.org/stf/smashstack.html . Note: The Linux 2.6 kernel contains a mechanism that attempts to prevent (or at least compli- cate) buffer overflow exploits. According to several sources (e.g. http://www.milw0rm. com/papers/94 ), this method isn’t that robust. However, we can disable that feature by setting the file /proc/sys/kernel/randomize_ va_space to ’0’ rather than ’1’, which is the default value for recent 2.6 Linux kernels. However, to do this, you need to run as user ’root’ or use ’sudo’. This means that running this lab in the CS educational lab is more difficult than running any of the other labs. We recommend you use the Ubuntu virtual to do this since we have configured it to disable the stack randomization. I’ve modified the “buflab” program to automatically report if the kernel is using this “stack randomization” feature and attempt to disable it. You can check by running the command: % cat /proc/sys/kernel/randomize_va_space and checking that either the file does not exist or that the value in the file is ’0’. 1
Image of page 1

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

View Full Document Right Arrow Icon
Logistics You may work in a group of up to two 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. Hand Out Instructions Start by copying downloading buflab-handout.tar from the Moodle 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. SENDSTRING : A utility to help convert between string formats. All of these programs are compiled to run on Linux machines.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern