Install
openclaw skills install @yottameta/yotta-intel元情 —— 跨智能体的威胁情报 IOC 提取与规范化技能:零依赖自研从文本 / 日志 / 报告中提取 IP(IPv4/IPv6)、域名、URL、邮箱、哈希(MD5/SHA1/SHA256/SHA512)与 CVE 编号,识别并还原 defang 写法,去重、归一化后输出 CSV / JSON / STIX-lite。触发:用户给出含可疑 IP / 域名 / URL / 哈希的威胁情报文本、恶意样本分析报告、钓鱼邮件或日志,要提取 IOC、规范化、去重、转格式、共享情报时。边界:纯本地离线提取与规范化;不联网查证、不下载样本、不主动扫描任何系统;仅用于已获授权 / 自有资产 / 教学环境的安全分析。
openclaw skills install @yottameta/yotta-intel跨智能体的威胁情报 IOC 提取与规范化技能:零依赖自研从威胁情报文本 / 安全报告 / 钓鱼邮件 / 日志中提取 IP(IPv4/IPv6)、域名、URL、邮箱、哈希(MD5/SHA1/SHA256/SHA512)与 CVE 编号, 自动识别 defang(去活性)写法并还原,去重、归一化后输出 CSV / JSON / STIX-lite。
纯 Python 3.8+ 标准库实现,零外部依赖;Windows + Linux + macOS 通用。 纯本地离线处理:不联网查证、不下载样本、不主动扫描任何系统。
Do NOT trigger:
Windows 用 python,Linux/macOS 用 python3。
# 提取文本中的 IOC(默认全部类型,文本输出)
python3 scripts/yotta_intel.py extract --path report.txt
# 从标准输入读取,输出 JSON
cat intel.txt | python3 scripts/yotta_intel.py extract --stdin --format json
# 只提取域名与哈希,且出现次数 >= 2
python3 scripts/yotta_intel.py extract --path intel.md --types domain,hash --min-count 2
# 输出 CSV 供表格 / 平台导入
python3 scripts/yotta_intel.py extract --path intel.md --format csv --output iocs.csv
# 输出 STIX 2.1 Bundle
python3 scripts/yotta_intel.py extract --path intel.md --format stix --output iocs.json
# 把报告转成可安全共享的 defang 版(防误点)
python3 scripts/yotta_intel.py defang --path report.txt --output safe.txt
# 把 defang 情报还原成原始形态
python3 scripts/yotta_intel.py refang --path safe.txt
退出码:0 = 无 IOC(extract);1 = 发现 IOC(extract);4 = 用法或读取错误。 defang / refang 成功均为 0。
extract --path 指向文件,或 --stdin 从管道读取。--min-count 过滤低频噪音。--output 写文件,默认打印。hxxp、[.]、(.)、[dot]、[:]、[@]、[/] 等常见去活性写法并还原;
每条结果自带统一的 defang 安全形态;README.md / test.py 不算域名)+ 中文标点截断 + 哈希长度校验;(类型, 规范值) 为键合并,记录 count / first_line / snippet;详细的类型判定、defang 与 STIX 映射见 references/。
| 类型 | 中文 | 示例 | 说明 |
|---|---|---|---|
| ipv4 | IPv4 地址 | 203.0.113.5 | 合法八位组;前导零归一 |
| ipv6 | IPv6 地址 | 2001:db8::1 | 压缩写法;IPv4-mapped 输出规范十六进制 |
| domain | 域名 | evil.example.com | TLD 白名单;IDN 转 punycode;README.md 不算域名 |
| url | URL | http://evil.example.com/a | http/https/ftp;去默认端口与 fragment |
| 邮箱 | admin@example.com | 域名段校验;defang 形态 admin[@]example[.]com | |
| hash | 哈希 | 44d886…2f | 仅 32/40/64/128 位十六进制 |
| cve | CVE 编号 | CVE-2024-1234 | 统一大写 |
{tool, version, generated, source, summary, indicators[]},indicators 每条含
type / value / defanged / count / first_line / snippet;type,value,defanged,count,first_line,snippet;indicator(pattern + x_yottameta_* 扩展属性)。装不上、提取为空、defang 没还原、退出码看不懂时,先看 references/faq.md(含速查索引与安装排障)。
本技能仅用于已获明确授权的安全分析(自有资产、授权测试、CTF 靶场、教学环境)。 未经授权分析他人系统数据违反中国《网络安全法》与《刑法》相关条款,使用者自行承担法律责任。