
Splunk 威胁情报富集管道构建指南从 Feed 配置到 IOC 关联搜索的完整落地模板【免费下载链接】Anthropic-Cybersecurity-Skills817 structured cybersecurity skills for AI agents · Mapped to 6 frameworks: MITRE ATTCK, NIST CSF 2.0, MITRE ATLAS, D3FEND, NIST AI RMF MITRE F3 (Fight Fraud) · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI 20 platforms · 29 security domains · Apache 2.0项目地址: https://gitcode.com/GitHub_Trending/an/Anthropic-Cybersecurity-Skills本文以 template.md 这份可复用的工程模板为核心结合 SKILL.md 中完整的环境配置示例、scripts/process.py 与 scripts/agent.py 的源码实现以及 references 目录下的标准与工作流说明系统讲解如何在 Splunk Enterprise SecurityES中落地一套威胁情报Threat Intelligence, TI富集管道。读者将掌握威胁情报 Feed 的接入与配置、IOC 在 KV Store 中的标准化建模、基于 Lookup 的关联搜索模板以及面向长期运维的 Feed 健康度量方法从而把外部威胁情报转化为可直接告警、可度量质量的 SOC 检测能力。威胁情报富集的整体脉络Splunk Enterprise Security 的 Threat Intelligence Framework 让 SOC 团队能够自动将失陷指标IOC与安全事件进行关联。整个体系的核心思路是外部威胁情报源 → 模块化输入Modular Inputs拉取与解析 → KV Store 集合统一存储 → Lookup 表封装 → 关联搜索匹配事件 → 生成带情报上下文的 Notable Events。这一链路在 SKILL.md 中有清晰的架构图示External TI Sources (STIX/TAXII, CSV, API) | v Modular Inputs (download and parse feeds) | v KV Store Collections (normalized IOC storage) |-- ip_intel |-- domain_intel |-- file_intel |-- url_intel |-- email_intel | v Threat Intelligence Lookups | v Correlation Searches (match events against IOCs) | v Notable Events (enriched with TI context)而assets/template.md正是这套架构在工程落地时的填表式实施模板它用四张表把整条管道拆解为 Feed 配置、KV Store 集合建模、关联搜索模板、Feed 健康仪表盘四个阶段。下文将逐阶段展开并结合仓库源码给出可直接上手的完整配置。Feed 配置定义情报源接入基线模板的第一张表是 Feed 配置登记表用于为每个威胁情报源建立统一的接入基线字段说明Feed Name情报源名称如AlienVault_OTX、AbuseIPDBSource来源标识用于溯源与统计模板中的source字段会写入每条 IOC 记录Feed TypeSTIX/TAXII / CSV / API / Manual 四选一Polling Interval轮询拉取间隔秒决定情报新鲜度IOC TypesIP / Domain / Hash / URL / Email 五类指标Confidence Threshold置信度阈值低于该值的指标不参与告警在 SKILL.md 中前两类 Feed Type 都有对应的inputs.conf示例。STIX/TAXII 订阅式情报源的配置如下# inputs.conf - TAXII feed configuration [threatlist://taxii_feed_example] description TAXII 2.1 Threat Feed type taxii url https://threatfeed.example.com/taxii2/ collection threat-indicators-v21 polling_interval 3600 api_key encrypted_api_key disabled falseCSV 型黑名单例如内部威胁名单的配置则更轻量# inputs.conf - CSV threat list [threatlist://custom_blocklist] description Internal threat blocklist type csv url https://internal.company.com/threat-feeds/blocklist.csv polling_interval 1800 disabled false对于 API 型 Feed如 AlienVault OTXSplunk 提供了自定义 Modular Input 的扩展方式。SKILL.md 给出了一段基于splunklib.modularinput的 OTX 采集器骨架通过get_scheme()声明api_key必填与pulse_days可选默认 30两个参数在stream_events()中携带X-OTX-API-KEY请求头调用https://otx.alienvault.com/api/v1/pulses/subscribed把返回的 pulse 中的 indicators 逐条封装为Event写入事件流。异常路径通过ew.log(ERROR, ...)记录保证采集失败可观测。这一模式可复用于 MISP、VirusTotal、AbuseIPDB 等任何具备 REST API 的情报源。仓库中的 scripts/agent.py 同样实现了fetch_otx_pulse_iocs(pulse_id)通过https://otx.alienvault.com/api/v1/pulses/{pulse_id}/indicators抓取指定 pulse 的 IOC 列表并对非 200 响应与异常分别返回结构化错误信息——可作为采集逻辑的最小可运行参考。KV Store CollectionIOC 标准化的存储模型模板的第二张表定义了 KV Store 集合的字段模型这是整条管道的数据契约字段类型说明_keystring唯一指标哈希去重主键indicator_valuestringIOC 值threat_typestringC2 / Phishing / Malware / Scannerconfidencenumber0-100sourcestring情报源名称severitystringcritical / high / medium / lowfirst_seentime首次观测时间last_seentime最近观测时间_key的生成逻辑在 scripts/process.py 中有源码级定义对{indicator_type}:{value}:{source}拼接串做 SHA256 哈希并截取前 16 位十六进制从而保证同一来源的同一指标天然去重不同来源的相同指标则因 source 不同而得以保留。实际的集合定义写在collections.conf中。SKILL.md 给出了三类典型集合的字段声明# collections.conf [ip_threat_intel] field.ip string field.threat_type string field.confidence number field.source string field.description string field.first_seen time field.last_seen time field.severity string [domain_threat_intel] field.domain string field.threat_type string field.confidence number field.source string field.whois_registrar string field.whois_created string [file_hash_intel] field.file_hash string field.hash_type string field.malware_family string field.confidence number field.source string field.detection_names string可以看到实际字段集在模板基础上扩展了description、whois_registrar、malware_family等辅助字段用于支撑后续关联搜索的上下文展示。scripts/agent.py 中维护的SPLUNK_TI_COLLECTIONS字典则从代码侧印证了这套集合命名与字段布局ip_intel、domain_intel、file_intel、email_intel各自绑定独立字段列表与对应 lookup 名称。此外references/standards.md 给出了不同 IOC 类型应设置的置信度阈值基线可作为模板中Confidence Threshold字段的填表参考IOC 类型Splunk 集合置信度阈值IP 地址ip_intel 70%域名domain_intel 70%文件哈希SHA256file_intel 80%URLurl_intel 75%邮箱地址email_intel 80%关联搜索模板事件与 IOC 的匹配骨架模板第三部分给出了通用关联搜索模板它是所有具体关联搜索的母版| tstats summariesonlytrue count from datamodelDataModel by fields, _time span5m | rename DataModel.* as * | lookup lookup_name match_field as event_field OUTPUT threat_type, confidence, source as ti_source | where isnotnull(threat_type) AND confidence threshold | eval descriptionTI match: .matched_field. (.threat_type.)逐段拆解其语义tstats ... from datamodelDataModel直接从 CIM 数据模型读取统计结果summariesonlytrue优先使用加速后的 TStats 摘要保证在 ES 大数据量下可高效执行rename DataModel.* as *去除字段前缀便于后续 lookup 直接使用裸字段名lookup lookup_name match_field as event_field将事件字段与 KV Store 情报集合匹配并把threat_type、confidence、source输出为事件上下文where isnotnull(threat_type) AND confidence threshold过滤出命中情报且置信度超过阈值的记录——这是控制误报率的第一道闸门eval description...把命中结果拼接为可读的描述文本直接进入告警摘要。在 SKILL.md 中该模板被实例化为 IP、域名、文件哈希三个生产可用的关联搜索。IP 关联基于Network_Traffic数据模型并叠加资产 lookup 与紧急度评分| tstats summariesonlytrue count from datamodelNetwork_Traffic where All_Traffic.actionallowed by All_Traffic.src_ip, All_Traffic.dest_ip, All_Traffic.dest_port, _time span5m | rename All_Traffic.* as * | lookup ip_threat_intel_lookup ip as dest_ip OUTPUT threat_type, confidence, source as ti_source, severity as ti_severity | where isnotnull(threat_type) | lookup asset_lookup ip as src_ip OUTPUT asset_name, asset_owner, asset_priority | eval urgencycase( ti_severitycritical AND asset_prioritycritical, critical, ti_severityhigh OR asset_prioritycritical, high, ti_severitymedium, medium, true(), low ) | eval descriptionConnection from .src_ip. (.asset_name.) to known malicious IP .dest_ip. (.threat_type.) - Source: .ti_source域名关联针对 DNS 查询日志并按置信度动态分级indexdns sourcetypestream:dns query_typeA OR query_typeAAAA | lookup domain_threat_intel_lookup domain as query OUTPUT threat_type as domain_threat, confidence as domain_confidence, source as ti_source | where isnotnull(domain_threat) AND domain_confidence 70 | stats count dc(src_ip) as unique_sources values(src_ip) as source_ips by query, domain_threat, ti_source | eval severitycase(domain_confidence 90, critical, domain_confidence 70, high, true(), medium) | eval descriptionDNS queries to malicious domain .query. from .unique_sources. hosts - Threat: .domain_threat文件哈希关联则针对 Sysmon 进程创建事件EventCode1命中已知恶意软件族即标记为 criticalindexendpoint sourcetypesysmon EventCode1 | lookup file_hash_intel_lookup file_hash as Hashes OUTPUT malware_family, confidence as hash_confidence, source as ti_source | where isnotnull(malware_family) | stats count values(ParentCommandLine) as parent_commands by Computer, User, Image, malware_family, ti_source | eval severitycritical | eval descriptionKnown malware .malware_family. executed on .Computer. by .User. - Binary: .Imagescripts/process.py 的generate_spl_correlation()方法以字典形式内建了 IP、域名、文件哈希三类关联搜索的 SPL 模板字符串与 SKILL.md 中的写法保持一致可在离线环境中直接生成查询scripts/agent.py 的build_spl_correlation_search()则提供了一套基于官方集合命名ip_intel_lookup等的简化版本适合快速验证。多源富集管道上下文叠加与聚合单一情报源的命中往往信息量不足。模板背后的设计意图之一是让同一事件能够叠加多个来源的上下文。SKILL.md 给出的多源富集管道在同一 SPL 查询内完成威胁情报 地理信息 WHOIS 组织归属的三重叠加indexfirewall sourcetypepan:traffic actionallowed | eval indicatorsmvappend(src_ip, dest_ip) | mvexpand indicators | lookup ip_threat_intel_lookup ip as indicators OUTPUT threat_type as ip_threat, confidence as ip_confidence, source as ip_ti_source | lookup geo_ip_lookup ip as indicators OUTPUT country, city, latitude, longitude | lookup whois_lookup ip as indicators OUTPUT org as ip_org, asn as ip_asn | where isnotnull(ip_threat) | stats count values(ip_threat) as threat_types values(ip_ti_source) as intel_sources values(country) as countries values(ip_org) as organizations latest(_time) as last_seen earliest(_time) as first_seen by src_ip, dest_ip, dest_port | eval enrichment_contextThreat: .mvjoin(threat_types, , ). | Geo: .mvjoin(countries, , ). | Org: .mvjoin(organizations, , )其中mvappendmvexpand先把源/目的 IP 展开为多值并逐行匹配随后用stats ... values()重新聚合最终用enrichment_context字段生成一段威胁 地理 组织的富集摘要直接供告警描述与分析师速览使用。这种事件多字段展开匹配 多 lookup 并行富集 聚合回填的模式正是模板中单字段关联搜索在生产环境下的进阶形态。scripts/process.py 的simulate_correlation()提供了对应的离线验证逻辑它将 KV Store 中的 IP、域名指标构造成字典逐事件匹配dest_ip与domain字段输出带match_type、threat_type、confidence、severity的命中记录——可以在没有真实 Splunk 环境的条件下先行验证管道逻辑的正确性。Feed 健康仪表盘质量度量与运维监控情报管道上线后真正的长期工作在于度量并维护 Feed 质量。模板第四张表给出了五个核心运维指标及其目标值指标当前值目标值活跃指标总量Total active indicatorsFeed 新鲜度平均指标年龄 7 天命中率近 30 天 0.5%误报率 5%Feed 重叠率 30%SKILL.md 给出了两个可直接复用的度量查询。IOC 覆盖率统计按来源与威胁类型聚合用于观察各 Feed 的贡献分布| inputlookup ip_threat_intel_lookup | stats count by source, threat_type | sort -count | head 20Feed 新鲜度监控则计算指标平均年龄并输出 FRESH / AGING / STALE 三档状态直接对应模板中 7 天的目标线| inputlookup ip_threat_intel_lookup | eval age_daysround((now() - strptime(last_seen, %Y-%m-%dT%H:%M:%S)) / 86400, 0) | stats count avg(age_days) as avg_age_days max(age_days) as max_age_days by source | eval statuscase(avg_age_days 30, STALE, avg_age_days 7, AGING, true(), FRESH)references/workflows.md 进一步提供了更细粒度的质量分级标准可直接映射到模板目标值上指标良好警告严重Feed 延迟 1 小时1-24 小时 24 小时误报率 5%5-15% 15%命中率 1%0.1-1% 0.1%覆盖重叠 30%30-60% 60%指标新鲜度 7 天7-30 天 30 天将这些阈值配置为告警后即可在 Feed 老化、命中率异常下滑时第一时间得到通知避免死情报持续消耗计算资源。IOC 生命周期管理与管道自动化一套健康的富集管道还依赖明确的 IOC 生命周期管理。references/workflows.md 给出了完整的六阶段流水线Ingestion -- Validation -- Active Use -- Aging -- Expiration -- Removal | | | | | v v v v v Raw feeds Dedup and Correlation Reduce Archive parsed confidence matching confidence or delete scoring weighting从解析原始 Feed到去重与置信度评分再到关联匹配随后指标进入老化阶段逐步降低置信度权重最终过期后归档或删除。scripts/process.py 用is_expired(max_age_days90)实现了过期判定逻辑默认 90 天未观测即视为过期ThreatFeed.get_active_indicators()会在入库存时过滤过期指标并统计expired_removed数量为仪表盘提供运维数据。在自动化运维层面references/api-reference.md 提供了 Splunk KV Store REST API 的调用方式可支撑脚本化入库与批量维护。核心操作包括创建集合、插入单条记录、批量插入# 创建集合 curl -k -u admin:pass -X POST \ https://localhost:8089/servicesNS/nobody/SA-ThreatIntelligence/storage/collections/config \ -d nameip_intel # 插入单条记录 curl -k -u admin:pass -X POST \ https://localhost:8089/servicesNS/nobody/SA-ThreatIntelligence/storage/collections/data/ip_intel \ -H Content-Type: application/json \ -d {ip:198.51.100.42,threat_key:c2_server,weight:3} # 批量插入 curl -k -u admin:pass -X POST \ https://localhost:8089/servicesNS/nobody/SA-ThreatIntelligence/storage/collections/data/ip_intel/batch_save \ -H Content-Type: application/json \ -d [{ip:1.2.3.4,threat_key:malware},{ip:5.6.7.8,threat_key:c2}]同时Splunk 官方 Python SDKsplunklib.client也支持对 KV Store 集合的直接读写适合将 IOC 入库整合进 CI/CD 或 SOAR 编排流程。scripts/agent.py 中的generate_splunk_lookup_csv()则提供了另一条轻量路径将转换后的 IOC 行数据直接生成 CSV可导入静态 Lookup 表作为 KV Store 方案的补充。结语把模板变成一条可持续运行的管道assets/template.md的价值在于把 Splunk 威胁情报富集这样一个多组件工程压缩成四张可填写的表Feed 配置表定义情报从哪里来、多久拉一次、置信度门槛多高KV Store 表定义IOC 以什么模型存储、如何保证唯一关联搜索模板定义事件如何命中 IOC、命中后如何产出上下文Feed 健康表则回答管道是否健康、何时需要干预。配合 SKILL.md 中的inputs.conf、collections.conf、transforms.conf与三段生产级关联搜索以及 process.py、agent.py 提供的离线验证与辅助转换能力你可以从零搭建一条可配置、可搜索、可度量的威胁情报富集管道显著压缩 SOC 事件研判时间。适用前提说明本文所有配置与脚本以 Splunk Enterprise Security 7.x 及以上版本、Threat Intelligence Management 附加组件或 Threat Intelligence Framework 为运行前提且需要 KV Store 启用、具备 Modular Input 配置的管理员权限不同 ES 版本对threatlist模块的具体参数名可能存在差异落地时请以当前环境的实际版本文档为准。【免费下载链接】Anthropic-Cybersecurity-Skills817 structured cybersecurity skills for AI agents · Mapped to 6 frameworks: MITRE ATTCK, NIST CSF 2.0, MITRE ATLAS, D3FEND, NIST AI RMF MITRE F3 (Fight Fraud) · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI 20 platforms · 29 security domains · Apache 2.0项目地址: https://gitcode.com/GitHub_Trending/an/Anthropic-Cybersecurity-Skills创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考