收集 WatchGuard Fireware 日志

支持的语言:

概览

此解析器可提取 JSON 或键值 (KV) 格式的 WatchGuard Fireware 日志,并将其转换为 UDM。它以不同的方式处理“流量”和“事件”日志,使用 grok 和 kv 过滤器提取字段并将其映射到 UDM,针对各种 msg_id 值和事件名称使用特定逻辑,处理网络协议、用户操作、安全结果和其他相关详细信息。它还会处理第二组 syslog 条目,提取类似信息并将其映射到 UDM 格式。

准备工作

  • 确保您拥有 Google SecOps 实例。
  • 确保您拥有 Watchguard 的特权访问权限。
  • 确保您拥有 Windows 2012 SP2 或更高版本或带有 systemd 的 Linux 主机。
  • 如果通过代理运行,请确保防火墙端口处于开放状态。

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

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 收集代理
  3. 下载注入身份验证文件

获取 Google SecOps 客户 ID

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 个人资料
  3. 复制并保存组织详细信息部分中的客户 ID

安装 BindPlane 代理

  1. 对于 Windows 安装,请运行以下脚本:msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
  2. 对于 Linux 安装,请运行以下脚本:sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
  3. 如需了解其他安装选项,请参阅此安装指南

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

  1. 访问安装了 Bindplane 的机器。
  2. 按如下方式修改 config.yaml 文件:

    receivers:
      tcplog:
        # Replace the below port <54525> and IP (0.0.0.0) with your specific values
        listen_address: "0.0.0.0:54525" 
    
    exporters:
        chronicle/chronicle_w_labels:
            compression: gzip
            # Adjust the creds location below according the placement of the credentials file you downloaded
            creds: '{ json file for creds }'
            # Replace <customer_id> below with your actual ID that you copied
            customer_id: <customer_id>
            endpoint: malachiteingestion-pa.googleapis.com
            # You can apply ingestion labels below as preferred
            ingestion_labels:
            log_type: SYSLOG
            namespace: testNamespace
            raw_log_field: body
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - tcplog
                exporters:
                    - chronicle/chronicle_w_labels
    
  3. 使用以下命令重启 Bindplane 代理以应用更改: sudo systemctl bindplane restart

向 Watchguard 添加 Syslog 服务器配置

  1. 登录 Watchguard 界面。
  2. 依次选择系统 > 日志记录
  3. 点击 Syslog 服务器标签页。
  4. 选中将日志消息发送到以下 syslog 服务器复选框。
  5. 点击添加
  6. Syslog 服务器对话框中,为输入参数指定值:

    • IP 地址:输入服务器 IP 地址。
    • 端口:更改默认的 syslog 服务器端口 (514),为您的服务器输入其他端口。
    • 日志格式:从下拉菜单中选择 Syslog
    • 可选:说明:输入服务器的说明(例如 Google SecOps export)。
    • 可选:时间戳:选中复选框可在日志消息详细信息中包含事件在 Firebox 上发生时的日期和时间。
    • 可选:设备的序列号:选中此复选框可在日志消息详细信息中包含 Firebox 的序列号。
    • Syslog facility:为每种类型的日志消息选择一个优先级(例如,对于高优先级的 syslog 消息,如警报,请选择 Local0)。
    • 可选:恢复默认设置:恢复为默认设置。
  7. 点击保存

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 服务”)。
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 值会添加“防火墙 ID:”前缀,然后分配给 intermediary.asset_id
firewall_name principal.asset_id 原始日志中的 firewall_name 值会添加“防火墙:”前缀,然后分配给 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。针对映射到“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.secondstimestamp.seconds 系统会解析原始日志中的 time 值,并使用该值填充 metadata.event_timestamp.secondstimestamp.seconds
time1 metadata.event_timestamp.secondstimestamp.seconds 系统会解析原始日志中的 time1 值,并使用该值填充 metadata.event_timestamp.secondstimestamp.seconds
tls_profile about.labels.value 原始日志中的 tls_profile 值会分配给 about.labels.value,其中 about.labels.key 为“tls_profile”。
tls_version 未映射 未映射到所提供的 UDM 示例中的 IDM 对象。
user_name principal.user.useridprincipal.user.user_display_name 原始日志中的 user_name 值会根据上下文分配给 principal.user.useridprincipal.user.user_display_name
user_type 未映射 未映射到所提供的 UDM 示例中的 IDM 对象。
(不适用) intermediary.resource.type 始终设置为“ACCESS_POLICY”。
(不适用) metadata.event_type 由解析器逻辑根据 msg_idlog_typeevent_name 和其他字段确定。可以是 NETWORK_CONNECTIONSERVICE_MODIFICATIONNETWORK_SMTPNETWORK_DNSNETWORK_HTTPUSER_LOGINUSER_LOGOUTUSER_RESOURCE_UPDATE_CONTENTRESOURCE_PERMISSIONS_CHANGERESOURCE_CREATIONGENERIC_EVENTSTATUS_UPDATEUSER_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_idevent_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 专业人士那里获得解答。