T1048.002

Exfiltration Over Asymmetric Encrypted Non-C2 Protocol

Adversaries may steal data by exfiltrating it over an asymmetrically encrypted network protocol other than that of the existing command and control channel. Common protocols include HTTPS/TLS, SFTP, SCP, SMTPS, and FTPS. These protocols use asymmetric encryption (public-key cryptography) for key exchange, often transitioning to symmetric encryption for bulk data transfer. Because these protocols are widely used for legitimate business purposes, malicious exfiltration traffic can blend in with normal network activity. Threat actors such as APT28, CURIUM, and Storm-1811 have leveraged HTTPS, SMTPS, and SCP respectively for data exfiltration.

Microsoft Sentinel / Defender
kusto
let ExfilTools = dynamic(["rclone.exe", "winscp.exe", "pscp.exe", "psftp.exe", "filezilla.exe", "sftp.exe", "scp.exe", "curl.exe", "wget.exe"]);
let ExfilKeywords = dynamic(["sftp", "scp ", "smtps", "ftps", "webdav", "rclone", "winscp", "put ", "mput", "--sftp", "--webdav", "ssl", "tls"]);
let LargeTransferThresholdMB = 10;
// Detection 1: Known exfiltration tools making outbound encrypted connections
let ExfilToolProcesses = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ (ExfilTools)
  or (FileName =~ "cmd.exe" and ProcessCommandLine has_any ("sftp", "scp ", "rclone", "winscp"))
  or (FileName =~ "powershell.exe" and ProcessCommandLine has_any ("sftp", "scp", "smtps", "WebDAV", "ftps", "rclone"))
| extend ToolName = case(
    FileName =~ "rclone.exe", "Rclone",
    FileName =~ "winscp.exe", "WinSCP",
    FileName =~ "pscp.exe" or FileName =~ "scp.exe", "SCP",
    FileName =~ "psftp.exe" or FileName =~ "sftp.exe", "SFTP",
    FileName =~ "filezilla.exe", "FileZilla",
    ProcessCommandLine has "sftp", "SFTP",
    ProcessCommandLine has "scp ", "SCP",
    ProcessCommandLine has "rclone", "Rclone",
    "Unknown"
  )
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
         InitiatingProcessFileName, InitiatingProcessCommandLine, ToolName;
// Detection 2: Large outbound HTTPS/SFTP/SCP connections
let ExfilNetworkEvents = DeviceNetworkEvents
| where Timestamp > ago(24h)
| where RemotePort in (443, 22, 465, 587, 990, 993, 8443, 21)
| where RemoteIPType == "Public"
| where InitiatingProcessFileName in~ (ExfilTools)
  or InitiatingProcessCommandLine has_any (ExfilKeywords)
| summarize ConnectionCount=count(), BytesSent=sum(SentBytes), BytesReceived=sum(ReceivedBytes),
            UniqueRemoteIPs=dcount(RemoteIP), Ports=make_set(RemotePort),
            RemoteIPs=make_set(RemoteIP, 10)
  by DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, bin(Timestamp, 1h)
| extend MBSent = round(toreal(BytesSent) / 1048576, 2)
| where MBSent > LargeTransferThresholdMB or ConnectionCount > 5
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName,
          InitiatingProcessCommandLine, ConnectionCount, MBSent, UniqueRemoteIPs, Ports, RemoteIPs;
// Detection 3: Rclone-specific command line patterns
let RcloneActivity = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "rclone.exe"
| extend HasCopy = ProcessCommandLine has "copy" or ProcessCommandLine has "sync" or ProcessCommandLine has "move"
| extend HasRemote = ProcessCommandLine has ":" and (
    ProcessCommandLine has "sftp" or ProcessCommandLine has "s3" or
    ProcessCommandLine has "gdrive" or ProcessCommandLine has "onedrive" or
    ProcessCommandLine has "mega" or ProcessCommandLine has "box" or
    ProcessCommandLine has "dropbox" or ProcessCommandLine has "webdav"
  )
| where HasCopy or HasRemote
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
         InitiatingProcessFileName, HasCopy, HasRemote;
union ExfilToolProcesses, ExfilNetworkEvents, RcloneActivity
| sort by Timestamp desc
high severity medium confidence

Data Sources

Process: Process Creation Network Traffic: Network Connection Creation Command: Command Execution Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents DeviceNetworkEvents

False Positives

  • IT administrators using WinSCP, FileZilla, or SCP for legitimate file transfers to managed servers
  • Backup software using SFTP/FTPS to transfer data to authorized cloud storage or DR sites
  • DevOps pipelines using Rclone or curl for legitimate artifact publishing to cloud storage (S3, Azure Blob, GCS)
  • Security teams running vulnerability scans or transferring forensic images via SFTP
  • Software update mechanisms that download or upload telemetry over HTTPS to vendor endpoints

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections