Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

stack buffer overflow

Name: Anonymous 2012-07-26 13:33

I come to you for help with this assignment I have; smashing the stack. Implement a buffer overflow attack on the program, isThisGood.c, by exploiting the input, see gets(). If exploit successful, it should invoke the function oopsIGotToTheBadFunction!

a. What is the address of the function oopsIGotToTheBadFunction()?
How did you determine this?

b. What is the address on the stack that your input must overwrite
(address and content please)? How did you locate this address?

c. What is the address of buf?

d. What is the minimum length your input, the length you need to alter
the return address stored on the stack.

e. what is your input - show it in hexa characters since some of the
input is not likely to be printable.

#include <stdio.h>
#include <stdlib.h>

int oopsIGotToTheBadFunction(void)
{
printf("Gotcha!\n");
exit(0);
}

int goodFunctionUserInput(void)
{
char buf[12];
gets(buf);
return(1);
}

int main(void)
{
goodFunctionUserInput();
printf("Overflow failed\n");
return(1);
}

Name: Anonymous 2012-07-27 1:25

>>17
Like the tools make a fucking difference in this case. It's a basic buffer overflow, not reversing an encrypted binary with copy protection. Besides, it takes about a day to learn gdb on the level needed for this assignment, despite gdb being annoying and somewhat useless. If anything's messed up, it's this guy's install of gdb. Fuck off.

>>18
All I can post tonight is that, first and foremost, you need to work on getting the debugger working and figure out how to use the debugger properly (and yes, you can use gdb for this assignment). Go try and read some of the stuff I gave you.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List