收集 Swift Alliance Messaging Hub 日志

支持:

本文档介绍了如何使用 Bindplane 将 Swift Alliance Messaging Hub (AMH) 日志注入 Google Security Operations。

Swift Alliance Messaging Hub (AMH) 是一种金融消息传递平台,用于 SWIFT 网络消息路由、监控和审核日志记录。Bindplane 代理直接从本地文件系统收集 AMH 日志文件。

准备工作

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

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

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

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

其他安装资源

如需了解其他安装选项和问题排查,请参阅 Bindplane 代理安装指南。

配置 Bindplane 代理以注入日志并将其发送到 Google SecOps

找到配置文件

  • Linux:

    sudo nano /opt/observiq-otel-collector/config.yaml
    
  • Windows:

    notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
    

修改配置文件

  • 将 config.yaml 的全部内容替换为以下配置:

    receivers:
      filelog:
        include:
          - /opt/swift/amh/log/*.log
        start_at: beginning
    
    exporters:
      chronicle/swift_amh:
        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: SWIFT_AMH
        raw_log_field: body
        ingestion_labels:
          env: production
    
    service:
      pipelines:
        logs/swift_amh_to_chronicle:
          receivers:
            - filelog
          exporters:
            - chronicle/swift_amh
    

配置参数

替换以下占位符:

  • 接收器配置:

    • filelog:用于从磁盘收集日志文件的接收器类型
    • include:要监控的文件路径列表。默认 Swift AMH 日志位置:
      • Linux:/opt/swift/amh/log/*.log 或 /var/log/swift/amh/*.log
      • Windows:C:\Swift\AMH\log\*.log
    • start_at:设置为 beginning 可读取现有日志,设置为 end 可仅读取新条目
  • 导出器配置:

    • swift_amh:导出器的描述性名称
    • 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>:上一步中的客户 ID
    • location:将 <LOCATION> 替换为 Google SecOps 实例所在的区域(例如 us、europe 或 asia-southeast1)。导出工具会在此值前面加上 chronicle.googleapis.com。如需查看完整列表,请参阅区域级端点。
    • project:将 <PROJECT_NUMBER> 替换为“IAM 和管理”>“设置”中的项目编号。
    • endpoint:保持设置为 chronicle.googleapis.com。
    • SWIFT_AMH:日志类型,与 Chronicle 中显示的完全一致
    • ingestion_labels:YAML 格式的可选标签(例如 env: production)
  • 流水线配置:

    • swift_amh_to_chronicle:流水线的描述性名称

旧版提取 API

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

    exporters:
      chronicle/swift_amh:
        compression: gzip
        creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json'
        customer_id: '<customer_id>'
        endpoint: malachiteingestion-pa.googleapis.com
        log_type: SWIFT_AMH
        raw_log_field: body
        ingestion_labels:
          env: production
    

保存配置文件

  • 修改后,保存文件:
    • Linux:依次按 Ctrl+O、Enter 和 Ctrl+X
    • Windows:依次点击文件 > 保存

重启 Bindplane 代理以应用更改

如需在 Linux 中重启 Bindplane 代理,请执行以下操作:

  1. 运行以下命令:

    sudo systemctl restart observiq-otel-collector
    
  2. 验证服务是否正在运行:

    sudo systemctl status observiq-otel-collector
    
  3. 检查日志中的错误:

    sudo journalctl -u observiq-otel-collector -f
    

如需在 Windows 中重启 Bindplane 代理,请执行以下操作:

  1. 请从下列选项中选择一项:

    • 以管理员身份运行命令提示符或 PowerShell:
    net stop observiq-otel-collector && net start observiq-otel-collector
    
    • “服务”控制台:
      1. 按 Win+R,输入 services.msc,然后按 Enter 键。
      2. 找到 observIQ OpenTelemetry 收集器。
      3. 右键点击并选择重启。
  2. 验证服务是否正在运行:

    sc query observiq-otel-collector
    
  3. 检查日志中是否存在错误:

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

配置 Swift Alliance Messaging Hub 日志记录

  1. 使用管理员权限登录 Swift AMH 服务器。
  2. 前往 AMH 日志目录。默认路径包括:

    • Linux:/opt/swift/amh/log/ 或 /var/log/swift/amh/
    • Windows:C:\Swift\AMH\log\
  3. 主要日志文件包括:

    • 审核日志 (audit*.log):用户登录/退出事件、邮件路由决策和配置更改。
    • 消息日志 (msg*.log):SWIFT 消息处理、路由和传送事件。
    • 系统日志 (system*.log):应用启动/停止、错误和性能事件。
  4. (可选)如需从 AMH Web 控制台导出其他日志数据,请执行以下操作:

    1. 登录 Swift AMH Web 控制台。
    2. 依次前往监控 > 事件日志。
    3. 配置日期范围和事件过滤条件。
    4. 点击导出以下载事件数据。
    5. 将导出的文件保存到 Bindplane 代理监控的日志目录中。
  5. 确保 config.yaml 中的 Bindplane 代理 include 路径与 Swift AMH 服务器上的实际日志文件位置相匹配。

UDM 映射表

日志字段 UDM 映射 逻辑
关于 有关事件的其他背景信息或元数据
spanId、traceId、aal、mr about.labels 为事件提供额外标签的键值对
extensions.auth.type 使用的身份验证类型
中介 中介 与活动相关的中介实体的信息
target.data.message.Header.DateCreated metadata.event_timestamp 事件发生时的时间戳
metadata.event_type 事件类型(例如 USER_LOGIN、NETWORK_CONNECTION)
traceId metadata.product_deployment_id 产品部署的标识符
snmp_1_3_6_1_4_1_18494_2_1_5, event_number, product_event_type metadata.product_event_type 特定产品的事件类型
target.data.message.Header.MessageType.Code, snmp_1_3_6_1_4_1_18494_2_1_10, sag, product_object_id metadata.product_log_id 产品专属日志标识符
metadata.product_version 产品版本
sessionid、session network.session_id 网络会话的标识符
data.creationDate principal.asset.creation_time 资产的创建时间
target.data.message.Header.DateDelivered principal.asset.last_discover_time 上次发现资产的时间
target.data.message.Status.CurrentStatus.StatusDate principal.asset.system_last_update_time 相应资产的上次系统更新时间
ldap_group principal.group.group_display_name 群组的显示名称
主机名 principal.hostname 主账号的主机名
客户端 principal.ip 连接的来源 IP 地址
target.data.message.Header.TransactionReference principal.process.parent_pid 父级进程 ID
target.data.message.Header.MessageReference principal.process.pid 进程 ID
amount、currency、offset、bussiness_element、pl principal.resource.attribute.labels 资源属性的标签
message_partner principal.resource.name 资源的名称
pal principal.user.attribute.labels 用户属性的标签
uumid principal.user.product_object_id 用户的特定于产品的对象 ID
first_name last_name, user_HSM1 principal.user.user_display_name 用户的显示名称
userid, record.User, user, record.Description principal.user.userid 用户标识符
ac、sr security_result 安全分析或操作的结果
运算符 src.user.userid 来源用户标识符
act sr.action 安全结果中采取的操作
snmp_1_3_6_1_4_1_18494_2_1_9, description sr.description 安全结果说明
event_class sr.rule_name 触发安全结果的规则的名称
sr.severity 安全结果的严重级别
snmp_1_3_6_1_4_1_18494_2_1_6, event_severity, severity sr.severity_details 详细的严重程度信息
snmp_1_3_6_1_4_1_18494_2_1_8, 摘要 sr.summary 安全结果摘要
target.hostname 目标主机名
提示 target.ip 目标 IP 地址
target.data.message.Header.TransferReference target.process.pid 目标进程 ID
target_display_name, user_HSM1 target.user.user_display_name 目标用户的显示名称
record.Description, user_cn, user_HSM1, userid target.user.userid 目标用户标识符
metadata.product_name 商品名称
metadata.vendor_name 供应商/公司名称

更新日志

查看此解析器的更新日志

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