Metasploit mailing list archives
dllinject/libloader.c modifications
From: hdm at metasploit.com (H D Moore)
Date: Mon, 30 Mar 2009 09:31:46 -0500
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/ (or ReflectiveDllInjection_v1.0.zip) for more information. -HD
Current thread:
- dllinject/libloader.c modifications Michael Artz (Mar 30)
- dllinject/libloader.c modifications H D Moore (Mar 30)
- dllinject/libloader.c modifications Jun Koi (Mar 30)
- dllinject/libloader.c modifications H D Moore (Mar 30)
- dllinject/libloader.c modifications Jun Koi (Mar 30)
- dllinject/libloader.c modifications H D Moore (Mar 30)