XSS vulnerabilities are caused due to unsanitized user input that is then displayed on a web page in HTML format. These vulnerabilities allow malicious attackers to inject client side scripts, such as JavaScript, into web pages viewed by other users.
Although XSS attacks don't directly compromise a machine, these attacks can still have significant impacts, such as cookie stealing and authentication bypass, redirecting the victim’s browser to a malicious HTML page, and more."
**Only JavaScript or VbScript embedded in auth.y.com can read cookies belonging to auth.y.com**
reflected = non persistence, echoed back immediately. In the HTTP request!
stored = persistence, stored in web application
DOM XSS = lives within the DOM environment, a page's client-side script itself and soes not reach server-side code
Camouflage URL
tinyurl
iframes
link in a targeted email
<plaintext> tag/payload for testing
alert('abc');alert(document.cookie)
string.fromCharCode(xxx, xxx, xxx)
Payload example
<script>
x = '<!--<script>' < /script>/ - alert(1)
</script>