Attacks and Exploits

A web app's link-preview feature fetches any URL passed in a url parameter and returns the response. The tester wants cloud instance credentials from the hosting provider's internal metadata service. Which action is BEST?

Show the answer

Correct answerB. Submit the metadata service's link-local address as the url value

AWhy not this: A script tag tests XSS, which runs in a victim's browser and never makes the server call the metadata service.

BWhy this is right: The server sends the request from inside the network, so it can reach the metadata address and return the response to the tester.

CWhy not this: Directory traversal targets local file paths; it does not make the server request an internal HTTP service.

DWhy not this: Hosting a remote shell is an RFI idea; the feature only fetches and returns content, and the goal is internal credentials.

The feature makes server-side requests to any URL, so pointing it at the internal metadata address makes the server fetch and return credentials that outside clients cannot reach. Traversal reads local files and does not make the server issue internal HTTP requests.