Skip to content
Threat Feed
low advisory

Rapid Enumeration of AWS S3 Buckets

An AWS principal rapidly enumerates S3 bucket posture using read-only APIs, indicative of reconnaissance, scanning, or post-compromise activity.

This threat brief covers suspicious activity related to the rapid enumeration of AWS S3 buckets. The activity is characterized by an AWS principal invoking read-only S3 control-plane APIs from the same source IP address within a short timeframe. This pattern is often associated with reconnaissance efforts, security scanning tools, or post-compromise enumeration activities. The behavior is similar to that observed with CSPM tools and by threat actors like Team PCP. The detection specifically excludes AWS service principals and requires programmatic-style sessions (i.e., not Management Console credentials). It focuses on scenarios where resource and identity fields are populated to avoid skewed results from null values. The detection threshold is set to greater than 15 distinct aws.cloudtrail.resources.arn values within a 10-second window.

Attack Chain

  1. An attacker gains initial access to an AWS environment using compromised credentials or through an exposed IAM role. (T1530)
  2. The attacker authenticates to AWS using the obtained credentials, creating a programmatic session.
  3. The attacker issues a series of GetBucketAcl, GetBucketPublicAccessBlock, GetBucketPolicy, GetBucketPolicyStatus, and GetBucketVersioning API calls to S3.
  4. These API calls are directed towards multiple distinct S3 buckets within a short timeframe (10 seconds).
  5. The attacker collects information about the bucket’s access control lists (ACLs), public access blocks, policies, versioning status, and other metadata. (T1526, T1580, T1619)
  6. The collected information is analyzed to identify publicly accessible buckets, misconfigurations, or sensitive data storage locations.
  7. The attacker uses identified vulnerabilities to exfiltrate data.
  8. The attacker attempts lateral movement within the AWS environment, leveraging the discovered information to compromise other resources.

Impact

Successful enumeration of S3 buckets can lead to the discovery of sensitive data, misconfigurations, and publicly accessible resources. This can result in data breaches, unauthorized access, and further compromise of the AWS environment. The enumeration allows an attacker to map out the S3 storage landscape, identifying targets for data exfiltration or privilege escalation. The rapid nature of the enumeration suggests automated scanning or reconnaissance, potentially indicating a larger attack campaign.

Recommendation

  • Deploy the following Sigma rule to detect rapid S3 bucket enumeration activity based on AWS CloudTrail logs, adjusting the threshold of 15 distinct buckets to suit your environment.
  • Investigate any alerts generated by the Sigma rule, focusing on the source IP address (source.ip), AWS principal ARN (aws.cloudtrail.user_identity.arn), and the list of accessed buckets (aws.cloudtrail.resources.arn).
  • Review IAM policies associated with the identified principal to ensure least privilege for S3 read APIs.
  • Monitor CloudTrail logs for related events, such as ListBuckets, GetObject, PutBucketPolicy, AssumeRole, or IAM changes, occurring within ±30 minutes of the detected enumeration activity.
  • Implement network-level restrictions on the source IP address if it is not authorized to perform S3 enumeration.
  • Document approved scanning accounts and add user agent filters to the provided Sigma rule to reduce noise from those identities.

Detection coverage 2

Detect Rapid AWS S3 Bucket Enumeration via CloudTrail

low

Detects an AWS principal enumerating multiple S3 buckets rapidly, indicative of reconnaissance or scanning.

sigma tactics: collection, discovery techniques: T1526, T1530 sources: cloudtrail, aws

Detect S3 Bucket Enumeration by Specific User Agent

low

Detects S3 bucket enumeration by a specific user agent, potentially indicating a specific tool or script.

sigma tactics: collection, discovery techniques: T1526, T1530 sources: cloudtrail, aws

Detection queries are kept inside the platform. Get full rules →