EXPLORE
← Back to Explore
kqlHunting

Visualize Malware Detection Reasons

This query visualizes the malware detection reasons in a piechart. This is based on the EmailPostDeliveryEvents table. This table in the advanced hunting schema contains information about post-delivery actions taken on email messages processed by Microsoft 365. Based on this information the differnt detection reasons are visualized.

Detection Query

EmailPostDeliveryEvents
| where ThreatTypes == "Malware"
| extend DetectionMethod = tostring(extract(@'Malware":\["(.*?)"]', 1, DetectionMethods))
| summarize TotalEvents = count() by DetectionMethod
| render piechart with(title="Malware Detection Reason Overview")

Platforms

azure-sentinelmicrosoft-defender

Tags

office-365huntingdetection
Raw Content
# Visualize Malware Detection Reasons

## Query Information

#### Description
This query visualizes the malware detection reasons in a piechart. This is based on the EmailPostDeliveryEvents table. This table in the advanced hunting schema contains information about post-delivery actions taken on email messages processed by Microsoft 365. Based on this information the differnt detection reasons are visualized.

#### References
- https://learn.microsoft.com/en-us/microsoft-365/security/defender/advanced-hunting-emailpostdeliveryevents-table?view=o365-worldwide

## Defender XDR
```KQL
EmailPostDeliveryEvents
| where ThreatTypes == "Malware"
| extend DetectionMethod = tostring(extract(@'Malware":\["(.*?)"]', 1, DetectionMethods))
| summarize TotalEvents = count() by DetectionMethod
| render piechart with(title="Malware Detection Reason Overview")
```
## Sentinel
```KQL
EmailPostDeliveryEvents
| where ThreatTypes == "Malware"
| extend DetectionMethod = tostring(extract(@'Malware":\["(.*?)"]', 1, DetectionMethods))
| summarize TotalEvents = count() by DetectionMethod
| render piechart with(title="Malware Detection Reason Overview")
```