A tester finds an SSRF flaw in a web app on an EC2 instance that still allows IMDSv1. Which two requests sent through the flaw retrieve the instance role's temporary credentials? (Choose two.)
Choose 2 answers
Show the answer
Correct answersA. Request that same path with the role name appended to read its temporary keysD. Request the iam/security-credentials/ path on 169.254.169.254 to learn the role name
AWhy this is right: Appending the role name to the path returns the AccessKeyId, SecretAccessKey and session token.
BWhy not this: A mounted runtime socket is a container escape route, not a way to reach the metadata service.
CWhy not this: An anonymous bucket listing targets exposed storage and never touches the instance role's credentials.
DWhy this is right: The metadata path returns the attached role's name, which the tester needs for the next request.
With IMDSv1, a plain GET through the SSRF flaw reaches the metadata service: the first request returns the role name and the second returns its temporary keys. A bucket listing tests exposed storage, which does not yield the instance role's credentials.