收集 Microsoft Defender for IoT (CyberX) 日志

支持的平台:

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

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

准备工作

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

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

获取 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
    
  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 /etc/bindplane-agent/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:
            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:
    
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - udplog
                exporters:
                    - chronicle/chronicle_w_labels
    

配置参数

  • 替换以下占位符:

    • 接收器配置

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

      • creds_file_path:提取身份验证文件的完整路径:
        • Linux/etc/bindplane-agent/ingestion-auth.json
        • WindowsC:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
      • YOUR_CUSTOMER_ID:从“获取客户 ID”部分获取的客户 ID
      • endpoint:区域端点网址:
        • 美国malachiteingestion-pa.googleapis.com
        • 欧洲europe-malachiteingestion-pa.googleapis.com
        • 亚洲asia-southeast1-malachiteingestion-pa.googleapis.com
        • 如需查看完整列表,请参阅区域级端点
      • log_type:日志类型,与在 Chronicle 中显示的完全一致 (CYBERX)

保存配置文件

  • 修改后,保存文件:
    • Linux:依次按 Ctrl+OEnterCtrl+X
    • Windows:依次点击文件 > 保存

重启 Bindplane 代理以应用更改

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

    sudo systemctl restart observiq-otel-collector
    
    1. 验证服务是否正在运行:

        sudo systemctl status observiq-otel-collector
      
    2. 检查日志是否存在错误:

        sudo journalctl -u observiq-otel-collector -f
      
  • 如需在 Windows 中重启 Bindplane 代理,请选择以下选项之一:

    • 以管理员身份运行命令提示符或 PowerShell:

      net stop observiq-otel-collector && net start observiq-otel-collector
      
    • 服务控制台:

      1. Win+R,输入 services.msc,然后按 Enter 键。
      2. 找到 observIQ OpenTelemetry 收集器
      3. 右键点击并选择重新启动

      4. 验证服务是否正在运行:

        sc query observiq-otel-collector
        
      5. 检查日志是否存在错误:

        type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
        

在 Microsoft Defender for IoT (CyberX) 上配置 Syslog 转发

  1. 登录 Microsoft Defender for IoT 传感器控制台(以前称为 CyberX)。
  2. 依次前往系统设置 > 转接
  3. 点击添加(或 +)以创建新的转发规则。
  4. 提供以下配置详细信息:
    • 规则名称:输入一个描述性名称(例如 Google-SecOps-Bindplane)。
    • 严重程度:选择全部(或选择特定严重程度:次要、严重、严重)。
    • 协议:选择全部(或选择要监控的特定协议)。
    • 引擎:选择全部(或选择特定的检测引擎)。
    • 操作:选择发送 Syslog
  5. Syslog 服务器配置中:
    • Host:输入 Bindplane 代理主机 IP 地址。
    • 端口:输入 514
    • 协议:选择 UDP
    • 格式:选择 CEF(通用事件格式)。
    • 时区:选择 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”。如果操作为“超时”,则映射为“失败”。否则,映射到“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 如果 Message 为空,则说明的值
目的地 target.ip、target.asset.ip 或 target.hostname 如果目的地是 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 的值
dstcountry 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 值
处理 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”或 proto 为“1”或服务包含“ICMP”,则映射为“ICMP”。
协议 network.application_protocol 从 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 或日期和时间字段派生。

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