Re unpack simple

From dslsdzc/rev-skills · View interactive version

Re unpack simple is an AI agent skill from the GitHub repository dslsdzc/rev-skills. 压缩壳脱壳:UPX/ASPack/FSG。触发词:脱壳、unpack、UPX、esp定律、OEP

How to use this skill

Skill file

脱壳:压缩壳(UPX/ASPack/FSG)

何时使用 / 何时不用

工具准备

upx(官方解包主力)

调试器(按 OS)

Scylla(Windows IAT 修复)

操作步骤

按顺序执行,每步记录结果(证据路径 + sha256,见 [[re-triage]]);动手前先按 [[re-triage]] 记录脱壳基线五件套(SHA256 / PE timestamp / EP RVA / section hash / import table),脱壳后逐项对照再判定成败。

  1. 优先官方 / 自动解包(upx -d):

```sh

upx -d sample.exe -o unpacked.exe

file unpacked.exe # 应显示正常 PE 结构;仍报 UPX / 报错 → 失败

sha256sum unpacked.exe

```

upx -d 失败常见原因:文件被修改过(自校验 / 二次加壳)、UPX 版本不兼容。失败则走步骤 2 手动流程。

  1. ESP 定律找 OEP(设断在 pushad 后):

```

(gdb) starti # 停在 EP

(gdb) si # 单步执行 pushad(x86 pushad 压 8 个寄存器)

(gdb) awatch (int)$esp # 对 pushad 后的 ESP 所指地址下硬件观察点(访问即断)

(gdb) continue # 运行,popad 访问该地址时触发

```

  1. 内存断点法(VirtualAlloc 断点):
  1. 转储 OEP(时机:解密完成后,见 [[re-analyze/platform-tips]] 关键经验;默认转储优先):
  1. IAT 修复(Scylla/ImpREC):

跨域联合

常见坑与陷阱

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.