A web app that queries the backend to retrieve your previously sent messages
To test if this feature is vulnerable to XXE, we could try and retrieve a local file
To do so, we'd have to add the XML entity definition ourselves:
Afterwards, include your entity in the field and send the request
The response should contain the contents of the local file "/etc/passwd"
But we can also take the same approach to request an internal or external resource and escalate this into an SSRF vulnerability!
2โฃ Exploitation via OOB technique
This exploitation technique involves us hosting a DTD file and referencing it in our payload
The XML parser will then parse our malicious XML data and retrieve the external DTD
That DTD file contains our payload
And just as before, we can send our request and retrieve the contents of a local file for example!
We hope you've learned something new from this thread on XXE exploitation:
If you have enjoyed this thread: 1. Follow us @INTIGRITI for more of these threads ๐๏ธ 2. Retweet the first Tweet to share it with your friends ๐๏ธ
Do you want to find more vulnerabilities with recon? ๐ค
Open this thread (step-by-step guide)! ๐งต ๐
Before we dive in, let's first cover what recon (short for 'reconnaissance') is.
Recon is the first crucial phase of any engagement and it involves mapping out (sub)domains, IP ranges, technologies and services, as well as any other publicly accessible information through several techniques
Bug bounty hunters who spend time performing reconnaissance, are almost always rewarded well for their efforts as they often come across exposed assets or hosts that have never been tested before ๐ค
Let's now dive deeper into how you can find these untested assets to find more vulnerabilities! ๐
12 API hacking bug bounty tips you must try on your target! ๐
๐งต ๐
1๏ธโฃ Blind XSS via request headers
Applications log your data in various ways, including in insecure ways. Always test for blind XSS vulnerabilities by injecting your payload in common request headers, such as:
โข Referrer
โข X-Forwarded-For, X-Forwarded-Host, X-Forwarded-Ip, Host (in case of a reverse proxy)
โข User-Agent
โข Etc.
Are your request paths prefixed with an "/api/v2"? Try testing legacy endpoints by:
โข Replacing "/api/v2" with "/api/v1"
โข Removing "/v2" altogether
Try similarly in case it's a subdomain: api-v2\.example\.com โ api-v1\.example\.com or api\.example\.com
XML eXternal Entity (XXE) injection is a vulnerability class that stems from inadequate user input validation during XML parsing, allowing attackers to take advantage of parser misconfigurations!
This often leads to local file read, server-side request forgery, and, in severe cases, even remote code execution!
However, XXE vulnerabilities are much harder to spot nowadays.
You must pay close attention to application components that might accept and process XML data, such as:
โข Document converters (Word/Excel)
โข SVG file processors
โข RSS/Atom feed processors
โข Importing features (accepting XML data)