セキュリティ データにアクセスする

Defender for IoT では、セキュリティ アラート、推奨事項、および未加工のセキュリティ データ (保存することを選択した場合) が Log Analytics ワークスペースに格納されます。

Log Analytics

使用する Log Analytics ワークスペースを構成するには:

  1. IoT ハブを開きます。
  2. [セキュリティ] セクションの下にある [設定] ブレードを選択します。
  3. [データ収集] を選択し、Log Analytics ワークスペースの構成を変更します。

構成後に Log Analytics ワークスペース内でアラートと推奨事項にアクセスするには:

  1. Defender for IoT でアラートまたは推奨事項を選択します。
  2. [Further investigation](さらに調査) を選択し、[To see which devices have this alert click here and view the DeviceId column](このアラートがどのデバイスのものかを確認するには、ここをクリックして DeviceId 列を見てください) を選択します。

Log Analytics からデータのクエリを実行する方法の詳細については、「Azure Monitor でログ クエリの使用を開始する」を参照してください。

セキュリティのアラート

セキュリティ アラートは、Defender for IoT ソリューションに対して構成されている Log Analytics ワークスペース内の AzureSecurityOfThings.SecurityAlert テーブルに格納されます。

セキュリティ アラートの調査を開始するのに役立つ便利なクエリが多数用意されています。

サンプル レコード

レコードをいくつかランダムに選択します

// Select a few random records
//
SecurityAlert
| project
    TimeGenerated,
    IoTHubId=ResourceId,
    DeviceId=tostring(parse_json(ExtendedProperties)["DeviceId"]),
    AlertSeverity,
    DisplayName,
    Description,
    ExtendedProperties
| take 3
TimeGenerated IoTHubId deviceId AlertSeverity DisplayName 説明 ExtendedProperties
2018-11-18T18:10:29 /subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> <device_name> ブルート フォース攻撃が成功しました デバイスに対するブルート フォース攻撃が成功しました { "Full Source Address": "["10.165.12.18:"]", "User Names": "[""]", "DeviceId": "IoT-Device-Linux" }
2018-11-19T12:40:31 /subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> <device_name> デバイスでのローカル ログインの成功 デバイスへのローカル ログインの成功が検出されました { "Remote Address": "?", "Remote Port": "", "Local Port": "", "Login Shell": "/bin/su", "Login Process Id":"28207", "User Name": "attacker", "DeviceId":"IoT-Device-Linux" }
2018-11-19T12:40:31 /subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> <device_name> デバイスへのローカル ログインの試行に失敗しました デバイスにローカル ログインの試行の失敗が検出されました { "Remote Address": "?", "Remote Port": "", "Local Port": "", "Login Shell": "/bin/su", "Login Process Id":"22644", "User Name": "attacker", "DeviceId":"IoT-Device-Linux" }

デバイスの概要

先週検出された個別のセキュリティ アラートの数を取得して、IoT ハブ、デバイス、アラートの重大度、アラートの種類ごとにグループ化します。

// Get the number of distinct security alerts detected in the last week, grouped by
//   IoT hub, device, alert severity, alert type
//
SecurityAlert
| where TimeGenerated > ago(7d)
| summarize Cnt=dcount(SystemAlertId) by
    IoTHubId=ResourceId,
    DeviceId=tostring(parse_json(ExtendedProperties)["DeviceId"]),
    AlertSeverity,
    DisplayName
IoTHubId deviceId AlertSeverity DisplayName Count
/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> <device_name> ブルート フォース攻撃が成功しました 9
/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> <device_name> Medium デバイスへのローカル ログインの試行に失敗しました 242
/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> <device_name> デバイスでのローカル ログインの成功 31
/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> <device_name> Medium 暗号化コイン採掘者 4

IoT ハブの概要

IoT Hub、アラートの重要度、アラートの種類で、先週アラートが発生した個々のデバイスの数を選択します

// Select number of distinct devices which had alerts in the last week, by
//   IoT hub, alert severity, alert type
//
SecurityAlert
| where TimeGenerated > ago(7d)
| extend DeviceId=tostring(parse_json(ExtendedProperties)["DeviceId"])
| summarize CntDevices=dcount(DeviceId) by
    IoTHubId=ResourceId,
    AlertSeverity,
    DisplayName
IoTHubId AlertSeverity DisplayName CntDevices
/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> ブルート フォース攻撃が成功しました 1
/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> Medium デバイスへのローカル ログインの試行に失敗しました 1
/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> デバイスでのローカル ログインの成功 1
/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> Medium 暗号化コイン採掘者 1

セキュリティに関する推奨事項

セキュリティに関する推奨事項は、Defender for IoT ソリューション に対して構成されている Log Analytics ワークスペース内の AzureSecurityOfThings.SecurityRecommendation テーブルに格納されます。

セキュリティに関する推奨事項の調査を開始するのに役立つ便利なクエリが多数用意されています。

サンプル レコード

レコードをいくつかランダムに選択します

// Select a few random records
//
SecurityRecommendation
| project
    TimeGenerated,
    IoTHubId=AssessedResourceId,
    DeviceId,
    RecommendationSeverity,
    RecommendationState,
    RecommendationDisplayName,
    Description,
    RecommendationAdditionalData
| take 2
TimeGenerated IoTHubId deviceId RecommendationSeverity RecommendationState RecommendationDisplayName 説明 RecommendationAdditionalData
2019-03-22T10:21:06.06 /subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> <device_name> Medium アクティブ 入力チェーンで制限の少なすぎるファイアウォール ルールが見つかりました ファイアウォールで、さまざまな IP アドレスまたはポートに対して許容されるパターンを含むルールが見つかりました {"Rules":"[{"SourceAddress":"","SourcePort":"","DestinationAddress":"","DestinationPort":"1337"}]"}
2019-03-22T10:50:27.237 /subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> <device_name> Medium アクティブ 入力チェーンで制限の少なすぎるファイアウォール ルールが見つかりました ファイアウォールで、さまざまな IP アドレスまたはポートに対して許容されるパターンを含むルールが見つかりました {"Rules":"[{"SourceAddress":"","SourcePort":"","DestinationAddress":"","DestinationPort":"1337"}]"}

デバイスの概要

個別のアクティブなセキュリティに関する推奨事項の数を取得して、IoT Hub、デバイス、推奨事項の重大度、および種類ごとにグループ化します。

// Get the number of distinct active security recommendations, grouped by
//   IoT hub, device, recommendation severity and type
//
SecurityRecommendation
| extend IoTHubId=AssessedResourceId
| summarize CurrentState=arg_max(RecommendationState, DiscoveredTimeUTC) by IoTHubId, DeviceId, RecommendationSeverity, RecommendationDisplayName
| where CurrentState == "Active"
| summarize Cnt=count() by IoTHubId, DeviceId, RecommendationSeverity
IoTHubId deviceId RecommendationSeverity Count
/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> <device_name> 2
/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> <device_name> Medium 1
/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> <device_name> 1
/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> <device_name> Medium 4

次のステップ