收集 Imperva SecureSphere Management 日志

支持的语言:

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

Imperva SecureSphere 是一个 Web 应用防火墙、数据库安全和文件安全平台,可针对安全事件、系统事件和政策违规行为生成 CEF 格式的 syslog 消息。解析器使用 grok 和键值对解析从 CEF 消息中提取字段,并将其映射到统一数据模型 (UDM)。

准备工作

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

  • Google SecOps 实例
  • Windows Server 2016 或更高版本,或者具有 systemd 的 Linux 主机
  • Bindplane 代理与 Imperva SecureSphere 管理服务器之间的网络连接
  • 如果在代理后面运行,请确保按照 Bindplane 代理要求打开防火墙端口
  • 对 Imperva SecureSphere 管理控制台的特权访问权限

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

    该服务应显示为正在运行。

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 /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/imperva_securesphere:
        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: IMPERVA_SECURESPHERE
        raw_log_field: body
    
    service:
      pipelines:
        logs/imperva_securesphere_to_chronicle:
          receivers:
            - udplog
          exporters:
            - chronicle/imperva_securesphere
    

配置参数

替换以下占位符:

  • 接收器配置:

    • 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/imperva_securesphere:
        compression: gzip
        creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json'
        customer_id: '<customer_id>'
        endpoint: malachiteingestion-pa.googleapis.com
        log_type: IMPERVA_SECURESPHERE
        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"
        

在 Imperva SecureSphere Management 上配置 syslog 转发

  1. 登录 Imperva SecureSphere 管理控制台。
  2. 依次前往配置 > 操作集。
  3. 点击添加以创建新的操作集。
  4. 提供以下配置详细信息:
    • 名称:输入一个描述性名称(例如 Google SecOps Syslog)。

配置安全性事件操作

  • 点击添加操作并进行配置:

    • 操作类型:选择 Syslog。
    • 主机:输入 Bindplane 代理 IP 地址。
    • 端口:输入 Bindplane 代理端口号(默认值为 514)。
    • 协议:选择 UDP 或 TCP。
    • Syslog Log Level(Syslog 日志级别):选择 DEBUG(调试)。
    • Syslog Facility:选择 LOCAL0。
    • 消息格式:选择 Gateway Log - Security Event - System Log (syslog) using CEF standard。

配置系统事件操作

  • 点击添加操作并进行配置:

    • 操作类型:选择系统日志。
    • 主机:输入 Bindplane 代理 IP 地址。
    • 端口:输入 Bindplane 代理端口号。
    • 协议:选择 UDP 或 TCP。
    • Message Format(消息格式):选择 Log System Event to System Log (syslog) using CEF standard(使用 CEF 标准将系统事件记录到系统日志 [syslog])。

将操作集应用于政策

  1. 依次前往政策 > 安全政策。
  2. 针对每项相关政策,配置后续操作以使用您的操作集。
  3. 前往政策 > 系统事件政策。
  4. 配置系统事件政策,以使用操作集进行全面监控。

UDM 映射表

日志字段 UDM 映射 逻辑
action security_result.action_details action 字段的值会分配给 security_result.action_details 字段。
application-name target.application application-name 字段的值会分配给 target.application 字段。
cat security_result.category_details cat 字段的值会分配给 security_result.category_details 字段。
class security_result.detection_fields.value class 字段的值会分配给 security_result.detection_fields 内的 value 字段。对应的 key 为“class”。
collection_time.seconds metadata.event_timestamp.seconds 原始日志中的 collection_time.seconds 值用作 metadata.event_timestamp 的秒值。
create-time metadata.event_timestamp.seconds 系统会解析 create-time 的值,并将其秒数值用作 metadata.event_timestamp 的秒数值。
cs1 security_result.rule_name cs1 字段的值会分配给 security_result.rule_name 字段。
cs10 target.resource.attribute.labels.value cs10 字段的值会分配给 target.resource.attribute.labels 内的 value 字段。
cs10Label target.resource.attribute.labels.key cs10Label 字段的值会分配给 target.resource.attribute.labels 内的 key 字段。
cs11 principal.application cs11 字段的值会分配给 principal.application 字段。
cs12 security_result.description 移除大括号和美元符号后,cs12 字段的值会分配给 security_result.description 字段。
cs14 target.resource.attribute.labels.value cs14 字段的值会分配给 target.resource.attribute.labels 内的 value 字段。
cs14Label target.resource.attribute.labels.key cs14Label 字段的值会分配给 target.resource.attribute.labels 中的 key 字段。
cs15 security_result.summary cs15 字段的值会分配给 security_result.summary 字段。
cs16 principal.process.command_line cs16 字段的值会分配给 principal.process.command_line 字段。
cs17 target.resource.resource_subtype cs17 字段的值会分配给 target.resource.resource_subtype 字段。
cs2 principal.group.group_display_name cs2 字段的值会分配给 principal.group.group_display_name 字段。
cs3 principal.hostname,principal.asset.hostname cs3 字段的值会同时分配给 principal.hostname 和 principal.asset.hostname 字段。
cs4 target.application cs4 字段的值会分配给 target.application 字段,除非该值为“ProcessWitness”。
cs5 metadata.description cs5 字段的值会分配给 metadata.description 字段。
cs6 target.resource_ancestors.name cs6 字段的值会分配给 target.resource_ancestors.name 字段。
cs7 target.resource_ancestors.resource_subtype cs7 字段的值会分配给 target.resource_ancestors.resource_subtype 字段。
cs8 target.resource.name,target.resource.resource_type cs8 字段的值会分配给 target.resource.name 字段,target.resource.resource_type 会设置为“DATABASE”。
cs9 principal.user.userid cs9 字段的值会分配给 principal.user.userid 字段。
description security_result.description description 字段的值会分配给 security_result.description 字段。
dest-ip target.ip,target.asset.ip 从 dest-ip 字段提取的 IP 地址会同时分配给 target.ip 和 target.asset.ip 字段。
dest-port target.port dest-port 字段的值转换为整数后,会分配给 target.port 字段。
deviceExternalId intermediary.hostname deviceExternalId 字段的值会分配给 intermediary.hostname 字段。
dpt target.port dpt 字段的值转换为整数后,会分配给 target.port 字段。
dst target.ip,target.asset.ip dst 字段的值会同时分配给 target.ip 和 target.asset.ip 字段。
duser target.user.userid duser 字段的值会分配给 target.user.userid 字段。
eventId metadata.product_log_id eventId 字段的值会分配给 metadata.product_log_id 字段。
gateway-name security_result.detection_fields.value gateway-name 字段的值会分配给 security_result.detection_fields 中的 value 字段。对应的 key 为“gateway-name”。
http.request.method network.http.method http.request.method 字段的值会分配给 network.http.method 字段。
http.request.user-agent network.http.user_agent http.request.user_agent 字段的值会分配给 network.http.user_agent 字段。
http.response.code network.http.response_code http.response.code 字段的值转换为整数后,会分配给 network.http.response_code 字段。
http.session-id network.session_id http.session-id 字段的值会分配给 network.session_id 字段。
http.user-name principal.user.userid http.user-name 字段的值(已移除两边的引号)会分配给 principal.user.userid 字段。
log_type metadata.log_type 原始日志中的 log_type 字段的值会分配给 metadata.log_type 字段。
mx-ip intermediary.ip mx-ip 字段的值会分配给 intermediary.ip 字段。
MxIP intermediary.ip MxIP 字段的值会分配给 intermediary.ip 字段。
OSUser principal.user.userid OSUser 字段的值会分配给 principal.user.userid 字段。
policy-name security_result.detection_fields.value policy-name 字段的值会分配给 security_result.detection_fields 中的 value 字段。对应的 key 为“policy-name”。
pquery target.resource.name,target.process.command_line 如果 pquery 不为空且包含“from”一词,则提取表名称并将其分配给 target.resource.name,将 target.resource.resource_type 设置为“TABLE”,并将整个 pquery 值分配给 target.process.command_line。否则,整个 pquery 值都会分配给 target.resource.name。
pro security_result.description pro 字段的值会分配给 security_result.description 字段。
product metadata.product_name product 字段的值会分配给 metadata.product_name 字段。
product_type metadata.product_event_type product_type 字段的值会分配给 metadata.product_event_type 字段。
protocol network.ip_protocol 如果 protocol 字段的值为“TCP”或“UDP”,则将其分配给 network.ip_protocol 字段。
proto network.ip_protocol proto 字段的值会分配给 network.ip_protocol 字段。
reason security_result.rule_name reason 字段的值会分配给 security_result.rule_name 字段。
rt metadata.event_timestamp.seconds 系统会解析 rt 的值,并将其秒值用作 metadata.event_timestamp 的秒值。
server-group-name target.resource.attribute.labels.value server-group-name 字段的值会分配给 target.resource.attribute.labels 中的 value 字段。对应的 key 为“server-group-name”。
server-group-simulation-mode target.resource.attribute.labels.value server-group-simulation-mode 字段的值会分配给 target.resource.attribute.labels 内的 value 字段。对应的 key 为“server-group-simulation-mode”。
service-name target.resource.attribute.labels.value service-name 字段的值会分配给 target.resource.attribute.labels 中的 value 字段。对应的 key 为“service-name”。
ServiceName target.application 如果 ApplicationName 不为空,而 ServiceName 为空,则 ApplicationName 的值会分配给 ServiceName。然后,将 ServiceName 的值分配给 target.application。
severity security_result.severity,security_result.severity_details severity 字段的值会转换为大写。如果为“LOW”“MEDIUM”“HIGH”“CRITICAL”之一,则会分配给 security_result.severity。如果为“INFORMATIVE”或“INFO”,则 security_result.severity 会设置为“INFORMATIONAL”。原始值也会分配给 security_result.severity_details。
severity_data security_result.severity severity_data 字段的值会转换为大写。如果它是“HIGH”“LOW”“MEDIUM”“CRITICAL”“ERROR”“INFORMATIONAL”之一,则会分配给 security_result.severity。
source-ip principal.ip,principal.asset.ip source-ip 字段的值会同时分配给 principal.ip 和 principal.asset.ip 字段。
source-port principal.port 转换为整数的 source-port 字段的值会分配给 principal.port 字段。
spt principal.port spt 字段的值转换为整数后,会分配给 principal.port 字段。
src principal.ip,principal.asset.ip src 字段的值会同时分配给 principal.ip 和 principal.asset.ip 字段。
srcapp principal.application srcapp 字段的值会分配给 principal.application 字段。
srchost principal.hostname,principal.asset.hostname srchost 字段的值会同时分配给 principal.hostname 和 principal.asset.hostname 字段。
vendor metadata.vendor_name vendor 字段的值会分配给 metadata.vendor_name 字段。
version metadata.product_version version 字段的值会分配给 metadata.product_version 字段。
violation-id security_result.detection_fields.value violation-id 字段的值会分配给 security_result.detection_fields 内的 value 字段。对应的 key 为“violation-id”。
violation-type security_result.detection_fields.value violation-type 字段的值会分配给 security_result.detection_fields 中的 value 字段。对应的 key 为“violation-type”。
timestamp event.idm.read_only_udm.metadata.event_timestamp 从更新日志映射
externalId event.idm.read_only_udm.additional.fields 从更新日志映射
deviceCustomDate1 event.idm.read_only_udm.additional.fields 从更新日志映射
flexString1 event.idm.read_only_udm.additional.fields 从更新日志映射
flexString2 event.idm.read_only_udm.additional.fields 从更新日志映射
flexString2Label event.idm.read_only_udm.additional.fields 从更新日志映射
requestContext event.idm.read_only_udm.additional.fields 从更新日志映射
flexNumber1 event.idm.read_only_udm.additional.fields 从更新日志映射
cn2 event.idm.read_only_udm.additional.fields 从更新日志映射
cn1 event.idm.read_only_udm.metadata.product_log_id 从更新日志映射
ad.host event.idm.read_only_udm.observer.hostname 从更新日志映射
requestMethod event.idm.read_only_udm.network.http.method 从更新日志映射
request event.idm.read_only_udm.target.url 从更新日志映射
msg event.idm.read_only_udm.security_result.summary 从更新日志映射
flexNumber2 event.idm.read_only_udm.network.received_bytes 从更新日志映射
flexString2 event.idm.read_only_udm.network.http.response_code 从更新日志映射
cs6 event.idm.read_only_udm.network.http.user_agent 从更新日志映射
name event.idm.read_only_udm.metadata.description 从更新日志映射
cs2 event.idm.read_only_udm.additional.fields 从更新日志映射
cs3 event.idm.read_only_udm.additional.fields 从更新日志映射
cs4 event.idm.read_only_udm.additional.fields 从更新日志映射
suser event.idm.read_only_udm.principal.user.userid 从更新日志映射
login_user event.idm.read_only_udm.principal.user.user_display_name 从更新日志映射
princ_ip event.idm.read_only_udm.principal.ip和event.idm.read_only_udm.principal.asset.ip之间 从更新日志映射
cs1 event.idm.read_only_udm.security_result.rule_name 从更新日志映射
cs5 event.idm.read_only_udm.security_result.description 从更新日志映射
device_vendor event.idm.read_only_udm.metadata.vendor_name 从更新日志映射
device_product event.idm.read_only_udm.metadata.product_name 从更新日志映射
cs9 event.idm.read_only_udm.additional.fields 从更新日志映射
cs9Label event.idm.read_only_udm.additional.fields 从更新日志映射
cs17 event.idm.read_only_udm.target.resource.attribute.labels 从更新日志映射
cs2Label event.idm.read_only_udm.additional.fields 从更新日志映射
additional_json_data event.idm.read_only_udm.additional.fields 从更新日志映射
cs5 event.idm.read_only_udm.target.application 从更新日志映射
cs4 event.idm.read_only_udm.target.resource.attribute.labels 从更新日志映射
cs6 event.idm.read_only_udm.principal.application 从更新日志映射
cs7 event.idm.read_only_udm.security_result.description 从更新日志映射
cs11 event.idm.read_only_udm.target.resource.name 从更新日志映射
cs10 event.idm.read_only_udm.metadata.product_log_id 从更新日志映射
cs15 event.idm.read_only_udm.target.resource.attribute.labels 从更新日志映射
cs9 event.idm.read_only_udm.security_result.threat_id 从更新日志映射
cs12 event.idm.read_only_udm.principal.user.userid 从更新日志映射
inter_host event.idm.read_only_udm.intermediary.hostname 从更新日志映射
cs13 event.idm.read_only_udm.principal.hostname 从更新日志映射
cs13 metadata.product_log_id 从更新日志映射
cs1Label security_result.detection_fields 从更新日志映射
cs2Label security_result.detection_fields 从更新日志映射
cs3Label security_result.detection_fields 从更新日志映射
cs5Label security_result.detection_fields 从更新日志映射
cs10Label additional.fields 从更新日志映射
cs12Label additional.fields 从更新日志映射
cs13Label additional.fields 从更新日志映射
cs14Label additional.fields 从更新日志映射
cs16Label additional.fields 从更新日志映射
cs17Label additional.fields 从更新日志映射

更新日志

查看此解析器的更新日志

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