02 CTI Baseline Reuse and Ownership - jiale-li-orion/SecFusionAgent GitHub Wiki
CTI 基线、复用与 Ownership
English | 中文
本文记录 SecFusionAgent 进入 Technical Design 前需要固定的 CTI(Cyber Threat Intelligence,网络威胁情报)复用基线、传统 analyst 工作流、规则体系和能力归属。本文承接 01-Data-Sources-and-Processing 的数据处理 contract,不重复定义 source registry、证据、object/relation 和 retrieval index;数据库产品、部署拓扑和具体框架选型留给 Technical Design。
目标是先采用成熟 CTI 标准、平台和规则能力,再把 LLM/Agent 放到传统流程中仍依赖人工语义判断的环节。SecFusionAgent 的实现价值来自 AI Security 场景下的数据组织、语义处理、调查和证据使用,不来自重写已有 CTI 基础设施。
现有 CTI workflow
成熟 CTI 平台已经把结构化 feed、文件导入、IOC 提取、对象规范化、相关性计算和情报共享做成通用能力。人工工作集中在新来源接入、非结构化内容理解、模糊实体对齐、关系确认、冲突处理和调查判断。
OpenCTI 的 automated import 支持 connector、stream、TAXII、RSS、CSV 等持续输入;文件导入覆盖 STIX、MISP、YARA、PDF、text、HTML、Markdown,文档解析结果可以先进入 draft/workbench,由 analyst 检查实体和关系后再进入正式知识库。MISP 提供 free-text、URL、CSV、STIX、邮件、附件和 feed 导入,并使用 parser/module 提取 observable。TheHive 在 case 中保存 observable、task 与调查上下文,analyst 可以调用 Cortex analyzer 做 enrichment,再选择哪些结果进入 case。
因此传统工作流可以归纳为以下职责:
| 阶段 | 现有自动化能力 | Analyst 主要工作 |
|---|---|---|
| source 接入 | connector、feed、TAXII、RSS、API | 找新来源,配置访问、mapping、可信度与周期 |
| collection | API/Git/RSS/file import | 处理异常来源、报告、邮件、URL 和缺失字段 |
| explicit extraction | regex、freetext parser、CSV/JSON mapper | 校验上下文,删除误识别,补语义字段 |
| normalization | schema mapper、deterministic ID、分类体系 | 处理 alias、产品/版本、同名对象和模糊身份 |
| correlation | IOC exact/fuzzy/CIDR、graph rule | 判断关系是否具有业务语义,处理误关联 |
| enrichment | external analyzer、connector、lookup | 选择 enrichment、解释结果、处理来源冲突 |
| TTP / attack-chain mapping | ATT&CK/knowledge base、部分 NLP | 从自然语言中识别隐式行为、条件和因果关系 |
| curation | warninglist、score、filter | 判断来源质量、置信度、发布与共享范围 |
| investigation | playbook、analyzer、case 工作流 | 决定下一步调查动作,把证据组织成结论 |
SecFusionAgent 的自动化重点落在右侧仍依赖语义理解的工作,不替换左侧已经稳定的 deterministic capability。
标准与平台复用
STIX / TAXII
STIX 2.1 作为威胁情报对象与 relationship 的通用交换模型,TAXII 2.1 负责 collection 和情报交换。已有 python-stix2、taxii2-client 等成熟实现,SecFusionAgent 直接兼容这些标准,并在内部对象与 STIX 对象之间维护明确 mapping。
STIX Patterning 用于表示 indicator 对 observable 的匹配条件。已有 STIX pattern 能表达的检测语义继续使用标准语法,不建立项目专用 indicator DSL。
OpenCTI
OpenCTI 提供 STIX knowledge graph、connector framework、file import、去重、inference、enrichment、workbench 和 external integration,是 CTI interoperability、connector 与 analyst workflow 的参考实现。SecFusionAgent 已采用自有轻量 Data Plane,因此不把 OpenCTI 作为内部 source of truth;其公开 connector 与工作流能力继续按需复用。
OpenCTI connector 已覆盖 CVE、MISP 等来源。cvelistV5 connector 的公开设计采用首次 clone CVE repo、后续按 Git 变更增量同步,再把 CVE record 映射为 STIX Vulnerability、Software、Identity 和相关 Note。这类能力直接进入复用候选,不在 SecFusionAgent 中重新实现一套等价 crawler。
OpenCTI 的 deterministic ID、去重和 inference rule 同样作为 baseline。Technical Design 需要决定是直接以 OpenCTI CE 承担 CTI kernel,还是在自有数据层中复刻其标准语义并复用 connector;该选择通过探针决定。
MISP
MISP 提供 IOC/event、feed、freetext parser、correlation、warninglist、分类体系、galaxy 和 sharing。IOC exact match、CIDR、fuzzy hash、常见 false-positive 过滤等通用能力直接采用其成熟语义或外部服务。
MISP core 使用 AGPL-3.0。Technical Design 在代码复用时检查许可证边界;协议、格式、分类体系、warninglist、feed 和外部 MISP instance 可以作为互操作对象。SecFusionAgent 不重写通用 IOC correlation engine。
Detection rule ecosystem
现有规则格式按检测对象继续复用:STIX Pattern 面向 indicator/observable;Sigma 面向日志事件;YARA 面向文件、文本和二进制 pattern;Suricata/Snort 面向网络流量。需要生成或消费检测规则时,系统输出已有格式并使用现有 parser、validator 和 ruleset。
这些规则属于检测生态的公共接口。SecFusionAgent 可以基于情报生成、关联或解释规则,但不拥有规则语言本身。
规则基线
传统“规则匹配”包含多个层级,Technical Design 按层复用对应实现。
| 规则层 | 典型机制 | Ownership |
|---|---|---|
| 输入解析 | regex、freetext parser、CSV/JSON mapper | OpenCTI/MISP/现成 parser;项目补 AI-specific mapper |
| 规范化 | deterministic ID、字段标准化、schema mapping | STIX/OpenCTI/MISP 语义 |
| 去重 | canonical ID、object key、exact match | 平台规则优先,模糊身份交给语义层 |
| IOC correlation | exact、CIDR、fuzzy hash | MISP/OpenCTI 等成熟能力 |
| false-positive filtering | warninglist、allow/block list | 复用公开 warninglist 与项目配置 |
| graph inference | 固定关系规则、transitive/derived relation | OpenCTI inference baseline;AI-specific relation 另行定义 |
| detection | STIX Pattern、Sigma、YARA、Suricata/Snort | 各自标准和现成 ruleset |
| 工作流 routing | filter、watch、playbook condition | 平台能力或 Technical Design 中的 deterministic orchestration |
规则适合处理语法确定、身份确定和逻辑确定的问题。LLM 不承担 IP/hash 识别、确定性 ID 生成、版本比较、已知 schema mapping 等稳定规则已经覆盖的工作。
Enrichment rule baseline
传统情报富化可以拆成一组有明确输入、判定规则和输出语义的 operator;它们构成 M3 的 deterministic baseline,也是后续 Agent/semantic enrichment 的对照组。
| Operator | 输入 | 确定性语义 | 输出 |
|---|---|---|---|
| ExactIdentifierJoin | CVE/GHSA/OSV/CNVD/CNNVD/DOI/SHA | namespace normalization + exact match | alias / same-object / source record |
| SchemaProjection | structured provider record | 固定 field/JSONPath mapping | CVSS、CWE、reference、时间等 claim |
| VersionRangeEvaluate | product/package + version + source range | source-specific comparator | affected / not_affected / fixed / unknown |
| ProductStatusResolve | vulnerability + product branch | CSAF/VEX status + justification | affected / not_affected / fixed / under_investigation |
| CPE/PURLMatch | asset/package identity | CPE configuration、PURL/ecosystem/package identity | product/package/version relation |
| GraphClosure | issue/PR/commit/release/repo | exact edge + ancestry/containment | fix/release relation |
| ExternalExactLookup | canonical ID | provider exact query | KEV、EPSS、advisory metadata |
| ObservationJoin | time-bounded asset observation | fingerprint/CPE/PURL/version + applicability evaluator | candidate affected asset |
| EvidenceBind | mapped fact/relation | locator resolves to fixed source revision | EvidenceRef |
| ConflictPreserve | same predicate/relation from several sources | source authority/time/independence comparison | parallel assertions + conflict |
Version applicability follows the source semantics that produced the evidence. CVE Record Format 5.x uses versionType, interval bounds, changes and defaultStatus; OSV uses SEMVER / ECOSYSTEM / GIT ranges with introduced / fixed / last_affected / limit; NVD applicability keeps the CPE configuration tree and version bounds; CSAF/VEX contributes explicit affected/not-affected/fixed/under-investigation product status. GIT ranges require repository ancestry rather than string comparison. A missing match or an incomparable version remains unknown.
Severity and exploitation signals remain separate. CVSS Base/Threat/Environmental describe different dimensions; CISA KEV means observed exploitation in the wild; a public PoC is a different fact; EPSS is a time-varying probability of observed exploitation. None of these fields substitutes for another or becomes an aggregate risk score without an explicit higher-level policy.
deterministic baseline 只写已注册的 canonical term 或 provider 原生 source-specific 字段。Semantic processing 可以发现新的 evidence-backed relation,但未注册 term 保持 exploratory,不进入 versioned enrichment P/R denominator;只有经过 vocabulary review 晋级后才进入新的 canonical revision。
LLM / Agent 自动化边界
LLM 进入现有 analyst 工作流的语义缺口。第一批候选能力包括:
| Analyst 工作 | LLM/Agent 目标 | 结果约束 |
|---|---|---|
| 非结构化报告阅读 | 抽取产品、版本、漏洞条件、impact、patch/workaround、TTP | 字段引用原始证据 span |
| 模糊实体对齐 | 对齐 repo/product/package/version/alias | 确定性 ID 优先;模糊匹配保存候选与依据 |
| relationship discovery | 发现 issue、函数、PR、commit、发布、dependency、downstream 关系 | relation 回链到 source object/证据 |
| 分类体系 mapping | 映射 ATT&CK/CWE/CAPEC/AI-specific 分类体系 | 优先匹配现有体系,新增类别需要显式定义 |
| source conflict analysis | 找出 affected version、severity、fix status 等冲突 | 保留各来源观测,输出冲突及依据 |
| investigation planning | 判断当前缺失证据,选择下一来源或工具 | 工具权限和执行次数受 deterministic policy 限制 |
| 证据综合 | 组织 attack chain、影响范围、修复状态和 unknown | 结论引用具体证据版本 |
高不确定、高影响或来源冲突无法自动消解的结果进入 analyst exception path。人工审核从常规 data path 收缩到异常和高价值判断;审核结果继续作为证据/decision 进入系统,而不是脱离数据模型的临时修改。
Method baseline
SecFusionAgent 的 method 先继承传统 CTI baseline,再改进 analyst-heavy 的语义环节。内部评测可使用以下三个层级描述能力边界:
| 层级 | 组成 | 用途 |
|---|---|---|
| Rule / Platform baseline | connector/feed + STIX/MISP schema + parser/mapper + deterministic 去重/correlation/inference | 现有工程能力基线 |
| Analyst 工作流 | baseline + 人工 entity alignment、relation linking、TTP mapping、conflict review、investigation | 现有人工流程参照 |
| SecFusionAgent | baseline + LLM semantic processing + Agent investigation + exception routing | 产品方法 |
该分层用于理解归属和评测设计,不要求与 OpenCTI/MISP 进行产品榜单式竞争。比赛评价仍以赛题要求的 source coverage、monitoring latency、enrichment precision/recall、QA quality、自动化和工程完整性为主;项目内部可以额外记录 analyst review 数量、exception rate、证据 correctness 和 investigation 增量,验证自动化是否真正减少人工工作。
四类风险的处理关系
四类风险共享 01 固定的证据、object、relation 与 retrieval kernel,但各自拥有不同的主要对象和关系图。分类描述风险发生在哪类对象或生命周期位置;底层数据能力负责把来源、对象、版本和证据连起来。某条情报可以同时进入多个 graph,归属由它正在表达的事实决定。
| 风险类 | 主要 anchor | 主要关系 | 典型来源与处理 |
|---|---|---|---|
| AI 基础设施 / 推理框架 | repo、component、发布、runtime | issue、PR、commit、affected/fixed version、integration | GitHub/GHSA/CVE/PSIRT 为主,沿 repo graph 追踪实现与修复 |
| 模型与数据层 | model、dataset、检查点、training/inference behavior | derived-from、trained-on、poisoned-by、evaluated-by、leaks | 论文、博客、model/data hub、厂商报告为主,依赖 semantic extraction 与证据挂接 |
| AI 应用与智能体 | app、Agent、tool、MCP/skill、memory/state、permission | invokes、can-access、writes-state、delegates、trusts | repo/advisory 与研究材料并用,围绕执行权限、状态和工具关系组织 |
| 供应链 | package、产物、image、dependency、build、distribution channel | depends-on、contains、built-from、published-as、distributed-as、deployed-with | CVE/OSV/GHSA、SBOM、lockfile、registry、container scan 等确定性数据优先 |
前三类沿现有数据处理方式继续推进。AI Infra 依赖 repo graph;模型与数据层依赖 document/model/dataset graph;AI 应用与智能体依赖 app/tool/state/permission graph。它们继续复用通用 Source Definition、Managed Content、semantic extraction 与 Knowledge/structured relation graph。
供应链多出一类明确的传播判断:上游 vulnerability 先映射到 affected package/version,再沿 dependency、产物、image 和 deployment 关系判断哪些下游对象真实包含该版本。CVE、OSV、GHSA、SBOM、lockfile、package registry 和 container scanner 已经能回答大量确定性问题,包括 affected version、direct/transitive dependency、产物 contents 和 fixed version。这些能力进入 baseline,由 graph traversal 完成影响传播。
供应链 relation 采用成熟语义并补充项目需要的对象关系:depends-on 表示依赖,contains 表示发布/产物实际包含组件,built-from 表示制品来源,published-as 与 distributed-as 表示交付形态,deployed-with 表示部署组合。漏洞与产品/包/版本的适用性统一使用 M3 canonical applicability-status,修复边界使用 fixed-version / fixed-by;供应链传播只在存在可验证的版本或产物传播边时成立,避免为供应链另造一套平行的漏洞适用性/修复 vocabulary。
LLM/Agent 处理确定性供应链工具覆盖不到的边缘情况:声明依赖与真实 build 产物不一致、optional backend 是否进入特定发布、组件被 vendoring 或 copy-paste 引入、upstream 已修复而 downstream 未升级、漏洞只在特定配置或 connector 启用时成立、跨 repo integration 缺少稳定 machine-readable relation。LLM 输出候选 relation 和依据,最终关系继续遵守证据挂接与 exception routing。
四类 graph 可以交叉,但事实归属保持稳定。一个 vLLM 自身的 parser 漏洞属于 AI 基础设施;该漏洞通过某 wheel、container 或下游依赖传播到其他产品时,传播事实属于供应链。一份恶意检查点触发 loader RCE 时,模型制品的安全属性属于模型/数据层,loader 的软件缺陷可以同时关联 AI Infra,制品从 Hub 到部署环境的传播链仍由供应链持有。这样可以复用同一证据和 relation,不把四类风险压成同一分类体系。
SecFusionAgent Ownership
SecFusionAgent 拥有 AI Security specialization。通用 CTI 基础能力优先复用,项目代码和数据模型集中承载以下责任:
| 领域 | SecFusionAgent 归属 |
|---|---|
| source selection | AI Security source registry、目标 repo/platform、研究源与更新策略 |
| AI-specific object model | AI Infra、模型/数据、Agent、供应链对象及其关系扩展 |
| semantic extraction | 博客、论文、PSIRT、issue 等非结构化材料的字段和机制抽取 |
| semantic 实体对齐 | repo/product/package/model/version 等跨来源模糊对齐 |
| 证据挂接 | claim、fact、relation、conclusion 回链到具体观测/版本 |
| AI-specific relation discovery | repo graph、model/产物、Agent tool/permission、供应链传播等关系 |
| conflict / unknown management | 来源冲突、证据缺口和 unknown 的显式状态 |
| investigation | 根据缺失证据选择 source/tool,写回可复用事实与关系 |
| QA / explanation | 基于证据和关系生成可引用回答,区分 fact、inference 与 unknown |
| 评测集 | AI Security 样本、人工裁定依据、回归与 adversarial case |
以下能力归成熟标准与生态:STIX/TAXII 交换、通用 CVE/NVD ingestion、通用 IOC parser/correlation、确定性去重、公开分类体系/ATT&CK、Sigma/YARA/Suricata 规则语法与 validator。Technical Design 对每项能力先查可复用实现,存在成熟实现时记录集成方式;自研需要说明现有实现缺失的具体 contract。
Reuse 决策
Technical Design 已结束“OpenCTI kernel 还是自有轻量数据层”的候选状态。SecFusionAgent 当前采用自有轻量 Data Plane:packages/sources 持有 provider/source contract,packages/monitoring 持有 acquisition lifecycle,packages/intelligence 持有 Evidence/Knowledge/Incident/Document 等 durable state,packages/enrichment 持有 AI Security enrichment。PostgreSQL/Redis/S3-compatible object storage 与 outbox/Celery 负责运行承载。
STIX/TAXII、OpenCTI、MISP、TheHive/Cortex 继续作为互操作、connector/workflow 和 analyst baseline 的复用来源,而不是 SecFusionAgent 的内部 source of truth 或 runtime kernel。项目需要交换 CTI 时优先输出/输入成熟标准;需要 connector/parser 能力时优先复用或适配现成实现;内部对象、证据版本、AI-specific relation、evaluation isolation 与 Agent runtime contract 继续由 SecFusionAgent 自己持有。
这个决策不改变 reuse-first policy:先定位标准、成熟平台和现成规则,再实现现有生态没有覆盖的 AI Security 语义与自动化 contract。后续局部 connector/parser 集成由 module README 维护;只有互操作边界或内部 ownership 发生变化时才重新打开本节。
参考实现与文档
- OpenCTI automated import: https://docs.opencti.io/latest/usage/import/getting-started/
- OpenCTI file import / analyst workbench: https://docs.opencti.io/latest/usage/import-files/
- OpenCTI 去重: https://docs.opencti.io/latest/usage/deduplication/
- OpenCTI connectors: https://github.com/OpenCTI-Platform/connectors
- OpenCTI license: https://github.com/OpenCTI-Platform/opencti/blob/master/LICENSE
- MISP license matrix: https://www.misp-project.org/license/
- TheHive / Cortex analyzer 工作流: https://docs.strangebee.com/thehive/user-guides/analyst-corner/cases/observables/run-analyzers-on-an-observable/
- OASIS STIX 2.1 / TAXII 2.1: https://www.oasis-open.org/standards/
- CVE Record Format 5.x: https://cveproject.github.io/cve-schema/schema/docs/
- OSV Schema: https://ossf.github.io/osv-schema/
- NVD Product / CPE APIs: https://nvd.nist.gov/developers/products
- CSAF / VEX 2.1: https://docs.oasis-open.org/csaf/csaf/v2.1/
- CVSS v4.0: https://www.first.org/cvss/v4.0/specification-document
- CISA KEV: https://www.cisa.gov/known-exploited-vulnerabilities-catalog
- FIRST EPSS: https://www.first.org/epss/
- Sigma rules: https://sigmahq.io/docs/basics/rules.html
- YARA rules: https://yara.readthedocs.io/en/latest/writingrules.html
- Suricata rules: https://docs.suricata.io/en/latest/rules/intro.html