Top Spoof external domain detections by Sender domain (P1/P2)
Description
This query visualises total emails with Phish-Spoof-external domain detections summarizing the data by the top 10 email sender P2 domain (SenderFromDomain) and sender P1 domain (SenderMailFromDomain).
Query · kql
EmailEvents
| where EmailDirection == "Inbound"
| summarize TotalEmailCount = count(),
SpoofExternalCount = countif(DetectionMethods has_any ('Phish":["Spoof external domain"]')) by P1Sender=SenderMailFromDomain, P2Sender=SenderFromDomain
| extend SpoofExternal_Traffic_Percentage = todouble(round(SpoofExternalCount / todouble(TotalEmailCount) * 100, 2))
| where SpoofExternalCount !=0
| sort by SpoofExternalCount desc
| project P1Sender,P2Sender,SpoofExternalCount,TotalEmailCount,SpoofExternal_Traffic_Percentage
| top 10 by SpoofExternalCount