Re imports

From dslsdzc/rev-skills · View interactive version

Re imports is an AI agent skill from the GitHub repository dslsdzc/rev-skills. 导入导出表与库指纹:IAT/EAT、DLL/so 指纹、FLIRT 思路。 触发词:导入表、IAT、库指纹、链接了哪些库

How to use this skill

Skill file

导入导出表与库指纹

何时使用 / 何时不用

工具准备

参考 [[re-analyze/platform-tips]]——导入表分析为静态步骤,免沙箱;涉及运行(验证动态解析 API)按最高原则进沙箱。

objdump / readelf(binutils)

pefile(Python)

rizin / rz-bin

Ghidra FLIRT 插件(ghidra_flirt)

操作步骤

  1. 列出导入函数:

```sh

objdump -p sample.exe | grep 'DLL Name' -A3 | head -30

```

```python

import pefile

pe = pefile.PE('sample.exe')

for e in pe.DIRECTORY_ENTRY_IMPORT:

print(e.dll, [i.name for i in e.imports if i.name][:15])

```

```sh

objdump -T sample | grep UND # 未定义符号 = 导入

readelf -s sample | grep -i ' UND '

```

```sh

otool -L sample # 依赖 dylib 列表

nm -u sample # 未定义符号 = 导入

```

  1. 按导入特征匹配库/编译器(FLIRT 思路):
  1. 定位可疑导入:
  1. 导出表分析(插件/服务类样本):

```sh

objdump -p sample.dll | grep -A30 'Export Table'

```

```python

import pefile

pe = pefile.PE('sample.dll')

for exp in pe.DIRECTORY_ENTRY_EXPORT.symbols:

print(hex(exp.address), exp.name)

```

  1. 对照系统库验证(判断是否系统 API 混入可疑参数):

```sh

strings sample.exe | grep -iE '\.dll|\.so|\.dylib' # 附加库路径线索

```

跨域联合

常见坑与陷阱

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.