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-cpp-abigit 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-cpp-abi)<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-cpp-abi"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-cpp-abi/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-cpp-abi"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-cpp-abi.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.00069 | $0.02018 |
| Opus 5.5 | $0.00028 | $0.00807 |
| Sonnet 5.5 | $0.00014 | $0.00404 |
| Haiku 4.5 | $0.00007 | $0.00202 |
Grade A, and why
re-cpp-abi 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 15d 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 — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.
现代 C++ 逆向(RTTI / 异常 / 虚表)
何时使用 / 何时不用
- 用:RTTI/异常表密集的二进制、反编译结果混乱的 C++ 目标(类层次/虚调用/异常流无法直接读出)
- 不用:C 代码或纯汇编(走 [[re-binary-core]] 通用路径);混淆主导的目标(先 [[re-deobfuscate]])
工具准备
readelf / llvm-objdump(节表与异常表)
- Linux:
apt install binutils llvm/dnf install binutils llvm/pacman -S binutils llvm - macOS:
brew install llvm(binutils 部分 macOS 自带) - Windows: WSL 或 llvm 预编译
- 验证:
readelf --version、llvm-objdump --version
c++filt / undname(mangling 解码)
- Linux/macOS:
c++filt(binutils 自带);Windows:undname(VS 工具链) - 验证:
echo '_ZN3foo3barEv' | c++filt(输出foo::bar())
Ghidra / IDA(反编译底座,脚本化 RTTI 遍历)
- 安装与验证见 [[re-ghidra]] / [[re-ida]] 工具准备
gdb(异常断点,可选)
- 安装与验证见 [[re-gdb]]
操作步骤
按顺序执行,每步产物存档(路径 + sha256,见 [[re-triage]])。
-
ABI 识别:
readelf -s sample | grep -E '_ZN|_ZTV|_ZTI' | head # Itanium(GCC/Clang) strings sample | grep -E '^\?\?_' | head # MSVC- Itanium 特征:
_ZN(函数)、_ZTV(虚表)、_ZTI(RTTI 类型信息) - MSVC 特征:
??_7(vftable)、??_R(RTTI)(strip 后 ??_ 在符号表而非字符串区——补查导入表 __CxxFrameHandler / msvcp 特征辅助判断) - 识别错则后续全部偏——先确认再继续
- Itanium 特征:
-
RTTI 重建(Itanium):
readelf -s sample | grep _ZTI | head # _ZTI<类名> 指向 typeinfo:起始为 vptr(指向 _ZTVN10__cxxabiv1... 类型信息虚表), # 下一 pointer-sized 槽为 __type_name;64 位通常 +0/+8、32 位 +0/+4 # 解析前先定 ELF class / 指针宽度;__si_class_type_info / __vmi_class_type_info 同样按目标 ABI 对齐与字段宽度解析- 结构:
typeinfo→__class_type_info派生链 → 每个类的完整继承路径 - 脚本化:Ghidra/IDA 遍历 _ZTI 引用,重建类继承图(父子关系表)
- 产出:类名 → 继承链映射(写入会话 symbols_known,见 [[re-analyze/analysis-contract]])
- MSVC:
??_R0<类名>TypeDescriptor 符号 +_RTTICompleteObjectLocator(COL)遍历重建继承图
- 结构:
-
虚表恢复:
readelf -s sample | grep _ZTV | head_ZTV<类名>指向 vtable 起点(虚函数指针数组);vtable 前缀两槽位(32 位 8 字节 / 64 位 16 字节):offset to top + typeinfo 指针(Itanium ABI)- 定位 vtable 后:每个槽位的函数地址 → 调用点反推虚方法名(结合步骤 2 的继承图)
- 虚调用(
call *reg)无法静态定名 → 用调用点上下文(参数/返回值使用)缩小候选
-
异常处理表:
readelf -S sample | grep -E 'eh_frame|gcc_except' # ELF:.eh_frame(readelf 不解析 PE,PE 走下方命令) llvm-readobj --coff-unwind-info sample.exe # PE:.pdata/.xdata(或 objdump -h / pefile)- PE:
.pdata的 RUNTIME_FUNCTION(Begin/End/UnwindInfo)→.xdata展开数据 → 异常处理器(__CxxFrameHandler3) - ELF:
.eh_frame的 FDE/CIE → 展开规则与 LSDA(.gcc_except_table)→ 异常处理函数 - 用途:恢复被异常路径打断的控制流、定位析构/清理逻辑(catch 块)
- PE:
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.
- 15d ago Changed · +2 lines b0bf8d3a83c0
- 1mo ago Changed · +1 lines e6b124c59e7b
- 1mo ago First seen · 105 lines · 69 tokens per session scan A 12d862e7ebf8
re-cpp-abi is a skill published in the GitHub repository dslsdzc/rev-skills (186 stars, last pushed 9d ago), licensed Apache-2.0. It adds 69 tokens to every session and 2,018 once invoked, about $0.0003 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.
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…
cpp-pro
Writes, optimizes, and debugs C++ applications using modern C++20/23 features, template metaprogramming, and high-performance systems techniques. Use when building or refactoring C++ code requiring concepts, ranges, coroutines, SIMD optimization, or careful memory management — or when addressing performance…
memory-safety-patterns
Implement memory-safe programming with RAII, ownership, smart pointers, and resource management across Rust, C++, and C. Use when writing safe systems code, managing resources, or preventing memory bugs.
cuda-c-optimization
A guide for improving CUDA C programs, which run computations on NVIDIA GPUs. It covers GPU memory access, thread-block sizing, numerical stability, and debugging.
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.
cpp
Comprehensive C/C++ programming reference covering everything from C11-C23 and C++11-C++23, system programming, CUDA GPU computing, debugging tools, Rust interop, and advanced topics. Use for: C/C++ questions, C/C++ interview preparation, modern language features, RAII/memory management, templates/generics, CUDA…