guibacellar / DNCI

DNCI - Dot Net Code Injector
GNU General Public License v3.0
144 stars 28 forks source link

UNABLE_TO_FIND_INJECTOR_HANDLE #2

Open GH-Rake opened 3 years ago

GH-Rake commented 3 years ago

I had used this project about 6 months ago and it worked perfectly right out of the box and I was very impressed because I did some thorough testing and it worked on every process.

But now I'm trying to use it out of the box and it doesn't work. I compiled right out of the box without any changes.

I am using the examples directly from the readme for DNCI.Injector.Runner.exe and no matter what I do, I get UNABLE_TO_FIND_INJECTOR_HANDLE everytime.

I am running as administrator, I have tried both debug and release builds and I have tried multiple target processes (all x86), including bruteforcing.

UNABLE_TO_FIND_INJECTOR_HANDLE occurs when DNCIClrLoader() fails

It appears to error specifically because WriteLoaderToDisk() writes junk data instead of proper PE file

image

You would expect the first 2 bytes in the rawBytes array to be the MZ header "4D 5A", but it's not, as can be seen in the screenshot.

The same problem with WriteLoaderToDisk() occurs when I make my own injector and use your library.

Any advice? I am very good with C++ but not so much with C#

IncPlusPlus commented 3 years ago

Just tested this myself and I get the same error. It also crashes the application it injects into.

DocTi commented 1 year ago

@IncPlusPlus @GH-Rake Hello! Have you come to a solution to this problem?