Easy SSRF using Match and Replace, and a bonus on how to have your burp collaborator/server go crazy
The target website allowed users to set an iframe source in a template, and the server fetched that URL without proper restrictions. An attacker could use this to make requests to internal addresses, including the AWS metadata endpoint, potentially accessing sensitive cloud credentials.
Published on infosecwriteups.com
Match and Replace part is present in both paid and free editions of burp, and combined with the below link this should be useful for everyone.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application failed to validate or restrict the URLs that could be set as an iframe source, allowing requests to internal IP addresses.
What the attacker needed
A free account on the target website; ability to edit templates with iframe support; Burp Suite with Match and Replace
How it was found
- Register on the target website and go to the templates area.
- Choose a provided logo and save the change while capturing traffic in Burp.
- Find the reference to the logo in the request body.
- Replace the logo URL with an iframe source pointing to a test URL using Burp Match and Replace.
- Observe a pingback from an IP that is not the attacker's own IP.
- Try internal IP addresses and bypasses, such as using 0 for [redacted], and finally the AWS metadata IP [redacted] with a bypass.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The website let you put a web address in a template, and the server would visit that address. The attacker made the server visit internal addresses that are normally not reachable from the internet, like a special cloud address that holds secret keys. This is called server-side request forgery (SSRF).
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.