/r2sql:analysisfrom r2sql
Triage and audit radare2 binaries via r2sql — find suspicious behavior, surface crypto/network/persistence APIs, hunt high-complexity functions, and run multi-table queries that combine code, data, and xrefs.
Ships in r2sql. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Pick this skill when the task is open-ended investigation:
For specific lookups (one symbol, one xref, one string), use the
typed skills (disassembly, data, xrefs).
A typical triage pass:
binary for bintype/arch/bits and quick counts.imports grouped by library; flag crypto,
network, persistence, anti-debug DLLs.strings matching password, key, URLs,
command lines, suspicious paths.xrefs from interesting imports/strings to callers,
then to those callers' callers.annotations skill to leave comments and
flags marking what you found; persist with -w --project NAME.-- 1) binary type + counts at a glance
SELECT key, value FROM binary
WHERE key IN ('bintype','arch','bits','os','func_count','import_count','string_count');
-- 2) crypto API surface (any combination of common naming)
SELECT name, libname FROM imports
WHERE name LIKE 'Crypt%' OR name LIKE '%AES%'
OR name LIKE 'BCrypt%' OR name LIKE '%RC4%'
OR name LIKE '%MD5%' OR name LIKE '%SHA%';
-- 3) network surface
SELECT name, libname FROM imports
WHERE libname IN ('WS2_32.dll','WINHTTP.dll','WININET.dll','URLMON.dll','DNSAPI.dll');
-- 4) anti-debug surface
SELECT name FROM imports
WHERE name IN ('IsDebuggerPresent','CheckRemoteDebuggerPresent','NtQueryInformationProcess');
-- 5) persistence surface
SELECT name, libname FROM imports
WHERE name LIKE 'Reg%Set%' OR name LIKE 'Create%Service%'
OR name LIKE '%Schedule%' OR name LIKE 'WinExec' OR name LIKE 'ShellExecute%';
-- 6) suspicious string anchors
SELECT addr, text FROM strings
WHERE text LIKE 'http%' OR text LIKE 'cmd.exe%'
OR text LIKE 'powershell%' OR text LIKE '%HKEY_%'
OR text LIKE 'C:\\%' OR text LIKE '\\Run\\%';
-- 7) high-complexity functions (often crypto loops or state machines)
SELECT addr, name, cc FROM funcs WHERE cc > 25 ORDER BY cc DESC;
-- 8) functions that touch ANY crypto import (pivot from 2)
WITH crypto_imps AS (
SELECT addr FROM imports
WHERE name LIKE 'Crypt%' OR name LIKE 'BCrypt%'
)
SELECT DISTINCT x.from_func, f.cc
FROM xrefs x
JOIN crypto_imps c ON c.addr = x.to_addr
LEFT JOIN funcs f ON f.name = x.from_func
WHERE x.type = 'CALL'
ORDER BY f.cc DESC;
After the recipes, summarize for the user:
(addr, name, why) to look at.annotations skill).LoadLibrary/GetProcAddress). For those, hunt the strings
for the API names and pivot via xrefs.cc doesn't mean "interesting" by itself — combine with the
API/string anchors before deciding.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub 0xeb/r2sql-skills --plugin r2sql11 skills in this plugin
/annotationsEdit radare2 annotations — comments, flag/function names, local variables, bookmarks — via r2sql. Use when asked to add comments, rename functions/flags, rename or retype locals, or persist analysis state./connectConnect to radare2 sessions via r2sql and bootstrap analysis. Use when starting a new SQL session, routing to other skills, or setting up CLI/HTTP/MCP connections./dataQuery radare2 data and memory — bytes, defined data, byte patterns, strings, imports, entry points, and binary metadata — via r2sql.Other plugins' skills for the same job