patch-diff-exploit

patch-diff-exploit is a skill for Claude Code, Codex from zhaoxuya520/reverse-skill. It costs 192 tokens per session (3,872 once invoked), scanned A, original, MIT.

A method for comparing a vulnerable software version with its patched version to work out what security bug was fixed. It is aimed at turning that understanding into a proof of concept, meaning a small demonstration that triggers the bug.

In plain words
What is it for?
Use it to analyse binary patches, identify the bug type, reproduce N-day vulnerabilities, and create proof-of-concept code for authorised research or testing.
Why use it?
It helps when a vendor publishes a patch or CVE but no usable demonstration, making it easier to understand the affected code and assess unpatched systems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is dpkg-deb -x linux-image-5.15.0-101-generic_*.deb ./patched/.

Good fit Use it to analyse binary patches, identify the bug type, reproduce N-day vulnerabilities, and create proof-of-concept code for authorised research or testing.

Compare 6 skills from other repositories ↓
About the project

Reverse Skill is a routing package for AI coding agents that selects appropriate reverse-engineering, penetration-testing, and security-research methods and tools for a given target. It is used for tasks involving APKs, binaries, frontend JavaScript, packet captures, CTF challenges, and authorized penetration testing. Its catalogue add-ons provide the skills and instructions that guide these workflows.

zhaoxuya520/reverse-skill · 34,866 stars · on GitHub

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/zhaoxuya520/reverse-skill
agentmods
npx agentmods add skills/zhaoxuya520/reverse-skill/patch-diff-exploit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for patch-diff-exploit

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhaoxuya520/reverse-skill/patch-diff-exploit.svg)](https://agentmods.dev/skills/zhaoxuya520/reverse-skill/patch-diff-exploit)
Your own site
<a href="https://agentmods.dev/skills/zhaoxuya520/reverse-skill/patch-diff-exploit"><img src="https://agentmods.dev/badge/skills/zhaoxuya520/reverse-skill/patch-diff-exploit.svg" alt="Measured on agentmods" height="20"></a>
Per session 192 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,872 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket warn 2 Aug 2026
  • Snyk fail 2 Aug 2026
How audits are shown
Origin original No closer match found 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.1 $0.00192 $0.03872
Opus 5 $0.00096 $0.01936
Sonnet 5 $0.00038 $0.00774
Haiku 4.5 $0.00019 $0.00387

Measured 3d ago against content hash b010987e9773, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

patch-diff-exploit 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 3d ago.

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

Copies of this mod

4 near-identical copies found in the catalogue:

skills/patch-diff-exploit/SKILL.md · 261 lines

How it starts

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

ACTION REQUIRED(读完后立刻执行)

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

N-day 补丁差分到利用 (Patch Diff Exploit)

适用范围

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

  1. 已知 CVE 但无公开 PoC — 厂商公告写了"修复了 XX 组件的越界写"但没放 PoC,需要从补丁反推
  2. SRC / 红队打 N-day — 目标资产未及时更新,需要把刚发布的补丁差成可用的 1-day 利用
  3. Patch Tuesday 跟进 — 每月第二个周二微软放补丁,需要快速锁定高价值漏洞(Kernel / Win32k / AFD / CLFS)
  4. Linux LTS 补丁分析 — 主线 fix 已合并,但旁支或某发行版 backport 不全,找未修补面
  5. 驱动 / 服务的安全补丁还原 — 显卡驱动、AV 引擎、虚拟化组件等闭源软件的补丁分析

与其他 skill 的分工

场景 用什么
有旧版符号,迁移到新版本帮助分析 binary-diff/
从补丁找漏洞、写 PoC 打补丁前版本 本 skill
写出完整利用链(堆喷、ROP、提权) pwn-chain/
把 1-day 武器化部署到目标网络 pentest-tools/network-attack-defense/
从零逆向一个二进制 ida-reverse/ / radare2/

差别的关键:binary-diff 的目标是让新版可分析(把旧符号搬过来),本 skill 的目标是找出补丁修了什么 bug 然后打补丁前的版本。前者服务防御侧 / 研究侧分析,后者服务攻击侧武器化。

核心原理

patched 二进制 (after)         unpatched 二进制 (before)
        ↓                                  ↓
    导入 IDA/Ghidra              导入 IDA/Ghidra
        ↓                                  ↓
        └──────── BinDiff / ghidriff ──────┘
                        ↓
        函数级 diff(matched / unmatched / changed)
                        ↓
        聚焦 match score 中等的函数(0.5 - 0.9)
                        ↓
        看新增了什么:边界检查 / 锁 / 字段清零 / 整数溢出检查
                        ↓
        反推 bug class:OOB / Race / Info Leak / UAF / Integer Overflow
                        ↓
        在 unpatched 版本上写 PoC 触发
                        ↓
        验证:unpatched 崩 / patched 不崩 → 漏洞确认

补丁修复模式 → 漏洞类型反查:

新增内容 大概率的 bug class
if (a + b < a) / __builtin_add_overflow 整数溢出
KeAcquireSpinLock / mutex_lock 竞争条件 (TOCTOU / double-free)
if (idx >= MAX) / if (len > buf_size) 越界读 / 越界写
RtlZeroMemory / memset(struct, 0, ...) 未初始化内存信息泄漏
InterlockedDecrement + refcount 检查 UAF / 引用计数错误
ProbeForRead / ProbeForWrite 用户态指针未校验
SeAccessCheck / capability 校验 权限校验缺失
删除 / 收紧 IOCTL code 暴露面收敛(看老接口怎么打)

Read the full file on GitHub · 261 lines

Files

What ships with it

3 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. 3d ago First seen · 261 lines · 192 tokens per session scan A b010987e9773

Subscribe to this mod's changes

patch-diff-exploit is a skill published in the GitHub repository zhaoxuya520/reverse-skill (34,866 stars, last pushed 3d ago), licensed MIT. It adds 192 tokens to every session and 3,872 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

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

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 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

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 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