Skip to main content
Back
IntrusionAWS
9 min read

S3 data deleted for ransom with an exposed long-term key

Victim
An unnamed client of Invictus Incident Response
When
Not stated; the case was public by Apr 17, 2023Disclosed Apr 17, 2023
Entry
A publicly exposed long-term access key whose identity had rights to one S3 bucket; where and how it was exposed is not stated.

Invictus Incident Response describes a client whose AWS environment was entered with a long-term access key that had been publicly exposed; where and how it was exposed is not stated. The key's identity had rights to one S3 bucket: its calls to list IAM users, access keys and Amazon SES settings and its five attempts to create IAM users were denied, but it downloaded data from that bucket and suspended the bucket's versioning. Data was then deleted from several buckets and a ransom note left in them; no source dates the events, and the volumes, the ransom terms and whether data was recovered are not stated.

What happened

Outside parties
Key exposure, place unknown
Invictus Incident Response
Internet
AWS APIlong-term access key
Client S3 Buckets
+ exposed key's identity
+ IAM users and keys
+ Amazon SES
Client AWS Account
Bucket the key reaches
Other affected buckets
Ransom Note

Replaying the Invictus S3 ransom intrusion / date not stated; public by April 2023

  1. 1

    An exposed key

    Date not stated; outside CloudTrail's 90-day retention when investigated

    A long-term access key that had been publicly exposed is used against the client's AWS API. Where and how the key was exposed is not stated, and its first use fell outside CloudTrail's 90-day retention.

  2. 2

    Probing for more

    Date not stated

    The key calls ListUsers and ListAccessKeys, ListIdentities, GetSendQuota and ListServiceQuotas for Amazon SES, GetAccount and ListBuckets, and the calls return AccessDenied because its permissions are limited; whether the S3 bucket listing succeeded is not stated. It then calls CreateUser for five IAM user names, one of them root, and every call is denied.

  3. 3

    Data out

    Date not stated

    The key has full access to one S3 bucket and downloads data from it. CloudTrail data events are off, so the reads show only as a GetObject operation with data transfer out in the billing data, by hour and without a destination. The volume is not stated.

  4. 4

    Recovery switched off, data gone

    Date not stated; after the downloads

    GetBucketVersioning finds versioning enabled, and PutBucketVersioning sets it to Suspended. Data is then deleted from several buckets and a ransom note is left in them; the delete calls are not logged, and how a key scoped to one bucket reached several is not stated.

Impact

Data was taken from one S3 bucket, its versioning was suspended, data was deleted from several buckets and a ransom note was left in them. The volumes, the bucket count, the ransom terms and whether data was recovered are not stated.

Outcome

Where cloud-provider controls fit

Every step of this intrusion ran on one long-term access key that had been publicly exposed. A service control policy that denies every call of an IAM user without MFA refuses such a key only where the identity is an IAM user in a member account of an AWS organization; the sources state neither, so it bounds who can call and is not shown to refuse these calls. The listing calls and the user creation were already denied in the incident. S3 Object Lock or MFA delete keeps your bucket's versioning from being suspended, and Object Lock in compliance mode, or AWS Backup Vault Lock on your recovery points, keeps a copy of the deleted data for you to restore. How data in several buckets was deleted is not stated, so a service control policy on deletes bounds who can delete and is not shown to refuse these deletes.

Could this have been prevented?

In hindsight, not as a whole. 2 controls would have refused a step outright, and 10 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.

2
Prevented
10
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.

Outside parties
Key exposure, place unknown
Invictus Incident Response
Internet
AWS APIlong-term access key
Client S3 Buckets
+ exposed key's identity
+ IAM users and keys
+ Amazon SES
Client AWS Account
Bucket the key reaches
Other affected buckets
Ransom Note

Replaying the Invictus S3 ransom intrusion / date not stated; public by April 2023

1 · An exposed key

2 Contained3 on other clouds

2 · Probing for more

2 Contained6 on other clouds

3 · Data out

2 Contained3 on other clouds

4 · Recovery switched off, data gone

2 Prevented4 Contained6 on other clouds

Key facts

  • Invictus Incident Response investigated the client's AWS environment and published the case with the client's approval; it names no victim and dates no event of the incident
  • The attacker used a long-term access key that had been publicly exposed, identified from later events and open-source analysis; where and how it was exposed is not stated, and the first activity fell outside CloudTrail's 90-day retention
  • The key's identity had rights to one S3 bucket; its calls to list IAM users, access keys and Amazon SES settings returned AccessDenied, and five CreateUser attempts, one for a user named root, were denied
  • CloudTrail data events were not enabled, so the downloads from the bucket showed only as a GetObject operation with data transfer out in the AWS billing data, by hour and without a destination
  • CloudTrail recorded GetBucketVersioning with versioning enabled, then PutBucketVersioning setting it to Suspended; data was then deleted from several buckets and a ransom note left in them, and the volumes, the ransom terms and whether data was recovered are not stated
  • The case was public by April 17, 2023, the date of the firm's update to its Medium post; SANS cited it on July 5, 2023, and Invictus republished it on its own site on January 11, 2024

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.
    Ransomware in the cloudInvictus Incident Response · Jan 11, 2024 · ResearchEntry vector, reconnaissance calls, denied user creation, exfiltration evidence, versioning suspension, data deletion, ransom note, logging gaps, recommendations
  2. 2.
    CloudTrail events (CloudTrail.csv)Invictus Incident Response · Apr 11, 2023 · ResearchCloudTrail event names by phase, earliest publication date of the case material
  3. 3.
    Ransomware in the cloudctfiot.com (CTF导航) · undated · NewsMedium text of the case, the 17-04-2023 update note, publication by April 2023
  4. 4.
    Cloud RansomwareSANS Institute · Jul 5, 2023 · NewsPublic by July 5, 2023, summary of the entry vector and the user creation attempts

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