Results 1 to 10 of 10
  1. #1
    Cõins
    Cõins is offline
    New member
    Join Date
    2011 Jan
    Posts
    7
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    4
    Thanked in
    1 Post
    Rep Power
    0

    Post Multi Injector 1.0 BETA

    Today I made this injector that injects all the DLL's in the specified processes. I included the source code so if you see any bugs/errors or improvements/idea's feel free to post them. I hope you guys like it

    Virus Scan: VirusTotal - Free Online Virus, Malware and URL Scanner

    I know that it gives a few viruses but they aren't real viruses . If you still don't trust it feel free to not download it or compile it yourself.

    How to use:
    1. in inject.txt type a asterisk(*) and then the process name. (e.g. *iw4mp.dat)
    2. then on the second line type the DLL path. If you want more DLL's to be injected in the process go to the next line and type another DLL.
    3. If you want to inject DLL's in more processes just go to a new line again and type another asterisk with the process name. So a valid inject.txt would be:
    Code:
    *iw4mp.dat
    number1.dll
    number2.dll
    number3.dll
    *notepad.exe
    number4.dll
    number5.dll
    4. After you've done that you can just run the injector and it injects it for you.

    Source Code:

    Code:
    #include <fstream>
    #include <windows.h>
    #include <tlhelp32.h>
    #include <shlwapi.h>
    #include <iostream>
    #include <string>
    #define CREATE_THREAD_ACCESS (PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ)
    
    BOOL Inject(char* procName, char* dllName);
    
    using namespace std;
    
    int main() {
        ifstream myFile;
        string output;
        string process;
        string strDLL;
        char* Proc;
        char* DLL;
    
        myFile.open("C:\\Users\\Johan\\Desktop\\inject.txt");
        if (myFile.is_open()) {
            while (!myFile.eof()) {
                myFile >> output;
                if(output[0]=='*'){
                    process = output.substr(1, output.size());
                    Proc=&process[0];
                } else {
                    strDLL = output;
                    DLL = &strDLL[0];
                    Inject(Proc, DLL);
                    }
                }
        }
        myFile.close();
        return 0;
    }
    
    BOOL Inject(char* procName, char* dllName)
    {
        DWORD ProcID    = 0;
    
        PROCESSENTRY32 pe;
        HANDLE thSnapshot;
        BOOL retval, ProcFound = false;
        thSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
        if(thSnapshot == INVALID_HANDLE_VALUE)
        {
          return false;
        }
    
        pe.dwSize = sizeof(PROCESSENTRY32);
    
        retval = Process32First(thSnapshot, &pe);
    
        while(retval)
        {
            if(StrStrI(pe.szExeFile, procName) )
            {
                ProcFound = true;
                break;
            }
    
            retval    = Process32Next(thSnapshot,&pe);
            pe.dwSize = sizeof(PROCESSENTRY32);
        }
        ProcID = pe.th32ProcessID;
    
        HANDLE hToken;
        TOKEN_PRIVILEGES tkp;
        if(OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
        {
            LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &tkp.Privileges[0].Luid);
            tkp.PrivilegeCount = 1;
            tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
            AdjustTokenPrivileges(hToken, 0, &tkp, sizeof(tkp), NULL, NULL);
        }
    
        HANDLE Proc;
        LPVOID RemoteString, LoadLibAddy;
    
        Proc = OpenProcess(CREATE_THREAD_ACCESS, FALSE, ProcID);
        if(!Proc)
        {
            return false;
        }
    
        LoadLibAddy = (LPVOID)GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA");
        RemoteString = (LPVOID)VirtualAllocEx(Proc, NULL, strlen(dllName), MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);
        WriteProcessMemory(Proc, (LPVOID)RemoteString, dllName, strlen(dllName), NULL);
    
        CreateRemoteThread(Proc, NULL, NULL, (LPTHREAD_START_ROUTINE)LoadLibAddy, (LPVOID)RemoteString, NULL, NULL);
        CloseHandle(Proc);
    
        return true;
    }
    Have fun with it and thank me if I helped you

    Please register or login to download attachments.

    Last edited by Cõins; 2011-01-23 at 02:10 PM.

  2. The Following 4 Users Say Thank You to Cõins For This Useful Post:


  3. #2
    blackout01
    blackout01 is offline
    Guest
    Join Date
    2011 Feb
    Posts
    2
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0
    this is the code of multi injector??

    so can i make my own version of multi injector using this code .????

  4. #3
    Cõins
    Cõins is offline
    New member
    Join Date
    2011 Jan
    Posts
    7
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    4
    Thanked in
    1 Post
    Rep Power
    0
    Quote Originally Posted by blackout01 View Post
    this is the code of multi injector??

    so can i make my own version of multi injector using this code .????
    Sure, if you give me credits

  5. #4
    dkaitos
    dkaitos is offline
    New member dkaitos's Avatar
    Join Date
    2011 Mar
    Posts
    35
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    1
    Thanked in
    1 Post
    Rep Power
    0
    what is this used for?

  6. #5
    pohkak
    pohkak is offline
    Member-in-training pohkak's Avatar
    Join Date
    2010 Dec
    Posts
    171
    Thanks Thanks Given 
    29
    Thanks Thanks Received 
    10
    Thanked in
    10 Posts
    Rep Power
    0
    ...........
    Last edited by pohkak; 2011-07-29 at 10:53 PM.

  7. #6
    Cõins
    Cõins is offline
    New member
    Join Date
    2011 Jan
    Posts
    7
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    4
    Thanked in
    1 Post
    Rep Power
    0
    Quote Originally Posted by pohkak View Post
    That is real junk
    If u dont know what it is doesnt mean it's junk. Why are u even at the C++ forum?

    Quote Originally Posted by dkaitos View Post
    what is this used for?
    Wikipedia says...

    Quote Originally Posted by wikipedia View Post
    In computer programming, DLL injection is a technique used to run code within the address space of another process by forcing it to load a dynamic-link library.[1] DLL injection is often used by third-party developers to influence the behavior of a program in a way its authors did not anticipate or intend.[1][2][3] For example, the injected code could trap system function calls,[4][5] or read the contents of password textboxes, which cannot be done the usual way.[6]

  8. #7
    coolninja
    coolninja is offline
    New member
    Join Date
    2011 Apr
    Posts
    10
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    2
    Thanked in
    1 Post
    Rep Power
    0
    Thanks for your source code, Coins
    It's a really nice reference to me for future usage,
    although im still learning C

  9. #8
    Cõins
    Cõins is offline
    New member
    Join Date
    2011 Jan
    Posts
    7
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    4
    Thanked in
    1 Post
    Rep Power
    0
    Quote Originally Posted by coolninja View Post
    Thanks for your source code, Coins
    It's a really nice reference to me for future usage,
    although im still learning C
    No problem! Wow, allready 4 thanks! I'll see if there is more usefull stuff in my Projects folders lol xd

  10. #9
    rikyu
    rikyu is offline
    Guest
    Join Date
    2011 Apr
    Posts
    2
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0
    hello coinz
    I have compile the code, and my project has been finished, but after I run it there is no reaction?
    my project text in here

    myFile.open("G:\\inject.txt");
    Is this correct?
    Last edited by rikyu; 2011-04-08 at 12:42 AM.

  11. #10
    Cõins
    Cõins is offline
    New member
    Join Date
    2011 Jan
    Posts
    7
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    4
    Thanked in
    1 Post
    Rep Power
    0
    Quote Originally Posted by rikyu View Post
    hello coinz
    I have compile the code, and my project has been finished, but after I run it there is no reaction?
    my project text in here

    Is this correct?
    Are you sure inject.txt is located at G:\\inject.txt? Are you sure inject.txt is well formatted? Are you sure the process you are trying to inject in is active? Are you sure you got admin rights?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •