收集 WatchGuard Firebox 日志

支持:

本文档介绍了如何使用 Bindplane 将 WatchGuard Firebox 日志注入到 Google Security Operations。WatchGuard Firebox 是一种统一威胁管理 (UTM) 防火墙设备,可提供网络安全功能,包括有状态数据包检测、入侵防御、应用控制、网址过滤、网关杀毒和 VPN 连接。Firebox 日志会捕获流量事件、安全提醒、身份验证活动和系统健康状况信息。

准备工作

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

  • Google SecOps 实例。
  • Windows 2016 或更高版本,或者带有 systemd 的 Linux 主机。
  • 如果在代理后面运行,请确保根据 Bindplane 代理要求打开防火墙端口。
  • 对 WatchGuard Firebox Web 界面(Fireware Web 界面)或 WatchGuard System Manager 的特权访问权限。

获取 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 上的 /opt/observiq-otel-collector/ 目录中,或 Windows 上的安装目录中。
    • 使用文本编辑器(例如 nano、vi 或记事本)打开该文件。
  2. 按如下方式修改 config.yaml 文件:

    receivers:
      udplog:
        # 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: 'WATCHGUARD'
        raw_log_field: body
        ingestion_labels:
    
    service:
      pipelines:
        logs/source0__chronicle_w_labels-0:
          receivers:
            - udplog
          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: 'WATCHGUARD'
        raw_log_field: body
        ingestion_labels:
    

重启 Bindplane 代理以应用更改

  1. 如需在 Linux 中重启 Bindplane 代理,请运行以下命令:

    sudo systemctl restart observiq-otel-collector
    
  2. 如需在 Windows 中重启 Bindplane 代理,您可以使用服务控制台,也可以输入以下命令:

    net stop observiq-otel-collector && net start observiq-otel-collector
    

配置 WatchGuard Firebox syslog 转发

如需配置 WatchGuard Firebox 以将 syslog 消息转发到 Bindplane 代理,请使用 Fireware Web 界面按以下步骤操作:

  1. 登录 Fireware Web 界面 (https://<firebox-ip>:8080)。
  2. 依次前往系统 > 日志记录。
  3. 点击 Syslog 服务器部分中的添加。
  4. 提供以下配置详细信息:

    • IP 地址:输入 Bindplane 代理主机(例如 192.168.1.100)的 IP 地址。
    • 端口:输入 514(或在 Bindplane 代理中配置的端口)。
    • 日志格式:选择 Syslog(标准 BSD syslog 格式)。
  5. 在 Syslog Settings(Syslog 设置)部分中,配置日志级别:

    • 将日志级别设置为信息或更高级别,以捕获流量、安全和系统事件。
  6. 点击保存。

配置要转发的日志类型

  1. 在 Fireware Web 界面中,依次前往系统 > 日志记录 > Syslog。
  2. 确保已为 syslog 转发功能启用以下日志类型:

    • 流量 - 防火墙流量事件(允许、拒绝)。
    • 警报 - IPS 和安全警报事件。
    • 事件 - 系统事件和状态变化。
    • 调试 - 可选,仅用于问题排查。
  3. 点击保存。

(替代方法)通过 WatchGuard System Manager 进行配置

  1. 打开 WatchGuard System Manager 并连接到 Firebox。
  2. 依次前往设置 > 日志记录 > 将日志消息发送到此 syslog 服务器。
  3. 点击 Add(添加)。
  4. 提供以下配置详细信息:

    • IP 地址:输入 Bindplane 代理主机 IP 地址。
    • 端口:输入 514。
    • 日志格式:选择 Syslog。
  5. 点击 OK(确定),然后将配置保存到 Firebox。

如需了解详情,请参阅 WatchGuard Fireware 日志记录文档。

UDM 映射表

日志字段 UDM 映射 逻辑
action security_result.action_details 原始日志中的 action 值会分配给 security_result.action_details。
action target.labels.value 原始日志中的 action 值会分配给 target.labels.value,其中 target.labels.key 为“Action over resource”。
arg target.file.full_path 原始日志中的 arg 值会分配给 target.file.full_path。
app_cat_id about.labels.value 原始日志中的 app_cat_id 值会分配给 about.labels.value,其中 about.labels.key 为“app_cat_id”。
app_cat_name target.application 与 app_name 结合使用,以构成 target.application 的值(例如“Google - Web 服务”)。
app_id about.labels.value 原始日志中的 app_id 值会分配给 about.labels.value,其中 about.labels.key 为“app_id”。
app_name target.application 与 app_cat_name 结合使用,构成 target.application 的值(例如,“Google - Web services”)。
cats security_result.category_details 原始日志中的 cats 值会分配给 security_result.category_details。
cert_issuer network.tls.server.certificate.issuer 原始日志中的 cert_issuer 值会分配给 network.tls.server.certificate.issuer。
cert_subject network.tls.server.certificate.subject 原始日志中的 cert_subject 值会分配给 network.tls.server.certificate.subject。
cn network.tls.server.certificate.subject 原始日志中的 cn 值会分配给 network.tls.server.certificate.subject。
conn_action security_result.action_details 原始日志中的 conn_action 值会分配给 security_result.action_details。
content_type 未映射 未映射到所提供的 UDM 示例中的 IDM 对象。
description metadata.description 从原始日志派生的 description 值会分配给 metadata.description。
dhcp_type network.dhcp.type 原始日志中的 dhcp_type 值会映射到 network.dhcp.type 中的相应 DHCP 类型(例如“REQUEST”“ACK”)。
dst_host target.hostname 原始日志中的 dst_host 值会分配给 target.hostname。
dst_ip target.ip 原始日志中的 dst_ip 值会分配给 target.ip。
dst_mac target.mac 原始日志中的 dst_mac 值会分配给 target.mac。
dst_port target.port 原始日志中的 dst_port 值会分配给 target.port。
dst_user target.user.user_display_name 原始日志中的 dst_user 值会分配给 target.user.user_display_name。
dstname target.administrative_domain 原始日志中的 dstname 值会分配给 target.administrative_domain。
duration 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
elapsed_time 未映射 未映射到所提供的 UDM 示例中的 IDM 对象。
endpoint intermediary.labels.value 原始日志中的 endpoint 值会分配给 intermediary.labels.value,其中 intermediary.labels.key 为“Gateway-Endpoint”。
event_name principal.application 原始日志中的 event_name 值会分配给 principal.application。
firewall_id intermediary.asset_id 原始日志中 firewall_id 的值会加上前缀“Firewall ID : ”,并分配给 intermediary.asset_id。
firewall_name principal.asset_id 原始日志中的 firewall_name 值会加上前缀“Firewall: ”,并分配给 principal.asset_id。
firewallname intermediary.hostname 原始日志中的 firewallname 值会分配给 intermediary.hostname。
firewallname principal.hostname 原始日志中的 firewallname 值会分配给 principal.hostname。
fqdn_dst_match 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
geo 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
geo_dst target.location.country_or_region 原始日志中的 geo_dst 值会分配给 target.location.country_or_region。
geo_src principal.location.country_or_region 原始日志中的 geo_src 值会分配给 principal.location.country_or_region。
host 未映射 未映射到所提供的 UDM 示例中的 IDM 对象。
ike_policy security_result.rule_id 原始日志中的 ike_policy 值会分配给 security_result.rule_id。
ike_policy_version security_result.rule_version 原始日志中的 ike_policy_version 值会分配给 security_result.rule_version。
intermediary_host intermediary.hostname 原始日志中的 intermediary_host 值会分配给 intermediary.hostname。
ipaddress 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
ipsec_policy 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
ipsec_policy_version 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
keyword 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
line 未映射 未映射到所提供的 UDM 示例中的 IDM 对象。
log_message metadata.description 当没有其他更具体的说明时,原始日志中的 log_message 值会分配给 metadata.description。
log_reason security_result.summary 原始日志中的 log_reason 值会分配给 security_result.summary。
log_type metadata.log_type 原始日志中的 log_type 值会分配给 metadata.log_type。始终设置为“WATCHGUARD”。
msg security_result.summary 原始日志中的 msg 值会分配给 security_result.summary。
msg_id metadata.product_event_type 原始日志中的 msg_id 值会分配给 metadata.product_event_type。
new_action security_result.action_details 与 conn_action 搭配使用,以构成 security_result.action_details 的值(例如,“ProxyReplace: IP protocol - HTTPS-Client.DPI-Off”)。
op network.http.method 原始日志中的 op 值会分配给 network.http.method。
path target.url 原始日志中的 path 值会分配给 target.url。
pid 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
policy_name intermediary.resource.name 原始日志中的 policy_name 值会分配给 intermediary.resource.name。
policy_name security_result.rule_name 原始日志中的 policy_name 值会分配给 security_result.rule_name。
policyname_label.value security_result.rule_labels.value 原始日志中 policy_name 的值会分配给 security_result.rule_labels.value,其中 security_result.rule_labels.key 为“PolicyName”。
prin_host principal.hostname 原始日志中的 prin_host 值会分配给 principal.hostname。
proc_id 未映射 未映射到所提供的 UDM 示例中的 IDM 对象。
protocol network.ip_protocol 原始日志中的 protocol 值(转换为大写)会分配给 network.ip_protocol。对“EXTERNAL ICMP”(映射到“ICMP”)进行特殊处理。
proxy_act security_result.rule_id 原始日志中的 proxy_act 值会分配给 security_result.rule_id。
proxy_act security_result.rule_name 原始日志中的 proxy_act 值会分配给 security_result.rule_name。
query_name network.dns.questions.name 原始日志中的 query_name 值会分配给 network.dns.questions.name。
query_type network.dns.questions.type 原始日志中的 query_type 值会分配给 network.dns.questions.type。对数字查询类型进行特殊处理并将其映射到标准 DNS 查询类型。
rc 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
reason security_result.summary 原始日志中的 reason 值会分配给 security_result.summary。
record_type network.dns.answers.type 原始日志中的 record_type 值会映射到 network.dns.answers.type 中的相应 DNS 记录类型。
redirect_action 未映射 未映射到所提供的 UDM 示例中的 IDM 对象。
reputation additional.fields.value.string_value 原始日志中的 reputation 值会分配给 additional.fields.value.string_value,其中 additional.fields.key 为“reputation”。
response 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
response_code network.dns.response_code 原始日志中的 response_code 值会映射到 network.dns.response_code 中的相应 DNS 响应代码。
route_type 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
rule_name security_result.rule_name 原始日志中的 rule_name 值会分配给 security_result.rule_name。
rcvd_bytes network.received_bytes 原始日志中的 rcvd_bytes 值会分配给 network.received_bytes。
sent_bytes network.sent_bytes 原始日志中的 sent_bytes 值会分配给 network.sent_bytes。
server_ssl 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
severity 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
sig_vers network.tls.server.certificate.version 原始日志中的 sig_vers 值会分配给 network.tls.server.certificate.version。
signature_cat additional.fields.value.string_value 原始日志中 signature_cat 的值会分配给 additional.fields.value.string_value,其中 additional.fields.key 为“signature_cat”。
signature_id additional.fields.value.string_value 原始日志中的 signature_id 值会分配给 additional.fields.value.string_value,其中 additional.fields.key 为“signature_id”。
signature_name additional.fields.value.string_value 原始日志中的 signature_name 值会分配给 additional.fields.value.string_value,其中 additional.fields.key 为“signature_name”。
sni network.tls.client.server_name 原始日志中的 sni 值会分配给 network.tls.client.server_name。
src_ctid 未映射 未映射到所提供的 UDM 示例中的 IDM 对象。
src_host principal.hostname 原始日志中的 src_host 值会分配给 principal.hostname。
src_ip principal.ip 原始日志中的 src_ip 值会分配给 principal.ip。
src_ip_nat 未映射 未映射到所提供的 UDM 示例中的 IDM 对象。
src_mac principal.mac 原始日志中的 src_mac 值会分配给 principal.mac。
src_port principal.port 原始日志中的 src_port 值会分配给 principal.port。
src_user principal.user.user_display_name 原始日志中的 src_user 值会分配给 principal.user.user_display_name。
src_user_name principal.user.user_display_name 原始日志中的 src_user_name 值会分配给 principal.user.user_display_name。
src_vpn_ip principal.ip 原始日志中的 src_vpn_ip 值会分配给 principal.ip。
srv_ip 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
srv_port 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
ssl_offload 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
tcp_info 未映射 未映射到提供的 UDM 示例中的 IDM 对象。
time metadata.event_timestamp.seconds,timestamp.seconds 系统会解析原始日志中的 time 值,并使用该值填充 metadata.event_timestamp.seconds 和 timestamp.seconds。
time1 metadata.event_timestamp.seconds,timestamp.seconds 系统会解析原始日志中的 time1 值,并使用该值填充 metadata.event_timestamp.seconds 和 timestamp.seconds。
tls_profile about.labels.value 原始日志中 tls_profile 的值会分配给 about.labels.value,其中 about.labels.key 为“tls_profile”。
tls_version 未映射 未映射到所提供的 UDM 示例中的 IDM 对象。
user_name principal.user.userid,principal.user.user_display_name 原始日志中的 user_name 值会根据上下文分配给 principal.user.userid 或 principal.user.user_display_name。
user_type 未映射 未映射到所提供的 UDM 示例中的 IDM 对象。
(不适用) intermediary.resource.type 始终设置为“ACCESS_POLICY”。
(不适用) metadata.event_type 由解析器逻辑根据 msg_id、log_type、event_name 和其他字段确定。可以是 NETWORK_CONNECTION、SERVICE_MODIFICATION、NETWORK_SMTP、NETWORK_DNS、NETWORK_HTTP、USER_LOGIN、USER_LOGOUT、USER_RESOURCE_UPDATE_CONTENT、RESOURCE_PERMISSIONS_CHANGE、RESOURCE_CREATION、GENERIC_EVENT、STATUS_UPDATE 或 USER_UNCATEGORIZED。
(不适用) metadata.product_name 始终设置为“固件”。
(不适用) metadata.vendor_name 一律设置为“Watchguard”。
(不适用) security_result.action 由解析器逻辑根据 disposition 确定。可以是“ALLOW”或“BLOCK”。
(不适用) extensions.auth.type 对于用户登录/退出事件,设置为“AUTHTYPE_UNSPECIFIED”;对于与 VPN 相关的网络事件,设置为“VPN”。
(不适用) network.application_protocol 由解析器逻辑根据 msg_id 和 event_name 确定。可以是“DNS”“DHCP”“HTTP”或“HTTPS”。
(不适用) network.dns.questions.type 对于“A”记录查询,请设置为 1。
(不适用) target.labels.key 当 action 映射到 target.labels.value 时,设置为“对资源执行的操作”。
(不适用) intermediary.labels.key 当 prin_host 映射到 intermediary.labels.value 时,设置为“防火墙成员名称”。
(不适用) intermediary.labels.key 当 endpoint 映射到 intermediary.labels.value 时,设置为“Gateway-Endpoint”。
(不适用) principal.labels.key 当 gateway 映射到 principal.labels.value 时,设置为“Gateway”。
(不适用) target.labels.key 当 gateway 映射到 target.labels.value 时,设置为“Gateway”。
(不适用) principal.labels.key 当 status 映射到 principal.labels.value 时,设置为“state”。
(不适用) target.labels.key 当 status 映射到 target.labels.value 时,设置为“网关状态”。
(不适用) additional.fields.key 如果相应值是从原始日志映射而来,则设置为“signature_name”“signature_cat”“signature_id”或“reputation”。

更新日志

查看此解析器的更新日志

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