Re plugin dev

From dslsdzc/rev-skills · View interactive version

Re plugin dev is an AI agent skill from the GitHub repository dslsdzc/rev-skills. Ghidra/IDA 插件开发:脚本→插件工程化。 触发词:插件开发、Ghidra插件、IDA插件、插件工程

How to use this skill

Skill file

Ghidra / IDA 插件开发

何时使用 / 何时不用

工具准备

静态分析工具开发可免沙箱;插件跑在分析工具进程内,不执行样本代码(免沙箱,[[re-analyze/platform-tips]] 静态优先)。

Ghidra —— Java 扩展 / Python 脚本

IDA —— idapython 插件

操作步骤

按顺序执行;每个插件产物(源码/构建产物/测试样本与输出)存档 sha256 + 路径,供报告与复用([[re-ioc]] 证据链要求)。

  1. 场景识别(批处理脚本 vs 交互插件):
  1. Ghidra 插件骨架(Java 扩展 / 程序脚本):
  1. IDA 插件骨架(idapython):

```python

# myplugin.py —— 放到 plugins 目录,IDA 启动自动加载

import idaapi

class MyPlugin(idaapi.plugin_t):

flags = idaapi.PLUGIN_KEEP

comment = "demo plugin"

help = ""

wanted_name = "MyPlugin"

wanted_hotkey = "Ctrl-Shift-M"

def init(self):

idaapi.register_action(idaapi.action_desc_t(

"my:action", "My Action", MyAct(), "Ctrl-Shift-M"))

return idaapi.PLUGIN_KEEP

def run(self, arg):

print("hello from MyPlugin")

def PLUGIN_ENTRY():

return MyPlugin()

```

  1. 与现有脚本复用([[re-ghidra]] / [[re-ida]] 的脚本):
  1. 测试与分发:

跨域联合

常见坑与陷阱

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.