Use of a serverless edge worker service as a command-and-control relay for malicious traffic. Attackers route commands, exfiltration, or beaconing through short-lived worker code and edge endpoints, which can hide infrastructure, complicate blocking, and blend hostile requests into normal web delivery patterns.
What Cloudflare Workers Command And Control Means in Practice
Cloudflare Workers command and control is a C2 pattern, not a feature of the platform itself. The attacker uses an edge worker endpoint as a relay or broker for malicious traffic, which can obscure the real operator infrastructure, make simple IP blocking less effective, and let hostile activity inherit the appearance of ordinary web delivery.
That matters because defenders often treat serverless and edge-hosted traffic as inherently trusted or high-volume rather than adversary-controlled. The result is a weaker signal-to-noise ratio for malicious beaconing, command delivery, and exfiltration flows that are intentionally routed through a reputable service domain.
How Edge Worker C2 Blends Into Legitimate Web Traffic
Edge worker C2 usually works by placing short-lived code between the victim and the attacker-controlled backend. The worker may forward commands, transform requests, relay payloads, or act as a dead drop, so the visible traffic looks like normal requests to a legitimate cloud service even when the downstream objective is malicious.
This technique overlaps with other trust-abuse patterns, but the key feature is the use of an intermediary worker endpoint as the control plane. That allows the operator to swap backend infrastructure quickly, shift domains, and change content without exposing a stable server that defenders can easily blacklist.
Because the worker sits inside a large shared platform, simple indicators such as a known malicious host or a static IP often age out quickly. Detection therefore depends more on request behavior, path structure, header oddities, timing, and what the worker is doing with the traffic than on the hosting brand alone.
Why This Technique Is Hard to Block and Hunt
From a defender's perspective, edge worker C2 is attractive because it exploits legitimate cloud distribution paths and blends hostile traffic into normal web delivery patterns. That makes perimeter-only controls weaker, especially when security teams rely on broad allowlists for common cloud services without looking at request purpose or sequencing.
Short-lived worker code also reduces the value of static signatures. If the operator frequently rotates worker logic or changes the downstream destination, the observable shape of the campaign can stay stable only at the behavioral layer, such as repetitive polling, encoded tasking, or unusual egress timing.
Command and Control (C2) Guide is useful here because it covers beaconing, egress filtering, DNS analytics, and the common ATT&CK-style patterns that still apply even when the relay layer is cloud-hosted.
Cloud Services Abuse for C2 Guide is also relevant because the same trust-abuse logic appears when attackers hide command traffic inside widely used online services rather than exposing a conventional malicious server.
Exposure, Detection, and Response Priorities
Organisations should first identify where worker-based relay traffic is actually possible in their environment, including sanctioned edge platforms, shadow IT use of edge services, and any business workflows that already depend on those domains. Exposure is easiest to miss when the service is already approved for normal web delivery.
Detection is strongest when it combines network telemetry with cloud or proxy logs. Repeated low-volume polling, unusual response shaping, encoded parameters, atypical user agents, and outbound requests that do not fit the application's normal transaction profile are all more useful than a generic blocklist of the hosting provider.
Response usually requires both endpoint and cloud-side review. If the worker has been used as a relay, defenders should review adjacent logs for exfiltration, identify any credentials or sessions that were used to access the worker or its downstream systems, and remove the attacker path before blocking alone closes the visible channel.
Beaconing and C2 Detection Guide supports that approach with statistical beacon analysis, proxy and DNS hunting methods, and triage logic for distinguishing benign cloud traffic from command traffic.
MITRE ATT&CK T1095 Non-Application Layer Protocol is a useful companion when the relay abuses tunneling or nonstandard transport behavior, because the hunt logic and egress controls often overlap.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK addresses the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| MITRE ATT&CK | T1102 — Web Service | Cloudflare Workers C2 uses trusted web services as a relay channel. |
| T1071 — Application Layer Protocol | Workers-based C2 often hides commands inside normal web protocol exchanges. | |
| Recommendation — Monitor trusted-service traffic for command relay patterns and restrict abuse paths. Baseline application-layer traffic and flag unusual tasking or polling behavior. | ||
| CIS Controls v8 | CIS-12 — Network Infrastructure Management | Blocking and monitoring edge-relay abuse depends on managed network and egress controls. |
| Recommendation — Tighten egress control and review Internet-facing service exposure regularly. | ||
| NIST CSF 2.0 | DE.CM-01 — Networks and network services are monitored to find potential cybersecurity events | Detection of edge-worker C2 depends on monitoring network and service traffic for anomalies. |
| PR.DS-01 — Data-at-rest is protected | Worker-relayed exfiltration threatens the confidentiality of data moving through the service. | |
| Recommendation — Correlate service and network telemetry to spot suspicious relay behavior. Protect sensitive data paths and limit what worker-mediated flows can expose. | ||
Practitioner Guidance
What to watch for: Treat edge-worker relay traffic as a behavioral detection problem, not just a hosting problem. The practical question is whether the worker is serving users or merely relaying control traffic, because the same domain may support both legitimate content delivery and hostile command flow.
Governance implication: Owners of cloud and web platforms should define who can create, publish, and route through edge workers, then review whether those permissions are visible to security monitoring. If the platform is part of the attack surface, the logging, change control, and egress review around it need to be part of the security baseline.
Practitioner takeaway: A worker endpoint is not suspicious because it is serverless, it is suspicious when its request pattern, downstream routing, or response behavior shows it is being used as an operational relay rather than a normal application component.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org