收集 Darktrace 記錄
剖析器版本:19.0
本文說明如何使用 Bindplane 代理程式,將 Darktrace 記錄檔擷取至 Google Security Operations。
Darktrace 是採用 AI 技術的網路安全平台,可即時偵測威脅和異常狀況。剖析器會處理 CEF 和 JSON 格式的 Darktrace 記錄,擷取欄位並對應至統合式資料模型 (UDM)。
事前準備
請確認您符合下列必要條件:
- Google SecOps 執行個體
- Windows Server 2016 以上版本,或搭載
systemd的 Linux 主機 - Bindplane 代理程式與 Darktrace 設備之間的網路連線
- 如果透過 Proxy 執行,請確保防火牆通訊埠已根據 Bindplane 代理程式需求開啟
- Darktrace 網頁使用者介面的特殊存取權
取得 Bindplane 代理程式的 Google SecOps 憑證
如要向 Google SecOps 驗證 Bindplane 代理程式,請選擇下列其中一種方法:
- 新部署作業:使用 Chronicle API (選項 1)。
- 舊版部署作業:繼續使用擷取驗證檔案 (選項 2),直到 Ingestion API 於 2027 年 7 月 20 日停用。
方法 1:為 Chronicle API 建立服務帳戶 (建議)
- 登入 Google Cloud 控制台,然後選取連結至 Google SecOps 執行個體的 Google Cloud 專案。
- 依序前往 「IAM & Admin」(IAM 與管理) >「Service Accounts」(服務帳戶)。
- 按一下「建立服務帳戶」。
- 提供下列設定詳細資料:
- 「Service account name」(服務帳戶名稱):輸入帳戶名稱 (例如
bindplane-ingest)。 - 服務帳戶說明:輸入說明 (例如
Bindplane agent log ingestion)。
- 「Service account name」(服務帳戶名稱):輸入帳戶名稱 (例如
- 點按「Create and continue」(建立並繼續)。
- 在「將專案存取權授予這個服務帳戶」部分,按一下「選取角色」,然後選取「Chronicle 編輯者」。
- 依序點選「繼續」和「完成」。
- 按一下您建立的服務帳戶,然後前往「金鑰」分頁。
- 依序點選「新增金鑰」>「建立新的金鑰」。
- 選取「JSON」,然後點選「建立」。金鑰檔案會下載到電腦。
- 將金鑰檔案儲存為 Bindplane 收集器目錄中的
ingestion-auth.json(Linux 為/opt/observiq-otel-collector/ingestion-auth.json,Windows 為C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json),或更新config.yaml中的creds_file_path,使其與儲存檔案的路徑相符。 - 依序前往「IAM & Admin」(IAM 與管理) >「Settings」(設定),然後複製「Project number」(專案編號)。匯出工具設定時會用到。
方法 2:下載擷取驗證檔案 (舊版)
- 登入 Google SecOps 控制台。
- 依序前往「SIEM Settings」 > 「Collection Agents」。
- 下載擷取驗證檔案。
- 將檔案安全地儲存在要安裝 Bindplane 代理程式的系統上。
取得 Google SecOps 客戶 ID
- 登入 Google SecOps 控制台。
- 依序前往「SIEM 設定」 > 「設定檔」。
複製並儲存「機構詳細資料」部分的客戶 ID。
安裝 Bindplane 代理程式
請按照下列操作說明,在 Windows 或 Linux 作業系統上安裝 Bindplane 代理程式。
Windows 安裝
- 以管理員身分開啟命令提示字元或 PowerShell。
執行下列指令:
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet等待安裝完成。
執行下列指令,確認安裝成功:
sc query observiq-otel-collector服務應顯示為「RUNNING」。
Linux 安裝
- 開啟具有 root 或 sudo 權限的終端機。
執行下列指令:
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh等待安裝完成。
執行下列指令,確認安裝成功:
sudo systemctl status observiq-otel-collector服務應顯示為「active (running)」。
其他安裝資源
如需其他安裝選項和疑難排解資訊,請參閱 Bindplane 代理程式安裝指南。
設定 Bindplane 代理,擷取系統記錄檔並傳送至 Google SecOps
找出設定檔
Linux:
sudo nano /opt/observiq-otel-collector/config.yamlWindows:
notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
編輯設定檔
將
config.yaml的全部內容替換為下列設定:receivers: tcplog: listen_address: "0.0.0.0:10282" exporters: chronicle/darktrace: protocol: https # Region of your instance, for example us, europe, asia-southeast1 location: <LOCATION> # Project number of the Google Cloud project linked to the instance project: '<PROJECT_NUMBER>' compression: gzip creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json' customer_id: '<customer_id>' endpoint: chronicle.googleapis.com log_type: DARKTRACE raw_log_field: body service: pipelines: logs/darktrace_to_chronicle: receivers: - tcplog exporters: - chronicle/darktrace
設定參數
替換下列預留位置:
接收器設定:
listen_address:要監聽的 IP 位址和通訊埠:0.0.0.0在所有介面接聽電話 (建議)- 通訊埠
10282是預設的 Darktrace CEF 系統記錄檔通訊埠 (視需要調整)
匯出工具設定:
creds_file_path:服務帳戶 JSON 金鑰檔案的完整路徑 (選項 1):- Linux:
/opt/observiq-otel-collector/ingestion-auth.json - Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Linux:
customer_id:從 Google SecOps 控制台複製的客戶 IDlocation:將<LOCATION>替換為 Google SecOps 執行個體的區域 (例如us、europe或asia-southeast1)。匯出工具會在這個值前面加上chronicle.googleapis.com。如需完整清單,請參閱「區域性端點」。project:依序前往「IAM 與管理」>「設定」,然後將<PROJECT_NUMBER>替換為專案編號。endpoint:請將此值設為chronicle.googleapis.com。
舊版 Ingestion API 匯出工具
如果您使用選項 2 的擷取驗證檔案,請將
exporters區塊替換為下列內容。將creds_file_path設為擷取驗證檔案的路徑。如果執行個體位於美國境外,請將malachiteingestion-pa.googleapis.com替換為區域端點 (例如europe-malachiteingestion-pa.googleapis.com)。exporters: chronicle/darktrace: compression: gzip creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json' customer_id: '<customer_id>' endpoint: malachiteingestion-pa.googleapis.com log_type: DARKTRACE raw_log_field: body
儲存設定檔
- 編輯完成後,請儲存檔案:
- Linux:依序按下
Ctrl+O、Enter和Ctrl+X - Windows:依序點選「檔案」 > 「儲存」
- Linux:依序按下
重新啟動 Bindplane 代理程式,套用變更
如要在 Linux 中重新啟動 Bindplane 代理程式,請執行下列指令:
sudo systemctl restart observiq-otel-collector確認服務是否正在執行:
sudo systemctl status observiq-otel-collector檢查記錄是否有錯誤:
sudo journalctl -u observiq-otel-collector -f
如要在 Windows 中重新啟動 Bindplane 代理程式,請選擇下列其中一個選項:
以管理員身分開啟命令提示字元或 PowerShell:
net stop observiq-otel-collector && net start observiq-otel-collector服務控制台:
- 按下
Win+R,輸入services.msc,然後按下 Enter 鍵。 - 找出「observIQ OpenTelemetry Collector」。
- 按一下滑鼠右鍵,然後選取「重新啟動」。
確認服務正在執行:
sc query observiq-otel-collector查看記錄檔是否有錯誤:
type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
- 按下
在 Darktrace 設定 syslog
- 登入 Darktrace 網頁版 UI。
- 依序前往「管理」 > 「系統設定」。
- 按一下「驗證快訊設定」。
- 提供下列設定詳細資料:
- CEF Syslog Alerts:選取「True」。
- CEF Syslog Server:輸入 Bindplane IP 位址。
- CEF Syslog Server Port:輸入 Bindplane 通訊埠編號 (例如
10282)。 - CEF Syslog TCP Alert:選取「True」。
- 按一下 [儲存]。
支援的 Darktrace 範例記錄
SYSLOG + KV (CEF)
{ "acknowledged": false, "commentCount": 0, "pbid": 900000001, "time": 1604055367000, "creationTime": 1604055367000, "model": { "name": "Compromise::Agent Beacon to New Endpoint", "uuid": "dfd6f10b-b91c-4244-9fd5-7c35caf21b33", "description": "A device is initiating multiple connections to a new external endpoint...", "priority": 2, "category": "Informational", "mitre": { "tactics": [ "command-and-control" ], "techniques": [ "T1071.001" ] } }, "triggeredComponents": [ { "time": 1677679818000, "ip": " ", "port": 443, "metric": { "name": "externalconnections" }, "triggeredFilters": [ { "filterType": "Connection hostname", "trigger": { "value": "beacon.external.io" } } ] } ], "score": 0.85, "device": { "did": 90001, "macaddress": " ", "ip": " ", "hostname": "user-laptop-1" } }SYSLOG + JSON
{ "dpi_engine": "dt-sensor-101", "proto": "tcp", "source_ip": " ", "source_port": 51000, "dest_ip": " ", "dest_port": 389, "src": " ", "dst": " ", "details": "AP request: srealm is [TESTDOMAIN.LOCAL], service is [LDAP/DC99.testdomain.local/testdomain.local], ST cipher is [aes256-cts-hmac-sha1-96]", "epochdate": 1690471502.2252, "@host": "log-collector-host", "uid": "ABCDEFGHIJ1234567890", "note": "KERBEROS::App", "@type": "notice" }
UDM 對應表
| 記錄欄位 | UDM 對應 | 邏輯 |
|---|---|---|
| darktraceUrl | security_result.url_back_to_product | 這個值取自 darktraceUrl 欄位。 |
| darktrace_host | observer.hostname | 如果 darktrace_host 欄位不是 IP 位址,系統會從該欄位擷取值。 |
| darktrace_ip | observer.ip | 這個值取自 darktrace_ip 欄位。 |
| darktrace_user | observer.user.userid | 這個值取自 darktrace_user 欄位。 |
| 說明 | security_result.summary、metadata.description | 這個值取自 description 欄位。 |
| device.customFields.DT-AUTO.macaddress | principal.mac | 這個值取自 device.customFields.DT-AUTO.macaddress 欄位。 |
| device.did | principal.asset.asset_id | 系統會從 device.did 欄位擷取值,轉換為字串,並加上 Device ID: 前置字元。 |
| device.firstSeen | principal.asset.first_seen_time | 這個值取自 device.firstSeen 欄位,並轉換為字串,然後剖析為以毫秒為單位的 UNIX 時間戳記。 |
| device.hostname | principal.hostname、principal.asset.hostname | 這個值取自 device.hostname 欄位。 |
| device.ip | principal.ip、principal.asset.ip | 如果 device.ip 欄位符合 IP 位址格式,系統會從該欄位擷取值。 |
| device.ips.0.subnet | additional.fields.subnet | 值取自 device.ips.0.subnet 欄位,並以 subnet 為前置字元。 |
| device.ips.ip | principal.ip、principal.asset.ip | 這個值取自清單中每個 IP 位址的 device.ips.ip 欄位。 |
| device.lastSeen | principal.asset.last_discover_time | 系統會從 device.lastSeen 欄位擷取值,轉換為字串,並剖析為以毫秒為單位的 UNIX 時間戳記。 |
| device.macaddress | principal.mac | 這個值取自 device.macaddress 欄位。 |
| device.objecttype | principal.asset.type | 如果值為 device,UDM 欄位會設為 WORKSTATION。 |
| device.sid | principal.resource.attribute.labels.sid | 系統會從 device.sid 欄位擷取值,並轉換為字串。 |
| device.typelabel | principal.resource.attribute.labels.typelabel | 這個值取自 device.typelabel 欄位。 |
| device.typename | principal.resource.attribute.labels.typename | 這個值取自 device.typename 欄位。 |
| dst | target.ip、target.asset.ip | 這個值取自 dst 欄位。 |
| dpt | target.port | 系統會從 dpt 欄位擷取值,並轉換為整數。 |
| dvc | principal.ip、principal.asset.ip | 如果 dvc 的值是 IP 位址,則會新增至 UDM 欄位。 |
| dvchost | principal.hostname、principal.asset.hostname | 這個值取自 dvchost 欄位。 |
| endpoint | target.url | 這個值取自 endpoint 欄位。 |
| event_time | metadata.event_timestamp | 這個值取自 event_time 欄位,並剖析為 ISO8601 時間戳記。 |
| externalId | metadata.product_log_id | 這個值取自 externalId 欄位。 |
| incidentEventUrl | principal.url | 這個值取自 incidentEventUrl 欄位。 |
| ip | principal.ip、principal.asset.ip | 如果值符合 IP 位址格式,系統會從 ip 欄位擷取該值。 |
| issue_msg | security_result.summary | 這個值取自 issue_msg 欄位。 |
| 訊息 | security_result.description | 這個值取自 message 欄位。 |
| 方法 | network.http.method | 這個值取自 method 欄位。 |
| model.description | metadata.description | 這個值取自 model.description 欄位。 |
| model.name | metadata.product_event_type | 這個值取自 model.name 欄位。 |
| model.now.category | security_result.severity | 如果值為 critical,UDM 欄位會設為 CRITICAL。如果值為 Informational,UDM 欄位會設為 INFORMATIONAL。如果值為 Suspicious,UDM 欄位會設為 HIGH,類別則會設為 NETWORK_SUSPICIOUS。 |
| model.now.description | metadata.description | 這個值取自 model.now.description 欄位。 |
| model.now.message | security_result.description | 這個值取自 model.now.message 欄位。 |
| model.now.name | metadata.product_event_type | 這個值取自 model.now.name 欄位。 |
| model.now.pid | principal.process.pid | 這個值取自 model.now.pid 欄位,並轉換為字串。 |
| model.now.uuid | principal.user.userid | 系統會從 model.now.uuid 欄位擷取值,並將事件類型設為 USER_UNCATEGORIZED。 |
| model.pid | principal.process.pid | 系統會從 model.pid 欄位擷取值,並轉換為字串。 |
| model.then.description | principal.resource.attribute.labels.Model Then Description | 這個值取自 model.then.description 欄位。 |
| model.then.name | principal.resource.attribute.labels.Model Then Name | 這個值取自 model.then.name 欄位。 |
| model.then.pid | principal.resource.attribute.labels.Model Then Pid | 系統會從 model.then.pid 欄位擷取值,並轉換為字串。 |
| model.then.uuid | principal.resource.attribute.labels.Model Then UUID | 這個值取自 model.then.uuid 欄位。 |
| model.uuid | principal.user.userid | 值取自 model.uuid 欄位,事件類型則設為 USER_UNCATEGORIZED。 |
| relatedBreaches.0.modelName | security_result.description | 這個值取自 relatedBreaches.0.modelName 欄位。 |
| 分數 | security_result.priority、security_result.priority_details | 如果值介於 0.8 和 1 之間,優先順序會設為 HIGH_PRIORITY。如果值介於 0.5 和 0.79 之間,優先順序會設為 MEDIUM_PRIORITY。如果值介於 0 到 0.49 之間,優先順序會設為 LOW_PRIORITY。優先順序詳細資料會設為 Score :,後面接著轉換為字串的 score 值。 |
| 嚴重性 | security_result.severity | 如果值為 2,UDM 欄位會設為 MEDIUM。如果值大於 2,UDM 欄位會設為 HIGH。 |
| shost | principal.hostname、principal.asset.hostname | 這個值取自 shost 欄位。 |
| smac | principal.mac | 這個值取自 smac 欄位。 |
| src | principal.ip、principal.asset.ip | 這個值取自 src 欄位。 |
| 狀態 | network.http.response_code | 這個值取自 status 欄位,並轉換為字串。 |
| 摘要 | metadata.description | 這個值取自 summary 欄位。 |
| 時間 | 系統會從 time 欄位擷取值,轉換為字串,並剖析為以毫秒為單位的 UNIX 時間戳記。 |
|
| 時間戳記 | 這個值取自 timestamp 欄位,並剖析為 ISO8601 時間戳記或以毫秒為單位的 UNIX 時間戳記。 |
|
| title | security_result.summary | 這個值取自 title 欄位。 |
| triggeredComponents.ip | intermediary.ip | 如果 triggeredComponents.ip 欄位符合 IP 位址格式,系統會從該欄位擷取值。 |
| triggeredComponents.port | intermediary.port | 這個值取自 triggeredComponents.port 欄位,並會轉換為整數。 |
| 使用者名稱 | principal.user.userid | 這個值取自 username 欄位。 |
| metadata.vendor_name | 設為 DARKTRACE。 |
|
| metadata.product_name | 設為 DCIP。 |
|
| metadata.log_type | 設為 DARKTRACE。 |
|
| network.ip_protocol | 如果 issue_msg 不含 UDP,請設為 TCP。否則請設為 UDP。 |
|
| security_result.action | 如果 status 為 401,請設為 BLOCK,否則請設為 ALLOW。 |
|
| security_result.severity | 設為 INFORMATIONAL。 |
|
| network.application_protocol | 如果 method 不為空白,請設為 HTTP。 |
|
| metadata.event_type | 如果 method 不是空白,請設為 NETWORK_HTTP。如果 description 包含 logged into \\\\S+ over ssh,請設為 USER_LOGIN。如果 target_ip 不是空白,請設為 NETWORK_CONNECTION。否則請設為 STATUS_UPDATE。 |
|
| extensions.auth.type | 如果 description 包含 logged into \\\\S+ over ssh,請設為 MACHINE。 |
|
| security_result.category | 如果 issue_msg 包含 Exfiltration,請設為 DATA_EXFILTRATION。如果 issue_msg 包含 Compromise,請設為 NETWORK_MALICIOUS。否則,請設為 NETWORK_SUSPICIOUS。 |
|
percentScore |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
device.credentials |
event.idm.read_only_udm.target.user.userid |
從變更記錄對應 |
url |
event.idm.read_only_udm.principal.url |
從變更記錄對應 |
username |
event.idm.read_only_udm.principal.user.userid |
從變更記錄對應 |
iris-event-type |
event.idm.read_only_udm.metadata.product_event_type |
從變更記錄對應 |
inhibitor |
event.idm.read_only_udm.target.ip |
從變更記錄對應 |
inhibitor |
event.idm.read_only_udm.target.asset.ip |
從變更記錄對應 |
inhibitor |
event.idm.read_only_udm.target.port |
從變更記錄對應 |
device.os |
event.idm.read_only_udm.principal.platform |
從變更記錄對應 |
device.typename |
event.idm.read_only_udm.principal.asset.type |
從變更記錄對應 |
device.ossource |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
model.tags |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
codeid |
event.idm.read_only_udm.security_result.rule_id |
從變更記錄對應 |
inhibitor |
event.idm.read_only_udm.security_result.description |
從變更記錄對應 |
host_ip |
event.idm.read_only_udm.intermediary.ip |
從變更記錄對應 |
technique_data |
event.idm.read_only_udm.security_result.attack_details.techniques |
從變更記錄對應 |
tactics_data |
event.idm.read_only_udm.security_result.attack_details.tactics |
從變更記錄對應 |
model.created.userid |
principal.user.userid |
從變更記錄對應 |
model.edited.userid |
additional.fields |
從變更記錄對應 |
direction |
network.direction |
從變更記錄對應 |
filterType" under "triggeredFilters |
additional.fields |
從變更記錄對應 |
trigger.value" under "triggeredFilters |
additional.fields |
從變更記錄對應 |
from |
principal.user.email_addresses |
從變更記錄對應 |
subject |
metadata.description |
從變更記錄對應 |
anomaly_score", "tags", "link_hosts", and "message_id |
additional.fields |
從變更記錄對應 |
recipients |
observer.user.email_addresses |
從變更記錄對應 |
attachment_sha1s" and "attachment_sha256s |
security_result.detection_fields |
從變更記錄對應 |
triggeredFilter.trigger.value |
target.ip |
從變更記錄對應 |
from |
network.email.from |
從變更記錄對應 |
subject |
network.email.subject |
從變更記錄對應 |
attachment_sha1s", "attachment_sha256s", "recipients", "link_hosts", "tags", "actions", "anomaly_score", "message_id |
security_result.detection_fields |
從變更記錄對應 |
model.name |
principal.user.user_display_name |
從變更記錄對應 |
breachUrl |
security_result.url_back_to_product |
從變更記錄對應 |
device.typelabel", "device.sid", "device.typename |
principal.resource.attribute.labels |
從變更記錄對應 |
device.ips.0.subnet |
additional_fields |
從變更記錄對應 |
device.device.lastSeen |
principal.asset.last_seen_time |
從變更記錄對應 |
mitreTechniques |
security_result.attack_details.techniques |
從變更記錄對應 |
details |
sec_result.about.resource.attribute.labels |
從變更記錄對應 |
principal_port_no |
principal.port |
從變更記錄對應 |
location |
principal.location.country_or_region |
從變更記錄對應 |
target_host |
target.hostname |
從變更記錄對應 |
source_ip |
principal.ip |
從變更記錄對應 |
source_port |
principal.port |
從變更記錄對應 |
dest_ip |
target.ip |
從變更記錄對應 |
dest_port |
target.port |
從變更記錄對應 |
@host |
principal.hostname |
從變更記錄對應 |
note |
principal.application |
從變更記錄對應 |
@type |
sec_result.about.resource.attribute.labels |
從變更記錄對應 |
opcode |
sec_result.about.resource.attribute.labels |
從變更記錄對應 |
trans_id |
sec_result.about.resource.attribute.labels |
從變更記錄對應 |
query_class |
sec_result.about.resource.attribute.labels |
從變更記錄對應 |
deviceMacAddress |
principal.mac |
從變更記錄對應 |
變更記錄
還有其他問題嗎?向社群成員和 Google SecOps 專家尋求解答。