3 ms·
Seems to be a fairly reasonable introduction to binary exploitation, but at the end it concludes with the dubious “NX is counterproductive”. Turning off executi
by saagarjha 6y ago
Seems to be a fairly reasonable introduction to binary exploitation, but at the end it concludes with the dubious “NX is counterproductive”. Turning off execution for regions that you really didn’t intend to be code is a good idea in general; JIT code generation is a rare case and warrants extra consideration. There’s multiple reasons why we do it: the first is that it’s cheap, but it also prevents you from straight-up writing code and instead having to rely on ROP (which, these days, is protected against by CFI). It’s even more useful in the presence of ASLR, as a “relative stack jump” without knowing the full slide is often easier than locating libc. It’s certainly not security theater like the article suggests; there is a reason why we have been investigating in further protections (shadow stacks, pointer authentication, etc) to further segregate code from data and even data from different kinds of data.