<?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=Gian</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=Gian"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Gian"/>
		<updated>2026-05-16T23:37:03Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

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

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Error_Code_(OTG-ERR-001)&amp;diff=33135</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=33135"/>
				<updated>2008-07-02T13:45:09Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Description of the Issue */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[http://www.owasp.org/index.php/Web_Application_Penetration_Testing_AoC Up]] &amp;lt;br&amp;gt;&lt;br /&gt;
{{Template:OWASP Testing Guide v2}}&lt;br /&gt;
&lt;br /&gt;
== Brief 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 request, 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;
Within this section we'll analyse the more common codes (error messages) and bring into focus the steps of 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;
== Description of the Issue ==&lt;br /&gt;
&lt;br /&gt;
A common error that we can see during our search 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-existant 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;
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 POST of the logon credentials, the following error message is presented to the penetration tester that which 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 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;
'''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 server. Errors occur in all applications, we try to trap most errors but it is alomst impossible to cover each and every exception. &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 request for an aspx page it 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;
1. Inside Web.config customErrors section&lt;br /&gt;
2. Inside global.asax Application_Error Sub&lt;br /&gt;
3. 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;
&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 custome errors to the remote web application users. a user accessing the server locally will be presented by the complete stack trace and custom errors will not be shown to him.&lt;br /&gt;
&lt;br /&gt;
all the errors unless explicitly specified will be brought to defaultRedirect i.e. myerrorpagedefault.aspx. &lt;br /&gt;
&lt;br /&gt;
a statuscode 404 will be shown 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 similiar 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, global.asax Application_Error sub and finally customErrors section in web.config file will be processed.&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;
HTTP 404 - File not found&lt;br /&gt;
Internet Information Services&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it means 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;
== Black Box testing and example ==&lt;br /&gt;
&lt;br /&gt;
'''Test:'''&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;
&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;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Test:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. Network problems&lt;br /&gt;
2. Bad configuration about host database address&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;
'''Test:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. Authentication failed&lt;br /&gt;
2. Credentials not inserted&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;
== Gray Box testing and example ==&lt;br /&gt;
&lt;br /&gt;
'''Test:'''&lt;br /&gt;
&lt;br /&gt;
Enumeration of the directories with access denied:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;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;
== 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;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Category:OWASP Testing Project AoC}}&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=33056</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=33056"/>
				<updated>2008-07-02T08:18:35Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Black Box testing and example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that the users are sending, are actually transferred via en encrypted channel to avoid being intercepted by some malicious users. The analysis focus simply on trying to understand if data travel unencrypted from the web browser to the server, or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that are transmitted and to ensure that we are sending them towards the desired site. Clearly, the fact that traffic is encrypted does not necessarily mean that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that the application is using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. Here, the tester will just try to understand if the data that users put into the web form, in order to log into a web site, are transmitted using secure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, the tester wants to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually the user has to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, that means in a non-secure way, or using HTTPS, which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS. This test is done to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example the tester can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/cgi-bin/login.cgi 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.example.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible a lock, indicating the use of a secure protocol, and the fact that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now, suppose to have a web page reachable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data are transmitted in a secure way through encryption. This situation occurs for example when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section accessible from the home page through a login. So when we try to log, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came)  it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So in this case we have no lock inside our browser window that tells us that we are using a secure connection, but in reality we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with GET method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
In this last example, suppose that the application transfers data using the GET method. This method should never be used in a form that transmits sensitive data such as username and password, because they are displayed in clear in the URL and this entails a whole set of security issues. So this example is purely demonstrative, but in reality it is strongly suggested to use the POST method instead. This because, when the GET method is used, the url that it requests are easily available into, for example, the server logs exposing your sensitive data to information leakage. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET https://www.example.com/success.html?user=test&amp;amp;pass=test 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/form.html&lt;br /&gt;
If-Modified-Since: Mon, 30 Jun 2008 07:55:11 GMT&lt;br /&gt;
If-None-Match: &amp;quot;43a01-5b-4868915f&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the data is transferred in clear text in the URL and not in the body of the message as before. But we must consider that TLS/SSL is a level 5 protocol, a lower level than the HTTP one, then the whole HTTP package  is still encrypted and the URL is unreadable to an attacker. But is not a good practice to use the GET method in these cases, because it is more easily exploitable.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
Talk with the developers of the application and try to understand if they are aware of differences between HTTP and HTTPS protocols and why they should use the last one for sensitive information transmissions.&amp;lt;br&amp;gt;&lt;br /&gt;
Then check with them if HTTPS is used in every sensitive transmission, like those in login pages, to avoid to an unauthorized user to read the data.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* HTTP/1.1: Security Considerations - http://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab - https://www.owasp.org/index.php/Category:OWASP_WebScarab_Project&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=33052</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=33052"/>
				<updated>2008-07-02T08:11:01Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Brief Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that the users are sending, are actually transferred via en encrypted channel to avoid being intercepted by some malicious users. The analysis focus simply on trying to understand if data travel unencrypted from the web browser to the server, or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that are transmitted and to ensure that we are sending them towards the desired site. Clearly, the fact that traffic is encrypted does not necessarily mean that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that the application is using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. Here, the tester will just try to understand if the data that users put into the web form, in order to log into a web site, are transmitted using secure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, the tester wants to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually the user has to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, that means in a non-secure way, or using HTTPS, which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS. This test is done to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example the tester can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/cgi-bin/login.cgi 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.example.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible the lock that indicates the use of a secure protocol to access the page and that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now, suppose to have a web page reachable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data are transmitted in a secure way through encryption. This situation occurs for example when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section accessible from the home page through a login. So when we try to log, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came)  it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So in this case we have no lock inside our browser window that tells us that we are using a secure connection, but in reality we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with GET method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
In this last example, suppose that the application transfers data using the GET method. This method should never be used in a form that transmits sensitive data such as username and password, because they are displayed in clear in the URL and this entails a whole set of security issues. So this example is purely demonstrative, but in reality it is strongly suggested to use the POST method instead. This because, when the GET method is used, the url that it requests are easily available into, for example, the server logs exposing your sensitive data to information leakage. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET https://www.example.com/success.html?user=test&amp;amp;pass=test 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/form.html&lt;br /&gt;
If-Modified-Since: Mon, 30 Jun 2008 07:55:11 GMT&lt;br /&gt;
If-None-Match: &amp;quot;43a01-5b-4868915f&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the data is transferred in clear text in the URL and not in the body of the message as before. But we must consider that TLS/SSL is a level 5 protocol, a lower level than the HTTP one, then the whole HTTP package  is still encrypted and the URL is unreadable to an attacker. But is not a good practice to use the GET method in these cases, because it is more easily exploitable.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
Talk with the developers of the application and try to understand if they are aware of differences between HTTP and HTTPS protocols and why they should use the last one for sensitive information transmissions.&amp;lt;br&amp;gt;&lt;br /&gt;
Then check with them if HTTPS is used in every sensitive transmission, like those in login pages, to avoid to an unauthorized user to read the data.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* HTTP/1.1: Security Considerations - http://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab - https://www.owasp.org/index.php/Category:OWASP_WebScarab_Project&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32952</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32952"/>
				<updated>2008-07-01T08:22:37Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Black Box testing and example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that the users are sending, are actually transferred via en encrypted channel to avoid being intercepted by some malicious users. The analysis focus simply on trying to understand if data travel unencrypted from the web browser to the server, or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that are transmitted and to ensure that we are sending them towards the desired site. Clearly, the fact that traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that the application is using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. Here, the tester will just try to understand if the data that users put into the web form, in order to log into a web site, are transmitted using secure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, the tester wants to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually the user has to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, that means in a non-secure way, or using HTTPS, which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS. This test is done to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example the tester can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/cgi-bin/login.cgi 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.example.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible the lock that indicates the use of a secure protocol to access the page and that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now, suppose to have a web page reachable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data are transmitted in a secure way through encryption. This situation occurs for example when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section accessible from the home page through a login. So when we try to log, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came)  it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So in this case we have no lock inside our browser window that tells us that we are using a secure connection, but in reality we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with GET method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
In this last example, suppose that the application transfers data using the GET method. This method should never be used in a form that transmits sensitive data such as username and password, because they are displayed in clear in the URL and this entails a whole set of security issues. So this example is purely demonstrative, but in reality it is strongly suggested to use the POST method instead. This because, when the GET method is used, the url that it requests are easily available into, for example, the server logs exposing your sensitive data to information leakage. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET https://www.example.com/success.html?user=test&amp;amp;pass=test 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/form.html&lt;br /&gt;
If-Modified-Since: Mon, 30 Jun 2008 07:55:11 GMT&lt;br /&gt;
If-None-Match: &amp;quot;43a01-5b-4868915f&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the data is transferred in clear text in the URL and not in the body of the message as before. But we must consider that TLS/SSL is a level 5 protocol, a lower level than the HTTP one, then the whole HTTP package  is still encrypted and the URL is unreadable to an attacker. But is not a good practice to use the GET method in these cases, because it is more easily exploitable.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
Talk with the developers of the application and try to understand if they are aware of differences between HTTP and HTTPS protocols and why they should use the last one for sensitive information transmissions.&amp;lt;br&amp;gt;&lt;br /&gt;
Then check with them if HTTPS is used in every sensitive transmission, like those in login pages, to avoid to an unauthorized user to read the data.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* HTTP/1.1: Security Considerations - http://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab - https://www.owasp.org/index.php/Category:OWASP_WebScarab_Project&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32951</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32951"/>
				<updated>2008-07-01T08:16:25Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Description of the Issue */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that the users are sending, are actually transferred via en encrypted channel to avoid being intercepted by some malicious users. The analysis focus simply on trying to understand if data travel unencrypted from the web browser to the server, or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that are transmitted and to ensure that we are sending them towards the desired site. Clearly, the fact that traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that the application is using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. Here, the tester will just try to understand if the data that users put into the web form, in order to log into a web site, are transmitted using secure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, the tester wants to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually the user has to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, that means in a non-secure way, or using HTTPS, which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS. This test is done to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example we can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.exmple.com:443/cgi-bin/login.cgi HTTP/1.1&lt;br /&gt;
Host: www.exmple.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.exmple.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.exmple.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible the lock that indicates the use of a secure protocol to access the page and that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now we suppose to have a web page reacheable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data are transmitted in a secure way through encryption. This situation occurs for example when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section acessible from the home page through a login. So when we try to log, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came)  it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So in this case we have no lock inside our browser window that tells us that we are using a secure connection, but in reality we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with GET method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
In this last example, suppose that the application transfers data using the GET method. This method should never be used in a form that transmits sensitive data such as username and password, because they are displayed in clear in the URL and this entails a whole set of security issues. So this example is purely demonstrative, but in reality it is strongly suggested to use the POST method instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET https://www.example.com/success.html?user=test&amp;amp;pass=test 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/form.html&lt;br /&gt;
If-Modified-Since: Mon, 30 Jun 2008 07:55:11 GMT&lt;br /&gt;
If-None-Match: &amp;quot;43a01-5b-4868915f&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the data is transferred in clear text in the URL and not in the body of the message as before. But we must consider that TLS/SSL is a level 5 protocol, a lower level than the HTTP one, then the whole HTTP package  is still encrypted and the URL is unreadable to an attacker. But is not a good practice to use the GET method in these cases, because it is more easily exploitable.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
Talk with the developers of the application and try to understand if they are aware of differences between HTTP and HTTPS protocols and why they should use the last one for sensitive information transmissions.&amp;lt;br&amp;gt;&lt;br /&gt;
Then check with them if HTTPS is used in every sensitive transmission, like those in login pages, to avoid to an unauthorized user to read the data.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* HTTP/1.1: Security Considerations - http://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab - https://www.owasp.org/index.php/Category:OWASP_WebScarab_Project&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32950</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32950"/>
				<updated>2008-07-01T08:08:18Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Brief Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that the users are sending, are actually transferred via en encrypted channel to avoid being intercepted by some malicious users. The analysis focus simply on trying to understand if data travel unencrypted from the web browser to the server, or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that are transmitted and to ensure that we are sending them towards the desired site. Clearly, the fact that traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that the application is using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. Here, the tester will just try to understand if the data that users put into the web form, in order to log into a web site, are transmitted using secure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example we can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.exmple.com:443/cgi-bin/login.cgi HTTP/1.1&lt;br /&gt;
Host: www.exmple.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.exmple.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.exmple.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible the lock that indicates the use of a secure protocol to access the page and that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now we suppose to have a web page reacheable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data are transmitted in a secure way through encryption. This situation occurs for example when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section acessible from the home page through a login. So when we try to log, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came)  it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So in this case we have no lock inside our browser window that tells us that we are using a secure connection, but in reality we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with GET method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
In this last example, suppose that the application transfers data using the GET method. This method should never be used in a form that transmits sensitive data such as username and password, because they are displayed in clear in the URL and this entails a whole set of security issues. So this example is purely demonstrative, but in reality it is strongly suggested to use the POST method instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET https://www.example.com/success.html?user=test&amp;amp;pass=test 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/form.html&lt;br /&gt;
If-Modified-Since: Mon, 30 Jun 2008 07:55:11 GMT&lt;br /&gt;
If-None-Match: &amp;quot;43a01-5b-4868915f&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the data is transferred in clear text in the URL and not in the body of the message as before. But we must consider that TLS/SSL is a level 5 protocol, a lower level than the HTTP one, then the whole HTTP package  is still encrypted and the URL is unreadable to an attacker. But is not a good practice to use the GET method in these cases, because it is more easily exploitable.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
Talk with the developers of the application and try to understand if they are aware of differences between HTTP and HTTPS protocols and why they should use the last one for sensitive information transmissions.&amp;lt;br&amp;gt;&lt;br /&gt;
Then check with them if HTTPS is used in every sensitive transmission, like those in login pages, to avoid to an unauthorized user to read the data.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* HTTP/1.1: Security Considerations - http://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab - https://www.owasp.org/index.php/Category:OWASP_WebScarab_Project&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32949</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32949"/>
				<updated>2008-07-01T07:59:42Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Brief Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that the users are sending, are actually transferred via en encrypted channel to avoid being intercepted by some malicious users. The analysis focus simply on trying to understand if our data travel unencrypted from our web browser to the server, or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using secure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example we can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.exmple.com:443/cgi-bin/login.cgi HTTP/1.1&lt;br /&gt;
Host: www.exmple.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.exmple.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.exmple.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible the lock that indicates the use of a secure protocol to access the page and that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now we suppose to have a web page reacheable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data are transmitted in a secure way through encryption. This situation occurs for example when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section acessible from the home page through a login. So when we try to log, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came)  it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So in this case we have no lock inside our browser window that tells us that we are using a secure connection, but in reality we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with GET method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
In this last example, suppose that the application transfers data using the GET method. This method should never be used in a form that transmits sensitive data such as username and password, because they are displayed in clear in the URL and this entails a whole set of security issues. So this example is purely demonstrative, but in reality it is strongly suggested to use the POST method instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET https://www.example.com/success.html?user=test&amp;amp;pass=test 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/form.html&lt;br /&gt;
If-Modified-Since: Mon, 30 Jun 2008 07:55:11 GMT&lt;br /&gt;
If-None-Match: &amp;quot;43a01-5b-4868915f&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the data is transferred in clear text in the URL and not in the body of the message as before. But we must consider that TLS/SSL is a level 5 protocol, a lower level than the HTTP one, then the whole HTTP package  is still encrypted and the URL is unreadable to an attacker. But is not a good practice to use the GET method in these cases, because it is more easily exploitable.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
Talk with the developers of the application and try to understand if they are aware of differences between HTTP and HTTPS protocols and why they should use the last one for sensitive information transmissions.&amp;lt;br&amp;gt;&lt;br /&gt;
Then check with them if HTTPS is used in every sensitive transmission, like those in login pages, to avoid to an unauthorized user to read the data.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* HTTP/1.1: Security Considerations - http://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab - https://www.owasp.org/index.php/Category:OWASP_WebScarab_Project&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32948</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32948"/>
				<updated>2008-07-01T07:37:49Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that we are sending are actually transferred via en encrypted channel to avoid being intercepted by some malicious users. The analysis focus simply on trying to understand if our data travel unencrypted from our web browser to the server, or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using secure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example we can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.exmple.com:443/cgi-bin/login.cgi HTTP/1.1&lt;br /&gt;
Host: www.exmple.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.exmple.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.exmple.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible the lock that indicates the use of a secure protocol to access the page and that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now we suppose to have a web page reacheable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data are transmitted in a secure way through encryption. This situation occurs for example when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section acessible from the home page through a login. So when we try to log, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came)  it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So in this case we have no lock inside our browser window that tells us that we are using a secure connection, but in reality we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with GET method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
In this last example, suppose that the application transfers data using the GET method. This method should never be used in a form that transmits sensitive data such as username and password, because they are displayed in clear in the URL and this entails a whole set of security issues. So this example is purely demonstrative, but in reality it is strongly suggested to use the POST method instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET https://www.example.com/success.html?user=test&amp;amp;pass=test 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/form.html&lt;br /&gt;
If-Modified-Since: Mon, 30 Jun 2008 07:55:11 GMT&lt;br /&gt;
If-None-Match: &amp;quot;43a01-5b-4868915f&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the data is transferred in clear text in the URL and not in the body of the message as before. But we must consider that TLS/SSL is a level 5 protocol, a lower level than the HTTP one, then the whole HTTP package  is still encrypted and the URL is unreadable to an attacker. But is not a good practice to use the GET method in these cases, because it is more easily exploitable.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
Talk with the developers of the application and try to understand if they are aware of differences between HTTP and HTTPS protocols and why they should use the last one for sensitive information transmissions.&amp;lt;br&amp;gt;&lt;br /&gt;
Then check with them if HTTPS is used in every sensitive transmission, like those in login pages, to avoid to an unauthorized user to read the data.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* HTTP/1.1: Security Considerations - http://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab - https://www.owasp.org/index.php/Category:OWASP_WebScarab_Project&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32947</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32947"/>
				<updated>2008-07-01T07:35:55Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that we are sending are actually transferred via en encrypted channel to avoid being intercepted by some malicious users. The analysis focus simply on trying to understand if our data travel unencrypted from our web browser to the server, or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using secure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example we can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.exmple.com:443/cgi-bin/login.cgi HTTP/1.1&lt;br /&gt;
Host: www.exmple.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.exmple.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.exmple.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible the lock that indicates the use of a secure protocol to access the page and that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now we suppose to have a web page reacheable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data are transmitted in a secure way through encryption. This situation occurs for example when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section acessible from the home page through a login. So when we try to log, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came)  it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So in this case we have no lock inside our browser window that tells us that we are using a secure connection, but in reality we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with GET method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
In this last example, suppose that the application transfers data using the GET method. This method should never be used in a form that transmits sensitive data such as username and password, because they are displayed in clear in the URL and this entails a whole set of security issues. So this example is purely demonstrative, but in reality it is strongly suggested to use the POST method instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET https://www.example.com/success.html?user=test&amp;amp;pass=test 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/form.html&lt;br /&gt;
If-Modified-Since: Mon, 30 Jun 2008 07:55:11 GMT&lt;br /&gt;
If-None-Match: &amp;quot;43a01-5b-4868915f&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the data is transferred in clear text in the URL and not in the body of the message as before. But we must consider that TLS/SSL is a level 5 protocol, a lower level than the HTTP one, then the whole HTTP package  is still encrypted and the URL is unreadable to an attacker. But is not a good practice to use the GET method in these cases, because it is more easily exploitable.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
Talk with the developers of the application and try to understand if they are aware of differences between HTTP and HTTPS protocols and why they should use the last one for sensitive information transmissions.&amp;lt;br&amp;gt;&lt;br /&gt;
Then check with them if HTTPS is used in every sensitive transmission, like those in login pages, to avoid to an unauthorized user to read the data.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* HTTP/1.1: Security Considerations http://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32946</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32946"/>
				<updated>2008-07-01T07:34:04Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that we are sending are actually transferred via en encrypted channel to avoid being intercepted by some malicious users. The analysis focus simply on trying to understand if our data travel unencrypted from our web browser to the server, or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using secure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example we can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.exmple.com:443/cgi-bin/login.cgi HTTP/1.1&lt;br /&gt;
Host: www.exmple.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.exmple.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.exmple.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible the lock that indicates the use of a secure protocol to access the page and that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now we suppose to have a web page reacheable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data are transmitted in a secure way through encryption. This situation occurs for example when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section acessible from the home page through a login. So when we try to log, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came)  it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So in this case we have no lock inside our browser window that tells us that we are using a secure connection, but in reality we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with GET method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
In this last example, suppose that the application transfers data using the GET method. This method should never be used in a form that transmits sensitive data such as username and password, because they are displayed in clear in the URL and this entails a whole set of security issues. So this example is purely demonstrative, but in reality it is strongly suggested to use the POST method instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET https://www.example.com/success.html?user=test&amp;amp;pass=test 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/form.html&lt;br /&gt;
If-Modified-Since: Mon, 30 Jun 2008 07:55:11 GMT&lt;br /&gt;
If-None-Match: &amp;quot;43a01-5b-4868915f&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the data is transferred in clear text in the URL and not in the body of the message as before. But we must consider that TLS/SSL is a level 5 protocol, a lower level than the HTTP one, then the whole HTTP package  is still encrypted and the URL is unreadable to an attacker. But is not a good practice to use the GET method in these cases, because it is more easily exploitable.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
Talk with the developers of the application and try to understand if they are aware of differences between HTTP and HTTPS protocols and why they should use the last one for sensitive information transmissions.&amp;lt;br&amp;gt;&lt;br /&gt;
Then check with them if HTTPS is used in every sensitive transmission, like those in login pages, to avoid to an unauthorized user to read the data.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
HTTP/1.1: Security Considerations[http://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html]&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32910</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32910"/>
				<updated>2008-06-30T17:57:31Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Brief Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that we are sending are actually transferred via en encrypted channel to avoid being intercepted by some malicious users. The analysis focus simply on trying to understand if our data travel unencrypted from our web browser to the server, or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using secure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example we can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.exmple.com:443/cgi-bin/login.cgi HTTP/1.1&lt;br /&gt;
Host: www.exmple.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.exmple.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.exmple.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible the lock that indicates the use of a secure protocol to access the page and that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now we suppose to have a web page reacheable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data are transmitted in a secure way through encryption. This situation occurs for example when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section acessible from the home page through a login. So when we try to log, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came)  it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So in this case we have no lock inside our browser window that tells us that we are using a secure connection, but in reality we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with GET method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
In this last example, suppose that the application transfers data using the GET method. This method should never be used in a form that transmits sensitive data such as username and password, because they are displayed in clear in the URL and this entails a whole set of security issues. So this example is purely demonstrative, but in reality it is strongly suggested to use the POST method instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET https://www.example.com/success.html?user=test&amp;amp;pass=test 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/form.html&lt;br /&gt;
If-Modified-Since: Mon, 30 Jun 2008 07:55:11 GMT&lt;br /&gt;
If-None-Match: &amp;quot;43a01-5b-4868915f&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the data is transferred in clear text in the URL and not in the body of the message as before. But we must consider that TLS/SSL is a level 5 protocol, a lower level than the HTTP one, then the whole HTTP package  is still encrypted and the URL is unreadable to an attacker. But is not a good practice to use the GET method in these cases, because it is more easily exploitable.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
Talk with the developers of the application and try to understand if they are aware of differences between HTTP and HTTPS protocols and why they should use the last one for sensitive information transmissions.&amp;lt;br&amp;gt;&lt;br /&gt;
Then check with them if HTTPS is used in every sensitive transmission, like those in login pages, to avoid to an unauthorized user to read the data.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32907</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32907"/>
				<updated>2008-06-30T17:53:27Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Brief Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that we are sending are actually transferred via en encrypted channel to avoid being intercepted by some malicious users. The analysis focus simply on trying to understand if our data travel unencrypted from our web browser to the server, or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using sure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example we can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.exmple.com:443/cgi-bin/login.cgi HTTP/1.1&lt;br /&gt;
Host: www.exmple.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.exmple.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.exmple.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible the lock that indicates the use of a secure protocol to access the page and that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now we suppose to have a web page reacheable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data are transmitted in a secure way through encryption. This situation occurs for example when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section acessible from the home page through a login. So when we try to log, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came)  it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So in this case we have no lock inside our browser window that tells us that we are using a secure connection, but in reality we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with GET method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
In this last example, suppose that the application transfers data using the GET method. This method should never be used in a form that transmits sensitive data such as username and password, because they are displayed in clear in the URL and this entails a whole set of security issues. So this example is purely demonstrative, but in reality it is strongly suggested to use the POST method instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET https://www.example.com/success.html?user=test&amp;amp;pass=test 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/form.html&lt;br /&gt;
If-Modified-Since: Mon, 30 Jun 2008 07:55:11 GMT&lt;br /&gt;
If-None-Match: &amp;quot;43a01-5b-4868915f&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the data is transferred in clear text in the URL and not in the body of the message as before. But we must consider that TLS/SSL is a level 5 protocol, a lower level than the HTTP one, then the whole HTTP package  is still encrypted and the URL is unreadable to an attacker. But is not a good practice to use the GET method in these cases, because it is more easily exploitable.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
Talk with the developers of the application and try to understand if they are aware of differences between HTTP and HTTPS protocols and why they should use the last one for sensitive information transmissions.&amp;lt;br&amp;gt;&lt;br /&gt;
Then check with them if HTTPS is used in every sensitive transmission, like those in login pages, to avoid to an unauthorized user to read the data.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32906</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32906"/>
				<updated>2008-06-30T17:52:52Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Brief Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that we are sending are actually transferred via en encrypted channel to avoid being intercepted by some malicious users. The analysis focus simply on trying to understand if our data travel unencrypted from our web browser to the server or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using sure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example we can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.exmple.com:443/cgi-bin/login.cgi HTTP/1.1&lt;br /&gt;
Host: www.exmple.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.exmple.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.exmple.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible the lock that indicates the use of a secure protocol to access the page and that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now we suppose to have a web page reacheable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data are transmitted in a secure way through encryption. This situation occurs for example when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section acessible from the home page through a login. So when we try to log, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came)  it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So in this case we have no lock inside our browser window that tells us that we are using a secure connection, but in reality we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with GET method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
In this last example, suppose that the application transfers data using the GET method. This method should never be used in a form that transmits sensitive data such as username and password, because they are displayed in clear in the URL and this entails a whole set of security issues. So this example is purely demonstrative, but in reality it is strongly suggested to use the POST method instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET https://www.example.com/success.html?user=test&amp;amp;pass=test 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/form.html&lt;br /&gt;
If-Modified-Since: Mon, 30 Jun 2008 07:55:11 GMT&lt;br /&gt;
If-None-Match: &amp;quot;43a01-5b-4868915f&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the data is transferred in clear text in the URL and not in the body of the message as before. But we must consider that TLS/SSL is a level 5 protocol, a lower level than the HTTP one, then the whole HTTP package  is still encrypted and the URL is unreadable to an attacker. But is not a good practice to use the GET method in these cases, because it is more easily exploitable.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
Talk with the developers of the application and try to understand if they are aware of differences between HTTP and HTTPS protocols and why they should use the last one for sensitive information transmissions.&amp;lt;br&amp;gt;&lt;br /&gt;
Then check with them if HTTPS is used in every sensitive transmission, like those in login pages, to avoid to an unauthorized user to read the data.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32905</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32905"/>
				<updated>2008-06-30T17:38:43Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Gray Box testing and example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that we are sending are actually transferred via en encrypted channel to avoid being intercepted by some malicious user. The analysis focus simply on trying to understand if our data travel unencrypted from our web browser to the server or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using sure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example we can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.exmple.com:443/cgi-bin/login.cgi HTTP/1.1&lt;br /&gt;
Host: www.exmple.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.exmple.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.exmple.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible the lock that indicates the use of a secure protocol to access the page and that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now we suppose to have a web page reacheable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data are transmitted in a secure way through encryption. This situation occurs for example when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section acessible from the home page through a login. So when we try to log, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came)  it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So in this case we have no lock inside our browser window that tells us that we are using a secure connection, but in reality we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with GET method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
In this last example, suppose that the application transfers data using the GET method. This method should never be used in a form that transmits sensitive data such as username and password, because they are displayed in clear in the URL and this entails a whole set of security issues. So this example is purely demonstrative, but in reality it is strongly suggested to use the POST method instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET https://www.example.com/success.html?user=test&amp;amp;pass=test 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/form.html&lt;br /&gt;
If-Modified-Since: Mon, 30 Jun 2008 07:55:11 GMT&lt;br /&gt;
If-None-Match: &amp;quot;43a01-5b-4868915f&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the data is transferred in clear text in the URL and not in the body of the message as before. But we must consider that TLS/SSL is a level 5 protocol, a lower level than the HTTP one, then the whole HTTP package  is still encrypted and the URL is unreadable to an attacker. But is not a good practice to use the GET method in these cases, because it is more easily exploitable.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
Talk with the developers of the application and try to understand if they are aware of differences between HTTP and HTTPS protocols and why they should use the last one for sensitive information transmissions.&amp;lt;br&amp;gt;&lt;br /&gt;
Then check with them if HTTPS is used in every sensitive transmission, like those in login pages, to avoid to an unauthorized user to read the data.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32902</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32902"/>
				<updated>2008-06-30T17:01:35Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Black Box testing and example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that we are sending are actually transferred via en encrypted channel to avoid being intercepted by some malicious user. The analysis focus simply on trying to understand if our data travel unencrypted from our web browser to the server or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using sure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example we can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.exmple.com:443/cgi-bin/login.cgi HTTP/1.1&lt;br /&gt;
Host: www.exmple.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.exmple.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.exmple.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible the lock that indicates the use of a secure protocol to access the page and that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now we suppose to have a web page reacheable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data are transmitted in a secure way through encryption. This situation occurs for example when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section acessible from the home page through a login. So when we try to log, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came)  it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So in this case we have no lock inside our browser window that tells us that we are using a secure connection, but in reality we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with GET method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
In this last example, suppose that the application transfers data using the GET method. This method should never be used in a form that transmits sensitive data such as username and password, because they are displayed in clear in the URL and this entails a whole set of security issues. So this example is purely demonstrative, but in reality it is strongly suggested to use the POST method instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET https://www.example.com/success.html?user=test&amp;amp;pass=test 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/form.html&lt;br /&gt;
If-Modified-Since: Mon, 30 Jun 2008 07:55:11 GMT&lt;br /&gt;
If-None-Match: &amp;quot;43a01-5b-4868915f&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the data is transferred in clear text in the URL and not in the body of the message as before. But we must consider that TLS/SSL is a level 5 protocol, a lower level than the HTTP one, then the whole HTTP package  is still encrypted and the URL is unreadable to an attacker. But is not a good practice to use the GET method in these cases, because it is more easily exploitable.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Topic X vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32890</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32890"/>
				<updated>2008-06-30T16:36:42Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Black Box testing and example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that we are sending are actually transferred via en encrypted channel to avoid being intercepted by some malicious user. The analysis focus simply on trying to understand if our data travel unencrypted from our web browser to the server or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using sure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example we can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.exmple.com:443/cgi-bin/login.cgi HTTP/1.1&lt;br /&gt;
Host: www.exmple.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.exmple.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.exmple.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible the lock that indicates the use of a secure protocol to access the page and that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now we suppose to have a web page reacheable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data are transmitted in a secure way through encryption. This situation occurs for example when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section acessible from the home page through a login. So when we try to log, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came)  it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So in this case we have no lock inside our browser window that tells us that we are using a secure connection, but in reality we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Topic X vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32877</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32877"/>
				<updated>2008-06-30T15:33:55Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Black Box testing and example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that we are sending are actually transferred via en encrypted channel to avoid being intercepted by some malicious user. The analysis focus simply on trying to understand if our data travel unencrypted from our web browser to the server or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using sure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Anyway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example we can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.exmple.com:443/cgi-bin/login.cgi HTTP/1.1&lt;br /&gt;
Host: www.exmple.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.exmple.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;Username=test&amp;amp;Password=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.exmple.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through en encrypted channel and that they are not readable by other people. We could also understand this, from the fact that in the window of our web browser is visible the lock that indicates the use of a secure protocol to access the page and that the url of that page starts with HTTPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Topic X vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32864</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32864"/>
				<updated>2008-06-30T15:02:11Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Black Box testing and example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that we are sending are actually transferred via en encrypted channel to avoid being intercepted by some malicious user. The analysis focus simply on trying to understand if our data travel unencrypted from our web browser to the server or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using sure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. Aniway you can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We suppose that our login page presents a form with fields User, Pass and the Submit button to authenticate and have access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet 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.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&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;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example we can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.exmple.com:443/cgi-bin/login.cgi HTTP/1.1&lt;br /&gt;
Host: www.exmple.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&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;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.exmple.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;Username=test&amp;amp;Password=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Topic X vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32859</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32859"/>
				<updated>2008-06-30T14:11:03Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Brief Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that we are sending are actually transferred via en encrypted channel to avoid being intercepted by some malicious user. The analysis focus simply on trying to understand if our data travel unencrypted from our web browser to the server or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter [[Testing for SSL-TLS]]. We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using sure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
'''Testing for Topic X vulnerabilities:''' &amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Topic X vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32857</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32857"/>
				<updated>2008-06-30T14:06:01Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Brief Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication data that we are sending are actually transferred via en encrypted channel to avoid being intercepted by some malicious user. The analysis focus simply on trying to understand if our data travel unencrypted from our web browser to the server or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's completely safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter (INSERT CHAPTER LINK). We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using sure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
'''Testing for Topic X vulnerabilities:''' &amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Topic X vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32856</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32856"/>
				<updated>2008-06-30T14:00:25Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Description of the Issue */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication datas that we are sending are actually transferred via en encrypted channel to avoid being intercepted by some malicious user. The analysis focus simply on trying to understand if our datas travel unencrypted from our web browser to the server or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter (INSERT CHAPTER LINK). We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using sure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. This page may use several methods to authenticate the user, but, apart which method it uses, we want to be sure that in the transaction that is established between clients (the web browsers) and server (the application itself), sensitive data (in this case username and password) are transmitted via en encrypted channel. In order to log into a web site, usually we have to fill a simple form that passes the inserted data with the POST method. What is less obvious is that these data can be passed using the HTTP protocol, and then in a non-secure way, or using HTTPS which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe to an insecure transmission), but then it actually sends data via HTTPS.We do this because we want to be sure that an attacker can not be able to retrieve sensitive information simply sniffing the net with a sniffer tool. Using HTTPS prevents packet sniffing and Man In The Middle attacks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
'''Testing for Topic X vulnerabilities:''' &amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Topic X vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32852</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=32852"/>
				<updated>2008-06-30T13:33:46Z</updated>
		
		<summary type="html">&lt;p&gt;Gian: /* Brief Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
'''This is a draft of a section of the new Testing Guide v3'''&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The problem we are going to discuss is to verify that authentication datas that we are sending are actually transferred via en encrypted channel to avoid being intercepted by some malicious user. The analysis focus simply on trying to understand if our datas travel unencrypted from our web browser to the server or if the web application takes the appropriate security measures using a protocol like HTTPS. This protocol, like others that use encryption, is built on TLS/SSL to encrypt the data that we want to transmit and to ensure that we are sending them towards the desired site. Clearly, the fact that our traffic is encrypted does not necessarily means that it's safe. The security also depends from the encryption algorithm used and from the robustness of the keys that we are using. But this particular topic will not be addressed in this section, for a more detailed discussion on testing the safety of our TLS/SSL channel you can refer to chapter (INSERT CHAPTER LINK). We will just try to understand if the data that we put into the web form, in order to log into a web site, are transmitted using sure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
...here: Short Description of the Issue: Topic and Explanation&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
'''Testing for Topic X vulnerabilities:''' &amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Topic X vulnerabilities:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gian</name></author>	</entry>

	</feed>