Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Onelordofpain's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    195
    Reputation
    10
    Thanks
    4,700
    My Mood
    Cool

    LORD INJECTOR V1.1



    Hello friends ..
    As few as updating my injector
    Well this as most of my release has been rewritten!

    I hope this helps, that you enjoy and good game

    ______________________________________________



     

     

     


    ______________________________________________



     
    XBOX


    WHITE/BLUE


    WIN XP


    GREY/BLUE


    VISTA


    METRO


    ______________________________________________


    News LORD INJECTOR to LORD INJECTOR V1.1

    Added option to choose theme

    Nothing else
    Once my injector is not detected I will not rewrite it again

    Topic to LORD INJECTOR: LORD INJECTOR

    ______________________________________________



    Type the file regarding their game in "Process"
    Select the hack (.dll) in "Browser"
    (if your game is open search process in his "List of Process." If you do not will need to follow the next part of the tutorial)
    Open your game, minimizes it (the game) and click "INJECT NOW" at the injector
    Ready
    Good Game


    Note: I found a bug with the doubts of Users In my injector
    if you happen to follow the step-down!

    "Injector closes when I select dll"

    Good for that I already found the solution, follow these instructions:
    Open the nozzle and do whatever you have to do, how to choose
    dll and the process. Having done this, open your game, wait for him to carry,
    after loaded va until the push and click "INJECT NOW"
    ______________________________________________



    JottiScan 1/21
    VirusTotal 2/56

    ______________________________________________



     
    Code:
    Coding of Injection :
    
    function CheckProcess(Process: String): boolean;
    const PROCESS_TERMINATE=$0001;
    var ContinueLoop: BOOL;
        FSnapshotHandle: THandle;
        FProcessEntry32: TProcessEntry32;
    begin
     result:=false;
     FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
     FProcessEntry32.dwSize := Sizeof(FProcessEntry32);
     ContinueLoop := Process32First(FSnapshotHandle,FProcessEntry32);
    while integer(ContinueLoop) <> 0 do
    begin
    if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) = UpperCase(Process))
    or (UpperCase(FProcessEntry32.szExeFile) = UpperCase(Process))) then
    begin
    ProcessID:=FProcessEntry32.th32ProcessID;
    Result := true;
    exit;
    end;
    ContinueLoop := Process32Next(FSnapshotHandle,FProcessEntry32);
    end;
    CloseHandle(FSnapshotHandle);
    end;
    
    function InjectDll(PID:DWORD; sDll:string):Boolean;
    var
    hLib:     Pointer;
    hThread:  THandle;
    pMod:     Pointer;
    hOpen:    THandle;
    dWritten: Cardinal;
    ThreadID: Cardinal;
    LibName:  WideString;
    begin
      LibName:=WideString(sDll);
      Result := FALSE;
      hOpen := OpenProcess(PROCESS_ALL_ACCESS, FALSE, PID);
      if hOpen <> INVALID_HANDLE_VALUE then
      begin
        hLib := GetProcAddress(GetModuleHandle(PChar('kernel32.dll')), PChar('LoadLibraryW'));
        pMod := VirtualAllocEx(hOpen, nil, (Length(LibName)*2) + 2, MEM_COMMIT or MEM_RESERVE, PAGE_EXECUTE_READWRITE);
        if WriteProcessMemory(hOpen, pMod,        @LIBName[1], (Length(LibName)*2), dWritten) then
          Result := TRUE;
        hThread := CreateRemoteThread(hOpen, nil, 0, hLib, pMod, 0, ThreadID);
        WaitForSingleObject(hThread, INFINITE);
        CloseHandle(hOpen);
        CloseHandle(hThread);
      end;
    end;

    ______________________________________________



    Special thanks to @ludgerogabriel for helping me and coding of injection!
    @Onelordofpain (ME!)
    @akosipol by designer
    @rwby for helping in disseminating
    GLHF.



    Helped you ?! Thank not cost anything
    <b>Downloadable Files</b> Downloadable Files

  2. The Following 79 Users Say Thank You to Onelordofpain For This Useful Post:

    22train (12-08-2015),24691246 (03-27-2016),a1892521582 (01-08-2016),Actionraiser09 (11-08-2015),adliakmal46 (12-06-2015),aliew2 (01-08-2016),alvea007 (11-24-2015),badlynda28 (12-12-2015),bash2000 (12-27-2015),buzzkill1151 (10-22-2015),CCasusensa1 (12-05-2015),conenymous1337 (12-10-2015),cpso200 (02-16-2016),crezmo (12-13-2015),dercoole258 (01-07-2016),dkfrksa (11-20-2015),dlskfk23 (12-21-2015),etbhrhtrhtrhthethererh (04-24-2016),fiaghost (10-27-2015),Gangaspecial (10-22-2015),Grazzler (12-24-2015),HazeCarl (12-15-2015),hhduy98 (11-30-2015),HopeRiko (12-30-2015),hugoleo43 (10-26-2015),iLoveGaming1912 (12-27-2015),indianjohnpanda (11-19-2015),jackoozy (11-06-2015),JeremiahYT (03-03-2016),jerx2015 (10-24-2015),jhoncruell (11-03-2015),kakelarsii (10-22-2015),kboyz194 (12-24-2015),kowchik666 (03-28-2016),lBLinzXx (01-06-2016),leditirane (02-08-2016),Letrektem (11-15-2015),LeWizard23 (02-21-2016),lhvip (02-12-2016),liefdz (10-19-2015),ljkjhdfhgj (11-04-2015),LottyDewt (11-01-2015),MarcoBailey (11-19-2015),Matty14 (12-02-2015),micca89 (12-14-2015),miha9543 (09-11-2016),moresmile_0412 (11-19-2015),MrVANTARO (12-05-2015),neoproty (12-08-2015),neoxeon (12-20-2015),ninaap (11-28-2015),noname012 (12-08-2015),Objectifies (02-08-2016),oussamaddr768 (12-11-2015),RequiredInformation (10-25-2015),robert777888 (01-21-2016),rogerioneythor (11-15-2015),roland56 (01-31-2016),rozyalyan (04-17-2016),rubegrind (10-25-2015),savesilver1 (10-24-2015),Sayreal4 (12-02-2015),settan88 (11-17-2015),shinlc (10-20-2015),Shiroe13 (10-19-2015),SouxFx (10-20-2015),speddy1991 (02-01-2016),sqwuerty (10-20-2015),Stringer5 (06-02-2017),tijesef (01-08-2017),vitaldnb (01-11-2016),WaffenSkull (10-22-2015),windsbbg (11-29-2015),xlonz (01-06-2016),yabetsu (10-27-2015),yolohimygod (12-15-2015),yonmeme (12-26-2015),zeeshan4u (01-17-2016),ZombieKawaii (01-03-2016)

  3. #2
    Minnesota Dabs's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Location
    USA
    Posts
    4,241
    Reputation
    619
    Thanks
    1,078
    My Mood
    Relaxed
    //Approved.
    Successful Trades: 52

    Scammed Trades: 6

    Vouch Profile!

  4. The Following User Says Thank You to Minnesota Dabs For This Useful Post:

    Onelordofpain (10-21-2015)

  5. #3
    forlastpass's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    2
    Thanks for sharing.

  6. The Following User Says Thank You to forlastpass For This Useful Post:

    Onelordofpain (10-21-2015)

  7. #4
    Onelordofpain's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    195
    Reputation
    10
    Thanks
    4,700
    My Mood
    Cool
    Quote Originally Posted by Blue Jay View Post
    //Approved.
    Thank you

    - - - Updated - - -

    Quote Originally Posted by forlastpass View Post
    Thanks for sharing.
    Okay man thanks

  8. #5
    akosipol's Avatar
    Join Date
    Mar 2015
    Gender
    male
    Posts
    268
    Reputation
    10
    Thanks
    37
    My Mood
    Devilish
    Looking good!

    Been busy pain
    ur stupid af lmao

  9. The Following User Says Thank You to akosipol For This Useful Post:

    Onelordofpain (10-21-2015)

  10. #6
    Onelordofpain's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    195
    Reputation
    10
    Thanks
    4,700
    My Mood
    Cool
    Quote Originally Posted by akosipol View Post
    Looking good!

    Been busy pain
    Improvements brother ;(

  11. #7
    {"Hoosier"}'s Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    Nice Injector ... Have you considered advanced injection methods ? Here is some source on mapping to a process .
    (Credits) to zwclose7
    This can be converted to VB.net and could i make one suggestion use a list box for your styles you could add an import feature to the Injector "custom style" so users could use their own . But i really like what you have done and how you continue to improve upon your project .

     
    #include <stdio.h>
    #include <Windows.h>

    typedef HMODULE (WINAPI *pLoadLibraryA)(LPCSTR);
    typedef FARPROC (WINAPI *pGetProcAddress)(HMODULE,LPCSTR);

    typedef BOOL (WINAPI *PDLL_MAIN)(HMODULE,DWORD,PVOID);

    typedef struct _MANUAL_INJECT
    {
    PVOID ImageBase;
    PIMAGE_NT_HEADERS NtHeaders;
    PIMAGE_BASE_RELOCATION BaseRelocation;
    PIMAGE_IMPORT_DESCRIPTOR ImportDirectory;
    pLoadLibraryA fnLoadLibraryA;
    pGetProcAddress fnGetProcAddress;
    }MANUAL_INJECT,*PMANUAL_INJECT;

    DWORD WINAPI LoadDll(PVOID p)
    {
    PMANUAL_INJECT ManualInject;

    HMODULE hModule;
    DWORD i,Function,count,delta;

    PDWORD ptr;
    PWORD list;

    PIMAGE_BASE_RELOCATION pIBR;
    PIMAGE_IMPORT_DESCRIPTOR pIID;
    PIMAGE_IMPORT_BY_NAME pIBN;
    PIMAGE_THUNK_DATA FirstThunk,OrigFirstThunk;

    PDLL_MAIN EntryPoint;

    ManualInject=(PMANUAL_INJECT)p;

    pIBR=ManualInject->BaseRelocation;
    delta=(DWORD)((LPBYTE)ManualInject->ImageBase-ManualInject->NtHeaders->OptionalHeader.ImageBase); // Calculate the delta

    // Relocate the image

    while(pIBR->VirtualAddress)
    {
    if(pIBR->SizeOfBlock>=sizeof(IMAGE_BASE_RELOCATION))
    {
    count=(pIBR->SizeOfBlock-sizeof(IMAGE_BASE_RELOCATION))/sizeof(WORD);
    list=(PWORD)(pIBR+1);

    for(i=0;i<count;i++)
    {
    if(list[i])
    {
    ptr=(PDWORD)((LPBYTE)ManualInject->ImageBase+(pIBR->VirtualAddress+(list[i] & 0xFFF)));
    *ptr+=delta;
    }
    }
    }

    pIBR=(PIMAGE_BASE_RELOCATION)((LPBYTE)pIBR+pIBR->SizeOfBlock);
    }

    pIID=ManualInject->ImportDirectory;

    // Resolve DLL imports

    while(pIID->Characteristics)
    {
    OrigFirstThunk=(PIMAGE_THUNK_DATA)((LPBYTE)ManualI nject->ImageBase+pIID->OriginalFirstThunk);
    FirstThunk=(PIMAGE_THUNK_DATA)((LPBYTE)ManualInjec t->ImageBase+pIID->FirstThunk);

    hModule=ManualInject->fnLoadLibraryA((LPCSTR)ManualInject->ImageBase+pIID->Name);

    if(!hModule)
    {
    return FALSE;
    }

    while(OrigFirstThunk->u1.AddressOfData)
    {
    if(OrigFirstThunk->u1.Ordinal & IMAGE_ORDINAL_FLAG)
    {
    // Import by ordinal

    Function=(DWORD)ManualInject->fnGetProcAddress(hModule,(LPCSTR)(OrigFirstThun k->u1.Ordinal & 0xFFFF));

    if(!Function)
    {
    return FALSE;
    }

    FirstThunk->u1.Function=Function;
    }

    else
    {
    // Import by name

    pIBN=(PIMAGE_IMPORT_BY_NAME)((LPBYTE)ManualInject->ImageBase+OrigFirstThunk->u1.AddressOfData);
    Function=(DWORD)ManualInject->fnGetProcAddress(hModule,(LPCSTR)pIBN->Name);

    if(!Function)
    {
    return FALSE;
    }

    FirstThunk->u1.Function=Function;
    }

    OrigFirstThunk++;
    FirstThunk++;
    }

    pIID++;
    }

    if(ManualInject->NtHeaders->OptionalHeader.AddressOfEntryPoint)
    {
    EntryPoint=(PDLL_MAIN)((LPBYTE)ManualInject->ImageBase+ManualInject->NtHeaders->OptionalHeader.AddressOfEntryPoint);
    return EntryPoint((HMODULE)ManualInject->ImageBase,DLL_PROCESS_ATTACH,NULL); // Call the entry point
    }

    return TRUE;
    }

    DWORD WINAPI LoadDllEnd()
    {
    return 0;
    }

    int wmain(int argc,wchar_t* argv[])
    {
    PIMAGE_DOS_HEADER pIDH;
    PIMAGE_NT_HEADERS pINH;
    PIMAGE_SECTION_HEADER pISH;

    HANDLE hProcess,hThread,hFile,hToken;
    PVOID buffer,image,mem;
    DWORD i,FileSize,ProcessId,ExitCode,read;

    TOKEN_PRIVILEGES tp;
    MANUAL_INJECT ManualInject;

    if(argc<3)
    {
    printf("\nUsage: ManualInject [DLL name] [PID]\n");
    return -1;
    }

    if(OpenProcessToken((HANDLE)-1,TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY,&hToken))
    {
    tp.PrivilegeCount=1;
    tp.Privileges[0].Attributes=SE_PRIVILEGE_ENABLED;

    tp.Privileges[0].Luid.LowPart=20;
    tp.Privileges[0].Luid.HighPart=0;

    AdjustTokenPrivileges(hToken,FALSE,&tp,0,NULL,NULL );
    CloseHandle(hToken);
    }

    printf("\nOpening the DLL.\n");
    hFile=CreateFile(argv[1],GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NUL L,OPEN_EXISTING,0,NULL); // Open the DLL

    if(hFile==INVALID_HANDLE_VALUE)
    {
    printf("\nError: Unable to open the DLL (%d)\n",GetLastError());
    return -1;
    }

    FileSize=GetFileSize(hFile,NULL);
    buffer=VirtualAlloc(NULL,FileSize,MEM_COMMIT|MEM_R ESERVE,PAGE_READWRITE);

    if(!buffer)
    {
    printf("\nError: Unable to allocate memory for DLL data (%d)\n",GetLastError());

    CloseHandle(hFile);
    return -1;
    }

    // Read the DLL

    if(!ReadFile(hFile,buffer,FileSize,&read,NULL))
    {
    printf("\nError: Unable to read the DLL (%d)\n",GetLastError());

    VirtualFree(buffer,0,MEM_RELEASE);
    CloseHandle(hFile);

    return -1;
    }

    CloseHandle(hFile);

    pIDH=(PIMAGE_DOS_HEADER)buffer;

    if(pIDH->e_magic!=IMAGE_DOS_SIGNATURE)
    {
    printf("\nError: Invalid executable image.\n");

    VirtualFree(buffer,0,MEM_RELEASE);
    return -1;
    }

    pINH=(PIMAGE_NT_HEADERS)((LPBYTE)buffer+pIDH->e_lfanew);

    if(pINH->Signature!=IMAGE_NT_SIGNATURE)
    {
    printf("\nError: Invalid PE header.\n");

    VirtualFree(buffer,0,MEM_RELEASE);
    return -1;
    }

    if(!(pINH->FileHeader.Characteristics & IMAGE_FILE_DLL))
    {
    printf("\nError: The image is not DLL.\n");

    VirtualFree(buffer,0,MEM_RELEASE);
    return -1;
    }

    ProcessId=wcstoul(argv[2],NULL,0);

    printf("\nOpening target process.\n");
    hProcess=OpenProcess(PROCESS_ALL_ACCESS,FALSE,Proc essId);

    if(!hProcess)
    {
    printf("\nError: Unable to open target process (%d)\n",GetLastError());

    VirtualFree(buffer,0,MEM_RELEASE);
    CloseHandle(hProcess);

    return -1;
    }

    printf("\nAllocating memory for the DLL.\n");
    image=VirtualAllocEx(hProcess,NULL,pINH->OptionalHeader.SizeOfImage,MEM_COMMIT|MEM_RESERVE ,PAGE_EXECUTE_READWRITE); // Allocate memory for the DLL

    if(!image)
    {
    printf("\nError: Unable to allocate memory for the DLL (%d)\n",GetLastError());

    VirtualFree(buffer,0,MEM_RELEASE);
    CloseHandle(hProcess);

    return -1;
    }

    // Copy the header to target process

    printf("\nCopying headers into target process.\n");

    if(!WriteProcessMemory(hProcess,image,buffer,pINH->OptionalHeader.SizeOfHeaders,NULL))
    {
    printf("\nError: Unable to copy headers to target process (%d)\n",GetLastError());

    VirtualFreeEx(hProcess,image,0,MEM_RELEASE);
    CloseHandle(hProcess);

    VirtualFree(buffer,0,MEM_RELEASE);
    return -1;
    }

    pISH=(PIMAGE_SECTION_HEADER)(pINH+1);

    // Copy the DLL to target process

    printf("\nCopying sections to target process.\n");

    for(i=0;i<pINH->FileHeader.NumberOfSections;i++)
    {
    WriteProcessMemory(hProcess,(PVOID)((LPBYTE)image+ pISH[i].VirtualAddress),(PVOID)((LPBYTE)buffer+pISH[i].PointerToRawData),pISH[i].SizeOfRawData,NULL);
    }

    printf("\nAllocating memory for the loader code.\n");
    mem=VirtualAllocEx(hProcess,NULL,4096,MEM_COMMIT|M EM_RESERVE,PAGE_EXECUTE_READWRITE); // Allocate memory for the loader code

    if(!mem)
    {
    printf("\nError: Unable to allocate memory for the loader code (%d)\n",GetLastError());

    VirtualFreeEx(hProcess,image,0,MEM_RELEASE);
    CloseHandle(hProcess);

    VirtualFree(buffer,0,MEM_RELEASE);
    return -1;
    }

    printf("\nLoader code allocated at %#x\n",mem);
    memset(&ManualInject,0,sizeof(MANUAL_INJECT));

    ManualInject.ImageBase=image;
    ManualInject.NtHeaders=(PIMAGE_NT_HEADERS)((LPBYTE )image+pIDH->e_lfanew);
    ManualInject.BaseRelocation=(PIMAGE_BASE_RELOCATIO N)((LPBYTE)image+pINH->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress);
    ManualInject.ImportDirectory=(PIMAGE_IMPORT_DESCRI PTOR)((LPBYTE)image+pINH->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress);
    ManualInject.fnLoadLibraryA=LoadLibraryA;
    ManualInject.fnGetProcAddress=GetProcAddress;

    printf("\nWriting loader code to target process.\n");

    WriteProcessMemory(hProcess,mem,&ManualInject,size of(MANUAL_INJECT),NULL); // Write the loader information to target process
    WriteProcessMemory(hProcess,(PVOID)((PMANUAL_INJEC T)mem+1),LoadDll,(DWORD)LoadDllEnd-(DWORD)LoadDll,NULL); // Write the loader code to target process

    printf("\nExecuting loader code.\n");
    hThread=CreateRemoteThread(hProcess,NULL,0,(LPTHRE AD_START_ROUTINE)((PMANUAL_INJECT)mem+1),mem,0,NUL L); // Create a remote thread to execute the loader code

    if(!hThread)
    {
    printf("\nError: Unable to execute loader code (%d)\n",GetLastError());

    VirtualFreeEx(hProcess,mem,0,MEM_RELEASE);
    VirtualFreeEx(hProcess,image,0,MEM_RELEASE);

    CloseHandle(hProcess);

    VirtualFree(buffer,0,MEM_RELEASE);
    return -1;
    }

    WaitForSingleObject(hThread,INFINITE);
    GetExitCodeThread(hThread,&ExitCode);

    if(!ExitCode)
    {
    VirtualFreeEx(hProcess,mem,0,MEM_RELEASE);
    VirtualFreeEx(hProcess,image,0,MEM_RELEASE);

    CloseHandle(hThread);
    CloseHandle(hProcess);

    VirtualFree(buffer,0,MEM_RELEASE);
    return -1;
    }

    CloseHandle(hThread);
    VirtualFreeEx(hProcess,mem,0,MEM_RELEASE);

    CloseHandle(hProcess);

    printf("\nDLL injected at %#x\n",image);

    if(pINH->OptionalHeader.AddressOfEntryPoint)
    {
    printf("\nDLL entry point: %#x\n",(PVOID)((LPBYTE)image+pINH->OptionalHeader.AddressOfEntryPoint));
    }

    VirtualFree(buffer,0,MEM_RELEASE);
    return 0;
    }


    Some other good source was posted by Kenshin13 in his thread Erase DLL PE Header yet another good feature for an advanced injector .
    Last edited by {"Hoosier"}; 10-22-2015 at 09:22 AM.

  12. #8
    Onelordofpain's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    195
    Reputation
    10
    Thanks
    4,700
    My Mood
    Cool
    Quote Originally Posted by {"Hoosier"} View Post
    Nice Injector ... Have you considered advanced injection methods ? Here is some source on mapping to a process .
    (Credits) to zwclose7
    This can be converted to VB.net and could i make one suggestion use a list box for your styles you could add an import feature to the Injector "custom style" so users could use their own . But i really like what you have done and how you continue to improve upon your project .

     
    #include <stdio.h>
    #include <Windows.h>

    typedef HMODULE (WINAPI *pLoadLibraryA)(LPCSTR);
    typedef FARPROC (WINAPI *pGetProcAddress)(HMODULE,LPCSTR);

    typedef BOOL (WINAPI *PDLL_MAIN)(HMODULE,DWORD,PVOID);

    typedef struct _MANUAL_INJECT
    {
    PVOID ImageBase;
    PIMAGE_NT_HEADERS NtHeaders;
    PIMAGE_BASE_RELOCATION BaseRelocation;
    PIMAGE_IMPORT_DESCRIPTOR ImportDirectory;
    pLoadLibraryA fnLoadLibraryA;
    pGetProcAddress fnGetProcAddress;
    }MANUAL_INJECT,*PMANUAL_INJECT;

    DWORD WINAPI LoadDll(PVOID p)
    {
    PMANUAL_INJECT ManualInject;

    HMODULE hModule;
    DWORD i,Function,count,delta;

    PDWORD ptr;
    PWORD list;

    PIMAGE_BASE_RELOCATION pIBR;
    PIMAGE_IMPORT_DESCRIPTOR pIID;
    PIMAGE_IMPORT_BY_NAME pIBN;
    PIMAGE_THUNK_DATA FirstThunk,OrigFirstThunk;

    PDLL_MAIN EntryPoint;

    ManualInject=(PMANUAL_INJECT)p;

    pIBR=ManualInject->BaseRelocation;
    delta=(DWORD)((LPBYTE)ManualInject->ImageBase-ManualInject->NtHeaders->OptionalHeader.ImageBase); // Calculate the delta

    // Relocate the image

    while(pIBR->VirtualAddress)
    {
    if(pIBR->SizeOfBlock>=sizeof(IMAGE_BASE_RELOCATION))
    {
    count=(pIBR->SizeOfBlock-sizeof(IMAGE_BASE_RELOCATION))/sizeof(WORD);
    list=(PWORD)(pIBR+1);

    for(i=0;i<count;i++)
    {
    if(list[i])
    {
    ptr=(PDWORD)((LPBYTE)ManualInject->ImageBase+(pIBR->VirtualAddress+(list[i] & 0xFFF)));
    *ptr+=delta;
    }
    }
    }

    pIBR=(PIMAGE_BASE_RELOCATION)((LPBYTE)pIBR+pIBR->SizeOfBlock);
    }

    pIID=ManualInject->ImportDirectory;

    // Resolve DLL imports

    while(pIID->Characteristics)
    {
    OrigFirstThunk=(PIMAGE_THUNK_DATA)((LPBYTE)ManualI nject->ImageBase+pIID->OriginalFirstThunk);
    FirstThunk=(PIMAGE_THUNK_DATA)((LPBYTE)ManualInjec t->ImageBase+pIID->FirstThunk);

    hModule=ManualInject->fnLoadLibraryA((LPCSTR)ManualInject->ImageBase+pIID->Name);

    if(!hModule)
    {
    return FALSE;
    }

    while(OrigFirstThunk->u1.AddressOfData)
    {
    if(OrigFirstThunk->u1.Ordinal & IMAGE_ORDINAL_FLAG)
    {
    // Import by ordinal

    Function=(DWORD)ManualInject->fnGetProcAddress(hModule,(LPCSTR)(OrigFirstThun k->u1.Ordinal & 0xFFFF));

    if(!Function)
    {
    return FALSE;
    }

    FirstThunk->u1.Function=Function;
    }

    else
    {
    // Import by name

    pIBN=(PIMAGE_IMPORT_BY_NAME)((LPBYTE)ManualInject->ImageBase+OrigFirstThunk->u1.AddressOfData);
    Function=(DWORD)ManualInject->fnGetProcAddress(hModule,(LPCSTR)pIBN->Name);

    if(!Function)
    {
    return FALSE;
    }

    FirstThunk->u1.Function=Function;
    }

    OrigFirstThunk++;
    FirstThunk++;
    }

    pIID++;
    }

    if(ManualInject->NtHeaders->OptionalHeader.AddressOfEntryPoint)
    {
    EntryPoint=(PDLL_MAIN)((LPBYTE)ManualInject->ImageBase+ManualInject->NtHeaders->OptionalHeader.AddressOfEntryPoint);
    return EntryPoint((HMODULE)ManualInject->ImageBase,DLL_PROCESS_ATTACH,NULL); // Call the entry point
    }

    return TRUE;
    }

    DWORD WINAPI LoadDllEnd()
    {
    return 0;
    }

    int wmain(int argc,wchar_t* argv[])
    {
    PIMAGE_DOS_HEADER pIDH;
    PIMAGE_NT_HEADERS pINH;
    PIMAGE_SECTION_HEADER pISH;

    HANDLE hProcess,hThread,hFile,hToken;
    PVOID buffer,image,mem;
    DWORD i,FileSize,ProcessId,ExitCode,read;

    TOKEN_PRIVILEGES tp;
    MANUAL_INJECT ManualInject;

    if(argc<3)
    {
    printf("\nUsage: ManualInject [DLL name] [PID]\n");
    return -1;
    }

    if(OpenProcessToken((HANDLE)-1,TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY,&hToken))
    {
    tp.PrivilegeCount=1;
    tp.Privileges[0].Attributes=SE_PRIVILEGE_ENABLED;

    tp.Privileges[0].Luid.LowPart=20;
    tp.Privileges[0].Luid.HighPart=0;

    AdjustTokenPrivileges(hToken,FALSE,&tp,0,NULL,NULL );
    CloseHandle(hToken);
    }

    printf("\nOpening the DLL.\n");
    hFile=CreateFile(argv[1],GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NUL L,OPEN_EXISTING,0,NULL); // Open the DLL

    if(hFile==INVALID_HANDLE_VALUE)
    {
    printf("\nError: Unable to open the DLL (%d)\n",GetLastError());
    return -1;
    }

    FileSize=GetFileSize(hFile,NULL);
    buffer=VirtualAlloc(NULL,FileSize,MEM_COMMIT|MEM_R ESERVE,PAGE_READWRITE);

    if(!buffer)
    {
    printf("\nError: Unable to allocate memory for DLL data (%d)\n",GetLastError());

    CloseHandle(hFile);
    return -1;
    }

    // Read the DLL

    if(!ReadFile(hFile,buffer,FileSize,&read,NULL))
    {
    printf("\nError: Unable to read the DLL (%d)\n",GetLastError());

    VirtualFree(buffer,0,MEM_RELEASE);
    CloseHandle(hFile);

    return -1;
    }

    CloseHandle(hFile);

    pIDH=(PIMAGE_DOS_HEADER)buffer;

    if(pIDH->e_magic!=IMAGE_DOS_SIGNATURE)
    {
    printf("\nError: Invalid executable image.\n");

    VirtualFree(buffer,0,MEM_RELEASE);
    return -1;
    }

    pINH=(PIMAGE_NT_HEADERS)((LPBYTE)buffer+pIDH->e_lfanew);

    if(pINH->Signature!=IMAGE_NT_SIGNATURE)
    {
    printf("\nError: Invalid PE header.\n");

    VirtualFree(buffer,0,MEM_RELEASE);
    return -1;
    }

    if(!(pINH->FileHeader.Characteristics & IMAGE_FILE_DLL))
    {
    printf("\nError: The image is not DLL.\n");

    VirtualFree(buffer,0,MEM_RELEASE);
    return -1;
    }

    ProcessId=wcstoul(argv[2],NULL,0);

    printf("\nOpening target process.\n");
    hProcess=OpenProcess(PROCESS_ALL_ACCESS,FALSE,Proc essId);

    if(!hProcess)
    {
    printf("\nError: Unable to open target process (%d)\n",GetLastError());

    VirtualFree(buffer,0,MEM_RELEASE);
    CloseHandle(hProcess);

    return -1;
    }

    printf("\nAllocating memory for the DLL.\n");
    image=VirtualAllocEx(hProcess,NULL,pINH->OptionalHeader.SizeOfImage,MEM_COMMIT|MEM_RESERVE ,PAGE_EXECUTE_READWRITE); // Allocate memory for the DLL

    if(!image)
    {
    printf("\nError: Unable to allocate memory for the DLL (%d)\n",GetLastError());

    VirtualFree(buffer,0,MEM_RELEASE);
    CloseHandle(hProcess);

    return -1;
    }

    // Copy the header to target process

    printf("\nCopying headers into target process.\n");

    if(!WriteProcessMemory(hProcess,image,buffer,pINH->OptionalHeader.SizeOfHeaders,NULL))
    {
    printf("\nError: Unable to copy headers to target process (%d)\n",GetLastError());

    VirtualFreeEx(hProcess,image,0,MEM_RELEASE);
    CloseHandle(hProcess);

    VirtualFree(buffer,0,MEM_RELEASE);
    return -1;
    }

    pISH=(PIMAGE_SECTION_HEADER)(pINH+1);

    // Copy the DLL to target process

    printf("\nCopying sections to target process.\n");

    for(i=0;i<pINH->FileHeader.NumberOfSections;i++)
    {
    WriteProcessMemory(hProcess,(PVOID)((LPBYTE)image+ pISH[i].VirtualAddress),(PVOID)((LPBYTE)buffer+pISH[i].PointerToRawData),pISH[i].SizeOfRawData,NULL);
    }

    printf("\nAllocating memory for the loader code.\n");
    mem=VirtualAllocEx(hProcess,NULL,4096,MEM_COMMIT|M EM_RESERVE,PAGE_EXECUTE_READWRITE); // Allocate memory for the loader code

    if(!mem)
    {
    printf("\nError: Unable to allocate memory for the loader code (%d)\n",GetLastError());

    VirtualFreeEx(hProcess,image,0,MEM_RELEASE);
    CloseHandle(hProcess);

    VirtualFree(buffer,0,MEM_RELEASE);
    return -1;
    }

    printf("\nLoader code allocated at %#x\n",mem);
    memset(&ManualInject,0,sizeof(MANUAL_INJECT));

    ManualInject.ImageBase=image;
    ManualInject.NtHeaders=(PIMAGE_NT_HEADERS)((LPBYTE )image+pIDH->e_lfanew);
    ManualInject.BaseRelocation=(PIMAGE_BASE_RELOCATIO N)((LPBYTE)image+pINH->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress);
    ManualInject.ImportDirectory=(PIMAGE_IMPORT_DESCRI PTOR)((LPBYTE)image+pINH->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress);
    ManualInject.fnLoadLibraryA=LoadLibraryA;
    ManualInject.fnGetProcAddress=GetProcAddress;

    printf("\nWriting loader code to target process.\n");

    WriteProcessMemory(hProcess,mem,&ManualInject,size of(MANUAL_INJECT),NULL); // Write the loader information to target process
    WriteProcessMemory(hProcess,(PVOID)((PMANUAL_INJEC T)mem+1),LoadDll,(DWORD)LoadDllEnd-(DWORD)LoadDll,NULL); // Write the loader code to target process

    printf("\nExecuting loader code.\n");
    hThread=CreateRemoteThread(hProcess,NULL,0,(LPTHRE AD_START_ROUTINE)((PMANUAL_INJECT)mem+1),mem,0,NUL L); // Create a remote thread to execute the loader code

    if(!hThread)
    {
    printf("\nError: Unable to execute loader code (%d)\n",GetLastError());

    VirtualFreeEx(hProcess,mem,0,MEM_RELEASE);
    VirtualFreeEx(hProcess,image,0,MEM_RELEASE);

    CloseHandle(hProcess);

    VirtualFree(buffer,0,MEM_RELEASE);
    return -1;
    }

    WaitForSingleObject(hThread,INFINITE);
    GetExitCodeThread(hThread,&ExitCode);

    if(!ExitCode)
    {
    VirtualFreeEx(hProcess,mem,0,MEM_RELEASE);
    VirtualFreeEx(hProcess,image,0,MEM_RELEASE);

    CloseHandle(hThread);
    CloseHandle(hProcess);

    VirtualFree(buffer,0,MEM_RELEASE);
    return -1;
    }

    CloseHandle(hThread);
    VirtualFreeEx(hProcess,mem,0,MEM_RELEASE);

    CloseHandle(hProcess);

    printf("\nDLL injected at %#x\n",image);

    if(pINH->OptionalHeader.AddressOfEntryPoint)
    {
    printf("\nDLL entry point: %#x\n",(PVOID)((LPBYTE)image+pINH->OptionalHeader.AddressOfEntryPoint));
    }

    VirtualFree(buffer,0,MEM_RELEASE);
    return 0;
    }


    Some other good source was posted by Kenshin13 in his thread Erase DLL PE Header yet another good feature for an advanced injector .
    Thanks for The suggestion Brother

    But I don't intend to do that, at least not yet. I'm going to wait and also develop new stuff

  13. #9
    HOOSIER's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    CyberSpace
    Posts
    962
    Reputation
    33
    Thanks
    2,352
    My Mood
    Cheerful
    Quote Originally Posted by Onelordofpain View Post
    Thanks for The suggestion Brother

    But I don't intend to do that, at least not yet. I'm going to wait and also develop new stuff
    It is actually not that hard there is a video with this source to help understand how to manually map . If you do not mind what new stuff are you referring to ?

  14. #10
    EV1LK's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    0
    what hacks exactly should i inject ? -_-

  15. #11
    blackops3cheats's Avatar
    Join Date
    Nov 2015
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    thanks for the share

  16. #12
    GodFire's Avatar
    Join Date
    Nov 2015
    Gender
    male
    Location
    Everywhere
    Posts
    13
    Reputation
    10
    Thanks
    1
    Thank you For this My friend

  17. #13
    Letrektem's Avatar
    Join Date
    Nov 2015
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    can you tell me how to use it step by step? im new here btw sooo hope comunnity here is nice

  18. #14
    Hunter's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Location
    Depths Of My Mind.
    Posts
    17,468
    Reputation
    3771
    Thanks
    6,159
    My Mood
    Cheerful
    Quote Originally Posted by Letrektem View Post
    can you tell me how to use it step by step? im new here btw sooo hope comunnity here is nice

  19. #15
    Letrektem's Avatar
    Join Date
    Nov 2015
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    i mean like what should i write on process and what check dll?

Page 1 of 2 12 LastLast

Similar Threads

  1. [Release] LORD INJECTOR V1
    By Onelordofpain in forum Combat Arms Spammers, Injectors and Multi Tools
    Replies: 12
    Last Post: 06-02-2016, 08:55 PM
  2. [Outdated] LORD INJECTOR [V3]
    By Onelordofpain in forum Counter-Strike 2 Coding & Resources
    Replies: 15
    Last Post: 09-27-2015, 11:53 PM
  3. [Outdated] LORD INJECTOR V2
    By Onelordofpain in forum Counter-Strike 2 Coding & Resources
    Replies: 14
    Last Post: 09-26-2015, 10:53 AM
  4. [Outdated] LORD INJECTOR [V3]
    By Onelordofpain in forum Blackshot Injectors & Tools
    Replies: 0
    Last Post: 09-26-2015, 10:15 AM
  5. [Release] LORD INJECTOR V1
    By Onelordofpain in forum CrossFire Spammers, Injectors and Multi Tools
    Replies: 1
    Last Post: 09-24-2015, 02:47 PM