收集 Darktrace 日志

解析器版本:19.0

支持的平台:

本文档介绍了如何使用 Bindplane 代理将 Darktrace 日志注入到 Google Security Operations。

Darktrace 是一个 AI 赋能的网络安全平台,可实时检测威胁和异常情况。解析器可处理 CEF 和 JSON 格式的 Darktrace 日志,提取字段并将其映射到统一数据模型 (UDM)。

准备工作

请确保满足以下前提条件:

  • Google SecOps 实例
  • Windows Server 2016 或更高版本,或者具有 systemd 的 Linux 主机
  • Bindplane 代理与 Darktrace 设备之间的网络连接
  • 如果在代理后面运行,请确保防火墙端口已根据 Bindplane 代理要求打开
  • 对 Darktrace 网页界面的特权访问权限

获取 Google SecOps 注入身份验证文件

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 收集代理
  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
    

    该服务应显示为 正在运行

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
    

    该服务应显示为有效(正在运行)

其他安装资源

如需了解其他安装选项和问题排查信息,请参阅 Bindplane 代理安装指南

配置 Bindplane 代理以注入 syslog 并将其发送到 Google SecOps

找到配置文件

  • Linux

    sudo nano /etc/bindplane-agent/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:
            compression: gzip
            creds_file_path: '/etc/bindplane-agent/ingestion-auth.json'
            customer_id: '<customer_id>'
            endpoint: malachiteingestion-pa.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:提取身份验证文件的完整路径:
      • Linux/etc/bindplane-agent/ingestion-auth.json
      • WindowsC:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
    • customer_id:从 Google SecOps 控制台复制的客户 ID
    • endpoint:区域端点网址:
      • 美国malachiteingestion-pa.googleapis.com
      • 欧洲europe-malachiteingestion-pa.googleapis.com
      • 亚洲asia-southeast1-malachiteingestion-pa.googleapis.com
      • 如需查看完整列表,请参阅区域级端点

保存配置文件

  • 修改后,保存文件:
    • Linux:依次按 Ctrl+OEnterCtrl+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 收集器
      3. 右键点击并选择重新启动
      4. 验证服务是否正在运行:

        sc query observiq-otel-collector
        
      5. 检查日志是否存在错误:

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

在 Darktrace 上配置 syslog

  1. 登录 Darktrace 网页界面。
  2. 依次前往管理 > 系统配置
  3. 点击验证提醒设置
  4. 提供以下配置详细信息:
    • CEF Syslog Alerts:选择 True
    • CEF Syslog 服务器:输入 Bindplane IP 地址。
    • CEF Syslog 服务器端口:输入 Bindplane 端口号(例如 10282)。
    • CEF Syslog TCP 提醒:选择 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 如果该值不是 IP 地址,则从 darktrace_host 字段中获取。
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 如果该值与 IP 地址格式匹配,则取自 device.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 然后是 Description 该值取自 model.then.description 字段。
model.then.name principal.resource.attribute.labels.Model 然后是 Name 该值取自 model.then.name 字段。
model.then.pid principal.resource.attribute.labels.Model 然后是 Pid 该值取自 model.then.pid 字段,并转换为字符串。
model.then.uuid principal.resource.attribute.labels.Model 然后是 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 如果该值与 IP 地址格式匹配,则取自 triggeredComponents.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 如果 status401,则设置为 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 专业人士的解答。