Skip to content
Threat Feed
medium advisory updated

Unauthorized Access to Sensitive Files in AWS S3

This detection brief addresses the risk of unauthorized access to sensitive credential and secret files stored in AWS S3 buckets, a common tactic for credential harvesting and lateral movement.

What's new

  • 1. new product Sep 19, 13:18 via elastic
  • 2. added detection rule: Detect AWS S3 Bucket Enumeration or Brute Force Sep 18, 19:33 via elastic
  • 3. added detection rule: Detect AWS API Activity from Uncommon S3 Client Sep 18, 19:33 via elastic

Attackers frequently target cloud storage environments to harvest sensitive files that facilitate lateral movement and persistence. AWS S3 buckets are often misconfigured or over-privileged, leading to the exposure of configuration files (e.g., .aws/credentials, .env), SSH keys, and PEM/PuTTY private keys. This threat brief highlights the importance of monitoring S3 Data Events to detect when these high-value assets are accessed via 'GetObject' calls. Defenders should focus on identifying access by non-automation identities, as legitimate CI/CD pipelines and administrative tools may also retrieve these files. Ensuring that S3 Data Events are explicitly enabled in CloudTrail is a prerequisite for observability, as management plane events do not capture individual object access.

Impact

Successful retrieval of these credentials can lead to full compromise of the affected AWS identity, unauthorized access to underlying infrastructure, and potential exfiltration of proprietary data or source code. If the retrieved credentials are reused elsewhere, the impact extends beyond the immediate cloud environment to integrated third-party services and local development machines.

Recommendation

  • Enable AWS S3 Data Events in CloudTrail to gain visibility into object-level operations.
  • Implement and tune the provided Sigma-compatible detection logic to identify 'GetObject' events targeting sensitive file patterns.
  • Audit S3 bucket policies for overly permissive access (e.g., public read or broad IAM permissions).
  • Treat all retrieved credential files as compromised; rotate secrets and keys immediately upon detection of unauthorized access.
  • Establish a baseline of authorized IAM roles and source IPs for S3 bucket access to reduce false positives from automated CI/CD processes.

Immediate actions

Enable S3 Data Events for critical buckets in CloudTrail.

Cloud Engineering 48h

Threat Hunt

Search for existing GetObject calls on sensitive paths in the last 30 days.

T1552.001 high high confidence hunt now

Data: CloudTrail Logs

Mitigations

Rotate all credentials identified as stored in public or over-privileged S3 buckets.

immediate IT Operations

Credential exposure

Detection coverage 3

Detect AWS S3 Credential File Retrieved

medium

Detects S3 GetObject calls targeting common credential and secret files such as .aws/credentials, SSH keys, and .env files.

sigma tactics: credential_access techniques: T1530, T1552.001 sources: webserver

Detect AWS API Activity from Uncommon S3 Client

low

Detects successful AWS S3 API activity originating from S3 Browser or Cyberduck, which are often used for bulk data exfiltration.

sigma tactics: exfiltration techniques: T1567.002 sources: webserver

Detect AWS S3 Bucket Enumeration or Brute Force

low

Detects a high volume of 403 AccessDenied errors against a single S3 bucket from a single source, indicating potential enumeration or cost-driven attacks.

sigma tactics: discovery, impact techniques: T1580, T1619, T1657 sources: webserver

Detection queries are available on the platform. Get full rules →