xrefs
Analyze Binary Ninja cross-references: callers, callees, imports, data refs. Use the pre-computed callers/callees views for performance.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze Binary Ninja cross-references: callers, callees, imports, data refs. Use the pre-computed callers/callees views for performance.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Connect to Binary Ninja databases and bootstrap sessions. Use when starting analysis, routing to other skills, or setting up CLI/HTTP/MCP connections.
Query Binary Ninja strings, bytes, and binary patterns. Use search_bytes() for native fast pattern search.
Complete bnsql SQL function reference catalog.
BNSQL analysis workflows: triage, security audit, crypto/network detection, multi-table queries.
Edit Binary Ninja databases: comments, renames, types, patches. Mutations require SELECT save() to persist (explicit-save model, v0.0.9+).
Decompile Binary Ninja functions via HLIL: pseudocode text, local variables, call sites. Always filter by func_addr.
| name | xrefs |
| description | Analyze Binary Ninja cross-references: callers, callees, imports, data refs. Use the pre-computed callers/callees views for performance. |
| allowed-tools | ["Bash","Read","Glob","Grep"] |
| Surface | Description | Performance |
|---|---|---|
xrefs | from_ea, to_ea, type, is_code, from_func | Filter by to_ea = X or from_ea = X |
callers | Pre-computed view: who calls each function | Pure SQL, fast |
callees | Pre-computed view: what each function calls | Pure SQL, fast |
imports | Imported symbols by module | Filter by module for narrow scans |
string_refs | Strings and the functions that reference them | Pure SQL |
-- SLOW: 8000+ BN API calls on a medium binary
SELECT func_start(from_ea), to_ea FROM xrefs WHERE is_code = 1;
-- FAST: Pure SQL, milliseconds
SELECT func_addr, callee_addr FROM callees;
The xrefs table already provides a pre-computed from_func column. Use
that when you need the caller function without an extra UDF call:
SELECT from_func, to_ea FROM xrefs WHERE is_code = 1;
WITH caller_counts AS (
SELECT to_ea, COUNT(*) AS callers
FROM xrefs
WHERE is_code = 1
GROUP BY to_ea
)
SELECT f.name, hex(f.address) AS addr, c.callers
FROM funcs f
JOIN caller_counts c ON c.to_ea = f.address
ORDER BY c.callers DESC
LIMIT 10;
malloc?SELECT DISTINCT caller_name
FROM callers
WHERE callee_name = 'malloc';
WITH cnt AS (
SELECT to_ea, COUNT(*) AS n
FROM xrefs WHERE is_code = 1
GROUP BY to_ea
)
SELECT f.name, COALESCE(c.n, 0) AS calls
FROM funcs f
LEFT JOIN cnt c ON c.to_ea = f.address
WHERE COALESCE(c.n, 0) <= 10
ORDER BY calls DESC;
WITH has_callers AS (
SELECT DISTINCT to_ea FROM xrefs WHERE is_code = 1
)
SELECT f.name, hex(f.address) AS addr
FROM funcs f
WHERE f.address NOT IN (SELECT to_ea FROM has_callers);
SELECT module, COUNT(*) AS api_count
FROM imports
GROUP BY module
ORDER BY api_count DESC;
disassembly for the underlying instruction streamdecompiler for HLIL call sites via hlil_callsdata for string cross-references via string_refs