T1584.007 Sumo Logic CSE · Sumo

Detect Serverless in Sumo Logic CSE

Adversaries may compromise serverless cloud infrastructure, such as Cloudflare Workers, AWS Lambda functions, or Google Apps Scripts, to proxy command-and-control (C2) communications between implants on victim systems and adversary-controlled backend servers. Because traffic destined for compromised serverless functions originates from subdomains of trusted cloud providers (e.g., *.workers.dev, *.execute-api.amazonaws.com, script.google.com), network-layer defenses relying on domain or IP reputation are largely ineffective. Detection pivots to behavioral analysis of victim-side telemetry: identifying processes on endpoints communicating with serverless platforms in patterns consistent with C2 beaconing (periodic connections, low-variance timing, small symmetric payloads), correlating process context with destination domains, and monitoring cloud audit logs for unauthorized modifications to serverless functions within environments the defender controls.

MITRE ATT&CK

Tactic
Resource Development
Technique
T1584 Compromise Infrastructure
Sub-technique
T1584.007 Serverless
Canonical reference
https://attack.mitre.org/techniques/T1584/007/

Sumo Detection Query

Sumo Logic CSE (Sumo)
sql
_sourceCategory=network/proxy OR _sourceCategory=network/firewall OR _sourceCategory=network/paloalto
| parse "*" as raw_log nodrop
| parse field=raw_log "host=*" as dest_host nodrop
| parse field=raw_log "cs-host: *" as cs_host nodrop
| parse field=raw_log "destinationhostname=*" as fw_host nodrop
| if (!isNull(dest_host), dest_host, if (!isNull(cs_host), cs_host, fw_host)) as destination
| where destination matches "*.workers.dev"
  OR destination matches "*.cloudflareworkers.com"
  OR destination matches "*.execute-api.*.amazonaws.com"
  OR destination matches "*.lambda-url.*.amazonaws.com"
  OR destination = "script.google.com"
  OR destination matches "*.cloudfunctions.net"
  OR destination matches "*.run.app"
  OR destination matches "*.azurewebsites.net"
  OR destination matches "*.pages.dev"
  OR destination matches "*.netlify.app"
  OR destination matches "*.vercel.app"
  OR destination matches "*.supabase.co"
  OR destination matches "*.deno.dev"
| parse field=raw_log "src=*" as src_ip nodrop
| parse field=raw_log "bytes_sent=*" as bytes_sent nodrop
| parse field=raw_log "bytes_received=*" as bytes_recv nodrop
| timeslice 1h
| stats
    count as connection_count,
    dcount(_timeslice) as hourly_buckets,
    sum(bytes_sent) as total_bytes_sent,
    sum(bytes_recv) as total_bytes_received,
    min(_messageTime) as first_seen,
    max(_messageTime) as last_seen
    by src_ip, destination
| where connection_count >= 12 AND hourly_buckets >= 3
| total_bytes_sent / connection_count as avg_bytes_sent
| total_bytes_received / connection_count as avg_bytes_recv
| where avg_bytes_sent < 4096 AND avg_bytes_recv < 16384
| connection_count / hourly_buckets as avg_conn_per_hour
| where avg_conn_per_hour >= 2
| fields first_seen, last_seen, src_ip, destination, connection_count, hourly_buckets, avg_conn_per_hour, avg_bytes_sent, avg_bytes_recv
| sort by connection_count desc
high severity medium confidence

Sumo Logic query targeting proxy and firewall log sources. Extracts destination hostnames and source IPs from multiple log formats, filters for known serverless cloud domains, then aggregates per source IP and destination with hourly time buckets. Applies beaconing heuristics: minimum 12 connections over 3+ hours with small average payload sizes in both directions.

Data Sources

Sumo Logic Installed Collector (proxy logs)Palo Alto Networks App for Sumo LogicCisco ASA App for Sumo Logic

Required Tables

network/proxynetwork/firewallnetwork/paloalto

False Positives & Tuning

  • Shared office NAT IPs where multiple developers are regularly accessing serverless-hosted internal tools simultaneously
  • Automated testing infrastructure running integration tests against staging environments hosted on Vercel, Netlify, or Supabase
  • Employee laptops running Electron apps backed by serverless APIs that poll frequently for real-time updates
Download portable Sigma rule (.yml)

Other platforms for T1584.007


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 1Simulate C2 Beacon to Cloudflare Workers Domain

    Expected signal: DeviceNetworkEvents: 15 ConnectionSuccess events from PowerShell.exe to httpbin.org, spaced ~30 seconds apart. Sysmon Event ID 3: Network connections with consistent DestinationPort=443 and DestinationHostname=httpbin.org. Inter-arrival time analysis will show MeanInterval ~30 seconds with low standard deviation (JitterCoefficient < 0.05).

  2. Test 2Non-Browser Process Connecting to AWS Lambda URL

    Expected signal: Sysmon Event ID 3: Network connections with Image=C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe making POST requests to httpbin.org:443. DeviceNetworkEvents: InitiatingProcessFileName=powershell.exe, connection count=5 with small SentBytes values. Sysmon Event ID 22: DNS query for httpbin.org from powershell.exe.

  3. Test 3Enumerate and Test Unauthorized AWS Lambda Function (Controlled Lab)

    Expected signal: AWS CloudTrail: ListFunctions and InvokeFunction API calls logged in CloudTrail with sourceIPAddress of the calling machine, userAgent=aws-cli, and requestParameters including the function name. If forwarded to a SIEM via CloudWatch/Kinesis, these appear in your cloud audit log index. EventName=InvokeFunction with errorCode absent indicates successful invocation.

  4. Test 4Deploy Test Cloudflare Worker via wrangler CLI (Simulates Infrastructure Compromise Foothold)

    Expected signal: Cloudflare Audit Log: Worker script deployment event with actor email, source IP, and timestamp. If Cloudflare Logpush is configured to forward audit logs to your SIEM, the event appears as audit_log.action.type=deploy with resources referencing the worker name. Process telemetry: node.exe or cmd.exe spawning wrangler commands visible in Sysmon Event ID 1.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections