收集 Imperva FlexProtect 日志

支持范围:

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

该解析器会从 CEF(通用事件格式)中采用键值对扩展的 Imperva FlexProtect syslog 格式日志中提取字段。它使用 grok 和/或 kv 来解析 CEF 消息,然后将这些值映射到统一数据模型 (UDM)。它还会为事件来源和类型设置默认元数据值。Imperva FlexProtect 可在混合云环境中灵活部署 Imperva 安全解决方案(SecureSphere、Cloud WAF、Bot Protection)。

准备工作

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

  • Google SecOps 实例
  • 装有 systemd 的 Windows 2016 或更高版本或 Linux 主机
  • 如果在代理后面运行,请确保按照 Bindplane 代理要求打开防火墙端口
  • 对 Imperva FlexProtect 管理控制台或单个产品控制台的特权访问权限

获取 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
    

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 代理安装指南。

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

  1. 访问配置文件:

    • 找到 config.yaml 文件。通常,它位于 Linux 上的 /opt/observiq-otel-collector/ 目录中,或 Windows 上的安装目录中。
    • 使用文本编辑器(例如 nano、vi 或记事本)打开该文件。
  2. 按如下方式修改 config.yaml 文件:

    receivers:
      udplog:
        # Replace the port and IP address as required
        listen_address: "0.0.0.0:514"
    
    exporters:
      chronicle/chronicle_w_labels:
        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
        # Adjust the path to the credentials file you downloaded in Step 1
        creds_file_path: '/path/to/ingestion-authentication-file.json'
        # Replace with your actual customer ID from Step 2
        customer_id: <CUSTOMER_ID>
        endpoint: chronicle.googleapis.com
        # Add optional ingestion labels for better organization
        log_type: 'IMPERVA_FLEXPROTECT'
        raw_log_field: body
        ingestion_labels:
    
    service:
      pipelines:
        logs/source0__chronicle_w_labels-0:
          receivers:
            - udplog
          exporters:
            - chronicle/chronicle_w_labels
    
    • 根据基础架构的要求替换端口和 IP 地址。
    • 将 <LOCATION> 替换为 Google SecOps 实例所在的区域(例如 us、europe 或 asia-southeast1)。导出工具会在此值前面加上 chronicle.googleapis.com。
    • 将 <PROJECT_NUMBER> 替换为 IAM 和管理 > 设置中的项目编号。
    • 将 <CUSTOMER_ID> 替换为实际客户 ID。
    • 将 /path/to/ingestion-authentication-file.json 更新为第 1 步中保存服务账号密钥文件(选项 1)的文件路径。

旧版提取 API 导出工具

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

    exporters:
      chronicle/chronicle_w_labels:
        compression: gzip
        # Adjust the path to the credentials file you downloaded in Step 1
        creds_file_path: '/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
        log_type: 'IMPERVA_FLEXPROTECT'
        raw_log_field: body
        ingestion_labels:
    

重启 Bindplane 代理以应用更改

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

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

    net stop observiq-otel-collector && net start observiq-otel-collector
    

在 Imperva FlexProtect 上配置 Syslog 转发

对于 SecureSphere 组件(本地/云端)

  1. 登录 Imperva SecureSphere 管理控制台。
  2. 依次前往配置 > 操作集。
  3. 点击添加以创建新的操作集。
  4. 点击添加操作,然后提供以下配置详细信息:

    • 名称:输入一个描述性名称(例如 Google SecOps Syslog)。
    • 操作类型:选择 Syslog。
    • 主机:输入 Bindplane 代理 IP 地址。
    • 端口:输入 Bindplane 代理端口号(默认值为 514)。
    • 协议:选择 UDP 或 TCP。
    • Syslog Log Level(Syslog 日志级别):选择 DEBUG(调试)。
    • Syslog 设施:选择 LOCAL0。
    • 格式:选择 CEF(通用事件格式)。
  5. 保存操作配置并将其应用于相关安全政策。

对于 Cloud WAF/Incapsula 组件

  1. 登录 Imperva Cloud 控制台。
  2. 依次前往日志 > 日志设置。
  3. 配置 syslog 目标:
    • 主机:输入 Bindplane 代理 IP 地址。
    • 端口:输入 Bindplane 代理端口号(默认值为 514)。
    • 协议:选择 UDP 或 TCP。
    • 格式:选择 CEF。

UDM 映射表

日志字段 UDM 映射 逻辑
act read_only_udm.security_result.action_details 直接从 act 字段映射。
应用 read_only_udm.network.application_protocol 直接从 app 字段映射。
ccode read_only_udm.principal.location.country_or_region 直接从 ccode 字段映射。
cicode read_only_udm.principal.location.city 直接从 cicode 字段映射。
cn1 read_only_udm.network.http.response_code 转换为整数后,直接从 cn1 字段映射。
cs1 read_only_udm.additional.fields.value.string_value 直接从 cs1 字段映射。
cs2 read_only_udm.additional.fields.value.string_value 直接从 cs2 字段映射。
cs3 read_only_udm.additional.fields.value.string_value 直接从 cs3 字段映射。
cs4 read_only_udm.additional.fields.value.string_value 直接从 cs4 字段映射。
cs5 read_only_udm.additional.fields.value.string_value 直接从 cs5 字段映射。
cs6 read_only_udm.additional.fields.value.string_value 直接从 cs6 字段映射。
cs7 read_only_udm.additional.fields.value.string_value 直接从 cs7 字段映射。
cs8 read_only_udm.additional.fields.value.string_value 直接从 cs8 字段映射。
cs9 read_only_udm.additional.fields.value.string_value 直接从 cs9 字段映射。
cpt read_only_udm.principal.port 转换为整数后,直接从 cpt 字段映射。
客户 read_only_udm.principal.user.user_display_name 直接从 Customer 字段映射。
deviceExternalId read_only_udm.about.asset.asset_id 该值是通过将“Incapsula.SIEMintegration:”与 deviceExternalId 字段串联而得出的。
deviceFacility read_only_udm.principal.location.city 直接从 deviceFacility 字段映射。
dproc read_only_udm.target.process.command_line 直接从 dproc 字段映射。
end read_only_udm.security_result.detection_fields.value 直接从 end 字段映射。
文件 ID read_only_udm.network.session_id 直接从 fileId 字段映射。
filePermission read_only_udm.about.resource.attribute.permissions.name 直接从 filePermission 字段映射。
英寸 read_only_udm.network.received_bytes 直接从 in 字段映射。
qstr read_only_udm.security_result.detection_fields.value 直接从 qstr 字段映射。
请求 read_only_udm.target.url 直接从 request 字段映射。
requestClientApplication read_only_udm.network.http.user_agent 直接从 requestClientApplication 字段映射。
requestMethod read_only_udm.network.http.method 直接从 requestMethod 字段映射。
siteid read_only_udm.security_result.detection_fields.value 直接从 siteid 字段映射。
sip read_only_udm.target.ip 直接从 sip 字段映射。
sourceServiceName read_only_udm.principal.application 直接从 sourceServiceName 字段映射。
spt read_only_udm.target.port 转换为整数后,直接从 spt 字段映射。
src read_only_udm.principal.ip 直接从 src 字段映射。
start read_only_udm.security_result.detection_fields.value 直接从 start 字段映射。
suid read_only_udm.principal.user.userid 直接从 suid 字段映射。
ver read_only_udm.network.tls.version 直接从 ver 字段映射。
read_only_udm.about.asset.asset_id 该值是通过将“Incapsula.SIEMintegration:”与 deviceExternalId 字段串联而得出的。
read_only_udm.additional.fields.key 值由解析器逻辑根据字段的标签确定,例如:
- cs1Label 映射到“Cap Support”
- cs2Label 映射到“Javascript Support”
- cs3Label 映射到“CO Support”
- cs4Label 映射到“VID”
- cs5Label 映射到“clappsig”
- cs6Label 映射到“clapp”
- cs7Label 映射到“latitude”
- cs8Label 映射到“longitude”
- cs9Label 映射到“Rule name”
read_only_udm.metadata.event_timestamp.nanos 直接从 collection_time.nanos 字段映射。
read_only_udm.metadata.event_timestamp.seconds 直接从 collection_time.seconds 字段映射。
read_only_udm.metadata.event_type 该值根据 src 和 sip 字段是否存在来确定:
- 如果两者都存在,则该值设置为“NETWORK_HTTP”。
- 如果仅存在 src,则该值会设置为“USER_UNCATEGORIZED”。
- 否则,该值会设置为“GENERIC_EVENT”。
read_only_udm.metadata.product_event_type 该值是通过串联以下内容得出的:“[”、索引 4 处的 CEF 标头字段中的数值、“] - ”以及索引 4 处的 CEF 标头字段中的文本说明。
read_only_udm.metadata.product_name 值静态设置为“SIEMintegration”。
read_only_udm.metadata.product_version 值静态设置为“1”。
read_only_udm.metadata.vendor_name 值静态设置为“Incapsula”。
read_only_udm.security_result.detection_fields.key 根据正在处理的相应字段,值会静态设置为“siteid”“event_start_time”“event_end_time”或“qstr”。
read_only_udm.security_result.severity 值静态设置为“LOW”。
read_only_udm.target.port 转换为整数后,直接从 spt 字段映射。
qstr security_results.detection_fields 从更新日志映射
siteid security_results.detection_fields 从更新日志映射
device_facility principal.location.city 从更新日志映射
start security_result.detection_fields.event_start_time 从更新日志映射
cs8Label additional_cs8.key 从更新日志映射
cs8 additional_cs8.value.string_value 从更新日志映射
cs9Label additional_cs9.key 从更新日志映射
cs9 additional_cs9.value.string_value 从更新日志映射
end security_result.detection_fields.event_end_time 从更新日志映射

更新日志

查看此解析器的更新日志

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