Top Spoof intra-org detections by Sender domain (P1/P2)


Description

This query visualises total emails with Phish-Spoof-internal domain detections summarizing the data by the top 10 email sender P2 domain (SenderFromDomain) and sender P1 domain (SenderMailFromDomain).

Query · kql

EmailEvents
| where Timestamp > ago(30d)
| extend Key = strcat(NetworkMessageId, '-', RecipientEmailAddress)
| summarize arg_max(Timestamp, *) by Key
| where EmailDirection == "Inbound"
| summarize TotalEmailCount = count(),
            SpoofInternalCount = countif(set_has_element(parse_json(DetectionMethods).Phish, "Spoof intra-org")) by P1Sender=SenderMailFromDomain, P2Sender=SenderFromDomain
| extend SpoofInternal_Traffic_Percentage = todouble(round(SpoofInternalCount / todouble(TotalEmailCount) * 100, 2))
| where SpoofInternalCount != 0
| top 10 by SpoofInternalCount
| project P1Sender, P2Sender, SpoofInternalCount, TotalEmailCount, SpoofInternal_Traffic_Percentage
Raw source Top Spoof intra-org detections by Sender domain (P1/P2) · KQL
Esc
Published by Azure/Azure-Sentinel ↗, licensed under MIT ↗. Reproduced here unmodified.
id: 11c4556a-0d77-47ba-9564-0818065c270d
name: Top Spoof intra-org detections by Sender domain (P1/P2)
description: |
  This query visualises total emails with Phish-Spoof-internal domain detections summarizing the data by the top 10 email sender P2 domain (SenderFromDomain) and sender P1 domain (SenderMailFromDomain).
description-detailed: |
  This query visualises total emails with Phish-Spoof-internal domain detections summarizing the data by the top 10 email sender P2 domain (SenderFromDomain) and sender P1 domain (SenderMailFromDomain). Adding additional insights for total inbound emails and Spoof internal domain detection traffic percentage for each sender domain.
  Query is also included as part of the Defender for Office 365 solution in Sentinel: https://techcommunity.microsoft.com/blog/microsoftdefenderforoffice365blog/part-2-build-custom-email-security-reports-and-dashboards-with-workbooks-in-micr/4411303
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - EmailEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  EmailEvents
  | where Timestamp > ago(30d)
  | extend Key = strcat(NetworkMessageId, '-', RecipientEmailAddress)
  | summarize arg_max(Timestamp, *) by Key
  | where EmailDirection == "Inbound"
  | summarize TotalEmailCount = count(),
              SpoofInternalCount = countif(set_has_element(parse_json(DetectionMethods).Phish, "Spoof intra-org")) by P1Sender=SenderMailFromDomain, P2Sender=SenderFromDomain
  | extend SpoofInternal_Traffic_Percentage = todouble(round(SpoofInternalCount / todouble(TotalEmailCount) * 100, 2))
  | where SpoofInternalCount != 0
  | top 10 by SpoofInternalCount
  | project P1Sender, P2Sender, SpoofInternalCount, TotalEmailCount, SpoofInternal_Traffic_Percentage
version: 1.1.0

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.