Serverless computing represents the newest and most dangerous frontier in adversarial infrastructure acquisition. Unlike traditional servers or virtual machines that require provisioning, maintenance, and leave behind forensic artifacts, serverless platforms such as AWS Lambda, Cloudflare Workers, and Google Apps Script provide adversaries with ephemeral, auto-scaling execution environments that exist only when triggered and vanish the moment they complete. There are no persistent servers to seize, no disk images to forensically analyze, and no VPC logs that definitively tie activity back to a specific attacker-controlled instance. According to the 2025 State of Cloud Security report by Orca Security, nearly one-third of cloud assets are in a neglected state, signaling ongoing challenges with monitoring and prioritization that adversaries are actively exploiting.
The attribution challenge posed by serverless infrastructure is unprecedented. When adversary traffic originates from workers.dev subdomains, lambda-url.us-east-1.amazonaws.com, or script.google.com endpoints, it appears to the untrained eye as ordinary cloud provider traffic , the same traffic millions of legitimate applications generate every second. The 2020 BlackWater malware campaign demonstrated this effectively when it leveraged Cloudflare Workers as C2 redirectors, routing command-and-control communications through Cloudflare's edge network to mask the true backend server locations. APT41, one of the most prolific Chinese state-sponsored groups, has similarly utilized serverless infrastructure to blend their operations with legitimate cloud traffic patterns, making detection significantly more difficult for security teams relying on traditional IP-based blocklists.
In 2025, attackers are finding increasingly sophisticated ways to exploit misconfigurations, insecure functions, and excessive permissions in serverless environments. AWS Lambda functions with over-privileged IAM roles can be weaponized to access S3 buckets, DynamoDB tables, or other cloud resources. Google Apps Script abuse has been documented in credit card theft operations and Content Security Policy (CSP) bypass attacks. The CISA has issued guidance on securing cloud workloads, while NIST frameworks now include specific controls for Function-as-a-Service (FaaS) security. The MITRE ATT&CK framework formally tracks serverless abuse under T1583.007, acknowledging it as a distinct and growing threat vector within the Resource Development tactic.
Serverless Infrastructure Abuse (T1583.007) refers to the adversary practice of purchasing, configuring, or compromising serverless cloud infrastructure , such as AWS Lambda functions, Cloudflare Workers, Google Apps Scripts, or Azure Functions , that can be used during targeting operations. By utilizing serverless infrastructure, adversaries can make it more difficult to attribute infrastructure used during operations back to them. Once acquired, the serverless runtime environment can be leveraged to either respond directly to infected machines or to relay information between C2 servers and compromised hosts. As traffic generated by these functions originates from subdomains of trusted cloud providers, it may be difficult to distinguish from ordinary cloud traffic, significantly enhancing operational stealth.
Like using a disposable phone that automatically destroys itself after each call , there's no device to find, no record to trace, and it works from anywhere in the world. Imagine a burner phone that exists only for the exact seconds you're speaking, appears to dial from your carrier's own headquarters, and evaporates the instant you hang up. Serverless infrastructure operates on this principle: the function exists only when triggered, executes on cloud provider infrastructure, appears as legitimate provider traffic, and leaves behind no persistent footprint once it completes. There's no server to confiscate, no hard drive to image, and no IP address to block , because next time, the function might spin up in a completely different data center on the other side of the planet.
script.google.com endpoints.Maya Thompson, a sophisticated threat actor operating on behalf of a criminal enterprise, has been running a persistent credential harvesting campaign against financial services firms across North America and Europe. Her innovation isn't in the malware itself , it's a relatively standard info-stealer , but in her choice of command-and-control infrastructure.
Maya creates a free Cloudflare Workers account using a burner email address registered through Tor. Within minutes, she deploys a lightweight JavaScript Worker that acts as a reverse proxy , receiving HTTPS beacons from infected machines, decoding the embedded data, and forwarding it to her actual C2 backend hosted on a Bulletproof VPS in Eastern Europe. The Worker code is less than 50 lines of JavaScript. The endpoint URL , api.maya-cdn-check.workers.dev , looks like a legitimate CDN health check service.
When a defender at one of the target organizations detects the suspicious beacon traffic and attempts to block it, they identify the Cloudflare Workers domain. They add *.workers.dev to their firewall blocklist. But Maya anticipated this , she simply updates her Worker code to respond with a 302 redirect to a Google Apps Script URL. The malware on infected machines automatically follows the redirect, and C2 communication resumes through a completely different cloud provider within minutes.
Over the next several weeks, Maya rotates her backend infrastructure across three different Bulletproof hosting providers. Each time, she only needs to update a single variable in her Cloudflare Worker code , the backend URL. The endpoint URL that the malware calls never changes. From the perspective of the infected machines and network defenders, the C2 address has remained constant. In reality, traffic has been silently rerouted to five different backend servers across three countries.
After extracting over 12,000 credentials and 2.3GB of sensitive financial data, Maya deletes her Cloudflare Worker account entirely. Unlike a traditional VPS where disk images might survive, or a domain where WHOIS history persists, the Worker code and all execution logs are gone. She creates a new Workers account with a different email address and deploys fresh infrastructure for her next campaign. The forensic trail is effectively nonexistent , no server to seize, no container to analyze, no IP address to attribute.
Serverless infrastructure gives adversaries the ability to maintain persistent C2 channels while making backend rotation trivial. The endpoint URL stays the same while the actual destination changes, and when the operation ends, the infrastructure can be destroyed completely with no forensic artifacts remaining. Defenders who rely on IP-based indicators of compromise (IOCs) are fundamentally outmatched by this model.
Choose the optimal serverless platform based on operational requirements, geographic coverage, and evasion needs.
Establish accounts on the chosen platform(s) using identity-obscuring methods to prevent attribution.
Write and deploy serverless functions that serve as C2 relay points, payload delivery endpoints, or data exfiltration channels.
doPost/doGet web app endpoints for C2 communicationSet up event triggers that activate the malicious functions on demand or at scheduled intervals.
Verify that the deployed serverless infrastructure functions correctly and evades detection before operational use.
Continuously manage serverless infrastructure to maintain operational security and avoid detection.
Proactive threat hunters should monitor for the following behavioral patterns that may indicate serverless infrastructure is being abused for malicious purposes. These indicators go beyond simple IOC matching to focus on behavioral anomalies within cloud environments.
doPost/doGet handlers published as "Anyone" access, especially scripts that reference external URLs, use base64 encoding/decoding functions, or invoke UrlFetchApp with suspicious destinations
# AWS CloudTrail , New Lambda functions from new accounts
index=cloudtrail eventName=CreateFunction20150331
| stats count by userIdentity.arn, sourceIPAddress, requestParameters.functionName
| where count > 3 AND relative_time(now(), _time) < 24h
# Cloudflare , Workers API call patterns
index=cloudflare sourcetype=cf:workers analytics
| stats avg(duration), dc(clientIP) as unique_ips by workerName
| where avg(duration) > 500 AND unique_ips < 5
# GCP , Apps Script deployments as web apps
index=gcp resource.type="script.googleapis.com/Project"
protoPayload.methodName="script.projects.updateContent"
| where protoPayload.serviceData LIKE "%doPost%" OR LIKE "%doGet%"
Serverless abuse (T1583.007) is one of eight distinct sub-techniques under the Acquire Infrastructure parent technique (T1583). Adversaries often combine multiple infrastructure types , domains, VPS servers, DNS infrastructure, web services, and serverless functions , to create resilient, multi-layered operational platforms. Explore the related techniques below to understand the complete spectrum of infrastructure acquisition methods used by modern threat actors.
Every contribution moves us closer to our goal: making world-class cybersecurity education accessible to ALL.
Choose the amount of donation by yourself.