收集 Barracuda Email Security Gateway 日志

解析器版本:4.0

支持的平台:

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

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

准备工作

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

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

获取 Google SecOps 注入身份验证文件

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 收集代理
  3. 下载数据注入身份验证文件
    • 将文件安全地保存在将要安装 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 上的安装目录中。
    • 使用文本编辑器(例如 nanovi 或记事本)打开该文件。
  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:
            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:
    
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - tcplog
                exporters:
                    - chronicle/chronicle_w_labels
    
  • 根据基础架构的需要替换端口和 IP 地址。
  • <your_customer_id> 替换为实际的客户 ID。
  • /path/to/ingestion-authentication-file.json 更新为在第 1 步中保存身份验证文件的文件路径。

重启 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 代理主机(例如 192.168.1.100)的 IP 地址或主机名。
    • Syslog 端口:输入 514(或您配置的 Bindplane 代理端口)。
    • Syslog 协议:选择 TCP
  4. 点击保存更改

验证 syslog 传送

  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 根据 actionaction_codeservicedelivered 字段的组合设置。
security_result.category 根据 actionreason 和其他字段的组合设置。
auth_serv event.idm.read_only_udm.intermediary.hostname 从变更日志映射
spf_sender_ip event.idm.read_only_udm.principal.ipevent.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.hostnameevent.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.ipevent.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 专业人士的解答。