aresbit/claude-skills/elf-patcher
Claude Code and agent skill by aresbit/claude-skills
- community
Checking that the SKILL.md file is still in the repository.
Patch ELF binaries using C code and linker script magic. Use when modifying Linux binaries by injecting compiled C code into code caves or specific addresses. Alternative to assembly patching for binary modification, reverse engineering payloads, or binary instrumentation tasks. Supports defining symbols at addresses, placing sections at offsets, and cross-platform patch generation.
Install
npx vskill@latest install aresbit/claude-skills/elf-patcherSKILL.md
The same SKILL.md was published earlier as aresbit/claude-skills/elf-patcher.
ELF Patcher with C
Patch ELF binaries using C code and GNU linker features instead of raw assembly.
Quick Start
- Copy templates from
assets/directory - Customize
patch_at,patch_size, and external symbols in linkerscript - Write patch logic in C using
SECTION(".patch.code.*")attribute - Compile:
gcc -c binpatch.c -o binpatch.o -fno-pic -fno-pie -nostdlib - Link:
ld -T binpatch.ld binpatch.o -o patch.bin -nostdlib --oformat binary - Apply:
dd if=patch.bin of=target bs=1 seek=0xADDR conv=notrunc
Core Technique
This method leverages two GNU Linker features:
1. Symbol Definition
Define symbols at specific addresses in linkerscript:
Reference in C:
2. Section Placement
Force sections to specific virtual addresses:
C Code Pattern
Linker Script Pattern
Resources
scripts/
apply_patch.py- Python script to apply binary patch to target file
references/
technique.md- Detailed technical documentation and considerations
assets/
binpatch.c- Template for patch C codebinpatch.ld- Template for linker scriptMakefile- Build automation template
Important Considerations
- PIE binaries: Use
-fno-pic -fno-pieflags for non-PIE code - Size limits:
ASSERTin linkerscript validates patch fits - ABI matching: May need assembly stubs for calling conventions
- External symbols: Set to actual PLT/GOT addresses from target binary
Extensions
This technique enables:
- Other languages (Rust, Zig, Nim) for patch generation
- Cross-platform patches (platform-specific only in linker script)
- PE/Mach-O compatibility
- Embedded dynamic symbol resolvers
Read references/technique.md for full technical details.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingelf-patcher/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aresbit/claude-skills/elf-patcher)