SSRF Write-ups

DuckDuckGo - SSRF Access AWS Data

Researcher illustrated vulnerability on the URL:

The image_host URL Parameter is vulnerable to SSRF. AWS Metadata can be viewed at the URI http://169.254.169.254/latest/meta-data/. The following payload returned the AWS Metadata of the instance using the URI in the image_host URL parameter.

Server Response:

Researcher illustrated using Curl

DuckDuckGo - SSRF & XSPA. Access to Redis and Couchbase db

Researcher discovered SSRF on the u URL parameter on endpoint https://duckduckgo.com/iu?u= . The URL parameter originally contained http://yimg.com/ . Anytime you see a URL used in a parameter like that it is a good indication that the parameter might be vulnerable to SSRF.

Original Request:

Original request returns HTTP 200

Changing URL parameter to https://google.com/ it gets rejected and returns HTTP 403 Forbidden.

HTTP 403 returned

Researcher discovered the URL parameter needs to contain the original yimg.com domain somewhere in the parameter. Adding that domain to the url parameter of an attacker controlled domain successfully bypasses this allow-list check and executes SSRF. In the image below the researcher used the yimg.com domain in a URL parameter q for the burp suite collaborator domain. In the Burp Collaborator Client the application can be seen reaching out over HTTP and DNS to query the attacker controlled domain.

SSRF Executed on burpcollaborator subdomain

Researcher also used this to perform XSPA and port scan internal services. Services are running on the following ports:

Returning Redis information with the payload:https://duckduckgo.com/iu/?u=http://127.0.0.1:6868%2fstatus%2f?q=http://yimg.com/

Couchbase database access: https://duckduckgo.com/iu/?u=http://cache-services.duckduckgo.com:8091/pools/default/buckets?q=http://yimg.com/

Last updated

Was this helpful?