Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

ida-domain-scriptingida 域脚本

Agent Skill

ida-domain-scripting 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

318

周安装

13

GitHub Stars

61

下载量

103
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ida-domain-scripting(ida 域脚本)
来源仓库:https://github.com/hexrayssa/ida-claude-plugins
仓库路径:skills/ida-domain-scripting
安装命令:
npx skills add https://github.com/hexrayssa/ida-claude-plugins --skill ida-domain-scripting
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/hexrayssa/ida-claude-plugins --skill ida-domain-scripting

简介

用于查找、检索和筛选与 ida 域脚本相关的资源或实现方式。

  • 适合在特定技术栈中快速定位脚本编写规范或工具链。
  • 需结合项目实际需求验证脚本兼容性和安全性。ida-domain-scripting 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 可通过 npx 命令从 GitHub 仓库安装,适用于 Codex、Claude 等平台。
  • 建议优先选择提供测试用例和部署说明的来源项目。

SKILL.md

IMPORTANT - Path Resolution: This skill can be installed in different locations. Before executing any commands, determine the skill directory based on where you loaded this SKILL.md file, and use that path in all commands below. Replace $SKILL_DIR with the actual discovered path.

Common installation paths:

  • Project-specific: <project>/.claude/skills/ida-domain-scripting
  • Manual global: ~/.claude/skills/ida-domain-scripting

IDA Domain Scripting

General-purpose binary analysis skill. I'll write custom IDAPython code for any reverse engineering task you request and execute it via the universal executor.

CRITICAL WORKFLOW - Follow these steps in order:

  1. Create a work dir in /tmp with timestamp - NEVER write scripts to skill directory; always create a workdir /tmp/ida-domain-YYYYMMDD_HHMMSS_ffffff-<name> with microseconds for uniqueness (e.g., /tmp/ida-domain-20260109_143052_847291-list-functions). Generate timestamp with: datetime.now(). strftime ('%Y%m%d_%H%M%S_%f'). This will always be referenced as <work_dir>
  2. Check API_REFERENCE.md exists - Always check that $SKILL_DIR/API_REFERENCE.md exists. Inform the user to run the bootstrap if not.
  3. Execute from skill directory - Always run: cd $SKILL_DIR && uv run python run.py <work_dir>/script.py -f <binary>
  4. Ask before saving - Scripts that modify the database require explicit user confirmation before using --save

How It Works

  1. You describe what you want to analyze/extract
  2. I write custom IDA Domain API code in <work_dir>/script.py (timestamped with microseconds for parallel execution)
  3. I execute it via: cd $SKILL_DIR && uv run python run.py <work_dir>/script.py -f <binary>
  4. Results displayed in real-time
  5. Script files auto-cleaned from /tmp by your OS

Setup (First Time)

cd $SKILL_DIR && uv run python setup.py

This clones ida-domain from GitHub and installs dependencies. Only needed once.

Using a specific version:

uv run python setup.py --ref v0.1.0   # Specific release
uv run python setup.py --ref main     # Bleeding edge

Requirements:

  • uv package manager
  • git
  • IDA Pro 9.1+
  • IDADIR environment variable pointing to IDA installation

Execution Pattern

Step 1: Write analysis script to <work_dir>

# <work_dir>/script.py
for func in db.functions:
    name = db.functions.get_name(func)
    print(f"{name}: 0x{func.start_ea:08X}")

Step 2: Execute from skill directory

cd $SKILL_DIR && uv run python run.py <work_dir>/script.py -f /path/to/binary

Step 3: Review results

Scripts are auto-wrapped with Database.open() boilerplate. The db variable is available for accessing all entities.

Common Patterns

List All Functions

# <work_dir>/script.py
for func in db.functions:
    name = db.functions.get_name(func)
    size = func.end_ea - func.start_ea
    print(f"{name}: 0x{func.start_ea:08X} - 0x{func.end_ea:08X} ({size} bytes)")

Find Function by Name

# <work_dir>/script.py
func = db.functions.get_function_by_name("main")
if func:
    print(f"Found main at 0x{func.start_ea:08X}")

    # Get callers
    callers = db.functions.get_callers(func)
    print(f"Called by {len(callers)} functions:")
    for caller in callers:
        print(f"  - {db.functions.get_name(caller)}")
else:
    print("main not found")

Search Strings

# <work_dir>/script.py
import re

# Find all strings
for s in db.strings:
    print(f"0x{s.address:08X}: {s}")

# Find URLs
url_pattern = re.compile(r"https?://[\w./]+", re.IGNORECASE)
for s in db.strings:
    try:
        content = str(s)
        if url_pattern.search(content):
            print(f"URL found: {content}")
    except:
        pass

Analyze Cross-References

# <work_dir>/script.py
# Get xrefs TO an address
target = 0x00401000
print(f"References TO 0x{target:08X}:")
for xref in db.xrefs.to_ea(target):
    print(f"  From 0x{xref.from_ea:08X} (type: {xref.type.name})")

# Get xrefs FROM an address
print(f"References FROM 0x{target:08X}:")
for xref in db.xrefs.from_ea(target):
    print(f"  To 0x{xref.to_ea:08X} (type: {xref.type.name})")

Decompile Function

# <work_dir>/script.py
func = db.functions.get_function_by_name("main")
if func:
    try:
        lines = db.functions.get_pseudocode(func)
        print("\n".join(lines))
    except RuntimeError as e:
        print(f"Decompilation failed: {e}")

Analyze Function Complexity

# <work_dir>/script.py
complex_funcs = []
for func in db.functions:
    flowchart = db.functions.get_flowchart(func)
    if flowchart:
        block_count = len(flowchart)
        edge_count = sum(b.count_successors() for b in flowchart)
        cyclomatic = edge_count - block_count + 2

        if cyclomatic > 10:
            name = db.functions.get_name(func)
            complex_funcs.append((name, func.start_ea, cyclomatic))

complex_funcs.sort(key=lambda x: x[2], reverse=True)
print("Most complex functions:")
for name, addr, cc in complex_funcs[:10]:
    print(f"  {name}: complexity={cc} at 0x{addr:08X}")

Search Byte Patterns

# <work_dir>/script.py
# Search for NOP sled
pattern = b"\x90\x90\x90\x90"
results = db.bytes.find_binary_sequence(pattern)
for addr in results:
    print(f"Found NOP sled at 0x{addr:08X}")

# Search for x64 function prologue
prologue = b"\x55\x48\x89\xE5"  # push rbp; mov rbp, rsp
for addr in db.bytes.find_binary_sequence(prologue):
    print(f"Prologue at 0x{addr:08X}")

Export to JSON

# <work_dir>/script.py
import json
from pathlib import Path

functions = []
for func in db.functions:
    name = db.functions.get_name(func)
    functions.append({
        "name": name,
        "start": f"0x{func.start_ea:08X}",
        "end": f"0x{func.end_ea:08X}",
        "size": func.end_ea - func.start_ea,
    })

output = {"module": db.module, "functions": functions}
Path("/tmp/functions.json").write_text(json.dumps(output, indent=2))
print(f"Exported {len(functions)} functions to /tmp/functions.json")

Inline Execution (Simple Tasks)

For quick one-off tasks, you can execute code inline without creating files:

# Quick function count
cd $SKILL_DIR && uv run python run.py -c "print(f'Functions: {len(db.functions)}')" -f binary

# Get binary info
cd $SKILL_DIR && uv run python run.py -c "print(f'{db.module}: {db.architecture} {db.bitness}-bit')" -f binary

When to use inline vs files:

  • Inline: Quick one-off tasks (count functions, get binary info, check if symbol exists)
  • Files: Complex analysis, multi-step tasks, anything user might want to re-run

Advanced Usage

For comprehensive IDA Domain API documentation, see API_REFERENCE.md:

  • Database properties and metadata
  • Function enumeration and analysis
  • String detection and searching
  • Cross-reference queries
  • Byte pattern matching
  • Control flow analysis
  • Decompilation (Hex-Rays)
  • Type information
  • Comments and names

Tips

  • Default is read-only - Use --save only when modifications should persist (and ask user first!)
  • Timeout - Default 30 minutes; use --timeout 0 for long-running analysis
  • No-wrap mode - Use --no-wrap when your script already has Database.open()
  • Error handling - Always use try-except for decompilation and string operations
  • Check for None - Functions like get_function_by_name() return None if not found

Troubleshooting

When encountering errors: Check the ida-domain source code first by searching for the method signature in $SKILL_DIR/ida-domain/ida_domain/. The API may differ from what's documented or expected.

Virtual environment not found:

cd $SKILL_DIR && uv run python setup.py

IDA SDK fails to load / IDADIR error:

export IDADIR=/path/to/ida

Script timeout:

cd $SKILL_DIR && uv run python run.py --timeout 3600 ...  # 1 hour
cd $SKILL_DIR && uv run python run.py --timeout 0 ...     # No timeout

AttributeError: 'Xrefs' has no attribute 'get_xrefs_to': Use db.xrefs.to_ea(addr) not db.xrefs.get_xrefs_to(addr)

AttributeError on func_t object: Call methods on db.functions, not on the func object:

# Wrong: func.get_callers()
# Right: db.functions.get_callers(func)

UnicodeDecodeError when reading strings:

for s in db.strings:
    try:
        content = str(s)
    except:
        continue  # Skip problematic strings

Example Usage

User: "How many functions are in this binary?"

Claude: I'll count the functions. Let me analyze the binary...
[Writes: <work_dir>/script.py]
[Runs: cd $SKILL_DIR && uv run python run.py <work_dir>/script.py -f binary]
[Output: Functions: 250]

The binary contains 250 functions.
User: "Find all functions that call malloc"

Claude: I'll find all callers of malloc...
[Writes: <work_dir>/script.py]
[Runs: cd $SKILL_DIR && uv run python run.py <work_dir>/script.py -f binary]
[Output: malloc called by 15 functions: sub_401000, sub_402000, ...]

Found 15 functions that call malloc:
- sub_401000 at 0x00401000
- sub_402000 at 0x00402000
...
User: "Decompile the main function and save it"

Claude: I'll decompile main and save the output...
[Writes: <work_dir>/script.py]
[Runs: cd $SKILL_DIR && uv run python run.py <work_dir>/script.py -f binary]
[Output: Saved to /tmp/main.c]

Done! The decompiled code is saved to /tmp/main.c

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.34%
按下载量换算38

Claude

30.96%
按下载量换算32

Cursor

17.83%
按下载量换算18

Gemini CLI

9.14%
按下载量换算9

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills