re-patching

re-patching is a skill for Claude Code from dslsdzc/rev-skills. It costs 38 tokens per session (4,092 once invoked), scanned A, original, Apache-2.0.

A guide for changing a compiled program at the byte or instruction level. A patch replaces selected bytes in a copy of the program to alter a check or another behavior.

In plain words
What is it for?
Use it for authorized testing, research, or CTF work to modify executable behavior, create small patch files, and verify the result under a sandbox.
Why use it?
It provides a controlled way to modify behavior after locating a verification point, while preserving the original file and recording the changed offsets.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it for authorized testing, research, or CTF work to modify executable behavior, create small patch files, and verify the result under a sandbox.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dslsdzc/rev-skills/re-patching
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.

Any agent
npx skills add dslsdzc/rev-skills --skill re-patching
Clone the repo
git clone --depth 1 https://github.com/dslsdzc/rev-skills

Made for: Claude Code.

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 re-patching

README.md
[![agentmods](https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-patching/github.svg)](https://agentmods.dev/skills/dslsdzc/rev-skills/re-patching)
Your own site
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-patching"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-patching/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for re-patching

Your own site · 80×15
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-patching"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-patching.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,092 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
  • NVIDIA SkillSpector pass 7 Sept 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.00038 $0.04092
Opus 5.5 $0.00015 $0.01637
Sonnet 5.5 $0.00008 $0.00818
Haiku 4.5 $0.00004 $0.00409

Measured 1mo ago against content hash 57ef3915c9c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

re-patching 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 1mo 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.

.claude/skills/re-patching/SKILL.md · 113 lines

How it starts

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

补丁制作(字节级 patch / 指令重写)

何时使用 / 何时不用

  • 边界(继承 [[re-cracking]]):仅限自有软件 / 授权测试 / CTF·研究环境;禁止未授权软件解锁与商业软件绕过;先对样本副本操作([[re-ghidra]]/[[re-ida]] 保存副本或导出临时 Program),禁止直接 patch 原始样本破坏证据链
  • 用:已从 [[re-license]] 定位校验点,需要改字节绕过验证 / 修改行为(解锁功能、跳过校验)
  • 用:校验算法不可逆(哈希 / 非对称验签)时替代注册机(见 [[re-keygen]] 坑 1)
  • 用:分发场景(补丁文件小、不改动原始文件分发)
  • 不用:校验点都还没定位(先 [[re-license]])
  • 不用:需要为正版用户生成合法序列号(算法可逆 → 走 [[re-keygen]] 更优雅,不修改目标)
  • 不用:只改内存不落盘(会话级 hook 走 [[re-frida]];调试器内修改不存档不算补丁)
  • 注意:补丁版验证必须在沙箱([[re-sandbox]],[[re-analyze/platform-tips]] 最高原则);修改前备份原文件(见坑 1)

工具准备

十六进制编辑器

  • Linux: apt install hexedit / dnf install hexedit / pacman -S hexedit,验证 hexedit --version(交互式按 F2 保存)
  • Windows: HxD(官方免费下载,便携版免安装);或 010 Editor(商业,模板解析强)
  • macOS: brew install hexedit
  • WSL: WSL 内 Linux 版;跨边界文件编辑用 Windows 侧 HxD([[re-analyze/platform-tips]] WSL 分支)

调试器(按 OS,定位 patch 点 / 确认分支方向)

  • Linux / Wine 下调试 PE: [[re-gdb]] —— apt install gdb,验证 gdb --version;Wine 直读:wine sample.exe 后 gdb -p <pid> attach([[re-analyze/platform-tips]] Linux 分支)
  • Windows: [[re-x64dbg]] —— 官方 release zip,验证:载入样本能单步(attach 需管理员权限,[[re-analyze/platform-tips]] Windows 分支)
  • macOS: [[re-lldb]](brew install lldb);Windows 目标走 Wine + gdb 或 VM
  • 作用:断点确认成功 / 失败分支的真实走向,避免改错分支(见坑 2)

rizin(wx 写字节,命令行 patch 主力)

  • 安装矩阵见 [[re-radare2]](按发行版分布不同:Debian/Ubuntu 发行版仓库无 rizin 包,apt install rizin 会失败,改用官方 release 二进制或 rz-pm)
  • 验证: rizin -v
  • 写字节语法: wx 90 @ 0x401234(把 0x401234 处一个字节写成 0x90)、wx 909090 @ 0x401234(连写三个)

补丁文件工具(导出 diff / patch)

  • rz-diff(rizin 自带,二进制 diff 对比)/ radiff2(radare2 自带,命令兼容)
  • bsdiff / bspatch:Linux apt install bsdiff / macOS brew install bsdiff,验证 bsdiff -h
  • xdelta3:Linux apt install xdelta3,验证 xdelta3 -V
  • Windows 侧:llvm-objdump(LLVM 套件)对比原始字节段

操作步骤

按顺序执行,每步记录结果(原始字节 → 修改字节 → 偏移,证据路径见 [[re-triage]])。修改前 cp sample.exe sample.bak 并 sha256sum 存档(见坑 1)。

  1. 定位 patch 点(失败跳转 → 改 jz / jnz):
    • 从 [[re-license]] 的校验点清单拿地址;反编译确认该点的指令形态:失败跳转(比较后 jz fail / jnz fail)是把校验失败当成立即跳走的分支
    • 动态确认方向(沙箱内):调试器断在该分支,输入错误序列号跑一次,观察跳转与标志位([[re-gdb]] / [[re-x64dbg]])——确认"改哪个条件、跳到哪里"才是绕过(见坑 2)
    • 记录:patch 地址、原始字节、目标形态(如 jz 0x401300 → nop)

Read the full file on GitHub · 113 lines

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. 1mo ago Changed 57ef3915c9c8
  2. 2mo ago Changed · +1 lines 61512b1f024f
  3. 2mo ago First seen · 112 lines · 38 tokens per session scan A fecca46a6751

Subscribe to this mod's changes

re-patching is a skill published in the GitHub repository dslsdzc/rev-skills (275 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 38 tokens to every session and 4,092 once invoked, about $0.0002 per session on Opus 5.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

re-patching compared with skills from other repositories

re-patching next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
re-patchingdslsdzc/rev-skillsSkill2751mo agoApache-2.0A38Claude Code
deobfuscating-powershell-obfuscated-malwareYoungmaidainon/Agent-Level-UpSkill43mo agoMITA90Claude Code, Codex
conducting-malware-incident-responseYoungmaidainon/Agent-Level-UpSkill43mo agoMITA78Claude Code, Codex
analyzing-golang-malware-with-ghidraMikaru0Mystic/sectinelSkill135mo agoApache-2.0A40Claude Code
analyzing-golang-malware-with-ghidraYoungmaidainon/Agent-Level-UpSkill43mo agoMITA95Claude Code, Codex
analyzing-network-covert-channels-in-malwareYoungmaidainon/Agent-Level-UpSkill43mo agoMITA90Claude Code, Codex
analyzing-heap-spray-exploitationYoungmaidainon/Agent-Level-UpSkill43mo agoMITA46Claude Code, Codex