Teams communication to suspicious external users


Description

This query helps hunt for communication with suspicious external users.

Query · kql

//This query uses MessageEvents to detect bi-directional outbound communication to suspicious external Help Desk\Support representatives
MessageEvents 
| where Timestamp > ago(30d) 
| where (RecipientDetails contains "help" and RecipientDetails contains "desk") 
  or (RecipientDetails contains "it" and RecipientDetails contains "support") 
  or (RecipientDetails contains "working" and RecipientDetails contains "home") 
| where IsExternalThread == true 
| project Timestamp, SenderDisplayName, SenderEmailAddress, RecipientDetails, IsOwnedThread, ThreadType
Raw source Teams communication to suspicious external users · KQL
Esc
Published by Azure/Azure-Sentinel ↗, licensed under MIT ↗. Reproduced here unmodified.
id: 389ead4a-6dfe-47e1-9236-165eb08f1017
name: Teams communication to suspicious external users
description: |
  This query helps hunt for communication with suspicious external users.
description-detailed: |
  This query helps hunt for Teams users communicating with suspicious external users using Microsoft Defender for Office 365 and Advance hunting in Microsoft Defender XDR
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - MessageEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  //This query uses MessageEvents to detect bi-directional outbound communication to suspicious external Help Desk\Support representatives
  MessageEvents 
  | where Timestamp > ago(30d) 
  | where (RecipientDetails contains "help" and RecipientDetails contains "desk") 
    or (RecipientDetails contains "it" and RecipientDetails contains "support") 
    or (RecipientDetails contains "working" and RecipientDetails contains "home") 
  | where IsExternalThread == true 
  | project Timestamp, SenderDisplayName, SenderEmailAddress, RecipientDetails, IsOwnedThread, ThreadType
version: 1.0.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.