Detecting memory access to a process

后端 未结 1 948
清歌不尽
清歌不尽 2021-02-15 12:58

I\'m trying to check if an application tries to manipulate a particular process (for ex. hooks itself to it). I couldn\'t find a proper approach to accomplish this. Is computing

相关标签:
1条回答
  • 2021-02-15 13:36

    Other process can't make hooks in your process, can modify memory but to make hooks this code must be in your address space, this can be done to injecting DLL to your process when is starting (at runtime inject dll is a hard one), you can easy check this by listing DLL's in your process and searching some ReadProcessMemory, WriteProcessMemory, OpenProcess, CallNextHookEx functions calls in their code. To do that get address (GetProcAddress) of function and search value in code (you can add some asm call predictions for that for tight range result).

    You can check what is wrong with your PE file in disk and in memory, when DLL injection at startup time was occurrence then your PE file after was copied to memory from file should be corrupted, after last dll library you should have overwritten debug symbols with additional dll import. This modification can be done on file same as in memory.

    The best method but probably will not easy for you when you are using C# language is obfuscate your code. I think this is a good method because you don't hook something that you don't know how work, because you don't know what hook you must do and where. But for good obfuscate C# code you must find good software for that and probably pay not low price.

    0 讨论(0)
提交回复
热议问题