收集 Carbon Black EDR 日志
支持的语言:
Google SecOps
SIEM
本文档介绍了如何使用 AWS S3 从云端和本地环境中收集 Carbon Black EDR 日志。解析器从 JSON、CSV 或 syslog 格式的消息中提取字段,对其进行标准化处理,然后将其映射到 UDM。它可处理各种 Carbon Black 事件类型,包括网络连接、进程事件、文件修改、注册表更改和 IOC 命中,并在可用时通过威胁情报和设备信息来丰富数据。
准备工作
确保您满足以下前提条件:
- Google SecOps 实例。
- 对 AWS IAM 和 S3 的特权访问权限。
- 对云端或本地 Carbon Black EDR 的特权访问权限。
配置本地 Carbon Black EDR
为本地环境配置 Amazon S3 存储桶
- 按照以下用户指南创建 Amazon S3 存储桶:创建存储桶
- 保存相应存储桶的名称和区域以备后用。
- 按照以下用户指南创建用户:创建 IAM 用户。
- 选择创建的用户。
- 选择安全凭据标签页。
- 在访问密钥部分中,点击创建访问密钥。
- 选择第三方服务作为使用情形。
- 点击下一步。
- 可选:添加说明标记。
- 点击创建访问密钥。
- 点击 Download CSV file(下载 CSV 文件),保存访问密钥和不公开的访问密钥以供日后使用。
- 点击完成。
- 选择权限标签页。
- 在权限政策部分中,点击添加权限。
- 选择添加权限。
- 选择直接附加政策。
- 搜索并选择 AmazonS3FullAccess 政策。
- 点击下一步。
- 点击添加权限。
在本地 EDR 服务器上安装 cb-event-forwarder
安装 CbOpenSource 代码库(如果尚未安装):
cd /etc/yum.repos.d curl -O https://opensource.carbonblack.com/release/x86_64/CbOpenSource.repo
使用 YUM 安装 RPM:
yum install cb-event-forwarder
如果您使用的是 EDR 7.1.0 或更高版本,请运行以下脚本来设置 EDR 所需的相应权限:
/usr/share/cb/integrations/event-forwarder/cb-edr-fix-permissions.sh
配置 cb-event-forwarder 以输出 JSON 日志
打开配置文件:
sudo nano /etc/cb/integrations/event-forwarder/cb-event-forwarder.conf
修改以下参数:
[event_forwarder] output_format=json # Enable JSON format output_type=s3 # Send logs to AWS S3 s3_bucket_name=YOUR-S3-BUCKET-NAME s3_region=YOUR-S3-BUCKET-NAME s3_access_key_id=YOUR_AWS_ACCESS_KEY s3_secret_access_key=YOUR_AWS_SECRET_KEY s3_prefix=carbonblack/edr/logs
使用键盘保存并退出:
- 按 Ctrl + X,然后按 Y 和 Enter 键。
启动 cb-event-forwarder:
sudo systemctl enable cb-event-forwarder sudo systemctl restart cb-event-forwarder sudo systemctl status cb-event-forwarder
为 S3 配置 Carbon Black Cloud Event Forwarder
创建 AWS S3 存储分区
- 登录 AWS 管理控制台。
- 确保 AWS 区域与事件转发器的区域一致:
- 在 AWS 控制台页面中,找到相应区域。
- 使用下拉菜单选择事件转发器的正确区域。
- 下表列出了每个 Carbon Black EDR 网址适用的 AWS 区域。
- “instance-alias”.my.carbonblack.io - 区域:美国东部(北弗吉尼亚)弗吉尼亚) (us-east-1)
- “instance-alias”.my.cbcloud.de - 区域:欧洲(法兰克福)(eu-central-1)
- “instance-alias”.my.cbcloud.sg 区域:亚太地区(新加坡)(ap-southeast-1)
- 选择服务。
- 前往 S3 控制台。
- 点击创建存储桶,打开创建存储桶向导。
- 在存储桶名称中,为存储桶输入一个唯一的名称(例如 CB-EDR)。
- 确保区域默认设置为您之前选择的区域。
- 更新阻止公开访问默认设置,以允许公开访问(这是将日志提取到 Google SecOps 中所必需的)。
- 选择创建存储分区。
配置 S3 存储分区以允许事件转发器写入事件
- 按照以下用户指南创建用户:创建 IAM 用户。
- 选择创建的用户。
- 选择安全凭据标签页。
- 在访问密钥部分中,点击创建访问密钥。
- 选择第三方服务作为使用情形。
- 点击下一步。
- 可选:添加说明标记。
- 点击创建访问密钥。
- 点击 Download CSV file(下载 CSV 文件),保存访问密钥和不公开的访问密钥以供日后使用。
- 点击完成。
- 选择权限标签页。
- 在权限政策部分中,点击添加权限。
- 选择添加权限。
- 选择直接附加政策。
- 搜索 AmazonS3FullAccess 政策。
- 选择相应政策。
- 点击下一步。
- 点击添加权限。
在 EDR 控制台中配置事件转发
- 登录 VMware Carbon Black Cloud。
- 前往事件转发器标签页
- 启用您希望产品上传到 S3 的事件。
- 前往输出和类型,然后设置为 S3。
- 提供 S3 存储桶名称,格式如下:
<region>:<bucket-name>
(例如:us-east-1:cb-edr
)。 - 选择以 INI 格式上传 AWS 凭据文件。
以下是配置文件的示例:
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY Default region name [None]: us-east-1
点击保存,然后重启服务以使更改生效。
设置 Feed
您可以通过两种不同的入口点在 Google SecOps 平台中设置 Feed:
- SIEM 设置 > Feed
- 内容中心 > 内容包
通过“SIEM 设置”>“Feed”设置 Feed
如需配置 Feed,请按以下步骤操作:
- 依次前往 SIEM 设置 > Feed。
- 点击添加新 Feed。
- 在下一页上,点击配置单个 Feed。
- 在 Feed name 字段中,输入 Feed 的名称(例如 Carbon Black EDR Logs)。
- 选择 Amazon S3 作为来源类型。
- 选择 Carbon Black EDR 作为日志类型。
- 点击下一步。
为以下输入参数指定值:
- 区域:Amazon S3 存储桶所在的区域。
- S3 URI:存储桶 URI。
s3:/BUCKET_NAME
- 将
BUCKET_NAME
替换为存储桶的实际名称。
- 将
- URI is a:根据日志流配置选择 URI_TYPE(Single file | Directory | Directory which includes subdirectories)。
- 来源删除选项:根据您的偏好设置选择删除选项。
- 访问密钥 ID:有权访问 S3 存储桶的用户访问密钥。
- 私有访问密钥:有权访问 S3 存储桶的用户的私有密钥。
点击下一步。
在最终确定界面中查看新的 Feed 配置,然后点击提交。
设置来自内容中心的 Feed
为以下字段指定值:
- 区域:Amazon S3 存储桶所在的区域。
- S3 URI:存储桶 URI。
s3:/BUCKET_NAME
- 将
BUCKET_NAME
替换为存储桶的实际名称。
- 将
- URI is a:根据日志流配置选择 URI_TYPE(Single file | Directory | Directory which includes subdirectories)。
- 来源删除选项:根据您的偏好设置选择删除选项。
- 访问密钥 ID:有权访问 S3 存储桶的用户访问密钥。
- 私有访问密钥:有权访问 S3 存储桶的用户的私有密钥。
高级选项
- Feed 名称:用于标识 Feed 的预填充值。
- 来源类型:用于将日志收集到 Google SecOps 中的方法。
- 资源命名空间:与 Feed 关联的命名空间。
- 提取标签:应用于相应 Feed 中所有事件的标签。
UDM 映射表
日志字段 | UDM 映射 | 逻辑 |
---|---|---|
action |
security_result.detection_fields[?key == 'action'].value |
原始日志中 action 字段的值。 |
cb_server |
intermediary.hostname |
原始日志中 cb_server 字段的值。 |
cb_version |
metadata.product_version |
原始日志中 cb_version 字段的值。 |
child_pid |
target.process.pid (适用于 ingress.event.childproc 事件) |
当 type 为 ingress.event.childproc 时,原始日志中 child_pid 字段的值。 |
child_process_guid |
target.process.product_specific_process_id (适用于 ingress.event.childproc 事件) |
当 type 为 ingress.event.childproc 时,与原始日志中的 child_process_guid 字段的值串联的“CB:”。 |
child_username |
target.user.userid (适用于 ingress.event.childproc 事件) |
当 type 为 ingress.event.childproc 时,原始日志中 child_username 字段的值。 |
childproc_guid |
target.process.product_specific_process_id (适用于 endpoint.event.procstart 事件) |
当 type 为 endpoint.event.procstart 时,与原始日志中的 childproc_guid 字段的值串联的“CB:”。 |
childproc_hash.0 |
target.process.file.md5 (适用于 endpoint.event.procstart 事件) |
当 type 为 endpoint.event.procstart 时,原始日志中 childproc_hash 数组的第一个元素。 |
childproc_hash.1 |
target.process.file.sha256 (适用于 endpoint.event.procstart 事件) |
当 type 为 endpoint.event.procstart 时,原始日志中 childproc_hash 数组的第二个元素。 |
childproc_name |
target.process.file.full_path (适用于 endpoint.event.procstart 事件) |
当 type 为 endpoint.event.procstart 时,原始日志中 childproc_name 字段的值。 |
childproc_pid |
target.process.pid (适用于 endpoint.event.procstart 事件) |
当 type 为 endpoint.event.procstart 时,原始日志中 childproc_pid 字段的值。 |
childproc_publisher.0.name |
security_result.detection_fields[?key == 'childproc_publisher_name'].value (适用于 endpoint.event.procstart 事件) |
“childproc_publisher_name:”与原始日志中 type 为 endpoint.event.procstart 时的 childproc_publisher.0.name 值串联。 |
childproc_publisher.0.state |
security_result.detection_fields[?key == 'childproc_publisher_state'].value (适用于 endpoint.event.procstart 事件) |
“childproc_publisher_state:”与原始日志中 type 为 endpoint.event.procstart 时的 childproc_publisher.0.state 值串联。 |
childproc_reputation |
security_result.detection_fields[?key == 'childproc_reputation'].value (适用于 endpoint.event.procstart 事件) |
当 type 为 endpoint.event.procstart 时,原始日志中 childproc_reputation 字段的值。 |
childproc_username |
target.user.userid (适用于 endpoint.event.procstart 事件) |
当 type 为 endpoint.event.procstart 时,原始日志中 childproc_username 字段的值。 |
clientIp |
principal.ip ,principal.asset.ip |
原始日志中 clientIp 字段的值。 |
cmdline |
target.process.command_line (适用于 feed.query.hit.process 和 feed.storage.hit.process 事件)、additional.fields[?key == 'cmdline_*'].value.string_value (适用于 watchlist.storage.hit.process 事件) |
当 type 为 feed.query.hit.process 或 feed.storage.hit.process 时,原始日志中 cmdline 字段的值。对于 watchlist.storage.hit.process 事件,它存储在 additional.fields 中,键为“cmdline_*”。 |
command_line |
target.process.command_line (适用于 ingress.event.procstart 事件) |
当 type 为 ingress.event.procstart 时,原始日志中 command_line 字段的值。 |
comms_ip |
intermediary.ip |
原始日志中 comms_ip 字段的值。 |
computer_name |
principal.hostname ,principal.asset.hostname |
原始日志中 computer_name 字段的值。 |
crossproc_api |
additional.fields[?key == 'crossproc_api'].value.string_value (适用于 endpoint.event.apicall 事件) |
当 type 为 endpoint.event.apicall 时,原始日志中 crossproc_api 字段的值。 |
crossproc_guid |
additional.fields[?key == 'crossproc_guid'].value.string_value (适用于 endpoint.event.crossproc 事件) |
当 type 为 endpoint.event.crossproc 时,原始日志中 crossproc_guid 字段的值。 |
crossproc_hash.0 |
additional.fields[?key == 'crossproc_md5'].value.string_value (适用于 endpoint.event.crossproc 事件) |
当 type 为 endpoint.event.crossproc 时,原始日志中 crossproc_hash 数组的第一个元素。 |
crossproc_hash.1 |
additional.fields[?key == 'crossproc_sha256'].value.string_value (适用于 endpoint.event.crossproc 事件) |
当 type 为 endpoint.event.crossproc 时,原始日志中 crossproc_hash 数组的第二个元素。 |
crossproc_name |
target.process.file.full_path (适用于 endpoint.event.crossproc 事件) |
当 type 为 endpoint.event.crossproc 时,原始日志中 crossproc_name 字段的值。 |
crossproc_publisher.0.name |
security_result.detection_fields[?key == 'crossproc_publisher_name'].value (适用于 endpoint.event.crossproc 事件) |
“crossproc_publisher_name:”与原始日志中的 crossproc_publisher.0.name 值(当 type 为 endpoint.event.crossproc 时)串联。 |
crossproc_publisher.0.state |
security_result.detection_fields[?key == 'crossproc_publisher_state'].value (适用于 endpoint.event.crossproc 事件) |
“crossproc_publisher_state:”与原始日志中 type 为 endpoint.event.crossproc 时 crossproc_publisher.0.state 的值串联。 |
crossproc_reputation |
additional.fields[?key == 'crossproc_reputation'].value.string_value (适用于 endpoint.event.crossproc 事件) |
当 type 为 endpoint.event.crossproc 时,原始日志中 crossproc_reputation 字段的值。 |
crossproc_target |
additional.fields[?key == 'crossproc_target'].value.string_value (适用于 endpoint.event.crossproc 事件) |
当 type 为 endpoint.event.crossproc 时,原始日志中 crossproc_target 字段的值。转换为字符串“true”或“false”。 |
需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。