Re ioc

From dslsdzc/rev-skills · View interactive version

Re ioc is an AI agent skill from the GitHub repository dslsdzc/rev-skills. IOC 提取与 YARA 规则、报告结构。 触发词:IOC、YARA、写规则、分析报告、hash列表

How to use this skill

Skill file

IOC 提取与 YARA 规则

何时使用 / 何时不用

工具准备

本技能以静态处理为主(写规则/扫描文件),不运行样本;运行样本只在 [[re-sandbox]] 内(默认沙箱最高原则,见 [[re-analyze/platform-tips]])。

yara —— 规则引擎

pefile —— PE 结构解析(写 PE 特征用)

VT / grep.app 查询(可选)

```sh

curl -s --request GET \

--url "https://www.virustotal.com/api/v3/search?query=<sha256>" \

-H "x-apikey: $VT_API_KEY" | python3 -m json.tool

```

验证: 带 key 的请求返回 JSON(401 说明 key 无效)

sha256sum / md5sum(IOC 哈希)

操作步骤

按顺序执行,每步记下结果。

  1. 提取 IOC(按来源分类):
  1. YARA 规则编写(特征选择 + 评分):

```yara

rule Win32_FamilyX_Dropper {

meta:

description = "FamilyX dropper 检测"

author = "analyst"

score = 4

strings:

$url = "http://c2.example.org" ascii wide

$mutex = "Global\\FamilyX_mutex" ascii wide

$pe = { 4D 5A 90 00 }

condition:

uint16(0) == 0x5A4D and (2 of them)

}

```

  1. 报告结构(按五段写):
  1. 规则验证(yara 扫描样本):

```sh

yara rule.yar sample.exe # 命中 → 规则有效

yara -s rule.yar sample.exe # 显示命中的特征串,与样本实际内容核对

yara rule.yar benign_samples/* # 误报测试: 已知良性样本目录应 0 命中

```

跨域联合

常见坑与陷阱

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.