Metasploit mailing list archives

A little offtopic: Get EIP


From: pusscat at metasploit.com (Pusscat)
Date: Tue, 26 Jun 2007 09:18:30 -0400

You could handle this by adding junk nops in place of the string and editing
the hex later, or depending on your assembler, you might be able to convince
it to ignore its idea of segments. 

The former is probably faster ;)

~ Puss


-----Original Message-----
From: Clemens Kolbitsch [mailto:clemens.kol at gmx.at] 
Sent: Tuesday, June 26, 2007 6:11 AM
To: framework at metasploit.com
Subject: Re: [framework] A little offtopic: Get EIP

ok sorry... just a short second question:

i need to obtain the eip obviously, to find the offset to a second 
payload that i copy somewhere (it is appended to the first payload and i 
jump somewhere before reaching this part..).

what i would really like to do is directly add my assembler code of the 
second payload to the end of the c-source of the first. however, this 
payload also includes strings. i thought that that was no problem if i use

__asm("db MYCHAR");

however, i get that the db instruction is not valid... can it only be 
used inside the DATA part of a program or what am i doing wrong??

i know... i can still simply copy it there using some hex-editor, but 
with frequent changes during development, this is annoying...

again... thanks for any help and sorry for the offtopic :-)




Current thread: