T1048 Google Chronicle · YARA-L

Detect Exfiltration Over Alternative Protocol in Google Chronicle

Adversaries may steal data by exfiltrating it over a different protocol than that used for command and control. Data may be sent over FTP, SMTP, DNS, SMB, HTTP/S, or any other network protocol not serving as the primary C2 channel. Adversaries often encrypt or obfuscate these alternate channels. Common tools include curl, ftp.exe, WinSCP, and built-in OS utilities. DNS tunneling (encoding data in DNS query subdomains) is a particularly stealthy variant used by malware families like FrameworkPOS. IaaS and SaaS platforms (Exchange, SharePoint, GitHub, AWS S3) can also serve as exfiltration endpoints via cloud APIs or direct downloads.

MITRE ATT&CK

Tactic
Exfiltration
Technique
T1048 Exfiltration Over Alternative Protocol
Canonical reference
https://attack.mitre.org/techniques/T1048/

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule T1048_ExfilOverAlternativeProtocol {
  meta:
    author = "Argus Detection Engineering"
    description = "Detects exfiltration over alternative protocols including FTP/SFTP/SMTP tool usage with upload indicators, outbound connections on exfil-relevant ports, and DNS tunneling via long subdomain queries."
    mitre_attack_tactic = "Exfiltration"
    mitre_attack_technique = "T1048"
    severity = "HIGH"
    priority = "HIGH"

  events:
    // Branch 1: Exfil tool with upload command-line indicators
    (
      $e1.metadata.event_type = "PROCESS_LAUNCH"
      and (
        re.regex($e1.principal.process.file.full_path, `(?i)(ftp\.exe|curl\.exe|winscp\.exe|pscp\.exe|sftp\.exe|ncftp\.exe|wget\.exe|bitsadmin\.exe|robocopy\.exe)$`)
      )
      and (
        re.regex($e1.principal.process.command_line, `(?i)(\s-T\s|--upload-file|\sPUT\s|\sSTOR\s|ftp://|sftp://|ftps://|\s-F\s|--form|smtp://|smtps://|--mail-from|--mail-rcpt)`)
      )
    )
    or
    // Branch 2: Outbound connection on exfil ports from unexpected process
    (
      $e1.metadata.event_type = "NETWORK_CONNECTION"
      and (
        $e1.target.port = 21
        or $e1.target.port = 22
        or $e1.target.port = 25
        or $e1.target.port = 465
        or $e1.target.port = 587
        or $e1.target.port = 989
        or $e1.target.port = 990
        or $e1.target.port = 2121
        or $e1.target.port = 2222
      )
      and not net.ip_in_range_cidr($e1.target.ip, "10.0.0.0/8")
      and not net.ip_in_range_cidr($e1.target.ip, "172.16.0.0/12")
      and not net.ip_in_range_cidr($e1.target.ip, "192.168.0.0/16")
      and not net.ip_in_range_cidr($e1.target.ip, "127.0.0.0/8")
      and not re.regex($e1.principal.process.file.full_path, `(?i)(svchost\.exe|lsass\.exe|services\.exe|Outlook\.exe|thunderbird\.exe|filezilla\.exe)$`)
    )
    or
    // Branch 3: DNS tunneling via long query names
    (
      $e1.metadata.event_type = "NETWORK_DNS"
      and strings.length($e1.network.dns.questions.name) > 50
      and not re.regex($e1.network.dns.questions.name, `(?i)(microsoft\.com|windows\.com|google\.com|amazon\.com|cloudfront\.net)$`)
    )

  condition:
    $e1
}
high severity high confidence

Chronicle YARA-L 2.0 rule detecting exfiltration over alternative protocols across three branches: known exfil tool usage with upload command-line patterns, outbound network connections to FTP/SMTP/SSH ports from non-whitelisted processes, and DNS tunneling via anomalously long query subdomain names. Uses UDM event types PROCESS_LAUNCH, NETWORK_CONNECTION, and NETWORK_DNS.

Data Sources

Google Chronicle SIEMChronicle Unified Data Model (UDM)Windows Sysmon via Chronicle forwarderEndpoint Detection via Chronicle

Required Tables

UDM Events (PROCESS_LAUNCH, NETWORK_CONNECTION, NETWORK_DNS)

False Positives & Tuning

  • Managed file transfer software (e.g., GoAnywhere, MOVEit) using SFTP on port 22 to authorized external partners — add principal.hostname or principal.ip allowlists for known MFT servers
  • DevOps tooling (Ansible, Terraform) using SSH on port 22 for remote execution against cloud infrastructure — exclude based on initiating process name and known CI/CD asset groups
  • DNS queries to cloud provider endpoints with long CNAME chains (e.g., AWS Route 53 health checks, Akamai edge nodes) — tune the 50-character threshold upward or add regex allowlist for known CDN patterns
Download portable Sigma rule (.yml)

Other platforms for T1048


Testing Methodology

Validate this detection against 5 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 1FTP Upload via Windows Built-in FTP Client

    Expected signal: Sysmon Event ID 1: Process Create with Image=ftp.exe, CommandLine containing '-s:%TEMP%\df00tech-ftp.txt'. Sysmon Event ID 3: Network Connection attempt to 127.0.0.1:21 from ftp.exe. Sysmon Event ID 11: File create for the ftp script file in TEMP.

  2. Test 2curl SMTP Exfiltration Simulation

    Expected signal: Sysmon Event ID 1: Process Create with Image=curl.exe, CommandLine containing '--mail-from', '--mail-rcpt', '--upload-file', 'smtp://'. Sysmon Event ID 3: Network Connection to 127.0.0.1:25 from curl.exe. The connection will fail but telemetry events fire.

  3. Test 3DNS Tunneling Simulation via Long Subdomain Queries

    Expected signal: Sysmon Event ID 22 (DNS Query): 25 events with QueryName containing long base64-encoded subdomains (>50 characters) under df00tech-test.com. DNS queries will fail to resolve (NXDOMAIN) but the DNS telemetry events are generated by the Sysmon DNS query logging provider.

  4. Test 4curl Upload via HTTP PUT (Alternative Protocol Exfiltration)

    Expected signal: Sysmon Event ID 1: Process Create with Image=curl.exe, CommandLine containing '-X PUT', '-T', and 'http://127.0.0.1:8888'. Sysmon Event ID 3: Network Connection to 127.0.0.1:8888. Sysmon Event ID 11: File Create for exfil_test.txt in TEMP directory.

  5. Test 5SCP File Exfiltration via OpenSSH (Linux/macOS)

    Expected signal: Auditd EXECVE record for scp with arguments including the destination host and port. Network connection event to 198.51.100.1:22. On systems with Sysmon for Linux: Process Create event (EventCode=1) for scp binary, Network Connect (EventCode=3) for the outbound SSH connection attempt.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections