312-50 ยท Cloud computing security
Cloud attack techniques
Metadata service abuse, IAM privilege escalation, credential leakage in repositories, wrapping attacks, side-channel and cloud cryptojacking.
Key points
- Metadata service abuse: SSRF makes a server query 169.254.169.254 and leak its role credentials.
- IMDSv2 (session token via PUT) blocks simple SSRF.
- IAM privilege escalation: abusing permissions such as passing or editing roles.
- Credential leakage: keys in public repositories.
- Wrapping attacks: forged XML signature wrappers in SOAP/SAML.
- Side-channel attacks on shared hardware. Cryptojacking: hijacked compute mines coins.
Source: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html
Practice questions
What is the link-local address of the EC2 instance metadata service?
- 127.0.0.1
- 10.0.0.1
- 169.254.169.254
- 192.168.0.254
Show answer
Answer: C. 169.254.169.254
IMDS is reachable at 169.254.169.254 from inside the instance; this is why SSRF to it is dangerous.
Which are realistic ways cloud credentials leak?
- Access keys committed to a public Git repository
- Secrets baked into a container image pushed to a public registry
- A password stored in a managed secrets vault
- An MFA prompt on the admin console
- A role with a short-lived session token
Show answer
Answer: A. Access keys committed to a public Git repository, B. Secrets baked into a container image pushed to a public registry
Keys in a public repository and in a shared container image are common leaks. Hashing a password in a vault or MFA prompts do not expose credentials.
True or false: deleting a leaked access key from the latest commit is enough to make the repository safe.
Show answer
Answer: False
False. The key remains in Git history and may already be harvested; it must be revoked and rotated.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
