Skip to content

一步到达 OEP 法

Warning

The current page still doesn't have a translation for this language.

You can read it through Google Translate.

Besides, you can also help to translate it: Contributing.

所谓的一步到达 OEP 的脱壳方法, 是根据所脱壳的特征, 寻找其距离 OEP 最近的一处汇编指令, 然后下 int3 断点, 在程序走到 OEP 的时候 dump 程序.

如一些压缩壳往往 popad 指令距离 OEP 或者大 jmp 特别近, 因此使用 Ollydbg 的搜索功能, 可以搜索壳的特征汇编代码, 达到一步断点到达 OEP 的效果.

要点

  1. ctrl+f 查找 popad
  2. ctrl+l 跳转到下一个匹配处
  3. 找到匹配处, 确认是壳解压完毕即将跳转到 OEP 部分, 则设下断点运行到该处
  4. 只适用于极少数压缩壳

示例

示例程序可以点击此处下载: 3_direct2oep.zip

还是用的原先的 notepad.exe 来示例, 用Ollydbg打开后, 我们按下ctrl+f来查找指定的字符串, 像popad是典型的一个特征, 有部分壳它就常用popad来恢复状态, 所以如下图所示来搜索popad.

direct2oep_01.png

在本例中, 当搜索到的popad不符合我们的要求时, 可以按下ctrl+l来搜索下一个匹配处, 大概按下个三四次, 我们找到了跳转到 OEP 的位置处.

direct2oep_02.png