Special purpose registers are used to handle indexing and pointing. These are important in the case of writing exploits as we will try to manipulate and overwrite the data in these registers. The main special purpose registers are EBP, EDI, EIP, and ESP:
- EBP: This pointer register indicates where the bottom of the stack is at. So, this will point to the top of the stack or set to the old pointer value when we are starting a function as it's the beginning.
- EDI: This is the destination index register, used for pointers to function.
- EIP: Instruction pointer register is used to store the next instruction to be executed by the CPU. So, this is important for exploit writing as if we could edit this we can control the ...