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.03412 |
| Opus 5 | $0.00023 | $0.01706 |
| Sonnet 5 | $0.00009 | $0.00682 |
| Haiku 4.5 | $0.00005 | $0.00341 |
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.
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 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(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 之前按序执行——初始化/反调试/解密常藏在这里,必须最先查。
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.
- 9d 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 (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.
Other skills, from other repositories
Reverse Engineering & Binary Analysis
Binary analysis, assembly interpretation, disassembly, decompilation, firmware RE, and protocol reverse engineering.
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…
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…
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…
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…
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.