Hello,
I'm researching the subject of process injection to create my own code injection library.
This is the method I currently use:
* CreateProcessInternalW - to start process in SUSPENDED state.
* NtMapViewOfSection - for injecting the code into created process.
* NtQueueApcThread - to queue the APC with injected code entrypoint for launch
* NtResumeThread - to start the suspended process
There are also other methods I know of:
* NtGetContextThread/NtSetContextThread - to change the EIP in target process.
* NtGetContextThread/NtSetContextThread - to change EAX in target process (EAX points to module entry point in RtlUserThreadStart) [won't work on XP I believe]
* NtWriteVirtualMemory - to insert a JMP instruction at EIP.
Other interesting method that I read about used by malware is here: http://www.malwaretech.com/2013/08/powe ... truly.html
This one I believe will only work on explorer.exe process that is currently running though.
Are there any other methods that I'm not yet aware of?
Is it possible to monitor and catch these injection methods from kernel-mode without using SSDT hooks (especially the NtQueueApcThread method)?
I'm researching the subject of process injection to create my own code injection library.
This is the method I currently use:
* CreateProcessInternalW - to start process in SUSPENDED state.
* NtMapViewOfSection - for injecting the code into created process.
* NtQueueApcThread - to queue the APC with injected code entrypoint for launch
* NtResumeThread - to start the suspended process
There are also other methods I know of:
* NtGetContextThread/NtSetContextThread - to change the EIP in target process.
* NtGetContextThread/NtSetContextThread - to change EAX in target process (EAX points to module entry point in RtlUserThreadStart) [won't work on XP I believe]
* NtWriteVirtualMemory - to insert a JMP instruction at EIP.
Other interesting method that I read about used by malware is here: http://www.malwaretech.com/2013/08/powe ... truly.html
This one I believe will only work on explorer.exe process that is currently running though.
Are there any other methods that I'm not yet aware of?
Is it possible to monitor and catch these injection methods from kernel-mode without using SSDT hooks (especially the NtQueueApcThread method)?