This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org

Difference between revisions of "Category:OWASP JSP Testing Tool Project"

From OWASP
Jump to: navigation, search
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:OWASP Project]]
+
{|
 +
|-
 +
! width="700" align="center" | <br>
 +
! width="500" align="center" | <br>
 +
|-
 +
| align="right" | [[Image:OWASP Inactive Banner.jpg|800px| link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Inactive_Projects]]
 +
| align="right" |
 +
 
 +
|}
 +
[[Category:OWASP Project|JSP Testing Tool Project]]
 +
[[Category:OWASP Tool]]
 +
[[Category:OWASP Download]]
 +
[[Category:OWASP Alpha Quality Tool]]
 +
 
 +
==== Main ====
 +
 
 +
__TOC__
  
 
= Summer of Code 2008 Status =
 
= Summer of Code 2008 Status =
Line 16: Line 32:
  
 
== About the Author ==
 
== About the Author ==
Jason is an Application Security Engineer at Aspect Security during which time he has performed code reviews, penetration testing and training at a variety of financial, commercial, and government institutions. He is a certified GIAC Secure Software Programmer in Java and before joining Aspect, he was a Java Software Developer and a Java course instructor for Johns Hopkins University. He is a core developer on the [[:Category:OWASP AntiSamy Project|OWASP AntiSamy Project]]. Jason eared his Post-Master's in Computer Science with a concentration in Informaiton Security from Johns Hopkins University. He previously earned his his Master's and B.S from Cornell University (both in Computer Science).
+
Jason is an Application Security Engineer at [http://www.aspectsecurity.com Aspect Security] during which time he has performed code reviews, penetration testing and training at a variety of financial, commercial, and government institutions. He is a certified [http://www.giac.org/certifications/software/gssp-java.php GIAC Secure Software Programmer] in Java and before joining Aspect, he was a Java Software Developer at a telecommunications company and a Java course instructor for [http://www.jhu.edu/ Johns Hopkins University]. He is a core developer on the [[:Category:OWASP AntiSamy Project|OWASP AntiSamy Project]]. Jason earned his Post-Master's in Computer Science with a concentration in Information Security from [http://www.jhu.edu Johns Hopkins University]. He previously earned his his Master's and B.S from [http://www.cornell.edu Cornell University] (both in Computer Science).
  
= The Report =
+
= Overview =
  
 
<div align="center">https://www.owasp.org/images/7/77/OWASP_JSP_Testing_Tool_Report_Sreenshot.png</div>
 
<div align="center">https://www.owasp.org/images/7/77/OWASP_JSP_Testing_Tool_Report_Sreenshot.png</div>
Line 29: Line 45:
  
 
The report is a combination of JSPs, HTML and JavaScript. Each ''(tag, attribute, attack)'' tuple is tested in a separately generated JSP page (based on <code>testcase.vm</code>) to provide isolation. Each test attack attempts to execute a script function named <code>x()</code> that is defined on the test page. The function populates an element on the page with an indicator that the test either passed or failed. The overall report page is a generated HTML page that contains the table described above and hidden IFRAME with every test page. Once the pages load, the report page evaluates the status indicated in the frame and changes the color of the corresponding table cell accordingly. Note that clicking on any table cell will toggle the visibility of the corresponding test case's IFRAME.
 
The report is a combination of JSPs, HTML and JavaScript. Each ''(tag, attribute, attack)'' tuple is tested in a separately generated JSP page (based on <code>testcase.vm</code>) to provide isolation. Each test attack attempts to execute a script function named <code>x()</code> that is defined on the test page. The function populates an element on the page with an indicator that the test either passed or failed. The overall report page is a generated HTML page that contains the table described above and hidden IFRAME with every test page. Once the pages load, the report page evaluates the status indicated in the frame and changes the color of the corresponding table cell accordingly. Note that clicking on any table cell will toggle the visibility of the corresponding test case's IFRAME.
 +
 +
=== Handling Special Case Tags ===
 +
 +
Tag libraries often have requirements or dependencies that cannot be encapsulated in the standard TLD. For example, an attribute may be of type java.lang.String, but in reality the implementation limits the attribute to a choice of select values. Another example is that the tag may have to be embedded in another tag (for example, a tag representing a selection option may have to be embedded in a combo box tag). To account for these special cases, the code utilizes a tag properties configuration file that allows users to specify values to be used in required attributes or to configure special prefixes and suffixes to enclose tags. A graphical user interface (see below) is provided as part of this tool to facilitate the creation of a configuration file for this purpose.
  
 
=== Handling Errors ===
 
=== Handling Errors ===
Line 47: Line 67:
 
# Parsing of the Tag Library Document (TLD)
 
# Parsing of the Tag Library Document (TLD)
 
# Generation of Test Pages
 
# Generation of Test Pages
# Deploying of Report
+
# Serializing the Report
  
 
=== Parsing of the Tag Library Document ===
 
=== Parsing of the Tag Library Document ===
Line 57: Line 77:
 
The code uses a report and test case template that is populated using Apache Velocity. Using the encapsulated TLD metadata from the parsed TLD, the code iterates through all tags and attributes to construct test case pages for each test attack. The test attacks come from an XML file (<code>attacks.xml</code>) which represents a repository of various cross-site scripting attacks that invoke the <code>x()</code> function.
 
The code uses a report and test case template that is populated using Apache Velocity. Using the encapsulated TLD metadata from the parsed TLD, the code iterates through all tags and attributes to construct test case pages for each test attack. The test attacks come from an XML file (<code>attacks.xml</code>) which represents a repository of various cross-site scripting attacks that invoke the <code>x()</code> function.
  
=== Deploying the Report ===
+
=== Serializing the Report ===
 +
 
 +
After the report HTML and test case JSPs are generated, they must be deployed to a JSP container in order to be rendered. The code uses an embedded instance of Tomcat to deploy the test case JSPs and then serializes them by retrieving the rendered response from Tomcat and writing it to a local file.
 +
 
 +
= Running the Tool =
 +
 
 +
The section below outlines the system requirements and procedures for running the tool. The tool was written with Java 1.4 compatibility in mind, though execution in this environment has not been tested.
 +
 
 +
== Requirements ==
 +
 
 +
The tool requires that an appropriate Java Development Kit is installed along with an Apache Tomcat Runtime (>=6.0.16). In addition, the following third-party libraries are required:
 +
 
 +
* [http://hc.apache.org/httpclient-3.x/index.html Apache Commons HTTP Client] (>=3.1)
 +
* [http://commons.apache.org/io/ Apache Commons IO] (>=1.4)
 +
* [http://velocity.apache.org/ Apache Velocity] (>=1.5)
 +
* [http://commons.apache.org/codec/ Apache Commons Codec] (>=1.3) (used by Apache Velocity)
 +
* [http://commons.apache.org/collections/ Apache Commons Collections] (>=3.2.1) (used by Apache Velocity)
 +
* [http://commons.apache.org/lang/ Apache Commons Lang] (>=2.4) (used by Apache Velocity)
 +
* [http://jakarta.apache.org/ecs/index.html Jakarta ECS] (>=1.4.2)
 +
* [http://jakarta.apache.org/oro/ Jakarta ORO] (>=1.0.8)
 +
* [[:Category:OWASP Enterprise Security API|OWASP ESAPI]] (>=1.3)
 +
 
 +
Older versions of the runtimes and libraries may be compatible, but were not tested.
 +
 
 +
== Project Layout ==
 +
 
 +
The project source tree is laid out in the following directories:
 +
*<code>src/</code>
 +
*<code>docs/</code>
 +
*<code>lib/</code>
 +
*<code>resources/</code>
 +
*<code>standalone/</code>
 +
*<code>template/</code>
 +
 
 +
== Using the Tool ==
  
After the report HTML and test case JSPs are generated, they must be deployed to a JSP container (typically an application server). The container should be configured with any mappings and JAR libraries required to use the custom tag libraries.
+
The source tree includes an Ant build file to compile and run the project. To make use of the included build file, the required libraries enumerated above should be placed in the <code>lib</code> directory. In addition, the <code>tomcat.home</code> (Tomcat runtime directory) and <code>jdk.home</code> (JDK home directory) properties should be set in the build file. The build file defines three tasks relevant to running the tool: <code>run-tag-report</code>, <code>run-full-report</code> and <code>run-gui</code>.
 +
 
 +
=== run-tag-report ===
 +
 
 +
This task creates a report on a specific tag from a tag library. This is useful for retesting a specific tag's status after modifications of the tag implementation have been made. The parameters for this task are:
 +
* the location of the tag library definition file
 +
* the location of the tag properties configuration file
 +
* the location of the output directory
 +
* the name of the tag to test
 +
 
 +
=== run-full-report ===
 +
 
 +
This task creates a report on an entire tag library. Note that this task can take an extremely long time to execute. For example, this task run on the the JSF HTML Basic tag library ran for over 24 hours on an average desktop machine. The parameters for this task are:
 +
* the location of the tag library definition file
 +
* the location of the tag properties configuration file
 +
* the location of the output directory
 +
* the name of the tag to test
 +
 
 +
=== run-gui ===
 +
 
 +
This task runs the graphical user interface for creating tag properties configuration files. The parameters for this task are:
 +
* the location of the tag properties configuration file
 +
* the location of the tag library definition file
  
 
= Future Vision =
 
= Future Vision =
Line 72: Line 148:
 
=== Attribute Permutation ===
 
=== Attribute Permutation ===
 
Another issue is that different permutations of attributes may result in different behavior which can affect the outcome of a test case. This issue can be resolved by generating multiple permutations of attributes, but this becomes infeasible as the number of attributes grows.
 
Another issue is that different permutations of attributes may result in different behavior which can affect the outcome of a test case. This issue can be resolved by generating multiple permutations of attributes, but this becomes infeasible as the number of attributes grows.
 +
 +
==== Project Identification ====
 +
{{Template:OWASP Project Identification Tab
 +
| project_name = JSP Testing Tool
 +
| project_description = an easy to use, freely available tool that can be used to quickly ascertain the level of protection that each component of a JSP tag library offers
 +
| leader_email = jason.li@owasp.org
 +
| leader_name = Jason Li
 +
| maintainer_email = jason.li@owasp.org
 +
| maintainer_name = Jason Li
 +
| mailing_list_name = owasp-jsp-testing-tool-project
 +
| project_road_map = Category:OWASP_JSP_Testing_Tool_Project#Future_Vision
 +
}}
 +
<headertabs/>

Latest revision as of 19:49, 23 January 2014



OWASP Inactive Banner.jpg

Main


PROJECT IDENTIFICATION
Project Name OWASP JSP Testing Tool Project
Short Project Description The goal of this project is to create an easy to use, freely available tool that can be used to quickly ascertain the level of protection that each component of a JSP tag library offers. This information can serve two purposes:
  1. It provides a means for projects to create a coding standard. By identifying which components are safe or unsafe, a project can establish a preference order of useable components. For those components identified as unsafe, extra security requirements can be imposed on any pages using those components
  2. It provides tag library providers development guidance. Providers can target security enhancements to the components that are most susceptible to cross-site scripting attacks. They can also use these results to demonstrate their performance relative to other competing tag libraries. It also provides feedback for developers that create small custom tag libraries for internal development usage.
Short Project Description Jason Li Project Contributors
N/A
Mailing List
Subscribe here
Use here
License
New BSD License
Project Type
Tool
Sponsors
OWASP SoC 08
Release Status Main Links Related Projects

Apha Quality
Please see here for complete information.

Google Code Home

If any, add link here


Pages in category "OWASP JSP Testing Tool Project"

This category contains only the following page.