← Back to SOC feed Coverage →

Mass Downloads in the last 7 days

kql MEDIUM Azure-Sentinel
T1020
CloudAppEvents
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-05-07T11:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may use mass downloads to exfiltrate data or deploy malicious payloads, leveraging T1020 techniques to move laterally or establish persistence. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential data exfiltration or compromise early.

KQL Query

let lookback = 7d; //set the period to query let threshold = 50; //set the threshold for number of downloads let downloadTimeframe = 5m; //set the bin timeframe to group the events CloudAppEvents | where ActionType == "FileDownloaded" and Timestamp > ago(lookback) // Filter to only "Download" actions | summarize DownloadCount=count() by AccountDisplayName, AccountObjectId, bin(Timestamp,downloadTimeframe) //bin the results into a timeframe by the account | where DownloadCount > threshold //filter the records that don't meet the threshold | project AccountDisplayName,AccountObjectId,DownloadCount

Analytic Rule Definition

id: a1b2c3d4-e5f6-4g7h-8i9j-k0l1m2n3o4p5
name: Mass Downloads in the last 7 days
description: |
  This query looks for mass downloads identified by Microsoft Defender for Cloud Apps. It will require an corresponding app connector in Microsoft Defender for Cloud Apps.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - CloudAppEvents
tactics:
- Exfiltration
relevantTechniques:
- T1020
query: >
  let lookback = 7d; //set the period to query
  let threshold = 50; //set the threshold for number of downloads
  let downloadTimeframe = 5m; //set the bin timeframe to group the events
  CloudAppEvents
  | where ActionType == "FileDownloaded" and Timestamp > ago(lookback) // Filter to only "Download" actions
  | summarize DownloadCount=count() by AccountDisplayName, AccountObjectId, bin(Timestamp,downloadTimeframe) //bin the results into a timeframe by the account
  | where DownloadCount > threshold //filter the records that don't meet the threshold
  | project AccountDisplayName,AccountObjectId,DownloadCount
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: ObjectGuid
        columnName: AccountObjectId
      - identifier: DisplayName
        columnName: AccountDisplayName
version: 1.0.0

Required Data Sources

Sentinel TableNotes
CloudAppEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Cloud Apps/mass-downloads.yaml