binary-diff

A binary-diffing workflow for matching functions between two versions of a compiled program. A binary is a program in machine-readable form, and function matching helps transfer earlier reverse-engineering results to a newer version.

In plain words
What is it for?
It is for migrating symbols, function names, and offsets from an older binary to a newer one, including cases involving missing PDB files or updated protection mechanisms.
Why use it?
It reduces the need to repeat the same analysis after a program update, especially when symbols or readable function names are missing.

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/2233admin/reverse-skill-evolver/binary-diff
Any agent
npx skills add 2233admin/reverse-skill-evolver --skill binary-diff
Clone the repo
git clone --depth 1 https://github.com/2233admin/reverse-skill-evolver

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,178 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 94% 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.03178
Opus 5 $0.00072 $0.01589
Sonnet 5 $0.00029 $0.00636
Haiku 4.5 $0.00014 $0.00318

Measured yesterday against content hash ee3394972c22, 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

94% identical to binary-diff — 16 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 · 299 lines

How it starts

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

跨版本符号迁移 (Binary Diff)

适用范围

当任务属于以下场景时使用本 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 · 299 lines

Files

What ships with it

1 file 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 · 299 lines · 143 tokens per session scan A ee3394972c22

Subscribe to this mod's changes

binary-diff is a skill published in the GitHub repository 2233admin/reverse-skill-evolver (13 stars, last pushed 21d ago), licensed MIT. It adds 143 tokens to every session and 3,178 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to binary-diff, differing in 16 lines, and is treated as a copy.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens