|
|||||||||||
|
Re: GetPC code (was: Shellcode from ASCII)
From: noir <noir(at)gsu.linux.org.tr>
Date: Fri Jun 27 2003 - 16:22:15 EDT
I'm not sure this could be done (same problem) but, keep this in mind
anyway :-
gera
basicly, i'm simulating a floating point exception (division by zero) and then grabbing the EIP(pc) from the exception record. PC is the location of the fdivs instruction since that instruction created the exception condition so we add 11 on top to make %eax point to the nop instruction. (ATT syntax)
xor %eax, %eax
push %eax
fdivs (%esp)
fnstenv (%esp)
mov 0xc(%esp), %eax
add $0xd, %eax
nop
sup mate ? ;) Received on Fri Jun 27 16:56:52 2003 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:40 EDT |
||||||||||
|
|||||||||||