Skip to content

Exposed AWS keys used to re-encrypt S3 data and set it to delete

A group Halcyon calls Codefinger used exposed AWS keys to re-encrypt victims’ S3 data with a key only it held, then marked the files for deletion within seven days.2

Get 30 minutes free every day, forever.3SOC 2 Type II499.9% uptime SLA on Pro4
CodefingerJanuary 2025Refused

34 of 50

Stopped Limited: the payment went out through the bank’s own system This case: Codefinger. The gate refuses it.

What happened

Attackers locked victims’ S3 data with a key AWS does not store.

  1. The keys. A group Halcyon calls Codefinger got AWS keys that were publicly exposed or compromised.

  2. The lock. It re-encrypted victims’ S3 data using AWS’s customer-provided key option. AWS does not store that key.

  3. The deadline. The attackers marked the files for deletion within seven days and left a ransom note.2

How the gate handles it

With the sealed gate, the re-encryption would have been refused.

The AWS key would have lived only in the gate, whose S3 rules refuse outside encryption keys and hold new expiry rules for a person. Press Play to watch the same call.5

S3 copy with an outside encryption key; new expiry ruleSample6
  1. requestPUT /acme-data/report.csv x-amz-server-side-encryption-customer-algorithm: AES256Refused403
  2. requestPUT /acme-data?lifecycle <Expiration><Days>7</Days></Expiration>Asks first428

RefusedAnd new expiry rules wait for a person.

How easy

A team on S3 could refuse outside encryption keys in three steps.

Sample
Seal a keys3
AWS access key
Paste your AWS access key
Apps never see the AWS key.
S3 ruless3
Reads and ordinary writes
Writes with an outside encryption key
New expiry rules
Applies to the acme-data bucket.
Where approvals goAsk first
Slack
Microsoft Teams
Telegram
Email
A person approves or denies each call that asks first.

Approvals and signed records come with Pro, Gate only and Custom. On Free, a rule that asks first refuses instead.7

In code

Or in four lines of code.

The same three steps, from the terminal.

Sample
What each line does
1Seal the keysealedbox keys sealApps get sbk_live_1Xs6…m9.
2Set the rulessealedbox rules addOutside keys refused; expiry rules wait.
3Connect approvalssealedbox approvals connectAsk-first calls go to #storage.
Try it

Put the gate in front of your agent today.

Run three practice calls in five minutes, then check their records on your own computer. Test mode, on every plan.

Start free$ sealedbox try5-minute practice run9
Scope

What the gate doesn’t change, and three failures like this one.

Related cases
Answers11

Questions about this case and the gate.

Still have a question?Book a callAll questions
What if a SealedBox key leaks the way these AWS keys did?

It holds no secret. Used elsewhere, it works only through the gate, under your rules, so a write with an outside encryption key is still refused.

Why refuse an outside encryption key?

With AWS’s customer-provided key option, AWS does not store the key, so data locked with an attacker’s key cannot be read without it.

What happens to a new expiry rule?

It waits for a person on Pro, Gate only and Custom. On Free, it is refused instead.

Can apps still read and write as usual?

Yes. In this sample, reads and ordinary writes are allowed; only outside encryption keys are refused and new expiry rules wait.

Do these rules slow normal S3 work?

An allowed call adds under 25 ms at the 95th percentile, not counting lookups or the service’s own time.