Sunday, April 22, 2012

Windows is a drug addict: Windows dll injections and hooking directx part 1


It seems there is a way to create a workaround for memory protection and work in another program's context with your injected dll, i was looking for a DirectX overlay method, there are several methods to do that but for me an dll injection seems the best way to do that.

    We just need to create remote thread that will load our dll, we need to keep everything in propper memory spaces (kernel32.dll and user32.dll must be loaded, we must track the DllLoad function true memory location, create memory on the remote process heap and so on) our dll then executes dll main in the other processes memory space, then add a bit of shared memory communications and you have yourself an interactive directx overlay.

For futher reference i redirect you to an exelent book: Windows via C/C++ by Jeffrey M. Richter
The best internet resource i found on DirectX hooking is located here: DirectX dll injection for DirectX overlay

    Please be aware that this post uses a commercial library that was free for some time: Microsoft Detours, i don't encourage you to download from any links located on this page. I will update you on my progress with overlays soon.

No comments:

Post a Comment