I am using Ubuntu 12.04 32-bits now for some experiment I need to disable ASLR how can I do this? and after that what should I do to enable ASLR again?
According to an article How Effective is ASLR on Linux Systems?, you can configure ASLR in Linux using the
So, to disable it, run
and to enable it again, run
This won't survive a reboot, so you'll have to configure this in
should permanently disable this.
If you don't want a system-wide change, use
I find it really convenient to open a completely new shell using:
This will open a new Bash shell for you with ASLR disabled, including all child processes (programs run from this shell).
By the way, on i386,
I would do this in a VM if I were you for obvious reasons. Also, to do this I'm pretty sure you're going to compile your own kernel with the ASLR disabled. I do not believe there is any way to do this that doesn't involve re-compiling your kernel.