T1213.005 Splunk · SPL

Detect Messaging Applications in Splunk

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.

MITRE ATT&CK

Tactic
Collection
Technique
T1213 Data from Information Repositories
Sub-technique
T1213.005 Messaging Applications
Canonical reference
https://attack.mitre.org/techniques/T1213/005/

SPL Detection Query

Splunk (SPL)
spl
// T1213.005 - Messaging Application Data Mining
// Detects bulk Teams/Slack data access via O365 Management Activity and Slack Enterprise audit logs
(
  index=o365 sourcetype="o365:management:activity"
  (Workload="MicrosoftTeams" OR Workload="SecurityComplianceCenter")
)
OR
(
  index=slack_audit sourcetype="slack:audit"
  (action="file_downloaded" OR action="search_performed" OR action="channel_joined"
   OR action="message_channel_export" OR action="user_channel_join")
)
| eval app_name=coalesce(Workload, "Slack")
| eval operation_name=coalesce(Operation, action)
| eval source_ip=coalesce(ClientIP, ip_address)
| eval user_id=coalesce(UserId, mvindex(split(actor, ":"), 1))
| eval is_export=if(match(lower(operation_name),
    "export|contentsearch|searchexported|viewedsearchexported|bulkdownload|searchcreated"), 1, 0)
| eval is_bulk_read=if(match(lower(operation_name),
    "messagelist|channellist|filelist|filedownload|search_performed"), 1, 0)
| bin _time span=1h
| stats
    count as EventCount,
    sum(is_export) as ExportEvents,
    sum(is_bulk_read) as BulkReadEvents,
    dc(operation_name) as UniqueOps,
    values(operation_name) as Operations,
    values(source_ip) as SourceIPs,
    earliest(_time) as FirstEvent,
    latest(_time) as LastEvent
    by user_id, app_name
| where EventCount > 50 OR ExportEvents >= 1
| eval RiskLevel=case(
    ExportEvents >= 1 AND EventCount > 100, "High",
    ExportEvents >= 1, "Medium",
    EventCount > 200, "Medium",
    BulkReadEvents > 50, "Medium",
    1=1, "Low"
)
| where RiskLevel IN ("High", "Medium")
| table FirstEvent, LastEvent, user_id, app_name, EventCount, ExportEvents, BulkReadEvents, UniqueOps, Operations, SourceIPs, RiskLevel
| sort - EventCount
high severity medium confidence

Detects messaging application data mining by analyzing Office 365 Management Activity logs for Microsoft Teams/SharePoint and Slack Enterprise Grid audit events. Identifies high event volumes per user per hour and specifically flags export and content search operations which indicate adversaries extracting bulk message data. The query normalizes fields across both log sources and assigns risk levels based on export activity and overall event volume. Requires the Splunk Add-on for Microsoft Office 365 (for o365:management:activity) and Slack Enterprise Grid audit log ingestion (for slack:audit).

Data Sources

Application Log: Application Log ContentOffice 365 Management Activity APISlack Enterprise Grid Audit Logs

Required Sourcetypes

o365:management:activityslack:audit

False Positives & Tuning

  • eDiscovery and legal compliance operations performing authorized content searches and exports from Teams via the Microsoft Purview compliance center
  • Security operations teams searching Slack or Teams to coordinate incident response, generating elevated message read volumes
  • Third-party backup and archival tools (e.g., AvePoint, Datto, Backupify) that systematically access all channels for backup purposes and will consistently trigger bulk thresholds
  • HR or legal personnel conducting authorized GDPR/CCPA data subject access requests that involve Teams message exports
  • Developers testing Slack or Teams bot integrations during development that generate high API call volumes
Download portable Sigma rule (.yml)

Other platforms for T1213.005


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Microsoft Teams Bulk Channel and Message Enumeration via PowerShell

    Expected signal: OfficeActivity events with RecordType=MicrosoftTeams and Operations including TeamListed and ChannelListed. CloudAppEvents with AppName='Microsoft Teams' and multiple ActionType entries for channel read operations. Azure AD SigninLogs showing Teams PowerShell module authentication against graph.microsoft.com.

  2. Test 2Microsoft Graph API Teams Channel Message Retrieval

    Expected signal: Azure AD AuditLogs with OperationName='Add delegated permission grant' for ChannelMessage.Read.All scope (from initial consent). Azure AD SigninLogs with ResourceDisplayName='Microsoft Graph' showing token issuance. CloudAppEvents (if MDCA connected) showing Teams API access attributed to the application or user. Network connections from the host to graph.microsoft.com.

  3. Test 3Slack API Bulk Channel Message Harvest

    Expected signal: Slack Enterprise Grid audit logs showing actor performing search_performed, file_downloaded, and channel_joined actions. Network traffic logs showing HTTP GET requests to slack.com/api/conversations.list and slack.com/api/conversations.history at high frequency. Sysmon EventCode=1 for the curl or python3 processes. Large HTTP response bodies in proxy logs.

  4. Test 4Microsoft Purview Compliance Center Teams Content Search and Export

    Expected signal: OfficeActivity events with RecordType=SecurityComplianceCenter and Operations: SearchCreated, SearchStarted, SearchCompleted, ExportReport, SearchExported. Azure AD SigninLogs for the compliance PowerShell session authentication. CloudAppEvents may attribute Teams data access to the compliance service principal during the search execution.

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