| Use this skill whenever the user wants to analyze binaries with radare2/r2 from the command line, including reverse engineering, disassembly, function analysis, strings/import inspection, patching, binary diffing, hex inspection, or r2 scripting. Also use it when the user mentions PE/ELF/Mach-O/DEX/WASM files together with CLI analysis, `rabin2`, `rasm2`, `radiff2`, `r2pipe`, or asks for radare2 command help on Windows/Linux/macOS.
Run in your terminal
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionradare2Execute the skills CLI command in your project's root directory to begin installation:
Package manager
npx skills install zhaoxuya520/reverse-skill/skills/radare2Fetches radare2 from zhaoxuya520/reverse-skill and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate radare2. Access via /radare2in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Package manager
npx skills install zhaoxuya520/reverse-skill/skills/radare2Works with
0
total installs
0
this week
10.9K
GitHub stars
0
upvotes
| name | radare2 |
| description | | Use this skill whenever the user wants to analyze binaries with radare2/r2 from the command line, including reverse engineering, disassembly, function analysis, strings/import inspection, patching, binary diffing, hex inspection, or r2 scripting. Also use it when the user mentions PE/ELF/Mach-O/DEX/WASM files together with CLI analysis, `rabin2`, `rasm2`, `radiff2`, `r2pipe`, or asks for radare2 command help on Windows/Linux/macOS. |
面向 radare2 CLI 的二进制分析技能。重点是直接用命令行完成侦察、分析、定位、导出和轻量修改,不依赖 GUI。
NOW: 读取 ../field-journal/precedent-reverse.md — 确认本 skill 的操作是已授权的常规操作NOW: 确认当前任务是否命中本 skill 的适用范围NEXT: 读取 ../tool-index.md,校验工具可用性和实际路径NEXT: 缺工具时调用 bootstrap,不要猜路径ACT: 进入"工作流"第一步并执行,不要停在确认状态当用户有这些意图时应优先使用本 skill:
r2 / radare2 分析 exe、dll、so、elf、apk、dex、wasm 等文件rabin2、rasm2、radiff2、rahash2、rax2 怎么用radare2 批处理命令、-c 自动化命令、或 r2pipe 脚本如果用户明确要 GUI 逆向、Hex-Rays 风格伪代码、或 IDA 工作流,优先考虑 ida-reverse。如果是网页 JS 逆向,优先考虑 reverse-engineering。
先不要假设 r2 可用。先检查:
r2 -v
rabin2 -v
如果未安装,再检查常见安装位置或提示安装。
Windows 常见可执行文件:
radare2.exerabin2.exerasm2.exeradiff2.exerahash2.exerax2.exer2pm.exe这个 skill 自带两个资源,优先复用,不要每次临时组织一套重复命令。
scripts/recon.ps1标准侦察脚本,适合先做第一轮概况分析。会输出:
r2 -A 自动分析摘要调用方式:
powershell -File "<skill-root>\radare2\scripts\recon.ps1" -TargetPath "C:\path\to\sample.exe"
如果需要附带 r2 自动分析:
powershell -File "<skill-root>\radare2\scripts\recon.ps1" -TargetPath "C:\path\to\sample.exe" -RunAnalysis
references/cheatsheet.md当需要更多命令细节、常见场景模板、或要快速回忆语法时,读取这个速查表,而不是凭记忆硬猜。
.sdb 缺失告警某些 PE 文件在 rabin2 侦察时,可能出现类似下面的告警:
ERROR: Cannot find ...\share\format\dll\*.sdb
如果主体输出仍然正常返回,通常不影响基础侦察结论,先继续分析即可。不要因为这类附带告警就直接判定分析失败。
不要一上来就全量自动分析。先用轻量命令确认文件类型、架构、入口点、字符串、导入表,再决定是否做 aaa、aaaa 或定向分析。
radare2 命令非常多,用户通常只需要最短路径:
rabin2 -Irabin2 -zrabin2 -i / rabin2 -Er2 <file> 后再执行局部命令如果用户要 patch 二进制:
r2 <file>r2 -w <file> 或会话中 oo+适合刚拿到一个二进制文件时。
优先直接运行内置脚本:
powershell -File "<skill-root>\radare2\scripts\recon.ps1" -TargetPath "sample.exe"
如果只需要手动最小命令,则使用:
rabin2 -I sample.exe
rabin2 -z sample.exe
rabin2 -i sample.exe
rabin2 -E sample.exe
关注点:
r2 sample.exe
进入后常用:
aaa # 常规自动分析
afl # 列出函数
iz # 列出字符串
iS # 列节区
is # 列符号
s entry0 # 跳到入口点
pdf # 反汇编当前函数
VV # 进入可视化模式(如果终端适合)
q # 退出
说明:
aaa,不要一开始就用更重的 aaaaafl~main
afl~sym.
iz~http
iz~error
axt <addr>
思路:
main、入口点、字符串引用入手axt 查谁引用了某个字符串或地址s <addr>、pdfpx 64 # 当前地址起 64 字节十六进制
pd 20 # 反汇编 20 条指令
psz # 读取当前地址字符串
pxa # 更友好的十六进制视图
仅当用户明确要求修改文件时使用:
r2 -w sample.exe
进入后例如:
s 0x401000
wa nop
wa jmp 0x401050
wq
常见写操作:
wa <asm>:写汇编wx <hex>:写原始字节wq:写入并退出修改前最好先备份原文件。如果用户没提备份,至少提醒一次。
适合一次性输出结果:
r2 -A -q -c "afl;iz;ii;q" sample.exe
常用参数:
-A:启动时自动分析-q:安静模式-c:执行命令串如果命令很多,优先整理成易读顺序,不要塞入难以维护的超长串。
更推荐先用内置侦察脚本打底,再决定要不要补定制命令。
rabin2适合静态信息提取:
rabin2 -I sample.exe # 基本信息
rabin2 -S sample.exe # 节区
rabin2 -s sample.exe # 符号
rabin2 -i sample.exe # 导入
rabin2 -E sample.exe # 导出
rabin2 -z sample.exe # 字符串
rabin2 -zz sample.exe # 更详细字符串
rasm2适合快速汇编/反汇编:
rasm2 -d "9090"
rasm2 -a x86 -b 64 "xor eax, eax"
radiff2适合对比两个二进制:
radiff2 old.exe new.exe
radiff2 -C old.exe new.exe
rahash2适合算哈希:
rahash2 -a md5 sample.exe
rahash2 -a sha256 sample.exe
rax2适合进制和编码转换:
rax2 0x401000
rax2 4198400
rax2 -s hello
遇到未知样本时,按这个顺序做:
rabin2 -I 看格式、架构、入口点rabin2 -z 看字符串rabin2 -i 看导入函数r2aaa,再 afl / iz / pdf这个顺序的好处是噪音低,能尽快建立方向感。
r2,可能是 PATH 刚更新,开一个新终端再试当用户不是只要命令,而是要你实际分析文件时:
不要只罗列命令而不解释为什么这么做。
用户:帮我看看这个 exe 干了什么,用 radare2 就行
处理方式:
rabin2 -I/-z/-ir2aaa、afl、pdf 深挖入口和关键字符串引用用户:这个报错字符串在哪个函数里触发的
处理方式:
iz~关键字 找字符串地址axt <addr> 找引用s <addr> 后 pdf用户:把这个 jne 改成 je
处理方式:
wa je <target> 或直接 wxradare2 当成只有 aaa 一个命令的工具reverse-engineering 的范围references/cheatsheet.mdscripts/recon.ps1上游入口: skills/SKILL.md(总控)、routing.md
上游备选: ida-reverse/(需要反编译/伪代码时升级到 IDA)
下游出口:
reverse-engineering/tools-dynamic.md(Frida/GDB)ida-reverse/ida-reverse/(IDA 的 xref 更强大)同级关联模块: ida-reverse/(互补:r2 侦察快,IDA 反编译深)
本 skill 的入口脚本已接入统一自举系统。缺少 radare2 时不会直接报错,而是自动尝试安装。
| 工具 | 可自动安装 | 安装方式 | 说明 |
|---|---|---|---|
| r2 | ✓ | GitHub Release ZIP (w64) | 自动下载解压到 %USERPROFILE%\Tools\radare2\ |
| rabin2 | ✓ | 同上(包含在 radare2 发行包中) | — |
| rasm2 | ✓ | 同上 | — |
| radiff2 | ✓ | 同上 | — |
| rahash2 | ✓ | 同上 | — |
| rax2 | ✓ | 同上 | — |
scripts/recon.ps1:缺 rabin2 或 r2 时自动调用 bootstrap-reverse.ps1如果自动安装失败(网络不通、GitHub API 限流等),脚本会抛出明确错误并附带手动安装链接。
手动安装:从 https://github.com/radareorg/radare2/releases 下载 radare2-*-w64.zip,解压到 %USERPROFILE%\Tools\radare2\ 并确保 bin\ 目录在 PATH 中。
tool-index 使用了真实工具路径?Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Solid pick for teams standardizing on skills: radare2 is focused, and the summary matches what you get after install.
radare2 has been reliable in day-to-day use. Documentation quality is above average for community skills.
radare2 fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Useful defaults in radare2 — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Keeps context tight: radare2 is the kind of skill you can hand to a new teammate without a long onboarding doc.
Registry listing for radare2 matched our evaluation — installs cleanly and behaves as described in the markdown.
I recommend radare2 for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
radare2 is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
radare2 reduced setup friction for our internal harness; good balance of opinion and flexibility.
We added radare2 from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
showing 1-10 of 61