SMEP
Supervisor Memory Execute Protection
Last updated
Was this helpful?
Supervisor Memory Execute Protection
Last updated
Was this helpful?
If is analogous to ret2shellcode, then SMEP is the new . SMEP is a primitive protection that ensures . This means a simple ROP back to our own shellcode no longer works. To bypass SMEP, we have to use gadgets located in the kernel to achieve what we want to (without switching to userland code).
In older kernel versions we could , but this has been patched out. This was possible because SMEP is determined by the , meaning that if we can control CR4 we can disable SMEP from messing with our exploit.
We can enable SMEP in the kernel by controlling the respective QEMU flag (qemu64
is not notable):