Results 1 to 10 of 10
  1. #1
    Alainx277's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    60
    Reputation
    10
    Thanks
    10
    My Mood
    Happy

    How to make your own Injector

    If you use a public Injector when hacking csgo, you can get untrusted or even VAC banned, but making your own Injector is very easy.
    These are the basic steps:
    1. Get the address of LoadLibraryA
    2. Open the process
    3. Alloc 260 bytes in process
    4. Write dll path to allocated bytes
    5. CreateRemoteThread at address of LoadLibraryA, with the address of those 260 bytes
    6. Check if injection was successful


    1. Get the address of LoadLibraryA
    Code:
    // Get a handle to kernel32 dll
    HMODULE kernel = GetModuleHandle("Kernel32");
    // Get address of LoadLibraryA
    FARPROC loadLibary = GetProcAddress(kernel, "LoadLibraryA");
    Because kernel32.dll gets loaded at the same place in every process, the address of LoadLibrary in the target process is the same.


    2. Open the process
    Code:
    // Open process with all access
    HANDLE processH = OpenProcess(PROCESS_ALL_ACCESS, FALSE, processId);
    This just opens a handle to the process.


    3. Alloc 260 bytes in process
    Code:
    // Alloc 260 bytes
    LPVOID dllNameAddress = VirtualAllocEx(processH, NULL, 260, MEM_COMMIT, PAGE_READWRITE);
    This allocates 260 bytes (MAX_PATH) in the target process.


    4. Write dll path to allocated bytes
    Code:
    // Temp Buffer
    DWORD numOfBytes;
    // Write dll path to allocated memory
    WriteProcessMemory(processH, dllNameAddress, pathToDll, 260, &numOfBytes);
    Here we write our dll path to the allocated memory so we can pass it to LoadLibrary later.


    5. CreateRemoteThread at address of LoadLibraryA, with the address of those 260 bytes
    Code:
    // Creating Remote Thread -> LoadLibary
    HANDLE remoteThread = CreateRemoteThread(processH, NULL, 0, (LPTHREAD_START_ROUTINE)loadLibary, dllNameAddress, 0, NULL);
    We create a thread in the process, call the address of LoadLibraryA (Step 1) and pass the address to our dllPath. The target process should call LoadLibrary and load our dll.


    6. Check if injection was successful
    Code:
    // Check if thread created
    if (remoteThread)
    {
    	// Wait for exit
    	DWORD result = WaitForSingleObject(remoteThread, 10000);
    	if (result == WAIT_OBJECT_0)
    	{
    		cout << "Successfully Injected!\n";
    	}
    	else if (result == WAIT_TIMEOUT)
    	{
    		cout << "Timeout reached! (Use CreateThread in dllMain)\n";
    	}
    	else
    	{
    		cout << "Thread failed!\n";
    	}
    }
    Here we check if we created the thread, then we wait for it to exit. If the result is WAIT_OBJECT_0, the thread returned and the Injection was successful. If the result is WAIT_TIMEOUT, the thread is blocking the execution of the program but it injected successfully . If the result is something else, the thread has failed.


    I hope this tutorial has helped you understand how to make an dll Injector, if it did, please leave a thanks.
    If I can improve anything, please let me know.
    Last edited by Alainx277; 01-03-2017 at 10:53 AM.
    Remember, if I helped you, leave a thanks.

    I'm 14, if I can do it, you can!

  2. The Following 4 Users Say Thank You to Alainx277 For This Useful Post:

    B7300 (03-03-2017),FadeCS (01-03-2017),FerhatRocks (03-07-2017),Taylor Suewift (01-03-2017)

  3. #2
    FadeCS's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    175
    Reputation
    10
    Thanks
    12
    My Mood
    Aggressive
    Damn, a very detailed tutorial here, thanks for sharing!

  4. #3
    chriszz24's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Posts
    31
    Reputation
    10
    Thanks
    3
    My Mood
    Yeehaw
    I dont get it, This is a detailed post but what do you mean by those steps?

  5. #4
    Alainx277's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    60
    Reputation
    10
    Thanks
    10
    My Mood
    Happy
    This is how you load a dll into a process. If you have a problem, please clarify what is not working.

  6. #5
    windowskid's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    3
    My Mood
    Relaxed
    I'm pretty sure this is detected, and probably will get you banned. Other than that it's a pretty good tutorial for newbies, I just wouldn't use it on CS:GO personally. However for other games without anticheat or with worse anticheats it will probably work fine.

  7. #6
    PlanktonWeed's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    69
    Reputation
    10
    Thanks
    237
    Thanks for this.

  8. #7
    OfficialSyntaxx's Avatar
    Join Date
    Mar 2017
    Gender
    male
    Posts
    120
    Reputation
    10
    Thanks
    24
    My Mood
    Inspired
    +1 might add onto this if I'm able to. Thank you.

  9. #8
    killerld2's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    When people say that injector can get outdated, which part in this that can be outdated and remains up to date?

  10. #9
    FerhatRocks's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Posts
    227
    Reputation
    25
    Thanks
    72
    My Mood
    Bored
    Thanks, I needed this

  11. #10
    syed musa's Avatar
    Join Date
    Jul 2018
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    can i write the same as u wrote?i just need to put injector and cheats in same folder?

Similar Threads

  1. [Visual Basics Tutorial] HOW TO MAKE YOUR OWN INJECTOR!
    By CheytacBoy__ in forum Programming Tutorials
    Replies: 9
    Last Post: 01-26-2013, 08:03 AM
  2. [Tutorial] HOW TO MAKE YOUR OWN INJECTOR!
    By CheytacBoy__ in forum CrossFire Spammers, Injectors and Multi Tools
    Replies: 10
    Last Post: 01-07-2013, 08:45 PM
  3. [Tutorial] How To Make Your Own Injector Using [VB6].
    By Jhem in forum WarRock Tutorials
    Replies: 38
    Last Post: 12-27-2012, 02:45 AM
  4. [Tutorial] How to make your own Injector
    By ReachBot in forum Mission Against Terror Discussions
    Replies: 4
    Last Post: 12-12-2012, 09:01 AM
  5. [Tutorial] [Tutorial]How to make Your own Injector
    By RikuoII in forum WarRock Philippines Hacks
    Replies: 17
    Last Post: 08-16-2012, 01:31 AM

Tags for this Thread