把同一份案例交到 OpenCTI
這個實驗把 MISP 2.5.53 的虛構釣魚 Event,透過與 OpenCTI 同版的官方 MISP Connector 匯入 OpenCTI 7.261124.0。兩端都是獨立的本機 Compose 專案,使用手冊樣本與文件保留位址。
只測 MISP → OpenCTI。先決定允許匯入的事件和目標權限,再檢查匯入後的偵測用途。官方 Connector 文件 · OpenCTI 整合與 Connector 教學
重現兩套本機 Lab
使用同一個本機 Docker Engine,另建兩個 Compose 專案,並以無實際情資的新資料卷操作。從一鍵部署完成 MISP 啟動,依OpenCTI Docker 教學完成另一端的啟動。若既有實例佔用預設埠,替隔離副本選擇不同的本機埠。
從兩個儲存庫所在的上層目錄設定路徑,且這組 -p 專案名稱在整個練習中應保持一致。
MISP_LAB="$PWD/MISP-tutorial/lab"
OCTI_LAB="$PWD/opencti-tutorial/lab"
BRIDGE="$MISP_LAB/opencti-bridge"
COMPOSE_PROJECT_NAME=sectools-bridge-misp python3 "$MISP_LAB/start.py"
python3 "$OCTI_LAB/init-env.py"
(cd "$OCTI_LAB" && docker compose -p sectools-bridge-octi up -d --wait opencti worker)
python3 "$MISP_LAB/verify.py"若已經在同一組隔離專案初始化 OpenCTI,沿用其 .env 即可。MISP 樣本使用固定 UUID。準備程式會加上專用篩選標籤,建立同標籤但 Distribution 1 的負對照,並建立一把一小時到期的唯讀金鑰。
docker network create --internal sectools-misp-opencti
(cd "$MISP_LAB" && docker compose -p sectools-bridge-misp \
-f compose.yaml -f "$BRIDGE/compose.misp.yaml" up -d --wait misp-nginx)
python3 "$BRIDGE/fixture.py" prepare
(cd "$OCTI_LAB" && docker compose -p sectools-bridge-octi \
--env-file .env --env-file "$BRIDGE/.env.bridge" \
-f compose.yaml -f "$BRIDGE/compose.opencti.yaml" run --rm --no-deps -T connector-misp)如果這個實驗的 Docker 網路已存在,可以沿用該網路。只有 Connector 和 MISP nginx 加入這個內部網段。OpenCTI token 使用獨立教學 Lab 的管理員金鑰;本機練習結束後請收回 MISP 短效金鑰。
逐欄比對兩邊實際產物
| MISP | OpenCTI 驗證結果 |
|---|---|
| 已發布的固定 UUID Event | 一份 Report,帶有原 MISP Event 的來源連結。 |
login.example 與 192.0.2.10 | Domain Name 與 IPv4 Observable 都在 Report 中。 |
網域的 to_ids=false | 這組 Connector 設定仍替網域建立了 Indicator。匯入後須重新審查哪些 Indicator 可以交給偵測系統。 |
| 案例標籤、TLP 與 Galaxy | 專用標籤成為 Label,Report 有 TLP:CLEAR,並包含名為 Phishing 的 Attack Pattern。此實體的 x_mitre_id 是空值,不能用名稱推定 T1566 欄位已保留。 |
domain-ip 等事件內容 | 在 Report 下查到 based-on 和 related-to 關係。逐筆核對時仍應回看來源。 |
| 相同標籤的 Distribution 1 負對照 | Connector 可讀來源事件,但這次只允許匯入 Distribution 0,因此沒有產生負對照的 Report。 |
實測的是 Connector 入口的分發過濾,OpenCTI 的 Report 可見性仍取決於其 markings、群組與權限。即使在 MISP 把資料留為分析脈絡,目的端也可能建立 Indicator。

讀回 Report,再用新 Connector 身分重跑
python3 "$BRIDGE/check.py" --opencti-env "$OCTI_LAB/.env" --snapshot bridge-first.json若 OpenCTI 使用不同的本機埠,加入 --origin 並填入它的本機 HTTP 網址。腳本等工作完成,查回 Report、來源連結、Observable、Indicator、關係與標記,並確認負對照不存在。
python3 "$BRIDGE/fixture.py" replay
(cd "$OCTI_LAB" && docker compose -p sectools-bridge-octi \
--env-file .env --env-file "$BRIDGE/.env.bridge" \
-f compose.yaml -f "$BRIDGE/compose.opencti.yaml" run --rm --no-deps -T connector-misp)
python3 "$BRIDGE/check.py" --opencti-env "$OCTI_LAB/.env" --compare bridge-first.json新身分讓 Connector 從空游標重新取回同一份資料。比較同一 Report 與其物件集合,才能區分「重跑仍一份」和「沒有再送資料」。
2026-12-02 Asia/Taipei · arm64 local Docker · synthetic data only
MISP 2.5.53 → official opencti/connector-misp:7.261124.0 → OpenCTI 7.261124.0
Connector image digest: sha256:86dba6295b116f1e5c62ab3ea590898eb99872df0f5a4645b09bcc2988b07365
MISP seed:
PASS MISP read-only key sees published 0 and 1 fixtures with the same lab tag.
Run 1:
PASS official Connector work complete with bundles processed and no errors.
PASS one case Report; level 1 control absent; source reference verified.
PASS domain and IP Observables; IP detection pattern present.
OBSERVED context domain Indicator: True
PASS markings, labels, Attack Patterns, and relationship types read from the Report.
Report STIX ID: report--44398ccf-fa6e-5f37-b980-78950f11d90b
Report objects: 16; Indicator 4; relationships: based-on 4, related-to 2.
Report marking: TLP:CLEAR; label: sectools-opencti-lab.
Attack Pattern: Phishing; x_mitre_id: null.
Run 2, new Connector identity and empty cursor:
PASS official Connector work complete with bundles processed and no errors.
PASS one case Report; level 1 control absent; source reference verified.
PASS domain and IP Observables; IP detection pattern present.
OBSERVED context domain Indicator: True
PASS markings, labels, Attack Patterns, and relationship types read from the Report.
PASS full replay preserved the same Report and object set.
撤銷教學金鑰並保留案例
python3 "$BRIDGE/fixture.py" revoke這個操作移除本機 Connector 設定檔和其中所記錄的短效金鑰。用各 Lab 的 Compose 專案執行 stop 可暫停容器並保留資料,留作下次重看。
學習紀錄儲存在目前瀏覽器。
無法儲存,重新整理後可能會遺失這次的紀錄。