Reputation: 1
in my project i injected a DLL(64-bit Windows 10) in to a external process with Manual-map & Thread-hijacking and i do some stuff in there.
In current state i use "RtlCreateUserThread" to create a new thread and do some extra workload in there to distribute it for better performance.
My question is now... Is it possible to access other threads from the current process (hijack it) and add your own workload/code there. Without creating a new thread?
I didn't found anything helpful yet in the internet and the code i used and modified for Thread-hijacking seems to only work for a DLL file. Because i am pretty new to C++ i am still learning i am already thankful for any help.
(If you want to see the source for injector Google GHInjector your find the library on github.)
Upvotes: 0
Views: 350
Reputation: 322
It is possible, but so complicated and may not work in all cases. You need to splice existing thread's machine codes, so you will need write access to code page memory. Logic:
This method may work only once because no guarantees that application code is executed in loop.
Upvotes: 0