Agent skill

Diffing Binary Patches

by trilwu in trilwu/secskills

Locate the vulnerability a security patch fixes by diffing the pre- and post-patch binaries — using BinDiff, Diaphora, or ghidriff to find the changed functions, reading the added checks to recover…

MITAuto-check passed

Install Diffing Binary Patches

skills CLI
$ npx skills add trilwu/secskills --skill diffing-binary-patches -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install trilwu/secskills diffing-binary-patches --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/trilwu/secskills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/secskills-core/skills/diffing-binary-patches .claude/skills/diffing-binary-patches && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
diffing-binary-patches
GitHub stars
156
Token cost
~1.9k tokens
SKILL.md length
1,035 words
Files
1
Skills in repo
50
Repo updated
First seen
Licence
MIT

At a glance

Locate the vulnerability a security patch fixes by diffing the pre- and post-patch binaries — using BinDiff, Diaphora, or ghidriff to find the changed functions, reading the added checks to recover…

  • Comparing two versions of a DLL/ELF
  • SKILL.md covers When to Use, When NOT to Use, Get Two Comparable Binaries and Find the Changed Functions, plus 5 more sections
  • Calls curl; reaches defuddle.md
  • Extracting a Microsoft patch from an MSU/MSP for delta comparison

What it does

Diffing Binary Patches is an agent skill from trilwu/secskills. Locate the vulnerability a security patch fixes by diffing the pre- and post-patch binaries — using BinDiff, Diaphora, or ghidriff to find the changed functions, reading the added checks to recover the bug class, and reasoning back to a reachable pre-patch trigger for 1-day analysis. Use when comparing two versions of a DLL/ELF, extracting a Microsoft patch from an MSU/MSP for delta comparison, or turning a vague advisory into the exact code that changed.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Transform Claude Code into your personal security engineer. The licence is MIT.

When your agent uses it

  • Comparing two versions of a DLL/ELF
  • Extracting a Microsoft patch from an MSU/MSP for delta comparison
  • Turning a vague advisory into the exact code that changed

Example prompts

  • “/diffing-binary-patches”

What it can do on your machine

Read from SKILL.md and the folder at commit ca53957. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • defuddle.md

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Diffing Binary Patches loads about 1.9k tokens when it runs. Until then it costs about 121 tokens; SKILL.md has 1,035 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~121
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from trilwu/secskills at commit ca53957, republished under its MIT licence (© trilwu). 1,035 words, ~1,858 tokens.

Download SKILL.mdSave it as .claude/skills/diffing-binary-patches/SKILL.md (or your agent's skills folder).
name
diffing-binary-patches
description
Locate the vulnerability a security patch fixes by diffing the pre- and post-patch binaries — using BinDiff, Diaphora, or ghidriff to find the changed functions, reading the added checks to recover the bug class, and reasoning back to a reachable pre-patch trigger for 1-day analysis. Use when comparing two versions of a DLL/ELF, extracting a Microsoft patch from an MSU/MSP for delta comparison, or turning a vague advisory into the exact code that changed.
verified
2026-08-07

Diffing Binary Patches

A security patch is a description of a vulnerability written in the vendor's own code. Diffing the binary before and after the fix turns a one-line advisory into the exact function, the exact check that was added, and — reasoning backward — the input that reached the bug before the patch. This is the core of 1-day analysis: the fix tells you where to look, the diff tells you what, and the pre-patch reachability tells you how.

When to Use

  • Comparing two versions of the same binary (DLL, ELF, driver) to find what a security update changed
  • Turning a CVE advisory or Patch-Tuesday bulletin into the specific vulnerable code
  • Extracting a Microsoft patch (MSU/MSP/cab, delta-compressed) into a full binary you can diff
  • Assessing whether a "silent" fix in a new release closed a security bug

When NOT to Use

  • Understanding a single binary with no patched counterpart — that is analyzing-binaries.
  • Building the working exploit once the bug and trigger are understood — that is exploiting-memory-corruption (native) or the relevant web skill.
  • Source-level diffs (a GitHub commit, a changelog) — read the source with reviewing-code-changes; binary diffing is for when you only have compiled artifacts.
  • Unpacking a protected binary before it can be diffed — use unpacking-protected-binaries first.

Get Two Comparable Binaries

The diff is only as clean as the inputs. You need the same binary at two versions, same architecture and ideally the same compiler, so the noise is small enough that the security change stands out.

For Microsoft patches this is a step in itself. Since Windows 10, updates ship as forward/reverse delta patches, not whole files — the MSU contains compressed deltas, not the finished DLL. Extract the update (expand the MSU/cab) and apply the delta to your baseline binary to reconstruct the full patched file (the PatchExtract / delta_patch.py approach, driving the msdelta API). Diffing the raw delta or a mismatched baseline produces garbage. For most other software, two release builds or two package versions are directly comparable.

Find the Changed Functions

Run a binary differ and read its results by similarity, not top to bottom:

  • BinDiff (open-source, via BinExport from IDA or Ghidra) matches functions across the two binaries and scores similarity; the interesting functions are the ones that changed slightly — a similarity just below 1.0 — not the ones that are entirely new or gone.
  • Diaphora (IDA) does the same with strong heuristics and a good pseudocode diff view, which matters because you will read decompiler output to understand the change.
  • ghidriff gives a scriptable, Ghidra-based diff when you want headless or CI-style runs.

Expect noise. A compiler change, function reordering, or an unrelated feature inflates the diff; ASLR and address shifts are not real changes. Filter to functions whose logic changed and ignore pure address churn.

Read the Fix, Recover the Bug

The added code is the tell. Most security fixes look like one of a small set of shapes, and each names the bug class:

  • A new bounds or length check before a copy or index → the pre-patch code had an overflow or OOB access on that path.
  • A signedness or integer change (size_t for int, an added overflow check) → an integer bug feeding an allocation or copy.
  • A new null / state check → a use-after-free, a race, or an uninitialized use the check now prevents.
  • A validation of a field, type tag, or length from parsed input → the parser trusted attacker-controlled data.
  • A reordered free / set-to-null after free → a UAF or double-free.

Read the post-patch function to see what is now enforced, then the pre-patch function to confirm the enforcement was absent. That pair is the vulnerability.

Show full SKILL.md (436 more words)Show less

Reason Back to a Trigger

A changed function is a lead, not a finding, until you can reach it. Trace how attacker-controlled input arrives at the pre-patch code: which API, message, file field, or packet reaches the unguarded path, and under what state. If you cannot construct a path from an untrusted input to the changed code, the change may be hardening rather than a reachable bug — say so rather than overclaiming. When the path is real, that reachable trigger is the handoff to exploit development.

Reading External Sources

Fetch public advisories, specifications, and vendor reports as Markdown:

bash
curl -sL "https://defuddle.md/<url>"      # scheme in the path is optional

This strips page boilerplate — roughly 78% fewer tokens on a prose page — and returns the full text rather than a summary, so you can grep it and trust a negative result.

Three things it is not for. Fetch JSON and API responses raw, because readability extraction mangles structured data. Fetch authenticated or JavaScript-rendered pages directly, because it retrieves them anonymously. And never route adversary infrastructure (phishing links, C2, malware hosting), client-owned hosts, or engagement URLs through it — the request leaves your machine to a third party, and for live adversary infrastructure it also tips off the operator.

Some sites block the extractor and return an error blob rather than the page — {"error":"Failed to fetch: 418 I'm a teapot"} from freedesktop.org, for instance. That is the fetch being refused, not the source saying the thing does not exist. Re-fetch the URL directly before drawing any conclusion from it.

Rationalizations to Reject

  • "There are 200 changed functions, this patch is undiffable." Most are compiler and layout noise. Sort by similarity and filter to logic changes; the security fix is usually one to a handful of functions.
  • "I diffed the MSU directly and got nonsense." Windows ships deltas, not whole files. Reconstruct the full patched binary from the delta and your baseline before diffing.
  • "The function changed, so it's the vulnerability." A change is a lead. Without a reachable path from untrusted input to the pre-patch code, you may be looking at hardening. Prove reachability before you claim a bug.
  • "The advisory says RCE, so this is the RCE." Advisories are vague on purpose. Confirm the bug class from the added check, not from the marketing words in the bulletin.
  • "Same bug, so the old exploit works." A fix can change adjacent code, offsets, and object layout. Re-confirm the primitive against the pre-patch build you actually have.

References

  • analyzing-binaries — understanding either binary on its own
  • exploiting-memory-corruption — building the exploit from the recovered bug
  • reviewing-code-changes — when you have source diffs rather than binaries
  • unpacking-protected-binaries — when a binary must be unpacked before diffing

© trilwu, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in secskills-core/skills/diffing-binary-patches of trilwu/secskills.

Open the folder on GitHubat commit ca53957

Compare with similar skills

Diffing Binary Patches next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Diffing Binary Patches compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Diffing Binary Patches this skilltrilwu/secskills156—~1.9kAutomated safety check: PassMIT
Fix Strix Security Findingsusestrix/strix67k—~1.5kAutomated safety check: PassApache-2.0
Fixalirezarezvani/claude-skills28k1 repos~765Automated safety check: PassMIT
Performing Endpoint Vulnerability Remediationmukul975/Anthropic-Cybersecurity-Skills34k—~2.2kAutomated safety check: PassApache-2.0
Performing Vulnerability Scanning With Nessusmukul975/Anthropic-Cybersecurity-Skills34k—~2.8kAutomated safety check: PassApache-2.0
Logic Fix Allsickn33/agentic-awesome-skills47k1 repos~1.3kAutomated safety check: PassMIT

Similar skills

  • Triages findings from a Strix pentest by severity, fixes each root cause with a minimal change, and re-runs Strix to confirm the exploit no longer works.

    67k GitHub stars~1.5k tokensUpdated today
    SecurityAuto-check passed
  • Fix

    alirezarezvani/claude-skills

    Fix failing or flaky Playwright tests. An agent skill from alirezarezvani/claude-skills.

    28k GitHub starsUsed in 1 repo~765 tokens
    Testing & QAAuto-check passed
  • Performing Endpoint Vulnerability Remediation

    mukul975/Anthropic-Cybersecurity-Skills

    Performs vulnerability remediation on endpoints by prioritizing CVEs based on risk scoring, deploying patches, applying configuration changes, and validating fixes.

    34k GitHub stars~2.2k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Performing Vulnerability Scanning With Nessus

    mukul975/Anthropic-Cybersecurity-Skills

    Performs authenticated and unauthenticated vulnerability scanning using Tenable Nessus to identify known vulnerabilities, misconfigurations, default credentials, and missing patches across network…

    34k GitHub stars~2.8k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Logic Fix All

    sickn33/agentic-awesome-skills

    Autonomous repository-wide audit-and-fix pipeline: health → review → locate/explain → fix → diff-verify → iterate until clean.

    47k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Vulnerability Scanning

    sickn33/agentic-awesome-skills

    Scan systems and dependencies for CVEs and security vulnerabilities.

    47k GitHub starsUsed in 1 repo~2.8k tokens
    SecurityAuto-check passed

More from trilwu/secskills

All 50 skills in this repo
  • Audit source code for exploitable vulnerabilities using threat-model-driven review, taint tracing, invariant checking, and variant analysis.

    156 GitHub stars~3.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Perform OSINT, subdomain enumeration, port scanning, web reconnaissance, email harvesting, and cloud asset discovery for initial access.

    156 GitHub stars~3.1k tokensUpdated 1 mo ago
    Auto-check: notes
  • Securing AI Systems

    trilwu/secskills

    Assess and harden LLM applications and agentic systems against prompt injection, tool misuse, excessive agency, memory poisoning, RAG data leakage, and model supply-chain risk, mapped to the OWASP…

    156 GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Analyzing Binaries

    trilwu/secskills

    Reverse engineer compiled binaries, firmware, and mobile app packages using triage, static disassembly, decompilation, and dynamic instrumentation.

    156 GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Analyzing Go Binaries

    trilwu/secskills

    Reverse engineer Go binaries by recovering function names and types from pclntab and moduledata using GoReSym, redress, and IDA/Ghidra Go plugins, and by reading Go's non-standard calling…

    156 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed
  • Analyzing iOS Binaries

    trilwu/secskills

    Analyze iOS applications at the binary level — decrypting FairPlay-protected IPAs with frida-ios-dump or bagbak, inspecting Mach-O load commands, recovering Objective-C headers with class-dump, and…

    156 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Diffing Binary Patches

What does Diffing Binary Patches do?

Locate the vulnerability a security patch fixes by diffing the pre- and post-patch binaries — using BinDiff, Diaphora, or ghidriff to find the changed functions, reading the added checks to recover…. Diffing Binary Patches is an agent skill from trilwu/secskills. Locate the vulnerability a security patch fixes by diffing the pre- and post-patch binaries — using BinDiff, Diaphora, or ghidriff to find the changed functions, reading the added checks to recover the bug class, and reasoning back to a reachable pre-patch trigger for 1-day analysis.

When should I use Diffing Binary Patches?

Diffing Binary Patches fits situations like: comparing two versions of a DLL/ELF; extracting a Microsoft patch from an MSU/MSP for delta comparison; turning a vague advisory into the exact code that changed.

How do I install Diffing Binary Patches in Claude Code?

Run `npx skills add trilwu/secskills --skill diffing-binary-patches -a claude-code`. Or copy the skill folder (secskills-core/skills/diffing-binary-patches in trilwu/secskills) into .claude/skills/diffing-binary-patches in your project. Claude Code loads it when a task matches its description.

How do I install Diffing Binary Patches in Codex?

Run `npx skills add trilwu/secskills --skill diffing-binary-patches -a codex`. Or copy the skill folder (secskills-core/skills/diffing-binary-patches in trilwu/secskills) into .agents/skills/diffing-binary-patches in your project. Codex loads it when a task matches its description.

Can I use Diffing Binary Patches in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add trilwu/secskills --skill diffing-binary-patches -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/diffing-binary-patches, .gemini/skills/diffing-binary-patches, .github/skills/diffing-binary-patches and .opencode/skills/diffing-binary-patches in your project.

What does Diffing Binary Patches need to run?

Going by SKILL.md and its folder, Diffing Binary Patches needs the command-line tools its instructions call (curl).

Does Diffing Binary Patches access the network?

SKILL.md names 1 domain. In commands or code: defuddle.md; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Diffing Binary Patches safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Diffing Binary Patches use?

Diffing Binary Patches is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Diffing Binary Patches use?

About 1.9k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Diffing Binary Patches?

Skills that share tags, products or a category with Diffing Binary Patches: Fix Strix Security Findings (usestrix/strix, 67k stars), Fix (alirezarezvani/claude-skills, 28k stars), Performing Endpoint Vulnerability Remediation (mukul975/Anthropic-Cybersecurity-Skills, 34k stars) and Performing Vulnerability Scanning With Nessus (mukul975/Anthropic-Cybersecurity-Skills, 34k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Diffing Binary Patches?

trilwu (a GitHub user) maintains it in trilwu/secskills, which has 156 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on September 4, 2026.

Source: trilwu/secskills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.