收集 Microsoft Defender for IoT (CyberX) 日志

支持的语言:

本文档介绍了如何使用 Bindplane 将 Microsoft Defender for IoT (CyberX) 日志注入 Google Security Operations。

Microsoft Defender for IoT(前身为 CyberX)是一个无代理 IoT/OT 安全平台,可为工业控制系统 (ICS) 和运营技术 (OT) 环境提供资产发现、漏洞管理和持续威胁监控。它可检测 IoT/运营技术网络中的异常行为和已知威胁,而不会影响运营流程。该解析器会从 CyberX syslog 和键值对格式的日志中提取字段。它使用 grok 和/或 kv 来解析日志消息,然后将这些值映射到统一数据模型 (UDM)。它还会为事件来源和类型设置默认元数据值。

准备工作

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

  • Google SecOps 实例
  • Windows Server 2016 或更高版本,或者具有 systemd 的 Linux 主机
  • 如果通过代理运行,请确保防火墙端口根据 Bindplane 代理要求处于开放状态
  • 对 Microsoft Defender for IoT 传感器控制台的特权访问权限

获取 Bindplane 代理的 Google SecOps 凭据

如需向 Google SecOps 验证 Bindplane 代理,请选择以下方法之一:

  • 新部署:使用 Chronicle API(选项 1)。
  • 旧版部署:继续使用提取身份验证文件(方法 2),直到提取 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
    

该服务应显示为 RUNNING。

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
    

该服务应显示为有效(正在运行)。

其他安装资源

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

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

找到配置文件

  • Linux:

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

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

修改配置文件

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

    receivers:
      udplog:
        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
        creds_file_path: '/path/to/ingestion-authentication-file.json'
        customer_id: 'YOUR_CUSTOMER_ID'
        endpoint: chronicle.googleapis.com
        log_type: 'CYBERX'
        raw_log_field: body
        ingestion_labels:
    
    service:
      pipelines:
        logs/source0__chronicle_w_labels-0:
          receivers:
            - udplog
          exporters:
            - chronicle/chronicle_w_labels
    

配置参数

替换以下占位符:

  • 接收器配置:

    • udplog:对于 UDP syslog,请使用 udplog;对于 TCP syslog,请使用 tcplog
    • 0.0.0.0:要监听的 IP 地址(0.0.0.0 表示监听所有接口)
    • 514:要监听的端口号(标准 syslog 端口)
  • 导出器配置:

    • creds_file_path:服务账号 JSON 密钥文件的完整路径(选项 1):
      • Linux:/opt/observiq-otel-collector/ingestion-auth.json
      • Windows:C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
    • YOUR_CUSTOMER_ID:“获取客户 ID”部分中的客户 ID
    • location:将 <LOCATION> 替换为 Google SecOps 实例的区域(例如 us、europe 或 asia-southeast1)。导出器会使用此值作为 chronicle.googleapis.com 的前缀。如需查看完整列表,请参阅区域级端点。
    • project:将 <PROJECT_NUMBER> 替换为“IAM 和管理”>“设置”中的项目编号。
    • endpoint:保持设置为 chronicle.googleapis.com。
    • log_type:日志类型,与 Google SecOps (CYBERX) 中显示的完全一致

旧版提取 API

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

    exporters:
      chronicle/chronicle_w_labels:
        compression: gzip
        creds_file_path: '/path/to/ingestion-authentication-file.json'
        customer_id: 'YOUR_CUSTOMER_ID'
        endpoint: malachiteingestion-pa.googleapis.com
        log_type: 'CYBERX'
        raw_log_field: body
        ingestion_labels:
    

保存配置文件

  • 修改后,保存文件:
    • 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"
    

在 Microsoft Defender for IoT 上配置 syslog 转发

  1. 以管理员用户身份登录 Microsoft Defender for IoT OT 传感器控制台。
  2. 在左侧菜单中选择转发。
  3. 点击 + 创建新规则。
  4. 在添加转发规则窗格中,提供以下详细信息:
    • 规则名称:输入描述性名称(例如 Google-SecOps-Bindplane)。
    • 最低提醒级别:选择次要可转发所有严重级别,或选择更高级别进行过滤。
    • 检测到的任何协议:开启此开关可转发来自所有协议流量的提醒;关闭此开关并选择特定协议可转发来自特定协议流量的提醒。
    • 任何引擎检测到的流量:开启此开关可转发来自所有检测引擎的提醒;关闭此开关并选择特定引擎可仅转发来自这些引擎的提醒。
  5. 在操作区域中,配置 syslog 服务器:

    • 服务器:选择 SYSLOG 服务器(CEF 格式)。
    • 主机:输入 Bindplane 代理主机的 IP 地址。
    • 端口:输入 514。
    • 时区:选择 UTC(推荐)。
  6. 点击保存。相应规则会列在转发页面上。

  7. 选择相应规则的选项菜单 (…),然后点击发送测试消息,验证该规则。

  8. 检查 Bindplane 代理日志,确认是否正在接收 syslog 消息。

UDM 映射表

日志字段 UDM 映射 逻辑
访问掩码 security_result.detection_fields.value 从已解析的 access_request_kvdata 中获取 access_mask 的值
账号网域 principal.administrative_domain 解析后的 principal_kvdata 中的 principal_domain 值
账号网域 target.administrative_domain 来自已解析 target_kvdata 的 target_domain 值
账号名称 principal.user.userid 从解析的 principal_kvdata 中提取的 principal_account_name 的值
账号名称 target.user.userid 从解析后的 target_kvdata 中提取的 target_account_name 值
操作 security_result.action_details 操作价值
操作 security_result.action 派生。如果操作是“accept”“passthrough”“pass”“permit”“detected”或“close”,则映射为“ALLOW”。如果操作为“拒绝”“丢弃”或“阻止”,则映射为“BLOCK”。如果操作为“timeout”,则映射到“FAIL”。否则,映射到“UNKNOWN_ACTION”。
算法名称 security_result.detection_fields.value 已解析的 cryptographic_kvdata 中的 algorithm_name 值
应用 target.application 如果 app_protocol_output 为空,则服务的值
appcat security_result.detection_fields.value appcat 的值
应用名称 principal.application application_name 的值
身份验证软件包 security_result.about.resource.name authentication_package 的值
Azure Defender for IoT 提醒 security_result.detection_fields.value azure_defender_for_iot_alert 的值
频道 security_result.detection_fields.value 渠道价值
客户端地址 principal.ip、principal.asset.ip source_ip 的值
客户端端口 principal.port source_port 的值
craction security_result.detection_fields.value craction 的值
已备份凭据管理器凭据 security_result.description 说明的值
已读取 Credential Manager 的凭据。 security_result.description 说明的值
crscore security_result.severity_details crscore 的值
crlevel security_result.severity、security_result.severity_details crlevel 的值。如果 crlevel 为“HIGH”“MEDIUM”“LOW”或“CRITICAL”,则映射到相应的 UDM 严重级别。
加密操作 metadata.description product_desc 的值
CyberX 平台名称 security_result.detection_fields.value cyberx_platform_name 的值
说明 security_result.description 如果消息为空,则为说明的值
目的地 target.ip、target.asset.ip 或 target.hostname 如果 Destination 是 IP 地址,则映射到 target.ip 和 target.asset.ip。否则,映射到 target.hostname。
目的地地址 target.ip、target.asset.ip 来自已解析 network_information 的 destination_ip 的值
目标 DRA target.resource.name destination_dra 的值
目标 IP target.ip、target.asset.ip destination_ip 的值
目标端口 target.port 来自已解析 network_information 的 destination_port 的值
devid principal.resource.product_object_id devid 的值
devname principal.resource.name devname 的值
方向 network.direction 如果 Direction 为“incoming”“inbound”或“response”,则映射到“INBOUND”。如果 Direction 为“outgoing”“outbound”或“request”,则映射为“OUTBOUND”。
dstip target.ip、target.asset.ip 如果 destination_ip 为空,则 dstip 的值
dst 国家/地区 target.location.country_or_region dstcountry 的值
dstintf security_result.detection_fields.value dstintf 的值
dstintfrole security_result.detection_fields.value dstintfrole 的值
dstosname target.platform 如果 dstosname 为“WINDOWS”“LINUX”或“MAC”,则为该值。
dstport target.port 如果 destination_port 为空,则 dstport 的值
dstswversion target.platform_version dstswversion 的值
时长 network.session_duration.seconds 时长值
event_id security_result.rule_name 用于将规则名称构造为“EventID: %{event_id}”
event_in_sequence security_result.detection_fields.value event_in_sequence 的值
过滤运行时 ID security_result.detection_fields.value 解析后的 filter_information 中的 filter_run_time_id 值
群组成员资格 security_result.detection_fields.value 如果 event_id 不是 4627,则为 group_membership 的值
群组成员资格 target.user.group_identifiers 如果 event_id 为 4627,则为解析后的 group_membership 中的值
handle_id security_result.detection_fields.value 来自已解析 object_kvdata 的 handle_id 的值
Handle ID security_result.detection_fields.value 来自已解析 object_kvdata 的 handle_id 的值
impersonation_level security_result.detection_fields.value 从已解析的 logon_information_kvdata 中获取的 impersonation_level 值
密钥长度 security_result.detection_fields.value 来自已解析 auth_kvdata 的 key_length 值
键名 security_result.detection_fields.value 解析后的 cryptographic_kvdata 中的 key_name 值
密钥类型 security_result.detection_fields.value 从解析的 cryptographic_kvdata 中获取的 key_type 值
关键字 security_result.detection_fields.value 关键字价值
图层名称 security_result.detection_fields.value 解析后的 filter_information 中的 layer_name 值
图层运行时 ID security_result.detection_fields.value 解析后的 filter_information 中的 layer_run_time_id 值
logid metadata.product_log_id logid 的值
登录 GUID principal.resource.product_object_id logon_guid 的值
登录 ID security_result.detection_fields.value logon_id 的值
logon_type event.idm.read_only_udm.extensions.auth.mechanism 派生。如果 logon_type 为“3”,则映射到“NETWORK”。如果为“4”,则映射到“BATCH”。如果为“5”,则映射到“SERVICE”。如果为“8”,则映射到“NETWORK_CLEAR_TEXT”。如果为“9”,则映射到“NEW_CREDENTIALS”。如果为“10”,则映射到“REMOTE_INTERACTIVE”。如果为“11”,则映射到“CACHED_INTERACTIVE”。否则,如果不为空,则映射到“MECHANISM_OTHER”。
登录账号 security_result.detection_fields.value 来自 grok 解析的 logon_id 的值
登录流程 security_result.detection_fields.value 解析后的 auth_kvdata 中的 logon_process 值
强制性标签 security_result.detection_fields.value mandatory_label 的值
mastersrcmac principal.mac mastersrcmac 的值
消息 security_result.description 消息的值
new_process_id target.process.pid 解析后的 process_kvdata 中的 new_process_id 值
new_process_name target.process.file.full_path 解析后的 process_kvdata 中 new_process_name 的值
对象名称 security_result.detection_fields.value 解析后的 object_kvdata 中的 object_name 值
对象服务器 security_result.detection_fields.value 来自已解析 object_kvdata 的 object_server 的值
对象类型 security_result.detection_fields.value 来自已解析 object_kvdata 的 object_type 的值
osname principal.platform osname 的值(如果为“WINDOWS”“LINUX”或“MAC”)。
软件包名称(仅限 NTLM) security_result.detection_fields.value 解析后的 auth_kvdata 中的 package_name 值
policyid security_result.rule_id policyid 的值
policyname security_result.rule_name policyname 的值
policytype security_result.rule_type policytype 的值
进程 ID principal.process.pid process_id 的值
进程名称 principal.process.file.full_path 来自已解析的 process_kvdata 的 creator_process_name 的值
profile_changed security_result.detection_fields.value profile_changed 的值
个人资料已更改 security_result.detection_fields.value grok 解析中的 profile_changed 值
proto network.ip_protocol 如果 proto 为“17”,则映射为“UDP”。如果为“6”或子类型为“wad”,则映射到“TCP”。如果为“41”,则映射为“IP6IN4”。如果服务为“PING”,或协议为“1”,或服务包含“ICMP”,则映射到“ICMP”。
协议 network.application_protocol 从协议派生的 app_protocol_output 值
提供方名称 security_result.detection_fields.value 从解析后的 provider_kvdata 或 cryptographic_kvdata 中获取的 provider_name 值
rcvdbyte network.received_bytes rcvdbyte 的值
rcvdpkt security_result.detection_fields.value rcvdpkt 的值
restricted_admin_mode security_result.detection_fields.value 解析后的 logon_information_kvdata 中的 restricted_admin_mode 值
返回代码 security_result.detection_fields.value 解析后的 cryptographic_kvdata 中的 return_code 值
Response security_result.detection_fields.value 回答的价值
rule_id security_result.rule_id rule_id 的值
安全 ID principal.user.windows_sid 来自已解析的 principal_kvdata 的 principal_security_id 值
安全 ID target.user.windows_sid 解析后的 target_kvdata 中的 target_security_id 值
sentbyte network.sent_bytes sentbyte 的值
sentpkt security_result.detection_fields.value sentpkt 的值
服务 network.application_protocol 或 target.application app_protocol_output 的值派生自服务。如果 app_protocol_output 为空,则映射到 target.application。
服务 ID security_result.detection_fields.value 已解析的 service_kvdata 中的 service_id 值
服务名称 security_result.detection_fields.value 解析后的 service_kvdata 中的 service_name 值
sessionid network.session_id sessionid 的值
严重级别 security_result.severity、security_result.severity_details 如果严重级别为“ERROR”或“CRITICAL”,则映射到相应的 UDM 严重级别。如果为“INFO”,则映射为“INFORMATIONAL”。如果是“MINOR”,则映射到“LOW”。如果为“WARNING”,则映射为“MEDIUM”。如果为“MAJOR”,则映射到“HIGH”。还将原始值映射到 severity_details。
和程度上减少 security_result.severity, security_result.severity_details 如果严重级别为“1”“2”或“3”,则映射到“LOW”。如果为“4”“5”或“6”,则映射为“中”。如果为“7”“8”或“9”,则映射到“HIGH”。同时将原始值映射到 severity_details。
共享名称 security_result.detection_fields.value 从解析的 share_information_kvdata 中获取的 share_name 值
分享路径 security_result.detection_fields.value 从已解析的 share_information_kvdata 中获取 share_path 的值
来源 principal.ip、principal.asset.ip 或 principal.hostname、principal.asset.hostname 如果来源是 IP 地址,则映射到 principal.ip 和 principal.asset.ip。否则,请映射到 principal.hostname 和 principal.asset.hostname。
源地址 principal.ip、principal.asset.ip 解析后的 network_information 中 source_ip 的值
源 DRA principal.resource.name source_dra 的值
来源 IP principal.ip source_ip 的值
来源网络地址 principal.ip、principal.asset.ip source_ip 的值
来源端口 principal.port 来自已解析 network_information 的 source_port 的值
来源工作站 workstation_name source_workstation_name 的值
srcip source_ip 如果 source_ip 为空,则为 srcip 的值
srccountry principal.location.country_or_region srccountry 的值
srcmac principal.mac srcmac 的值
srcname principal.hostname、principal.asset.hostname srcname 的值
srcport source_port 如果 source_port 为空,则为 srcport 的值
srcswversion principal.platform_version srcswversion 的值
状态代码 network.http.response_code status_code 的值
令牌提升类型 security_result.detection_fields.value token_elevation_type 的值
transited_services security_result.detection_fields.value 来自已解析 auth_kvdata 的 transited_services 的值
transip principal.nat_ip transip 的价值
transport principal.nat_port 交通运输价值
类型 metadata.product_event_type 与子类型搭配使用,以创建 metadata.product_event_type
类型 security_result.detection_fields.value 类型的值
UUID metadata.product_log_id UUID 的值
vd principal.administrative_domain vd 的值
virtual_account security_result.detection_fields.value 根据已解析的 logon_information_kvdata 得出的 virtual_account 值
工作站名称 principal.hostname、principal.asset.hostname 如果不存在其他主账号标识符,则 workstation_name 的值
metadata.event_type metadata.event_type 派生。如果 principal_present 和 target_present 均为 true,则映射到“NETWORK_CONNECTION”。如果 user_present 为 true,则映射到“USER_RESOURCE_ACCESS”。如果 principal_present 为 true,则映射到“STATUS_UPDATE”。否则,映射到“GENERIC_EVENT”。
metadata.log_type metadata.log_type 硬编码为“CYBERX”
metadata.product_name metadata.product_name 硬编码为“CYBERX”
metadata.vendor_name metadata.vendor_name 硬编码为“CYBERX”
metadata.event_timestamp metadata.event_timestamp 从顶级时间戳字段复制,或从 eventtime 或 date 和 time 字段派生。
intermediary_hostname event.idm.read_only_udm.intermediary.hostname 从更新日志映射
type event.idm.read_only_udm.security_result.detection_fields 从更新日志映射
protocol event.idm.read_only_udm.network.application_protocol 从更新日志映射
UUID event.idm.read_only_udm.metadata.product_log_id 从更新日志映射
product_version_x metadata.product_version 从更新日志映射
pro_event_type metadata.product_event_type 从更新日志映射
title security_result.description 从更新日志映射
msg metadata.description 从更新日志映射
client_ip principal.ip 从更新日志映射
src_ip principal.ip 从更新日志映射
dst_ip target.ip 从更新日志映射
src_mac principal.mac 从更新日志映射
timestamp" and "ts metadata.event_timestamp 从更新日志映射
source_ip2 principal.ip 从更新日志映射
destination_ip2 target.ip 从更新日志映射

更新日志

查看相应解析器的更新日志

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