Threat Actors Abuse Amazon Web Services in HazyBeacon Campaign

Command and control (C2) infrastructure is undergoing a significant architectural shift. Historically, malware beaconed to attacker-operated servers hosted on rented virtual private servers or compromised websites, allowing defenders to rely on IP reputation and domain blocking. Cloud computing blurs this boundary entirely.

Attackers now deploy C2 infrastructure inside legitimate cloud platforms using stolen Identity and Access Management (IAM) credentials.

The HazyBeacon campaign, documented by Palo Alto Networks Unit 42 in July 2025, perfectly illustrates the model of borrowed-Infrastructure attacks.

Instead of hosting dedicated command servers, adversaries deploy lightweight relays inside compromised AWS environments.

The victim’s cloud environment essentially becomes part of the attacker’s operational stack, making attribution incredibly difficult.

AWS Abuse Powers HazyBeacon

The effectiveness of this campaign relies heavily on AWS Lambda Function URLs, a feature introduced in April 2022.

This feature allows developers to expose serverless functions through dedicated HTTPS endpoints without configuring complex API Gateways or load balancers.

Threat actors specifically exploit configurations that allow unauthenticated, public access from anywhere on the internet.

This serverless attack surface maps directly to several MITRE ATT&CK techniques, including Valid Cloud Accounts (T1078.004), Serverless Execution (T1648), and using a Web Service for C2 (T1102). The deployment follows a predictable cyber kill chain.

Attackers harvest static IAM access keys from public GitHub repositories, developer phishing campaigns, or local credential files during the reconnaissance phase.

A Function URL is created with public access enabled, integrating the compromised AWS account directly into the attacker’s C2 network.

The Lambda function ultimately processes thousands of command requests per hour, serving as an unwitting relay for global espionage.

Preventing cloud infrastructure from becoming command infrastructure requires continuous visibility and control across identity, the control plane, and workload behavior.

TacticTechnique IDTechnique NameContext in HazyBeacon
Initial AccessT1078.004Valid Accounts Cloud AccountsUsage of stolen, static IAM Access Keys to enter the cloud environment.
ExecutionT1648Serverless ExecutionCreating new Lambda functions that persist independently of the compromised user session.

Identity effectively defines the new security perimeter in cloud-native environments. Campaigns like HazyBeacon depend entirely on compromised IAM credentials to deploy malicious functions.

If identity controls fail, defense mechanisms must shift to the control plane. Services such as AWS CloudTrail record the API calls used to create Lambda functions and Function URLs.

Monitoring anomalous API activity can reveal compromised credentials during the privilege-testing phase, long before attackers establish operational command-and-control relays.

Enforce Zero Trust policies using AWS Service Control Policies (SCPs) to strictly prohibit the creation of public Function URLs unless explicitly tagged for external use.

Monitor service-level cost anomalies by setting granular AWS budget alerts to detect unexpected spikes in Lambda compute usage, particularly in non-production regions.

Route Lambda workloads through Virtual Private Clouds to collect flow telemetry, which helps expose the one-to-one inbound and outbound request patterns typical of a C2 proxy.

Utilize cloud security posture management tools like Qualys TotalCloud to continuously monitor for exposed IAM credentials, risky configuration drift, and abnormal serverless activity.

Follow us on Google News , LinkedIn and X to Get More Instant Updates. Set Cyberpress as a Preferred Source in Google.

Varshini
Varshini
Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies..

Trending News

Related Stories