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

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Session_Management&amp;diff=15297</id>
		<title>Testing for Session Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Session_Management&amp;diff=15297"/>
				<updated>2007-01-12T19:06:32Z</updated>
		
		<summary type="html">&lt;p&gt;Vwiswell: proofreading&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;
&lt;br /&gt;
{{Template:OWASP Testing Guide v2}}&lt;br /&gt;
&lt;br /&gt;
=== 4.5 Session Management Testing ===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
At the core of any web-based application is the way in which it maintains state and thereby controls user-interaction with the site.  Session Management broadly covers all controls on a user from authentication to leaving the application.&lt;br /&gt;
HTTP is a stateless protocol, meaning web servers respond to client requests without linking them to each other.  Even simple application logic requires a user's multiple requests to be associated with each other across a &amp;quot;session”.  This necessitates third party solutions – through either Off-The-Shelf (OTS) middleware and web server solutions, or bespoke developer implementations.  Most popular web application environments, such as ASP and PHP, provide developers with built in session handling routines. Some kind of identification token will typically be issued, which will be referred to as a “Session ID” or Cookie.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are a number of ways a web application may interact with a user.  Each is dependent upon the nature of the site, the security and availability requirements of the application.&lt;br /&gt;
Whilst there are accepted best practices for application development, such as those outlined in the OWASP Guide to Building Secure Web Applications, it is important that application security is considered within the context of the provider’s requirements and expectations. In this chapter we describe the following items.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[ Analysis of the Session Management Schema AoC| 4.5.1 Analysis of the Session Management Schema]]&amp;lt;br&amp;gt;&lt;br /&gt;
This paragraph describes how to analyse a Session Management Schema, with the goal to understand how the Session Management mechanism has been developed and if it is possible to break it&amp;lt;br&amp;gt;&lt;br /&gt;
[[ Cookie and Session Token Manipulation AoC|4.5.2 Cookie and Session Token Manipulation]]&amp;lt;br&amp;gt;&lt;br /&gt;
Here it is explained how to test the security of session Token issued to the Client: how to make a cookie reverse engineering, and a cookie manipulation to force an hijacked session to work&amp;lt;br&amp;gt;&lt;br /&gt;
[[ Exposed Session Variables AoC|4.5.3 Exposed Session Variables ]]&amp;lt;br&amp;gt;&lt;br /&gt;
Session Tokens represent confidential informations because they tie the user identity with his own session. It's possible to test if the session token is exposed to this vulnerability and  try to create a replay session attack.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[ Session Riding AoC|4.5.4 Session Riding ]]&amp;lt;br&amp;gt;&lt;br /&gt;
Session Riding descibes a way to force an unknowing user to execute unwanted actions on a web application in which he is currently authenticated.&amp;lt;br&amp;gt;&lt;br /&gt;
[[ HTTP Exploit AoC|4.5.5 HTTP Exploit ]]&amp;lt;br&amp;gt;&lt;br /&gt;
Here is described how to test for an HTTP Exploit.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Category:OWASP Testing Project AoC}}&lt;/div&gt;</summary>
		<author><name>Vwiswell</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_authentication&amp;diff=15296</id>
		<title>Testing for authentication</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_authentication&amp;diff=15296"/>
				<updated>2007-01-12T18:55:55Z</updated>
		
		<summary type="html">&lt;p&gt;Vwiswell: proofreading&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;
&lt;br /&gt;
{{Template:OWASP Testing Guide v2}}&lt;br /&gt;
&lt;br /&gt;
=== Authentication Testing ===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Authentication (Greek: αυθεντικός = real or genuine, from 'authentes' = author ) is the act of establishing or confirming something (or someone) as authentic, that is, that claims made by or about the thing are true. Authenticating an object may mean confirming its provenance, whereas authenticating a person often consists of verifying her identity. Authentication depends upon one or more authentication factors.&lt;br /&gt;
In computer security, authentication is the process of attempting to verify the digital identity of the sender of a communication.  A common example of such a process is the logon process. Testing the authentication schema means understanding how the authentication process works and using that information to circumvent the authentication mechanism.&lt;br /&gt;
&lt;br /&gt;
[[Default or Guessable User Account Testing AoC|4.4.1 Default or guessable (dictionary) user account]]&amp;lt;br&amp;gt;&lt;br /&gt;
First we test if there are default user accounts or guessable username/password combinations (dictionary testing)&lt;br /&gt;
&lt;br /&gt;
[[Brute Force Testing AoC|4.4.2 Brute Force]]&amp;lt;br&amp;gt;&lt;br /&gt;
When a dictionary type attack fails, a tester can attempt to use brute force methods to gain authentication.  Brute force testing is not easy to accomplish for testers because of the time required and the possible lockout of the tester.&lt;br /&gt;
&lt;br /&gt;
[[Bypassing Authentication Schema AoC|4.4.3 Bypassing authentication schema]]&amp;lt;br&amp;gt;&lt;br /&gt;
Other passive testing methods attempt to bypass the authentication schema by recognizing that not all of the application's resources are adequately protected.  The tester can access these resources without authentication.&lt;br /&gt;
&lt;br /&gt;
[[Directory Traversal Testing AoC|4.4.4 Directory traversal/file include]] &amp;lt;br&amp;gt;&lt;br /&gt;
Directory Traversal Testing is a particular method to find a way to bypass the application and gain access to system resources.  Typically, these vulnerabilities are caused by misconfiguration.&lt;br /&gt;
&lt;br /&gt;
[[Vulnerable Remember Password and Pwd Reset AoC|4.4.5 Vulnerable remember password and pwd reset]]&amp;lt;br&amp;gt;&lt;br /&gt;
Here we test how the application manages the process of &amp;quot;password forgotten&amp;quot;. We also check whether the application allows the user to store the password in the browser (&amp;quot;remember password&amp;quot; function). &lt;br /&gt;
&lt;br /&gt;
[[Logout and Browser Cache Management Testing AoC|4.4.6 Logout and Browser Cache Management Testing]]&amp;lt;br&amp;gt;&lt;br /&gt;
As a final test we check that the logout and caching functions are properly implemented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Category:OWASP Testing Project AoC}}&lt;/div&gt;</summary>
		<author><name>Vwiswell</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_business_logic&amp;diff=15295</id>
		<title>Testing for business logic</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_business_logic&amp;diff=15295"/>
				<updated>2007-01-12T18:50:10Z</updated>
		
		<summary type="html">&lt;p&gt;Vwiswell: proofreading&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;
Business logic comprises: &lt;br /&gt;
* Business rules that express business policy (such as channels, location, logistics, prices, and products); and&lt;br /&gt;
* Workflows that are the ordered tasks of passing documents or data from one participant (a person or a software system) to another.&lt;br /&gt;
&lt;br /&gt;
The attacks on the business logic of an application are dangerous, difficult to detect and specific to that application.&lt;br /&gt;
&lt;br /&gt;
==Description of the Issue==&lt;br /&gt;
 &lt;br /&gt;
Business logic can have security flaws that allow a user to do something that isn't allowed by the business. For example, if there is a limit on reimbursement of $1000, could an attacker misuse the system to request more money than is allowed? Or perhaps you are supposed to do operations in a particular order, but an attacker could invoke them out of sequence. Or can a user make a purchase for a negative amount of money? Frequently these business logic security checks simply are not present in the application.&lt;br /&gt;
&lt;br /&gt;
Automated tools find it hard to understand context, hence it's up to a person to perform these kinds of tests.&lt;br /&gt;
&lt;br /&gt;
'''Business Limits and Restrictions'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Consider the rules for the business function being provided by the application. Are there any limits or restrictions on people's behavior? Then consider whether the application enforces those rules. It's generally pretty easy to identify the test and analysis cases to verify the application if you're familiar with the business. If you are a third-party tester, then you're going to have to use your common sense and ask the business if different operations should be allowed by the application.&lt;br /&gt;
&lt;br /&gt;
'''Example''': Setting the quantity of a product on an e-commerce site as a negative number may result in funds being credited to the attacker. The countermeasure to this problem is to implement stronger data validation, as the application permits negative numbers to be entered in the quantity field of the shopping cart.&lt;br /&gt;
&lt;br /&gt;
==Black Box Testing and Examples==&lt;br /&gt;
&lt;br /&gt;
Although uncovering logical vulnerabilities will probably always remain an art, one can attempt to go about it systematically to a great extent. Here is a suggested approach that consists of:  &lt;br /&gt;
* Understanding the application&lt;br /&gt;
* Creating raw data for designing logical tests&lt;br /&gt;
* Designing the logical tests&lt;br /&gt;
* Standard prerequisites&lt;br /&gt;
* Execution of logical tests&lt;br /&gt;
&lt;br /&gt;
===Understanding the application===&lt;br /&gt;
&lt;br /&gt;
Understanding the application thoroughly is a prerequisite for designing logical tests. To start with: &lt;br /&gt;
* Get any documentation describing the application's functionality. Examples of this include:&lt;br /&gt;
** Application manuals&lt;br /&gt;
** Requirements documents&lt;br /&gt;
** Functional specifications&lt;br /&gt;
* Explore the application manually and try to understand all the different ways in which the application can be used, the acceptable usage scenarios and the authorization limits imposed on various users&lt;br /&gt;
&lt;br /&gt;
===Creating raw data for designing logical tests===&lt;br /&gt;
&lt;br /&gt;
In this phase, one should ideally come up with the following data: &lt;br /&gt;
* All application '''business scenarios'''. For example, for an e-commerce application this might look like,&lt;br /&gt;
** Product ordering&lt;br /&gt;
** Checkout&lt;br /&gt;
** Browse&lt;br /&gt;
** Search for a product&lt;br /&gt;
* '''Workflows'''. This is different from business scenarios since it involves a number of different users. Examples include:&lt;br /&gt;
** Order creation and approval&lt;br /&gt;
** Bulletin board (one user posts an article that is reviewed by a moderator and ultimately seen by all users)&lt;br /&gt;
* Different '''user roles'''&lt;br /&gt;
** Administrator&lt;br /&gt;
** Manager&lt;br /&gt;
** Staff&lt;br /&gt;
** CEO&lt;br /&gt;
* Different '''groups or departments''' (note that there could be a tree (e.g. the Sales group of the heavy engineering division) or tagged view (e.g. someone could be a member of Sales as well as marketing) associated with this. &lt;br /&gt;
** Purchasing&lt;br /&gt;
** Marketing&lt;br /&gt;
** Engineering&lt;br /&gt;
* '''Access rights of various user roles and groups''' - The application allows various users privileges on some resource (or asset) and we need to specify the constraints of these privileges.  One simple way to know these business rules/constraints is to make use of the application documentation effectively.  For example, look for clauses like &amp;quot;If the administrator allows individual user access..&amp;quot;, &amp;quot;If configured by the administrator..&amp;quot; and you know the restriction imposed by the application. &lt;br /&gt;
* '''Privilege Table''' – After learning about the various privileges on the resources along with the constraints, you are all set to create a Privilege Table.  Get answers to: &lt;br /&gt;
** What can each user role do on which resource with what constraint?  This will help you in deducing who cannot do what on which resource.  &lt;br /&gt;
** What are the policies across groups? &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;display: block; margin-left: 16px;&amp;quot;&amp;gt;Consider the following privileges: &amp;quot;Approve expense report&amp;quot;, &amp;quot;Book a conference room&amp;quot;, &amp;quot;Transfer money from own account to another user's account&amp;quot;. A privilege could be thought of as a combination of a verb (e.g. Approve, Book, Withdraw) and one or more nouns (Expense report, conference room, account). The output of this activity is a grid with the various privileges forming the leftmost column while all user roles and groups would form the column headings of other columns. There would also be a “Comments” column that qualifies data in this grid.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto 1em auto&amp;quot;&lt;br /&gt;
| '''Privilege''' || '''Who can do this''' || '''Comment'''&lt;br /&gt;
|-&lt;br /&gt;
| Approve expense report || Any supervisor may approve report submitted by his subordinate || &lt;br /&gt;
|-&lt;br /&gt;
| Submit expense report || Any employee may do this for himself || &lt;br /&gt;
|-&lt;br /&gt;
| Transfer funds from one account to another || An account holder may transfer funds from own account to another account || &lt;br /&gt;
|-&lt;br /&gt;
| View payslip || Any employee may see his own || &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This data is a key input for designing logical tests. &lt;br /&gt;
&lt;br /&gt;
===Developing logical tests===&lt;br /&gt;
&lt;br /&gt;
Here are several guidelines to designing logical tests from the raw data gathered. &lt;br /&gt;
&lt;br /&gt;
* '''Privilege Table''' - Make use of the privilege table as a reference while creating application specific logical threats. In general, develop a test for each admin privilege to check if it could be executed illegally by a user role with minimum privileges or no privilege.  For example:&lt;br /&gt;
** Privilege: Operations Manager cannot approve a customer order&lt;br /&gt;
** Logical Test: Operations Manager approves a customer order&lt;br /&gt;
&lt;br /&gt;
* '''Improper handling of special user action sequences''' - Navigating through an application in a certain way or revisiting pages out of synch can cause logical errors which may cause the application to do something it's not meant to. For example:&lt;br /&gt;
** A wizard application where one fills in forms and proceeds to the next step. One cannot in any normal way (according to the developers) enter the wizard in the middle of the process. Bookmarking a middle step (say step 4 of 7), then continuing with the other steps until completion or form submission, then revisiting the middle step that was bookmarked may &amp;quot;upset&amp;quot; the backend logic due to a weak ''state model''.&lt;br /&gt;
&lt;br /&gt;
* '''Cover all business transaction paths''' - While designing tests, check for all alternative ways to perform the same business transaction. For example, create tests for both cash and credit payment modes.&lt;br /&gt;
&lt;br /&gt;
* '''Client-side validation''' - Look at all client side validations and see how they could be the basis for designing logical tests.  For example, a funds transfer transaction has a validation for negative values in the amount field.  This information can be used to design a logical test such as &amp;quot;A user transfers negative amount of money&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Standard prerequisites===&lt;br /&gt;
&lt;br /&gt;
Typically, some initial activities useful as setup are: &lt;br /&gt;
* Create test users with different permissions&lt;br /&gt;
* Browse all the important business scenarios/workflows in the application&lt;br /&gt;
&lt;br /&gt;
===Execution of logical tests=== &lt;br /&gt;
&lt;br /&gt;
Pick up each logical test and do the following:&lt;br /&gt;
* Analyze the HTTP/S requests underlying the acceptable usage scenario corresponding to the logical test&lt;br /&gt;
** Check the order of HTTP/S requests&lt;br /&gt;
** Understand the purpose of hidden fields, form fields, query string parameters being passed&lt;br /&gt;
* Try and subvert it by exploiting the known vulnerabilities&lt;br /&gt;
* Verify that the application fails for the test &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Business logic - http://en.wikipedia.org/wiki/Business_logic&lt;br /&gt;
* Prevent application logic attacks with sound app security practices - http://searchappsecurity.techtarget.com/qna/0,289202,sid92_gci1213424,00.html?bucket=NEWS&amp;amp;topic=302570&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Automated tools are incapable of detecting logical vulnerabilities. For example, tools have no means of detecting if a bank’s &amp;quot;fund transfer&amp;quot; page allows a user to transfer a negative amount to another user (in other words, it allows a user to transfer a positive amount into his own account) nor do they have any mechanism to help the human testers to suspect this state of affairs.&lt;br /&gt;
&lt;br /&gt;
'''Preventing transfer of a negative amount''': Tools could be enhanced so that they can report client side validations to the tester. For example, the tool may have a feature whereby it fills a form with strange values and attempts to submit it using a full-fledged browser implementation. It should check to see whether the browser actually submitted the request. Detecting that the browser has not submitted the request would signal to the tool that submitted values are not being accepted due to client-side validation. This would be reported to the tester, who would then understand the need for designing appropriate logical tests that bypass client-side validation. In our &amp;quot;negative amount transfer&amp;quot; example, the tester would learn that the transfer of negative amounts may be an interesting test. He could then design a test wherein the tool bypasses the client-side validation code and checks to see if the resulting response contains the string &amp;quot;funds transfer successful&amp;quot;. The point is not that the tool will be able to detect this or other vulnerabilities of this nature, rather that, with some thought, it would be possible to add many such features to enlist the tools in aiding human testers to find such logical vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{Category:OWASP Testing Project AoC}}&lt;/div&gt;</summary>
		<author><name>Vwiswell</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_business_logic&amp;diff=15294</id>
		<title>Testing for business logic</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_business_logic&amp;diff=15294"/>
				<updated>2007-01-12T18:42:46Z</updated>
		
		<summary type="html">&lt;p&gt;Vwiswell: proofreading&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;
Business logic comprises: &lt;br /&gt;
* Business rules that express business policy (such as channels, location, logistics, prices, and products); and&lt;br /&gt;
* Workflows that are the ordered tasks of passing documents or data from one participant (a person or a software system) to another.&lt;br /&gt;
&lt;br /&gt;
The attacks on the business logic of an application are dangerous, difficult to detect and specific to that application.&lt;br /&gt;
&lt;br /&gt;
==Description of the Issue==&lt;br /&gt;
 &lt;br /&gt;
Business logic can have security flaws that allow a user to do something that isn't allowed by the business. For example, if there is a limit on reimbursement of $1000, could an attacker misuse the system to request more money than is allowed? Or perhaps you are supposed to do operations in a particular order, but an attacker could invoke them out of sequence. Or can a user make a purchase for a negative amount of money? Frequently these business logic security checks simply are not present in the application.&lt;br /&gt;
&lt;br /&gt;
Automated tools find it hard to understand context, hence it's up to a person to perform these kinds of tests.&lt;br /&gt;
&lt;br /&gt;
'''Business Limits and Restrictions'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Consider the rules for the business function being provided by the application. Are there any limits or restrictions on people's behavior? Then consider whether the application enforces those rules. It's generally pretty easy to identify the test and analysis cases to verify the application if you're familiar with the business. If you are a third-party tester, then you're going to have to use your common sense and ask the business if different operations should be allowed by the application.&lt;br /&gt;
&lt;br /&gt;
'''Example''': Setting the quantity of a product on an e-commerce site as a negative number may result in funds being credited to the attacker. The countermeasure to this problem is to implement stronger data validation, as the application permits negative numbers to be entered in the quantity field of the shopping cart.&lt;br /&gt;
&lt;br /&gt;
==Black Box Testing and Examples==&lt;br /&gt;
&lt;br /&gt;
Although uncovering logical vulnerabilities will probably always remain an art, one can attempt to go about it systematically to a great extent. Here is a suggested approach that consists of:  &lt;br /&gt;
* Understanding the application&lt;br /&gt;
* Creating raw data for designing logical tests&lt;br /&gt;
* Designing the logical tests&lt;br /&gt;
* Standard prerequisites&lt;br /&gt;
* Execution of logical tests&lt;br /&gt;
&lt;br /&gt;
===Understanding the application===&lt;br /&gt;
&lt;br /&gt;
Understanding the application thoroughly is a prerequisite for designing logical tests. To start with: &lt;br /&gt;
* Get any documentation describing the application's functionality. Examples of this include:&lt;br /&gt;
** Application manuals&lt;br /&gt;
** Requirements documents&lt;br /&gt;
** Functional specifications&lt;br /&gt;
* Explore the application manually and try to understand all the different ways in which the application can be used, the acceptable usage scenarios and the authorization limits imposed on various users&lt;br /&gt;
&lt;br /&gt;
===Creating raw data for designing logical tests===&lt;br /&gt;
&lt;br /&gt;
In this phase, one should ideally come up with the following data: &lt;br /&gt;
* All application '''business scenarios'''. For example, for an e-commerce application this might look like,&lt;br /&gt;
** Product ordering&lt;br /&gt;
** Checkout&lt;br /&gt;
** Browse&lt;br /&gt;
** Search for a product&lt;br /&gt;
* '''Workflows'''. This is different from business scenarios since it involves a number of different users. Examples include:&lt;br /&gt;
** Order creation and approval&lt;br /&gt;
** Bulletin board (one user posts an article that is reviewed by a moderator and ultimately seen by all users)&lt;br /&gt;
* Different '''user roles'''&lt;br /&gt;
** Administrator&lt;br /&gt;
** Manager&lt;br /&gt;
** Staff&lt;br /&gt;
** CEO&lt;br /&gt;
* Different '''groups or departments''' (note that there could be a tree (e.g. the Sales group of the heavy engineering division) or tagged view (e.g. someone could be a member of Sales as well as marketing) associated with this. &lt;br /&gt;
** Purchasing&lt;br /&gt;
** Marketing&lt;br /&gt;
** Engineering&lt;br /&gt;
* '''Access rights of various user roles and groups''' - The application allows various users privileges on some resource (or asset) and we need to specify the constraints of these privileges.  One simple way to know these business rules/constraints is to make use of the application documentation effectively.  For example, look for clauses like &amp;quot;If the administrator allows individual user access..&amp;quot;, &amp;quot;If configured by the administrator..&amp;quot; and you know the restriction imposed by the application. &lt;br /&gt;
* '''Privilege Table''' – After learning about the various privileges on the resources along with the constraints, you are all set to create a Privilege Table.  Get answers to: &lt;br /&gt;
** What can each user role do on which resource with what constraint?  This will help you in deducing who cannot do what on which resource.  &lt;br /&gt;
** What are the policies across groups? &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;display: block; margin-left: 15px;&amp;quot;&amp;gt;Consider the following privileges: &amp;quot;Approve expense report&amp;quot;, &amp;quot;Book a conference room&amp;quot;, &amp;quot;Transfer money from own account to another user's account&amp;quot;. A privilege could be thought of as a combination of a verb (e.g. Approve, Book, Withdraw) and one or more nouns (Expense report, conference room, account). The output of this activity is a grid with the various privileges forming the leftmost column while all user roles and groups would form the column headings of other columns. There would also be a “Comments” column that qualifies data in this grid.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto 1em auto&amp;quot;&lt;br /&gt;
| '''Privilege''' || '''Who can do this''' || '''Comment'''&lt;br /&gt;
|-&lt;br /&gt;
| Approve expense report || Any supervisor may approve report submitted by his subordinate || &lt;br /&gt;
|-&lt;br /&gt;
| Submit expense report || Any employee may do this for himself || &lt;br /&gt;
|-&lt;br /&gt;
| Transfer funds from one account to another || An account holder may transfer funds from own account to another account || &lt;br /&gt;
|-&lt;br /&gt;
| View payslip || Any employee may see his own || &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This data is a key input for designing logical tests. &lt;br /&gt;
&lt;br /&gt;
===Developing logical tests===&lt;br /&gt;
&lt;br /&gt;
Here are several guidelines to designing logical tests from the raw data gathered. &lt;br /&gt;
&lt;br /&gt;
* '''Privilege Table''' - Make use of the privilege table as a reference while creating application specific logical threats. In general, develop a test for each admin privilege to check if it could be executed illegally by a user role with minimum privileges or no privilege.  For example:&lt;br /&gt;
** Privilege: Operations Manager cannot approve a customer order&lt;br /&gt;
** Logical Test: Operations Manager approves a customer order&lt;br /&gt;
&lt;br /&gt;
* '''Improper handling of special user action sequences''' - Navigating through an application in a certain way or revisiting pages out of synch can cause logical errors which may cause the application to do something it's not meant to. For example:&lt;br /&gt;
** A wizard application where one fills in forms and proceeds to the next step. One cannot in any normal way (according to the developers) enter the wizard in the middle of the process. Bookmarking a middle step (say step 4 of 7), then continuing with the other steps until completion or form submission, then revisiting the middle step that was bookmarked may &amp;quot;upset&amp;quot; the backend logic due to a weak ''state model''.&lt;br /&gt;
&lt;br /&gt;
* '''Cover all business transaction paths''' - While designing tests, check for all alternative ways to perform the same business transaction. For example, create tests for both cash and credit payment modes.&lt;br /&gt;
&lt;br /&gt;
* '''Client-side validation''' - Look at all client side validations and see how they could be the basis for designing logical tests.  For example, a funds transfer transaction has a validation for negative values in the amount field.  This information can be used to design a logical test such as &amp;quot;A user transfers negative amount of money&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Standard prerequisites===&lt;br /&gt;
&lt;br /&gt;
Typically, some initial activities useful as setup are: &lt;br /&gt;
* Create test users with different permissions&lt;br /&gt;
* Browse all the important business scenarios/workflows in the application&lt;br /&gt;
&lt;br /&gt;
===Execution of logical tests=== &lt;br /&gt;
&lt;br /&gt;
Pick up each logical test and do the following:&lt;br /&gt;
* Analyze the HTTP/S requests underlying the acceptable usage scenario corresponding to the logical test&lt;br /&gt;
** Check the order of HTTP/S requests&lt;br /&gt;
** Understand the purpose of hidden fields, form fields, query string parameters being passed&lt;br /&gt;
* Try and subvert it by exploiting the known vulnerabilities&lt;br /&gt;
* Verify that the application fails for the test &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Business logic - http://en.wikipedia.org/wiki/Business_logic&lt;br /&gt;
* Prevent application logic attacks with sound app security practices - http://searchappsecurity.techtarget.com/qna/0,289202,sid92_gci1213424,00.html?bucket=NEWS&amp;amp;topic=302570&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Automated tools are incapable of detecting logical vulnerabilities. For example, tools have no means of detecting if a bank’s &amp;quot;fund transfer&amp;quot; page allows a user to transfer a negative amount to another user (in other words, it allows a user to transfer a positive amount into his own account) nor do they have any mechanism to help the human testers to suspect this state of affairs.&lt;br /&gt;
&lt;br /&gt;
'''Preventing transfer of a negative amount''': Tools could be enhanced so that they can report client side validations to the tester. For example, the tool may have a feature whereby it fills a form with strange values and attempts to submit it using a full-fledged browser implementation. It should check to see whether the browser actually submitted the request. Detecting that the browser has not submitted the request would signal to the tool that submitted values are not being accepted due to client-side validation. This would be reported to the tester, who would then understand the need for designing appropriate logical tests that bypass client-side validation. In our &amp;quot;negative amount transfer&amp;quot; example, the tester would learn that the transfer of negative amounts may be an interesting test. He could then design a test wherein the tool bypasses the client-side validation code and checks to see if the resulting response contains the string &amp;quot;funds transfer successful&amp;quot;. The point is not that the tool will be able to detect this or other vulnerabilities of this nature, rather that, with some thought, it would be possible to add many such features to enlist the tools in aiding human testers to find such logical vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{Category:OWASP Testing Project AoC}}&lt;/div&gt;</summary>
		<author><name>Vwiswell</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_Information_Gathering&amp;diff=15293</id>
		<title>Testing: Information Gathering</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing:_Information_Gathering&amp;diff=15293"/>
				<updated>2007-01-12T17:07:35Z</updated>
		
		<summary type="html">&lt;p&gt;Vwiswell: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[http://www.owasp.org/index.php/OWASP_Testing_Guide_v2_Table_of_Contents#Web_Application_Penetration_Testing Up]]&amp;lt;br&amp;gt;&lt;br /&gt;
{{Template:OWASP Testing Guide v2}}&lt;br /&gt;
&lt;br /&gt;
=== Information Gathering ===&lt;br /&gt;
----&lt;br /&gt;
The  first phase in security assessment is focused on collecting as much information as possible about a target application.&lt;br /&gt;
Information Gathering is a necessary step of a penetration test.&lt;br /&gt;
&lt;br /&gt;
This task can be carried out in many different ways.&lt;br /&gt;
&lt;br /&gt;
Using public tools (search engines), scanners, sending simple HTTP requests, or specially crafted requests, it is possible to force the application to leak information by sending back error messages or revealing the versions and technologies used by the application.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Often it is possible to gather information by receiving a response from the application that, as a consequence of bad default configuration of the application server or web server, could reveal vulnerabilities in the configuration or bad server management.&lt;br /&gt;
&lt;br /&gt;
[[Application Discovery AoC|4.2.1 Application Fingerprint]]&lt;br /&gt;
&lt;br /&gt;
Application fingerprint is the first step of the Information Gathering process; knowing the version and type of a running web server allows testers to determine known vulnerabilities and the appropriate exploits to use during testing. &lt;br /&gt;
&lt;br /&gt;
[[Application Discovery AoC|4.2.2 Application Discovery]]&lt;br /&gt;
&lt;br /&gt;
Application discovery is an activity oriented to the identification of the web applications hosted on a web server/application server.&amp;lt;br&amp;gt;&lt;br /&gt;
This analysis is important because many times there is not a direct link connecting the main application backend. Discovery analysis can be useful to reveal details such as web-apps used for administrative purposes. In addition, it can reveal old versions of files or artifacts such as undeleted, obsolete scripts crafted during the test/development phase or as the result of maintenance.&lt;br /&gt;
&lt;br /&gt;
[[Spidering and googling AoC|4.2.3 Spidering and googling]]&lt;br /&gt;
&lt;br /&gt;
This phase of the Information Gathering process consists of browsing and capturing resources related to the application being tested. Search engines, such as Google, can be used to discover issues related to the web application structure or error pages produced by the application that have been exposed to the public domain.&lt;br /&gt;
&lt;br /&gt;
[[Testing for Error Code|4.2.4 Analysis of error code]]&lt;br /&gt;
&lt;br /&gt;
Web applications may divulge information during a penetration test which is not intended to be seen by an end user. Information such as error codes can inform the tester about technologies and products being used by the application.&amp;lt;br&amp;gt;&lt;br /&gt;
Such error codes can be easy to exploit without using any particular skill due to bad error handling strategy.&lt;br /&gt;
&lt;br /&gt;
[[Infrastructure configuration management testing AoC|4.2.5 Infrastructure configuration management testing]]&lt;br /&gt;
&lt;br /&gt;
Often analysis of the infrastructure and topology architecture can reveal a great deal about a web application. Information such as source code, HTTP methods permitted, administrative functionality, authentication methods and infrastructural configurations can be obtained.&amp;lt;br&amp;gt;&lt;br /&gt;
Clearly, focusing only on the web application will not be an exhaustive test. It cannot be as comprehensive as the information possibly gathered by performing a broader infrastructure analysis.  &lt;br /&gt;
&lt;br /&gt;
[[SSL/TLS Testing AoC|4.2.5.1 SSL/TLS Testing]]&lt;br /&gt;
&lt;br /&gt;
SSL and TLS are two protocols that provide, with the support of cryptography, secure channels for the protection, confidentiality, and authentication of the information being transmitted.&amp;lt;br&amp;gt;&lt;br /&gt;
Considering the criticality of these security implementations, it is important to verify the usage of a strong cipher algorithm and its proper implementation.&lt;br /&gt;
&lt;br /&gt;
[[DB Listener Testing AoC|4.2.5.2 DB Listener Testing]]&lt;br /&gt;
&lt;br /&gt;
During the configuration of a database server, many DB administrators do not adequately consider the security of the DB listener component. The listener could reveal sensitive data as well as configuration settings or running database instances.&amp;lt;br&amp;gt;&lt;br /&gt;
This information could provide some useful hints needed to compromise the reservedness, integrity and availability of the stored data. An accurate security analysis of the DB listener configuration can allow for the acquisition this information.&lt;br /&gt;
&lt;br /&gt;
[[Application configuration management testing AoC|4.2.6 Application configuration management testing]]&lt;br /&gt;
&lt;br /&gt;
Web applications hide some information that is usually not considered during the development or configuration of the application itself.&amp;lt;br&amp;gt;&lt;br /&gt;
This data can be discovered in the source code, in the log files or in the default error codes of the web servers. A correct approach to this topic is fundamental during a security assessment.&lt;br /&gt;
&lt;br /&gt;
[[File extensions handling AoC|4.2.6.1 File extensions handling]]&lt;br /&gt;
&lt;br /&gt;
The file extensions present in a web server or a web-app make it possible to identify the technologies which compose the target application, e.g. jsp and asp extensions. File extensions can also expose additional systems connected to the application.&lt;br /&gt;
&lt;br /&gt;
[[Old file testing AoC|4.2.6.2 Old, backup and unreferenced files]]&lt;br /&gt;
&lt;br /&gt;
Redundant, readable and downloadable files on a web server, such as old, backup and renamed files, are a big source of information leakage. It is necessary to verify the presence of these files because they may contain parts of source code, installation paths as well as passwords for applications and/or databases.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Category:OWASP Testing Project AoC}}&lt;/div&gt;</summary>
		<author><name>Vwiswell</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_Introduction_and_objectives&amp;diff=15292</id>
		<title>Testing: Introduction and objectives</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing:_Introduction_and_objectives&amp;diff=15292"/>
				<updated>2007-01-12T16:22:28Z</updated>
		
		<summary type="html">&lt;p&gt;Vwiswell: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[http://www.owasp.org/index.php/OWASP_Testing_Guide_v2_Table_of_Contents#Web_Application_Penetration_Testing Up]]&amp;lt;br&amp;gt;&lt;br /&gt;
{{Template:OWASP Testing Guide v2}}&lt;br /&gt;
&lt;br /&gt;
This Chapter describes the OWASP Web Application Penetration testing methodology and explains how to test each vulnerability.&lt;br /&gt;
&lt;br /&gt;
'''What is Web Application Penetration Testing?'''&amp;lt;br&amp;gt;&lt;br /&gt;
A penetration test is a method of evaluating the security of a computer system or network by simulating an attack. A Web Application Penetration Test focuses only on evaluating the security of a web application.&amp;lt;br&amp;gt;&lt;br /&gt;
The process involves an active analysis of the application for any weaknesses, technical flaws or vulnerabilities. Any security issues that are found will be presented to the system owner together with an assessment of their impact and often with a proposal for mitigation or a technical solution.&lt;br /&gt;
&lt;br /&gt;
'''What is a vulnerability?'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Given that an application owns a set of assets (resources of value such as the data in a database or on the file system), a vulnerability is a weakness in an asset that makes a threat possible.&lt;br /&gt;
So a threat is a potential occurrence that may harm an asset by exploiting a vulnerability.&lt;br /&gt;
A test is an action that tends to show a vulnerability in the application.&lt;br /&gt;
&lt;br /&gt;
'''Our approach in writing this guide'''&lt;br /&gt;
&lt;br /&gt;
The OWASP approach is Open and Collaborative:&lt;br /&gt;
* Open: every security expert can participate with his experience in the project. Everything is free.&lt;br /&gt;
* Collaborative: we usually perform brainstorming before the articles are written so we can share our ideas and develop a collective vision of the project. That means rough consensus, wider audience and participation.&amp;lt;br&amp;gt;&lt;br /&gt;
This approach tends to create a defined Testing Methodology that will be:&lt;br /&gt;
* Consistent&lt;br /&gt;
* Reproducible&lt;br /&gt;
* Under quality control&amp;lt;br&amp;gt;&lt;br /&gt;
The problems that we want to be addressed are:&lt;br /&gt;
* Document all&lt;br /&gt;
* Test all&lt;br /&gt;
We think it is important to use a method to test all the know vulnerabilities and document all the the pen test activities.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What is the OWASP testing methodology?'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Penetration testing will never be an exact science where a complete list of all possible issues that should be tested can be defined. Indeed, penetration testing is only an appropriate technique for testing the security of web applications under certain circumstances. &lt;br /&gt;
The goal is to collect all the possible testing techniques, explain them and keep the guide updated.&amp;lt;br&amp;gt;&lt;br /&gt;
The OWASP Web Application Penetration Testing method is based on the black box approach. The tester knows nothing or very little information about the application to be tested.&lt;br /&gt;
The testing model consists of:&lt;br /&gt;
* Tester: Who performs the testing activities &lt;br /&gt;
* Tools and methodology: The core of this Testing Guide project&lt;br /&gt;
* Application: The black box to test&lt;br /&gt;
The test is divided in 2 phases:&lt;br /&gt;
* Passive mode: in the passive mode the tester tries to understand the application's logic, plays with the application; a tool can be used for information gathering such as an HTTP proxy to observe all the HTTP requests and responses. At the end of this phase the tester should understand all the access points (gates) of the application (e.g. Header HTTP, parameters, cookies). For example the tester could find the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://www.example.com/login/Autentic_Form.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This indicates an authentication form in which the application requests a username and a password. &amp;lt;br&amp;gt;&lt;br /&gt;
The following parameters represent two access points (gates) to the application:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://www.example.com/Appx.jsp?a=1&amp;amp;b=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this case, the application shows two gates (parameters a and b).&lt;br /&gt;
All the gates found in this phase represent a point of testing. A spreadsheet with the directory tree of the application and all the access points would be useful for the second phase.&amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
* Active mode: in this phase the tester begins to test using the methodology described in the follow paragraphs.&lt;br /&gt;
&lt;br /&gt;
We have split the set of tests in 8 sub-categories:&lt;br /&gt;
*Information Gathering &lt;br /&gt;
*Business Logic Testing&lt;br /&gt;
*Authentication Testing &lt;br /&gt;
*Session Management Testing&lt;br /&gt;
*Data Validation Testing &lt;br /&gt;
*Denial of Service Testing &lt;br /&gt;
*Web Services Testing &lt;br /&gt;
*AJAX Testing &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the list of tests that we will explain in the next paragraphs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:Table1.PNG]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:Table2.PNG]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:Table3.PNG]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Category:OWASP Testing Project AoC}}&lt;/div&gt;</summary>
		<author><name>Vwiswell</name></author>	</entry>

	</feed>