T1213.005

Messaging Applications

Adversaries may leverage chat and messaging applications, such as Microsoft Teams, Slack, and Google Chat, to mine valuable information including credentials, API keys, source code snippets, internal resource links, and proprietary data. Threat actors including Scattered Spider, LAPSUS$, and Fox Kitten have deliberately searched victim messaging platforms for credentials shared informally in chat, internal tooling documentation, and active incident response communications. This technique is particularly dangerous because employees routinely share sensitive information in messaging apps with an expectation of privacy, and because bulk message access by a compromised account often appears indistinguishable from normal user activity without behavioral baselining.

Microsoft Sentinel / Defender
kusto
// T1213.005 - Messaging Application Data Mining
// Detects bulk or suspicious access to Teams/Slack message content via MDCA and O365 audit logs
let LookbackPeriod = 24h;
let BulkEventThreshold = 100;
let SuspiciousExportOps = dynamic(["Export", "ContentSearch", "SearchExported", "ExportReport", "ViewedSearchExported", "BulkDownload", "SearchCreated"]);
// Branch 1: High-volume messaging app activity via Microsoft Defender for Cloud Apps
let CloudAppBulkAccess =
    CloudAppEvents
    | where Timestamp > ago(LookbackPeriod)
    | where AppName has_any ("Microsoft Teams", "Slack", "Google Chat", "Webex", "Workplace from Meta")
    | where ActionType in~ (
        "FileDownloaded", "FilePreviewed", "FileAccessed",
        "MessageRead", "ChannelRead",
        "SearchPerformed", "ItemShared"
    )
    | summarize
        EventCount = count(),
        UniqueActions = dcount(ActionType),
        Actions = make_set(ActionType, 10),
        UniqueChannels = dcount(tostring(RawEventData.ChannelName)),
        SourceIPs = make_set(IPAddress, 5),
        FirstSeen = min(Timestamp),
        LastSeen = max(Timestamp)
        by AccountDisplayName, AccountObjectId, AppName
    | where EventCount > BulkEventThreshold
    | extend DetectionSource = "CloudAppEvents", RiskIndicator = "High-volume messaging app data access";
// Branch 2: Microsoft 365 compliance/eDiscovery export of Teams data
let TeamsComplianceExport =
    OfficeActivity
    | where TimeGenerated > ago(LookbackPeriod)
    | where RecordType in ("MicrosoftTeams", "SecurityComplianceCenter")
    | where Operation has_any (SuspiciousExportOps)
    | summarize
        EventCount = count(),
        Operations = make_set(Operation, 10),
        UniqueActions = dcount(Operation),
        SourceIPs = make_set(ClientIP, 5),
        FirstSeen = min(TimeGenerated),
        LastSeen = max(TimeGenerated)
        by UserId, RecordType
    | extend AccountDisplayName = UserId, AccountObjectId = "",
             AppName = "Microsoft Teams (Compliance)",
             Actions = Operations, UniqueChannels = 0,
             DetectionSource = "OfficeActivity", RiskIndicator = "Teams compliance export/search operation";
// Combine results
union CloudAppBulkAccess, TeamsComplianceExport
| project FirstSeen, LastSeen, AccountDisplayName, AppName, SourceIPs,
          EventCount, UniqueActions, Actions, DetectionSource, RiskIndicator
| sort by EventCount desc
high severity medium confidence

Data Sources

Application Log: Application Log Content Microsoft Defender for Cloud Apps Microsoft 365 Unified Audit Log

Required Tables

CloudAppEvents OfficeActivity

False Positives

  • eDiscovery and compliance officers performing legitimate legal holds or audit-required content searches against Teams data — these accounts will consistently trigger the compliance export branch
  • Security operations analysts searching Teams or Slack for evidence during an authorized internal investigation or incident response engagement
  • Third-party backup and archival solutions (e.g., AvePoint, Skykick, Backupify, Datto SaaS) that systematically access all channels and generate high-volume access events
  • HR or legal personnel conducting authorized data subject access requests (DSARs) under GDPR or CCPA requirements
  • Automated monitoring bots or compliance integrations that continuously read message channels to enforce retention or DLP policies

Unlock Pro Content

Get the full detection package for T1213.005 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections