I am not planning on explaining my code too much but rather give code, which is more or less straightforward in terms of the functions used and the simple logic.
Unlike the previous remote detour given I am not really creating a running thread as that will just be too slow and unneeded work.
There are 2 functions needed for the global injection: Provider(void) & Injector(DWORD Pid)
The function Provider(void) is responsible for providing each process's PID to the Injector function, then the Injector function will:
- Open the PID via a call to OpenProcess
- Using the handle it will suspend the process, ready for injection
- It will then write the callback into the process memory space
- Then will create a char array of machine code (JMP ---) then will annotate the remote callback address on to the char array.
- The char array will be then written on KiFastSystemCall address,
We have detoured KiFastSystemCall, the uses of such detours are endless:
- Proactive AV scanning
- Complete Control over system
- Helpful Debugging Information
The Code Metrics:
Line Count: 105 Lines
Size: 3.05 KB (3,125 bytes)