Code Reuse Attacks Flashcards
ROP
Return Oriented Programming
When is ROP suitable?
When your data is not executable.
ROP Gadgets
Snippets of executable code that end in a ret instruction.
In system call 64 bit convention, which register changes for what argument and to which?
Argument 4, from RCX to R10
Register that gives the reference to which syscall is being called
RAX
SROP
Signal Return Oriented Programming
Advantage of SROP
Only need a sigreturn trampoline a.k.a. syscall gadget for it to work in addition to ROP requirements.
When to use SROP?
You are missing ROP gadgets.
Portable exploits.
ret2csu
csu_init function adds code that gives us a gadget to control rbx,rbp,r12,r13,r14,r15 and allows us to call an arbitrary function pointer with three controlled arguments.
JOP
Jump Oriented Programming
Definition of JOP
Uses dispatchers in order to jump between code and circumvent back-edge CFI checks by not executing ret instructions.
Dispatcher Gadget
Snippet of code executable code that ends with a call or jump instruction.