data
Query Binary Ninja strings, bytes, and binary patterns. Use search_bytes() for native fast pattern search.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Query Binary Ninja strings, bytes, and binary patterns. Use search_bytes() for native fast pattern search.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Connect to Binary Ninja databases and bootstrap sessions. Use when starting analysis, routing to other skills, or setting up CLI/HTTP/MCP connections.
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.
Query Binary Ninja disassembly: functions, segments, instructions, blocks. Use for code-level analysis and instruction inspection.
| name | data |
| description | Query Binary Ninja strings, bytes, and binary patterns. Use search_bytes() for native fast pattern search. |
| allowed-tools | ["Bash","Read","Glob","Grep"] |
| Surface | Description |
|---|---|
strings | All discovered strings (content, length, address, type) |
string_refs | Strings joined with the functions that reference them |
| Function | Description |
|---|---|
search_bytes(pattern) | Find all matches; returns JSON array |
search_bytes(pattern, start, end) | Search within an address range |
search_first(pattern) | First match address (or NULL) |
hex(val) | Format integer as hex |
bytes table-- N bytes as uppercase hex
SELECT hex(blob_concat(value)) FROM (
SELECT value FROM bytes WHERE start_address = X AND n = N ORDER BY address);
-- N bytes as BLOB
SELECT blob_concat(value) FROM (
SELECT value FROM bytes WHERE start_address = X AND n = N ORDER BY address);
start_address and n are hidden input columns paired for bounded reads. start_address is deliberately distinct from the visible address column so any user predicate on address (e.g. inside a JOIN) stays enforceable by SQLite. Use the patches table for byte patching.
"48 8B 05" — Exact bytes (hex, space-separated)"48 ?? 05" — ?? = any byte wildcard"4?" — ? = any nibble (matches 40–4F)"[regex]" — Regex patterns supported-- Interesting strings
SELECT content, hex(address) AS addr
FROM strings
WHERE length > 10
ORDER BY length DESC
LIMIT 20;
-- Password-related
SELECT content, hex(address) AS addr
FROM strings
WHERE content LIKE '%password%';
SELECT s.content, hex(s.address) AS str_addr,
sr.func_name, hex(sr.func_addr) AS func_addr
FROM string_refs sr
JOIN strings s ON s.address = sr.string_addr
WHERE s.content LIKE '%error%';
-- Find all RDTSC instructions (opcode: 0F 31)
SELECT search_bytes('0F 31');
-- Iterate matches
SELECT json_extract(value, '$.address') AS addr
FROM json_each(search_bytes('48 8B ?? 00'))
LIMIT 10;
-- First match only
SELECT printf('0x%X', search_first('CC CC CC'));
-- Count unique functions using RDTSC
SELECT COUNT(DISTINCT func_start(json_extract(value, '$.address'))) AS count
FROM json_each(search_bytes('0F 31'))
WHERE func_start(json_extract(value, '$.address')) IS NOT NULL;
-- List those functions
SELECT DISTINCT
func_start(json_extract(value, '$.address')) AS func_ea,
name_at(func_start(json_extract(value, '$.address'))) AS func_name
FROM json_each(search_bytes('0F 31'))
WHERE func_start(json_extract(value, '$.address')) IS NOT NULL;
This is much faster than scanning all disassembly lines:
search_bytes() uses native BN binary searchfunc_start() is O(1) lookup in the function indexSELECT bytes(0x401000, 16); -- "48 89 5C 24 08 48 89 ..."
xrefs for finding the call sites of functions that contain a found
patterndisassembly for the surrounding instruction context (disasm(addr))