Results 1 to 10 of 10
  1. #1
    Nubzgetkillz's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    hacktown
    Posts
    838
    Reputation
    13
    Thanks
    411
    My Mood
    Amazed

    [SOURCE] C++ Dll injector Code

    Code:
    #include <windows.h> 
    #include <tlhelp32.h> 
    #include <shlwapi.h> 
    #include <conio.h> 
    #include <stdio.h> 
    
    
    #define WIN32_LEAN_AND_MEAN 
    #define CREATE_THREAD_ACCESS (PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ) 
    
    BOOL Inject(DWORD pID, const char * DLL_NAME); 
    DWORD GetTargetThreadIDFromProcName(const char * ProcName); 
    
    int main(int argc, char * argv[]) 
    { 
       // Retrieve process ID 
       DWORD pID = GetTargetThreadIDFromProcName("Engine.exe"); 
        
       // Get the dll's full path name 
       char buf[MAX_PATH] = {0}; 
       GetFullPathName("HACKS.dll", MAX_PATH, buf, NULL); 
       printf(buf); 
       printf("\n"); 
        
       // Inject our main dll 
       if(!Inject(pID, buf)) 
       { 
    
            printf("DLL Not Loaded!"); 
        }else{ 
            printf("DLL Loaded!"); 
        } 
    
        _getch(); 
       return 0; 
    } 
    
    BOOL Inject(DWORD pID, const char * DLL_NAME) 
    { 
       HANDLE Proc; 
       HMODULE hLib; 
       char buf[50] = {0}; 
       LPVOID RemoteString, LoadLibAddy; 
    
       if(!pID) 
          return false; 
    
       Proc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pID); 
       if(!Proc) 
       { 
          sprintf(buf, "OpenProcess() failed: %d", GetLastError()); 
          //MessageBox(NULL, buf, "Loader", MB_OK); 
          printf(buf); 
          return false; 
       } 
        
       LoadLibAddy = (LPVOID)GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA"); 
    
       // Allocate space in the process for our DLL 
       RemoteString = (LPVOID)VirtualAllocEx(Proc, NULL, strlen(DLL_NAME), MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); 
    
       // Write the string name of our DLL in the memory allocated 
       WriteProcessMemory(Proc, (LPVOID)RemoteString, DLL_NAME, strlen(DLL_NAME), NULL); 
    
       // Load our DLL 
       CreateRemoteThread(Proc, NULL, NULL, (LPTHREAD_START_ROUTINE)LoadLibAddy, (LPVOID)RemoteString, NULL, NULL); 
    
       CloseHandle(Proc); 
       return true; 
    } 
    
    DWORD GetTargetThreadIDFromProcName(const char * ProcName) 
    { 
       PROCESSENTRY32 pe; 
       HANDLE thSnapShot; 
       BOOL retval, ProcFound = false; 
    
       thSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); 
       if(thSnapShot == INVALID_HANDLE_VALUE) 
       { 
          //MessageBox(NULL, "Error: Unable to create toolhelp snapshot!", "2MLoader", MB_OK); 
          printf("Error: Unable to create toolhelp snapshot!"); 
          return false; 
       } 
    
       pe.dwSize = sizeof(PROCESSENTRY32); 
        
       retval = Process32First(thSnapShot, &pe); 
       while(retval) 
       { 
          if(StrStrI(pe.szExeFile, ProcName)) 
          { 
             return pe.th32ProcessID; 
          } 
          retval = Process32Next(thSnapShot, &pe); 
       } 
       return 0; 
    }
    Title explains it bye!

    -Nubzgetkillz

    Member since September 25, 2010

    Current Objectives:
    • Graduate college with a degree in Computer Science
    • Find a decent job in the Computer Science Field
    • Learn more programming languages

    Looking for Elo Boosting Job - League of Legends
    Looking for Bronze -> Gold Jobs


    Skype: whatthedream

  2. #2
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    https://www.mpgh.net/forum/31-c-c/145...injection.html

    cool... pretty much the same..

    and the one at that post is leeched.. so a leeching a leecher.. =D epic
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  3. The Following 3 Users Say Thank You to 'Bruno For This Useful Post:

    Hell_Demon (10-14-2010),Pronome191 (06-07-2012),Void (10-13-2010)

  4. #3
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Quote Originally Posted by Brinuz View Post
    https://www.mpgh.net/forum/31-c-c/145...injection.html

    cool... pretty much the same..

    and the one at that post is leeched.. so a leeching a leecher.. =D epic
    Good catch Brinuz.

  5. The Following User Says Thank You to Void For This Useful Post:

    Hell_Demon (10-14-2010)

  6. #4
    whatup777+'s Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    246
    Reputation
    11
    Thanks
    15
    He admitted he C&Ped in CA Section...

  7. #5
    Nubzgetkillz's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    hacktown
    Posts
    838
    Reputation
    13
    Thanks
    411
    My Mood
    Amazed
    yeah just posting here didn't know there was that post.

    Quote Originally Posted by whatup777+ View Post
    He admitted he C&Ped in CA Section...
    Yeah for vb injectors

    Member since September 25, 2010

    Current Objectives:
    • Graduate college with a degree in Computer Science
    • Find a decent job in the Computer Science Field
    • Learn more programming languages

    Looking for Elo Boosting Job - League of Legends
    Looking for Bronze -> Gold Jobs


    Skype: whatthedream

  8. #6
    Gab's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,716
    Reputation
    1755
    Thanks
    1,543
    Thank u.. I'll try to understand it

  9. #7
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    Give credits then...
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  10. #8
    [A]bbest's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    In My PC...
    Posts
    3,131
    Reputation
    18
    Thanks
    426
    My Mood
    Breezy
    dll of injector or dll file ?

  11. #9
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    Quote Originally Posted by abbest View Post
    dll of injector or dll file ?
    wtf? oO a Dll is a Dll.. An executable (.exe) is an executable...
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  12. #10
    BuRnYoUrSoUl's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    YO MOMMa
    Posts
    306
    Reputation
    10
    Thanks
    14
    My Mood
    Blah
    Very nice coding
    I will burn your soul to pieces :O
    or ashes k thats beta:O if you like my mods thank me plz Wanna fight with /me :O
    Want a sig done pm me yo THank me lolz current drawing
    How Do You like it
    MY CREATIONS MY SERVICE IS $2 for a sig and an avatar and or $1 each.


Similar Threads

  1. [Release] WarRock DLL. Injector Source code
    By [Hectic] in forum WarRock Hack Source Code
    Replies: 0
    Last Post: 07-01-2011, 12:11 PM
  2. [Release] Enc DLL Injector v1.3 + Source Code
    By encrypted94 in forum Visual Basic Programming
    Replies: 7
    Last Post: 03-25-2011, 09:16 AM
  3. VB DLL Injector v1.0 + Source Code
    By M.P.G.H[Killer] in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 21
    Last Post: 05-14-2010, 02:24 PM
  4. ~ DLL Injector Source Code ~
    By Silk[H4x] in forum Visual Basic Programming
    Replies: 32
    Last Post: 12-16-2009, 11:18 PM
  5. [Request] Source Code DLL Injector (Text) - VB 2008 Codes
    By deocute in forum Visual Basic Programming
    Replies: 1
    Last Post: 10-21-2009, 12:16 AM