Dataのロゴ

Data

組織
allthingsida
data

Query IDA strings, bytes, and binary data. Use when asked to search strings, find byte patterns, rebuild string tables, or analyze binary content.

概要

公開者allthingsida
リポジトリidasql-skills
スキル名data
スター
50
フォーク
10
同梱ファイル
1
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    allthingsidaがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルDataをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/allthingsida/idasql-skills/tree/main/plugins/idasql/skills/data
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/allthingsida/idasql-skills.git /tmp/idasql-skills
mkdir -p .claude/skills
cp -r /tmp/idasql-skills/plugins/idasql/skills/data .claude/skills/data
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでDataを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にDataを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Dataは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Links: when an answer names functions, addresses, strings or types, make them clickable on IDA 9.4 builds: [name](uri) from the deep_links table, outside code blocks (skill deep-links).


Trigger Intents

Use this skill when user asks to:

  • search strings/bytes/patterns quickly
  • map string evidence to code usage
  • investigate raw data-level indicators (IOCs, constants, signatures)

Route to:

  • xrefs for relationship expansion from matched addresses
  • analysis for triage synthesis from data signals
  • debugger when findings should drive patch/breakpoint actions

Do This First (Warm-Start Sequence)

sql
-- 1) Validate string availability
SELECT COUNT(*) AS strings FROM strings;

-- 2) Sample high-value strings
SELECT content, printf('0x%X', addr) AS addr
FROM strings
WHERE length >= 8
ORDER BY length DESC
LIMIT 40;

-- 3) If expected strings are missing, rebuild once
SELECT rebuild_strings();

Interpretation guidance:

  • Strings are often quickest behavioral clues; pivot to xrefs immediately for execution context.
  • For opcode/pattern hunts, prefer the byte_search table over full instruction scans.

Failure and Recovery

  • No strings or unexpectedly low count:
    • Run rebuild_strings() and validate with COUNT(*) FROM strings.
  • Too many false positives:
    • Increase specificity (LIKE, regex-like pattern narrowing, module/function join filters).
  • Byte pattern search too broad:
    • Restrict by range or join matched byte addresses to funcs.
  • Need named functions, labels, structs, or members instead of string contents:
    • Use grep, not strings or byte_search.

Handoff Patterns

  1. data -> xrefs to convert data hits into code paths/functions.
  2. data -> analysis for risk scoring and campaign-level insight.
  3. data -> debugger for actionable patch/watchpoint setup.

strings

String literals found in the binary. IDA maintains a cached string list that can be configured.

ColumnTypeDescription
addrINTString address
lengthINTString length
typeINTString type (raw encoding bits)
type_nameTEXTType name: ascii, utf16, utf32
widthINTChar width (0=1-byte, 1=2-byte, 2=4-byte)
width_nameTEXTWidth name: 1-byte, 2-byte, 4-byte
layoutINTString layout (0=null-terminated, 1-3=pascal)
layout_nameTEXTLayout name: termchr, pascal1, pascal2, pascal4
encodingINTEncoding index (0=default)
contentTEXTString content (the actual text — not value or text)

String Type Encoding: IDA stores string type as a 32-bit value:

  • Bits 0-1: Width (0=1B/ASCII, 1=2B/UTF-16, 2=4B/UTF-32)
  • Bits 2-7: Layout (0=TERMCHR, 1=PASCAL1, 2=PASCAL2, 3=PASCAL4)
  • Bits 8-15: term1 (first termination character)
  • Bits 16-23: term2 (second termination character)
  • Bits 24-31: encoding index
sql
-- Find error messages
SELECT content, printf('0x%X', addr) as addr FROM strings WHERE content LIKE '%error%';

-- ASCII strings only
SELECT * FROM strings WHERE type_name = 'ascii';

-- UTF-16 strings (common in Windows)
SELECT * FROM strings WHERE type_name = 'utf16';

-- Count strings by type
SELECT type_name, layout_name, COUNT(*) as count
FROM strings GROUP BY type_name, layout_name ORDER BY count DESC;

Important: For new analysis (exe/dll), strings are auto-built. For existing databases (i64/idb), strings are already saved. If you see 0 strings unexpectedly, run SELECT rebuild_strings() once to rebuild the list. See String List Surfaces section below.


String References (explicit join pattern)

Use strings + xrefs + funcs directly. This is the canonical pattern.

sql
-- Find call sites/functions referencing error-like strings
SELECT
    s.content as string_value,
    printf('0x%X', x.from_addr) as ref_addr,
    (SELECT name FROM func_at(x.from_addr) LIMIT 1) as func_name
FROM strings s
JOIN xrefs x ON x.to_addr = s.addr
WHERE s.content LIKE '%error%' OR s.content LIKE '%fail%'
ORDER BY func_name, ref_addr;

-- Functions with most string references
SELECT
    (SELECT name FROM func_at(x.from_addr) LIMIT 1) as func_name,
    COUNT(*) as string_refs
FROM strings s
JOIN xrefs x ON x.to_addr = s.addr
GROUP BY func_name
ORDER BY string_refs DESC
LIMIT 10;

bytes Table — Reads, Patches, and Bounded Windows

All byte access goes through the bytes table. The hidden start_addr and n input columns pair up for bounded reads; bulk hex uses hex(blob_concat(value)), bulk BLOB uses blob_concat(value).

ShapeSQL
Read 1 byteSELECT value FROM bytes WHERE addr = 0x401000
Read N bytes as hex (uppercase, no spaces)SELECT hex(blob_concat(value)) FROM (SELECT value FROM bytes WHERE start_addr = 0x401000 AND n = 16 ORDER BY addr)
Read N bytes as BLOBSELECT blob_concat(value) FROM (SELECT value FROM bytes WHERE start_addr = 0x401000 AND n = 16 ORDER BY addr)
Read a rangeSELECT value FROM bytes WHERE addr >= 0x401000 AND addr < 0x401010 ORDER BY addr

The hidden start_addr + n columns request exactly N consecutive bytes beginning at X. They are deliberately distinct from the visible addr column so any predicate on addr (joins, compound WHERE) stays enforceable by SQLite. The bounded read does not skip unmapped addresses; it always yields N rows.

blob_concat(value) is a built-in aggregate that concatenates row values into one BLOB; hex() is the SQLite built-in BLOB→hex helper (uppercase).

Uninitialized bytes read back as NULL

value is SQL NULL for a mapped-but-uninitialized byte (BSS and other sparse mapped regions) — the canonical byte surface keeps "unknown" distinct from "a real 0". The is_initialized column carries the 0/1 flag.

blob_concat skips NULL inputs, so a bulk read spanning uninitialized bytes returns a BLOB shorter than n (all-NULL windows return NULL). When the byte count must match the window, either restrict the read or make the gaps explicit:

sql
-- Concrete bytes only (short result is now intentional)
SELECT hex(blob_concat(value)) FROM (
  SELECT value FROM bytes
  WHERE start_addr = 0x401000 AND n = 16 AND is_initialized = 1
  ORDER BY addr);

-- Fixed-width window: substitute 0 for uninitialized bytes
SELECT hex(blob_concat(COALESCE(value, 0))) FROM (
  SELECT value FROM bytes WHERE start_addr = 0x401000 AND n = 16 ORDER BY addr);

-- Check first whether the window is fully initialized
SELECT COUNT(*) - SUM(is_initialized) AS uninitialized
FROM bytes WHERE start_addr = 0x401000 AND n = 16;

Unbounded-range gotcha

WHERE addr > X without an upper bound or LIMIT walks every mapped byte from X to end-of-image — millions of rows and seconds of wall time. Always pair the read with one of:

  • WHERE start_addr = X AND n = N (bounded read shape)
  • AND addr < B (two-sided range)
  • outer LIMIT N

The table has no per-call cap; arbitrarily large windows are supported as long as the constraint pair is bounded.

Use heads when you need IDA item size/type metadata.

High addresses (>= 2^63)

An address at or above 0x8000000000000000 (a kernel image at 0xFFFFF800...) is a negative INTEGER in addr, so ORDER BY addr lists the high half first, then the low half. bytes, heads and byte_search return and order such rows exactly as SQLite would.

  • Write high addresses as hex literals (0xFFFFF80000100000) or the negative decimal (-8796091973632), never as a decimal >= 2^63: SQLite reads 18446735277617577984 as a REAL and the predicate matches nothing.
  • addr >= 0xFFFFF80000000000 also matches the whole low half. For the high half only: addr BETWEEN 0xFFFFF80000000000 AND -1.
  • A start_addr + n read that crosses 0x7FFFFFFFFFFFFFFF still yields N rows; ORDER BY addr lists the part at or above 2^63 first. Near the top it stops before 0xFFFFFFFFFFFFFFFF (BADADDR, never an address).
sql
-- The first 16 mapped bytes of the high half, in address order
SELECT printf('0x%llX', addr) AS addr, value FROM bytes
WHERE addr BETWEEN 0xFFFFF80000000000 AND -1
ORDER BY bytes.addr LIMIT 16;

Binary Search Table

Use byte_search for raw bytes/opcodes. It requires WHERE pattern = ...; matched_hex is an output column, not the search input.

ColumnTypeDescription
addrINTMatch address
matched_hexTEXTMatched bytes rendered as hex text
matched_bytesBLOBMatched bytes as raw bytes
sizeINTMatch size in bytes
patternHIDDEN TEXTRequired IDA byte pattern input
start_addrHIDDEN INTOptional inclusive lower bound of the scan (unsigned address)
end_addrHIDDEN INTOptional exclusive upper bound of the scan (unsigned address)
max_resultsHIDDEN INTOptional generator cap

Pattern syntax (IDA native):

  • "48 8B 05" - Exact bytes (hex, space-separated)
  • "48 ? 05" or "48 ?? 05" - ? = any byte wildcard (whole byte only)
  • "(01 02 03)" - Alternatives (match any of these bytes)

Note: Nibble wildcards and regex are not supported in byte patterns.

Order and high addresses: matches come back in addr order as SQL sorts it, so a match at or above 0x8000000000000000 (a negative addr) comes before the low-half matches, and ORDER BY addr LIMIT n is free. start_addr / end_addr are plain unsigned scan bounds; to keep only kernel-half matches filter on addr (AND addr BETWEEN 0xFFFFF80000000000 AND -1), since addr >= <high hex> includes the low half too.

Example:

sql
-- Find all matches for a pattern
SELECT addr, matched_hex, size
FROM byte_search
WHERE pattern = '48 8B ? 00'
LIMIT 10;

-- First match only
SELECT printf('0x%llX', addr) AS addr
FROM byte_search
WHERE pattern = 'CC CC CC'
ORDER BY byte_search.addr
LIMIT 1;

-- Search with alternatives
SELECT addr, matched_hex
FROM byte_search
WHERE pattern = 'E8 (01 02 03 04)'
LIMIT 20;

Optimization Pattern: Find functions using specific instruction

To answer "How many functions use RDTSC instruction?" efficiently:

sql
-- Count unique functions containing RDTSC (opcode: 0F 31)
SELECT COUNT(DISTINCT fa.func_addr) as count
FROM byte_search b
JOIN func_at(b.addr) fa
WHERE b.pattern = '0F 31';

-- List those functions with names
SELECT DISTINCT
    fa.func_addr,
    fa.name as func_name
FROM byte_search b
JOIN func_at(b.addr) fa
WHERE b.pattern = '0F 31';

This is much faster than scanning all disassembly lines because:

  • byte_search uses IDA's native binary search
  • func_at resolves each hit's owning function(s) directly, tail chunks included, instead of scanning every instruction

Choose the Right Search Surface

  • Use grep for named entities such as functions, labels, structs, enums, and members.
  • Use strings when the user is searching literal string contents inside the binary.
  • Use byte_search when the target is a raw byte or opcode pattern.

SQL Surfaces — String List

IDA maintains a cached list of strings. Use rebuild_strings() to detect and cache strings, COUNT(*) FROM strings for the current count, and strings for row-level analysis.

SurfaceDescription
rebuild_strings()Rebuild with ASCII + UTF-16, minlen 5 (default)
rebuild_strings(minlen)Rebuild with custom minimum length
rebuild_strings(minlen, types)Rebuild with custom length and type mask
SELECT COUNT(*) FROM stringsCurrent string-list count (optimized without row materialization)

Type mask values:

  • 1 = ASCII only (STRTYPE_C)
  • 2 = UTF-16 only (STRTYPE_C_16)
  • 4 = UTF-32 only (STRTYPE_C_32)
  • 3 = ASCII + UTF-16 (default)
  • 7 = All types
sql
-- Check current string count
SELECT COUNT(*) AS strings FROM strings;

-- Rebuild with defaults (ASCII + UTF-16, minlen 5)
SELECT rebuild_strings();

-- Rebuild with shorter minimum length
SELECT rebuild_strings(4);

-- Rebuild with specific types
SELECT rebuild_strings(5, 1);   -- ASCII only
SELECT rebuild_strings(5, 7);   -- All types (ASCII + UTF-16 + UTF-32)

-- Typical workflow: rebuild then query
SELECT rebuild_strings();
SELECT * FROM strings WHERE content LIKE '%error%';

IMPORTANT - Agent Behavior for String Queries: When the user asks about strings (e.g., "show me the strings", "what strings are in this binary"):

  1. First run SELECT rebuild_strings() to ensure strings are detected
  2. Then query the strings table

The rebuild_strings() function configures IDA's string detection with sensible defaults (ASCII + UTF-16, minimum length 5) and rebuilds the string list. This ensures the user gets results even if the database had no prior string analysis.


Performance Rules

Table/FunctionArchitectureNotes
COUNT(*) FROM stringsCached table count pathO(1) current string-list count
stringsQuery-scopedMaterialized from IDA's live string list on each scan (no persisted vtable cache); fast because IDA's strlist is already built. rebuild_strings() regenerates IDA's underlying string list
byte_searchNative binary search tableMuch faster than iterating instructions table
bytes WHERE addr = XPoint lookupO(1); virtual table index
bytes WHERE start_addr = X AND n = NBounded read via hidden start_addr + nO(N); virtual table index
bytes WHERE addr >= A AND addr < BRange scanO(range); virtual table index
bytes WHERE addr > X (unbounded)Range scanAVOID — walks every mapped byte to end-of-image; use bounded forms

Key rules:

  • Always call rebuild_strings() before the first string query on a new database or after making code/data changes that may create new strings.
  • byte_search uses IDA's native binary search engine; for "find functions containing opcode X", join matches to funcs by containment instead of scanning the instructions table.
  • strings table is a snapshot of the cached string list. If IDA's analysis creates new strings after your initial query, call rebuild_strings() again.
  • For cross-referencing strings with functions, the strings + xrefs + funcs JOIN pattern is canonical — IDA's xref index makes the JOIN fast.

Advanced Data Patterns (CTEs)

Security-relevant string triage

Categorize strings by security relevance for rapid threat assessment:

sql
-- Categorize strings by security relevance
SELECT rebuild_strings();

WITH categorized AS (
    SELECT addr, content,
        CASE
            WHEN content LIKE '%password%' OR content LIKE '%passwd%' OR content LIKE '%secret%'
                THEN 'credential'
            WHEN content LIKE '%http://%' OR content LIKE '%https://%' OR content LIKE '%ftp://%'
                THEN 'url'
            WHEN content LIKE '%error%' OR content LIKE '%fail%' OR content LIKE '%exception%'
                THEN 'error'
            WHEN content LIKE '%debug%' OR content LIKE '%trace%' OR content LIKE '%assert%'
                THEN 'debug'
            WHEN content LIKE '%.exe%' OR content LIKE '%.dll%' OR content LIKE '%.sys%'
                THEN 'file_path'
            WHEN content LIKE '%HKEY_%' OR content LIKE '%SOFTWARE\\%'
                THEN 'registry'
            ELSE 'other'
        END AS category
    FROM strings
    WHERE length >= 5
)
SELECT category, COUNT(*) AS count,
       GROUP_CONCAT(SUBSTR(content, 1, 60), ' | ') AS samples
FROM categorized
WHERE category != 'other'
GROUP BY category
ORDER BY count DESC;

Combine string references with function size for suspicion scoring

Functions referencing security-relevant strings AND having significant size are high-priority targets:

sql
-- Suspicious functions: reference interesting strings AND are non-trivial
WITH interesting_strings AS (
    SELECT addr, content FROM strings
    WHERE content LIKE '%password%' OR content LIKE '%encrypt%'
       OR content LIKE '%decrypt%' OR content LIKE '%http%'
       OR content LIKE '%socket%' OR content LIKE '%connect%'
),
string_funcs AS (
    SELECT DISTINCT fa.func_addr,
           s.content AS matched_string
    FROM interesting_strings s
    JOIN xrefs x ON x.to_addr = s.addr
    JOIN func_at(x.from_addr) fa
)
SELECT (SELECT name FROM funcs WHERE addr = sf.func_addr) AS func_name,
       printf('0x%X', sf.func_addr) AS addr,
       f.size AS func_size,
       GROUP_CONCAT(sf.matched_string, ' | ') AS strings_referenced
FROM string_funcs sf
JOIN funcs f ON f.addr = sf.func_addr
GROUP BY sf.func_addr
ORDER BY f.size DESC
LIMIT 20;

Find functions referencing both crypto-related and network-related strings

Cross-category correlation for identifying data exfiltration or C2 communication:

sql
-- Functions touching both crypto and network strings
WITH crypto_refs AS (
    SELECT DISTINCT fa.func_addr
    FROM strings s JOIN xrefs x ON x.to_addr = s.addr JOIN func_at(x.from_addr) fa
    WHERE s.content LIKE '%crypt%' OR s.content LIKE '%aes%'
       OR s.content LIKE '%cipher%' OR s.content LIKE '%hash%'
),
network_refs AS (
    SELECT DISTINCT fa.func_addr
    FROM strings s JOIN xrefs x ON x.to_addr = s.addr JOIN func_at(x.from_addr) fa
    WHERE s.content LIKE '%socket%' OR s.content LIKE '%connect%'
       OR s.content LIKE '%send%' OR s.content LIKE '%recv%'
       OR s.content LIKE '%http%'
)
SELECT (SELECT name FROM funcs WHERE addr = c.func_addr) AS func_name,
       printf('0x%X', c.func_addr) AS addr
FROM crypto_refs c
JOIN network_refs n ON n.func_addr = c.func_addr;

See Also

  • disassembly — where strings/bytes are referenced in code (operand-targeted reads).
  • xrefs — data references to a target address; canonical pivot from a data hit to its consumers.
  • debugger — byte patching uses the bytes table; this skill owns the read shapes.
  • analysis — strings/imports as triage signals.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Data」では何ができますか?

Query IDA strings, bytes, and binary data. Use when asked to search strings, find byte patterns, rebuild string tables, or analyze binary content.

TypingMindでDataを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Dataはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにDataをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/allthingsida/idasql-skills/tree/main/plugins/idasql/skills/dataを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Dataを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Dataは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもDataを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Data」は無料ですか?

allthingsidaがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇