[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71KCKVXGYF33WQD1FXNKZGN":3,"skill-same:01M71KCKVXGYF33WQD1FXNKZGN":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":55,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":72},"01M71KCKVXGYF33WQD1FXNKZGN","radare2",null,"Use this skill whenever the user wants to analyze binaries with radare2\u002Fr2 from the command line, including reverse engineering, disassembly, function analysis, strings\u002Fimport inspection, patching, binary diffing, hex inspection, or r2 scripting. Also use it when the user mentions PE\u002FELF\u002FMach-O\u002FDEX\u002FWASM files together with CLI analysis, `rabin2`, `rasm2`, `radiff2`, `r2pipe`, or asks for radare2 command help on Windows\u002FLinux\u002FmacOS.","coco-research\u002Fcoco","coco-research","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F68911604?v=4","01M71JRE9C4NM4NSZM4JD0BJTB","Coco Research","01M71JREA0ZMR0PMH3CKA99SN1",631,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Freverse-skill\u002Fskills\u002Fradare2\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[5,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"hex","inspection","when","for","reverse","strings","r2","import","line","macos","files","command","analyze","patching","analysis","ELF","disassembly","windows","cli","2026-11-10 10:12:30",false,"---\nname: radare2\ndescription: |\n  Use this skill whenever the user wants to analyze binaries with radare2\u002Fr2 from the command line, including reverse engineering, disassembly, function analysis, strings\u002Fimport inspection, patching, binary diffing, hex inspection, or r2 scripting. Also use it when the user mentions PE\u002FELF\u002FMach-O\u002FDEX\u002FWASM files together with CLI analysis, `rabin2`, `rasm2`, `radiff2`, `r2pipe`, or asks for radare2 command help on Windows\u002FLinux\u002FmacOS.\nuser-invocable: true\n---\n\n# radare2\n\n面向 `radare2` CLI 的二进制分析技能。重点是直接用命令行完成侦察、分析、定位、导出和轻量修改，不依赖 GUI。\n\n## 适用范围\n\n当用户有这些意图时应优先使用本 skill：\n\n- 要用 `r2` \u002F `radare2` 分析 `exe`、`dll`、`so`、`elf`、`apk`、`dex`、`wasm` 等文件\n- 询问 `rabin2`、`rasm2`、`radiff2`、`rahash2`、`rax2` 怎么用\n- 需要命令行反汇编、看函数、看字符串、看导入导出、查交叉引用、做 patch\n- 需要写 `radare2` 批处理命令、`-c` 自动化命令、或 `r2pipe` 脚本\n\n如果用户明确要 GUI 逆向、Hex-Rays 风格伪代码、或 IDA 工作流，优先考虑 `ida-reverse`。如果是网页 JS 逆向，优先考虑 `reverse-engineering`。\n\n## 先做环境确认\n\n先不要假设 `r2` 可用。先检查：\n\n```powershell\nr2 -v\nrabin2 -v\n```\n\n如果未安装，再检查常见安装位置或提示安装。\n\nWindows 常见可执行文件：\n\n- `radare2.exe`\n- `rabin2.exe`\n- `rasm2.exe`\n- `radiff2.exe`\n- `rahash2.exe`\n- `rax2.exe`\n- `r2pm.exe`\n\n## 内置资源\n\n这个 skill 自带两个资源，优先复用，不要每次临时组织一套重复命令。\n\n### `scripts\u002Frecon.ps1`\n\n标准侦察脚本，适合先做第一轮概况分析。会输出：\n\n- 基本信息\n- 节区\n- 导入\n- 导出\n- 字符串\n- 可选的 `r2 -A` 自动分析摘要\n\n调用方式：\n\n```powershell\npowershell -File \"\u003Cskill-root>\\radare2\\scripts\\recon.ps1\" -TargetPath \"C:\\path\\to\\sample.exe\"\n```\n\n如果需要附带 `r2` 自动分析：\n\n```powershell\npowershell -File \"\u003Cskill-root>\\radare2\\scripts\\recon.ps1\" -TargetPath \"C:\\path\\to\\sample.exe\" -RunAnalysis\n```\n\n### `references\u002Fcheatsheet.md`\n\n当需要更多命令细节、常见场景模板、或要快速回忆语法时，读取这个速查表，而不是凭记忆硬猜。\n\n## 已知现象\n\n### Windows 下偶发 `.sdb` 缺失告警\n\n某些 PE 文件在 `rabin2` 侦察时，可能出现类似下面的告警：\n\n```text\nERROR: Cannot find ...\\share\\format\\dll\\*.sdb\n```\n\n如果主体输出仍然正常返回，通常不影响基础侦察结论，先继续分析即可。不要因为这类附带告警就直接判定分析失败。\n\n## 基本原则\n\n### 1. 先侦察，后深挖\n\n不要一上来就全量自动分析。先用轻量命令确认文件类型、架构、入口点、字符串、导入表，再决定是否做 `aaa`、`aaaa` 或定向分析。\n\n### 2. 优先最小足够命令\n\n`radare2` 命令非常多，用户通常只需要最短路径：\n\n- 看文件信息：`rabin2 -I`\n- 看字符串：`rabin2 -z`\n- 看导入导出：`rabin2 -i` \u002F `rabin2 -E`\n- 交互分析：`r2 \u003Cfile>` 后再执行局部命令\n\n### 3. 修改前保持谨慎\n\n如果用户要 patch 二进制：\n\n- 默认先只读打开：`r2 \u003Cfile>`\n- 只有在明确需要修改时再用写模式：`r2 -w \u003Cfile>` 或会话中 `oo+`\n- 修改前先告知风险，避免无意覆盖原文件\n\n## 常用工作流\n\n## 工作流 1：快速侦察\n\n适合刚拿到一个二进制文件时。\n\n### 硬门禁（MUST — 未满足禁止进入工作流 2 及后续）\n\n对 PE\u002FELF\u002FMach-O 等含导入表的二进制，**MUST** 先完成导入表检查并落成 Evidence，再进入函数级分析或动态步骤：\n\n1. 执行 `rabin2 -i \u003Csample>`（或 `recon.ps1` 输出中的 imports 段）；DLL\u002FSYS 另 MUST `rabin2 -E` 并记 `E-exports`\n2. 将完整\u002F分类后的导入表结果写入 Evidence（建议 id：`E-imports` 或 `E-triage-imports`），至少包含：\n   - 复现命令（`repro_command`）\n   - 关键导入分类摘要：网络 \u002F 文件 \u002F 加密 \u002F 进程注入 \u002F 注册表 \u002F 其他可疑 API\n   - 若导入表为空、解析失败或工具报错：仍 MUST 记录失败现象与原始输出为 Evidence，**不得静默跳过**\n   - 导入表「过干净」（仅基础 DLL）：MUST 注明动态加载嫌疑，SHOULD 转入动态抓 API\n3. .NET 等无传统 IAT：MUST 走等价锚点（dnSpy\u002FIL\u002F元数据摘要）写入同一 Evidence 语义槽，禁止空过\n4. 加壳样本 IAT 修复：x86 用 ImportREC（或等价）、x64 用 Scylla（或等价）。修复失败 MUST 记 `E-iat-repair-fail` 后转动态 API 断点；**禁止**在静态 IAT 上无限死磕（见 `reverse-engineering\u002Freferences\u002Fre-agent-workflow.md` §1.2）\n5. 用户明确要求「重做导入表检查 \u002F 重新检查导入表 \u002F 重做 IAT」时：MUST 重做被点名步骤本身（阻塞时先走可行性门闩：说明前提+请确认；强制则标 quality=unreadable），**禁止改换为无关步骤冒充完成**\n\n未记录导入表（或合法等价锚点 \u002F IAT 失败旁路）Evidence 前：MUST NOT 声称「基础侦察完成」，MUST NOT 进入工作流 2+ 的深挖结论。\n\n优先直接运行内置脚本：\n\n```powershell\npowershell -File \"\u003Cskill-root>\\radare2\\scripts\\recon.ps1\" -TargetPath \"sample.exe\"\n```\n\n如果只需要手动最小命令，则使用：\n\n```powershell\nrabin2 -I sample.exe\nrabin2 -z sample.exe\nrabin2 -i sample.exe\nrabin2 -E sample.exe\n```\n\n关注点：\n\n- 文件格式、位数、架构、平台\n- 入口点地址\n- 可疑字符串：URL、路径、报错、注册表、命令行参数\n- 导入函数：网络、文件、加密、进程注入、注册表操作（**MUST 落 Evidence，见上方硬门禁**）\n\n## 工作流 2：交互式分析函数\n\n```powershell\nr2 sample.exe\n```\n\n进入后常用：\n\n```text\naaa          # 常规自动分析\nafl          # 列出函数\niz           # 列出字符串\niS           # 列节区\nis           # 列符号\ns entry0     # 跳到入口点\npdf          # 反汇编当前函数\nVV           # 进入可视化模式（如果终端适合）\nq            # 退出\n```\n\n说明：\n\n- 默认优先 `aaa`，不要一开始就用更重的 `aaaa`\n- 如果样本很大或分析很慢，可以只分析入口附近，再手动扩展\n\n## 工作流 3：定位 main \u002F 关键逻辑\n\n```text\nafl~main\nafl~sym.\niz~http\niz~error\naxt \u003Caddr>\n```\n\n思路：\n\n- 先从 `main`、入口点、字符串引用入手\n- 用 `axt` 查谁引用了某个字符串或地址\n- 找到引用点后再 `s \u003Caddr>`、`pdf`\n\n## 工作流 4：十六进制与内存查看\n\n```text\npx 64        # 当前地址起 64 字节十六进制\npd 20        # 反汇编 20 条指令\npsz          # 读取当前地址字符串\npxa          # 更友好的十六进制视图\n```\n\n## 工作流 5：二进制 patch\n\n仅当用户明确要求修改文件时使用：\n\n```powershell\nr2 -w sample.exe\n```\n\n进入后例如：\n\n```text\ns 0x401000\nwa nop\nwa jmp 0x401050\nwq\n```\n\n常见写操作：\n\n- `wa \u003Casm>`：写汇编\n- `wx \u003Chex>`：写原始字节\n- `wq`：写入并退出\n\n修改前最好先备份原文件。如果用户没提备份，至少提醒一次。\n\n## 工作流 6：非交互自动化\n\n适合一次性输出结果：\n\n```powershell\nr2 -A -q -c \"afl;iz;ii;q\" sample.exe\n```\n\n常用参数：\n\n- `-A`：启动时自动分析\n- `-q`：安静模式\n- `-c`：执行命令串\n\n如果命令很多，优先整理成易读顺序，不要塞入难以维护的超长串。\n\n更推荐先用内置侦察脚本打底，再决定要不要补定制命令。\n\n## 常用子工具\n\n### `rabin2`\n\n适合静态信息提取：\n\n```powershell\nrabin2 -I sample.exe   # 基本信息\nrabin2 -S sample.exe   # 节区\nrabin2 -s sample.exe   # 符号\nrabin2 -i sample.exe   # 导入\nrabin2 -E sample.exe   # 导出\nrabin2 -z sample.exe   # 字符串\nrabin2 -zz sample.exe  # 更详细字符串\n```\n\n### `rasm2`\n\n适合快速汇编\u002F反汇编：\n\n```powershell\nrasm2 -d \"9090\"\nrasm2 -a x86 -b 64 \"xor eax, eax\"\n```\n\n### `radiff2`\n\n适合对比两个二进制：\n\n```powershell\nradiff2 old.exe new.exe\nradiff2 -C old.exe new.exe\n```\n\n### `rahash2`\n\n适合算哈希：\n\n```powershell\nrahash2 -a md5 sample.exe\nrahash2 -a sha256 sample.exe\n```\n\n### `rax2`\n\n适合进制和编码转换：\n\n```powershell\nrax2 0x401000\nrax2 4198400\nrax2 -s hello\n```\n\n## 推荐分析顺序\n\n遇到未知样本时，按这个顺序做：\n\n1. `rabin2 -I` 看格式、架构、入口点\n2. `rabin2 -z` 看字符串\n3. `rabin2 -i` 看导入函数 — **MUST + Evidence（硬门，见工作流 1）**\n4. 如需交互分析，再进 `r2`（仅当步骤 3 的 Evidence 已落盘）\n5. 先 `aaa`，再 `afl` \u002F `iz` \u002F `pdf`\n6. 通过字符串引用、导入调用、入口流程逐步定位关键函数\n\n这个顺序的好处是噪音低，能尽快建立方向感。步骤 3 不是可选优化，是进入深挖前的硬门。\n\n## Windows 注意事项\n\n- 路径里有空格时，命令必须正确加引号\n- 如果当前终端找不到 `r2`，可能是 `PATH` 刚更新，开一个新终端再试\n- 有些样本需要管理员权限读取，但默认不要主动提升权限，除非用户明确需要\n- 对可疑样本做动态调试前，要先确认用户意图，避免误操作\n\n## 输出风格\n\n当用户不是只要命令，而是要你实际分析文件时：\n\n- 先给出侦察结果摘要\n- 再列出关键证据：字符串、导入、函数、地址\n- 最后给出下一步建议或继续深入分析\n\n不要只罗列命令而不解释为什么这么做。\n\n## 典型请求示例\n\n### 示例 1：分析一个 exe\n\n用户：`帮我看看这个 exe 干了什么，用 radare2 就行`\n\n处理方式：\n\n1. 先用 `rabin2 -I\u002F-z\u002F-i`\n2. 判断是否需要进入 `r2`\n3. 用 `aaa`、`afl`、`pdf` 深挖入口和关键字符串引用\n\n### 示例 2：找字符串在哪被调用\n\n用户：`这个报错字符串在哪个函数里触发的`\n\n处理方式：\n\n1. 用 `iz~关键字` 找字符串地址\n2. 用 `axt \u003Caddr>` 找引用\n3. 跳到引用点 `s \u003Caddr>` 后 `pdf`\n\n### 示例 3：改掉跳转\n\n用户：`把这个 jne 改成 je`\n\n处理方式：\n\n1. 先确认目标地址\n2. 明确告知要进入写模式\n3. 用 `wa je \u003Ctarget>` 或直接 `wx`\n4. 修改后再次反汇编验证\n\n## 避免的做法\n\n- 不要把 `radare2` 当成只有 `aaa` 一个命令的工具\n- 不要在未说明风险时直接写模式打开用户文件\n- 不要在还没做基础侦察前就下结论\n- **禁止跳过导入表检查**（`rabin2 -i` \u002F recon imports）：未写入 Evidence 不得进入下一步；用户要求重做导入表时禁止改做其他步骤\n- **禁止 IAT 修复失败后静态死磕**：记 `E-iat-repair-fail` 后转动态；禁止 64 位样本只用 ImportREC\n- 不要把网页 JS 逆向误导到这个 skill；那是 `reverse-engineering` 的范围\n\n## 参考资料\n\n- 命令速查：`references\u002Fcheatsheet.md`\n- 标准侦察脚本：`scripts\u002Frecon.ps1`\n\n## radare2-skills 生态\n\nradare2-skills 项目（radareorg\u002Fradare2-skills）提供了更完整的生态工具和工作流：\n\n- **r2xsql**：SQL 查询二进制导入表 \u002F 字符串 \u002F 函数\n- **r2mcp \u002F r2http**：MCP 工具与 HTTP 状态化命令通道\n- **radius2**：符号执行、符号动态分析\n- **r2pm**：插件管理、扩展\n- **decompiler plugins**：radare2 插件机制\n\n**使用策略**：\n- 当用户提到 `r2xsql`、`r2mcp`、`r2http`、`radius2`、`r2pm`、`rabin2`、`rasm2`、`radiff2`、`rahash2`、`rax2` 时，优先路由到本 skill（radare2\u002FSKILL.md）\n- 这些工具只是生态加速器，**不能绕过**：授权门禁、环境校验、Evidence 导入、写模式确认\n- 给出最小可复现命令示例：\n  - `r2xsql -s \u003Cfile> -q \"SELECT ...\"`\n  - `curl.exe -sS --data-binary 'aaa' http:\u002F\u002F127.0.0.1:9393\u002Fcmd`\n  - `radius2 -p \u003Cbinary> ...`\n  - `r2pm -ci \u003Cplugin>`\n\n本 skill 保持原有硬门禁和证据链完整性，不允许跳过任何授权或 Evidence 步骤。\n\n---\n","# radare2\n\n面向 `radare2` CLI 的二进制分析技能。重点是直接用命令行完成侦察、分析、定位、导出和轻量修改，不依赖 GUI。\n\n## 适用范围\n\n当用户有这些意图时应优先使用本 skill：\n\n- 要用 `r2` \u002F `radare2` 分析 `exe`、`dll`、`so`、`elf`、`apk`、`dex`、`wasm` 等文件\n- 询问 `rabin2`、`rasm2`、`radiff2`、`rahash2`、`rax2` 怎么用\n- 需要命令行反汇编、看函数、看字符串、看导入导出、查交叉引用、做 patch\n- 需要写 `radare2` 批处理命令、`-c` 自动化命令、或 `r2pipe` 脚本\n\n如果用户明确要 GUI 逆向、Hex-Rays 风格伪代码、或 IDA 工作流，优先考虑 `ida-reverse`。如果是网页 JS 逆向，优先考虑 `reverse-engineering`。\n\n## 先做环境确认\n\n先不要假设 `r2` 可用。先检查：\n\n```powershell\nr2 -v\nrabin2 -v\n```\n\n如果未安装，再检查常见安装位置或提示安装。\n\nWindows 常见可执行文件：\n\n- `radare2.exe`\n- `rabin2.exe`\n- `rasm2.exe`\n- `radiff2.exe`\n- `rahash2.exe`\n- `rax2.exe`\n- `r2pm.exe`\n\n## 内置资源\n\n这个 skill 自带两个资源，优先复用，不要每次临时组织一套重复命令。\n\n### `scripts\u002Frecon.ps1`\n\n标准侦察脚本，适合先做第一轮概况分析。会输出：\n\n- 基本信息\n- 节区\n- 导入\n- 导出\n- 字符串\n- 可选的 `r2 -A` 自动分析摘要\n\n调用方式：\n\n```powershell\npowershell -File \"\u003Cskill-root>\\radare2\\scripts\\recon.ps1\" -TargetPath \"C:\\path\\to\\sample.exe\"\n```\n\n如果需要附带 `r2` 自动分析：\n\n```powershell\npowershell -File \"\u003Cskill-root>\\radare2\\scripts\\recon.ps1\" -TargetPath \"C:\\path\\to\\sample.exe\" -RunAnalysis\n```\n\n### `references\u002Fcheatsheet.md`\n\n当需要更多命令细节、常见场景模板、或要快速回忆语法时，读取这个速查表，而不是凭记忆硬猜。\n\n## 已知现象\n\n### Windows 下偶发 `.sdb` 缺失告警\n\n某些 PE 文件在 `rabin2` 侦察时，可能出现类似下面的告警：\n\n```text\nERROR: Cannot find ...\\share\\format\\dll\\*.sdb\n```\n\n如果主体输出仍然正常返回，通常不影响基础侦察结论，先继续分析即可。不要因为这类附带告警就直接判定分析失败。\n\n## 基本原则\n\n### 1. 先侦察，后深挖\n\n不要一上来就全量自动分析。先用轻量命令确认文件类型、架构、入口点、字符串、导入表，再决定是否做 `aaa`、`aaaa` 或定向分析。\n\n### 2. 优先最小足够命令\n\n`radare2` 命令非常多，用户通常只需要最短路径：\n\n- 看文件信息：`rabin2 -I`\n- 看字符串：`rabin2 -z`\n- 看导入导出：`rabin2 -i` \u002F `rabin2 -E`\n- 交互分析：`r2 \u003Cfile>` 后再执行局部命令\n\n### 3. 修改前保持谨慎\n\n如果用户要 patch 二进制：\n\n- 默认先只读打开：`r2 \u003Cfile>`\n- 只有在明确需要修改时再用写模式：`r2 -w \u003Cfile>` 或会话中 `oo+`\n- 修改前先告知风险，避免无意覆盖原文件\n\n## 常用工作流\n\n## 工作流 1：快速侦察\n\n适合刚拿到一个二进制文件时。\n\n### 硬门禁（MUST — 未满足禁止进入工作流 2 及后续）\n\n对 PE\u002FELF\u002FMach-O 等含导入表的二进制，**MUST** 先完成导入表检查并落成 Evidence，再进入函数级分析或动态步骤：\n\n1. 执行 `rabin2 -i \u003Csample>`（或 `recon.ps1` 输出中的 imports 段）；DLL\u002FSYS 另 MUST `rabin2 -E` 并记 `E-exports`\n2. 将完整\u002F分类后的导入表结果写入 Evidence（建议 id：`E-imports` 或 `E-triage-imports`），至少包含：\n   - 复现命令（`repro_command`）\n   - 关键导入分类摘要：网络 \u002F 文件 \u002F 加密 \u002F 进程注入 \u002F 注册表 \u002F 其他可疑 API\n   - 若导入表为空、解析失败或工具报错：仍 MUST 记录失败现象与原始输出为 Evidence，**不得静默跳过**\n   - 导入表「过干净」（仅基础 DLL）：MUST 注明动态加载嫌疑，SHOULD 转入动态抓 API\n3. .NET 等无传统 IAT：MUST 走等价锚点（dnSpy\u002FIL\u002F元数据摘要）写入同一 Evidence 语义槽，禁止空过\n4. 加壳样本 IAT 修复：x86 用 ImportREC（或等价）、x64 用 Scylla（或等价）。修复失败 MUST 记 `E-iat-repair-fail` 后转动态 API 断点；**禁止**在静态 IAT 上无限死磕（见 `reverse-engineering\u002Freferences\u002Fre-agent-workflow.md` §1.2）\n5. 用户明确要求「重做导入表检查 \u002F 重新检查导入表 \u002F 重做 IAT」时：MUST 重做被点名步骤本身（阻塞时先走可行性门闩：说明前提+请确认；强制则标 quality=unreadable），**禁止改换为无关步骤冒充完成**\n\n未记录导入表（或合法等价锚点 \u002F IAT 失败旁路）Evidence 前：MUST NOT 声称「基础侦察完成」，MUST NOT 进入工作流 2+ 的深挖结论。\n\n优先直接运行内置脚本：\n\n```powershell\npowershell -File \"\u003Cskill-root>\\radare2\\scripts\\recon.ps1\" -TargetPath \"sample.exe\"\n```\n\n如果只需要手动最小命令，则使用：\n\n```powershell\nrabin2 -I sample.exe\nrabin2 -z sample.exe\nrabin2 -i sample.exe\nrabin2 -E sample.exe\n```\n\n关注点：\n\n- 文件格式、位数、架构、平台\n- 入口点地址\n- 可疑字符串：URL、路径、报错、注册表、命令行参数\n- 导入函数：网络、文件、加密、进程注入、注册表操作（**MUST 落 Evidence，见上方硬门禁**）\n\n## 工作流 2：交互式分析函数\n\n```powershell\nr2 sample.exe\n```\n\n进入后常用：\n\n```text\naaa          # 常规自动分析\nafl          # 列出函数\niz           # 列出字符串\niS           # 列节区\nis           # 列符号\ns entry0     # 跳到入口点\npdf          # 反汇编当前函数\nVV           # 进入可视化模式（如果终端适合）\nq            # 退出\n```\n\n说明：\n\n- 默认优先 `aaa`，不要一开始就用更重的 `aaaa`\n- 如果样本很大或分析很慢，可以只分析入口附近，再手动扩展\n\n## 工作流 3：定位 main \u002F 关键逻辑\n\n```text\nafl~main\nafl~sym.\niz~http\niz~error\naxt \u003Caddr>\n```\n\n思路：\n\n- 先从 `main`、入口点、字符串引用入手\n- 用 `axt` 查谁引用了某个字符串或地址\n- 找到引用点后再 `s \u003Caddr>`、`pdf`\n\n## 工作流 4：十六进制与内存查看\n\n```text\npx 64        # 当前地址起 64 字节十六进制\npd 20        # 反汇编 20 条指令\npsz          # 读取当前地址字符串\npxa          # 更友好的十六进制视图\n```\n\n## 工作流 5：二进制 patch\n\n仅当用户明确要求修改文件时使用：\n\n```powershell\nr2 -w sample.exe\n```\n\n进入后例如：\n\n```text\ns 0x401000\nwa nop\nwa jmp 0x401050\nwq\n```\n\n常见写操作：\n\n- `wa \u003Casm>`：写汇编\n- `wx \u003Chex>`：写原始字节\n- `wq`：写入并退出\n\n修改前最好先备份原文件。如果用户没提备份，至少提醒一次。\n\n## 工作流 6：非交互自动化\n\n适合一次性输出结果：\n\n```powershell\nr2 -A -q -c \"afl;iz;ii;q\" sample.exe\n```\n\n常用参数：\n\n- `-A`：启动时自动分析\n- `-q`：安静模式\n- `-c`：执行命令串\n\n如果命令很多，优先整理成易读顺序，不要塞入难以维护的超长串。\n\n更推荐先用内置侦察脚本打底，再决定要不要补定制命令。\n\n## 常用子工具\n\n### `rabin2`\n\n适合静态信息提取：\n\n```powershell\nrabin2 -I sample.exe   # 基本信息\nrabin2 -S sample.exe   # 节区\nrabin2 -s sample.exe   # 符号\nrabin2 -i sample.exe   # 导入\nrabin2 -E sample.exe   # 导出\nrabin2 -z sample.exe   # 字符串\nrabin2 -zz sample.exe  # 更详细字符串\n```\n\n### `rasm2`\n\n适合快速汇编\u002F反汇编：\n\n```powershell\nrasm2 -d \"9090\"\nrasm2 -a x86 -b 64 \"xor eax, eax\"\n```\n\n### `radiff2`\n\n适合对比两个二进制：\n\n```powershell\nradiff2 old.exe new.exe\nradiff2 -C old.exe new.exe\n```\n\n### `rahash2`\n\n适合算哈希：\n\n```powershell\nrahash2 -a md5 sample.exe\nrahash2 -a sha256 sample.exe\n```\n\n### `rax2`\n\n适合进制和编码转换：\n\n```powershell\nrax2 0x401000\nrax2 4198400\nrax2 -s hello\n```\n\n## 推荐分析顺序\n\n遇到未知样本时，按这个顺序做：\n\n1. `rabin2 -I` 看格式、架构、入口点\n2. `rabin2 -z` 看字符串\n3. `rabin2 -i` 看导入函数 — **MUST + Evidence（硬门，见工作流 1）**\n4. 如需交互分析，再进 `r2`（仅当步骤 3 的 Evidence 已落盘）\n5. 先 `aaa`，再 `afl` \u002F `iz` \u002F `pdf`\n6. 通过字符串引用、导入调用、入口流程逐步定位关键函数\n\n这个顺序的好处是噪音低，能尽快建立方向感。步骤 3 不是可选优化，是进入深挖前的硬门。\n\n## Windows 注意事项\n\n- 路径里有空格时，命令必须正确加引号\n- 如果当前终端找不到 `r2`，可能是 `PATH` 刚更新，开一个新终端再试\n- 有些样本需要管理员权限读取，但默认不要主动提升权限，除非用户明确需要\n- 对可疑样本做动态调试前，要先确认用户意图，避免误操作\n\n## 输出风格\n\n当用户不是只要命令，而是要你实际分析文件时：\n\n- 先给出侦察结果摘要\n- 再列出关键证据：字符串、导入、函数、地址\n- 最后给出下一步建议或继续深入分析\n\n不要只罗列命令而不解释为什么这么做。\n\n## 典型请求示例\n\n### 示例 1：分析一个 exe\n\n用户：`帮我看看这个 exe 干了什么，用 radare2 就行`\n\n处理方式：\n\n1. 先用 `rabin2 -I\u002F-z\u002F-i`\n2. 判断是否需要进入 `r2`\n3. 用 `aaa`、`afl`、`pdf` 深挖入口和关键字符串引用\n\n### 示例 2：找字符串在哪被调用\n\n用户：`这个报错字符串在哪个函数里触发的`\n\n处理方式：\n\n1. 用 `iz~关键字` 找字符串地址\n2. 用 `axt \u003Caddr>` 找引用\n3. 跳到引用点 `s \u003Caddr>` 后 `pdf`\n\n### 示例 3：改掉跳转\n\n用户：`把这个 jne 改成 je`\n\n处理方式：\n\n1. 先确认目标地址\n2. 明确告知要进入写模式\n3. 用 `wa je \u003Ctarget>` 或直接 `wx`\n4. 修改后再次反汇编验证\n\n## 避免的做法\n\n- 不要把 `radare2` 当成只有 `aaa` 一个命令的工具\n- 不要在未说明风险时直接写模式打开用户文件\n- 不要在还没做基础侦察前就下结论\n- **禁止跳过导入表检查**（`rabin2 -i` \u002F recon imports）：未写入 Evidence 不得进入下一步；用户要求重做导入表时禁止改做其他步骤\n- **禁止 IAT 修复失败后静态死磕**：记 `E-iat-repair-fail` 后转动态；禁止 64 位样本只用 ImportREC\n- 不要把网页 JS 逆向误导到这个 skill；那是 `reverse-engineering` 的范围\n\n## 参考资料\n\n- 命令速查：`references\u002Fcheatsheet.md`\n- 标准侦察脚本：`scripts\u002Frecon.ps1`\n\n## radare2-skills 生态\n\nradare2-skills 项目（radareorg\u002Fradare2-skills）提供了更完整的生态工具和工作流：\n\n- **r2xsql**：SQL 查询二进制导入表 \u002F 字符串 \u002F 函数\n- **r2mcp \u002F r2http**：MCP 工具与 HTTP 状态化命令通道\n- **radius2**：符号执行、符号动态分析\n- **r2pm**：插件管理、扩展\n- **decompiler plugins**：radare2 插件机制\n\n**使用策略**：\n- 当用户提到 `r2xsql`、`r2mcp`、`r2http`、`radius2`、`r2pm`、`rabin2`、`rasm2`、`radiff2`、`rahash2`、`rax2` 时，优先路由到本 skill（radare2\u002FSKILL.md）\n- 这些工具只是生态加速器，**不能绕过**：授权门禁、环境校验、Evidence 导入、写模式确认\n- 给出最小可复现命令示例：\n  - `r2xsql -s \u003Cfile> -q \"SELECT ...\"`\n  - `curl.exe -sS --data-binary 'aaa' http:\u002F\u002F127.0.0.1:9393\u002Fcmd`\n  - `radius2 -p \u003Cbinary> ...`\n  - `r2pm -ci \u003Cplugin>`\n\n本 skill 保持原有硬门禁和证据链完整性，不允许跳过任何授权或 Evidence 步骤。\n\n---\n",{"name":5,"description":48,"user-invocable":49},"Use this skill whenever the user wants to analyze binaries with radare2\u002Fr2 from the command line, including reverse engineering, disassembly, function analysis, strings\u002Fimport inspection, patching, binary diffing, hex inspection, or r2 scripting. Also use it when the user mentions PE\u002FELF\u002FMach-O\u002FDEX\u002FWASM files together with CLI analysis, `rabin2`, `rasm2`, `radiff2`, `r2pipe`, or asks for radare2 command help on Windows\u002FLinux\u002FmacOS.\n",true,"main","cd89f013b617f7eea982a9bbc60e992974fda2aa","systems\u002Freverse-skill\u002Fskills\u002Fradare2",15,"https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco","https:\u002F\u002Fcocoresearch.org\u002Fcoco\u002F","https:\u002F\u002Fgithub.com\u002Fcoco-research","https:\u002F\u002Fcocoresearch.org","Local-first, open-source tools for people who work with AI agents: governed memory, agents that check their own work, and data that stays on your machine.","2026-11-11 12:18:13",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":49},[62,65,68],{"tool":63,"command":64},"npx","npx skills add coco-research\u002Fcoco --skill radare2",{"tool":66,"command":67},"bunx","bunx skills add coco-research\u002Fcoco --skill radare2",{"tool":69,"command":70},"pnpm","pnpm dlx skills add coco-research\u002Fcoco --skill radare2","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Freverse-skill\u002Fskills\u002Fradare2\u002FSKILL.md",[73],{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fcheatsheet.md","REFERENCE","参考文档",1629,"https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Freverse-skill\u002Fskills\u002Fradare2\u002Freferences\u002Fcheatsheet.md",[80,105,115,133,168,187],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":87,"publishedAt":43},"01M71KEJXF9KMT0BWCMRSRFA4M","trading-super-intelligence","Trading Super Intelligence Team. Named real-world personas across 8 cells. Built local-first (LM Studio) and validator-gated. Illustrative composites; see DISCLAIMER.md.","https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Fsuperintelligence\u002Ftrading\u002FSKILL.md",[86],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],"super","trading super intelligence","intelligence","trading","validator","personas","local","composites","studio","team","across","world","first","gated","2026","lm studio","local-first",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":112,"publishedAt":43},"01M71KEFWS3CMAP7DF1P0FWTDE","strategy-super-intelligence","Strategy Super Intelligence Team. Named real-world personas across 7 cells. Built local-first (LM Studio) and validator-gated. Illustrative composites; see DISCLAIMER.md.","https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Fsuperintelligence\u002Fstrategy\u002FSKILL.md",[111],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[113,88,114,90,92,93,94,95,96,97,98,99,100,101,102,103,104],"strategy","strategy super intelligence",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":127,"publishedAt":43},"01M71KED56ZEPK2QE84QSQPMT0","risk-compliance-super-intelligence","Risk & Compliance (GRC) Super Intelligence Team. Named real-world personas across 7 cells. Built local-first (LM Studio) and validator-gated. Illustrative composites; see DISCLAIMER.md.","https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Fsuperintelligence\u002Frisk-compliance\u002FSKILL.md",[121,122],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":123,"categoryName":124,"taxonomyType":125,"taxonomyTypeDesc":126},"01JBSEEDCAT000000000000037","律师与法务","PROFESSION","适用职业",[128,88,129,130,131,90,92,93,94,95,132,96,97,98,99,100,101,102,103,104],"risk","risk compliance super intelligence","compliance","risk compliance","grc",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":152,"publishedAt":43},"01M71KE9A2FWSC74VA96W1EZSN","product-design-super-intelligence","Your product + design brain trust and decision partner. Named personas across 8 cells spanning product strategy, discovery\u002Fresearch, growth\u002Fmetrics, design foundations\u002Fusability, design leadership\u002Fcraft, UX\u002Fcontent, design systems, and a…","https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Fsuperintelligence\u002Fproduct-design\u002FSKILL.md",[139,142,145,146,149],{"categoryNo":140,"categoryName":141,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":143,"categoryName":144,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":147,"categoryName":148,"taxonomyType":125,"taxonomyTypeDesc":126},"01JBSEEDCAT000000000000031","产品经理",{"categoryNo":150,"categoryName":151,"taxonomyType":125,"taxonomyTypeDesc":126},"01JBSEEDCAT000000000000032","设计师",[153,154,90,155,88,156,157,158,159,160,161,97,98,162,163,102,164,165,166,167],"design","product","product design","product design super intelligence","foundations","product-design","decision","design systems","usability","leadership","ux","brain","craft","metrics","trust",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":176,"publishedAt":43},"01M71KE6H9FPSD9TECYFBPXZ8Y","legal-ip-super-intelligence","Your legal, IP, and regulatory brain trust. 31 named personas across 7 cells covering patent strategy, tech licensing, regulatory litigation, AI governance, open-source compliance, privacy law, and antitrust.","https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Fsuperintelligence\u002Flegal-ip\u002FSKILL.md",[174,175],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":123,"categoryName":124,"taxonomyType":125,"taxonomyTypeDesc":126},[177,88,178,90,179,180,167,181,93,182,183,184,113,97,98,185,130,186,102,164],"ip","legal ip super intelligence","legal","sep","tech","litigation","ai governance","open","open-source","governance",{"skillNo":188,"name":189,"nameZh":6,"description":190,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":191,"categories":192,"keywords":194,"publishedAt":43},"01M71KE36QRY610V6YVB9JWRND","healthcare-life-sciences-super-intelligence","Your healthcare and life sciences brain trust. 25 named personas across 7 cells covering drug discovery, medtech, biotech strategy, health policy, genomics, clinical trials, and healthcare economics.","https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Fsuperintelligence\u002Fhealthcare-life-sciences\u002FSKILL.md",[193],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[195,88,196,197,90,180,167,198,199,93,200,201,113,97,98,202,203,204,205,102],"healthcare","healthcare life sciences super intelligence","life","economics","discovery","policy","clinical","clinical trials","health","trials","genomics"]