收集 Carbon Black App Control 日志

支持的平台:

本文档介绍了如何收集 Carbon Black App Control 日志。该解析器同时支持 CEF 和 JSON 格式。它会先尝试将输入解析为 JSON;如果失败,则将输入视为 CEF,执行文本替换,提取 CEF 字段,将其映射到 UDM,并将事件类型设置为“GENERIC_EVENT”。否则,它会使用单独的 JSON 专用 UDM 映射包含文件。

准备工作

  • 确保您有一个 Google Security Operations 实例。
  • 确保您使用的是 Windows 2016 或更高版本,或者使用 systemd 的 Linux 主机。
  • 如果在代理后面运行,请确保防火墙端口处于打开状态。
  • Carbon Black App Control (CB Protection) 服务器(建议使用 8.x 或更高版本)。
  • 确保您拥有对 Carbon Black App Control 的特权访问权限。

获取 Google SecOps 提取身份验证文件

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 收集代理
  3. 下载提取身份验证文件。将该文件安全地保存在将安装 BindPlane 的系统上。

获取 Google SecOps 客户 ID

  1. 登录 Google SecOps 控制台。
  2. 依次选择 SIEM 设置 > 配置文件
  3. 复制并保存组织详细信息部分中的客户 ID

安装 Bindplane Agent

Windows 安装

  1. 以管理员身份打开命令提示符PowerShell
  2. 运行以下命令:

    msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
    

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
    

其他安装资源

  • 如需了解其他安装选项,请参阅此安装指南

配置 Bindplane Agent 以提取 Syslog 并将其发送到 Google SecOps

  1. 访问配置文件:

    • 找到 config.yaml 文件。通常,在 Linux 上,该目录位于 /etc/bindplane-agent/ 目录中;在 Windows 上,则位于安装目录中。
    • 使用文本编辑器(例如 nanovi 或记事本)打开该文件。
  2. 按如下方式修改 config.yaml 文件:

    receivers:
        tcplog:
            # Replace the port and IP address as required
            listen_address: "0.0.0.0:11592"
    
    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: JSON
                namespace: cb_app_control
                raw_log_field: body
    
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - tcplog
                exporters:
                    - chronicle/chronicle_w_labels
    
    
  3. 根据基础架构中的需要替换端口和 IP 地址。

  4. <customer_id> 替换为实际的客户 ID。

  5. 获取 Google SecOps 提取身份验证文件部分,将 /path/to/ingestion-authentication-file.json 更新为身份验证文件的保存路径。

重启 Bindplane 代理以应用更改

  • 如需在 Linux 中重启 Bindplane 代理,请运行以下命令:

    sudo systemctl restart bindplane-agent
    
  • 如需在 Windows 中重启 Bindplane Agent,您可以使用服务控制台,也可以输入以下命令:

    net stop BindPlaneAgent && net start BindPlaneAgent
    

配置 CB App Control 以发送 Syslog 日志

  1. 使用管理员账号登录 CB App Control 控制台。
  2. 依次前往管理 > 系统配置 > 外部日志记录
  3. 在“外部事件日志记录”部分:
    • 启用 Syslog 日志记录:选中 Syslog Enabled(已启用 Syslog)复选框。
    • 服务器地址<Bindplane Server IP>
    • 端口<Bindplane Server PORT>
    • 协议:选择 TCP
    • Syslog 格式:选择 JSON
  4. 事件日志记录选项下,选择要发送的日志类型:
    • 违反政策
    • 文件完整性监控 (FIM) 事件
    • 用户身份验证事件
    • 威胁情报数据
  5. 点击保存

UDM 映射表

日志字段 UDM 映射 逻辑
ABId principal.asset.asset_id JSON 日志中的 ABId 将用作采用 PRODUCT_SPECIFIC_ID:{ABId}-{Bit9Server} 格式的素材资源 ID 的一部分。
Bit9Server principal.asset.asset_id ABId 结合使用,用作主要角色的资产 ID 的一部分。也用于构造 metadata.url_back_to_product 字段。
CommandLine about.process.command_line 直接映射。
EventType metadata.product_event_type 与方括号中的相应 EventTypeId 进行映射(例如,“[5] - Discovery”)。
EventTypeId metadata.product_event_type EventType 搭配使用,用于填充 metadata.product_event_type
EventSubType metadata.description 附加到 metadata.description 字段。
EventSubTypeId metadata.description 未明确映射,但可能会根据解析器的内部逻辑为说明做出贡献。
externalId metadata.product_log_id 直接映射。
FileHash about.file.sha256 直接映射。
FileName additional.fields(键为“FileName”) 已添加为其他字段。也用于某些事件的 metadata.description 中的文件信息。
FilePath about.file.full_path 直接映射。
FileThreat additional.fields(键为“fileThreat”) 已添加为其他字段。
FileTrust additional.fields(键为“fileTrust”) 已添加为其他字段。
HostId principal.asset.asset_id 用于在 metadata.url_back_to_product 中构建返回商品的网址。
HostName target.hostname 直接映射。
HostIP target.ip 直接映射。
Message metadata.description 直接映射。
PathName about.file.full_path 直接映射。
Platform target.platform 映射到枚举值 WINDOWS
Policy additional.fields(键为“Policy”) 已添加为其他字段。
PolicyId additional.fields(键为“PolicyId”) 已添加为其他字段。
ProcessKey additional.fields(键为“ProcessKey”) 已添加为其他字段。
ProcessPath about.process.command_line 直接映射。
ProcessPathName about.process.command_line 直接映射。
ProcessThreat additional.fields(键为“ProcessThreat”) 已添加为其他字段。
ProcessTrust additional.fields(使用键“ProcessTrust”) 已添加为其他字段。
RuleName additional.fields(键为“ruleName”) 已添加为其他字段。
Timestamp metadata.event_timestamp 直接映射。
UserName target.user.user_display_name 直接映射。
UserSid principal.user.userid 直接映射。
agent.ephemeral_id observer.labels(键为“ephemeral_id”) 添加为观察器标签。
agent.name principal.hostnameobserver.hostnameobserver.user.userid 已映射到多个字段。
agent.type observer.application 直接映射。
agent.version metadata.product_version 直接映射到 JSON 日志。对于 CEF 日志,从 CEF 消息中提取。
cat security_result.category_details 直接映射。
cs1 additional.fields(键为“rootHash”或其他 cs1Label) 作为额外字段添加,键由 cs1Label 定义。
cs1Label additional.fields 用作由 cs1 填充的附加字段的键。
cs2 additional.fields(键为“installerFilename”或其他 cs2Label) 作为额外字段添加,键由 cs2Label 定义。
cs2Label additional.fields 用作由 cs2 填充的附加字段的键。
cs3 additional.fields(键为“Policy”或其他 cs3Label) 作为额外字段添加,键由 cs3Label 定义。
cs3Label additional.fields 用作由 cs3 填充的附加字段的键。
cs5 additional.fields(键为“ruleName”或其他 cs5Label) 作为额外字段添加,键由 cs5Label 定义。
cs5Label additional.fields 用作由 cs5 填充的附加字段的键。
cfp1 additional.fields(使用键“fileTrust”或其他 cfp1Label) 作为额外字段添加,键由 cfp1Label 定义。
cfp1Label additional.fields 用作由 cfp1 填充的附加字段的键。
cfp2 additional.fields(使用键“processTrust”或其他 cfp2Label) 作为额外字段添加,键由 cfp2Label 定义。
cfp2Label additional.fields 用作由 cfp2 填充的附加字段的键。
deviceProcessName about.process.command_line 直接映射。
dhost target.hostname 直接映射。
dst target.ip 直接映射。
duser target.user.user_display_name 直接映射。
dvchost about.hostname 直接映射。
eventId additional.fields(键为“eventId”) 已添加为其他字段。
fileHash about.file.sha256 直接映射。
flexString1 additional.fields(键为“fileThreat”或其他 flexString1Label) 作为额外字段添加,键由 flexString1Label 定义。
flexString1Label additional.fields 用作由 flexString1 填充的附加字段的键。
flexString2 additional.fields(键为“processThreat”或其他 flexString2Label) 作为额外字段添加,键由 flexString2Label 定义。
flexString2Label additional.fields 用作由 flexString2 填充的附加字段的键。
fname additional.fields(键为“fname”) 已添加为其他字段。也用于某些事件的 metadata.description 中的文件信息。
host.architecture target.asset.hardware.cpu_platform 直接映射。
host.hostname target.asset.asset_id 用于目标资产 ID(“主机 ID:{host.hostname}”)的一部分。也映射到 target.hostname
host.id target.asset.asset_id 用于目标资产 ID(“主机 ID:{host.id}”)的一部分。
host.ip target.asset.ip 直接映射。
host.mac target.mac 直接映射。
host.name target.hostname 直接映射。
host.os.build target.platform_patch_level 直接映射。
host.os.kernel target.platform_patch_level 附加到 target.platform_patch_level
host.os.platform target.platform 映射到枚举值 WINDOWS
host.os.type target.platform 映射到枚举值 WINDOWS
host.os.version target.platform_version 直接映射。
log.file.path target.file.full_path 直接映射。
metadata.event_type metadata.event_type 对于 CEF 日志,请将其设置为“GENERIC_EVENT”;对于 JSON 日志,请将其设置为“SYSTEM_AUDIT_LOG_UNCATEGORIZED”。
metadata.log_type metadata.log_type 设置为“CB_EDR”。
metadata.product_log_id metadata.product_log_id externalId 映射而来,适用于 CEF 日志。不适用于 JSON 日志。
metadata.product_name metadata.product_name 对于 CEF 日志,设置为“App Control”;对于 JSON 日志,设置为“CB_APP_CONTROL”。
metadata.product_version metadata.product_version 从 CEF 日志的 CEF 消息中提取。从 agent.version 映射而来(适用于 JSON 日志)。
metadata.vendor_name metadata.vendor_name 设置为“碳黑”。
msg metadata.descriptionadditional.fields 用于根据解析器的逻辑填充 metadata.description 和可能的其他字段。
sproc principal.process.command_line 直接映射。
metadata.url_back_to_product metadata.url_back_to_product 使用 JSON 日志的 Bit9ServerHostId 字段构建。不适用于 CEF 日志。
security_result.severity security_result.severity 设置为 MEDIUM
timestamp events.timestamp 直接映射到 JSON 日志。对于 CEF 日志,解析器逻辑会根据原始日志的 rt 字段(如果有)或 collection_time(如果没有 rt)确定时间戳。

变化

2022-07-01

  • 改进
  • 将字段“agent.type”映射到“observer.application”。
  • 将“agent.name”字段映射到了“observer.user.userid”。
  • 将“host.name”字段映射到了“observer.hostname”。
  • 将“agent.type”和“agent.name”字段映射到了“observer.asset_id”。
  • 将“agent.ephemeral_id”字段映射到了“observer.labels”。
  • 将字段“host.os.platform”映射到“target.platform”。
  • 将字段“host.os.version”映射到“target.platform_version”。
  • 将字段“host.os.kernel”映射到“target.platform_patch_level”。
  • 将字段“cloud.instance.id”映射到“principal.resource.product_object_id”。
  • 将“cloud.instance.name”字段映射到了“principal.resource.name”。
  • 将字段“host.mac”映射到“target.mac”。
  • 将字段“host.ip”映射到“target.asset.ip”。
  • 将字段“host.id”映射到“target.asset.asset_id”。
  • 将字段“host.architecture”映射到“target.asset.hardware”。
  • 将字段“message.UserSID”映射到“principal.user.userid”。
  • 将“message.ProcessPath”字段映射到了“about.process.command_line”。
  • 将“cloud.machine.type”和“cloud.provider”字段映射到了“principal.resource.attribute.labels”。
  • 为映射到“metadata.url_back_to_product”的“message.Bit9Server”和“message.HostId”添加了条件检查。

2022-06-22

  • bug 修复
  • 将 hostId 映射到 principal.asset_id
  • 将 Bit9Server 和 HostId 组合映射到 metadata.url_back_to_product

2022-05-19

  • bug 修复
  • 解析了 bug 中请求的日志
  • 解析的 API 失败日志

需要更多帮助?向社区成员和 Google SecOps 专业人士寻求解答。