Detect Transfer Data to Cloud Account in Sumo Logic CSE
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/
Sumo Detection Query
(_sourceCategory=*windows* OR _sourceCategory=*sysmon* OR _sourceCategory=*endpoint* OR _sourceCategory=*wineventlog*)
| where EventCode = "1" or EventID = "1" or EventCode = "4688" or EventID = "4688"
| parse regex "(?i)(?:CommandLine|ProcessCommandLine|cmdline)\s*[:=]\s*(?:(?:"|\'|\\[^\\]*)(?<CommandLine>[^"'\\ ]*)(?:"|\'|\\[^\\]*)|(?<CommandLine>\S+))" nodrop
| parse regex "(?i)(?:Image|NewProcessName|process)\s*[:=]\s*(?:"(?<ProcessImage>[^"]*)"|(?<ProcessImage>\S+))" nodrop
| where (
(
ProcessImage matches "*azcopy*" and (
CommandLine matches "*blob.core.windows.net*" or
CommandLine matches "*mega.nz*" or
CommandLine matches "*megatools*" or
CommandLine matches "*megacopy*" or
CommandLine matches "*megaput*" or
CommandLine matches "*s3.amazonaws.com*"
)
) or
(
(
ProcessImage matches "*powershell*" or
ProcessImage matches "*pwsh*" or
ProcessImage matches "*az.cmd*" or
ProcessImage matches "*python*"
) and (
CommandLine matches "*New-AzStorageBlobSASToken*" or
CommandLine matches "*New-AzStorageContainerSASToken*" or
CommandLine matches "*New-AzStorageAccountSASToken*" or
CommandLine matches "*generate-sas*" or
CommandLine matches "*GenerateSasUri*"
)
) or
(
CommandLine matches "*az snapshot create*" or
CommandLine matches "*az disk create*" or
CommandLine matches "*az snapshot grant-access*" or
CommandLine matches "*New-AzSnapshot*" or
CommandLine matches "*Grant-AzSnapshotAccess*" or
CommandLine matches "*ec2 copy-snapshot*" or
CommandLine matches "*ec2 modify-snapshot-attribute*" or
CommandLine matches "*ec2 create-image*" or
CommandLine matches "*ec2 modify-image-attribute*" or
CommandLine matches "*CreateSnapshot*" or
CommandLine matches "*CopySnapshot*"
) or
(
ProcessImage matches "*megacopy*" or
ProcessImage matches "*megaput*" or
ProcessImage matches "*MegaSync*" or
ProcessImage matches "*megacmd*" or
ProcessImage matches "*megatools*" or
CommandLine matches "*mega.nz*" or
CommandLine matches "*megatools*" or
CommandLine matches "*megacopy*" or
CommandLine matches "*megaput*"
)
)
| if (ProcessImage matches "*azcopy*", "AzCopy_Exfil",
if (CommandLine matches "*generate-sas*" or CommandLine matches "*SASToken*" or CommandLine matches "*GenerateSasUri*", "SAS_Token_Generation",
if (CommandLine matches "*snapshot*" or CommandLine matches "*copy-snapshot*" or CommandLine matches "*AzSnapshot*", "Snapshot_Export",
"Mega_Upload"))) as SignalType
| if (CommandLine matches "*mega.nz*" or ProcessImage matches "*mega*", "MEGA",
if (CommandLine matches "*blob.core.windows.net*", "AzureBlob",
if (CommandLine matches "*s3.amazonaws.com*", "AWS_S3", "Azure_Snapshot"))) as ExternalDest
| count as EventCount by _messageTime, host, user, ProcessImage, CommandLine, SignalType, ExternalDest
| fields _messageTime, host, user, ProcessImage, CommandLine, SignalType, ExternalDest, EventCount
| sort by _messageTime desc Sumo Logic CQL detection for T1537 targeting process execution logs from Windows Event Log (EventID 4688) and Sysmon (EventID 1). Parses CommandLine and Image fields to identify AzCopy exfiltration to external cloud destinations, SAS token generation, cloud snapshot export operations, and MEGA upload tool execution. Classifies each event by signal type and destination for analyst triage.
Data Sources
Required Tables
False Positives & Tuning
- Cloud infrastructure teams using AzCopy for approved cross-region replication or migration tasks where the destination storage account is external to the primary tenant.
- Security operations running snapshot exports as part of forensic investigation or e-discovery workflows requiring data preservation to isolated cloud environments.
- SaaS integrations or data pipeline tooling that programmatically generates SAS tokens for time-limited, read-only access granted to auditors or analytics platforms.
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.
- 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.
- 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.
- 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.
- 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.
References (14)
- https://attack.mitre.org/techniques/T1537/
- https://tldrsec.com/p/blog-lesser-known-aws-attacks
- https://docs.microsoft.com/en-us/rest/api/storageservices/delegate-access-with-shared-access-signature
- https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview
- https://docs.microsoft.com/en-us/azure/storage/blobs/snapshots-overview
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html
- https://cdn.cnn.com/cnn/2018/images/07/13/gru.indictment.pdf
- https://www.microsoft.com/en-us/security/blog/2024/09/26/storm-0501-ransomware-attacks-expanding-to-hybrid-cloud-environments/
- https://www.secureworks.com/research/gold-ionic-inc-ransom
- https://www.group-ib.com/resources/research/redcurl/
- https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10
- https://github.com/megous/megatools
- https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/azureactivity
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-devicenetworkevents-table
Unlock Pro Content
Get the full detection package for T1537 including response playbook, investigation guide, and atomic red team tests.