收集 Rapid7 Nexpose 日志

支持范围:

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

Rapid7 Nexpose(现为 InsightVM)是一个本地漏洞管理平台,用于扫描、评估和确定网络中安全漏洞的优先级。它提供了一个基于 Web 的安全控制台,可通过 https://<host>:3780 访问,并支持原生 syslog 导出,用于转发扫描结果、漏洞发现和资产变更事件。

准备工作

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

  • Google SecOps 实例
  • Windows Server 2016 或更高版本,或具有 systemd 的 Linux 主机
  • Bindplane 代理与 Rapid7 Nexpose 安全控制台之间的网络连接
  • 如果通过代理运行,请确保防火墙端口根据 Bindplane 代理要求处于打开状态
  • 对 Rapid7 Nexpose 安全控制台的特权访问权限,具有全局管理员 或安全管理员 角色

获取 Bindplane 代理的 Google SecOps 凭据

如需对 Bindplane 代理进行 Google SecOps 身份验证,请选择以下方法之一:

  • 新部署:使用 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
    
  3. 等待安装完成。

  4. 运行以下命令,验证安装是否成功:

    sc query observiq-otel-collector
    

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

Linux 安装

  1. 打开具有根权限或 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/rapid7_nexpose:
        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: RAPID7_NEXPOSE
        raw_log_field: body
    
    service:
      pipelines:
        logs/rapid7_nexpose_to_chronicle:
          receivers:
            - udplog
          exporters:
            - chronicle/rapid7_nexpose
    

配置参数

替换以下占位符:

  • 接收器配置:

    • listen_address:要监听的 IP 地址和端口:
      • 0.0.0.0 以监听所有接口(推荐)
      • 端口 514 是标准 syslog 端口(在 Linux 上需要根权限;对于非根用户,请使用 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/rapid7_nexpose:
        compression: gzip
        creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json'
        customer_id: '<customer_id>'
        endpoint: malachiteingestion-pa.googleapis.com
        log_type: RAPID7_NEXPOSE
        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 Collector 。
      3. 右键点击并选择重启 。
      4. 验证服务是否正在运行:

        sc query observiq-otel-collector
        
      5. 检查日志中的错误:

        type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
        

配置 Rapid7 Nexpose syslog 转发

  1. 登录 Rapid7 Nexpose 安全控制台 网页界面,网址为 https://<nexpose-host>:3780。
  2. 依次前往管理 > 全局设置。
  3. 向下滚动至 Syslog 部分。
  4. 启用 syslog 转发,并提供以下配置详细信息:
    • Syslog 服务器:输入 Bindplane 代理主机的 IP 地址。
    • 端口:输入 514(或在 Bindplane 代理接收器中配置的端口)。
    • 协议:选择 UDP (或在接收器中配置的 TCP )。
  5. 点击保存 。
  6. 如需验证 syslog 消息是否正在发送,请运行扫描并检查 Bindplane 代理日志中是否有传入消息。

UDM 映射表

日志字段 UDM 映射 逻辑
additional.fields 从 categories 数组合并为“App Stack”键值对;从 pci 字段(adjustedCVSSScore、adjustedSeverityScore、fail、status)合并为键值对;从 cvss v2/v3 字段合并为 sec_result 中的检测字段
asset_id principal.asset.asset_id 如果 asset_id != "",则设置为“assetID: %{asset_id}”
categories additional.fields 合并为“App Stack”键值列表
cve_id, cve_year extensions.vulns.vulnerabilities.cve_id 如果 cve_year 和 cve_id 都存在,则将它们串联起来
cvss.links, cvss.v2.accessComplexity, cvss.v2.accessVector, cvss.v2.authentication, cvss.v2.availabilityImpact, cvss.v2.confidentialityImpact, cvss.v2.integrityImpact, cvss.v2.vector, cvss.v3.attackComplexity, cvss.v3.attackVector, cvss.v3.availabilityImpact, cvss.v3.confidentialityImpact, cvss.v3.integrityImpact, cvss.v3.privilegeRequired, cvss.v3.scope, cvss.v3.userInteraction, cvss.v3.vector, links security_result.detection_fields 从 links 和 cvss.links 合并为键值对;从 cvss v2/v3 字段合并为带前缀的键值对(例如“v2 accessComplexity”)
desc extensions.vulns.vulnerabilities.description 如果存在,则直接从 desc 复制值
description metadata.description 如果 description 为空,则使用 description.text 中的值,否则直接复制值
description.text metadata.description 如果 description 为空,则直接复制值
event_type metadata.event_type 如果 vulnerability_description 或 vulnerability_data 存在,则设置为“SCAN_VULN_HOST”;否则,如果 has_principal 为 true,则设置为“SCAN_HOST”;否则设置为“GENERIC_EVENT”
has_principal 如果设置了 ip_address、host_name 或 asset_id,则设置为 true
has_target 如果设置了 target_ip,则设置为 true
host_name principal.hostname, principal.asset.hostname 如果 host_name != "",则直接复制值
ip_address principal.ip, principal.asset.ip 如果 ip_address != "",则直接复制值
last_assessed_for_vulnerabilities 使用各种日期格式或 UNIX/UNIX_MS 转换为时间戳
pci.adjustedCVSSScore additional.fields 如果不为空,则合并为“adjustedCVSSScore”键值对
pci.adjustedSeverityScore additional.fields 如果不为空,则合并为“adjustedSeverityScore”键值对
pci.fail additional.fields 如果不为空,则合并为“fail”键值对
pci.status additional.fields 如果不为空,则合并为“status”键值对
sec_result security_result 如果 sec_result != "",则直接复制值
target_ip target.ip, target.asset.ip 如果 target_ip != "",则直接复制值
timestamp 使用 syslog 时间戳格式转换
title extensions.vulns.vulnerabilities.description 如果存在,则使用 vulnerability.Vulnerability_Title 中的值
vulnerability.Vulnerability_Severity extensions.vulns.vulnerabilities.severity 如果为“Severe”,则设置为“HIGH”;如果为“Critical”,则设置为“CRITICAL”;如果为“Moderate”,则设置为“MEDIUM”
vulnerability.Vulnerability_Title extensions.vulns.vulnerabilities.description 直接复制值
vulnerability.vulnerability_id extensions.vulns.vulnerabilities.vendor_vulnerability_id 如果存在,则直接复制值
vulnerability_data extensions.vulns.vulnerabilities 从每个漏洞对象合并,包含 severity、cve_id、description、vendor_vulnerability_id
vulnerability_description extensions.vulns.vulnerabilities.description, metadata.description 如果存在,则合并为漏洞对象;设置为 metadata.description
metadata.product_name 设置为“Nexpose”
metadata.vendor_name 设置为“Rapid7”
categories", "pci.adjustedCVSSScore", "pci.adjustedSeverityScore", "pci.fail", and "pci.status additional.fields 从变更日志映射
cvss.v2.accessComplexity", "cvss.v2.accessVector", "cvss.v2.authentication", "cvss.v2.availabilityImpact", "cvss.v2.confidentialityImpact", "cvss.v2.integrityImpact", "cvss.v2.vector", "cvss.v3.attackComplexity", "cvss.v3.attackVector", "cvss.v3.availabilityImpact", "cvss.v3.confidentialityImpact", "cvss.v3.privilegeRequired", "cvss.v3.integrityImpact", "cvss.v3.scope", "cvss.v3.userInteraction", and "cvss.v3.vector security_result.detection_fields 从变更日志映射

更新日志

查看此解析器的更新日志

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