收集 F5 BIG-IP APM 日志

解析器版本:6.0

支持的语言:

本文档介绍了如何使用 Bindplane 将 F5 BIG-IP APM 日志注入到 Google Security Operations。

F5 BIG-IP Access Policy Manager (APM) 可提供对应用、API 和数据的安全、统一访问。它通过单点登录、多重身份验证和 SSL VPN 功能为企业网络提供基于身份和情境的访问权限控制。解析器从 F5 BIG-IP APM syslog 格式的日志中提取字段。它使用 grok 和/或 kv 来解析日志消息,然后将这些值映射到统一数据模型 (UDM)。它还会为事件来源和类型设置默认元数据值。

准备工作

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

  • Google SecOps 实例
  • Windows Server 2016 或更高版本,或者具有 systemd 的 Linux 主机
  • 如果在代理后面运行,请确保按照 Bindplane 代理要求打开防火墙端口
  • 对 F5 BIG-IP 管理界面的特权访问权限

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

该服务应显示为 RUNNING。

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/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
        creds_file_path: '/path/to/ingestion-authentication-file.json'
        customer_id: 'YOUR_CUSTOMER_ID'
        endpoint: chronicle.googleapis.com
        log_type: 'F5_BIGIP_APM'
        raw_log_field: body
        ingestion_labels:
    
    service:
      pipelines:
        logs/source0__chronicle_w_labels-0:
          receivers:
            - udplog
          exporters:
            - chronicle/chronicle_w_labels
    

配置参数

  • 替换以下占位符:

    • 接收器配置:

      • udplog:使用 udplog 表示 UDP syslog,使用 tcplog 表示 TCP syslog
      • 0.0.0.0:要监听的 IP 地址(0.0.0.0 表示监听所有接口)
      • 514:要监听的端口号(标准 syslog 端口)
    • 导出器配置:

      • creds_file_path:服务账号 JSON 密钥文件的完整路径(选项 1):
        • Linux:/opt/observiq-otel-collector/ingestion-auth.json
        • Windows:C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
      • YOUR_CUSTOMER_ID:“获取客户 ID”部分中的客户 ID
      • location:将 <LOCATION> 替换为 Google SecOps 实例的区域(例如 us、europe 或 asia-southeast1)。导出器会使用此值作为 chronicle.googleapis.com 的前缀。如需查看完整列表,请参阅区域级端点。
      • project:将 <PROJECT_NUMBER> 替换为 IAM 和管理 > 设置中的项目编号。
      • endpoint:保持设置为 chronicle.googleapis.com。
      • log_type:日志类型,与 Chronicle 中的显示完全一致 (F5_BIGIP_APM)

旧版提取 API

  • 如果您使用选项 2 中的数据注入身份验证文件,请将 exporters 代码块替换为以下内容。将 creds_file_path 设置为数据注入身份验证文件的路径,如果您的实例位于美国境外,请将 malachiteingestion-pa.googleapis.com 替换为您的区域端点(例如 europe-malachiteingestion-pa.googleapis.com)。

    exporters:
      chronicle/chronicle_w_labels:
        compression: gzip
        creds_file_path: '/path/to/ingestion-authentication-file.json'
        customer_id: 'YOUR_CUSTOMER_ID'
        endpoint: malachiteingestion-pa.googleapis.com
        log_type: 'F5_BIGIP_APM'
        raw_log_field: body
        ingestion_labels:
    

保存配置文件

  • 修改后,保存文件:
    • 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 网页界面(TMUI/配置实用程序)。
  2. 依次前往系统 > 日志 > 配置 > 远程日志记录。
  3. 在远程日志记录部分中,提供以下配置详细信息:
    • 远程 IP:输入 Bindplane 代理主机的 IP 地址。
    • 远程端口:输入 514。
  4. 点击 Add(添加)。
  5. 点击更新以保存配置。
  6. 如需通过 CLI 为详细 APM 日志配置高速日志记录 (HSL),请执行以下操作:

    1. 通过 SSH 连接到 F5 BIG-IP 系统。
    2. 运行以下命令:

      tmsh create ltm pool syslog_pool members add { BINDPLANE_IP:514 }
      tmsh create sys log-config destination remote-high-speed-log secops_hsl pool-name syslog_pool protocol udp
      tmsh create sys log-config destination remote-syslog secops_syslog remote-high-speed-log secops_hsl
      tmsh create sys log-config publisher secops_publisher destinations add { secops_syslog }
      tmsh save sys config
      
      • 将 BINDPLANE_IP 替换为 Bindplane 代理主机的 IP 地址。
  7. 将发布商分配给 APM 访问权限配置文件:

    1. 依次前往访问权限 > 配置文件 / 政策 > 访问权限配置文件。
    2. 选择目标访问权限配置文件。
    3. 在日志设置标签页中,选择已创建的发布者。
    4. 点击更新。
  8. 通过检查 Bindplane 代理日志,验证是否正在发送 syslog 消息。

UDM 映射表

日志字段 UDM 映射 逻辑
应用 principal.application 该值取自 grok 过滤器提取的应用字段。
bytes_in network.received_bytes 该值取自 grok 过滤器提取的 bytes_in 字段,并转换为无符号整数。
bytes_out network.sent_bytes 该值取自 grok 过滤器提取的 bytes_out 字段,并转换为无符号整数。
cmd_data principal.process.command_line 该值取自 kv 过滤器提取的 cmd_data 字段。
destination_ip target.ip 该值取自 grok 过滤器提取的 destination_ip 字段。
destination_port target.port 该值取自 grok 过滤器提取的 destination_port 字段,并转换为整数。
文件夹 principal.process.file.full_path 该值取自 kv 过滤器提取的文件夹字段。
geoCountry principal.location.country_or_region 该值取自 grok 过滤器提取的 geoCountry 字段。
geoState principal.location.state 该值取自 grok 过滤器提取的 geoState 字段。
inner_msg security_result.description 如果没有其他具体说明,则该值取自 grok 过滤器提取的 inner_msg 字段。
ip_protocol network.ip_protocol 该值取自 grok 过滤器提取的 ip_protocol 字段。
principal_hostname principal.hostname 该值取自 grok 过滤器提取的 principal_hostname 字段。
principal_ip principal.ip 该值取自 grok 过滤器提取的 principal_ip 字段。
process_id principal.process.pid 该值取自 grok 过滤器提取的 process_id 字段。
角色 user_role.name 该值取自 grok 过滤器提取的角色字段。如果角色字段包含“admin”(不区分大小写),则值会设为“ADMINISTRATOR”。
和程度上减少 security_result.severity_details 系统日志消息中的原始值存储在此处。该值通过使用条件逻辑从严重程度字段派生而来:CRITICAL -> CRITICAL、ERR -> ERROR、ALERT、EMERGENCY -> HIGH、INFO、NOTICE -> INFORMATIONAL、DEBUG -> LOW、WARN -> MEDIUM
source_ip principal.ip 该值取自 grok 过滤器提取的 source_ip 字段。
source_port principal.port 该值取自 grok 过滤器提取的 source_port 字段,并转换为整数。
状态 security_result.summary 该值取自 kv 过滤器提取的状态字段。
时间戳 metadata.event_timestamp、时间戳 该值取自 grok 过滤器提取的时间戳字段,并解析为时间戳对象。顶级事件对象中的时间戳字段也会获得此值。
用户 principal.user.userid 该值取自 grok 过滤条件提取的用户字段,并移除了“id”或“ID”前缀。该值根据是否存在其他字段派生得出:,如果存在用户:USER_UNCATEGORIZED,如果存在 source_ip 和 destination_ip:NETWORK_CONNECTION,如果存在 principal_ip 或 principal_hostname:STATUS_UPDATE,否则:GENERIC_EVENT 硬编码为“BIGIP_APM”。硬编码为“F5”。如果结果字段为“failed”,则值设置为“BLOCK”。
facility event.idm.read_only_udm.additional.fields 从更新日志映射
Tunnel_Type event.idm.read_only_udm.additional.fields 从更新日志映射
partition event.idm.read_only_udm.additional.fields 从更新日志映射
priority event.idm.read_only_udm.additional.fields 从更新日志映射
session_id event.idm.read_only_udm.network.session_id 从更新日志映射
Client_IP event.idm.read_only_udm.principal.ip和event.idm.read_only_udm.principal.asset.ip之间 从更新日志映射
Assigned_PPP_Dynamic_IPv4 event.idm.read_only_udm.target.ip和event.idm.read_only_udm.target.asset.ip之间 从更新日志映射
ID event.idm.read_only_udm.security_result.rule_id 从更新日志映射
resource_name event.idm.read_only_udm.about.resource.name 从更新日志映射
log_id event.idm.read_only_udm.metadata.product_log_id 从更新日志映射
f5_partition event.idm.read_only_udm.target.resource.attribute.labels 从更新日志映射
f5_object_name event.idm.read_only_udm.target.resource.name 从更新日志映射
listener_name event.idm.read_only_udm.target.application 从更新日志映射
geoContinent event.idm.read_only_udm.principal.resource.attribute.labels 从更新日志映射
reputation event.idm.read_only_udm.principal.resource.attribute.labels 从更新日志映射
syslog_priority event.idm.read_only_udm.additional.fields 从更新日志映射
User-Agent event.idm.read_only_udm.network.http.user_agent 从更新日志映射
User-Agent event.idm.read_only_udm.network.http.parsed_user_agent 从更新日志映射
http_protocol_info event.idm.read_only_udm.additional.fields 从更新日志映射
X-Forwarded-For event.idm.read_only_udm.additional.fields 从更新日志映射
Accept-Encoding event.idm.read_only_udm.additional.fields 从更新日志映射
Accept event.idm.read_only_udm.additional.fields 从更新日志映射
host event.idm.read_only_udm.target.ip 从更新日志映射
http_protocol_info event.idm.read_only_udm.network.application_protocol 从更新日志映射
hostname event.idm.read_only_udm.principal.hostname 从更新日志映射
hostname event.idm.read_only_udm.principal.asset.hostname 从更新日志映射
bigip_mgmt_ip event.idm.read_only_udm.target.ip 从更新日志映射
bigip_mgmt_ip event.idm.read_only_udm.target.asset.ip 从更新日志映射
bigip_mgmt_ip2 event.idm.read_only_udm.target.ip 从更新日志映射
bigip_mgmt_ip2 event.idm.read_only_udm.target.asset.ip 从更新日志映射
client_ip_geo_location event.idm.read_only_udm.principal.location.country_or_region 从更新日志映射
client_port event.idm.read_only_udm.principal.port 从更新日志映射
client_request_uri event.idm.read_only_udm.principal.url 从更新日志映射
configuration_date_time event.idm.read_only_udm.additional.fields 从更新日志映射
context_name event.idm.read_only_udm.principal.administrative_domain 从更新日志映射
context_type event.idm.read_only_udm.principal.application 从更新日志映射
dest_ip event.idm.read_only_udm.target.ip 从更新日志映射
dest_ip event.idm.read_only_udm.target.asset.ip 从更新日志映射
dest_port event.idm.read_only_udm.target.port 从更新日志映射
device_product event.idm.read_only_udm.target.resource.name 从更新日志映射
device_version event.idm.read_only_udm.target.resource.attribute.labels 从更新日志映射
errdefs_msgno event.idm.read_only_udm.security_result.rule_id 从更新日志映射
http_method event.idm.read_only_udm.network.http.method 从更新日志映射
http_protocol_info event.idm.read_only_udm.network.http.user_agent 从更新日志映射
http_protocol_info event.idm.read_only_udm.network.http.parsed_user_agent 从更新日志映射
route_domain event.idm.read_only_udm.additional.fields 从更新日志映射
captcha_status event.idm.read_only_udm.additional.fields 从更新日志映射
browser_verification_status event.idm.read_only_udm.additional.fields 从更新日志映射
client_type event.idm.read_only_udm.additional.fields 从更新日志映射
jailbroken_or_rooted_device event.idm.read_only_udm.additional.fields 从更新日志映射
mobile_debugger_enabled_device event.idm.read_only_udm.additional.fields 从更新日志映射
imei event.idm.read_only_udm.additional.fields 从更新日志映射
http_request event.idm.read_only_udm.additional.fields 从更新日志映射
human_behaviour event.idm.read_only_udm.additional.fields 从更新日志映射
timestamp event.idm.read_only_udm.metadata.event_timestamp 从更新日志映射
virtual_server_name event.idm.read_only_udm.principal.cloud.vpc.name 从更新日志映射
device_id event.idm.read_only_udm.principal.asset.asset_id 从更新日志映射
host event.idm.read_only_udm.target.hostname 从更新日志映射
host event.idm.read_only_udm.target.asset.hostname 从更新日志映射
request_date_time event.idm.read_only_udm.metadata.collected_timestamp 从更新日志映射
profile_name event.idm.read_only_udm.principal.user.user_display_name 从更新日志映射
support_id event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
request_status event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
previous_action event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
anomaly_categories event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
previous_support_id event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
session_id event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
configured_mitigation_action event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
configured_mitigation_action_reason event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
actual_mitigation_action event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
actual_mitigation_action_reason event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
anomalies event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
browser_configured_verification_action event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
browser_actual_verification_action event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
browser_actual_verification_action_reason event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
previous_request_date_time event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
action event.idm.read_only_udm.security_result.action_details 从更新日志映射
reason event.idm.read_only_udm.security_result.summary 从更新日志映射
bot_signature event.idm.read_only_udm.principal.resource.attribute.labels 从更新日志映射
bot_signature_category event.idm.read_only_udm.principal.resource.attribute.labels 从更新日志映射
device_id_status event.idm.read_only_udm.principal.resource.attribute.labels 从更新日志映射
bot_name event.idm.read_only_udm.principal.resource.attribute.labels 从更新日志映射
device_id_action event.idm.read_only_udm.principal.resource.attribute.labels 从更新日志映射
previous_initiated_action event.idm.read_only_udm.principal.resource.attribute.labels 从更新日志映射
class event.idm.read_only_udm.principal.resource.attribute.labels 从更新日志映射
previous_initiated_action_status event.idm.read_only_udm.principal.resource.attribute.labels 从更新日志映射
enforced_by event.idm.read_only_udm.principal.resource.attribute.labels 从更新日志映射
additional_bot_signatures event.idm.read_only_udm.principal.resource.attribute.labels 从更新日志映射
headless_signatures event.idm.read_only_udm.target.resource.attribute.labels 从更新日志映射
micro_service_matched_wildcard_url event.idm.read_only_udm.target.resource.attribute.labels 从更新日志映射
micro_service_hostname event.idm.read_only_udm.target.resource.attribute.labels 从更新日志映射
mobile_is_app event.idm.read_only_udm.target.resource.attribute.labels 从更新日志映射
mobile_in_emulation_mode event.idm.read_only_udm.target.resource.attribute.labels 从更新日志映射
challenge_failure_reason event.idm.read_only_udm.target.resource.attribute.labels 从更新日志映射
os_name event.idm.read_only_udm.target.resource.attribute.labels 从更新日志映射
classification_reason event.idm.read_only_udm.target.resource.attribute.labels 从更新日志映射
new_request_status event.idm.read_only_udm.target.resource.attribute.labels 从更新日志映射
micro_service_name event.idm.read_only_udm.principal.resource.name 从更新日志映射
micro_service_type event.idm.read_only_udm.principal.resource.resource_subtype 从更新日志映射
application_display_name event.idm.read_only_udm.target.application 从更新日志映射
application_version event.idm.read_only_udm.target.platform_version 从更新日志映射
http_protocol_indication event.idm.read_only_udm.network.application_protocol_version 从更新日志映射
client_ip event.idm.read_only_udm.principal.ip 从更新日志映射
client_ip event.idm.read_only_udm.principal.asset.ip 从更新日志映射
principal_hostname event.idm.read_only_udm.intermediary.hostname和event.idm.read_only_udm.intermediary.asset.hostname之间 从更新日志映射
rulename event.idm.read_only_udm.security_result.rule_name 从更新日志映射
filepath event.idm.read_only_udm.target.file.full_path 从更新日志映射
appprotocol event.idm.read_only_udm.network.application_protocol 从更新日志映射

更新日志

查看此解析器的更新日志

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