NEWPractise supported commands in browser simulations, alongside the lesson.Try a browser practice exercise.Try a lab♥ Codelivly is 100% free, no paywall. If it helped you, chip in to keep it running.100% free. Help keep it so.Support us
Network Forensics
Network traffic is the nervous system of any organization, and for attackers, it is the highway used for initial access,
ViewDFIR Reporting and Case Management
Effective incident response doesn't end when the threat is eradicated; it concludes with clear, actionable reporting and
ViewPreview · 30 min
Master IMDS exploitation and defense. Learn how attackers use SSRF to steal cloud credentials, and how to enforce IMDSv2 to secure your EC2 instances.
The Instance Metadata Service (IMDS) is a built-in HTTP service of the cloud provider (AWS, Azure and GCP all have one). A running compute instance uses it to ask questions about itself. The answers range from simple facts, like the AMI ID, the instance type and the network interfaces, to the most sensitive data of all: the temporary IAM credentials of the role attached to the instance.
IMDS solves a real problem. A workload needs to read an S3 bucket or a database, but you do not want long-lived static access keys in the code or in a config file. With IMDS the application asks the local service and gets short-lived credentials that rotate on their own.
The convenience has a price. The service sits on a reserved link-local address (169.254.169.254 in AWS; the IPv6 address is fd00:ec2::254). That address is only reachable from inside the instance. But if an application on the instance can be made to send HTTP requests that someone else controls, a flaw called Server-Side Request Forgery (SSRF), the application becomes a messenger and can fetch the metadata for the wrong person. If the instance role is broad, a small application bug becomes an account-wide breach.
Create a free account to unlock the rest of this task, complete tasks, and earn Rep.
Sign in