收集 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),直到注入 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 收集器目录中的 ingestion-auth.json(在 Linux 上为 /opt/observiq-otel-collector/ingestion-auth.json,在 Windows 上为 C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json),或者更新 creds_file_path 在 config.yaml 中以与您保存该文件的路径匹配。
  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 日志级别:选择 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 字段映射。
app 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 字段映射。
fileId read_only_udm.network.session_id 直接从 fileId 字段映射。
filePermission read_only_udm.about.resource.attribute.permissions.name 直接从 filePermission 字段映射。
in read_only_udm.network.received_bytes 直接从 in 字段映射。
qstr read_only_udm.security_result.detection_fields.value 直接从 qstr 字段映射。
request 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 专业人士的解答。