Hello Guys,
I'm a bit confused right now and have some security-related questions.
The first on is: How do you guys Hook EndScene?
I have heard of Microsoft Detours, which requires being an injected dll to WoW.exe
This is the first issue in my eyes: Are there alternatives as enumerating through the MemoryModules would unveal my DLL.
I think about hooking Module32Next to and if there is my DLL just Skipping it. Is this a good Idea or are there complete other methods?
The next thing is: When a Process Loads a Library, then every method in the DLL is load into the Process Memory? So when I use GetProcAddr() I get the Address where the FunctionPointer lies in Memory? If so, why is it called dynamic linked?
Another Point is: I won't try WoW.exe at first, but hooking MessageBoxA / W in notepad.exe. Is this a good Idea, or are the windows executables somehow special and I should consider writing an own Application?
Also: This kind of hooking only applys to Native Code, right?
Ok now let's say EndScene is hooked. What to do? I heard of spawning an CLR and Run my Bot from there, which not really what I wanted to do.
I don't want my whole Code to be in WoW.exe aswell as an CLR, which is a high security-risk in my eyes as well.
Do I have to keep the DLL in WoW.exe? If so, how would you IPC (Inter-Process-Comunicate)? I am thinking about TCPSockets or rather using Pipes?
Another nice try here would be hooking WindowProc and using WindowMessages (WM) but this is as well good detectable if not hooked first (or latest, however called first).
My thoughts would be: a) Inject DLL (no problem) b) Hook Module32Next (and probably Module32First) c) Hook EndScene d) Open Pipe (maybe communicate PipeName (has to be unique, ofc) using WM_XYZ with the Pipename as Param?)
I'm just wondering if there is no complete other Idea which is on top of that easier and more secure (which Injecting DLL is not).