Skip to main content
Back
IntrusionAWS
5 min read

Long-term AWS access keys used to list secrets, archive vaults and S3 buckets

Victim
Several unnamed AWS environments, including a Datadog customer's
When
May 23–27, 2024Disclosed Jun 19, 2024
Entry
Long-term IAM access keys (AKIA), which Datadog judges were likely leaked; how they were obtained is unconfirmed.

From May 23 to 27, 2024, Datadog Security Labs saw automated calls signed with long-term IAM access keys, which it judges were likely leaked, reach the AWS API from residential proxies and Cloudflare WARP. In one environment the key called ListSecrets and ListVaults in 17 regions in under a minute, and ListVaults was refused; in a second, the same infrastructure listed the S3 buckets and the objects of several of them. Datadog saw no secret or object read; Lacework describes another environment of the same campaign where a new administrator user and Amazon Bedrock use followed weeks later.

What happened

External Parties
Proxies + Cloudflare WARP
Datadog Security Labs
Internet
AWS APIlong-term access key
Secrets and Archive Environment
Bucket Environment
IAM User Access Key
AWS Secrets Manager
S3 Glacier Vaults
Amazon S3 Buckets
Object Listings

Replaying the AWS vault raiding May 2024 intrusion

  1. 1

    Long-term key from proxies

    From May 23, 2024

    Requests signed with a long-term IAM access key by the attacker's own code reach the AWS API from residential proxies and Cloudflare WARP and are authenticated; Datadog judges the key was likely leaked, which is unconfirmed.

  2. 2

    Secrets and vaults

    Between May 23 and 27, 2024

    The key of an IAM user calls ListSecrets and ListVaults in each of 17 regions in under a minute; ListVaults is refused, the ListSecrets result is not stated, and no GetSecretValue follows.

  3. 3

    Buckets

    Between May 23 and 27, 2024

    In a second environment, found by pivoting on the attacker's address, the same infrastructure lists the S3 buckets and the objects of several of them; no GetObject follows.

Impact

Secrets Manager and S3 Glacier were swept in 17 regions in one AWS environment, and the objects of several S3 buckets were listed in another; Datadog saw no read of a secret or an object.

Outcome

Where cloud-provider controls fit

On AWS, a service control policy that refuses an IAM user's calls without MFA, or one that accepts calls only from your own networks, bounds where a leaked key works in the member accounts of an organization; the sources do not say whether these accounts were member accounts, neither policy binds the management account, and the MFA statement leaves a root user's key outside it. A service control policy that denies unapproved regions and a permissions boundary on the IAM user would have narrowed the sweep of secrets and vaults, and the approved regions would still have answered. A bucket policy that keeps a bucket to your networks would have refused the object listing on that bucket. A resource control policy sets the same bound for the buckets of an organization's member accounts; resource control policies date from November 13, 2024, after the activity. How the key was obtained is unconfirmed, and Datadog saw no secret or object read.

Could this have been prevented?

In hindsight, not as a whole. 1 control would have refused a step outright, and 6 controls would have limited one. The counts below are control assessments, not attack stages: several can address the same step. The same replay with the controls in place before the incident shows where each phase would have been refused or bounded.

1
Prevented
6
Contained
0
Not covered

How it could have been prevented

The same replay with the controls in place. Green marks where a step is refused, blue where it is bounded, and red where no control reaches it. Open a row to read the control, why it acts, and its caveat.

External Parties
Proxies + Cloudflare WARP
Datadog Security Labs
Internet
AWS APIlong-term access key
Secrets and Archive Environment
Bucket Environment
IAM User Access Key
AWS Secrets Manager
S3 Glacier Vaults
Amazon S3 Buckets
Object Listings

Replaying the AWS vault raiding May 2024 intrusion

1 · Long-term key from proxies

2 Contained3 on other clouds

2 · Secrets and vaults

2 Contained3 on other clouds

3 · Buckets

1 Prevented2 Contained6 on other clouds

Key facts

  • The activity ran from May 23 to 27, 2024, and Datadog found it in a threat hunt in a customer's AWS environment
  • The requests were signed with long-term access keys (AKIA) by the attacker's own requests-auth-aws-sigv4 code and came from residential proxies and Cloudflare WARP; Datadog judged the keys were likely leaked, and how they were obtained is unconfirmed
  • In one environment an IAM user's key called ListSecrets and ListVaults across 17 regions in under a minute; ListVaults was refused with AccessDenied, and whether ListSecrets succeeded is not stated
  • In a second environment, found by pivoting on the attacker's IP address, the same infrastructure called ListBuckets, then ListObjects, and listed objects in several buckets
  • Datadog saw no GetSecretValue, BatchGetSecretValue or GetObject call, with S3 data events enabled
  • Lacework saw the same user agent in several customer environments; in one, reconnaissance was followed weeks later by a new administrator user, console access and Amazon Bedrock model calls

Sources

Every fact in this breakdown comes from the public reporting below. The replay is a model of that reporting, not a reconstruction of the environment it describes.

  1. 1.
    Tales from the cloud trenches: Raiding for AWS vaults, buckets, and secretsDatadog Security Labs · Jun 19, 2024 · ResearchDates, credential type, API calls, results of calls, source infrastructure, user agent, absence of exfiltration
  2. 2.
    Detecting AI resource-hijacking with Composite AlertsLacework Labs · Jun 6, 2024 · ResearchSame campaign, reconnaissance calls in several environments, follow-on privilege escalation and Bedrock use in another environment

The estate in the replay is illustrative and drawn at the level of attack stages; the victim's real environment is not public. Verdicts describe what a control does when it is in place before the incident. They are not an assessment of the victim's security program.

More cloud attack breakdowns

All breakdowns