← Back to SOC feed Coverage →

Malicious files shared in Microsoft Teams

kql MEDIUM Azure-Sentinel
T1566
huntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-09-03T23:00:00Z · Confidence: medium

Hunt Hypothesis

This hypothesis targets adversaries leveraging the T1566 Phishing technique to deliver malicious payloads through Microsoft Teams, a common vector for initial access in modern cloud environments. Proactively hunting for these files allows the SOC to identify compromised users and isolate threats before lateral movement occurs, capitalizing on the integrated visibility provided by Microsoft Defender for Office 365 within Azure Sentinel.

KQL Query

//This query lists Microsoft Teams files detected with malware by Microsoft Defender for Office 365.
FileMaliciousContentInfo
| where Timestamp > ago(30d)
| where Workload == "MicrosoftTeams"
| where isnotempty(ThreatTypes)
| top 20 by Timestamp desc
| project ['Time']=Timestamp, ['File Name']=FileName, ['Threat Type']=tostring(ThreatTypes), ['Threat Names']=ThreatNames, ['File Location']=FolderPath, ['File Owner']=FileOwnerUpn, SHA256

Analytic Rule Definition

id: 7ad7e727-44f3-4b5b-80a4-b6b54d5eba5a
name: Malicious files shared in Microsoft Teams
description: |
  This query lists Microsoft Teams files detected with malware by Microsoft Defender for Office 365.
description-detailed: |
  This query lists Microsoft Teams files detected with malware by Microsoft Defender for Office 365, using Advanced hunting in Microsoft Defender XDR.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - FileMaliciousContentInfo
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  //This query lists Microsoft Teams files detected with malware by Microsoft Defender for Office 365.
  FileMaliciousContentInfo
  | where Timestamp > ago(30d)
  | where Workload == "MicrosoftTeams"
  | where isnotempty(ThreatTypes)
  | top 20 by Timestamp desc
  | project ['Time']=Timestamp, ['File Name']=FileName, ['Threat Type']=tostring(ThreatTypes), ['Threat Names']=ThreatNames, ['File Location']=FolderPath, ['File Owner']=FileOwnerUpn, SHA256
version: 1.0.0

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Email and Collaboration Queries/Microsoft Teams protection/Malicious files shared in Microsoft Teams.yaml