Defender for IoT 将安全警报、建议和原始安全数据(如果选择将其保存)存储在 Log Analytics 工作区中。
日志分析
配置使用哪个 Log Analytics 工作区:
- 打开 IoT 中心。
- 选择“安全”部分下的“设置”边栏选项卡。
- 选择 “数据收集”,并更改 Log Analytics 工作区配置。
在配置后访问 Log Analytics 工作区中的警报和建议:
- 在 Defender for IoT 中选择警报或建议。
- 选择 进一步调查,然后选择 点击此处查看哪些设备有此警报,并查看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 | 显示名称 | DESCRIPTION | 扩展属性 |
---|---|---|---|---|---|---|
2018-11-18T18:10:29.000 | /subscriptions/subscription_id/<resourceGroups/<resource_group/providers/Microsoft.Devices>/IotHubs/<>iot_hub> | <设备名称> | 高 | 暴力攻击成功 | 对设备的暴力破解攻击成功 | { “完整源地址”: “[”10.165.12.18:“]”, “用户名”: “[”]“, ”DeviceId“: ”IoT-Device-Linux“ } |
2018-11-19T12:40:31.000 | /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.000 | /subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> | <设备名称> | 高 | 设备上的本地登录尝试失败 | 检测到对设备的本地登录尝试失败 | { “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 | 显示名称 | 计数 |
---|---|---|---|---|
/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> | <设备名称> | 高 | 暴力攻击成功 | 9 |
/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> | <device_name> | 中等 | 设备上的本地登录尝试失败 | 242 |
/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Devices/IotHubs/<iot_hub> | <设备名称> | 高 | 设备上的本地登录成功 | 31 |
/subscriptions/subscription_id/<resourceGroups/<resource_group/providers/Microsoft.Devices>/IotHubs/<>iot_hub> | <device_name> | 中等 | 加密硬币矿工 | 4 |
IoT 中心摘要
按 IoT 中心、警报严重性、警报类型选择上周出现警报的不同设备
// 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 | 显示名称 | 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> | 中等 | 设备上的本地登录尝试失败 | 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> | 中等 | 加密硬币矿工 | 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 | 推荐严重性 | 推荐状态 | 推荐显示名称 | DESCRIPTION | 推荐附加数据 |
---|---|---|---|---|---|---|---|
2019-03-22T10:21:06.060 | /subscriptions/subscription_id/<resourceGroups/<resource_group/providers/Microsoft.Devices>/IotHubs/<>iot_hub> | <设备名称> | 中等 | 活跃 | 在输入链中发现了允许性的防火墙规则 | 发现防火墙中的规则包含适用于各种 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> | 中等 | 活跃 | 在输入链中发现了允许性的防火墙规则 | 发现防火墙中的规则包含适用于各种 IP 地址或端口的宽松模式 | {“Rules”:“[{”SourceAddress“:”“,”SourcePort“:”“,”DestinationAddress“:”“,”DestinationPort“:”1337“}]”} |
设备摘要
获取按 IoT 中心、设备、建议严重性和类型分组的不同活动安全建议的数量。
// 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 | 推荐严重性 | 计数 |
---|---|---|---|
/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> | <设备名称> | 中等 | 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> | <设备名称> | 中等 | 4 |
后续步骤
- 阅读 Defender for IoT 概述
- 了解 Defender for IoT 什么是适用于设备生成器的基于代理的解决方案
- 了解和研究 Defender for IoT 警报
- 了解和探索 Defender for IoT 建议