收集 Imperva CEF 日志

支持的平台:

本文档介绍了如何使用 Bindplane 将 Imperva CEF 日志注入到 Google Security Operations。解析器从 syslog 消息中提取 CEF 格式的日志,并将其转换为 UDM 格式。它可处理各种日志格式,从载荷中提取键值对,执行数据转换和丰富操作,并将提取的字段映射到相应的 UDM 字段,包括网络信息、用户详细信息、地理位置信息和安全结果。

准备工作

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

  • Google SecOps 实例
  • 搭载 systemd 的 Windows 2016 或更高版本或 Linux 主机
  • 如果通过代理运行,请确保防火墙端口已根据 Bindplane 代理要求打开
  • 对 Imperva 管理控制台或设备的特权访问权限

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

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 收集代理
  3. 下载注入身份验证文件。将文件安全地保存在将要安装 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 代理以注入 Syslog 并将其发送到 Google SecOps

  1. 访问配置文件:

    1. 找到 config.yaml 文件。通常,它位于 Linux 上的 /etc/bindplane-agent/ 目录中或 Windows 上的安装目录中。
    2. 使用文本编辑器(例如 nanovi 或记事本)打开该文件。
  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:
        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_CEF'
        raw_log_field: body
        ingestion_labels:
    
    service:
      pipelines:
        logs/source0__chronicle_w_labels-0:
          receivers:
            - udplog
          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
    

配置 Imperva WAF 网关 (SecureSphere) 以通过 syslog 发送 CEF

  1. 在 MX 控制台中,创建操作集:

    • 依次前往政策 > 操作集
    • 点击新建,然后为其命名(例如 Google SecOps CEF)。
  2. 添加 CEF syslog 操作接口:

    • 可用的操作界面中,打开系统日志,然后根据需要添加以下一项或多项:
      • 使用 CEF 标准将安全事件记录到系统日志 (syslog)
      • 使用 CEF 标准将网络安全事件记录到系统日志 (syslog)
      • 使用 CEF 标准将系统事件记录到系统日志 (syslog)
      • 使用 CEF 标准将自定义安全事件记录到系统日志 (syslog)
  3. 配置操作界面参数:

    • Syslog 主机:输入您的 Bindplane 代理 IP 地址。如需使用非默认端口,请附加 :PORT(如果您未指定端口,则默认值为 514)。示例:10.0.0.10:514
    • 设备 / 日志级别:根据政策要求进行设置。
    • 消息:除非您有自定义映射,否则请保留 CEF 的供应商默认值。
  4. 将操作集附加到政策:

    • 对于安全 / 网络安全事件:打开相关政策,并将后续操作设置为您的操作集。
    • 对于系统事件:创建或验证系统事件政策,并将后续操作设置为您的操作集,以便通过 CEF 发送这些事件。
  5. 可选:配置特定于网关的目标:

    • 如果不同的网关组必须发送到不同的 syslog 服务器,请配置每个网关组 > 外部记录器,并在政策中启用“使用网关配置(如果存在)”

UDM 映射表

日志字段 UDM 映射 逻辑
act security_result.action 派生。如果 act 为“allowed”“alert”,以“REQ_PASSED”开头,或以“REQ_CACHED”开头,则 action 为“ALLOW”。如果 act 为“deny”“blocked”,以“REQ_BLOCKED”开头,或以“REQ_CHALLENGE”开头,则 action 为“BLOCK”。如果 act 与正则表达式 (?i)REQ_BAD 匹配,则 action 为“FAIL”。否则,action 为“UNKNOWN_ACTION”。然后将 security_result.action 设置为 action 的值。
act security_result.action_details 派生。系统会根据 act 的值生成详细说明。示例:“REQ_CACHED_FRESH:响应是从数据中心的缓存返回的”“REQ_BLOCKED:请求被阻止”。
app network.application_protocol 在转换为大写后直接映射。
cs1 security_result.detection_fields.value 如果 cs1 不为空或为“不适用”,则有条件地进行映射。security_result.detection_fields.key 设置为 cs1Label 的值。
cs1Label security_result.detection_fields.key 如果 cs1 不为空或为“不适用”,则有条件地进行映射。security_result.detection_fields.value 设置为 cs1 的值。
cs2 security_result.detection_fields.value 如果不为空,则有条件地进行映射。security_result.detection_fields.key 设置为 cs2Label 的值。
cs2Label security_result.detection_fields.key 如果 cs2 不为空,则有条件地进行映射。security_result.detection_fields.value 设置为 cs2 的值。
cs3 security_result.detection_fields.value 如果不为空或“-”,则有条件地进行映射。security_result.detection_fields.key 设置为 cs3Label 的值。
cs3Label security_result.detection_fields.key 如果 cs3 不为空或不为“-”,则有条件地进行映射。security_result.detection_fields.value 设置为 cs3 的值。
cs4 security_result.detection_fields.value 如果不为空,则有条件地进行映射。security_result.detection_fields.key 设置为 cs4Label 的值。
cs4Label security_result.detection_fields.key 如果 cs4 不为空,则有条件地进行映射。security_result.detection_fields.value 设置为 cs4 的值。
cs5 security_result.detection_fields.value 如果不为空,则有条件地进行映射。security_result.detection_fields.key 设置为 cs5Label 的值。
cs5Label security_result.detection_fields.key 如果 cs5 不为空,则有条件地进行映射。security_result.detection_fields.value 设置为 cs5 的值。
cs6 security_result.detection_fields.value 如果不为空,则有条件地进行映射。security_result.detection_fields.key 设置为 cs6Label 的值。
cs6Label security_result.detection_fields.key 如果 cs6 不为空,则有条件地进行映射。security_result.detection_fields.value 设置为 cs6 的值。
cs7 principal.location.region_latitude 如果 cs7Label 为“纬度”,则有条件地进行映射。
cs8 principal.location.region_longitude 如果 cs8Label 为“longitude”,则有条件地进行映射。
cn1 security_result.detection_fields.value 如果不为空且 cn1Label 不为空,则有条件地进行映射。security_result.detection_fields.key 设置为 cn1Label 的值。
cn1Label security_result.detection_fields.key 如果 cn1cn1Label 不为空,则有条件地进行映射。security_result.detection_fields.value 设置为 cn1 的值。
fileType security_result.detection_fields.value 如果不为空,则有条件地进行映射。security_result.detection_fields.key 设置为“fileType”。
filePermission security_result.detection_fields.value 如果不为空,则有条件地进行映射。security_result.detection_fields.key 设置为“filePermission”。
request target.url 直接映射。
requestClientApplication network.http.user_agent 如果不为空,则有条件地进行映射。覆盖从 CEF 载荷中的 requestContextrequestClientApplication 键值对提取的 user_agent 字段映射的值。
requestMethod network.http.method 直接映射。
siteid security_result.detection_fields.value 如果不为空,则有条件地进行映射。security_result.detection_fields.key 设置为“siteid”。
sourceServiceName target.hostname 直接映射。如果存在,则覆盖 dhost 的值。
src principal.ip 直接映射。
start metadata.event_timestamp.seconds 使用 Grok 模式提取并转换为时间戳。如果 deviceReceiptTime 不存在,则用作其后备。如果 deviceReceiptTimestart 均为空,则使用日志时间戳。
suid principal.user.userid 如果不为空,则有条件地进行映射。
不适用 metadata.event_type 硬编码为“NETWORK_HTTP”。
不适用 metadata.log_type 直接从顶层 log_type 字段映射。
不适用 metadata.product_event_type 如果 csv.event_id 不为空,则从 csv.event_id 映射。
不适用 metadata.product_name 硬编码为“Web 应用防火墙”。
不适用 metadata.vendor_name 硬编码为“Imperva”。

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