Exposed etcd Backups
One snapshot, and the whole cluster's Secrets are readable.
What Is Exposed etcd Backups?
Every Secret, token and config in a cluster lives in etcd, and its backups usually leave the cluster's protection entirely. You'll find an etcd snapshot in a bucket that allows anonymous reads, pull a live service token straight out of it without touching the cluster, and use it. Then you'll encrypt Secrets at rest with a KMS key, encrypt and lock the backup storage, and rotate the token, because no fix recalls a copy already taken. Maps to OWASP Kubernetes Top Ten etcd and backup guidance (2022 K09).
What You'll Learn in Exposed etcd Backups
- Explain that an etcd snapshot contains the entire cluster's Secrets.
- Recognize that reading a backup bypasses RBAC, audit and the API server.
- Enable encryption at rest so snapshots contain ciphertext.
- Lock down and encrypt backup storage, and rotate Secrets a snapshot exposed.
Exposed etcd Backups — Training Steps
-
A bucket of backups
Bob found a Wendralow storage bucket that allows anonymous listing, named for cluster backups. He has no access to the bank's cluster and does not need it. Wendralow is a digital bank. Its Kubernetes clusters hold the Secrets for every internal service.
-
Pull a snapshot
Bob copies the most recent snapshot to his own machine, still without credentials.
-
Read a Secret out of the snapshot
etcd stores Secrets as the API server wrote them. Bob searches the raw snapshot for a service Secret and finds it in the clear.
-
Use the token
Bob uses the token against the internal payments service it belongs to.
-
Check your understanding
-
A token used that we cannot trace
Wendralow's security team sees a service token used from outside and cannot find any cluster access behind it.
-
Confirm the bucket is public
Alice checks the backup bucket's public access setting.
-
Open the encryption config and the backup job
Alice opens the API server's encryption configuration and the snapshot CronJob.
-
Secrets stored in the clear
With the identity encryption provider first, the API server writes Secrets to etcd unencrypted, so every snapshot contains them in plain text.
-
Encrypt Secrets at rest
Alice puts a KMS provider first, so Secrets are encrypted with a key held outside the cluster. A snapshot then contains ciphertext that is useless without the key.
Security Framework Coverage
CWE
- CWE-311 Missing Encryption of Sensitive Data
- CWE-732 Incorrect Permission Assignment for Critical Resource
MITRE ATT&CK
- T1530 Data from Cloud Storage
- T1552.007 Unsecured Credentials: Container API
CIS Controls
- CIS 3 Data Protection
- CIS 11 Data Recovery
NIST CSF
- PR.AT-02 Individuals in specialized roles are provided with awareness and training so that they possess the knowledge and skills to perform relevant tasks with cybersecurity risks in mind
- PR.DS Data Security
- RC.RP Incident Recovery Plan Execution
NICE Framework
- IO-WRL-005 Systems Administration
- DD-WRL-001 Cybersecurity Architecture