Testing For Reflected XSS
Testing For Reflected XSS
reflected XSS
BY UNCLE RAT
Agenda
What is it
Test objectives
How to test
Blackbox testing
Bypass XSS filters
Gray box testing
Tools
References
What is it
What is it - Requirements
Design step
Attacker creates and tests an offending URI
Social engineering step
Attacker convinces victim to load this URI
Execution step
Eventual execution of payload on victim browser
What is it – Challenges
POST parameters
POST data
Hidden fields
Predefined radio or selection values
How to test – black box
Check Impact
If attack vector catches from previous attempts
Tester will analyse the impact REALISTICLY
Looking for where value is reflected in xss
Tester
defines special characters that are not
properly encoded, replaced or filtered
Often filters work on blacklist principles
The
set of characters you should for depends on the
context
How to test – black box
Check Impact
HTML context
Test for key HTML entities
> (greater than)
< (less than)
& (ampersand)
' (apostrophe or single quote)
" (double quote)
Full
list: https://en.wikipedia.org/wiki/List_of_XML_and_HTML_
character_entity_references
How to test – black box
Check Impact
Javascript context
\n (new line)
\r (carriage return)
' (apostrophe or single quote)
" (double quote)
\ (backslash)
\uXXXX (unicode values)
Full list: https://developer.mozilla.org/en-
US/docs/Web/JavaScript/Guide/Values,_variables,_and_liter
als#Using_special_characters_in_strings
How to test –
Bypass XSS
filtering
How to test – Bypass XSS filtering
https://owasp.org/www-community/xss-filter-
evasion-cheatsheet
https://github.com/OWASP/wstg/releases/downloa
d/v4.2/wstg-v4.2.pdf
https://resources.sei.cmu.edu/asset_files/WhitePap
er/2000_019_001_496188.pdf
https://www.cgisecurity.com/xss-faq.html
http://www.technicalinfo.net/papers/CSS.html
https://www.techzoom.net/Publications/Insecurity-
Iceberg