3 ms·
> I would imagine that a “boring” C program with one big chunk of mutable state would be predictable in this sense. It likely wouldn't. ASLR will choose a rand
by zamalek 8y ago
> I would imagine that a “boring” C program with one big chunk of mutable state would be predictable in this sense.
It likely wouldn't. ASLR will choose a random load address for the module (.so or .exe), which means that main() wouldn't be at a predetermined address. The heap and stack would similarly have arbitrary offsets. Furthermore, any other modules that get loaded would be at arbitrary addresses. Ultimately, even "hello world" should become extremely randomized, provided ASLR is enabled for the process.
ASLR prevents attacks arusing due to known addresses in virtual memory because they are otherwise reliably predictable (just run the program, attach a debugger, and find the addresses that you care about).