I read How does XSS work? but I still don't get this point .
Scenario :
- I run mybank.com site and an end user logs in to the site .
- Someone "injects" malicious code by submitting a GET that gets printed or echoed back .
- As far as I know your requests always goes to mybank.com because of cross domain request's disallowed by default .
- So how do I actually manage to sent contents to mysite.com assuming mysite is a malicious user's site who wants to exploit mybank.com's XSS vulnerabilities ?
If I can't change point 3 , then probably there is no way I could do 4 . But if 4 can be done is it done by changing window.location.href or document.location i.e breaking assumption 3 ? Now it behaves like it is mysite.com ?
Or is there any other way you could hijack site without 4 ?