• Cross-Site Scripting (XSS) is a type of computer security vulnerability typically found in web applications which allow
code injection by malicious web users into the web pages viewed by other users. Examples of such code include HTML
code and client-side scripts.
• An exploited Cross-Site Scripting vulnerability can be used by attackers to bypass access controls such as the same origin
policy. Recently, vulnerabilities of this kind have been exploited to craft powerful phishing attacks and browser exploits.
Cross site scripting was originally referred to as CSS, although this usage has been largely discontinued.
The ratio of XSS attack is very large as compared to other attacks performed.
Example of a Cross Site Scripting attack
As a simple example, imagine a search engine site which is open to an XSS attack. The query screen of the search engine is
a simple single field form with a submit button. Whereas the results page, displays both the matched results and the text
you are looking for.
Example:
Search Results for "XSS Vulnerability"
To be able to bookmark pages, search engines generally leave the entered variables in the URL address. In this case the
URL would look like:
http://test.searchengine.com/search.php?q=XSS%20
Vulnerability
Next we try to send the following query to the search engine:
<script type="text/javascript"> alert (‘this is an XSS Vulnerability') </script>
By submitting the query to search.php, it is encoded and the resulting URL would be something like:
http://test.searchengine.com/search.php?q=%3Cscript%3
Ealert%28%91This%20is%20an%20XSS%20Vulnerability%92%2
9%3C%2Fscript%3E
Upon loading the results page, the test search engine would probably display no results for the search but it will display a
JavaScript alert which was injected into the page by using the XSS vulnerability.
How to check for Cross site scripting vulnerabilities
To check for Cross site scripting vulnerabilities, use a Web Vulnerability Scanner. A Web Vulnerability Scanner crawl your
entire website and automatically checks for Cross Site Scripting vulnerabilities. It will indicate which URLs/scripts are
vulnerable to these attacks so that you can fix the vulnerability easily. Besides Cross site scripting vulnerabilities a web
application scanner will also check for SQL injection & other web vulnerabilities.


No comments:
Post a Comment