Flaws Part 2
The write-up covers three AWS CTF levels: a public EBS snapshot exposed credentials, an SSRF flaw allowed access to EC2 instance metadata and temporary credentials, and overly permissive IAM policies let a user discover and invoke a Lambda function via API Gateway. An attacker could use these to escalate access within the cloud environment.
Published on systemweakness.com
FLAWS is a fun series of CTF challenges. It focuses on how AWS misconfigured services might lead to a breach.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely misconfigured AWS resources: a public EBS snapshot, an SSRF-vulnerable proxy with unrestricted access to the instance metadata service, and IAM policies that granted broad read access and allowed a Lambda to be invoked only via API Gateway.
Impact
An attacker could obtain credentials and access internal resources, potentially leading to further compromise within the AWS environment.
What the attacker needed
AWS account (free tier); credentials from previous level; ability to create EC2 and EBS resources
How it was found
- List snapshots using previous level credentials and find an unencrypted public snapshot.
- Create an EBS volume from the snapshot in the same availability zone and region.
- Launch an EC2 instance in the same zone and attach the volume.
- Mount the volume and read files in the home directory to find credentials.
- Use the proxy to access the instance metadata service and retrieve IAM credentials.
- Create a new AWS profile with the temporary credentials and session token.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This is a walkthrough of three cloud security challenges. In one, a backup of a server's disk was left public, so anyone could mount it and read files including passwords. In another, a web proxy could be tricked into fetching internal cloud metadata that holds temporary access keys. In the last, read-only permissions let a user map out other cloud resources and find a way to call a protected function.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.