Question: According to 32 bit x86 instruction encoding scheme, the EIP register (instruction pointer) cannot be encoded. (Encoding uses 3 bits to specify one of the
According to 32 bit x86 instruction encoding scheme, the EIP register (instruction pointer) cannot be encoded. (Encoding uses 3 bits to specify one of the eight registers: EAX, ECX, EDX, EBX, ESP, EBP, ESI, and EDI EIP is conspicuously missing). This is generally OK for most user codes, but some system codes need to obtain the content of EIP. Devise a scheme (i.e., a hack) that allows you to get the content of EIP register using regular x86 instructions. Explain also why your scheme works. (Hint: stack can be useful)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
