Linkers, Loaders & Executables
What is the purpose of ASLR (address space layout randomization)?
- ATo change the addresses of the stack, heap, libraries and so on every run, making target addresses hard for attackers to predict
- BTo pick memory addresses at random to raise the cache hit rate
- CTo free unused memory at random to increase free space
Show answer and explanation
Answer: A. To change the addresses of the stack, heap, libraries and so on every run, making target addresses hard for attackers to predict
Attacks that exploit bugs such as buffer overflows depend on knowing the addresses of library functions or data on the stack. ASLR shifts where the stack, heap, shared libraries and the executable are placed every time a process starts, so attackers cannot hard-code addresses. It is not a complete defence on its own and is combined with other measures such as separating writable and executable memory.
- A. Correct. It is a countermeasure that makes attacks harder.
- B. It is not a performance feature.
- C. It does not free memory.