T1537 Elastic Security · Elastic

Detect Transfer Data to Cloud Account in Elastic Security

Adversaries may exfiltrate data by transferring it to another cloud account they control on the same service. This technique abuses native cloud APIs, storage sharing mechanisms, and CLI tools (such as AzCopy, megatools, or AWS CLI) to move data across cloud account boundaries while blending into normal cloud traffic. Detection is complicated because the traffic stays within the provider's internal network and may not trigger perimeter data loss controls. Common methods include: sharing VM disk snapshots or AMIs to attacker-controlled accounts, generating shared access signature (SAS) URIs or pre-signed S3 URLs for anonymous access, using AzCopy or AWS S3 sync to copy storage contents cross-account, and creating cloud instance backups then exporting them to external subscriptions.

MITRE ATT&CK

Tactic
Exfiltration
Technique
T1537 Transfer Data to Cloud Account
Canonical reference
https://attack.mitre.org/techniques/T1537/

Elastic Detection Query

Elastic Security (Elastic)
eql
process where event.type == "start" and (
  (
    process.name : ("azcopy.exe", "azcopy") and
    process.command_line : ("*copy*", "*sync*", "*cp *") and
    (
      process.command_line : "*blob.core.windows.net*" or
      process.command_line : "*mega.nz*" or
      process.command_line : "*megatools*" or
      process.command_line : "*megacopy*" or
      process.command_line : "*megaput*" or
      process.command_line : "*s3.amazonaws.com*"
    )
  ) or
  (
    process.name : ("powershell.exe", "pwsh.exe", "az.cmd", "az", "python.exe", "python3") and
    (
      process.command_line : "*New-AzStorageBlobSASToken*" or
      process.command_line : "*New-AzStorageContainerSASToken*" or
      process.command_line : "*New-AzStorageAccountSASToken*" or
      process.command_line : "*az storage*generate-sas*" or
      process.command_line : "*GenerateSasUri*" or
      process.command_line : "*generate-sas*"
    ) and
    (
      process.command_line : "*--expiry*" or
      process.command_line : "*-ExpiryTime*" or
      process.command_line : "*--permissions*" or
      process.command_line : "*rwdl*" or
      process.command_line : "*racwdl*"
    )
  ) or
  (
    process.name : ("powershell.exe", "pwsh.exe", "az.cmd", "aws.exe", "aws", "python.exe", "python3") and
    (
      process.command_line : "*az snapshot create*" or
      process.command_line : "*az disk create*" or
      process.command_line : "*az snapshot grant-access*" or
      process.command_line : "*New-AzSnapshot*" or
      process.command_line : "*Grant-AzSnapshotAccess*" or
      process.command_line : "*ec2 copy-snapshot*" or
      process.command_line : "*ec2 modify-snapshot-attribute*" or
      process.command_line : "*ec2 create-image*" or
      process.command_line : "*ec2 modify-image-attribute*" or
      process.command_line : "*CreateSnapshot*" or
      process.command_line : "*CopySnapshot*"
    )
  ) or
  (
    process.name : ("megacopy.exe", "megaput.exe", "megals.exe", "MegaSync.exe", "megatools.exe", "megacmd.exe", "mega-put", "mega-copy") or
    (
      process.command_line : "*mega.nz*" or
      process.command_line : "*megatools*" or
      process.command_line : "*megacopy*" or
      process.command_line : "*megaput*" or
      process.command_line : "*MegaSync*"
    )
  )
)
high severity high confidence

Detects T1537 (Transfer Data to Cloud Account) across four signal types: AzCopy exfiltration to external blob storage or MEGA, SAS token generation for cross-account access, cloud disk snapshot creation and export (Azure/AWS), and direct use of MEGA upload tools. Uses Elastic Common Schema process fields sourced from Elastic Endpoint Security or Winlogbeat with Sysmon.

Data Sources

Elastic Endpoint SecurityWinlogbeat with SysmonAuditbeat (Linux)

Required Tables

logs-endpoint.events.process-*winlogbeat-*logs-system.security-*

False Positives & Tuning

  • Authorized cloud migration or disaster recovery teams running AzCopy to sync data between storage accounts within the same tenant during planned migrations.
  • DevOps or infrastructure engineers creating Azure disk snapshots or AWS AMIs as part of routine backup automation or infrastructure-as-code pipelines.
  • Security or IT teams generating short-lived SAS tokens for legitimate third-party vendor data sharing agreements with documented approval.
Download portable Sigma rule (.yml)

Other platforms for T1537


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 1AzCopy Transfer to External Azure Blob Storage

    Expected signal: Sysmon Event ID 1: Process Create with Image=azcopy.exe (or azcopy path), CommandLine containing 'copy' and 'blob.core.windows.net' with a SAS token signature. Sysmon Event ID 3: Network Connection from azcopy.exe to TESTACCOUNT.blob.core.windows.net:443. Sysmon Event ID 11: File access events for the source files being read. AzCopy job log created at %USERPROFILE%\.azcopy\*.log.

  2. Test 2Azure SAS Token Generation via PowerShell

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'New-AzStorageContainerSASToken', '-Permission', 'rwdl', and '-ExpiryTime'. PowerShell ScriptBlock Log Event ID 4104 with full script contents including the SAS generation call. Sysmon Event ID 3: Network connection from powershell.exe to management.azure.com:443 for the Az module API calls.

  3. Test 3Azure Snapshot Creation and Export via Azure CLI

    Expected signal: Sysmon Event ID 1 (two events): (1) az.cmd process with CommandLine 'az snapshot create ... --source /subscriptions/...'. (2) az.cmd with CommandLine 'az snapshot grant-access ... --duration-in-seconds 3600'. Sysmon Event ID 3: Network connections from az.cmd to management.azure.com:443. Azure Activity Log entries: OperationName=Microsoft.Compute/snapshots/write (Success) and Microsoft.Compute/snapshots/beginGetAccess/action (Success) — visible in AzureActivity table in Log Analytics within ~5 minutes.

  4. Test 4Mega.nz Upload Tool Execution (megatools)

    Expected signal: Sysmon for Linux (or auditd) process creation event: Image=/usr/bin/megaput, CommandLine containing '--username', '--path', and the local file path. Sysmon Event ID 3 (Linux): Network connection from megaput to g.api.mega.co.nz:443 (initial API auth) and *.userstorage.mega.co.nz:443 (actual upload). Auditd SYSCALL record type=EXECVE with megaput binary. Linux /var/log/auth.log or syslog may record the process execution depending on auditing configuration.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections