收集 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 门户网站的特权访问权限

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

  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
    

    该服务应显示为 正在运行

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
    

    该服务应显示为有效(正在运行)

其他安装资源

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

配置 Bindplane 代理以注入 syslog 并将其发送到 Google SecOps

找到配置文件

  • Linux

    sudo nano /etc/bindplane-agent/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:
            compression: gzip
            creds_file_path: '/etc/bindplane-agent/ingestion-auth.json'
            customer_id: '<customer_id>'
            endpoint: malachiteingestion-pa.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:提取身份验证文件的完整路径:
      • Linux/etc/bindplane-agent/ingestion-auth.json
      • WindowsC:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
    • customer_id:从 Google SecOps 控制台复制的客户 ID
    • endpoint:区域端点网址:
      • 美国malachiteingestion-pa.googleapis.com
      • 欧洲europe-malachiteingestion-pa.googleapis.com
      • 亚洲asia-southeast1-malachiteingestion-pa.googleapis.com
      • 如需查看完整列表,请参阅区域级端点

保存配置文件

  • 修改后,保存文件:
    • Linux:依次按 Ctrl+OEnterCtrl+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
    • 协议:选择 UDPTCP(取决于您的 Bindplane 代理配置)。
    • FQDN/IP:输入 Bindplane 代理 IP 地址。
    • 端口:输入 Bindplane 代理端口(默认值为 UDP514)。
  6. 点击保存并关闭

UDM 映射表

日志字段 UDM 映射 逻辑
additional_list.key 此字段用于循环遍历 additional_list 数组,并根据 key 字段的值提取数据。它不会直接映射到 UDM。
additional_list.value principal.location.region_latitudeprincipal.location.region_longitudetarget.location.region_latitudetarget.location.region_longitude 此字段与 additional_list.key 结合使用,可从 additional_list 数组中提取特定值。提取和映射值的逻辑取决于相应的 key。例如:
- 如果 additional_list.keyintel:source:ip:geoIP:location,则使用 grok 提取经纬度值,并将其分别映射到 principal.location.region_latitudeprincipal.location.region_longitude
- 如果 additional_list.keyintel:destination:ip:geoIP:location,则使用 grok 提取纬度和经度值,并分别将其映射到 target.location.region_latitudetarget.location.region_longitude
additional_string.key additional_list.key 类似,此字段用于循环遍历 additional_string 数组并根据 key 值提取数据。它不会直接映射到 UDM。
additional_string.value additional.fields.value.string_valueprincipal.location.country_or_regiontarget.location.country_or_regionsrc.ipsrc.portsrc.hostnamenetwork.ip_protocol additional_string.key 搭配使用,用于从 additional_string 数组中提取值。映射值的逻辑取决于相应的 key。例如:
- 如果 additional_string.keyintel:source:ip:ip2asn:start_ipintel:source:ip:ip2asn:finish_ipintel:destination:ip:ip2asn:start_ipintel:destination:ip:ip2asn:finish_ip,则将该值映射到具有相应键的 additional.fields.value.string_value
- 如果 additional_string.keyintel:source:ip:geoIP:country,则将值映射到 principal.location.country_or_region
- 如果 additional_string.keyintel:destination:ip:geoIP:country,则将值映射到 target.location.country_or_region
- 如果 additional_string.keylog:source:ip,则将值映射到 src.ip
- 如果 additional_string.keylog:source:port,则将该值转换为整数后映射到 src.port
- 如果 additional_string.keylog:source:hostname,则将值映射到 src.hostname
- 如果 additional_string.keylog:cdh:input:protocol,则将该值转换为大写形式,然后映射到 network.ip_protocol
app_category security_result.category_details 直接映射。
confidence security_result.confidence 根据以下逻辑进行映射:
- 如果 confidenceLOW,则映射到 LOW_CONFIDENCE
- 如果 confidenceMEDIUM,则映射到 MEDIUM_CONFIDENCE
- 如果 confidenceHIGH,则映射到 HIGH_CONFIDENCE
country principal.location.name 直接映射,但仅当 raw.infobloxb1region 为空时。
device principal.ipprincipal.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.hostnameprincipal.asset.hostname 直接映射,但前提是 raw.dvchostraw.dvc 均为空。
os_version principal.platform_version 直接映射。
policy_action security_result.action_detailssecurity_result.action policy_action 直接映射到 security_result.action_details
security_result.action 是根据以下逻辑派生的:
- 如果 policy_actionRedirectLog,则映射到 ALLOW
- 如果 policy_actionBLOCK,则映射到 BLOCK
policy_name security_result.detection_fields.value 直接与键 policy_name 映射。
qname network.dns.questions.name 直接映射。
qtype network.dns.questions.type 根据以下逻辑进行映射:
- 如果 qtypeA,则映射为 1(转换为无符号整数)。
- 如果 qtypePTR,则映射到 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_detailssecurity_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.ipprincipal.asset.ip 直接映射。
raw.dvchost principal.hostnameprincipal.asset.hostname 直接映射,但仅当它不等于 raw.dvc 时。
raw.infobloxb1connectiontype additional.fields.value.string_value 直接与键 infobloxb1connectiontype 映射。
raw.infobloxb1ophname observer.hostnameobserver.asset.hostname 直接映射。
raw.infobloxb1ophipaddress observer.ip 直接映射。
raw.infobloxb1policyname security_result.detection_fields.value 直接与键 infobloxb1policyname 相关联。
raw.infobloxdnsqclass dns_question.classdns_answer.class 用于根据 dns_query_class_mapping.include 文件中定义的对照表派生 dns_question.classdns_answer.class
raw.infobloxdnsqtype dns_question.typedns_answer.type 用于根据 dns_record_type.include 文件中定义的对照表派生 dns_question.typedns_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.valuenetwork.dns.response_code rcode 通过键 rcode 直接映射到 security_result.detection_fields.value
如果 rcodeNXDOMAIN,则 network.dns.response_code 设置为 3(转换为无符号整数)。
rdata network.dns.answers.data 直接映射。
rip target.iptarget.asset.ip 直接映射。
severity security_result.severity 根据以下逻辑进行映射:
- 如果 severityINFO(不区分大小写),则映射到 INFORMATIONAL
- 如果 severityHIGH,则映射到 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 字段设置为 infobloxancountinfobloxarcountinfobloxb1connectiontypeinfobloxnscountintel:destination:ip:ip2asn:finish_ipintel:destination:ip:ip2asn:start_ipintel:source:ip:ip2asn:finish_ipintel:source:ip:ip2asn:start_ip
不适用 metadata.event_type 如果 has_principaltrue,则设置为 STATUS_UPDATE;否则,设置为 GENERIC_EVENT
不适用 network.dns.questions.type 对于 A 记录,设置为 1;对于 PTR 记录,设置为 12,并转换为无符号整数。
不适用 network.dns.answers.namenetwork.dns.answers.typenetwork.dns.answers.class 通过解析 DNS 响应字符串从 raw.msg 中提取。
不适用 intermediary.hostnameintermediary.ipintermediary.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 专业人士的解答。