收集 F5 VPN 日志

解析器版本:2.0

支持:

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

F5 BIG-IP Access Policy Manager (APM) 是一种 VPN 和访问权限管理解决方案,可针对用户身份验证、会话管理、政策评估、隧道建立和网络访问事件生成 syslog 消息。解析器会从 syslog 格式的日志中提取字段,并将其映射到统一数据模型 (UDM)。

准备工作

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

  • Google SecOps 实例
  • Windows Server 2016 或更高版本,或者具有 systemd 的 Linux 主机
  • Bindplane 代理与 F5 BIG-IP 设备之间的网络连接
  • 如果在代理后面运行,请确保按照 Bindplane 代理要求打开防火墙端口
  • 对 F5 BIG-IP tmsh(11.x 版或更高版本)的特权访问权限

获取 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 收集器目录(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
    

    该服务应显示为 active (running)。

其他安装资源

如需了解其他安装选项和问题排查信息,请参阅 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/f5_vpn:
        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: F5_VPN
        raw_log_field: body
    
    service:
      pipelines:
        logs/f5_vpn_to_chronicle:
          receivers:
            - udplog
          exporters:
            - chronicle/f5_vpn
    

配置参数

替换以下占位符:

  • 接收器配置:

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

在 F5 BIG-IP APM 上配置 syslog 转发

  1. 连接到 F5 BIG-IP 命令行。
  2. 打开 tmsh shell:

    tmsh
    
  3. 运行以下命令,配置远程 syslog 服务器:

    modify sys syslog remote-servers add { <Name> { host <bindplane-ip> remote-port <bindplane-port> } }
    

    替换以下内容:

    • <Name>:此 syslog 目标的唯一名称(例如 bindplane_server)。
    • <bindplane-ip>:Bindplane 代理主机的 IP 地址。
    • <bindplane-port>:在 Bindplane 代理接收器中配置的端口(默认值:514)。
  4. 保存配置:

    save sys config partitions all
    

UDM 映射表

日志字段 UDM 映射 逻辑
cmd_data principal.process.command_line 该值提取自 msg 字段
errdefs_msgno additional.fields.errdefs_msgno.string_value 该值是从 msg 字段中提取的
event_time metadata.event_timestamp 该值会被解析并转换为时间戳
hostname principal.hostname,、observer.hostname,、principal.asset.hostname,、observer.asset.hostname, 该值从消息字段中提取,并用于填充 UDM 中的主机名字段。还用于填充 hostip 字段
msg security_result.description 该值从消息字段中提取,并用于填充 security_result 对象中的说明字段
prin_ip principal.ip,,principal.asset.ip 该值会从消息字段中提取,并用于填充 UDM 中的 IP 地址字段
additional.fields.Canonical_Info.string_value 该值派生自日志消息
additional.fields.IDP.string_value 该值派生自日志消息
additional.fields.Plugin_Support.string_value 该值派生自日志消息
additional.fields.SMB,Stage.string_value 该值派生自日志消息
additional.fields.SP.string_value 该值派生自日志消息
additional.fields.Timezone.string_value 该值派生自日志消息
additional.fields.Tunnel,Type.string_value 该值派生自日志消息
additional.fields.UI_Mode.string_value 该值派生自日志消息
additional.fields.Version.string_value 该值派生自日志消息
additional.fields.from_rule_item.string_value 该值派生自日志消息
additional.fields.policy_result.string_value 该值派生自日志消息
additional.fields.ppp_id.string_value 该值派生自日志消息
additional.fields.resource.string_value 该值派生自日志消息
additional.fields.rule.string_value 该值派生自日志消息
additional.fields.server_vip_ip.string_value 该值派生自日志消息
additional.fields.server_vip_name.string_value 该值派生自日志消息
additional.fields.to_rule_item.string_value 该值派生自日志消息
additional.fields.tunnel_resource.string_value 该值派生自日志消息
metadata.description 该值派生自日志消息
metadata.event_type 对于某些事件,该值在解析器代码中硬编码;对于其他事件,该值派生自日志消息
metadata.log_type 此值设置为批次类型
metadata.product_event_type 该值派生自日志消息
metadata.product_name 该值在解析器代码中是硬编码的
metadata.vendor_name 该值在解析器代码中是硬编码的
network.application_protocol 该值派生自日志消息
network.direction 该值派生自日志消息
network.http.method 该值派生自日志消息
network.http.parsed_user_agent 该值派生自 network.http.user_agent 字段
network.http.referral_url 该值派生自日志消息
network.http.response_code 该值派生自日志消息
network.http.user_agent 该值派生自日志消息
network.ip_protocol 该值派生自日志消息
network.received_bytes 该值派生自日志消息
network.sent_bytes 该值派生自日志消息
network.session_id 该值派生自日志消息
network.tls.cipher 该值派生自日志消息
network.tls.version 该值派生自日志消息
observer.asset.hostname 此值设置为 hostname 字段
observer.asset.ip 该值会设为 hostip 字段
observer.hostname 此值设置为 hostname 字段
observer.ip 该值会设为 hostip 字段
principal.application 该值派生自日志消息
principal.asset.hostname 该值设置为主机名字段
principal.asset.ip 该值会设为 hostip 字段或 prin_ip 字段(如果存在)
principal.asset.product_object_id 该值派生自日志消息
principal.hostname 该值设置为主机名字段
principal.ip 该值会设为 hostip 字段或 prin_ip 字段(如果存在)
principal.location.country_or_region 该值派生自日志消息
principal.platform 该值派生自日志消息
principal.port 该值派生自日志消息
principal.process.command_line 该值派生自日志消息
principal.process.pid 该值派生自日志消息
principal.resource.name 该值派生自日志消息
principal.resource.type 该值在某些事件的解析器代码中是硬编码的,在其他事件中则派生自日志消息
principal.user.email_addresses 该值派生自日志消息
principal.user.userid 该值派生自日志消息
security_result.action 该值派生自日志消息
security_result.description 该值派生自日志消息
security_result.rule_name 该值派生自日志消息
security_result.severity 该值派生自日志消息
security_result.severity_details 该值派生自日志消息
security_result.summary 该值派生自日志消息
src.ip 该值派生自日志消息
src.location.country_or_region 该值派生自日志消息
src.port 该值派生自日志消息
target.asset.hostname 该值派生自日志消息
target.asset.ip 该值派生自日志消息
target.hostname 该值派生自日志消息
target.ip 该值派生自日志消息
target.port 该值派生自日志消息
target.process.command_line 该值派生自日志消息
target.process.pid 该值派生自日志消息
target.resource.id 该值派生自日志消息
target.url 该值派生自日志消息
target.user.userid 该值派生自日志消息
Hostname target.hostname 从更新日志映射
sess_id network.session_id 从更新日志映射
internal_ip target.ip 从更新日志映射
file_path principal.resource.name 从更新日志映射
useragent network.http.user_agent 从更新日志映射
User-Agent" and "useragent network.http.parsed_user_agent 从更新日志映射
username target.user.userid 从更新日志映射
sid target.user.windows_sid 从更新日志映射
bytes_out network.sent_bytes 从更新日志映射
bytes_in network.received_bytes 从更新日志映射
Platform principal.platform 从更新日志映射
Platform_Version principal.platform_version 从更新日志映射
Javascript_Support", "ActiveX_Support", "Plugin_Support", "Version", "Model", "CPU", "UI_Mode", "SP", "IDP", "to_rule_item", "from_rule_item", "policy_result", "rule", "resource", "ppp_id", "tunnel_resource", "server_vip_ip", "server_vip_name", and "Canonical_Info additional.fields 从更新日志映射
uri_path target.url 从更新日志映射
User-Agent network.http.user_agent 从更新日志映射
s_ip src.ip 从更新日志映射
t_ip target.ip 从更新日志映射
t_port target.port 从更新日志映射
s_nat_ip target.nat_ip 从更新日志映射
cipher_name network.tls.cipher 从更新日志映射
tls_version network.tls.version 从更新日志映射
resource_id target.resource.id 从更新日志映射
src_ip principal.ip 从更新日志映射
status network.http.response_code 从更新日志映射

更新日志

查看此解析器的更新日志

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