re-format-elf

re-format-elf is a skill for Claude Code from dslsdzc/rev-skills. It costs 45 tokens per session (3,412 once invoked), scanned A, original, Apache-2.0.

A guide to reading ELF files, the executable and shared-library format commonly used on Linux. It covers headers, program and section tables, dynamic linking areas, and symbols.

In plain words
What is it for?
Use it to inspect executables or shared libraries, examine GOT and PLT linking data, review initialization code, recover symbols, and assess binary properties.
Why use it?
It helps you understand how a Linux binary is loaded and linked without manually piecing together several low-level tables and command-line tools.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to inspect executables or shared libraries, examine GOT and PLT linking data, review initialization code, recover symbols, and assess binary properties.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-format-elf/github.svg)](https://agentmods.dev/skills/dslsdzc/rev-skills/re-format-elf)
Your own site
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-format-elf"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-format-elf/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-format-elf

Your own site · 80×15
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-format-elf"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-format-elf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,412 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.00045 $0.03412
Opus 5 $0.00023 $0.01706
Sonnet 5 $0.00009 $0.00682
Haiku 4.5 $0.00005 $0.00341

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

Security

Grade A, and why

re-format-elf 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-format-elf/SKILL.md · 138 lines

How it starts

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

ELF 格式解析

何时使用 / 何时不用

  • 用:目标是 Linux ELF 可执行文件或 .so 共享库,需要理解结构、看 .init_array、GOT/PLT 与符号、评估安全属性
  • 不用:PE(走 [[re-format-pe]])、Mach-O(走 [[re-format-macho]]);裸二进制固件(非标准 ELF,走 [[re-firmware]] 域)
  • 不用:只需函数逻辑(直接反编译技能)

工具准备

参考 [[platform-tips]]——ELF 目标多为 Linux 本地分析;跨架构(ARM/MIPS 固件 ELF)可用 QEMU 用户态仿真,静态分析无需沙箱。

readelf(binutils)

  • Linux: apt install binutils / dnf install binutils / pacman -S binutils
  • macOS: brew install binutilsgreadelf
  • WSL: Linux 版
  • 验证: readelf --version

objdump(binutils)

  • 同上(macOS 为 gobjdump
  • 验证: objdump -V

elfutils(eu-* 工具族)

  • Linux: apt install elfutils / dnf install elfutils / pacman -S elfutils
  • macOS: brew install elfutilseu-readelf 等)
  • 验证: eu-readelf -h /bin/ls

patchelf(修改 ELF 头/加载器)

  • Linux: apt install patchelf / dnf install patchelf / pacman -S patchelf
  • macOS: brew install patchelf
  • 验证: patchelf --version
  • 用途: 分析辅助(改 RPATH/解释器)与修复,分析时先只读

操作步骤

  1. readelf 三表(ehdr/phdr/shdr)

    readelf -h sample        # ELF 头: Class/Machine/Entry/Type
    readelf -l sample        # program headers(段→装载偏移,动态加载与 GNU_STACK 在这里)
    readelf -S sample        # section headers(节→地址/大小/标志)
    

    三表对照: -h 给入口点,-l 给运行时内存布局,-S 给静态节视图。

  2. 结构速览(ehdr/phdr/shdr 布局):ELF 文件 = 头 + 程序头表 + 节区 + 节头表;64 位下 ehdr 64 字节、phdr 56 字节/条、shdr 64 字节/条。ehdr 关键字段与偏移:

    0x00  e_ident[16]  magic(7F 45 4C 46)+class(0x04:1=32位/2=64位)+data(0x05)+OSABI(0x07)
    0x10  e_type        1=REL 2=EXEC 3=DYN(PIE/so) 4=CORE
    0x12  e_machine     62=x86-64 3=i386 183=AArch64 243=RISC-V 8=MIPS
    0x18  e_entry       入口点
    0x20  e_phoff       程序头表偏移
    0x28  e_shoff       节头表偏移
    0x34  e_ehsize      64(32 位为 52)
    0x38  e_phnum | 0x3A e_shentsize | 0x3C e_shnum | 0x3E e_shstrndx
    

    三表关系: readelf -h 输出的每个字段都能在文件前 64 字节里手工核对(xxd -l 64);程序头描述"哪些文件区段按什么权限/对齐映射到内存",节头描述"文件里的符号/字符串/代码等命名区段"。字段全表与布局图见 [[layout]]。

  3. .init_array / .fini_array(main 之前执行)

    readelf -S sample | grep -i init_array
    readelf -a sample | grep -A5 -i 'init_array'
    objdump -d -j .init_array sample     # 逐条反汇编回调地址
    

    .init_array 中的函数指针在 main 之前按序执行——初始化/反调试/解密常藏在这里,必须最先查。

Read the full file on GitHub · 138 lines

Files

What ships with it

2 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. 9d ago First seen · 138 lines · 45 tokens per session scan A 080b529a3427

Subscribe to this mod's changes

re-format-elf is a skill published in the GitHub repository dslsdzc/rev-skills (50 stars, last pushed 11d ago), licensed Apache-2.0. It adds 45 tokens to every session and 3,412 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-08-30.

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