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.
npx skills add dslsdzc/rev-skills --skill re-format-elfgit clone --depth 1 https://github.com/dslsdzc/rev-skillsWrote 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.
[](https://agentmods.dev/skills/dslsdzc/rev-skills/re-format-elf)<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.
<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>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00045 | $0.03810 |
| Opus 5.5 | $0.00018 | $0.01524 |
| Sonnet 5.5 | $0.00009 | $0.00762 |
| Haiku 4.5 | $0.00005 | $0.00381 |
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 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.
How it starts
The opening of the file, as written. The whole thing — 139 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]] 域)
- 不用:只需函数逻辑(直接反编译技能)
工具准备
参考 [[re-analyze/platform-tips]]——ELF 目标多为 Linux 本地分析;跨架构(ARM/MIPS 固件 ELF)可用 QEMU 用户态仿真,静态分析无需沙箱。
readelf(binutils)
- Linux:
apt install binutils/dnf install binutils/pacman -S binutils - macOS:
brew install binutils(greadelf) - 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 elfutils(eu-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/解释器)与修复,分析时先只读
操作步骤
-
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给静态节视图。 -
结构速览(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]]。 -
初始化与终止回调(.init_array / .fini_array):
readelf -S sample | grep -iE 'init_array|fini_array' readelf -a sample | grep -A5 -i 'init_array' objdump -s -j .init_array sample # .init_array 是函数指针数组(数据节),用 -s 打印内容;-d 只反汇编代码节,实际不输出 # 取到指针后逐个 `objdump -d --start-address=<ptr> --stop-address=<ptr+len> sample` 看回调函数两者的执行时机不同,别混为一谈:
.init_array中的函数指针在启动初始化阶段(main 之前)按数组正序执行——初始化/反调试/解密常藏在这里,必须最先查;.fini_array中的指针在退出/dlclose 清理阶段执行、按数组逆序,不紧跟 main(详见坑项)。
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.
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.
- 1mo ago Changed 3fd19308e87d
- 2mo ago Changed · +1 lines f31305aaf32d
- 3mo ago First seen · 138 lines · 45 tokens per session scan A 080b529a3427
re-format-elf is a skill published in the GitHub repository dslsdzc/rev-skills (275 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 45 tokens to every session and 3,810 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-08-30.
re-format-elf compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| re-format-elfdslsdzc/rev-skills | Skill | 275 | 1mo ago | Apache-2.0 | A | 45 | Claude Code |
| deobfuscating-powershell-obfuscated-malwareYoungmaidainon/Agent-Level-Up | Skill | 4 | 3mo ago | MIT | A | 90 | Claude Code, Codex |
| conducting-malware-incident-responseYoungmaidainon/Agent-Level-Up | Skill | 4 | 3mo ago | MIT | A | 78 | Claude Code, Codex |
| analyzing-golang-malware-with-ghidraMikaru0Mystic/sectinel | Skill | 13 | 5mo ago | Apache-2.0 | A | 40 | Claude Code |
| analyzing-golang-malware-with-ghidraYoungmaidainon/Agent-Level-Up | Skill | 4 | 3mo ago | MIT | A | 95 | Claude Code, Codex |
| analyzing-network-covert-channels-in-malwareYoungmaidainon/Agent-Level-Up | Skill | 4 | 3mo ago | MIT | A | 90 | Claude Code, Codex |
| analyzing-heap-spray-exploitationYoungmaidainon/Agent-Level-Up | Skill | 4 | 3mo ago | MIT | A | 46 | Claude Code, Codex |