First-Contact External Teams Senders


Description

This query lists external Microsoft Teams senders by the date they were first seen, surfacing recent first-contact senders.

Query · kql

//This query lists external Microsoft Teams senders by the date they were first seen over the last 30 days, surfacing recent first-contact senders.
MessageEvents
| where Timestamp > ago(30d)
| summarize FirstTimestamp = min(Timestamp), arg_max(Timestamp, *) by TeamsMessageId
| where IsOwnedThread == 0 and IsExternalThread == 1
| summarize FirstSeen = min(FirstTimestamp), Messages = count(), ThreatMessages = countif(isnotempty(ThreatTypes)) by SenderEmailAddress
| top 20 by FirstSeen desc
| project ['Sender']=SenderEmailAddress, ['First Seen']=FirstSeen, ['Messages']=Messages, ['Threat Messages']=ThreatMessages
Raw source First-Contact External Teams Senders · KQL
Esc
Published by Azure/Azure-Sentinel ↗, licensed under MIT ↗. Reproduced here unmodified.
id: 667772be-deff-4c7e-9da6-ada1780cc45c
name: First-Contact External Teams Senders
description: |
  This query lists external Microsoft Teams senders by the date they were first seen, surfacing recent first-contact senders.
description-detailed: |
  This query lists external Microsoft Teams senders by the date they were first seen over the last 30 days, surfacing recent first-contact senders, using Advanced hunting in Microsoft Defender XDR. First contact from an unknown external sender is a common precursor to social-engineering.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - MessageEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  //This query lists external Microsoft Teams senders by the date they were first seen over the last 30 days, surfacing recent first-contact senders.
  MessageEvents
  | where Timestamp > ago(30d)
  | summarize FirstTimestamp = min(Timestamp), arg_max(Timestamp, *) by TeamsMessageId
  | where IsOwnedThread == 0 and IsExternalThread == 1
  | summarize FirstSeen = min(FirstTimestamp), Messages = count(), ThreatMessages = countif(isnotempty(ThreatTypes)) by SenderEmailAddress
  | top 20 by FirstSeen desc
  | project ['Sender']=SenderEmailAddress, ['First Seen']=FirstSeen, ['Messages']=Messages, ['Threat Messages']=ThreatMessages
version: 1.0.1

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.