From d98510cfa556be405a9f35e59accd5a1138a1852 Mon Sep 17 00:00:00 2001 From: Steven Schronk Date: Thu, 16 Sep 2010 13:04:36 -0500 Subject: [PATCH] Added stack address randomization example. --- stack_address.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 stack_address.c diff --git a/stack_address.c b/stack_address.c new file mode 100644 index 0000000..05aa0fd --- /dev/null +++ b/stack_address.c @@ -0,0 +1,22 @@ +/* + Program illustrates stack randomization of operating systems. + + Operating systems attempt to prevent security vulnerability by + randomizing the stack location when a program starts. + + This helps prevent buffer overflow attacks. + + To test and see if this security measure is built into your + system, run this program several times; if the stack address + changes each time, it is likely that this is implemented on + your system. +*/ + +#include + +int main() +{ + int local; + printf("local at %p\n", &local); + return 0; +} -- 2.11.4.GIT