Attacks and Exploits
From a shell on an Azure VM, a tester requests the managed identity token path on 169.254.169.254 and gets 400 Bad Request. Which change fixes the request?
Show the answer
Correct answerD. Add the header "Metadata: true"
AWhy not this: This header is required by Google Cloud's metadata server, not by Azure's.
BWhy not this: The PUT token flow is AWS IMDSv2 and has no meaning on an Azure endpoint.
CWhy not this: The link-local metadata endpoint is plain HTTP, and switching to HTTPS would not supply the missing header.
DWhy this is right: Azure IMDS requires this header on every request, and a request without it returns 400.
The Azure Instance Metadata Service rejects requests that lack the "Metadata: true" header, which also blocks simple SSRF. The Google header and the AWS IMDSv2 token flow belong to other providers' metadata services and do not apply to an Azure endpoint.