T1583.007 Google Chronicle · YARA-L

Detect Serverless in Google Chronicle

Adversaries may purchase and configure serverless cloud infrastructure, such as Cloudflare Workers, AWS Lambda functions, or Google Apps Scripts, to use during operations. By routing command-and-control (C2) traffic through serverless platforms, adversaries blend malicious communications with legitimate cloud provider traffic. Traffic from infected endpoints appears to target known cloud provider domains (workers.dev, cloudfunctions.net, lambda-url.amazonaws.com), making it difficult to distinguish from ordinary SaaS or cloud API usage. The serverless runtime proxies requests to adversary-owned infrastructure while the cloud provider absorbs attribution complexity. Detection requires identifying beaconing behavior, non-browser processes connecting to serverless endpoints, and anomalous DNS query patterns to serverless platform domains.

MITRE ATT&CK

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

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule T1583_007_Serverless_C2_Non_Browser_Egress {
  meta:
    author          = "Detection Engineering"
    description     = "Detects non-browser processes making outbound network connections to serverless cloud platform endpoints (Cloudflare Workers, AWS Lambda, Google Cloud Functions, Azure Functions, Netlify, Vercel, Google Apps Script). Adversaries route C2 traffic through these platforms to blend with legitimate cloud provider egress and obscure attribution."
    mitre_attack_tactic    = "Resource Development"
    mitre_attack_technique = "T1583.007"
    reference       = "https://attack.mitre.org/techniques/T1583/007/"
    severity        = "HIGH"
    priority        = "HIGH"
    false_positives = "Developer tooling, IT automation scripts, SOAR connectors calling legitimate serverless APIs"

  events:
    $net.metadata.event_type = "NETWORK_CONNECTION"
    (
      re.regex($net.target.hostname, `(?i).*\.workers\.dev$`)                        or
      re.regex($net.target.hostname, `(?i).*\.pages\.dev$`)                          or
      re.regex($net.target.hostname, `(?i).*\.cloudfunctions\.net$`)                 or
      re.regex($net.target.hostname, `(?i).*\.execute-api\..*\.amazonaws\.com$`)    or
      re.regex($net.target.hostname, `(?i).*\.lambda-url\..*\.amazonaws\.com$`)     or
      re.regex($net.target.hostname, `(?i).*\.azurewebsites\.net$`)                  or
      re.regex($net.target.hostname, `(?i).*\.azurecontainerapps\.io$`)              or
      re.regex($net.target.hostname, `(?i).*\.netlify\.app$`)                        or
      re.regex($net.target.hostname, `(?i).*\.vercel\.app$`)                         or
      $net.target.hostname = "script.google.com"
    )
    not re.regex(
      $net.principal.process.file.full_path,
      `(?i)(chrome|firefox|msedge|iexplore|opera|brave|vivaldi)\.exe$`
    )

  condition:
    $net
}
high severity high confidence

Google Chronicle YARA-L 2.0 detection rule matching UDM NETWORK_CONNECTION events where the target hostname resolves to a known serverless platform domain and the initiating process is not a recognised browser. Uses re.regex() for flexible, case-insensitive pattern matching against UDM principal.process.file.full_path and target.hostname fields. Compatible with telemetry ingested from CrowdStrike, Carbon Black, Tanium, and Sysmon-based log sources normalised to Chronicle UDM.

Data Sources

Google Chronicle UDM (Unified Data Model)Chronicle forwarder ingesting Windows Sysmon EventID 3CrowdStrike Falcon telemetry normalised to UDMCarbon Black Cloud events normalised to UDM

Required Tables

NETWORK_CONNECTION UDM event stream

False Positives & Tuning

  • Scripting runtimes (python.exe, node.exe, perl.exe) on developer workstations regularly querying company-owned serverless APIs, CDN functions, or third-party SaaS webhooks implemented on serverless platforms
  • Corporate RPA (Robotic Process Automation) software that uses wscript.exe or cscript.exe to invoke Azure Functions or Google Apps Scripts as part of business workflow automation
  • Authorised red team or penetration testing infrastructure using scripted C2 beacon simulations against lab serverless endpoints during scheduled exercises
Download portable Sigma rule (.yml)

Other platforms for T1583.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 1PowerShell Beaconing to Cloudflare Workers Endpoint

    Expected signal: Sysmon Event ID 1: powershell.exe spawned with command line containing Invoke-WebRequest and the workers.dev URL. Sysmon Event ID 22: 5 DNS query events for df00tech-sentinel-test.argustest.workers.dev. Sysmon Event ID 3: 5 Network Connection events from powershell.exe to the Cloudflare IP on port 443. PowerShell ScriptBlock Log Event ID 4104 capturing the full loop script.

  2. Test 2Python Script Polling AWS Lambda Function URL

    Expected signal: Sysmon Event ID 1: python.exe (or python3.exe) process created with command line containing lambda-url and amazonaws.com. Sysmon Event ID 22: DNS query events for the Lambda URL subdomain (abcde12345fghij.lambda-url.us-east-1.amazonaws.com). Sysmon Event ID 3: Network connection events from python.exe to AWS IP ranges on port 443. Connections will fail with connection refused but process and DNS events fire.

  3. Test 3WScript Invoking Google Apps Script Web App (BlackWater Technique)

    Expected signal: Sysmon Event ID 1: cmd.exe spawning echo to create the .js file, then wscript.exe executing df00tech_gapps_test.js. Sysmon Event ID 11: File Create event for df00tech_gapps_test.js in %TEMP%. Sysmon Event ID 22: DNS query for script.google.com. Sysmon Event ID 3: Network connection from wscript.exe to Google IP on port 443 with DestinationHostname=script.google.com.

  4. Test 4cURL Beaconing to Google Cloud Function (Repeated Intervals)

    Expected signal: Sysmon Event ID 1: cmd.exe created with the for loop command, then curl.exe spawned 4 times as child processes with the cloudfunctions.net URL as an argument. Sysmon Event ID 22: DNS query events for us-central1-df00tech-argus-test.cloudfunctions.net. Sysmon Event ID 3: 4 Network Connection events from curl.exe to Google Cloud IP on port 443. Connections will return an error but process and DNS events fire regardless.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections