What type of exploit does S3 object encryption protect against?

The “Hans Gruber” exploit

Correct

The joke is really good, but on a serious note the main risk this encryption mitigates is intrusion from AWS employees themselves not external intuition in their data centre.

People with access to the raw instances where the data is stored get bored and snoop into random folders, but they should not have access to decryption keys, nor should they be able to elevate their access to run code as you.

I can think of a few scenarios where there is benefit, and I’m not even very imaginative. You might think they are esoteric scenarios, but it’s the esoteric scenarios you didn’t even think could happen where breaches and leaks happen.

That should be the case already, just by default

Such as?

If it’s encrypted at test using S3’s built in encryption, you can’t get the data without decrypting it. You just can’t get to the encrypted data stream (at least not by any means I’m aware of.)

If you’re talking about client side encryption with KMS then I agree.

Interesting. I did not know this. But this does require a KMS key, not the default S3 encryption key, right?

It’s Data At Rest encryption. In addition to what others have shared it can also protect against malicious injection to the data, without encryption someone with the correct physical access may be able to update data in unintended manners.

Off the top of my head:

  • Unscrupulous AWS insider exfiltrating data
  • Hacker compromising S3 infrastructure to exfiltrate data
  • Lost, stolen, or improperly disposed S3 hardware (disks fail and get replaced all the time)

Also, what nobody else is mentioning: crypto shredding. Delete your account, and they just have to delete your kms key(s), rendering all of your S3 objects unreadable. This is significantly easier, quicker, cheaper than zero-ing all the files, of which there are multiple copies that are spread across many disks in many regions.

Largely compliance I would assume, and to protect against AWS themselves (or anyone attacking AWS DCs) being able to see your data.
For a CMK scenario, the data is encrypted at client side before being uploaded to S3. So even if the object is grabbed, without client’s key it’s locked down.

There are also unlikely scenarios when decommissioning hardware.

I don’t know what their process is re: destruction vs wiping, but maybe somehow a drive doesn’t get destroyed or it falls out of a box/truck, and ends up in a stranger’s hands.

Of course, the S3 encryption keys gollows the S3 policy, KMS doesn’t so if you make the object or bucket public, the error "user anonymous doesn’t have access to KMS key (or something like that) is displayed

CIA triad principles

If they have access to the private S3 bucket, they will have access to the Kms keys too - your scenario just isn’t offering any real greater barrier to entry.

3 is the only scenario that would take place in reality.

1 + 2 - encryption won’t protect against this - if they’ve gotten that far already.

4 - that isn’t how it works.

Admin could change the policy.

There’s different levels of encryption:

You have encryption in transit, encryption at rest, even client side encryption.

Encryption at rest handles the usual physical security concerns, but client side encryption goes a step further in order to protect from the cloud service provider themselves.

There’s a few different implementations, but there’s a Java SDK that automatically generates data keys, encrypts all the data before sending to S3, calls KMS to encrypt the data key itself, and then adds the encrypted data key to the object metadata. (These details might be a little incorrect, I had to reverse engineer the process to decrypt in Python, but it’s been a few years.) The end result is that nobody other than the controller of the KMS key can ever access the data.

You don’t need to use KMS for this, and IMO, if you’re already mistrusting AWS, why keep your Master Keys there?

That’s not true. KMS design is actually pretty good. Read up on how it works. There’s a reason not even you as the owner can’t access the private key.