radare2
Lets your agent use the `radare2` tool to analyze computer programs without a graphical interface. It helps understand code, locate functions, and make small modifications.
What it does
This tool helps analyze program files (executables) directly from the terminal, without needing visual programs. It allows you to see the code, find functions, and make small modifications.
When to use it
- ✓When you need to quickly analyze a program via the terminal.
- ✓To view a program's code in detail.
- ✓To make small fixes or changes to a program.
Example of what to ask your AI
“Analyze the file 'my_program.exe' and show me the main functions.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
It uses text commands to explore the program. You type a command, and the tool shows information like the code, functions, or text within the program.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill radare2Or download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/radare2/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Supporting material availability
This catalog copy contains the inline guidance below, but does not include the following supporting paths. They are external prerequisites, not bundled files:
<support-root>/scripts/recon.ps1reverse-engineering/references/re-agent-workflow.md
Obtain the required material from the declared upstream source, or from a user-provided installation of that source. Resolve each path relative to that installation, inspect its contents, and verify any applicable license and execution prerequisites. Do not run a command or claim a referenced procedure was followed until its required file exists. Do not fabricate the missing scripts or treat an unrelated file with the same name as equivalent. Independent steps fully documented here can proceed within the user’s authorized scope; report any dependent step as unavailable.
radare2
When to Use
- Quick terminal-based analysis of a binary without a heavy IDE.
- Scriptable disassembly, diffing, or small binary patches.
面向 radare2 CLI 的二进制分析技能。重点是直接用命令行完成侦察、分析、定位、导出和轻量修改,不依赖 GUI。
适用范围
当用户有这些意图时应优先使用本 skill:
- 要用
r2/radare2分析exe、dll、so、elf、apk、dex、wasm等文件 - 询问
rabin2、rasm2、radiff2、rahash2、rax2怎么用 - 需要命令行反汇编、看函数、看字符串、看导入导出、查交叉引用、做 patch
- 需要写
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
当需要更多命令细节、常见场景模板、或要快速回忆语法时,读取这个速查表,而不是凭记忆硬猜。
已知现象
Windows 下偶发 .sdb 缺失告警
某些 PE 文件在 rabin2 侦察时,可能出现类似下面的告警:
ERROR: Cannot find ...\share\format\dll\*.sdb
如果主体输出仍然正常返回,通常不影响基础侦察结论,先继续分析即可。不要因为这类附带告警就直接判定分析失败。
基本原则
1. 先侦察,后深挖
不要一上来就全量自动分析。先用轻量命令确认文件类型、架构、入口点、字符串、导入表,再决定是否做 aaa、aaaa 或定向分析。
2. 优先最小足够命令
radare2 命令非常多,用户通常只需要最短路径:
- 看文件信息:
rabin2 -I - 看字符串:
rabin2 -z - 看导入导出:
rabin2 -i/rabin2 -E - 交互分析:
r2 <file>后再执行局部命令
3. 修改前保持谨慎
如果用户要 patch 二进制:
- 默认先只读打开:
r2 <file> - 只有在明确需要修改时再用写模式:
r2 -w <file>或会话中oo+ - 修改前先告知风险,避免无意覆盖原文件
常用工作流
工作流 1:快速侦察
适合刚拿到一个二进制文件时。
硬门禁(MUST — 未满足禁止进入工作流 2 及后续)
对 PE/ELF/Mach-O 等含导入表的二进制,MUST 先完成导入表检查并落成 Evidence,再进入函数级分析或动态步骤:
- 执行
rabin2 -i <sample>(或recon.ps1输出中的 imports 段);DLL/SYS 另 MUSTrabin2 -E并记E-exports - 将完整/分类后的导入表结果写入 Evidence(建议 id:
E-imports或E-triage-imports),至少包含:- 复现命令(
repro_command) - 关键导入分类摘要:网络 / 文件 / 加密 / 进程注入 / 注册表 / 其他可疑 API
- 若导入表为空、解析失败或工具报错:仍 MUST 记录失败现象与原始输出为 Evidence,不得静默跳过
- 导入表「过干净」(仅基础 DLL):MUST 注明动态加载嫌疑,SHOULD 转入动态抓 API
- 复现命令(
- .NET 等无传统 IAT:MUST 走等价锚点(dnSpy/IL/元数据摘要)写入同一 Evidence 语义槽,禁止空过
- 加壳样本 IAT 修复:x86 用 ImportREC(或等价)、x64 用 Scylla(或等价)。修复失败 MUST 记
E-iat-repair-fail后转动态 API 断点;禁止在静态 IAT 上无限死磕(见reverse-engineering/references/re-agent-workflow.md§1.2) - 用户明确要求「重做导入表检查 / 重新检查导入表 / 重做 IAT」时:MUST 重做被点名步骤本身(阻塞时先走可行性门闩:说明前提+请确认;强制则标 quality=unreadable),禁止改换为无关步骤冒充完成
未记录导入表(或合法等价锚点 / IAT 失败旁路)Evidence 前:MUST NOT 声称「基础侦察完成」,MUST NOT 进入工作流 2+ 的深挖结论。
优先直接运行内置脚本:
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
关注点:
- 文件格式、位数、架构、平台
- 入口点地址
- 可疑字符串:URL、路径、报错、注册表、命令行参数
- 导入函数:网络、文件、加密、进程注入、注册表操作(MUST 落 Evidence,见上方硬门禁)
工作流 2:交互式分析函数
r2 sample.exe
进入后常用:
aaa # 常规自动分析
afl # 列出函数
iz # 列出字符串
iS # 列节区
is # 列符号
s entry0 # 跳到入口点
pdf # 反汇编当前函数
VV # 进入可视化模式(如果终端适合)
q # 退出
说明:
- 默认优先
aaa,不要一开始就用更重的aaaa - 如果样本很大或分析很慢,可以只分析入口附近,再手动扩展
工作流 3:定位 main / 关键逻辑
afl~main
afl~sym.
iz~http
iz~error
axt <addr>
思路:
- 先从
main、入口点、字符串引用入手
…
FAQ
Do I need to install anything extra?
Yes, you need to have 'radare2' installed on your computer. The tool uses its commands.
What are 'binaries'?
Binaries are the program files that your computer runs, like '.exe' files on Windows.
Can I modify the entire program?
You can make small modifications (patches), but it's not a tool for rewriting an entire program. You need to be careful when modifying.
Details
Original description by the author
Drive the radare2 CLI for binary reconnaissance, disassembly, analysis, function locating, export, and lightweight patching (r2/rabin2/rasm2/radiff2) without a GUI.
Popularity
- GitHub stars
- 48k
- Ranking position
- #3947
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
benchmark-optimization-loop
Has your agent improve something's speed in a measured way. It tests multiple versions and chooses the fastest one that still works correctly.
affaan-m/ECC
change-impact
Helps your agent analyze the impact of code changes before making them. It compares the planned vs. actual results afterward, covering paths, data, tests, and documentation. Useful for risky or system-wide changes.
affaan-m/ECC
click-path-audit
Lets your agent trace all user buttons and interactions to find bugs. It finds issues where functions seem to work alone but fail together. Useful when bugs persist even after debugging.
affaan-m/ECC