使用 Azure 監視器活頁簿將適用於 IoT 的 Microsoft Defender 資料視覺化

Azure 監視器活頁簿提供圖形、圖表和儀表板,以視覺化方式反映儲存在 Azure Resource Graph 訂用帳戶中的資料,並可直接在適用於 IoT 的 Microsoft Defender 中使用。

在 Azure 入口網站中,使用適用於 IoT 的 Defender [活頁簿] 頁面來檢視 Microsoft 所建立並提供的現成可用活頁簿,或由客戶建立並跨社群共用的活頁簿。

每個活頁簿圖形或圖表都是以對資料執行的 Azure Resource Graph (ARG) 查詢為基礎。 在適用於 IoT 的 Defender 中,您可以使用 ARG 查詢來:

  • 收集感應器狀態
  • 識別網路中的新裝置
  • 尋找與特定 IP 位址相關的警示
  • 了解每個感應器看到哪些警示

檢視活頁簿

若要檢視 Microsoft 所建立的現成可用活頁簿,或其他已儲存至您的訂用帳戶的活頁簿:

  1. 在 Azure 入口網站中,移至 [適用於 IoT 的 Defender],然後選取左側的 [活頁簿]

    Screenshot of the Workbooks page.

  2. 視需要修改您的篩選選項,然後選取活頁簿加以開啟。

適用於 IoT 的 Defender 提供下列現成可用活頁簿:

  • 感應器健康情況。 顯示感應器健康情況的相關資料,例如感應器上安裝的感應器主控台軟體版本。
  • 警示。 顯示感應器上發生的警示相關資料,包括依感應器的警示、警示類型、最近產生的警示等等。
  • 裝置。 顯示裝置清查的相關資料,包括依廠商、子類型的裝置和發現的新裝置。
  • 弱點。 顯示您網路上的 OT 裝置中偵測到之弱點的相關資料。 在 [裝置弱點]、[易受攻擊的裝置] 或 [易受攻擊的元件] 資料表中選取項目,以檢視右側資料表中的相關資訊。

建立自訂活頁簿

使用適用於 IoT 的 Defender [活頁簿] 頁面,直接在適用於 IoT 的 Defender 中建立自訂 Azure 監視器活頁簿。

  1. 在 [活頁簿] 頁面上,選取 [新增],或從其他範本開始,開啟範本活頁簿,然後選取 [編輯]

  2. 在新的活頁簿中,選取 [新增],然後選取您要新增至活頁簿的選項。 如果您要編輯現有的活頁簿或範本,請選取右側的選項 (...) 按鈕,以存取 [新增] 功能表。

    您可以將下列任何元素新增至活頁簿:

    選項 描述
    Text 新增文字來描述活頁簿上顯示的圖形,或所需的任何其他動作。
    參數 定義要在活頁簿文字和查詢中使用的參數。
    連結/索引標籤 將瀏覽元素新增至您的活頁簿,包括清單、其他目標的連結、額外的索引標籤或工具列。
    查詢 新增建立您的活頁簿圖形和圖表時要使用的查詢。

    - 請務必選取 Azure Resource Graph 作為資料來源,然後選取所有相關的訂用帳戶。
    - 從 [視覺效果] 選項中選取類型,以新增資料的圖形表示。
    計量 新增建立活頁簿圖形和圖表時要使用的計量。
    群組 新增群組以將您的活頁簿組織成子區域。

    針對每個選項,定義所有可用的設定之後,選取 [新增...] 或 [執行...] 按鈕以建立該活頁簿元素。 例如,[新增參數] 或 [執行查詢]

    提示

    您可以在 Azure Resource Graph Explorer 中建置查詢,並將其複製到活頁簿查詢中。

  3. 在工具列中,選取 [儲存] 或 [另存新檔] 以儲存活頁簿,然後選取 [完成編輯]

  4. 選取 [活頁簿] 以返回包含完整活頁簿清單的主活頁簿頁面。

在查詢中參考參數

建立參數之後,請使用下列語法在查詢中參考參數:{ParameterName}。 例如:

iotsecurityresources
| where type == "microsoft.iotsecurity/sensors"
| extend Name=name
| extend Status= properties.sensorStatus
| where Name=={SensorName}
| project Name,Status

範例查詢

本節提供適用於 IoT 的 Defender 活頁簿中常用的範例查詢。

警示查詢

跨感應器散發警示

iotsecurityresources
| where type == "microsoft.iotsecurity/locations/devicegroups/alerts"
| extend Sensor=properties.extendedProperties.SensorId
| where properties.status!='Closed'
| summarize Alerts=count() by tostring(Sensor)
| sort by Alerts desc

過去 24 小時內的新警示

iotsecurityresources
| where type == "microsoft.iotsecurity/locations/devicegroups/alerts"
| where properties.status!='Closed'
| extend AlertTime=properties.startTimeUtc
| extend Type=properties.displayName
| where AlertTime > ago(1d)
| project AlertTime, Type

依來源 IP 位址的警示

iotsecurityresources
| where type == "microsoft.iotsecurity/locations/devicegroups/alerts"
| extend Type=properties.displayName
| extend Source_IP=properties.extendedProperties.SourceDeviceAddress
| extend Destination_IP=properties.extendedProperties.DestinationDeviceAddress
| where Source_IP=='192.168.10.1'
| project Source_IP, Destination_IP, Type

裝置查詢

依廠商的 OT 裝置清查

iotsecurityresources
| extend Vendor= properties.hardware.vendor
| where properties.deviceDataSource=='OtSensor'
| summarize Devices=count() by tostring(Vendor)
| sort by Devices

依子類型的 OT 裝置清查,例如,PLC、內嵌裝置、UPS 等等

iotsecurityresources
| where type == "microsoft.iotsecurity/locations/devicegroups/devices"
| extend SubType=properties.deviceSubTypeDisplayName
| summarize Devices=count() by tostring(SubType)
| sort by Devices

依感應器、網站和 IPv4 位址的新 OT 裝置

iotsecurityresources
| where type == "microsoft.iotsecurity/locations/devicegroups/devices"
| extend TimeFirstSeen=properties.firstSeen
| where TimeFirstSeen > ago(1d)
| extend DeviceName=properties.deviceName
| extend Site=properties.sensor.site
| extend Sensor=properties.sensor.name
| extend IPv4=properties.nics.[0].ipv4Address
| where properties.deviceDataSource=='OtSensor'
| project TimeFirstSeen, Site, Sensor, DeviceName, IPv4

依 Purdue 層級摘要警示

iotsecurityresources
    | where type == "microsoft.iotsecurity/locations/devicegroups/alerts"
    | project 
        resourceId = id,
        affectedResource = tostring(properties.extendedProperties.DeviceResourceIds),
        id = properties.systemAlertId
    | join kind=leftouter (
        iotsecurityresources | where type == "microsoft.iotsecurity/locations/devicegroups/devices" 
        | project 
            sensor = properties.sensor.name,
            zone = properties.sensor.zone,
            site = properties.sensor.site,
            deviceProperties=properties,
            affectedResource = tostring(id)
    ) on affectedResource
    | project-away affectedResource1
    | where deviceProperties.deviceDataSource == 'OtSensor'
    | summarize Alerts=count() by tostring(deviceProperties.purdueLevel)

下一步

深入了解檢視關於感應器主控台的儀表板和報表:

深入了解 Azure 監視器活頁簿和 Azure Resource Graph: