ASLR: Address Space Layout Randomization
- Problem it kills: exploits with hardcoded addresses (buffer address, libc
system, gadget offsets). - Idea: randomize base addresses each run, so the attacker cannot know where anything is.
- Randomized regions: stack, heap, mmap (shared libraries), and — if the binary is PIE — the executable image itself.
- Entropy = bits of randomness. More bits = harder to guess. 64-bit gives far more entropy than 32-bit (where brute force was often feasible).
Key Takeaway
ASLR turns "jump to a known address" into "jump to an unknown address." Its whole security rests on the address staying secret.