Skip to content

Instantly share code, notes, and snippets.

@AvPelli

AvPelli/Dll.dll Secret

Created December 9, 2017 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AvPelli/3e8ae40d9877b5574d2ae23f50fb3613 to your computer and use it in GitHub Desktop.
Save AvPelli/3e8ae40d9877b5574d2ae23f50fb3613 to your computer and use it in GitHub Desktop.
the injected dll
#include <windows.h>
#include <TlHelp32.h>
VOID WorkerRoutine() {
MessageBox(NULL, "injected", "injected", MB_CANCELTRYCONTINUE);
}
BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
{
DisableThreadLibraryCalls(hModule);
WorkerRoutine();
}
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment