|
|||||||||||
|
GetPC code (was: Shellcode from ASCII)
From: Gerardo Richarte <gera(at)corest.com>
Date: Thu Jun 26 2003 - 10:46:33 EDT In the previous email (Re: Shellcode from ASCII) I sent a piece of code that needs "EDI pointing to its first byte", this means, it needs to know the address in memory where itself (the code) is located. There are several ways to do this, the most I like is CALL $+4
call .+4
this is pretty generic, has no zeros and is a small as we could do it (it doesn't mean there's no smaller way). And it also makes you think for a few seconds :-) ok, you know the challenges... there are no rules I think :-) gera PS: Of course, as halvar told me when I through this questions at him once: how did you jump to your code in the first place [if you don't know its address]. And well... he does have a strong point there... but heh, it's still a lot of fun to think about this small pieces of code, isn't it? :-) Received on Thu Jun 26 12:04:33 2003 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:40 EDT |
||||||||||
|
|||||||||||