linuxmemory-addressaslr

Disable randomization of memory addresses


I'm trying to debug a binary that uses a lot of pointers. Sometimes for seeing output quickly to figure out errors, I print out the address of objects and their corresponding values, however, the object addresses are randomized and this defeats the purpose of this quick check up. Is there a way to disable this temporarily/permanently so that I get the same values every time I run the program.

Oops. OS is Linux fsttcs1 2.6.32-28-generic #55-Ubuntu SMP Mon Jan 10 23:42:43 UTC 2011 x86_64 GNU/Linux


Solution

  • On Ubuntu , it can be disabled with...

    echo 0 > /proc/sys/kernel/randomize_va_space
    

    On Windows, this post might be of some help...

    http://blog.didierstevens.com/2007/11/20/quickpost-another-funny-vista-trick-with-aslr/