re-patching

re-patching is a skill for Claude Code from dslsdzc/rev-skills. It costs 38 tokens per session (3,925 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 3,925 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.03925
Opus 5 $0.00019 $0.01962
Sonnet 5 $0.00008 $0.00785
Haiku 4.5 $0.00004 $0.00392

Measured 9d ago against content hash fecca46a6751, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 9d 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 · 112 lines

How it starts

The opening of the file, as written. The whole thing — 112 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]],[[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([[platform-tips]] WSL 分支)

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

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

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

  • Linux: apt install rizin / dnf install rizin / pacman -S rizin;macOS: brew install rizin;Windows/WSL: WSL 内 Linux 包
  • 验证: 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.baksha256sum 存档(见坑 1)。

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

Read the full file on GitHub · 112 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. 9d 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 (54 stars, last pushed 14d ago), licensed Apache-2.0. It adds 38 tokens to every session and 3,925 once invoked, about $0.0002 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

Reverse Engineering & Binary Analysis

Binary analysis, assembly interpretation, disassembly, decompilation, firmware RE, and protocol reverse engineering.

Masriyan/Claude-Code-CyberSecurity-Skill · 26 tokens

deobfuscating-powershell-obfuscated-malware

Systematically deobfuscates multi-layer PowerShell malware using AST analysis, dynamic tracing, and tools like PSDecode and PowerDecode to reveal hidden payloads and C2 infrastructure. Use during incident response or malware analysis when a PowerShell script is obfuscated with encoding, string manipulation, or…

Youngmaidainon/Agent-Level-Up · 90 tokens

conducting-malware-incident-response

Respond to malware infections across enterprise endpoints by identifying the malware family, determining infection vectors, assessing spread, and executing containment, analysis, eradication, and recovery procedures aligned to MITRE ATT&CK. Use when responding to a confirmed or suspected malware infection, including…

Youngmaidainon/Agent-Level-Up · 78 tokens

analyzing-golang-malware-with-ghidra

Reverse engineer Go-compiled malware in Ghidra by parsing Go buildinfo and pclntab structures, recovering stripped/obfuscated function names (e.g. via GoResolver), and extracting embedded module/dependency strings and types from Go binaries. Use when analyzing a Go-language malware sample, deobfuscating a…

Youngmaidainon/Agent-Level-Up · 95 tokens

analyzing-network-covert-channels-in-malware

Detect and analyze covert communication channels used by malware, including DNS tunneling, ICMP exfiltration, steganographic HTTP, and other protocol abuse used for C2 and data exfiltration. Use when investigating suspicious DNS/ICMP/HTTP traffic patterns, hunting for hidden C2 channels in network captures, or…

Youngmaidainon/Agent-Level-Up · 90 tokens

analyzing-golang-malware-with-ghidra

Reverse engineer Go-compiled malware using Ghidra with specialized scripts for function recovery, string extraction, and type reconstruction in stripped Go binaries.

Mikaru0Mystic/sectinel · 40 tokens