/*
 * Tool name   : FWBInjectedDLL
 * Description : The DLL that is injected to a remote process and loaded. This 
 *               method is known as FWB (Firewall Bypassing).
 * Version     : 0.1
 * Todo        : 
 *
 * Changes     : 
 *
 */

#include <windows.h>
#include <stdio.h>
#include <stdlib.h>

#pragma comment(lib, "User32.lib")



/*
 * Exported functions
 *
 */

__declspec (dllexport) void Hello ()
{
  /*
   * Add whatever function you think it is required ...
   *
   */

  MessageBox(0, "Greetings from the exported function", "Greetings from the exported function.", MB_ICONINFORMATION);
}




/*
 * DLL entry point.
 *
 */

BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
{
  HANDLE lPID = INVALID_HANDLE_VALUE;
  char lTemp[MAX_PATH + 1];

  switch (reason)
  {
      case DLL_PROCESS_ATTACH:
          ZeroMemory(lTemp, sizeof(lTemp));
          lPID = GetCurrentProcess();
          GetModuleFileName(0, lTemp, MAX_PATH);
          CloseHandle(lPID);
          MessageBox(0, lTemp, lTemp, MB_ICONINFORMATION);
          break;
      case DLL_PROCESS_DETACH:
          break;
      case DLL_THREAD_ATTACH:
          break;
      case DLL_THREAD_DETACH:
          break;
  }  

  return(1);
}
