CS 421 - Information Security Lab 4.pdf - CS 421 Information Security Lab 4 Return-to-Library Attack Rohan B Sahu 01FB16ECS305 TASK 1 ● ● Create

CS 421 - Information Security Lab 4.pdf - CS 421...

This preview shows page 1 - 4 out of 10 pages.

CS 421 - Information Security Lab 4 Return-to-Library Attack - Rohan B Sahu 01FB16ECS305 TASK 1: Create softlink to zsh bash which is vulnerable to these attacks. Disable Address Space Randomization. Retlib.c is compiled with the flags: -fno-stack-protector: Stack Guard Protection OFF. -z noexecstack: Stack is not executable. The program’s ownership are changed to make it a set-UID root. In this lab, we will create the contents of “badfile” in such a way that the buffer overflow vulnerability in retlib.c can be exploited to obtain a root shell.
Image of page 1

Subscribe to view the full document.

Task 2 : Finding the address of the library function. The libc library is loaded in memory once by the system and all the processes running share the same instance of the libc library. We will use gdb to obtain the addresses of “System” and “Exit” function present in the libc library.
Image of page 2
Task 3 : Putting the shell string in the memory. In order to pass the string “bin/sh” to the system function, we need to have the string in the memory and also know the address at which this address is present.
Image of page 3

Subscribe to view the full document.

Image of page 4
  • Winter '17
  • student

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

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes