收集 CrowdStrike Falcon Stream 日志

支持的语言:

本文档介绍了如何使用 Bindplane 收集 CrowdStrike Falcon Stream 日志。解析器会提取键值对并将其映射到统一数据模型 (UDM),同时处理不同的分隔符,并使用严重程度和事件类型等其他背景信息来丰富数据。它还会针对某些事件类型和字段(例如用户登录和安全结果)执行特定转换。

准备工作

  • 确保您拥有 Google Security Operations 实例。
  • 确保您使用的是 Windows 2016 或更高版本,或者具有 systemd 的 Linux 主机。
  • 如果通过代理运行,请确保防火墙端口处于开放状态。
  • 确保您拥有 CrowdStrike Falcon 控制台的特权访问权限。
  • 获取 Falcon Stream 的 API 凭据(客户端 ID 和客户端密钥)。

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

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

获取 Google SecOps 客户 ID

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

安装 BindPlane 代理

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 代理以注入 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:54525"
    
    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: SYSLOG
                namespace: cs_stream
                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 提取身份验证文件部分中保存身份验证文件的路径。

重启 Bindplane 代理以应用更改

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

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

    net stop BindplaneAgent && net start BindplaneAgent
    

配置并获取 CrowdStrike API 密钥

  1. 使用具有管理员权限的账号登录 CrowdStrike Falcon
  2. 依次前往菜单 > 支持
  3. 依次点击 API 客户端 > 密钥选择
  4. 点击添加新的 API 客户端
  5. API 范围部分中,选择事件流,然后启用读取选项。
  6. 点击添加
  7. 复制并保存客户端 ID、客户端密钥和基本网址

安装 Falcon SIEM 连接器

  1. 下载适用于您的操作系统的 RPM 安装程序软件包。
  2. 软件包安装:

    • CentOS 操作系统:

      sudo rpm -Uvh <installer package>
      
    • Ubuntu 操作系统:

      sudo dpkg -i <installer package>
      
  3. 默认安装目录:

    • Falcon SIEM Connector - /opt/crowdstrike/
    • 服务 - /etc/init.d/cs.falconhoseclientd/

配置 SIEM 连接器以将事件转发到 Bindplane

  1. sudo 用户身份登录已安装 SIEM 连接器的计算机。
  2. 转到 /opt/crowdstrike/etc/ 目录。
  3. cs.falconhoseclient.leef.cfg 重命名为 cs.falconhoseclient.cfg
    • SIEM 连接器默认使用 cs.falconhoseclient.cfg 配置。
  4. 修改 cs.falconhoseclient.cfg 文件,并修改或设置以下参数:
    • api_url: - 您在上一步中复制的 CrowdStrike Falcon 基本网址。
    • app_id: - 用于连接到 Falcon Streaming API 的任意字符串标识符;例如,设置为 app_id: SECOPS-LEEF
    • client_id: - 从上一步复制的 client_id 值。
    • client_secret: - 从上一步复制的 client_secret 值。
    • send_to_syslog_server: true - 启用向 Syslog 服务器推送。
    • host: - Bindplane 代理的 IP 或主机名。
    • port: - Bindplane 代理的端口。
  5. 保存 cs.falconhoseclient.cfg 文件。
  6. 启动 SIEM 连接器服务:

    • CentOS 操作系统:

      sudo service cs.falconhoseclientd start
      
    • Ubuntu 16.04 或更高版本的操作系统:

      sudo systemctl start cs.falconhoseclientd.service
      
  7. 可选:停止 SIEM 连接器服务:

    • CentOS 操作系统:

      sudo service cs.falconhoseclientd stop
      
    • Ubuntu 16.04 或更高版本的操作系统:

      sudo systemctl stop cs.falconhoseclientd.service
      
  8. 可选:重启 SIEM 连接器服务:

    • CentOS 操作系统:

      sudo service cs.falconhoseclientd restart
      
    • Ubuntu 16.04 或更高版本的操作系统:

      sudo systemctl restart cs.falconhoseclientd.service
      

UDM 映射表

日志字段 UDM 映射 逻辑
cat security_result.category_details cat 字段的值直接映射到 security_result.category_details 字段。
commandLine target.process.command_line commandLine 字段的值直接映射到 target.process.command_line 字段。
cs1 security_result.summary 如果 cs1Label 为“incidentType”,则 cs1 的值会映射到 security_result.summary。否则,它会作为键值对映射到 security_result.detection_fields 中,其中键来自 cs1Label,值来自 cs1
cs1Label security_result.detection_fields.key cs1 不是事件类型时,用作 security_result.detection_fields 中的键。
cs2 security_result.detection_fields.value security_result.detection_fields 中映射为键值对,其中键来自 cs2Label,值来自 cs2
cs2Label security_result.detection_fields.key cs2 一起用作 security_result.detection_fields 中的键。
cs3 security_result.detection_fields.value security_result.detection_fields 中映射为键值对,其中键来自 cs3Label,值来自 cs3
cs3Label security_result.detection_fields.key cs3 一起用作 security_result.detection_fields 中的键。
cs4 security_result.about.url 如果 cs4Label 为“falconHostLink”,则 cs4 的值会映射到 security_result.about.url。否则,它会作为键值对映射到 security_result.detection_fields 中,其中键来自 cs4Label,值来自 cs4
cs4Label security_result.detection_fields.key cs4 不是 falconHostLink 时,用作 security_result.detection_fields 中的键。
description metadata.description description 字段的值直接映射到 metadata.description 字段。如果为空,则改用 incidentDescriptionmsgserviceName
devTime metadata.event_timestamp 系统会解析 devTime 字段的值,并将其映射到 metadata.event_timestamp 字段。
deviceCustomDate1 metadata.event_timestamp 如果不存在 devTime,则系统会解析 deviceCustomDate1 字段的值并将其映射到 metadata.event_timestamp 字段。
domain principal.administrative_domain 使用正则表达式从 userName 字段中提取,并映射到 principal.administrative_domain
duser principal.user.userid 如果存在,duser 的值会覆盖 usrName 字段,然后用于填充用户字段。
endpointName security_result.detection_fields.value security_result.detection_fields 中映射为键值对,键为“endpointName”。
eventType metadata.product_event_type eventType 字段的值直接映射到 metadata.product_event_type 字段。
falconHostLink security_result.about.url falconHostLink 字段的值直接映射到 security_result.about.url 字段。
filePath target.process.file.full_path filePath 字段的值直接映射到 target.process.file.full_path 字段。
identityProtectionIncidentId security_result.detection_fields.value security_result.detection_fields 中映射为键值对,键为“identityProtectionIncidentId”。
incidentDescription metadata.description 如果 description 为空,则 incidentDescription 字段的值会映射到 metadata.description 字段。
incidentType security_result.summary incidentType 字段的值直接映射到 security_result.summary 字段。
log_type metadata.log_type log_type 字段的值直接映射到 metadata.log_type 字段。
msg metadata.description 如果 descriptionincidentDescription 为空,则 msg 字段的值会映射到 metadata.description 字段。
numbersOfAlerts security_result.detection_fields.value security_result.detection_fields 中映射为键值对,其中键为“numbersOfAlerts”。
numberOfCompromisedEntities security_result.detection_fields.value security_result.detection_fields 中映射为键值对,键为“numberOfCompromisedEntities”。
product metadata.product_name product 字段的值直接映射到 metadata.product_name 字段。
resource target.resource.name resource 字段的值直接映射到 target.resource.name 字段。
serviceName target.application serviceName 字段的值直接映射到 target.application 字段。也用作 metadata.description 的后备。
severityName security_result.severity severityName 字段的值在转换为大写后会映射到 security_result.severity 字段。映射逻辑包含针对不同严重程度名称的特定转换。
sha256 target.file.sha256 sha256 字段的值直接映射到 target.file.sha256 字段。
src principal.ip src 字段的值直接映射到 principal.ip 字段。
srcMAC principal.mac 在将连字符替换为英文冒号后,srcMAC 字段的值会直接映射到 principal.mac 字段。
state security_result.detection_fields.value security_result.detection_fields 中映射为键值对,键为“state”。
success security_result.action 如果 success 为“true”,则将 security_result.action 设置为“ALLOW”。如果 success 为“false”,则将 security_result.action 设置为“BLOCK”。
userName principal.user.userid 如果不存在 usrName,则使用 userName 字段的值来填充用户字段。如果存在网域,则提取该网域。
usrName principal.user.userid/target.user.userid 如果存在,则根据 eventTypeusrName 字段的值映射到 principal.user.useridtarget.user.userid。如果是电子邮件地址,则还会将其添加到相应的 email_addresses 字段。
vendor metadata.vendor_name vendor 字段的值直接映射到 metadata.vendor_name 字段。
version metadata.product_version version 字段的值直接映射到 metadata.product_version 字段。
(解析器逻辑) extensions.auth.mechanism 如果 eventType 为“saml2Assert”或“twoFactorAuthenticate”,则设置为“USERNAME_PASSWORD”。
(解析器逻辑) extensions.auth.type 如果 eventType 为“assert”或“userAuthenticate”,则设置为“AUTHTYPE_UNSPECIFIED”。
(解析器逻辑) metadata.event_timestamp 原始日志的 collection_timetimestamp 字段中的时间戳用作事件时间戳。
(解析器逻辑) metadata.event_type 根据 eventType 和其他字段确定。默认值为“GENERIC_EVENT”,可以更改为“USER_LOGIN”“GROUP_MODIFICATION”“GROUP_DELETION”“SERVICE_STOP”“SERVICE_START”或“USER_UNCATEGORIZED”。
(解析器逻辑) target.resource.type 如果 eventType 为“remove_group”“update_group”或“delete_group”,则设置为“GROUP”。

需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。