"Stack Crashing" - A Graduated Set of Example Programs
Makefile
Makefile to build the programs in this directory.
vulnerable.c
An example of a program that contains an
unchecked possibility of buffer overflow. The following examples
comprise an attempt to work up to an exploit of this vulnerablily,
though a series of experiments. Each experiment comes closer
to exploiting the vulnerability. They show, along the way, that
exploiting a buffer overflow may require attention to quite a few
low-level implementation details of the vulnerable program.
experiment0.c
Demonstrates the normal use of the Unix execve() system call.
experiment1.c
Demonstrates use of stack modification to change return address.
execwrapper.i
Demonstrates code to execute an arbitrary program,
via code copied into a buffer, used in the following programs.
experiment2.c
Demonstrates use of stack modification to execute the program "/bin/ls".
experiment3.c
Demonstrates use of stack modification to execute the program "/bin/sh".
experiment4.c
An intermediate step toward an exploit of vulnerable.c,
in which we intentionally overwrite a buffer in a program that
has similar structure to vulnerable.c.
exploit.c
Full-scale attempt to exploit vulnerable.c.
(I ran out of time on this one.
It is not quite working and I have not yet been able to
identify the defect.)
exploit1.c
An original exploit of xterm. Don't execute this. It will
trash one of your important X configuration files.
exploit2.c
An original exploit of xterm. Don't execute this. It will
trash one of your important X configuration files.