3 ms·
I am never tired of this shameless plug: our state of the art open source instrumentation engines for Microsoft Windows where you can hook applications without
by wslh 11y ago
I am never tired of this shameless plug: our state of the art open source instrumentation engines for Microsoft Windows where you can hook applications without even knowing about the complexities of hooking. The most programmer friendly is https://github.com/nektra/Deviare2 https://github.com/nektra/Deviare2 while the Microsoft Detours competitor is: https://github.com/nektra/Deviare-InProc https://github.com/nektra/Deviare-InProc
It has an embedded disassembler to smartly hook functions even if they have a jmp in the prologue.
- 05 11y agoYeah but what if they have a branch target in the prologue?
- Keyframe 11y agoYes.
- mxmauro 11y agoWhen the stub for calling the original function is created, most hooking engines assumes the prologue contains the standard "mov edi,edi/push ebp/mov ebp,esp" and it is wrong. If the prologue contains, for e.g., a relative jmp, copying opcodes is not enough. You must convert it to an absolute jump in the generated stub. The same applies to several instructions doing relative/indirect addressing.