How to find a functions address to hook/detour in an EXE file?

元气小坏坏 提交于 2019-12-04 09:27:05

Sure, just use something like Ollydbg to set a breakpoint, and edit the assembly after the executable has loaded (and finished checking its certificate). To do it permanently is a bit more challenging, but depending on how sophisticated the certificate check is, you might just be able to bypass that bit of code by replacing it with a NOP (no operation).

EDIT: If you're running 64-bit Windows, you might have better luck with Microsoft's own Debugging Tools. I've never used them, so I have no idea how they compare to Ollydbg.

If this is for something that is more than a one time debugging jaunt, look into Microsoft Detours, an API for hooking functions.

you need to get the functions address then insert a jmp at the functions entry point to your procedure and then restore the original proc and then jump back to the original function.

Use EasyHook for that. With that library you can intercept a function with the address.

I acquired my aim with hooking some low-level Windows API functions, not the best solution but it works, Assembler isn't mine...

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!