[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EBSH073NATV2KJVKJM1C2N":3,"skill-same:01M7EBSH073NATV2KJVKJM1C2N":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":36,"updatedAt":37,"install":38,"resources":51},"01M7EBSH073NATV2KJVKJM1C2N","binary-diff",null,"Cross-version binary symbol migration: diff updated binaries, recover function names without PDBs, and propagate annotations after software updates using BinDiff-style tooling.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F03-逆向工程\u002Fbinary-diff\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: binary-diff\ndescription: \"Cross-version binary symbol migration: diff updated binaries, recover function names without PDBs, and propagate annotations after software updates using BinDiff-style tooling.\"\nrisk: safe\nsource: \"https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill\"\nsource_repo: \"zhaoxuya520\u002Freverse-skill\"\nsource_type: community\ndate_added: \"2026-08-25\"\nlicense: \"MIT\"\nlicense_source: \"https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill\u002Fblob\u002Fmain\u002FLICENSE\"\n---\n# 跨版本符号迁移 (Binary Diff)\n## When to Use\n\n- A program updated and old annotations\u002Fsymbols must be migrated to the new build.\n- Recovering changed functions between two versions of a stripped binary.\n\n\n## 适用范围\n\n当任务属于以下场景时使用本 skill：\n\n1. **内核\u002F驱动缺 PDB** — 有旧版 ntoskrnl.exe 的符号，新版 PDB 被微软下架，需要用旧版符号推导新版非导出函数地址\n2. **程序更新后符号迁移** — 曾经逆向过某个程序，程序更新了，不想重新逆一遍，用旧版结果批量迁移\n3. **保护机制更新** — 旧版有完整逆向结果，新版需要快速定位同一函数的新偏移\n4. **任何\"有旧版符号 + 新版无符号\"的二进制对比场景**\n\n### 与其他 skill 的分工\n\n| 场景 | 用什么 |\n|------|--------|\n| 从零开始逆向一个二进制 | `ida-reverse\u002F` 或 `radare2\u002F` |\n| 有旧版结果，迁移到新版 | **本 skill** |\n| 两个完全不同的二进制对比 | BinDiff \u002F Diaphora（传统工具） |\n\n### 核心优势\n\n相比传统方案：\n\n| 方案 | 200 个函数成本 | 时间 | 准确率 |\n|------|--------------|------|--------|\n| 人工开两个 IDA 窗口对比 | 免费但耗命 | 数小时 | 高 |\n| BinDiff 自动匹配 | 免费 | 快 | 中（结构变化大时失效） |\n| 完全交给 Agent（CC\u002FCodex） | 50-100 元 | 慢 | 高 |\n| **本 skill（LLM 批量比对）** | **~1 元** | **~10 秒\u002F函数** | **高** |\n\n## 核心原理\n\n```text\n旧版函数（有符号）          新版同一函数（无符号）\n    ↓                              ↓\n导出反汇编 + 伪代码          导出反汇编 + 伪代码\n    ↓                              ↓\n    └──────── LLM 结构化比对 ────────┘\n                    ↓\n         输出 YAML（符号映射表）\n                    ↓\n         程序化解析 → 批量应用到新版 IDB\n```\n\n关键点：\n- prompt 是固定模板，程序化填充\n- 输入输出格式确定，程序化解析\n- LLM 只负责\"看两段代码，找出对应关系\"这一步\n- 时间成本和 token 成本极低\n\n## Prompt 模板\n\n### 标准比对 Prompt\n\n```text\nI have disassembly outputs and procedure code of the same function.\n\nThis is the function for reference:\n\n**Disassembly for Reference**\n```c\n{disasm_for_reference}\n```\n\n**Procedure code for Reference**\n```c\n{procedure_for_reference}\n```\n\nThis is the function you need to reverse-engineering:\n\n**Disassembly to reverse-engineering**\n```c\n{disasm_code}\n```\n\n**Procedure code to reverse-engineering**\n```c\n{procedure}\n```\n\nWhat you need to do is to collect all references to \"{symbol_name_list}\" in the function you need to reverse-engineering and output those references as YAML.\n\nExample:\n```yaml\nfound_vcall: # This is for indirect call to virtual function or virtual function pointer fetching.\n  - insn_va: '0x180777700' # Always be the instruction with displacement offset\n    insn_disasm: call [rax+68h] # Always be the instruction with displacement offset\n    vfunc_offset: '0x68'\n    func_name: ILoopMode_OnLoopActivate\n  - insn_va: '0x180777778' # Always be the instruction with displacement offset\n    insn_disasm: mov rax, [rax+80h] # Always be the instruction with displacement offset\n    vfunc_offset: '0x80'\n    func_name: INetworkMessages_GetNetworkGroupCount\n\nfound_call: # This is for direct call to non-virtual regular function.\n  - insn_va: '0x180888800'\n    insn_disasm: call sub_180999900\n    func_name: CLoopMode_RegisterEventMapInternal\n  - insn_va: '0x180888880'\n    insn_disasm: call sub_180555500\n    func_name: CLoopMode_SetSystemState\n\nfound_funcptr: # This is for non-virtual regular function pointer.\n  - insn_va: '0x180666600' # Must load\u002Freference the function pointer target address\n    insn_disasm: lea rdx, sub_15BC910 # Must load\u002Freference the function pointer target address\n    funcptr_name: CLoopMode_OnClientPollNetworking\n\nfound_gv: # This is for reference to global variable.\n  - insn_va: '0x180444400'\n    insn_disasm: mov rcx, cs:qword_180666600 # Must load\u002Freference the global variable\n    gv_name: g_pNetworkMessages\n  - insn_va: '0x180333300'\n    insn_disasm: lea rax, unk_180222200 # Must load\u002Freference the global variable\n    gv_name: s_EventManager\n\nfound_struct_offset: # This is for reference to struct offset. NOTE THAT virtual function pointer should not be here! virtual function pointer should ALWAYS be in found_vcall !\n  - insn_va: '0x1801BA12A' # Always be the instruction with displacement offset\n    insn_disasm: mov rcx, [r14+58h] # Always be the instruction with displacement offset\n    offset: '0x58'\n    size: 8\n    struct_name: CResourceService\n    member_name: m_pEntitySystem\n```\n\nIf nothing found, output an empty YAML. DO NOT output anything other than the desired YAML. DO NOT collect unrelated symbols.\n```\n\n### 变量说明\n\n| 变量 | 来源 | 说明 |\n|------|------|------|\n| `{disasm_for_reference}` | 旧版 IDA 导出 | 有符号的反汇编 |\n| `{procedure_for_reference}` | 旧版 IDA 导出 | 有符号的伪代码 |\n| `{disasm_code}` | 新版 IDA 导出 | 无符号的反汇编 |\n| `{procedure}` | 新版 IDA 导出 | 无符号的伪代码 |\n| `{symbol_name_list}` | 从旧版提取 | 需要在新版中定位的符号列表 |\n\n## 工作流\n\n### 完整流程\n\n```text\nStep 1: 准备数据\n  - 旧版二进制加载到 IDA（有 PDB\u002F符号）\n  - 新版二进制加载到 IDA（无符号）\n  - 找到两个版本中相同的锚点函数（导出函数、字符串引用等）\n\nStep 2: 批量导出\n  - 从旧版导出：锚点函数的反汇编 + 伪代码（含符号名）\n  - 从新版导出：同一锚点函数的反汇编 + 伪代码（无符号名）\n\nStep 3: LLM 比对\n  - 用 prompt 模板填充数据\n  - 调用 LLM API（推荐：deepseek 量大便宜，超大函数切 gpt）\n  - 解析返回的 YAML\n\nStep 4: 应用结果\n  - 将 YAML 中的符号映射批量应用到新版 IDB\n  - 用 idapro_rename 或 IDAPython 脚本批量重命名\n\nStep 5: 迭代\n  - 第一轮迁移的函数成为新的锚点\n  - 进入这些函数，继续对比内部调用\n  - 重复直到覆盖所有目标函数\n```\n\n### 锚点选择策略\n\n| 锚点类型 | 可靠性 | 说明 |\n|---------|--------|------|\n| 导出函数 | 最高 | 名字不变，地址可能变 |\n| 字符串引用 | 高 | 字符串内容不变，引用位置可能变 |\n| 常量\u002F魔数 | 中 | 特征值不变 |\n| 代码模式 | 中 | 函数结构相似但地址全变 |\n\n### 批量处理建议\n\n- 每次比对 1 个函数（避免 context 爆炸）\n- 中等函数（\u003C200 行）用 deepseek\n- 超大函数（>500 行）切 gpt-4o 或 claude\n- 并发调用提高速度（10-20 并发）\n- 结果缓存，避免重复调用\n\n## 输出格式\n\n### YAML 输出的 5 种符号类型\n\n| 类型 | 含义 | 关键字段 |\n|------|------|---------|\n| `found_vcall` | 虚函数调用（间接 call） | `vfunc_offset`, `func_name` |\n| `found_call` | 直接函数调用 | `insn_va`, `func_name` |\n| `found_funcptr` | 函数指针引用 | `insn_va`, `funcptr_name` |\n| `found_gv` | 全局变量引用 | `insn_va`, `gv_name` |\n| `found_struct_offset` | 结构体偏移引用 | `offset`, `struct_name`, `member_name` |\n\n### 解析后的应用动作\n\n```text\nfound_call → idapro_rename(addr=call_target, name=func_name)\nfound_vcall → idapro_set_comments(addr=insn_va, comment=\"vcall: {func_name} @ +{offset}\")\nfound_funcptr → idapro_rename(addr=funcptr_target, name=funcptr_name)\nfound_gv → idapro_rename(addr=gv_addr, name=gv_name)\nfound_struct_offset → idapro_set_comments(addr=insn_va, comment=\"{struct_name}.{member_name}\")\n```\n\n## 典型场景示例\n\n### 场景 1：ntoskrnl.exe 缺 PDB\n\n```text\n已有：ntoskrnl.exe 10.0.26100.2000 + 完整 PDB\n目标：ntoskrnl.exe 10.0.26100.2605（PDB 被下架）\n需求：定位 PspSetCreateProcessNotifyRoutine 的新地址\n\n步骤：\n1. 两个版本都加载到 IDA\n2. 找到导出函数 PsSetCreateProcessNotifyRoutine（两个版本都有）\n3. 旧版中它调用了 PspSetCreateProcessNotifyRoutine（有符号）\n4. 新版中它调用了 sub_140822108（无符号）\n5. LLM 一眼看出：sub_140822108 = PspSetCreateProcessNotifyRoutine\n6. 批量应用\n```\n\n### 场景 2：应用更新后迁移\n\n```text\n已有：target.exe v1.0 的完整逆向结果（200+ 函数已命名）\n目标：target.exe v1.1（所有符号丢失）\n需求：批量迁移 200 个函数名\n\n步骤：\n1. 从旧版导出所有已命名函数的反汇编+伪代码\n2. 在新版中通过导出函数\u002F字符串找到对应锚点\n3. 批量调用 LLM 比对\n4. 解析 YAML，批量 rename\n5. 迭代深入\n```\n\n## LLM 选择建议\n\n| 模型 | 适合场景 | 成本 | 速度 |\n|------|---------|------|------|\n| DeepSeek V3 | 中小函数（\u003C200 行），批量处理 | 极低 | 快 |\n| GPT-4o | 超大函数，复杂控制流 | 中 | 快 |\n| Claude Sonnet | 中大函数，需要推理 | 中 | 快 |\n| Claude Opus | 极复杂函数，需要深度理解 | 高 | 慢 |\n\n推荐策略：默认 DeepSeek，遇到 context 超限或结果不准时自动升级。\n\n## 注意事项\n\n- **不要把整个二进制丢给 LLM** — 一次只比对一个函数\n- **锚点必须可靠** — 如果锚点本身就对错了，后续全部白费\n- **结果需要人工抽检** — LLM 不是 100% 准确，关键符号要验证\n- **缓存中间结果** — 避免重复调用浪费 token\n- **注意 context 限制** — 超大函数（>1000 行反汇编）需要拆分或用大 context 模型\n\n---\n\n## 按需自举（On-Demand Bootstrap）\n\n### 工具依赖\n\n| 工具 | 用途 | 可自动安装 |\n|------|------|-----------|\n| IDA Pro | 导出反汇编\u002F伪代码 | ✗（商业软件） |\n| Python | 脚本执行、API 调用 | ✓ |\n| PyYAML | 解析 LLM 返回的 YAML | ✓（pip install pyyaml） |\n| LLM API | 执行比对 | 需要 API key |\n\n### 说明\n\n本 skill 的核心不依赖重型工具安装，主要依赖：\n- IDA Pro 已有（用 `ida-reverse\u002F` skill 管理）\n- Python + requests\u002Fhttpx（调 API）\n- 一个 LLM API endpoint\n\n---\n\n## 路由上下文\n\n**上游入口**: `skills\u002FSKILL.md`（总控）、`routing.md`\n**触发条件**: 有旧版符号\u002F逆向结果，需要迁移到新版本\n**下游出口**:\n- 需要先打开二进制 → `ida-reverse\u002F`\n- 需要快速侦察确认版本差异 → `radare2\u002F`\n\n**同级关联模块**: `ida-reverse\u002F`（数据导出和符号应用都通过 IDA）\n\n\n## 任务完成自检（声称完成前 MUST 通过）\n\n- [ ] 我是否执行了工作流中的每一步（而不是只阅读）？\n- [ ] 我是否基于 `tool-index` 使用了真实工具路径？\n- [ ] 我是否产出了可复现证据（命令\u002F脚本\u002F截图\u002F报告）？\n- [ ] 我是否完成并回写了 RULES 要求的 Checklist 项？\n\n## Limitations\n\n- Diff quality degrades with heavy recompilation or obfuscation between versions.\n- Requires local diff tooling (e.g., BinDiff, Diaphora, radiff2).\n\n> Adapted from [zhaoxuya520\u002Freverse-skill](https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill) (MIT).\n","# 跨版本符号迁移 (Binary Diff)\n## When to Use\n\n- A program updated and old annotations\u002Fsymbols must be migrated to the new build.\n- Recovering changed functions between two versions of a stripped binary.\n\n\n## 适用范围\n\n当任务属于以下场景时使用本 skill：\n\n1. **内核\u002F驱动缺 PDB** — 有旧版 ntoskrnl.exe 的符号，新版 PDB 被微软下架，需要用旧版符号推导新版非导出函数地址\n2. **程序更新后符号迁移** — 曾经逆向过某个程序，程序更新了，不想重新逆一遍，用旧版结果批量迁移\n3. **保护机制更新** — 旧版有完整逆向结果，新版需要快速定位同一函数的新偏移\n4. **任何\"有旧版符号 + 新版无符号\"的二进制对比场景**\n\n### 与其他 skill 的分工\n\n| 场景 | 用什么 |\n|------|--------|\n| 从零开始逆向一个二进制 | `ida-reverse\u002F` 或 `radare2\u002F` |\n| 有旧版结果，迁移到新版 | **本 skill** |\n| 两个完全不同的二进制对比 | BinDiff \u002F Diaphora（传统工具） |\n\n### 核心优势\n\n相比传统方案：\n\n| 方案 | 200 个函数成本 | 时间 | 准确率 |\n|------|--------------|------|--------|\n| 人工开两个 IDA 窗口对比 | 免费但耗命 | 数小时 | 高 |\n| BinDiff 自动匹配 | 免费 | 快 | 中（结构变化大时失效） |\n| 完全交给 Agent（CC\u002FCodex） | 50-100 元 | 慢 | 高 |\n| **本 skill（LLM 批量比对）** | **~1 元** | **~10 秒\u002F函数** | **高** |\n\n## 核心原理\n\n```text\n旧版函数（有符号）          新版同一函数（无符号）\n    ↓                              ↓\n导出反汇编 + 伪代码          导出反汇编 + 伪代码\n    ↓                              ↓\n    └──────── LLM 结构化比对 ────────┘\n                    ↓\n         输出 YAML（符号映射表）\n                    ↓\n         程序化解析 → 批量应用到新版 IDB\n```\n\n关键点：\n- prompt 是固定模板，程序化填充\n- 输入输出格式确定，程序化解析\n- LLM 只负责\"看两段代码，找出对应关系\"这一步\n- 时间成本和 token 成本极低\n\n## Prompt 模板\n\n### 标准比对 Prompt\n\n```text\nI have disassembly outputs and procedure code of the same function.\n\nThis is the function for reference:\n\n**Disassembly for Reference**\n```c\n{disasm_for_reference}\n```\n\n**Procedure code for Reference**\n```c\n{procedure_for_reference}\n```\n\nThis is the function you need to reverse-engineering:\n\n**Disassembly to reverse-engineering**\n```c\n{disasm_code}\n```\n\n**Procedure code to reverse-engineering**\n```c\n{procedure}\n```\n\nWhat you need to do is to collect all references to \"{symbol_name_list}\" in the function you need to reverse-engineering and output those references as YAML.\n\nExample:\n```yaml\nfound_vcall: # This is for indirect call to virtual function or virtual function pointer fetching.\n  - insn_va: '0x180777700' # Always be the instruction with displacement offset\n    insn_disasm: call [rax+68h] # Always be the instruction with displacement offset\n    vfunc_offset: '0x68'\n    func_name: ILoopMode_OnLoopActivate\n  - insn_va: '0x180777778' # Always be the instruction with displacement offset\n    insn_disasm: mov rax, [rax+80h] # Always be the instruction with displacement offset\n    vfunc_offset: '0x80'\n    func_name: INetworkMessages_GetNetworkGroupCount\n\nfound_call: # This is for direct call to non-virtual regular function.\n  - insn_va: '0x180888800'\n    insn_disasm: call sub_180999900\n    func_name: CLoopMode_RegisterEventMapInternal\n  - insn_va: '0x180888880'\n    insn_disasm: call sub_180555500\n    func_name: CLoopMode_SetSystemState\n\nfound_funcptr: # This is for non-virtual regular function pointer.\n  - insn_va: '0x180666600' # Must load\u002Freference the function pointer target address\n    insn_disasm: lea rdx, sub_15BC910 # Must load\u002Freference the function pointer target address\n    funcptr_name: CLoopMode_OnClientPollNetworking\n\nfound_gv: # This is for reference to global variable.\n  - insn_va: '0x180444400'\n    insn_disasm: mov rcx, cs:qword_180666600 # Must load\u002Freference the global variable\n    gv_name: g_pNetworkMessages\n  - insn_va: '0x180333300'\n    insn_disasm: lea rax, unk_180222200 # Must load\u002Freference the global variable\n    gv_name: s_EventManager\n\nfound_struct_offset: # This is for reference to struct offset. NOTE THAT virtual function pointer should not be here! virtual function pointer should ALWAYS be in found_vcall !\n  - insn_va: '0x1801BA12A' # Always be the instruction with displacement offset\n    insn_disasm: mov rcx, [r14+58h] # Always be the instruction with displacement offset\n    offset: '0x58'\n    size: 8\n    struct_name: CResourceService\n    member_name: m_pEntitySystem\n```\n\nIf nothing found, output an empty YAML. DO NOT output anything other than the desired YAML. DO NOT collect unrelated symbols.\n```\n\n### 变量说明\n\n| 变量 | 来源 | 说明 |\n|------|------|------|\n| `{disasm_for_reference}` | 旧版 IDA 导出 | 有符号的反汇编 |\n| `{procedure_for_reference}` | 旧版 IDA 导出 | 有符号的伪代码 |\n| `{disasm_code}` | 新版 IDA 导出 | 无符号的反汇编 |\n| `{procedure}` | 新版 IDA 导出 | 无符号的伪代码 |\n| `{symbol_name_list}` | 从旧版提取 | 需要在新版中定位的符号列表 |\n\n## 工作流\n\n### 完整流程\n\n```text\nStep 1: 准备数据\n  - 旧版二进制加载到 IDA（有 PDB\u002F符号）\n  - 新版二进制加载到 IDA（无符号）\n  - 找到两个版本中相同的锚点函数（导出函数、字符串引用等）\n\nStep 2: 批量导出\n  - 从旧版导出：锚点函数的反汇编 + 伪代码（含符号名）\n  - 从新版导出：同一锚点函数的反汇编 + 伪代码（无符号名）\n\nStep 3: LLM 比对\n  - 用 prompt 模板填充数据\n  - 调用 LLM API（推荐：deepseek 量大便宜，超大函数切 gpt）\n  - 解析返回的 YAML\n\nStep 4: 应用结果\n  - 将 YAML 中的符号映射批量应用到新版 IDB\n  - 用 idapro_rename 或 IDAPython 脚本批量重命名\n\nStep 5: 迭代\n  - 第一轮迁移的函数成为新的锚点\n  - 进入这些函数，继续对比内部调用\n  - 重复直到覆盖所有目标函数\n```\n\n### 锚点选择策略\n\n| 锚点类型 | 可靠性 | 说明 |\n|---------|--------|------|\n| 导出函数 | 最高 | 名字不变，地址可能变 |\n| 字符串引用 | 高 | 字符串内容不变，引用位置可能变 |\n| 常量\u002F魔数 | 中 | 特征值不变 |\n| 代码模式 | 中 | 函数结构相似但地址全变 |\n\n### 批量处理建议\n\n- 每次比对 1 个函数（避免 context 爆炸）\n- 中等函数（\u003C200 行）用 deepseek\n- 超大函数（>500 行）切 gpt-4o 或 claude\n- 并发调用提高速度（10-20 并发）\n- 结果缓存，避免重复调用\n\n## 输出格式\n\n### YAML 输出的 5 种符号类型\n\n| 类型 | 含义 | 关键字段 |\n|------|------|---------|\n| `found_vcall` | 虚函数调用（间接 call） | `vfunc_offset`, `func_name` |\n| `found_call` | 直接函数调用 | `insn_va`, `func_name` |\n| `found_funcptr` | 函数指针引用 | `insn_va`, `funcptr_name` |\n| `found_gv` | 全局变量引用 | `insn_va`, `gv_name` |\n| `found_struct_offset` | 结构体偏移引用 | `offset`, `struct_name`, `member_name` |\n\n### 解析后的应用动作\n\n```text\nfound_call → idapro_rename(addr=call_target, name=func_name)\nfound_vcall → idapro_set_comments(addr=insn_va, comment=\"vcall: {func_name} @ +{offset}\")\nfound_funcptr → idapro_rename(addr=funcptr_target, name=funcptr_name)\nfound_gv → idapro_rename(addr=gv_addr, name=gv_name)\nfound_struct_offset → idapro_set_comments(addr=insn_va, comment=\"{struct_name}.{member_name}\")\n```\n\n## 典型场景示例\n\n### 场景 1：ntoskrnl.exe 缺 PDB\n\n```text\n已有：ntoskrnl.exe 10.0.26100.2000 + 完整 PDB\n目标：ntoskrnl.exe 10.0.26100.2605（PDB 被下架）\n需求：定位 PspSetCreateProcessNotifyRoutine 的新地址\n\n步骤：\n1. 两个版本都加载到 IDA\n2. 找到导出函数 PsSetCreateProcessNotifyRoutine（两个版本都有）\n3. 旧版中它调用了 PspSetCreateProcessNotifyRoutine（有符号）\n4. 新版中它调用了 sub_140822108（无符号）\n5. LLM 一眼看出：sub_140822108 = PspSetCreateProcessNotifyRoutine\n6. 批量应用\n```\n\n### 场景 2：应用更新后迁移\n\n```text\n已有：target.exe v1.0 的完整逆向结果（200+ 函数已命名）\n目标：target.exe v1.1（所有符号丢失）\n需求：批量迁移 200 个函数名\n\n步骤：\n1. 从旧版导出所有已命名函数的反汇编+伪代码\n2. 在新版中通过导出函数\u002F字符串找到对应锚点\n3. 批量调用 LLM 比对\n4. 解析 YAML，批量 rename\n5. 迭代深入\n```\n\n## LLM 选择建议\n\n| 模型 | 适合场景 | 成本 | 速度 |\n|------|---------|------|------|\n| DeepSeek V3 | 中小函数（\u003C200 行），批量处理 | 极低 | 快 |\n| GPT-4o | 超大函数，复杂控制流 | 中 | 快 |\n| Claude Sonnet | 中大函数，需要推理 | 中 | 快 |\n| Claude Opus | 极复杂函数，需要深度理解 | 高 | 慢 |\n\n推荐策略：默认 DeepSeek，遇到 context 超限或结果不准时自动升级。\n\n## 注意事项\n\n- **不要把整个二进制丢给 LLM** — 一次只比对一个函数\n- **锚点必须可靠** — 如果锚点本身就对错了，后续全部白费\n- **结果需要人工抽检** — LLM 不是 100% 准确，关键符号要验证\n- **缓存中间结果** — 避免重复调用浪费 token\n- **注意 context 限制** — 超大函数（>1000 行反汇编）需要拆分或用大 context 模型\n\n---\n\n## 按需自举（On-Demand Bootstrap）\n\n### 工具依赖\n\n| 工具 | 用途 | 可自动安装 |\n|------|------|-----------|\n| IDA Pro | 导出反汇编\u002F伪代码 | ✗（商业软件） |\n| Python | 脚本执行、API 调用 | ✓ |\n| PyYAML | 解析 LLM 返回的 YAML | ✓（pip install pyyaml） |\n| LLM API | 执行比对 | 需要 API key |\n\n### 说明\n\n本 skill 的核心不依赖重型工具安装，主要依赖：\n- IDA Pro 已有（用 `ida-reverse\u002F` skill 管理）\n- Python + requests\u002Fhttpx（调 API）\n- 一个 LLM API endpoint\n\n---\n\n## 路由上下文\n\n**上游入口**: `skills\u002FSKILL.md`（总控）、`routing.md`\n**触发条件**: 有旧版符号\u002F逆向结果，需要迁移到新版本\n**下游出口**:\n- 需要先打开二进制 → `ida-reverse\u002F`\n- 需要快速侦察确认版本差异 → `radare2\u002F`\n\n**同级关联模块**: `ida-reverse\u002F`（数据导出和符号应用都通过 IDA）\n\n\n## 任务完成自检（声称完成前 MUST 通过）\n\n- [ ] 我是否执行了工作流中的每一步（而不是只阅读）？\n- [ ] 我是否基于 `tool-index` 使用了真实工具路径？\n- [ ] 我是否产出了可复现证据（命令\u002F脚本\u002F截图\u002F报告）？\n- [ ] 我是否完成并回写了 RULES 要求的 Checklist 项？\n\n## Limitations\n\n- Diff quality degrades with heavy recompilation or obfuscation between versions.\n- Requires local diff tooling (e.g., BinDiff, Diaphora, radiff2).\n\n> Adapted from [zhaoxuya520\u002Freverse-skill](https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill) (MIT).\n",{"name":5,"risk":24,"source":25,"license":15,"date_added":26,"description":7,"source_repo":27,"source_type":28,"license_source":29},"safe","https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill","2026-08-25","zhaoxuya520\u002Freverse-skill","community","https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill\u002Fblob\u002Fmain\u002FLICENSE","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","03-逆向工程\u002Fbinary-diff",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill binary-diff",{"tool":44,"command":45},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill binary-diff",{"tool":47,"command":48},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill binary-diff","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F03-逆向工程\u002Fbinary-diff\u002FSKILL.md",true,[52],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fprompt-template.md","REFERENCE","参考文档",4947,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F03-逆向工程\u002Fbinary-diff\u002Freferences\u002Fprompt-template.md",[59,67,72,79,86,93],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":66},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":68,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":66},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":66},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":66},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":66},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":66},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]