Can any current hardware set a RAM page to be executable but not readable?

191 views Asked by At

Just like how NX / DEP allow a page to be set non executable when it is writable, is it possible to tell the CPU that it can execute a page (i.e. read it for instruction fetch) but throw and exception if it is accessed via a mov instruction? The effect will be to make it impossible / very hard to copy the binary data of the instructions just by misusing an exploit.

The possible use I thought something like this might have was in preventing an exploit disclosing the contents of the executable pages, making ROP attacks harder. (this paper kind of makes it seem like all ASLR is just a bandage on a hemorrhage) There are a huge number of ways to trick programs into reading arbitrary memory locations, and patching them all will be a hopeless task.

0

There are 0 answers