I'm reading "The art of exploitation" and would like to try some experiments, including reading from and writing to various memory address. I've created some simple programs and trying to overwrite their variables via various hacks, the problem is that these variables' addresses keep changing every time I run the program, making all this extremely complicated.
I know this is for security reasons but I'm wondering if is it possible to disable it for learning purposes. Here's my system's and gcc's info:
blackbear@blackbear-laptop:~$ uname -a Linux blackbear-laptop 2.6.32-30-generic #59-Ubuntu SMP Tue Mar 1 21:30:21 UTC 2011 i686 GNU/Linux blackbear@blackbear-laptop:~$ gcc --version gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. blackbear@blackbear-laptop:~$