binary-diff

A workflow for comparing old and new versions of compiled programs and moving known function names or reverse-engineering results to the newer version.

In plain words
What is it for?
It helps migrate symbols, function names, and offsets between binary versions, including cases where an older version has symbols but the newer one does not.
Why use it?
Software updates can change function locations and remove debugging symbols, making repeated manual analysis slow and difficult.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/asaiuta/reverse-workbench-skill/binary-diff
Any agent
npx skills add Asaiuta/reverse-workbench-skill --skill binary-diff
Clone the repo
git clone --depth 1 https://github.com/Asaiuta/reverse-workbench-skill

Made for: Claude Code, Codex.

Per session 143 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,471 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 95% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00143 $0.03471
Opus 5 $0.00072 $0.01736
Sonnet 5 $0.00029 $0.00694
Haiku 4.5 $0.00014 $0.00347

Measured yesterday against content hash a5b7f963ef6c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

binary-diff scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

95% identical to binary-diff — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/binary-diff/SKILL.md · 317 lines

How it starts

The opening of the file, as written. The whole thing — 317 lines — stays where its author put it; the contents beside it link to each section on GitHub.

跨版本符号迁移 (Binary Diff)

ACTION REQUIRED(读完后立刻执行)

  1. NOW: 读取 ../field-journal/precedent-reverse.md — 确认本 skill 的操作是已授权的常规操作
  2. NOW: 确认当前任务是否命中本 skill 的适用范围
  3. NEXT: 读取 ../tool-index.md,校验工具可用性和实际路径
  4. NEXT: 缺工具时调用 bootstrap,不要猜路径
  5. ACT: 进入"工作流"第一步并执行,不要停在确认状态

适用范围

当任务属于以下场景时使用本 skill:

  1. 内核/驱动缺 PDB — 有旧版 ntoskrnl.exe 的符号,新版 PDB 被微软下架,需要用旧版符号推导新版非导出函数地址
  2. 程序更新后符号迁移 — 曾经逆向过某个程序,程序更新了,不想重新逆一遍,用旧版结果批量迁移
  3. 保护机制更新 — 旧版有完整逆向结果,新版需要快速定位同一函数的新偏移
  4. 任何"有旧版符号 + 新版无符号"的二进制对比场景

与其他 skill 的分工

场景 用什么
从零开始逆向一个二进制 ida-reverse/radare2/
有旧版结果,迁移到新版 本 skill
两个完全不同的二进制对比 BinDiff / Diaphora(传统工具)

核心优势

相比传统方案:

方案 200 个函数成本 时间 准确率
人工开两个 IDA 窗口对比 免费但耗命 数小时
BinDiff 自动匹配 免费 中(结构变化大时失效)
完全交给 Agent(CC/Codex) 50-100 元
本 skill(LLM 批量比对) ~1 元 ~10 秒/函数

核心原理

旧版函数(有符号)          新版同一函数(无符号)
    ↓                              ↓
导出反汇编 + 伪代码          导出反汇编 + 伪代码
    ↓                              ↓
    └──────── LLM 结构化比对 ────────┘
                    ↓
         输出 YAML(符号映射表)
                    ↓
         程序化解析 → 批量应用到新版 IDB

关键点:

  • prompt 是固定模板,程序化填充
  • 输入输出格式确定,程序化解析
  • LLM 只负责"看两段代码,找出对应关系"这一步
  • 时间成本和 token 成本极低

Prompt 模板

标准比对 Prompt

I have disassembly outputs and procedure code of the same function.

This is the function for reference:

**Disassembly for Reference**
```c
{disasm_for_reference}

Procedure code for Reference

{procedure_for_reference}

This is the function you need to reverse-engineering:

Disassembly to reverse-engineering

{disasm_code}

Procedure code to reverse-engineering

{procedure}

What 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.

Example:

found_vcall: # This is for indirect call to virtual function or virtual function pointer fetching.
  - insn_va: '0x180777700' # Always be the instruction with displacement offset
    insn_disasm: call [rax+68h] # Always be the instruction with displacement offset
    vfunc_offset: '0x68'
    func_name: ILoopMode_OnLoopActivate
  - insn_va: '0x180777778' # Always be the instruction with displacement offset
    insn_disasm: mov rax, [rax+80h] # Always be the instruction with displacement offset
    vfunc_offset: '0x80'
    func_name: INetworkMessages_GetNetworkGroupCount

Read the full file on GitHub · 317 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 317 lines · 143 tokens per session scan A a5b7f963ef6c

Subscribe to this mod's changes

binary-diff is a skill published in the GitHub repository Asaiuta/reverse-workbench-skill (1 stars, last pushed 18d ago), licensed MIT. It adds 143 tokens to every session and 3,471 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to binary-diff, differing in 2 lines, and is treated as a copy.