收集 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 網頁 UI 的特殊存取權

取得 Bindplane 代理程式的 Google SecOps 憑證

如要向 Google SecOps 驗證 Bindplane 代理程式,請選擇下列其中一種方法:

  • 新部署作業:使用 Chronicle API (選項 1)。
  • 舊版部署作業:繼續使用擷取驗證檔案 (選項 2),直到 Ingestion API 於 2027 年 7 月 20 日停用。
  1. 登入 Google Cloud 控制台,選取連結至 Google SecOps 執行個體的 Google Cloud 專案。
  2. 依序前往「IAM & Admin」>「Service Accounts」。
  3. 按一下「建立服務帳戶」。
  4. 提供下列設定詳細資料:
    • 「服務帳戶名稱」:輸入帳戶名稱 (例如 bindplane-ingest)。
    • 「Service account description」(服務帳戶說明):輸入說明 (例如 Bindplane agent log ingestion)。
  5. 點按「Create and continue」(建立並繼續)。
  6. 在「將專案存取權授予這個服務帳戶」部分,按一下「選取角色」,然後選取「Chronicle 編輯者」。
  7. 依序點選「繼續」和「完成」。
  8. 按一下您建立的服務帳戶,然後前往「金鑰」分頁。
  9. 依序點選「新增金鑰」>「建立新的金鑰」。
  10. 選取「JSON」,然後點選「建立」。金鑰檔案會下載到您的電腦。
  11. 將金鑰檔案儲存為 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,使其與儲存路徑相符。
  12. 依序前往「IAM 與管理」>「設定」,然後複製「專案編號」。設定匯出工具時會用到。

方法 2:下載擷取驗證檔案 (舊版)

  1. 登入 Google SecOps 控制台。
  2. 依序前往「設定」>「資料管理」>「收集代理程式」。如果使用的是僅限 SIEM 的平台,請依序前往「Settings」>「Collection Agents」。
  3. 下載擷取驗證檔案。
  4. 將檔案安全地儲存在要安裝 Bindplane 代理程式的系統上。

取得 Google SecOps 客戶 ID

  1. 登入 Google SecOps 控制台。
  2. 依序前往「設定」>「管理」>「設定檔」。如果使用的是僅限 SIEM 的平台,請依序前往「設定」>「設定檔」。
  3. 複製並儲存「機構詳細資料」部分的客戶 ID。

安裝 Bindplane 代理程式

請按照下列操作說明,在 Windows 或 Linux 作業系統上安裝 Bindplane 代理程式。

Windows 安裝

  1. 以管理員身分開啟命令提示字元或 PowerShell。
  2. 執行下列指令:

    msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
    
  3. 等待安裝完成。

  4. 執行下列指令,確認安裝成功:

    sc query observiq-otel-collector
    

    服務應顯示為「RUNNING」。

Linux 安裝

  1. 開啟具有 root 或 sudo 權限的終端機。
  2. 執行下列指令:

    sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
    
  3. 等待安裝完成。

  4. 執行下列指令,確認安裝成功:

    sudo systemctl status observiq-otel-collector
    

    服務應顯示為「active (running)」。

其他安裝資源

如需其他安裝選項和疑難排解資訊,請參閱 Bindplane 代理程式安裝指南。

設定 Bindplane 代理程式,擷取系統記錄並傳送至 Google SecOps

找出設定檔

  • Linux:

    sudo nano /opt/observiq-otel-collector/config.yaml
    
  • Windows:

    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 syslog 通訊埠 (可視需要調整)
  • 匯出工具設定:

    • creds_file_path:服務帳戶 JSON 金鑰檔案的完整路徑 (選項 1):
      • Linux:/opt/observiq-otel-collector/ingestion-auth.json
      • Windows:C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
    • customer_id:從 Google SecOps 控制台複製的客戶 ID
    • location:將 <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:依序點選「檔案」>「儲存」

重新啟動 Bindplane 代理程式,套用變更

  • 如要在 Linux 重新啟動 Bindplane 代理程式,請執行下列指令:

    sudo systemctl restart observiq-otel-collector
    
    1. 確認服務正在執行:

      sudo systemctl status observiq-otel-collector
      
    2. 查看記錄檔,找出錯誤:

      sudo journalctl -u observiq-otel-collector -f
      
  • 如要在 Windows 重新啟動 Bindplane 代理程式,請選擇下列任一選項:

    • 以管理員身分執行命令提示字元或 PowerShell:

      net stop observiq-otel-collector && net start observiq-otel-collector
      
    • 服務控制台:

      1. 按下 Win+R,輸入 services.msc,然後按下 Enter 鍵。
      2. 找出「observIQ OpenTelemetry Collector」。
      3. 按一下滑鼠右鍵,然後選取「重新啟動」。
      4. 確認服務正在執行:

        sc query observiq-otel-collector
        
      5. 查看記錄檔,找出錯誤:

        type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
        

在 Darktrace 設定系統記錄

  1. 登入 Darktrace 網頁版 UI。
  2. 依序前往「Admin」>「System Config」。
  3. 按一下「驗證快訊設定」。
  4. 提供下列設定詳細資料:
    • CEF Syslog Alerts:選取「True」。
    • CEF Syslog Server:輸入 Bindplane IP 位址。
    • CEF Syslog Server Port:輸入 Bindplane 通訊埠編號 (例如 10282)。
    • CEF Syslog TCP Alert:選取「True」。
  5. 按一下「儲存」。

支援的 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 專業人員尋求解答。