The GCP Metadata API
summary
GCP’s metadata API returns instance credentials and can be abused despite extra protections; defaults attach powerful service accounts to cloud functions and GKE nodes, letting any workload request an OAuth token with project-level editor privileges. Demonstrations include a headless-browser cloud function vulnerable to DNS rebinding that exfiltrates tokens and a malicious cloud build step that fetches a Google-managed token and reads buckets. Google adds host header validation and requires a custom metadata header; recommended fixes are per-project isolation, disable legacy endpoints, and metadata concealment / workload identity.
AI-written summary · about
chapters (12)
- 0:00Introduction to talk
- 1:43Metadata API basics
- 3:52Cloud Function vulnerability
- 7:48GCP metadata protections
- 8:32Resource hierarchy in GCP
- 9:58Service accounts explained
- 12:08Kubernetes Engine risks
- 14:36Demo metadata concealment
- 17:50Google managed service accounts
- 21:58Cloud Build attack demo
- 25:49Detecting malicious queries
- 28:34Remediation techniques
related talks
45mLive Hacking Cloud Architectures
30mSo, How Do Service Accounts Actually Work?
48mThe Accidental Discovery of a New Vulnerability in Google's OAuth Implementation
22mHow to Secure Cloud Machine Identities
22mThe Silent Breach: Security Threats in Google Workspace
44mLive Hacking Cloud Architectures
49mGoogle Cloud Storage - Building Systems with Security by Design and Default
44mCloud Metadata Abuse
