This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org
Testing for Reflected Cross site scripting (OTG-INPVAL-001)
OWASP Testing Guide v3 Table of Contents
This article is part of the OWASP Testing Guide v3. The entire OWASP Testing Guide v3 can be downloaded here.
OWASP at the moment is working at the OWASP Testing Guide v4: you can browse the Guide here
This is a draft of a section of the new Testing Guide v3
Brief Summary
Reflected cross-site scripting (XSS) is another name for non-persistent
XSS, where the attack doesn’t load with the vulnerable web application
but is originated from the victim loading the offending URI. In this
article we will see some ways to test a web application for this kind of
vulnerability.
Description of the Issue
Reflected XSS attacks also know as type 1 or non-persistent XSS attacks, are the most frequent type of XSS attack found nowadays.
When a web application is vulnerable to this type of attack, it will execute unvalidated input sent through requests. The common modus operandi of the attack includes a design step, in which the attacker creates and tests an offending URI, a social engineering step, in which he convinces her victims to load this URI on their browsers, and then the code is executed –using the victim’s credentials.
Commonly the attacker’s code is in the Javascript language, but also other scripting languajes like Flash, VBScript, HTML and ActiveX can be used.
Attackers typically profit from these vulnerabilities in order to install key loggers, steal the victim’s cookie, clipboard theft, and change the content of the page (e.g., download links).
One of the important matters about exploiting XSS vulnerabilities is character encoding.
In some cases, the web server or the web application could not be filtering some
encodings of characters, so for example the web application might filter out "<script>",
but might not filter %3cscript%3 which simply includes another encoding of tags.
A nice tool for testing character encodings is OWASP's CAL9000.
Black Box testing and example
Testing for Topic X vulnerabilities:
...
Result Expected:
...
Gray Box testing and example
Testing for Topic X vulnerabilities:
...
Result Expected:
...
References
Whitepapers
...
Tools
...