【免费下载链接】Decepticon
Autonomous Hacking Agent for Red Team
本文围绕 Decepticon 仓库中 analyst 技能树下的 ti-ioc-extraction SKILL.md 展开,系统讲解如何从威胁情报报告、应急响应日志、paste 转储与原始文本中提取失陷指标(Indicator of Compromise,IOC),并完成规范化、去重与下游消费(MISP、STIX/TAXII 情报源、YARA 规则、黑名单)的全流程。读完本文,你将掌握正则级零依赖提取、ioc-finder 编程式提取、去毒化(defang)与还原(refang)、批量哈希信誉查询、STIX 2.1 Bundle 生成与 MISP 事件推送的完整实战方案,并理解该技能在 Decepticon 技能加载与校验体系中的定位。
技能定位:一份可执行的 analyst 作战手册
ti-ioc-extraction是 Decepticonanalyst子域(subdomain)下的标准技能之一,其 SKILL.md 以 YAML frontmatter 声明元数据:
name: ti-ioc-extraction description: "Automated IOC extraction from threat reports, logs, and unstructured text — parse hashes, IPs, domains, URLs, email addresses, and CVEs. Covers regex-based extraction, defanging/refanging, bulk hash lookup, IOC deduplication, YARA rule generation from IOCs, and STIX/TAXII formatting for sharing." allowed-tools: Bash Read Write metadata: subdomain: analyst when_to_use: "ioc extraction, indicator of compromise, parse hashes, extract ips, extract domains, defang, refang, ioc-finder, ioc_fanger, cyberchef, misp, stix, taxii, yara from iocs, bulk hash lookup, threat report parsing, ioc deduplication" tags: "ioc, extraction, threat-intelligence, defang, refang, stix, taxii, misp, hashes, domains, ips" mitre_attack: "T1590, T1592"其中when_to_use是触发关键词集合,供 Agent 在目标匹配时按需加载(load_skill);allowed-tools: Bash Read Write声明该技能在执行时依赖的交互能力;mitre_attack将技能关联到 ATT&CK 技术编号,使技能目录本身具备战术感知能力。该技能属于 analyst 目录(非攻击面路径),依据 docs/skill-schema.md 的验证规则,mitre_attack并非强制字段,但此处仍给出T1590/T1592以强化情报阶段映射。
快速参考:三行命令完成核心任务
# Install tools pip install ioc-finder ioc_fanger stix2 pymisp # One-shot extraction from a report file python3 -c " from ioc_finder import find_iocs text = open('/workspace/report.txt').read() iocs = find_iocs(text) for k,v in iocs.items(): if v: print(f'{k}: {v}') " # Refang a defanged IOC list python3 -c " from ioc_fanger import fang text = open('/workspace/defanged_iocs.txt').read() print(fang(text)) " > /workspace/refanged_iocs.txt # Quick regex extraction (no deps) grep -oP '\b[0-9a-fA-F]{32}\b' /workspace/report.txt | sort -u > /workspace/md5_hashes.txt grep -oP '\b[0-9a-fA-F]{64}\b' /workspace/report.txt | sort -u > /workspace/sha256_hashes.txt grep -oP '\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b' /workspace/report.txt | sort -u > /workspace/ips.txtMITRE ATT&CK 映射
技能文档将 IOC 提取工作与 ATT&CK 技术建立对应关系,便于在情报收集阶段定位攻防语义:
| Technique | ID | Relevance |
|---|---|---|
| Gather Victim Network Information | T1590 | Extracted IPs, domains, and URLs map victim-facing infrastructure |
| Gather Victim Host Information | T1592 | Extracted file hashes, registry keys, and file paths indicate host-level artifacts |
| Phishing | T1566 | Extracted email addresses and sender domains from phishing report IOCs |
| Indicator Removal | T1070 | Awareness of IOC types attackers attempt to obscure or rotate |
1. 正则级 IOC 提取:零依赖兜底方案
当ioc-finder不可用,或需要对提取边界做精细控制时,使用基于grep -oP(Perl 兼容正则)的提取模式。所有命令统一约定输出目录/workspace/iocs/,并用sort -u去重:
# MD5 hashes (32 hex chars, standalone word boundary) grep -oP '\b[0-9a-fA-F]{32}\b' /workspace/<REPORT> | sort -u > /workspace/iocs/md5.txt # SHA1 hashes (40 hex chars) grep -oP '\b[0-9a-fA-F]{40}\b' /workspace/<REPORT> | sort -u > /workspace/iocs/sha1.txt # SHA256 hashes (64 hex chars) grep -oP '\b[0-9a-fA-F]{64}\b' /workspace/<REPORT> | sort -u > /workspace/iocs/sha256.txt # IPv4 addresses grep -oP '\b(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\b' \ /workspace/<REPORT> | sort -u > /workspace/iocs/ipv4.txt # IPv6 addresses (simplified — catches common forms) grep -oiP '(?:[0-9a-f]{1,4}:){7}[0-9a-f]{1,4}|(?:[0-9a-f]{1,4}:){1,7}:|::(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4}' \ /workspace/<REPORT> | sort -u > /workspace/iocs/ipv6.txt # Domain names (basic, excludes common FPs) grep -oP '(?:a-zA-Z0-9?\.)+(?:com|net|org|io|ru|cn|xyz|top|info|biz|cc|tk|ml|ga|cf|pw|buzz|su|onion)\b' \ /workspace/<REPORT> | sort -u > /workspace/iocs/domains.txt # URLs (http/https/ftp) grep -oP 'https?://[^\s"<>\])+' /workspace/<REPORT> | sort -u > /workspace/iocs/urls.txt # Email addresses grep -oP '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}' \ /workspace/<REPORT> | sort -u > /workspace/iocs/emails.txt # CVE identifiers grep -oP 'CVE-\d{4}-\d{4,7}' /workspace/<REPORT> | sort -u > /workspace/iocs/cves.txt # MITRE ATT&CK technique IDs grep -oP 'T\d{4}(?:\.\d{3})?' /workspace/<REPORT> | sort -u > /workspace/iocs/mitre_ids.txt几点值得注意的模式细节:IPv4 正则使用分段25[0-5]|2[0-4]\d|[01]?\d\d?校验每个八位组取值范围,避免把999.999.999.999之类非法值纳入;域名正则的 TLD 白名单覆盖了com/net/org/io/ru/cn/xyz/top/info/biz/cc/tk/ml/ga/cf/pw/buzz/su/onion等常见与滥用高发后缀,并以\b结尾防止部分匹配;CVE 正则\d{4,7}兼容了 CVE 编号位数扩展后的形态。
误报消减(False Positive Reduction)
原始提取结果必然混入私有地址、良性域名与伪哈希,需要二次过滤:
# Filter out private/reserved IPs from extracted list grep -vP '^(10\.|172\.(1[6-9]|2\d|3[01])\.|192\.168\.|127\.|0\.|255\.)' \ /workspace/iocs/ipv4.txt > /workspace/iocs/ipv4_public.txt # Filter out known benign domains (Google, Microsoft, etc.) grep -viP '(google\.com|microsoft\.com|windowsupdate\.com|apple\.com|amazonaws\.com|cloudflare\.com)$' \ /workspace/iocs/domains.txt > /workspace/iocs/domains_filtered.txt # Remove hash-like strings that are too short or all-zero grep -vP '^0{32,}$' /workspace/iocs/md5.txt | grep -vP '^(.)\1{31,}$' > /workspace/iocs/md5_clean.txt第一条覆盖 RFC 1918 私网段与回环/保留地址;第二条基于白名单后缀剔除主流大厂域名(判定外部 C2 基础设施时尤其必要);第三条剔除全零与全同字符的哈希假阳性——这类字符串常出现在文档占位符中。
2. 去毒化与还原(Defanging / Refanging)
威胁报告为了防误点击,通常将 IOC 去毒化(如hxxp://evil[.]com)。查询信誉库之前必须先还原(refang):
# Refang with ioc_fanger (Python) python3 -c " from ioc_fanger import fang import sys text = sys.stdin.read() print(fang(text)) " < /workspace/defanged_report.txt > /workspace/refanged_report.txt # Manual refang with sed (no deps) sed -e 's/\[.\]/./g' \ -e 's/hxxp/http/g' \ -e 's/hxxps/https/g' \ -e 's/ dot /./g' \ -e 's/\[at\]/@/g' \ -e 's/{dot}/./g' \ /workspace/defanged_report.txt > /workspace/refanged_report.txt # Defang IOCs for safe sharing python3 -c " from ioc_fanger import defang import sys text = sys.stdin.read() print(defang(text)) " < /workspace/iocs/urls.txt > /workspace/iocs/urls_defanged.txt # Manual defang with sed sed -e 's/\./[.]/g' \ -e 's|http://|hxxp://|g' \ -e 's|https://|hxxps://|g' \ -e 's/@/[at]/g' \ /workspace/iocs/urls.txt > /workspace/iocs/urls_defanged.txt常见去毒化模式识别
| Original | Defanged Variants |
|---|---|
192.168.1.1 | 192[.]168[.]1[.]1,192.168.1 .1,192(.)168(.)1(.)1 |
http://evil.com | hxxp://evil[.]com,hxxp://evil(.)com,http[:]//evil.com |
user@evil.com | user[at]evil[.]com,user[@]evil.com |
注意:sed 兜底方案只覆盖主流变体([.]、[at]、{dot}、hxxp[s]),遇到厂商自定义变体(如[dot]、(.))时需按错误处理表中的建议扩展规则,或直接交给ioc_fanger处理。
3. 编程式提取:ioc-finder 全类别管线
ioc-finder单次调用即可覆盖 20 余种 IOC 类型,适合作为主提取引擎:
# Full extraction pipeline python3 << 'PYEOF' from ioc_finder import find_iocs import json, sys text = open('/workspace/<REPORT>').read() iocs = find_iocs(text) # Filter to populated categories only results = {k: list(set(v)) for k, v in iocs.items() if v} with open('/workspace/iocs/extracted.json', 'w') as f: json.dump(results, f, indent=2, default=str) # Summary for category, items in sorted(results.items()): print(f" {category}: {len(items)} unique") print(f"\nTotal categories with hits: {len(results)}") PYEOFfind_iocs自动覆盖的类型包括:
- 哈希类:
md5s、sha1s、sha256s、sha512s、ssdeeps - 网络类:
ipv4s、ipv6s、urls、domains、email_addresses - 主机与身份类:
asns、cves、registry_key_paths、file_paths、mac_addresses - 加密货币与广告类:
bitcoin_addresses、xmpp_addresses、google_adsense_ids、google_analytics_ids
脚本中对每个类别做list(set(v))去重后再落盘extracted.json,并输出每类数量汇总,作为后续去重统计与 STIX 生成的输入。
4. 批量哈希与 IP 信誉查询
提取只是第一步,随后需要与外部情报源比对。技能文档给出了三条查询路径:
# VirusTotal bulk lookup (requires API key) VT_API_KEY="<API_KEY>" while IFS= read -r hash; do result=$(curl -s "https://www.virustotal.com/api/v3/files/$hash" \ -H "x-apikey: $VT_API_KEY") detections=$(echo "$result" | python3 -c " import sys, json d = json.load(sys.stdin) stats = d.get('data',{}).get('attributes',{}).get('last_analysis_stats',{}) print(f\"{stats.get('malicious',0)}/{sum(stats.values())}\")" 2>/dev/null) echo "$hash $detections" >> /workspace/iocs/vt_results.txt sleep 15 # Free API: 4 requests/min done < /workspace/iocs/sha256.txt # MalwareBazaar lookup (free, no rate limit issues) while IFS= read -r hash; do curl -s -X POST "https://mb-api.abuse.ch/api/v1/" \ -d "query=get_info&hash=$hash" \ -o "/workspace/iocs/mb_${hash}.json" done < /workspace/iocs/sha256.txt # AbuseIPDB bulk check ABUSE_KEY="<API_KEY>" while IFS= read -r ip; do result=$(curl -s "https://api.abuseipdb.com/api/v2/check?ipAddress=$ip" \ -H "Key: $ABUSE_KEY" -H "Accept: application/json") score=$(echo "$result" | python3 -c "import sys,json; print(json.load(sys.stdin)['data']['abuseConfidenceScore'])" 2>/dev/null) echo "$ip abuse_score=$score" >> /workspace/iocs/abuse_results.txt done < /workspace/iocs/ipv4_public.txt三条路径的成本与用途不同:VirusTotal 免费档约 4 请求/分钟,脚本中sleep 15即为限速节流;MalwareBazaar(abuse.ch)免费且按哈希精确查询,适合批量比对文件哈希;AbuseIPDB 提供abuseConfidenceScore置信度分值,适合评估 IP 的恶意程度。决策门章节会进一步说明:当哈希超过 100 个时应改用批量接口而非逐条 VT 查询。
5. IOC 去重与规范化
多来源报告(多个厂商、同一战役的多份披露)合并前必须先做类型感知的规范化去重:
python3 << 'PYEOF' import json, hashlib, re from collections import defaultdict with open('/workspace/iocs/extracted.json') as f: iocs = json.load(f) deduped = {} stats = {} for category, items in iocs.items(): # Normalize: lowercase domains/URLs/emails, uppercase hashes if category in ('md5s', 'sha1s', 'sha256s', 'sha512s'): normalized = sorted(set(h.lower() for h in items)) elif category in ('domains', 'urls', 'email_addresses'): normalized = sorted(set(i.lower().rstrip('.') for i in items)) elif category in ('ipv4s', 'ipv6s'): normalized = sorted(set(items)) else: normalized = sorted(set(items)) if normalized: deduped[category] = normalized stats[category] = {'original': len(items), 'deduped': len(normalized)} with open('/workspace/iocs/deduped.json', 'w') as f: json.dump(deduped, f, indent=2) print("Deduplication stats:") for cat, s in sorted(stats.items()): removed = s['original'] - s['deduped'] print(f" {cat}: {s['original']} -> {s['deduped']} (removed {removed} dupes)") PYEOF规范化策略按类型区分:哈希统一小写(h.lower());域名/URL/邮箱统一小写并去除末尾点号(rstrip('.'))——避免evil.com.与evil.com被当成两个指标;IP 保持原样。脚本同时输出每类"原始数量 → 去重后数量 → 移除重复数"的统计,便于在报告中量化多源合并的收益。
6. STIX/TAXII 格式化与 MISP 推送
生成 STIX 2.1 Bundle
需要与外部伙伴共享 IOC 时,标准做法是生成带 TLP 标记的 STIX 2.1 Bundle:
# Convert extracted IOCs to STIX 2.1 bundle python3 << 'PYEOF' from stix2 import (Bundle, Indicator, Identity, MarkingDefinition, TLP_WHITE, TLP_GREEN, TLP_AMBER) import json, datetime identity = Identity( name="Decepticon TI Team", identity_class="organization" ) with open('/workspace/iocs/deduped.json') as f: iocs = json.load(f) indicators = [] # Map IOC types to STIX patterns pattern_map = { 'ipv4s': lambda x: f"[ipv4-addr:value = '{x}']", 'ipv6s': lambda x: f"[ipv6-addr:value = '{x}']", 'domains': lambda x: f"[domain-name:value = '{x}']", 'urls': lambda x: f"[url:value = '{x}']", 'md5s': lambda x: f"[file:hashes.MD5 = '{x}']", 'sha1s': lambda x: f"[file:hashes.'SHA-1' = '{x}']", 'sha256s': lambda x: f"[file:hashes.'SHA-256' = '{x}']", 'email_addresses': lambda x: f"[email-addr:value = '{x}']", } for ioc_type, items in iocs.items(): if ioc_type not in pattern_map: continue for item in items: indicator = Indicator( name=f"{ioc_type.rstrip('s').upper()}: {item}", pattern=pattern_mapioc_type, pattern_type="stix", valid_from=datetime.datetime.now(datetime.timezone.utc), created_by_ref=identity.id, object_marking_refs=[TLP_AMBER], labels=["malicious-activity"] ) indicators.append(indicator) bundle = Bundle(objects=[identity] + indicators) with open('/workspace/iocs/stix_bundle.json', 'w') as f: f.write(bundle.serialize(pretty=True)) print(f"STIX bundle: {len(indicators)} indicators in {len(iocs)} categories") PYEOF要点:每种 IOC 类型映射到对应的 STIX 模式(pattern)——IP 用[ipv4-addr:value = '...'],哈希用[file:hashes.'SHA-256' = '...']等;所有 Indicator 均挂到created_by_ref(Identity)与object_marking_refs=[TLP_AMBER]标记之下;pattern_type="stix"表明模式采用 STIX 模式语法。pattern_map中未覆盖的类别(如 asns、file_paths)会被跳过而非报错,保证脚本对任意提取结果都可安全运行。
推送 MISP 事件
# Upload IOCs to MISP instance python3 << 'PYEOF' from pymisp import PyMISP, MISPEvent, MISPAttribute import json misp = PyMISP('<MISP_URL>', '<MISP_API_KEY>', ssl=False) event = MISPEvent() event.info = "IOCs extracted from <REPORT_NAME>" event.distribution = 0 # Organization only event.threat_level_id = 2 # Medium event.analysis = 1 # Ongoing with open('/workspace/iocs/deduped.json') as f: iocs = json.load(f) type_map = { 'ipv4s': 'ip-dst', 'domains': 'domain', 'urls': 'url', 'md5s': 'md5', 'sha1s': 'sha1', 'sha256s': 'sha256', 'email_addresses': 'email-src', } for ioc_type, items in iocs.items(): misp_type = type_map.get(ioc_type) if not misp_type: continue for item in items: attr = MISPAttribute() attr.type = misp_type attr.value = item attr.to_ids = True event.add_attribute(**attr) result = misp.add_event(event) print(f"MISP event created: {result.get('Event', {}).get('id', 'ERROR')}") PYEOFMISP 推送脚本将去重后的 IOC 映射为 MISP 属性类型(ip-dst、domain、url、md5、sha1、sha256、email-src),全部设置to_ids = True使其参与 IDS 告警匹配;事件元数据默认distribution = 0(仅本组织)、threat_level_id = 2(中等)、analysis = 1(分析中),可按需调整。遇到自签名证书的 MISP 实例时使用ssl=False(错误处理表有专门条目)。
7. CyberChef Recipes 快速处理
CyberChef 提供浏览器端可视化 IOC 变换,适合在无 Python 依赖的临时场景快速处理:
# Extract IPs — CyberChef recipe (paste into recipe URL) Extract_IP_addresses()&Sort('Line feed',false,'Alpha')&Unique('Line feed') # Extract URLs Extract_URLs(false)&Sort('Line feed',false,'Alpha')&Unique('Line feed') # Extract email addresses Extract_email_addresses(false)&Unique('Line feed') # Defang URLs Defang_URL(true,true,true,'Valid domains and full URLs') # Decode Base64-encoded IOCs (common in obfuscated reports) From_Base64('A-Za-z0-9+/=',true,false)&Extract_IP_addresses() # Hex-encoded IOC decode From_Hex('Auto')&Extract_URLs(false) # Full pipeline: decode + extract + defang + dedup From_Base64('A-Za-z0-9+/=',true,false)&Extract_URLs(false)&Unique('Line feed')&Defang_URL()这些 recipe 本质上是把本文第 1、2 节的操作固化为可复用的变换链:Extract_*负责提取、Unique('Line feed')负责去重、Defang_URL()负责输出侧去毒化,而From_Base64/From_Hex解决了混淆报告(Base64/十六进制编码的 IOC)这一常见输入形态。
工具与资源速查
| Tool | Purpose | Install |
|---|---|---|
| ioc-finder | Python IOC extractor — 20+ IOC types | pip install ioc-finder |
| ioc_fanger | Defang/refang IOC strings | pip install ioc_fanger |
| CyberChef | Browser-based IOC transforms | 浏览器端工具 |
| PyMISP | Python MISP API client | pip install pymisp |
| stix2 | STIX 2.1 Python library | pip install stix2 |
| MalwareBazaar | Free hash lookup (abuse.ch) | API:mb-api.abuse.ch |
| VirusTotal | Hash/IP/domain lookup | API key required |
| AbuseIPDB | IP reputation lookup | API key required |
| ThreatFox | IOC sharing (abuse.ch) | API:threatfox-api.abuse.ch |
检测签名速查
技能文档还提供了一组可直接用于正则检测的签名模式,用于在日志或报告中快速标记可疑 IOC:
| Pattern | Indicates | Example Match |
|---|---|---|
[0-9a-fA-F]{32} | MD5 hash | d41d8cd98f00b204e9800998ecf8427e |
[0-9a-fA-F]{40} | SHA1 hash | da39a3ee5e6b4b0d3255bfef95601890afd80709 |
[0-9a-fA-F]{64} | SHA256 hash | e3b0c44298fc1c149afbf4c8996fb924... |
hxxp[s]?:// | Defanged URL | hxxps://evil[.]com/payload |
[.]in hostname | Defanged domain/IP | 192[.]168[.]1[.]1 |
CVE-\d{4}-\d{4,} | CVE identifier | CVE-2024-12345 |
T\d{4}(\.\d{3})? | MITRE technique ID | T1566.001 |
错误处理与边界情况
| Problem | Cause | Solution |
|---|---|---|
| Hash regex matches CSS colors | 6-char hex without word boundary | Use\banchors + length check (32/40/64) |
| IP regex matches version strings | 1.2.3.4in software versions | Cross-reference with CIDR ranges; discard private IPs if hunting external C2 |
| ioc-finder returns empty | Input encoding issue (UTF-16, BOM) | Convert to UTF-8 first:iconv -f UTF-16 -t UTF-8 |
| VT rate limit hit | Free API = 4 req/min | Addsleep 15between requests; use premium key for bulk |
| STIX bundle too large | Thousands of IOCs | Split into per-type bundles or paginate |
| MISP event creation fails | SSL cert / auth error | VerifyMISP_URL, API key, and setssl=Falsefor self-signed |
| Defanged IOCs not caught | Unusual defang format ({dot},[dot]) | Extend sed/regex to cover vendor-specific defang styles |
| Duplicate IOCs across reports | Multiple sources, same campaign | Merge with dedup script before MISP import |
决策门(Decision Gate):按输入形态选择处理路径
技能文档以决策门形式固化了源文件类型与处理策略的对应关系,这是该技能最具实操价值的部分:
IF source is a PDF/DOCX threat report → Extract text first (pdftotext / python-docx), then run ioc-finder IF source is a raw paste / email dump → Refang first (ioc_fanger), then extract IF > 100 hashes extracted → Use bulk lookup (MalwareBazaar batch API) instead of per-hash VT queries IF IOCs need sharing with external partners → Format as STIX 2.1 bundle with TLP marking IF IOCs are for internal blocklist only → Export as flat CSV: type,value,first_seen,source IF ioc-finder unavailable → Fall back to grep-based regex extraction (Section 1)项目集成:Decepticon 中如何加载与校验该技能
ti-ioc-extraction 不是一份孤立的文档,而是 Decepticon 技能体系的一个节点。理解其加载机制有助于在实战中正确触发它。
渐进式披露与按需加载
Decepticon 的 SkillsMiddleware 将技能目录以"渐进式披露(Progressive Disclosure)"的方式注入系统提示:Agent 首先看到按 subdomain 分组的技能目录(_format_skills_list依据metadata.subdomain分组,并内联展示 MITRE ATT&CK 标签与when_to_use触发词),当当前目标命中触发词时,再通过load_skill()加载完整 SKILL.md 正文。技能文档中明确要求"在任务匹配到技能触发词时,先加载技能再行动",避免依赖 Agent 通用记忆执行。
从 middleware/skills.py 的访问规则可见,load_skill接受三类路径形式:精确的/skills/.../*.md路径、相对的standard/.../SKILL.md路径、或唯一 slug(如ti-ioc-extraction),且/skills/目录只能通过load_skill访问(in-process FilesystemBackend 提供),不能用read_file或bash cat绕过。这意味着本文中的所有操作步骤(Bash/Read/Write 工具调用)应发生在工作区/workspace/内,而技能正文本身由中间件注入。
SKILL.md Schema 校验
仓库 docs/skill-schema.md 定义了全部 SKILL.md 的创作契约:必须包含name、description、metadata.subdomain、metadata.when_to_use,mitre_attack格式必须匹配T\d{4}(\.\d{3})?(Enterprise)、T0\d{3}(\.\d{3})?(ICS)或AML\.T\d{4}(ATLAS)。CI 通过python -m decepticon.skill_audit对技能树执行校验,违反规则会报出R-missing-required、R-bad-subdomain、R-bad-mitre-format、R-no-attribution等违规编号(见 skill_audit/rules.py)。
值得注意的细节:该技能 frontmatter 中的allowed-tools: Bash Read Write在 docs/skill-schema.md 中被标注为 "VESTIGIAL"(遗留字段)——生产中间件并不读取它,工具分派不以技能为门控;而metadata.kind字段同样是已废弃设计。因此阅读该文档时,allowed-tools应理解为技能执行预期的工具面描述,而非强制 ACL。此外,R-no-attribution规则对/skills/*/analyst/路径下的文件豁免强制归因要求,ti-ioc-extraction 位于analyst目录下,其mitre_attack: "T1590, T1592"属于主动提供而非强制约束。
与兄弟技能的闭环协同
ti-ioc-extraction 在 analyst 技能树中与多个技能形成上下游闭环:
- 下游 YARA 生成:ti-yara-hunting 的 "TI Report-to-YARA Conversion" 章节明确要求先用
ti-ioc-extraction技能从报告中提取 IOC,再据此构建 YARA 规则——哈希写入meta:段用于关联,域名/URL 转成ascii nocase文本字符串,文件路径转成ascii wide(注意转义反斜杠),Snort/Suricata 的content:"/gate.php"匹配项转成$uri = "/gate.php" ascii。这样一份威胁报告从"提取指标"到"产出可部署检测规则"就形成了完整链路。 - 情报回查:ti-anyrun-lookup 提供基于沙箱语料的 IOC 回查语法(
sha256:"..."、domainName:"..."、destinationIP:"..."),可将本文提取出的哈希、域名、IP 与历史沙箱执行会话关联,反哺战役归因。 - 取证输出:Forensicator 代理提示词 定义了
iocs: [{"type": "sha256", "value": "...", "node_id": "ind-..."}]的手递交接格式,每个 IOC 对应一个Indicator图节点,与攻击侧Finding节点相连,从而闭环"攻击 → 检测"回路——这正是 IOC 提取在 Decepticon 知识图谱(KG)中的最终落点。 - 战役技能编排:skillogy 种子目录 中的
dfir-triage也标注了 "IOC extraction, attack to detection",与 analyst 技能形成跨子域的知识关联。
总结
ti-ioc-extraction 技能的价值在于把"从非结构化文本到可消费 IOC 资产"的完整流水线收敛为一份可执行的作战手册:正则级方案保证零依赖可用性,ioc-finder方案保证类型覆盖面,去毒化/还原解决报告文本的现实形态,去重与规范化解决多源合并,STIX/MISP 解决共享与告警落地,CyberChef 提供浏览器端快捷路径,而决策门把不同输入形态映射到最合适的处理策略。在 Decepticon 的 skill 体系中,它通过when_to_use触发词被中间件按需加载,向下衔接 YARA 规则生成,向情报库衔接沙箱回查,向知识图谱衔接 Indicator 节点,是 analyst 情报工作流中承上启下的关键一环。
【免费下载链接】Decepticon
Autonomous Hacking Agent for Red Team
相关推荐
从入门到精通:runtime1/runtime三大运行时(Tokio/Native/Raw)对比与选择
从入门到精通:runtime1/runtime三大运行时(Tokio/Native/Raw)对比与选择 runtime1/runtime 是一个强大的异步软件开
Decepticon 威胁情报实战:ANY.RUN 免费版 TI Lookup 与八大 APT 组织 IOC 速查手册
Decepticon 威胁情报实战:ANY.RUN 免费版 TI Lookup 与八大 APT 组织 IOC 速查手册 本文基于仓库内 anyrun free
终极威胁情报自动化指南:如何用dnstwist实现IOC提取与共享
终极威胁情报自动化指南:如何用dnstwist实现IOC提取与共享 在网络安全领域, dnstwist域名变形检测工具 是威胁情报自动化中不可或缺的利器。这个强
网络安全应用安全
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考