by mettamage · 6y ago · 0 comments
I’ve seen ROP exploitation in binaries and is pretty handy when there is no other way to get a setuid binary to give you a shell as root.
Watch Rope from ippsec on YT (on my phone atm).
You are correct that the main TEXT section used to typically not be position independent.
Historically EXEs were either linked without relocations or had relocations stripped. They were always loaded first so ended up where they wanted, no relocation necessary. But /dynamicbase flag to linker opts in to setting a bit in the PE header and retaining relocations, so the EXE can be loaded elsewhere.
TL;DR: Windows supports ASLR on both executables and dynamic libraries.