Abusing native cloud services for Command and Control
Stephen Bradshaw
BSides Canberra VIII (2025) · Day 3 · Main Track
Overview
In this insightful talk from BSides Canberra, Stephen Bradshaw delves into the evolving landscape of Command and Control (C2) operations, specifically focusing on how attackers are increasingly leveraging legitimate, native cloud services from major providers like Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP) to establish covert communication channels. Bradshaw introduces and elaborates on the concept of a high reputation redirector, a critical component in modern C2 infrastructure designed to evade detection by blending malicious traffic with benign activity on trusted domains.

Key moments
- 0:40 What is Command and Control (C2)?
- 4:00 Issues with simple C2 infrastructure designs
- 6:30 Introducing the High Reputation Redirector concept
- 8:00 Key characteristics for C2 redirector services
- 12:40 Overview of cloud service categories for C2 redirection
- 19:30 Legal considerations and cloud provider monitoring
- 21:50 Q&A: Defending against sophisticated C2 communication
Abusing Native Cloud Services for Command and Control
Speakers: Stephen Bradshaw
Conference: BSides Canberra
YouTube: https://www.youtube.com/watch?v=9QE_FeJhiRc
Overview
In this insightful talk from BSides Canberra, Stephen Bradshaw delves into the evolving landscape of Command and Control (C2) operations, specifically focusing on how attackers are increasingly leveraging legitimate, native cloud services from major providers like Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP) to establish covert communication channels. Bradshaw introduces and elaborates on the concept of a high reputation redirector, a critical component in modern C2 infrastructure designed to evade detection by blending malicious traffic with benign activity on trusted domains.
The presentation systematically dissects the shortcomings of traditional, simple C2 architectures and demonstrates how cloud services can effectively mitigate these vulnerabilities, offering attackers enhanced stealth, resilience, and operational flexibility. By providing a comprehensive overview of various cloud service categories—from virtual machine instances and Content Delivery Networks (CDNs) to API gateways and serverless functions—Bradshaw illuminates the diverse array of options available for constructing highly evasive C2 redirectors. This talk is essential for both offensive security professionals seeking to refine their tradecraft and, crucially, for defensive teams striving to understand and counter sophisticated threats that exploit the very infrastructure of the cloud.
Background
▶ Watch: What is Command and Control (C2)? (0:40)
Command and Control (C2) is a post-exploitation activity, occurring after an attacker has successfully compromised a victim host. Its primary purpose is to maintain persistent access and control over the compromised system, enabling attackers to issue commands, exfiltrate data, and further their objectives. For C2 to be effective, it must remain hidden from detection, encompassing three key areas: hiding the client or implant on the infected host (avoiding antivirus/EDR), hiding communication between the client and the C2 server (using expected network traffic), and hiding the C2 server itself on the internet (making it appear innocuous).
Common communication protocols for C2 include HTTP, HTTPS, DNS, and even custom protocols embedded within legitimate applications like Slack or Discord. Stephen Bradshaw's talk specifically focuses on HTTP and HTTPS due to their widespread allowance in corporate environments, extensive support in commercial and open-source C2 software (such as Mythic, Cobalt Strike, and Sliver), and the architectural flexibility they provide through various proxying, filtering, and redirection capabilities.
A simple C2 architecture, where a C2 server directly listens for implant communications on a custom domain (e.g., www.evil.com), presents several critical vulnerabilities. Firstly, new domains are inherently untrusted by domain reputation databases, which rely on a history of legitimate traffic to assign trustworthiness. Using a public IP address directly is also suspicious, as direct HTTP communication to IPs is rare and complicates HTTPS setup. Secondly, direct exposure of the C2 server to the internet increases its fingerprintability and detectability. Techniques like JAM can analyze unique characteristics of TLS negotiation to identify directly connected C2 servers. Finally, this direct binding creates a lack of separation; if the implant endpoint is detected and "burned," the entire C2 infrastructure is compromised and must be rebuilt.
To address these issues, the concept of a high reputation redirector emerged. First discussed on the Cobalt Strike blog in early 2017, a redirector acts as middleware, receiving traffic and forwarding it to a backend C2 server. A "high reputation" redirector leverages a service with an established, positive reputation, effectively hiding malicious C2 traffic within a large volume of legitimate activity. This design introduces separation, uses a more trusted address, and allows for the replacement of redirectors without compromising the core C2 server, significantly enhancing the resilience and stealth of C2 operations.
Key Findings
▶ Watch: Introducing the High Reputation Redirector concept (6:30)
The core finding of Bradshaw's research is the viability and effectiveness of numerous native cloud services as high reputation redirectors for Command and Control (C2). His work identifies and verifies a broad spectrum of services across AWS, Azure, and GCP that can be configured to forward C2 traffic while leveraging the cloud provider's highly trusted domains, thereby circumventing traditional domain reputation databases and network filtering mechanisms.
Bradshaw established a clear set of criteria for identifying suitable services:
- HTTP/HTTPS Redirection: The service must be capable of receiving HTTP/HTTPS traffic and forwarding it to a configurable backend C2 server.
- Trusted Cloud Provider Domain: Crucially, the service must provide an automatically generated domain name that carries the inherent trust of the cloud provider (e.g.,
cloudfront.net,azurewebsites.net), eliminating the need for attackers to "age" their own domains. - Automatic HTTPS/SSL Certificates: Ideally, the service should automatically provision and manage SSL certificates, simplifying setup and ensuring encrypted, trusted communication.
- HTTP Method Support: Support for at least GET and POST methods is essential for most C2 frameworks.
- Binary Content Support: The service must handle binary data in message bodies without corruption.
- Caching Disablement: Any caching functionality must be capable of being disabled, as caching would break the dynamic nature of C2 communications.
- Cookie Retention: The service needs to retain any cookies set by the backend C2 server.
- URL Path and Query Parameter Preservation: The original URL path and query parameters sent by the client must be passed through to the backend unmodified, although consistent prefixes (e.g.,
/api/) can be allowed.
Bradshaw's extensive testing over six months confirmed that while the cloud landscape is fast-moving and configurations can change (as evidenced by a 2023 Azure CDN approach no longer working), many services remain viable. He specifically noted that Google App Engine was identified as an early example, working since 2017, even before the concept was widely popularized. His research highlights a significant challenge for defenders: the sheer volume and legitimate nature of traffic to these cloud services make it exceedingly difficult to distinguish malicious C2 activity from normal operations.
Technical Deep Dive
▶ Watch: Key characteristics for C2 redirector services (8:00)
Stephen Bradshaw's talk provides a detailed exploration of various cloud service categories that can function as high reputation redirectors for C2, outlining their specific characteristics and implementation quirks across AWS, Azure, and GCP.
- VM Instance Domain Names:
- Description: This category involves creating a standard Virtual Machine (VM) instance, assigning it a public IP, and then leveraging the cloud provider's associated domain name. A proxy (e.g., Apache or Nginx) or custom tool is then configured on the VM to forward traffic to the C2 server.
- AWS: EC2 instances get domain names like
ec2-X-X-X-X.compute-1.amazonaws.com. While trusted by reputation databases, theec2prefix makes their origin obvious. - Azure: VMs get domain names like
yourchosenlabel.region.cloudapp.azure.com, offering slightly more customization in the name. - HTTPS: Requires manual setup, typically using Let's Encrypt for free SSL certificates.
- Quirks: Bradshaw notes this as his "least favorite" due to the significant manual OS-level configuration required.
- Content Delivery Networks (CDNs):
- Description: CDNs are designed to deliver web content globally by caching it at edge locations. They can be configured to act as a reverse proxy, forwarding requests to a backend.
- AWS: CloudFront distributions provide domains like
d[random-characters].cloudfront.net. - Azure: Front Door offers domains such as
yourlabel-random.number.number.fd.net. - HTTPS: Automatically provided.
- Quirks: Crucially, caching must be disabled as it would break C2 communication.
- GCP: GCP has a CDN, but it does not provide a cloud provider domain name, requiring users to bring their own custom domain, thus making it less suitable for this specific use case.
- API Services:
- Description: These services are designed to expose HTTP APIs to the internet, often with built-in security and management features.
- AWS: API Gateway provides highly trusted domain names. It can either directly proxy to a backend HTTP service or trigger an AWS Lambda function.
- Azure: API Management Service can be configured to forward traffic.
- GCP: API Gateway also works.
- HTTPS: Automatically provided.
- Quirks: Configuration for Azure and GCP can be "trickier," requiring custom OpenAPI or Swagger definitions to ensure all traffic is forwarded correctly, a process Bradshaw found poorly documented for this specific C2 use case.
- Managed Website Services:
- Description: These platforms simplify the deployment and hosting of web applications.
- AWS: Amplify and Elastic Beanstalk can host web apps that forward traffic.
- HTTPS: Amplify provides it automatically; Elastic Beanstalk requires manual setup.
- Quirks: Amplify can be configured to forward traffic directly, while Elastic Beanstalk often uses a custom Python app for redirection.
- Container Execution Services:
- Description: These services allow users to run Docker containers that are accessible via HTTP/HTTPS on the internet.
- AWS: App Runner
- Azure: Container Apps
- GCP: Cloud Run (noted as special as it can run both containers and serverless code).
- HTTPS: Automatically provided for all.
- Quirks: These services abstract away much of the underlying infrastructure, making deployment straightforward.
- Serverless Code Execution:
- Description: These platforms execute user-provided code snippets (functions) in a lightweight, ephemeral environment, typically triggered by HTTP requests.
- AWS: Lambda (can be accessed directly via a function URL or fronted by API Gateway).
- Azure: Function Apps
- GCP: Cloud Run, Google App Engine, and Cloud Functions.
- HTTPS: Automatically provided for all.
- Quirks: These services are highly scalable and cost-effective, ideal for dynamic C2 operations. The domain names often include identifiers related to the function or service (e.g.,
[id].lambda-url.region.on.aws).
Bradshaw emphasizes that he has documented the detailed setup procedures for these various approaches on his personal blog, with over 12 posts since 2023, enabling interested parties to replicate and test these C2 redirector implementations.
Demo / Proof of Concept
▶ Watch: Legal considerations and cloud provider monitoring (19:30)
While Stephen Bradshaw's talk did not feature a live, in-conference demonstration of these Command and Control (C2) redirectors, he extensively referenced his personal blog as a resource for detailed setup instructions and proof-of-concept guides. He stated that he has published "about 12 different posts going back to 2023 talking about how to set up each of these different approaches in detail," allowing attendees and researchers to "proof of concept it yourself if you're interested." This approach provides a persistent and detailed resource for replicating the techniques discussed, covering the intricacies of configuring each cloud service for C2 redirection.
Defensive Implications
▶ Watch: Q&A: Defending against sophisticated C2 communication (21:50)
The proliferation of high reputation redirectors leveraging native cloud services presents a significant and evolving challenge for defenders. As Bradshaw highlights, this is a constant "arms race" where attackers continuously adapt to evade detection. The primary defensive implication is that traditional security mechanisms, particularly those relying on domain reputation databases or simple IP blacklisting, become largely ineffective. When C2 traffic flows over a domain like d[random-characters].cloudfront.net or yourchosenlabel.region.cloudapp.azure.com, it's indistinguishable from legitimate traffic to those highly trusted cloud services.
Next-Generation Firewalls (NGFWs) and other network-based security solutions struggle to differentiate malicious C2 from benign application traffic when both originate from and terminate on legitimate cloud infrastructure and often utilize encrypted HTTPS channels. Defenders must shift their focus from static indicators of compromise (IOCs) to more dynamic and behavioral detection methods. This includes:
- Endpoint Detection and Response (EDR): Enhancing EDR capabilities to detect suspicious process behavior, unusual network connections from implants, or deviations from baselined application activity, regardless of the network destination's reputation.
- Cloud Logging and Monitoring: Leveraging comprehensive logging from cloud providers (e.g., AWS CloudTrail, Azure Monitor, GCP Cloud Logging) to detect anomalous configurations, resource creation, or access patterns that might indicate C2 infrastructure deployment. However, this requires significant expertise to sift through vast amounts of data.
- Behavioral Analysis: Implementing systems that can identify unusual traffic patterns, command frequencies, data exfiltration volumes, or communication timings that deviate from normal application behavior, even if the destination is a trusted cloud domain.
- TLS Fingerprinting: While JAM and similar techniques can detect directly exposed C2 servers, they are less effective when C2 is hidden behind legitimate cloud services that handle TLS termination and re-encryption. However, monitoring for unique TLS client fingerprints from internal hosts connecting to any external service could still provide value.
- Application-Layer Visibility: For services like API Gateways, deeper inspection of HTTP headers, request bodies, and URL parameters might reveal C2-specific patterns, although this can be computationally intensive and subject to encryption.
Finally, Bradshaw touched upon the legal aspects, noting that cloud providers do have terms of service. AWS, for instance, requires a "simulated events form" for red team activities involving C2, granting permission for about 90 days. While Azure and GCP terms were less explicit regarding C2, all providers prohibit illegal activity. This implies that while providers may not actively monitor for this specific C2 abuse without an abuse report, they will act if abuse is reported, highlighting the importance of understanding cloud provider policies for both attackers and defenders.
Key Takeaways
- High Reputation Redirectors are Essential for Modern C2: They provide critical stealth and resilience by masking malicious traffic within legitimate cloud service domains, making traditional reputation-based detection ineffective.
- Native Cloud Services Offer Diverse C2 Options: AWS, Azure, and GCP provide a wide array of services—from CDNs and API gateways to serverless functions and container platforms—that can be repurposed as C2 redirectors.
- Cloud Provider Domains Grant Inherent Trust: Leveraging the established trust of cloud provider domains (e.g.,
cloudfront.net,azurewebsites.net) allows attackers to bypass common domain reputation checks and network filtering. - Automatic HTTPS Simplifies Operations and Blends In: Many cloud services automatically provision and manage SSL certificates, ensuring encrypted C2 communications that appear legitimate and blend seamlessly with standard web traffic.
- Defenders Must Evolve Beyond Static IOCs: Effective defense requires a shift towards behavioral analysis, enhanced endpoint monitoring, and deep cloud logging to detect anomalies, rather than relying solely on blacklists or domain reputation.
- The Cloud C2 Landscape is Dynamic: Services and configurations change frequently, necessitating continuous research and adaptation for both offensive and defensive security practitioners.
About the Speaker(s)
Stephen Bradshaw is a security professional and researcher with a keen focus on advanced Command and Control (C2) techniques, particularly those involving the abuse of native cloud services. His work, as presented at BSides Canberra, demonstrates a deep understanding of cloud infrastructure and its potential for covert operations. Bradshaw is actively involved in testing and verifying various cloud service configurations for C2 redirection across AWS, Azure, and GCP, and he regularly shares his detailed findings and proof-of-concept implementations on his personal blog, contributing significantly to the community's understanding of this rapidly evolving threat landscape.