Address space layout randomization (ASLR) is a mechanism to protect against buffer overflow attacks. Most exploit attacks need to know the virtual addresses to hijack control. ASLR helps mitigate this by introducing artificial diversity.
It does this by placing base, libraries, heap, and stack at random positions in the address space of a process. This makes the memory layout unpredictable for attacker programs since they do not know where the next instruction lies.
The following diagram illustrates ASLR:
ASLR is implemented in some form on most operating systems (OSs), including iOS, Android, Windows, macOS, and Linux.
It includes the following system elements:
Stack
Library code
Heap
Shared memory between different processes
Command line arguments
ASLR works in conjunction with the
While ASLR is a good way to help fortify programs against common buffer exploits, there are a few ways it can prove to be disadvantageous:
ASLR does not raise warnings when attempts to bypass it occur.
After a successful attack, ASLR does not give any information about the attack, such as memory accesses or calls to stack.
Several successful demonstrations have shown the vulnerability of ASLR by predicting the outcome of randomization. However, more robust hardware support can help mitigate this vulnerability.
Free Resources