
Radare2
Give your agent a radare2 command cheat sheet and a PowerShell bootstrap path when you need quick binary recon, strings, patching, or non-interactive analysis on Windows samples.
Install
npx skills add https://github.com/zhaoxuya520/reverse-skill --skill radare2What is this skill?
- Covers rabin2 recon (info, sections, imports, entropy, strings) before opening r2
- Interactive r2 flow: aaa, afl, iz, xrefs, pdf, and patch via r2 -w / wa / wx
- Companion tools: rasm2 disassembly, radiff2 binary diff, rahash2 hashes, rax2 conversions
- Non-interactive one-liners with r2 -A -q -c for scripted triage
- PowerShell wrapper with ToolDiscovery bootstrap and optional RunAnalysis for repeatable audits
Adoption & trust: 1 installs on skills.sh; 1.3k GitHub stars; trending (+100% hot-view momentum).
Recommended Skills
Azure Compliancemicrosoft/azure-skills
Openclaw Secure Linux Cloudxixu-me/skills
Entra Agent Idmicrosoft/azure-skills
Firebase Security Rules Auditorfirebase/agent-skills
Firestore Security Rules Auditorfirebase/agent-skills
Skill Vetteruseai-pro/openclaw-skills-security
Journey fit
Binary reverse engineering and integrity checks sit in the ship phase when you are hardening releases, investigating suspicious executables, or validating what you are about to ship. Security subphase is the canonical shelf for r2/rabin2 workflows—imports, sections, hashes, and controlled patches—not greenfield feature coding.
SKILL.md
READMESKILL.md - Radare2
# radare2 速查表 ## 基础侦察 ```powershell rabin2 -I sample.exe rabin2 -S sample.exe rabin2 -i sample.exe rabin2 -E sample.exe rabin2 -zz sample.exe ``` ## 进入交互 ```powershell r2 sample.exe ``` ```text aaa afl iz iS is s entry0 pdf q ``` ## 字符串和引用 ```text iz~http iz~error axt <addr> s <addr> pdf ``` ## 常用查看 ```text px 64 pd 20 psz pxa ``` ## patch ```powershell r2 -w sample.exe ``` ```text s 0x401000 wa nop wx 9090 wq ``` ## 非交互模式 ```powershell r2 -A -q -c "afl;iz;ii;q" sample.exe ``` ## 其他工具 ### rasm2 ```powershell rasm2 -d "9090" rasm2 -a x86 -b 64 "xor eax, eax" ``` ### radiff2 ```powershell radiff2 old.exe new.exe radiff2 -C old.exe new.exe ``` ### rahash2 ```powershell rahash2 -a md5 sample.exe rahash2 -a sha256 sample.exe ``` ### rax2 ```powershell rax2 0x401000 rax2 4198400 rax2 -s hello ``` param( [Parameter(Mandatory = $true)] [string]$TargetPath, [int]$StringsLimit = 40, [int]$ImportsLimit = 80, [switch]$RunAnalysis ) # 强制当前脚本使用 UTF-8 输出,尽量减少中文标题乱码。 [Console]::InputEncoding = [System.Text.UTF8Encoding]::new($false) [Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false) $OutputEncoding = [System.Text.UTF8Encoding]::new($false) $ErrorActionPreference = 'Stop' . (Join-Path $PSScriptRoot '..\..\scripts\lib\ToolDiscovery.ps1') $bootstrapScript = Join-Path $PSScriptRoot '..\..\scripts\bootstrap-reverse.ps1' function Get-RequiredToolSpec { param( [Parameter(Mandatory = $true)] [string]$Name ) $spec = Resolve-ReverseToolSpec -Name $Name if (-not $spec.Available) { # Attempt auto-bootstrap if (Test-Path -LiteralPath $bootstrapScript) { Write-Output "INFO: $Name not found, attempting auto-bootstrap..." & powershell.exe -NoProfile -ExecutionPolicy Bypass -File $bootstrapScript -Capability @($Name) -SkipRefresh $spec = Resolve-ReverseToolSpec -Name $Name } if (-not $spec.Available) { throw "缺少命令:$Name — 自动安装失败,请手动安装。参考: https://github.com/radareorg/radare2" } } return $spec } function Write-Section { param( [Parameter(Mandatory = $true)] [string]$Title ) # 用固定分段标题,方便人看,也方便后续 grep。 "" "=== $Title ===" } $rabin2 = Get-RequiredToolSpec -Name 'rabin2' $r2 = $null if ($RunAnalysis) { $r2 = Get-RequiredToolSpec -Name 'r2' } # 将输入路径规范化成绝对路径,避免 r2/rabin2 在相对路径下歧义解析。 $resolvedPath = Resolve-Path -LiteralPath $TargetPath $target = $resolvedPath.Path "目标文件: $target" Write-Section -Title '基本信息' & $rabin2.Command @($rabin2.PrefixArgs + @('-I', '--', $target)) Write-Section -Title '节区' & $rabin2.Command @($rabin2.PrefixArgs + @('-S', '--', $target)) Write-Section -Title '导入' & $rabin2.Command @($rabin2.PrefixArgs + @('-i', '--', $target)) | Select-Object -First $ImportsLimit Write-Section -Title '导出' & $rabin2.Command @($rabin2.PrefixArgs + @('-E', '--', $target)) Write-Section -Title '字符串' & $rabin2.Command @($rabin2.PrefixArgs + @('-zz', '--', $target)) | Select-Object -First $StringsLimit if ($RunAnalysis) { Write-Section -Title '函数与入口分析' & $r2.Command @($r2.PrefixArgs + @('-A', '-q', '-c', 's entry0;afl;iz;ii;q', '--', $target)) } #!/usr/bin/env bash # recon.sh — radare2 快速侦察(二进制基本信息、节区、导入导出、字符串) # 等价于 Windows 版的 recon.ps1 # # 用法: # bash recon.sh <target_file> [--strings-limit 40] [--imports-limit 80] [--analyze] set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" KALI_BOOTSTRAP="$(cd "$SCRIPT_DIR/../../../kali/scripts" 2>/dev/null && pwd)/bootstrap-reverse.sh" # ─── 参数 ────────────────────────────────────────────────────────────────────────── TARGET="" STRINGS_LIMIT=40 IMPORTS_LIMIT=80 RUN_ANALYSIS=false while [[ $# -gt 0 ]]; do case "$1" in --strings-limit) STRINGS_LIMIT="$2"; shift 2 ;; --imports-limit) IMPORTS_LIMIT="$2"; shift 2 ;; --analyze) RUN_ANALYSIS=true; shift ;; -*) echo "未知选项: $1"; exit 1 ;; *) TARGET="$1"; shi