Metasploit mailing list archives

dllinject/libloader.c modifications


From: junkoi2004 at gmail.com (Jun Koi)
Date: Mon, 30 Mar 2009 23:44:24 +0900

On Mon, Mar 30, 2009 at 11:31 PM, H D Moore <hdm at metasploit.com> wrote:
On Mon, 2009-03-30 at 07:42 -0400, Michael Artz wrote:

So, two questions:
? ?- Is there anything special that I need to do to be able to modify
loader2_main in libloader.c to make it generate valid shellcode? ?I
was hoping that I could just edit and compile, however that doesn't
seem to be working for me, which could be a function of my edits.

That code is sensitive to external references/imports; make sure that
any Win32 API functions you call are stored in the local function table
and resolved dynamically.

? ?- If it does seem to be my edits, what is the best way to test/
debug the shellcode? ?The included srv.exe?

Metasploit multi/handler or srv.exe works, you can also try the
Meterpreter Service:
http://phreedom.org/software/metsvc/

If you are running into problems modifying libloader.c, you may want to
try using Stephen Fewer's Reflective DLL Injection system instead. Take
a look at external/source/meterpreter/
ReflectiveDllInjection_v1.0.zip) for more information.

BTW, what is the recommed solution now, when we have both Reflective
and Meterpreter, and both of them trying to do the same thing?

Is it true that we might favour Reflective (future, if not now), and
get rid of Meterpreter in the future?

Thanks,
Jun


Current thread: