收集 Barracuda Email Security Gateway 日志

解析器版本:4.0

支持:

本文档介绍了如何使用 Bindplane 将 Barracuda Email Security Gateway 日志注入到 Google Security Operations。

Barracuda Email Security Gateway 是一种电子邮件安全设备,可提供入站过滤功能,用于过滤垃圾邮件、病毒、仿冒邮件和钓鱼式攻击。它还提供出站过滤功能,用于防止数据泄露和进行电子邮件加密。网关会通过 syslog 记录所有电子邮件交易、政策操作和威胁检测。

准备工作

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

  • Google SecOps 实例。
  • Windows 2016 或更高版本,或者带有 systemd 的 Linux 主机。
  • 如果在代理后面运行,请确保防火墙端口根据 Bindplane 代理要求处于打开状态。
  • 对 Barracuda Email Security Gateway 管理控制台的特权访问权限。

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

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
    

其他安装资源

如需了解其他安装选项,请参阅此安装指南。

配置 Bindplane 代理以注入 Syslog 并发送到 Google SecOps

  1. 访问配置文件:

    • 找到 config.yaml 文件。通常,它位于 Linux 上的 /observiq-otel-collector/ 目录中,或 Windows 上的安装目录中。
    • 使用文本编辑器(例如 nano、vi 或记事本)打开该文件。
  2. 按如下方式修改 config.yaml 文件:

    receivers:
      tcplog:
        # Replace the port and IP address as required
        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
        # Adjust the path to the credentials file you downloaded in Step 1
        creds_file_path: '/path/to/ingestion-authentication-file.json'
        # Replace with your actual customer ID from Step 2
        customer_id: <your_customer_id>
        endpoint: chronicle.googleapis.com
        # Add optional ingestion labels for better organization
        log_type: 'BARRACUDA_EMAIL'
        raw_log_field: body
        ingestion_labels:
    
    service:
      pipelines:
        logs/source0__chronicle_w_labels-0:
          receivers:
            - tcplog
          exporters:
            - chronicle/chronicle_w_labels
    
  • 根据基础架构的要求替换端口和 IP 地址。
  • 将 <LOCATION> 替换为 Google SecOps 实例所在的区域(例如 us、europe 或 asia-southeast1)。导出工具会为此值添加 chronicle.googleapis.com 前缀。
  • 将 <PROJECT_NUMBER> 替换为 IAM 和管理 > 设置中的项目编号。
  • 将 <your_customer_id> 替换为实际的客户 ID。
  • 将 /path/to/ingestion-authentication-file.json 更新为第 1 步中保存服务账号密钥文件(选项 1)的文件路径。

旧版提取 API 导出工具

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

    exporters:
      chronicle/chronicle_w_labels:
        compression: gzip
        # Adjust the path to the credentials file you downloaded in Step 1
        creds_file_path: '/path/to/ingestion-authentication-file.json'
        # Replace with your actual customer ID from Step 2
        customer_id: <your_customer_id>
        endpoint: malachiteingestion-pa.googleapis.com
        # Add optional ingestion labels for better organization
        log_type: 'BARRACUDA_EMAIL'
        raw_log_field: body
        ingestion_labels:
    

重启 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"
    

在 Barracuda Email Security Gateway 上配置 syslog 转发

  1. 登录 Barracuda Email Security Gateway 网页界面。
  2. 前往高级 > 高级网络。
  3. 在 Syslog 部分中,配置以下字段:
    • Syslog 服务器:输入 Bindplane 代理主机的 IP 地址或主机名(例如 192.168.1.100)。
    • Syslog 端口:输入 514(或您配置的 Bindplane 代理端口)。
    • Syslog 协议:选择 TCP。
  4. 点击保存更改。

验证系统日志传送

  1. 配置 syslog 转发后,请通过网关发送一封测试邮件。
  2. 如需确认网关是否正在发送 syslog 数据,请依次前往高级 > 问题排查,然后查看 Syslog 部分,以监控实时邮件 syslog 输出。
  3. 在 Bindplane 代理主机上,验证是否正在接收日志:

    sudo journalctl -u observiq-otel-collector -f
    

如需了解详情,请参阅 Barracuda Email Security Gateway syslog 文档。

UDM 映射表

日志字段 UDM 映射 逻辑
dst_domain target.hostname dst_domain 字段的值。
dst_domain target.asset.hostname dst_domain 字段的值。
geoip target.location.country_or_region geoip 字段的值。
hdr_from network.email.from hdr_from 字段的值(如果它是电子邮件地址)。
hdr_to network.email.to hdr_to 字段的值(如果它是电子邮件地址),否则从 hdr_to 字段中的 JSON 数组解析。
host principal.hostname host 字段的值。
host principal.asset.hostname host 字段的值。
message_id network.email.mail_id message_id 字段的值。
product_log_id metadata.product_log_id product_log_id 字段的值。
queue_id security_result.detection_fields queue_id 字段的值。
recipient_email network.email.to recipient_email 字段的值(如果该字段不为空或 -)。
recipients.action security_result.action 如果值为“allowed”,则映射到 ALLOW,否则映射到 BLOCK。
recipients.action security_result.action_details recipients.action 字段的值。
recipients.delivery_detail security_result.detection_fields recipients.delivery_detail 字段的值。
recipients.delivered security_result.detection_fields recipients.delivered 字段的值。
recipients.email network.email.to recipients.email 字段的值(如果它是电子邮件地址)。
recipients.reason security_result.detection_fields recipients.reason 字段的值。
recipients.reason_extra security_result.detection_fields recipients.reason_extra 字段的值。
recipients.taxonomy security_result.detection_fields recipients.taxonomy 字段的值。
service security_result.summary service 字段的值。
size network.received_bytes size 字段的值转换为无符号整数。
src_ip principal.ip src_ip 字段的值(如果该字段不为空或不为 0.0.0.0)。
src_ip principal.asset.ip src_ip 字段的值(如果该字段不为空或 0.0.0.0)。
src_ip security_result.about.ip src_ip 字段的值(如果该字段不为空或不为 0.0.0.0)。
subject network.email.subject subject 字段的值。
target_ip target.ip target_ip 字段的值。
target_ip target.asset.ip target_ip 字段的值。
timestamp metadata.event_timestamp 从日志条目中解析出的时间戳。
metadata.event_type 硬编码为 EMAIL_TRANSACTION。
metadata.log_type 硬编码为 BARRACUDA_EMAIL。
metadata.vendor_name 硬编码为“Barracuda”。
network.application_protocol 如果 process 字段包含“smtp”,则设置为 SMTP。
network.direction 如果 process 字段包含“inbound”,则设置为 INBOUND;如果 process 字段包含“outbound”,则设置为 OUTBOUND。
security_result.action 根据 action、action_code、service 和 delivered 字段的组合进行设置。
security_result.category 根据 action、reason 和其他字段的组合设置。
auth_serv event.idm.read_only_udm.intermediary.hostname 从更新日志映射
spf_sender_ip event.idm.read_only_udm.principal.ip和event.idm.read_only_udm.principal.asset.ip之间 从更新日志映射
dkim_result event.idm.read_only_udm.additional.fields 从更新日志映射
dmarc_result event.idm.read_only_udm.additional.fields 从更新日志映射
dkim_domain event.idm.read_only_udm.additional.fields 从更新日志映射
header_from event.idm.read_only_udm.additional.fields 从更新日志映射
spf_result event.idm.read_only_udm.additional.fields 从更新日志映射
smtp_mailfrom event.idm.read_only_udm.additional.fields 从更新日志映射
gateway event.idm.read_only_udm.observer.hostname 从更新日志映射
timestamp event.idm.read_only_udm.metadata.collected_timestamp 从更新日志映射
attachment.name event.idm.read_only_udm.target.file.names 从更新日志映射
attachment.md5 event.idm.read_only_udm.about 从更新日志映射
intermediary event.idm.read_only_udm.intermediary 从更新日志映射
account_id event.idm.read_only_udm.principal.user.userid 从更新日志映射
domain_id event.idm.read_only_udm.target.user.userid 从更新日志映射
tls event.idm.read_only_udm.additional.fields 从更新日志映射
env_from event.idm.read_only_udm.additional.fields 从更新日志映射
hdr_auth_results event.idm.read_only_udm.additional.fields 从更新日志映射
recipient_count event.idm.read_only_udm.additional.fields 从更新日志映射
ptr_record event.idm.read_only_udm.principal.hostname和event.idm.read_only_udm.principal.asset.hostname之间 从更新日志映射
time event.idm.read_only_udm.metadata.event_timestamp 从更新日志映射
log_header_end event.idm.read_only_udm.additional.fields 从更新日志映射
payload.affected_mailboxes event.idm.read_only_udm.additional.fields 从更新日志映射
payload.attachment event.idm.read_only_udm.additional.fields 从更新日志映射
payload.body_text event.idm.read_only_udm.additional.fields 从更新日志映射
accountId event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
accessTokenId event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
payload.type event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
payload.incident_id event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
payload.messages_received event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
payload.matched_email_count event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
product event.idm.read_only_udm.metadata.product_name 从更新日志映射
payload.sender event.idm.read_only_udm.principal.user.email_addresses 从更新日志映射
payload.recipient event.idm.read_only_udm.target.user.email_addresses 从更新日志映射
payload.subject event.idm.read_only_udm.network.email.subject 从更新日志映射
payload.date event.idm.read_only_udm.metadata.collected_timestamp 从更新日志映射
payload.category event.idm.read_only_udm.security_result.category_details 从更新日志映射
payload.created_by event.idm.read_only_udm.principal.user.email_addresses 从更新日志映射
payload.sender_display_name event.idm.read_only_udm.principal.user.user_display_name 从更新日志映射
payload.sender_email event.idm.read_only_udm.principal.user.email_addresses 从更新日志映射
payload.login_country event.idm.read_only_udm.principal.location.country_or_region 从更新日志映射
payload.login_ip event.idm.read_only_udm.principal.ip和event.idm.read_only_udm.principal.asset.ip之间 从更新日志映射
payload.login_user_agent event.idm.read_only_udm.network.http.user_agent 从更新日志映射
payload.user_display_name event.idm.read_only_udm.principal.user.user_display_name 从更新日志映射
payload.user_email event.idm.read_only_udm.principal.user.email_addresses 从更新日志映射
payload.body_links event.idm.read_only_udm.security_result.about.url 从更新日志映射
payload.sender_name event.idm.read_only_udm.principal.user.user_display_name 从更新日志映射
attachments additional.fields 从更新日志映射
recipients.delivery_detail", "recipients.reason", "recipients.taxonomy", "recipients.reason_extra" and "recipient.delivered security_result.detection_fields 从更新日志映射
sender_email network.email.from 从更新日志映射
security_result.action QUARANTINE 从更新日志映射

更新日志

查看此解析器的更新日志

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