收集 Darktrace 日志
支持的语言:
Google SecOps
SIEM
本文档介绍了如何使用 Bindplane 代理将 Darktrace 日志注入到 Google Security Operations。此解析器首先从 syslog 消息中提取通用字段,然后使用条件逻辑来处理 CEF 和 JSON 格式的 Darktrace 日志。它将提取的字段映射到统一数据模型 (UDM) 架构,通过安全背景信息扩充数据,并标准化事件分类以供下游分析。
准备工作
确保您满足以下前提条件:
- Google SecOps 实例
- Windows 2016 或更高版本,或者具有 systemd 的 Linux 主机
- 如果在代理后运行,防火墙端口处于开放状态
- 对 Darktrace 的特权访问权限
获取 Google SecOps 注入身份验证文件
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 收集代理。
- 下载注入身份验证文件。将该文件安全地保存在将要安装 Bindplane 的系统上。
获取 Google SecOps 客户 ID
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 配置文件。
- 复制并保存组织详细信息部分中的客户 ID。
安装 Bindplane 代理
Windows 安装
- 以管理员身份打开命令提示符或 PowerShell。
运行以下命令:
msiexec /i `https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi` /quiet
Linux 安装
- 打开具有 root 或 sudo 权限的终端。
运行以下命令:
sudo sh -c `$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)` install_unix.sh
其他安装资源
如需了解其他安装选项,请参阅安装指南。
配置 Bindplane 代理以注入 Syslog 并将其发送到 Google SecOps
- 访问配置文件:
- 找到
config.yaml
文件。通常,它位于 Linux 上的/etc/bindplane-agent/
目录中或 Windows 上的安装目录中。 - 使用文本编辑器(例如
nano
、vi
或记事本)打开该文件。
- 找到
按如下方式修改
config.yaml
文件:receivers: tcplog: # Replace the port and IP address as required listen_address: `0.0.0.0:10282` exporters: chronicle/chronicle_w_labels: compression: gzip # Adjust the path to the credentials file you downloaded in Step 1 creds: '/path/to/ingestion-authentication-file.json' # Replace with your actual customer ID from Step 2 customer_id: <customer_id> endpoint: malachiteingestion-pa.googleapis.com # Add optional ingestion labels for better organization ingestion_labels: log_type: DARKTRACE raw_log_field: body service: pipelines: logs/source0__chronicle_w_labels-0: receivers: - tcplog exporters: - chronicle/chronicle_w_labels
根据基础架构的需要替换端口和 IP 地址。
将
<customer_id>
替换为实际的客户 ID。将
/path/to/ingestion-authentication-file.json
更新为获取 Google SecOps 提取身份验证文件部分中保存身份验证文件的路径。
重启 Bindlane 代理以应用更改
如需在 Linux 中重启 Bindplane 代理,请运行以下命令:
sudo systemctl restart bindplane-agent
如需在 Windows 中重启 Bindplane 代理,您可以使用服务控制台,也可以输入以下命令:
net stop BindPlaneAgent && net start BindPlaneAgent
在 Darktrace 上配置 Syslog
- 登录 Darktrace 网页界面。
- 依次前往管理 > 系统配置。
- 点击验证提醒设置。
- 提供以下配置详细信息:
- CEF Syslog 提醒:选择 True。
- CEF Syslog 服务器:输入 Bindplane IP 地址。
- CEF Syslog 服务器端口:输入 Bindplane 端口号(例如
10282
)。 - CEF Syslog TCP 提醒:选择 True。
- 点击保存。
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 | 如果 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 。 |
需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。