Injecting C++ DLL

后端 未结 5 1924
余生分开走
余生分开走 2020-12-23 10:36

I know there are various questions and books on this but I can\'t seem to get my C++ DLL injected into any processes.

The code to inject the DLL:

#in         


        
5条回答
  •  再見小時候
    2020-12-23 10:55

    The problem you're likely running into is that the address of LoadLibraryA() in your application might not be the same in the target process, due to ASLR - a technology designed specifically to thwart the activity you're attempting. Modern versions of Windows (Vista+) have this enabled by default for system DLLs

    In order to do what you want, you'll need to implement a proper ThreadProc in your application that loads your DLL, allocate some executable memory (PAGE_EXECUTE) memory in your target process, copy it there, and use this address as your thread start point.

提交回复
热议问题