1

我必须在很多地方拦截非常大的应用程序的执行。

我可以使用哪些程序来做到这一点?有哪些技术可以解决这个问题?

手动逆向工程和添加钩子可能不是这个问题的最佳解决方案,因为应用程序非常大并且应用程序的某些部分可以在一段时间内更新,我认为使用一些工具或好的实践来解决这个问题我可以更快地做到这一点,任何人知道怎么做吗?

有人帮我吗?

4

4 回答 4

4

看到工具部分已经被覆盖,这里有一些关于技术的东西。

根据您需要挂钩的内容以及是否有保护措施,有几种方法:

  1. 虚拟化二进制文件中的相对调用/jmp 修补:这是最简单的,但如果您无法自动找到对函数的所有引用,这也需要大量工作,由于您的标准,这可能在这种情况下不起作用。

  2. IAT/EAT 挂钩:这用于导入(IAT)和导出(EAT),如果您的目标是一组已知的导入/导出 API 函数,那就太好了。一个很好的例子可以在这里这里找到

  3. Hot-Patching: Windows XP SP2 introduced something called "hot-patching" (used for realtime system function updates), where all its (the WinAPI) functions start with a 'mov edi,edi', allowing a relative jump to be patched into the free space created above every hot-patchable function(one can do it too). this is generally used for programs that checksum there IAT's or have other funny forms of protection, more info can be found here and here

  4. Code-Caving: capturing execution flow by placing redirections in arbitrary code space. see here, here or here

  5. VFT/COM Redirection: basically overwriting entries in a objects virtual function table, useful for OOP/COM based applications. see this

There are a lot of 3rd party libraries, most famous would probably be MS Detours, one can also look at APIHijack or a mini-hook engine.

Ofcourse nothing can substitute for the initial poking you'll need to do with a debugger like ollydbg, but knowing the method your gonna use can drastically short them amount time time spent poking around

于 2010-09-21T11:16:43.727 回答
1

关于你需要做什么的一些细节(例如你如何确定在哪里休息)会很好。根据您的情况,Pin 之类的东西可能会起作用。

于 2010-09-18T00:36:26.153 回答
1

我建议使用Deviare API Hook。这是你可以做你需要的最简单的方法。它有一些 COM 对象,您可以使用这些对象从不同的进程中挂钩应用程序。在您的过程中,您可以获得完整的参数信息,并且可以在任何编程语言中使用它(我使用的是 C#,它的工作原理就像一个魅力)。如果您需要拦截注册表 API,我建议使用 Deviare 来调试您需要拦截的内容,但是您必须制作自己的钩子,否则您会发现性能问题。

于 2010-09-18T22:19:03.810 回答
0

如果您对拦截方法调用感兴趣,可以进行 API Hooking。

或者使用一些反汇编程序,如softice 或ollydbgwin32dasm

于 2010-09-18T17:40:40.387 回答