re-rust

re-rust is a skill for Claude Code from dslsdzc/rev-skills. It costs 37 tokens per session (3,374 once invoked), scanned C, original, Apache-2.0.

A guide to reverse-engineering Rust programs from compiled binaries. It explains how to decode Rust symbols, recognise generic code, understand object cleanup, and analyse async code and common Rust libraries.

In plain words
What is it for?
Use it to inspect Rust executables, analyse object lifetimes, recognise Rust libraries, and study suspicious Rust software such as malware.
Why use it?
Rust binaries can contain long encoded names, repeated versions of generic functions, and compiler-generated state machines. This guide helps connect those patterns to the program's likely source structure.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to inspect Rust executables, analyse object lifetimes, recognise Rust libraries, and study suspicious Rust software such as malware.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-rust"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-rust.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,374 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00037 $0.03374
Opus 5 $0.00018 $0.01687
Sonnet 5 $0.00007 $0.00675
Haiku 4.5 $0.00004 $0.00337

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

Security

Grade C, and why

re-rust scanned grade C with 2 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- 推荐 rustup(官方安装器,全平台最新): `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- 推荐 rustup(官方安装器,全平台最新): `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
.claude/skills/re-rust/SKILL.md · 123 lines

How it starts

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

Rust 二进制逆向(符号解译 / monomorphization / 所有权)

何时使用 / 何时不用

  • 用:确认是 Rust 编译的二进制(符号带 _ZN/_RNv 前缀)后,demangle 还原符号;识别泛型实例化(monomorphization)产生的重复代码;通过所有权/析构(drop)模式理解对象生命周期;分析 async/await 状态机与 tokio/serde 等库模式
  • 用:恶意 Rust 样本([[re-malware]] 静态还原——Rust 重写的木马/勒索增多)
  • 不用:非 Rust 原生程序(C/C++/Go 直接 [[re-binary-core]];Go 走 [[re-go]])
  • 不用:确认带壳先走 [[re-anti-analysis]](Rust 二进制普遍无壳,但体积大)
  • 注意:动态步骤默认沙箱([[platform-tips]] 最高原则);静态优先(大型样本原则)

工具准备

参考 [[platform-tips]]——反编译/符号为静态步骤,免沙箱;Rust 二进制通常 1-10MB+,静态定位先行。

Rust 工具链(rustc/cargo——装符号工具用,可选)

  • 推荐 rustup(官方安装器,全平台最新): curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Debian/Ubuntu: apt install rustc cargo(官方包,版本可能滞后);Fedora: dnf install rust cargo;Arch: pacman -S rust
  • macOS: brew install rust;Windows: choco install rust 或 rustup
  • 验证: rustc --version && cargo --version

rustfilt(Rust 符号 demangle,v0 新式 _RNv 必用)

  • Debian/Ubuntu: apt install rustfilt(官方包)
  • 其他发行版无官方包 → 官方安装: cargo install rustfilt
  • 验证: echo '_ZN3foo3barE' | rustfilt 输出 foo::bar

c++filt(legacy _ZN 可解;v0 不行)

  • Linux: binutils 自带(apt install binutils / dnf install binutils / pacman -S binutils
  • macOS: brew install binutils(命令为 g++filt)或 brew install llvmllvm-cxxfilt
  • Windows: WSL 内 Linux 版或 MinGW binutils
  • 验证: c++filt _ZN3foo3barE 输出 foo::bar

Ghidra / IDA(反编译底座,装法见对应技能)

  • Ghidra 11+ 内置 Rust demangler(分析选项 "Demangler Rust",见 [[re-ghidra]])
  • IDA 无内置 → 社区 Rust demangler 插件(如 idarustdemangler),或先 rustfilt 预处理符号表
  • 验证: 反编译器函数名呈可读形式(而非 _ZN.../_RNv... 乱码)

nm / readelf(符号表与节,binutils)

  • 装法同 c++filt(binutils 自带)
  • 验证: nm --version

rustc --emit(编译产物理解,可选)

  • cargo rustc -- --emit=asm / --emit=llvm-ir / --emit=mir:用匹配版本对样本重编译,得到带符号的汇编/IR/MIR,对照理解编译器展开(monomorphization 泛型实例、async 状态机、drop glue 插入点)
  • --emit=link 为默认产物;--emit=metadata 不含代码但含类型/依赖信息
  • 验证: rustc --emit=asm hello.rs 产出 .s 文件

bloaty(体积分析,坑 2 用;安装见 [[re-go]] 工具准备)

  • 用途: bloaty -d symbols sample 按符号统计体积占比(monomorphization 展开体量可观)
  • 验证: bloaty --version

Read the full file on GitHub · 123 lines

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 · 123 lines · 37 tokens per session scan C 4843a92fc626

Subscribe to this mod's changes

re-rust is a skill published in the GitHub repository dslsdzc/rev-skills (54 stars, last pushed 14d ago), licensed Apache-2.0. It adds 37 tokens to every session and 3,374 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

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…

Youngmaidainon/Agent-Level-Up · 95 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.

plurigrid/asi · 40 tokens

analyzing-rust-malware-internals

Analyzes Rust-compiled malware by detecting the Rust toolchain signature, demangling Rust v0/legacy symbol names, and identifying crate dependencies from embedded paths. Activates for requests to analyze Rust malware, demangle Rust symbols, or identify a Rust binary build and its crates.

meltedinhex/analyst-ai-pack · 67 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.

26zl/cybersec-toolkit · 40 tokens

analyzing-golang-malware-with-ghidra

Use when reverse engineer Go-compiled malware using Ghidra with specialized scripts for function recovery, string extraction, and type reconstruction in stripped Go binaries. Use when reverseing engineer go-compiled malware using ghidra with specialized scripts for.

oyi77/1ai-skills · 60 tokens

analyzing-windows-prefetch-with-python

Parse Windows Prefetch (.pf) files with the windowsprefetch Python library to reconstruct application execution history, run counts, and accessed file/volume lists. Use when investigating renamed or masquerading binaries, verifying program execution timelines, or hunting for suspicious execution patterns in incident…

Youngmaidainon/Agent-Level-Up · 66 tokens