The Codespaces hack still teaches us about AWS backup. One attacker, one AWS account, and a company was deleted in hours, backups and all.
This is an encore episode of The Backup Wrap-Up, the third in our Cloud Disasters encore series. We picked these based on how much of each episode people actually watched and listened to, not just how many people downloaded it. This one had the highest listen-through of the whole series. On average, people got through more than the entire episode, which means a lot of you came back to it more than once.
Back in 2014, Code Spaces was a code hosting company, kind of like GitHub, with more than 200 companies trusting it with their code. Their website even bragged about a recovery plan "proven to work time and time again." Then an attacker got into their AWS account.
First came a DDoS attack as a distraction. Then a ransom note, left right in the AWS dashboard. When Code Spaces tried to lock the attacker out, they found the attacker had already created backup admin logins. So the attacker started deleting. EBS snapshots, S3 buckets, AMIs, machine instances, and the backups, because the backups lived in the same account. Code Spaces announced it could not continue operating.
I always use this story when I talk about backup design in the cloud. Nobody tells me they don't need to back up EC2. But I see this exact backup design all the time: production and backups in the same account, protected by the same credentials. One bad day takes out both.
In this episode, we cover:
- How the attacker probably got in, and why stored keys in public code repositories are still a problem
- Why a DDoS attack is often just a distraction
- How the attacker kept access even after Code Spaces changed its passwords
- Why the 3-2-1 rule means a copy in a different account, and ideally a different company
- Object lock, MFA, and least privilege, and which of those existed back then
- A "nuclear button" plan for locking down a compromised cloud account
- Monitoring for new super-user accounts before it's too late
- Why the 200-plus Code Spaces customers needed their own copy too
Got a better idea for locking down a hacked cloud account? Leave us a voicemail at backupwrapup.com. We might even play it on the show.
🎧 Listen to the podcast: https://www.backupwrapup.com/codespaces-hack-breach-deleted-company/
📕 Learning Ransomware Response & Recovery (O'Reilly): https://www.oreilly.com/library/view/learning-ransomware-response/9781098169572/
🛡️ What Mike and I are building: https://www.stopransomware.com
CHAPTERS
00:00 Encore intro: one bad day takes out both
02:18 Welcome, and Curtis's Tesla obsession
04:49 Back up the cloud: the cloud is not magic
06:31 2014 and the rise of ransomware
07:23 What Code Spaces was
08:26 A recovery plan "proven to work"
09:16 Poor backup design and the 3-2-1 rule
10:26 How the attacker got in
11:32 A DDoS as a distraction
12:23 The ransom note in the AWS dashboard
13:37 Trying to lock out the attacker
14:47 What got deleted
17:25 "We have no alternative but to cease trading"
19:08 What they should have done: a different account
21:07 Object lock and MFA
23:11 Least privilege
24:00 A nuclear button for a compromised account
28:31 Monitoring for new privileged accounts
29:18 The summary: follow the 3-2-1 rule
30:05 What about Code Spaces' customers?
31:38 Final thoughts