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-pegit 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-pe)<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-format-pe"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-format-pe/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-pe"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-format-pe.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.00068 | $0.04193 |
| Opus 5 | $0.00034 | $0.02096 |
| Sonnet 5 | $0.00014 | $0.00839 |
| Haiku 4.5 | $0.00007 | $0.00419 |
Grade A, and why
re-format-pe 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 10d 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 — 184 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PE 格式解析
何时使用 / 何时不用
- 用:目标是 Windows PE 文件(.exe/.dll/.sys),需要理解结构、找壳特征、定位入口/TLS 回调、映射 RVA 与文件偏移
- 不用:ELF(走 [[re-format-elf]])、Mach-O(走 [[re-format-macho]]);只需函数逻辑(直接反编译技能)
- 不用:只需快速结论(初勘走 [[re-triage]])
工具准备
参考 [[platform-tips]] 平台分支——Windows 目标可静态分析免沙箱,动态执行一律沙箱。
objdump(binutils)
- Linux:
apt install binutils/dnf install binutils/pacman -S binutils - macOS:
brew install binutils(gobjdump) - Windows/WSL: WSL 内 Linux 版
- 验证:
objdump -V - 注意: 对 PE 用
objdump -p/objdump -x(readelf 不解析 PE,属非直接工具——只用于对照 ELF 侧知识)
pefile(Python,推荐主力)
- 全平台:
pip install pefile(Linux/macOS/Windows/WSL 均可) - 验证:
python3 -c "import pefile; print(pefile.__version__)"
CFF Explorer(Windows GUI)
- Windows:
choco install cff-explorer(或从 NTCore 官网下载 Explorer Suite) - 验证: 启动 CFF Explorer 打开样本,能正常显示 Dos Header/Sections 面板
操作步骤
-
e_lfanew 定位 PE 头:
objdump -p sample.exe | head -40 # 看 Magic: 0x10b (PE32) / 0x20b (PE32+) 与入口点import pefile pe = pefile.PE('sample.exe') print("e_lfanew offset:", hex(pe.DOS_HEADER.e_lfanew)) print("PE32" if pe.OPTIONAL_HEADER.Magic == 0x10b else "PE32+") print("EntryPoint RVA:", hex(pe.OPTIONAL_HEADER.AddressOfEntryPoint)) -
节表与 RVA/文件偏移映射:
objdump -h sample.exe # 节名/VMA/文件偏移/大小import pefile pe = pefile.PE('sample.exe') for s in pe.sections: print(s.Name, "VA:", hex(s.VirtualAddress), "raw:", hex(s.PointerToRawData), hex(s.SizeOfRawData), "chars:", hex(s.Characteristics)) print("RVA->offset:", hex(pe.get_offset_from_rva(0x1000))) # RVA 转文件偏移记住: 节内存中的 VirtualAddress 是 RVA,需加 ImageBase 才是 VA;文件偏移由 PointerToRawData 给出。
-
导入表(IAT 大小异常 = 壳特征):
objdump -p sample.exe | grep -A3 -i 'DLL Name'import pefile pe = pefile.PE('sample.exe') for entry in pe.DIRECTORY_ENTRY_IMPORT: names = [i.name for i in entry.imports if i.name] print(entry.dll, "imports:", len(names), names[:5])- 正常程序导入函数较多;仅 1-2 个 DLL、函数极少(如只有 kernel32 的几个)→ 强烈提示加壳/动态解析
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.
- 10d ago First seen · 184 lines · 68 tokens per session scan A e0738312af87
re-format-pe is a skill published in the GitHub repository dslsdzc/rev-skills (50 stars, last pushed 11d ago), licensed Apache-2.0. It adds 68 tokens to every session and 4,193 once invoked, about $0.0003 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
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-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…
Reverse Engineering & Binary Analysis
Binary analysis, assembly interpretation, disassembly, decompilation, firmware RE, and protocol reverse engineering.
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.
reverse-engineering-arm-binaries
Reverse engineers ARM/AArch64 malware by identifying the architecture and instruction set state (ARM/Thumb), parsing ELF/Mach-O ARM headers, and orienting analysis around the ARM calling convention. Activates for requests to reverse ARM binaries, analyze AArch64 malware, or handle ARM/Thumb instruction-set decoding.
reverse-engineering-binaries-with-ghidra
Uses Ghidra to disassemble and decompile a binary, navigate to key routines via imports and strings, annotate decompiled code, and run headless scripts to automate extraction of C2, crypto, and config. Activates for requests to reverse engineer with Ghidra, decompile a binary, or script Ghidra headless analysis.