ASLR Address Space Layout Randomization is a technique which randomizes addresses in the stack and heap. If addresses of functions are randomized (e.g. from shared libraries like libc), then an attacker cannot use a predefined exploit with hard-coded addresses.
Linux
Disable ASLR:
echo 0 > /proc/sys/kernel/randomize_va_space
Enable ASLR:
echo 2 > /proc/sys/kernel/randomize_va_space
In GDB, ASLR is deactivated by default. Use aslr on to activate it.
Windows
On Windows, ASLR loads a library at a random position in the memory — but (according to a lecturer at IR March 2025) this is the same for each executeable as long as there is no reboot. That means that if a process analyzes his own memory and detect e.g. a library, it can calculate there it would be in another prozess.
Leave a Reply
You must be logged in to post a comment.