收集 BloxOne Threat Defense 日志

解析器版本:8.0

支持:

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

Infoblox BloxOne Threat Defense 是一项云管理 DNS 安全服务,可为 DNS 查询、威胁情报事件和政策操作生成 CEF 格式的 syslog 消息。解析器会标准化字段并将其映射到统一数据模型 (UDM)。

准备工作

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

  • Google SecOps 实例
  • Windows Server 2016 或更高版本,或者具有 systemd 的 Linux 主机
  • Bindplane 代理与 Infoblox BloxOne 平台之间的网络连接
  • 如果通过代理运行,请确保防火墙端口根据 Bindplane 代理要求处于开放状态
  • 对 Infoblox 门户的特权访问权限

获取 Bindplane 代理的 Google SecOps 凭据

如需向 Google SecOps 验证 Bindplane 代理的身份,请选择以下方法之一:

  • 新部署:使用 Chronicle API(选项 1)。
  • 旧版部署:继续使用数据注入身份验证文件(方法 2),直到 Ingestion API 于 2027 年 7 月 20 日停用。
  1. 登录 Google Cloud 控制台,然后选择与您的 Google SecOps 实例关联的 Google Cloud 项目。
  2. 前往 IAM 和管理 > 服务账号。
  3. 点击创建服务账号。
  4. 提供以下配置详细信息:
    • 服务账号名称:输入账号的名称(例如 bindplane-ingest)。
    • 服务账号说明:输入说明(例如 Bindplane agent log ingestion)。
  5. 点击创建并继续。
  6. 在向此服务账号授予对项目的访问权限部分,点击选择角色,然后选择 Chronicle Editor。
  7. 点击继续,然后点击完成。
  8. 点击您创建的服务账号,然后前往密钥标签页。
  9. 依次点击添加密钥 > 创建新密钥。
  10. 选择 JSON,然后点击创建。密钥文件会下载到您的计算机上。
  11. 将密钥文件另存为 Bindplane 收集器目录(Linux 上的 /opt/observiq-otel-collector/ingestion-auth.json 或 Windows 上的 C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json)中的 ingestion-auth.json,或更新 config.yaml 中的 creds_file_path 以匹配您保存该文件的路径。
  12. 前往 IAM 和管理 > 设置,然后复制项目编号。您在配置导出器时需要用到该名称。

方法 2:下载数据注入身份验证文件(旧版)

  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
    

    该服务应显示为 RUNNING。

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
    

    该服务应显示为 active (running)。

其他安装资源

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

配置 Bindplane 代理以注入 Syslog 并发送到 Google SecOps

找到配置文件

  • Linux:

    sudo nano /opt/observiq-otel-collector/config.yaml
    
  • Windows:

    notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
    

修改配置文件

  • 将 config.yaml 的全部内容替换为以下配置:

    receivers:
      udplog:
        listen_address: "0.0.0.0:514"
    
    exporters:
      chronicle/bloxone:
        protocol: https
        # Region of your instance, for example us, europe, asia-southeast1
        location: <LOCATION>
        # Project number of the Google Cloud project linked to the instance
        project: '<PROJECT_NUMBER>'
        compression: gzip
        creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json'
        customer_id: '<customer_id>'
        endpoint: chronicle.googleapis.com
        log_type: BLOXONE
        raw_log_field: body
    
    service:
      pipelines:
        logs/bloxone_to_chronicle:
          receivers:
            - udplog
          exporters:
            - chronicle/bloxone
    

配置参数

替换以下占位符:

  • 接收器配置:

    • listen_address:要监听的 IP 地址和端口:
      • 0.0.0.0,以监听所有接口(推荐)
      • 端口 514 是标准 syslog 端口(在 Linux 上需要 root 权限;对于非 root 用户,请使用 1514)
  • 导出器配置:

    • creds_file_path:服务账号 JSON 密钥文件的完整路径(选项 1):
      • Linux:/opt/observiq-otel-collector/ingestion-auth.json
      • Windows:C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
    • customer_id:从 Google SecOps 控制台复制的客户 ID
    • location:将 <LOCATION> 替换为 Google SecOps 实例的区域(例如 us、europe 或 asia-southeast1)。导出器会使用此值作为 chronicle.googleapis.com 的前缀。如需查看完整列表,请参阅区域级端点。
    • project:将 <PROJECT_NUMBER> 替换为“IAM 和管理”>“设置”中的项目编号。
    • endpoint:保持设置为 chronicle.googleapis.com。

旧版提取 API

  • 如果您使用选项 2 中的数据注入身份验证文件,请将 exporters 代码块替换为以下内容。将 creds_file_path 设置为数据注入身份验证文件的路径,如果您的实例位于美国境外,请将 malachiteingestion-pa.googleapis.com 替换为您的区域端点(例如 europe-malachiteingestion-pa.googleapis.com)。

    exporters:
      chronicle/bloxone:
        compression: gzip
        creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json'
        customer_id: '<customer_id>'
        endpoint: malachiteingestion-pa.googleapis.com
        log_type: BLOXONE
        raw_log_field: body
    

保存配置文件

  • 修改后,保存文件:
    • Linux:依次按 Ctrl+O、Enter 和 Ctrl+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"
        

在 Infoblox BloxOne 中配置 syslog

  1. 登录 Infoblox 门户。
  2. 依次前往配置 > 管理 > 数据连接器。
  3. 选择目标配置标签页。
  4. 依次点击创建 > Syslog。
  5. 提供以下配置详细信息:
    • 名称:提供描述性名称(例如,Google SecOps 收集器)。
    • 说明:提供简要说明。
    • 状态:选择启用。
    • 标记:点击添加,然后指定以下内容,将密钥与目标位置相关联:
      • KEY:为密钥输入一个描述性名称。
      • VALUE:输入键的值。
    • 格式:选择 CEF。
    • 协议:选择 UDP 或 TCP(具体取决于您的 Bindplane 代理配置)。
    • FQDN/IP:输入 Bindplane 代理 IP 地址。
    • 端口:输入 Bindplane 代理端口(UDP 的默认端口为 514)。
  6. 点击保存并关闭。

UDM 映射表

日志字段 UDM 映射 逻辑
additional_list.key 此字段在循环中用于遍历 additional_list 数组,并根据 key 字段的值提取数据。它不会直接映射到 UDM。
additional_list.value principal.location.region_latitude、principal.location.region_longitude、target.location.region_latitude、target.location.region_longitude 此字段与 additional_list.key 结合使用,可从 additional_list 数组中提取特定值。提取和映射值的逻辑取决于对应的 key。例如:
- 如果 additional_list.key 为 intel:source:ip:geoIP:location,则使用 grok 提取纬度和经度值,并分别将其映射到 principal.location.region_latitude 和 principal.location.region_longitude。
- 如果 additional_list.key 为 intel:destination:ip:geoIP:location,则使用 grok 提取纬度和经度值,并分别将其映射到 target.location.region_latitude 和 target.location.region_longitude。
additional_string.key 与 additional_list.key 类似,此字段在循环中用于遍历 additional_string 数组,并根据 key 值提取数据。它不会直接映射到 UDM。
additional_string.value additional.fields.value.string_value、principal.location.country_or_region、target.location.country_or_region、src.ip、src.port、src.hostname、network.ip_protocol 与 additional_string.key 搭配使用,可从 additional_string 数组中提取值。值映射逻辑取决于对应的 key。例如:
- 如果 additional_string.key 为 intel:source:ip:ip2asn:start_ip、intel:source:ip:ip2asn:finish_ip、intel:destination:ip:ip2asn:start_ip 或 intel:destination:ip:ip2asn:finish_ip,则使用相应键将值映射到 additional.fields.value.string_value。
- 如果 additional_string.key 为 intel:source:ip:geoIP:country,则将该值映射到 principal.location.country_or_region。
- 如果 additional_string.key 为 intel:destination:ip:geoIP:country,则将该值映射到 target.location.country_or_region。
- 如果 additional_string.key 为 log:source:ip,则将该值映射到 src.ip。
- 如果 additional_string.key 为 log:source:port,则将该值转换为整数后映射到 src.port。
- 如果 additional_string.key 为 log:source:hostname,则将值映射到 src.hostname。
- 如果 additional_string.key 为 log:cdh:input:protocol,则在将值转换为大写后将其映射到 network.ip_protocol。
app_category security_result.category_details 直接映射。
confidence security_result.confidence 根据以下逻辑进行映射:
- 如果 confidence 为 LOW,则映射到 LOW_CONFIDENCE。
- 如果 confidence 为 MEDIUM,则映射到 MEDIUM_CONFIDENCE。
- 如果 confidence 为 HIGH,则映射到 HIGH_CONFIDENCE。
country principal.location.name 直接映射,但仅限 raw.infobloxb1region 为空时。
device principal.ip,principal.asset.ip 直接映射,但仅限 raw.dvc 为空时。
dhcp_fingerprint security_result.detection_fields.value 直接映射到键 dhcp_fingerprint。
dns_view security_result.detection_fields.value 直接映射到键 dns_view。
endpoint_groups security_result.detection_fields.value 直接映射到键 endpoint_groups。
event_time metadata.event_timestamp.seconds 解析为 ISO8601 时间戳,并提取秒值。仅在 timestamp 字段为空时使用。
feed_name principal.resource.name feed_name 映射到 principal.resource.name。
feed_type principal.resource.attribute.labels.value 直接映射到键 feed_type。
mac_address principal.mac 转换为小写后直接映射。
network principal.hostname,principal.asset.hostname 直接映射,但仅当 raw.dvchost 和 raw.dvc 均为空时。
os_version principal.platform_version 直接映射。
policy_action security_result.action_details,security_result.action policy_action 直接映射到 security_result.action_details。
security_result.action 是根据以下逻辑得出的:
- 如果 policy_action 为 Redirect 或 Log,则映射到 ALLOW。
- 如果 policy_action 为 BLOCK,则映射到 BLOCK。
policy_name security_result.detection_fields.value 直接与键 policy_name 映射。
qname network.dns.questions.name 直接映射。
qtype network.dns.questions.type 根据以下逻辑进行映射:
- 如果 qtype 为 A,则映射为 1(转换为无符号整数)。
- 如果 qtype 为 PTR,则映射到 12(转换为无符号整数)。
raw.act security_result.action_details 直接映射。
raw.app network.application_protocol 转换为大写后直接映射。
raw.deviceeventclassid metadata.product_event_type 与 raw.name 串联(以 - 分隔),并映射到 metadata.product_event_type。
raw.devicevendor metadata.vendor_name 直接映射。
raw.deviceproduct metadata.product_name 直接映射。
raw.deviceversion metadata.product_version 直接映射。
raw.deviceseverity security_result.severity_details,security_result.severity raw.deviceseverity 直接映射到 security_result.severity_details。
security_result.severity 是根据以下逻辑得出的:
- 如果 raw.deviceseverity 属于 [0、1、2、3],则映射到 LOW。
- 如果 raw.deviceseverity 位于 [4, 5, 6] 中,则映射到 MEDIUM。
- 如果 raw.deviceseverity 位于 [7, 8] 中,则映射到 HIGH。
- 如果 raw.deviceseverity 介于 [9, 10] 之间,则映射到 CRITICAL。
raw.dvc principal.ip,principal.asset.ip 直接映射。
raw.dvchost principal.hostname,principal.asset.hostname 直接映射,但前提是不等于 raw.dvc。
raw.infobloxb1connectiontype additional.fields.value.string_value 直接映射到键 infobloxb1connectiontype。
raw.infobloxb1ophname observer.hostname,observer.asset.hostname 直接映射。
raw.infobloxb1ophipaddress observer.ip 直接映射。
raw.infobloxb1policyname security_result.detection_fields.value 直接与键 infobloxb1policyname 映射。
raw.infobloxdnsqclass dns_question.class,dns_answer.class 用于根据 dns_query_class_mapping.include 文件中定义的对照表派生 dns_question.class 和 dns_answer.class。
raw.infobloxdnsqtype dns_question.type,dns_answer.type 用于根据 dns_record_type.include 文件中定义的对照表派生 dns_question.type 和 dns_answer.type。
raw.infobloxdnsrcode network.dns.response_code 用于根据 dns_response_code.include 文件中定义的对照表派生 network.dns.response_code。
raw.infobloxpolicyid security_result.detection_fields.value 直接与键 infobloxpolicyid 映射。
raw.msg metadata.description 移除开头和结尾的英文引号后,raw.msg 直接映射到 metadata.description。
raw.name metadata.product_event_type 与 raw.deviceeventclassid 串联(以 - 分隔),并映射到 metadata.product_event_type。
rcode security_result.detection_fields.value,network.dns.response_code rcode 通过键 rcode 直接映射到 security_result.detection_fields.value。
如果 rcode 为 NXDOMAIN,则 network.dns.response_code 设置为 3(转换为无符号整数)。
rdata network.dns.answers.data 直接映射。
rip target.ip,target.asset.ip 直接映射。
severity security_result.severity 根据以下逻辑进行映射:
- 如果 severity 为 INFO(不区分大小写),则映射到 INFORMATIONAL。
- 如果 severity 为 HIGH,则映射到 HIGH。
tclass security_result.detection_fields.value 直接映射到键 tclass。
threat_indicator security_result.detection_fields.value 直接映射到键 threat_indicator。
timestamp metadata.event_timestamp.seconds 解析为 ISO8601 时间戳,并提取秒值。
user principal.user.user_display_name 直接映射。
user_groups security_result.detection_fields.value 直接映射到键 user_groups。
不适用 principal.resource.resource_subtype 如果 feed_name 不为空,则设置为 Feed。
不适用 metadata.log_type 设置为 BLOXONE。
不适用 additional.fields.key 根据对应的 raw 字段,设置为 infobloxancount、infobloxarcount、infobloxb1connectiontype、infobloxnscount、intel:destination:ip:ip2asn:finish_ip、intel:destination:ip:ip2asn:start_ip、intel:source:ip:ip2asn:finish_ip 或 intel:source:ip:ip2asn:start_ip。
不适用 metadata.event_type 如果 has_principal 为 true,则设置为 STATUS_UPDATE,否则设置为 GENERIC_EVENT。
不适用 network.dns.questions.type 对于 A 记录,设置为 1;对于 PTR 记录,设置为 12,并转换为无符号整数。
不适用 network.dns.answers.name、network.dns.answers.type、network.dns.answers.class 通过解析 DNS 响应字符串从 raw.msg 中提取。
不适用 intermediary.hostname、intermediary.ip、intermediary.asset.ip 通过解析 DNS 响应字符串从 raw.msg 中提取。
intermediaryhost intermediary.hostname 从更新日志映射
app_name principal.application 从更新日志映射
endpoint_groups", "user_groups", "dns_view", "dhcp_fingerprint", "policy_name", "tclass", "tproperty", "threat_indicator", "category", and "rcode security_result.detection_fields 从更新日志映射

更新日志

查看此解析器的更新日志

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