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

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Project_Information:template_Yasca_Project&amp;diff=178799</id>
		<title>Project Information:template Yasca Project</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Project_Information:template_Yasca_Project&amp;diff=178799"/>
				<updated>2014-07-15T03:23:10Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Updated website.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;700&amp;quot; align=&amp;quot;center&amp;quot; | &amp;lt;br&amp;gt; &lt;br /&gt;
! width=&amp;quot;500&amp;quot; align=&amp;quot;center&amp;quot; | &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;right&amp;quot; | [[Image:OWASP Inactive Banner.jpg|800px| link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Inactive_Projects]] &lt;br /&gt;
| align=&amp;quot;right&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;8&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''PROJECT IDENTIFICATION''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''Project Name'''&lt;br /&gt;
 | colspan=&amp;quot;7&amp;quot; style=&amp;quot;width:85%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;|&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt;'''OWASP Yasca Project'''  &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;| '''Short Project Description''' &lt;br /&gt;
 | colspan=&amp;quot;7&amp;quot; style=&amp;quot;width:85%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;| &lt;br /&gt;
* Yasca is an open source program which looks for security vulnerabilities, code-quality, performance, and conformance to best practices in program source code. It leverages external open source programs, such as [http://findbugs.sourceforge.net/ FindBugs], [http://pmd.sourceforge.net PMD], [http://artho.com/jlint JLint], [http://javascriptlint.com/ JavaScript Lint], [http://www.icosaedro.it/phplint/ PHPLint], [http://en.wikipedia.org/wiki/Cppcheck Cppcheck], [http://en.wikipedia.org/wiki/ClamAV ClamAV], [http://en.wikipedia.org/wiki/RATS RATS], and [http://pixybox.seclab.tuwien.ac.at/ Pixy] to scan specific file types, and also contains many custom scanners developed just for Yasca. It is a command-line tool that generates reports in HTML, CSV, XML, SQLite, and other formats. Yasca is easily extensible via a plugin-based architecture, so scanning any particular file is as simple as coming up with the rules or integrating external tools.&amp;lt;br/&amp;gt;&lt;br /&gt;
* Yasca also features a simple regular-expression plugin that allows new rules to be written in less than a minute.&lt;br /&gt;
&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''Key Project Information'''&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Licensed under&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/BSD_license BSD License]&amp;lt;br/&amp;gt;[http://en.wikipedia/org/wiki/GPL_license GPL License]&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Project Leader&amp;lt;br&amp;gt;[mailto:michael.scovetta(at)gmail.com '''Michael V. Scovetta''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Project Contributors&amp;lt;br&amp;gt;[mailto:name(at)name '''Name''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Mailing List&amp;lt;br&amp;gt;[https://lists.owasp.org/mailman/listinfo/owasp-yasca-project '''To Subscribe''']&amp;lt;br&amp;gt;[mailto:owasp-yasca-project(at)lists.owasp.org '''To Use''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|First Reviewer&amp;lt;br&amp;gt;[mailto:name(at)name '''Name''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Second Reviewer&amp;lt;br&amp;gt;[mailto:name(at)name '''Name''']&amp;lt;br&amp;gt;&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|OWASP Board Member&amp;lt;br&amp;gt;(if applicable)&amp;lt;br&amp;gt;[mailto:name(at)name '''Name&amp;amp;Email''']&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;6&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''PROJECT MAIN LINKS''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:100%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
Yasca is hosted on [https://github.com/scovetta/yasca Github] and has a main project website at [http://scovetta.github.io/yasca/ scovetta.github.io/yasca].&lt;br /&gt;
&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;6&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''RELATED PROJECTS''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:100%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
* [[:Category:OWASP Orizon Project|OWASP Orizon Project]]&amp;lt;br&amp;gt;&lt;br /&gt;
* [[:Category:OWASP Code Review_Project|OWASP Code Review_Project]]&lt;br /&gt;
* [[:Category:OWASP Open Review Project|OWASP Open Review Project]]&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;6&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''SPONSORS &amp;amp; GUIDELINES''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:50%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Sponsor name, if applicable  &lt;br /&gt;
 | style=&amp;quot;width:50%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|[[:Category:OWASP Yasca Project Roadmap|'''Guidelines/Roadmap''']]&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|ASSESSMENT AND REVIEW PROCESS&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#6C82B5&amp;quot; align=&amp;quot;center&amp;quot;|'''Review/Reviewer''' &lt;br /&gt;
 | style=&amp;quot;width:21%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''Author's Self Evaluation'''&amp;lt;br&amp;gt;(applicable for Alpha Quality &amp;amp; further) &lt;br /&gt;
 | style=&amp;quot;width:21%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''First Reviewer'''&amp;lt;br&amp;gt;(applicable for Alpha Quality &amp;amp; further)&lt;br /&gt;
 | style=&amp;quot;width:21%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''Second Reviewer'''&amp;lt;br&amp;gt;(applicable for Beta Quality &amp;amp; further)&lt;br /&gt;
 | style=&amp;quot;width:22%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''OWASP Board Member'''&amp;lt;br&amp;gt;(applicable just for Release Quality) &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''First Review''' &lt;br /&gt;
 | style=&amp;quot;width:21%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Yes'''&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Beta Status'''&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - Self Evaluation - A|See&amp;amp;Edit: First Review/SelfEvaluation (A)]]&lt;br /&gt;
 | style=&amp;quot;width:21%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Not yet''' (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Alpha Status''' - (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - First Reviewer - B|See&amp;amp;Edit: First Review/1st Reviewer (B)]]&lt;br /&gt;
 | style=&amp;quot;width:21%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Yes/No''' (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Alpha Status''' - (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - Second Reviewer - C|See&amp;amp;Edit: First Review/2nd Reviewer (C)]]&lt;br /&gt;
 | style=&amp;quot;width:22%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Yes/No''' (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Alpha Status''' - (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - OWASP Board Member - D|See/Edit: First Review/Board Member (D)]]&lt;br /&gt;
 |-&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Data_Exchange_Format_Project&amp;diff=114430</id>
		<title>OWASP Data Exchange Format Project</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Data_Exchange_Format_Project&amp;diff=114430"/>
				<updated>2011-07-22T16:12:05Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== Main  ====&lt;br /&gt;
&lt;br /&gt;
At the moment exchanging data between pentest tools it is far too difficult. &lt;br /&gt;
&lt;br /&gt;
So ... the purpose of this project is to define a simple, open format for exchanging data between pentest tools!&lt;br /&gt;
&lt;br /&gt;
Involvement is encouraged, so if you would like to contribute to this project then please join the [https://lists.owasp.org/mailman/listinfo/owasp-data-exchange-format mailing list] and / or contact one of the project leaders.&lt;br /&gt;
&lt;br /&gt;
=== Requirements  ===&lt;br /&gt;
&lt;br /&gt;
The format must be open, and licensed so that it can be adopted by all products, whether open, closed, free or commercial. &lt;br /&gt;
&lt;br /&gt;
It must be as simple to adopt as possible, and ideally based on existing open formats. &lt;br /&gt;
&lt;br /&gt;
==== Roadmap  ====&lt;br /&gt;
&lt;br /&gt;
The high level roadmap is:&lt;br /&gt;
&lt;br /&gt;
# Psiinon to document a strawman proposal&lt;br /&gt;
# All - rip the strawman to pieces and agree an improved format&lt;br /&gt;
# Finalize DEF v1.0&lt;br /&gt;
# Supporting project leaders to adopt the format in their tools&lt;br /&gt;
# Publicize and drive adoption in other tools&lt;br /&gt;
# Learn from our experiences and start on the next version, repeat ;)&lt;br /&gt;
&lt;br /&gt;
==== Strawman  ====&lt;br /&gt;
&lt;br /&gt;
This tab will document a strawman proposal for all concerned to rip to pieces :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Supporting projects  ====&lt;br /&gt;
&lt;br /&gt;
The following project leaders have agreed to support this format and (once it has been agreed) adopt it within their projects.&lt;br /&gt;
&lt;br /&gt;
If you would like your project added to this list then feel free to update it, or contact one of the project leaders to update it for you.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; align=&amp;quot;left&amp;quot; cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Project &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Leader&lt;br /&gt;
|-&lt;br /&gt;
| [http://portswigger.net/burp/ Burp Suite]&lt;br /&gt;
| Dafydd Stuttard (PortSwigger)&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.owasp.org/index.php/OWASP_O2_Platform O2 Platform]&lt;br /&gt;
| [[User:Dinis_Cruz|Dinis Cruz]] &lt;br /&gt;
|-&lt;br /&gt;
| [https://www.owasp.org/index.php/Category:OWASP_WebScarab_Project WebScarab]&lt;br /&gt;
| [[User:Daniel_Brzozowski|Daniel Brzozowski]] &lt;br /&gt;
|-&lt;br /&gt;
| [http://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project Zed Attack Proxy]&lt;br /&gt;
| [[User:Psiinon|Simon Bennetts (Psiinon)]]&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.owasp.org/index.php/OWASP_Yasca_Project Yasca]&lt;br /&gt;
| [[User:Scovetta|Michael Scovetta (Scovetta)]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Project About  ====&lt;br /&gt;
&lt;br /&gt;
{{:Projects/OWASP Data Exchange Format Project | Project About}} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; __NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP_Project|Data Exchange Format Project]] [[Category:OWASP_Tool]] [[Category:OWASP_Alpha_Quality_Tool]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Scovetta&amp;diff=108741</id>
		<title>User:Scovetta</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Scovetta&amp;diff=108741"/>
				<updated>2011-04-13T11:58:37Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Current OWASP Involvement ==&lt;br /&gt;
&lt;br /&gt;
I am current involved in a number of OWASP projects, including:&lt;br /&gt;
&lt;br /&gt;
* creator of the [http://www.owasp.org/index.php/Category:OWASP_Yasca_Project OWASP Yasca Project]&lt;br /&gt;
* contributor to the [[:OWASP Guide Project]]&lt;br /&gt;
&lt;br /&gt;
To see my wiki contributions, [[:Special:Contributions/scovetta|click here]].&lt;br /&gt;
 &lt;br /&gt;
== Résumé ==&lt;br /&gt;
* [http://www.scovetta.com/download/resume-latest.pdf Michael Scovetta's Résumé]&lt;br /&gt;
&lt;br /&gt;
== Security vulnerability research==&lt;br /&gt;
* [http://www.scovetta.com/view.php?f=SCL-2010-001.txt Multiple Vulnerabilities in WebCalendar]&lt;br /&gt;
* [http://www.scovetta.com/view.php?f=SCL-2005-001.txt WebCalendar: Multiple SQL Injection Vulnerabilities from Encoded Cookie] &lt;br /&gt;
* [http://www.scovetta.com/view.php?f=SCL-2005-002.txt IDN Feature Workaround via Proxy.pac]&lt;br /&gt;
&lt;br /&gt;
== Presentations/Video ==&lt;br /&gt;
* [http://www.youtube.com/watch?v=OjtjZSHWkyo Static Analyzer v1.0 Demo (Yasca)], 17/Sep/10&lt;br /&gt;
* [http://www.nyphp.org/PHP-Presentations/134_Static-Code-Analysis-PHP-Zend-Framework-Circa-2009 Static Code Analysis Using Yasca], New York PHP, 24/Feb/09&lt;br /&gt;
&lt;br /&gt;
== External Sites ==&lt;br /&gt;
* [http://www.scovetta.com Personal Home Page]&lt;br /&gt;
* [http://www.linkedin.com/in/scovetta LinkedIn Profile]&lt;br /&gt;
* [http://www.tasecuritygroup.com Trusted Advisor Security]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=How_to_Join_a_Committee&amp;diff=106978</id>
		<title>How to Join a Committee</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=How_to_Join_a_Committee&amp;diff=106978"/>
				<updated>2011-03-16T16:51:48Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Removed myself&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[:Global Committee Pages|Click here to return to the Global Committee Pages]]. &lt;br /&gt;
&lt;br /&gt;
The Open Web Application Security Project (OWASP) is a worldwide free and open community focused on improving the security of application software. Our mission is to make application security &amp;quot;visible,&amp;quot; so that people and organizations can make informed decisions about application security risks. Everyone is free to participate in OWASP and all of our materials are available under a free and open software license. The OWASP Foundation is a 501c3 not-for-profit charitable organization that ensures the ongoing availability and support for our work. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Many individuals start with OWASP as a user of a tool/guide or attending a local chapter. From that they may become a individual project leader on a new tool/guide or may serve on the board of a local OWASP chapter. Becoming a member of one of the Global Committees is not only a great achievement in the technical community, but is an opportunity to directly impact the future of OWASP Foundation. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Global Committees are designed to develop a committee plan and then work on a global effort with your peers from around the world. Ideally you nominate a peer as a regional spokesperson and he/she is the conduit for global issues that has approx., 10 hrs per month to volunteer time to OWASP Foundation. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; To encourage focus and participation, we suggest that volunteers contribute to '''ONE COMMITTEE''' only.  Individuals are welcome to participate in whatever committee they prefer, but may only be officially elected to serve on one committee.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; This NEW ROLE was announced at the OWASP Portugal Summit and several individuals were nominated from the floor of the event and a motion was approved at the public board meeting in November 2008. There is still time.... If you were not at the event and would like to get involved with a global role and are either a project leader or chapter leader and it must be supported by 5 endorsements of you regional peers*. We are calling this the &amp;quot;2009 2nd wave applicants&amp;quot; &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*Note that to prevent conflict of interest, Board members cannot endorse candidates for any committee nor can a committee member endorse a candidate for their own committee. Committee members may endorse candidates for other committees to which they do not belong.&lt;br /&gt;
* Committee members who wish to transfer between committees, should discuss this with their current committee first.  They must begin a new application for the committee they want to move to.&lt;br /&gt;
&lt;br /&gt;
Still have questions - [https://spreadsheets.google.com/a/owasp.org/viewform?hl=en&amp;amp;formkey=dFN1R2NIMTNROXN3dml4ZEcxXzJQYXc6MQ#gid=0 Contact Us]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Fill in one of the below application forms. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Current Committee MEMBERS UNDER ELECTION - APPLICATION FORMS  ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 90%&amp;quot; class=&amp;quot;FCK__ShowTableBorders&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: rgb(64,88,160); color: white; -moz-background-inline-policy: continuous&amp;quot; colspan=&amp;quot;8&amp;quot; align=&amp;quot;center&amp;quot; | '''OWASP GLOBAL COMMITTEES - UNDER ELECTION'''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width: 15%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | OWASP GLOBAL COMMITTEES &lt;br /&gt;
| style=&amp;quot;width: 15%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''Projects''' &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''Membership''' &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''Education''' &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''Conferences''' &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''Industry''' &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''Chapters''' &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''[[OWASP_Connections_Committee | Connections]]'''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width: 15%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''Applications -&amp;amp;gt;''' &lt;br /&gt;
| style=&amp;quot;width: 15%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''[[Global Projects and Tools Committee - Application 1|Aryavalli Gandhi]]'''&amp;lt;br&amp;gt;'''[[Global Projects and Tools Committee - Application 2|Brad Causey]]'''&amp;lt;br&amp;gt;[[Global Projects and Tools Committee - Application 3|Chris Schmidt]]&amp;lt;br&amp;gt;[[Global Projects and Tools Committee - Application 4|Justin Searle]]&amp;lt;br&amp;gt;[[Global Projects and Tools Committee - Application 5|Larry Casey]]&amp;lt;br&amp;gt;[[Global Projects and Tools Committee - Application 6|Keith Turpin]]&amp;lt;br&amp;gt;add [[Global Projects and Tools Committee - Template|more]], if needed &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | [[Global Membership Committee - Application 1|Tony UcedaVelez]]&amp;lt;br&amp;gt;[[Global Membership Committee - Application 2|Mateo Martínez]]&amp;lt;br&amp;gt;[[Global Membership Committee - Application 3|Ofer Maor]]&amp;lt;br&amp;gt;[[Global Membership Committee - Application 4|Aryavalli Gandhi]]&amp;lt;br&amp;gt;[[Global Membership Committee - Application 5|Helen Gao]]&amp;lt;br&amp;gt;add [[Global Membership - Template|more]], if needed &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | &amp;lt;br&amp;gt;[[Global Education Committee - Application 2|'''Carlos Serrão''']]&amp;lt;br&amp;gt;[[Global Education Committee - Application 3|'''Sébastien Gioria''']]&amp;lt;br&amp;gt;[[Global Education Committee - Application 5|Marc Chisinevski]]&amp;lt;br&amp;gt;[[Global Education Committee - Application 6|Zaki Akhmad]]&amp;lt;br&amp;gt; add [[Global Education Committee - Template|more]], if needed &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | &lt;br /&gt;
&amp;lt;br&amp;gt;[[Global Conferences Committee - Application 7|'''Mohd Fazli Azran''']]&amp;lt;br&amp;gt;[[Global Conferences Committee - Application 8|'''Zhendong Yu ''']]&amp;lt;br&amp;gt;[[Global Conferences Committee - Application 9|'''Benjamin (Ben) Tomhave''']]&amp;lt;br&amp;gt;[[Global Conferences Committee - Application 10|'''Applicant 10''']]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;add [[Global Conferences Committee - Template|more]], if needed&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | [[Global Industry Committee - Application 1|'''Colin Watson''']]&amp;lt;br&amp;gt;[[Global Industry Committee - Application 2|'''Alexander Fry''']]&amp;lt;br&amp;gt;[[Global Industry Committee - Application 3|'''Yiannis Pavlosoglou''']]&amp;lt;br&amp;gt;[[Global Industry Committee - Application 4|'''Joe Bernik''']]&amp;lt;br&amp;gt;[[Global Industry Committee - Application 5|'''Lorna Alamri''']]&amp;lt;br&amp;gt; [[Global Industry Committee - Application 6|Nishi Kumar]]&amp;lt;br&amp;gt;[[Global Industry Committee - Application 7|Applicant 7]]&amp;lt;br&amp;gt;[[Global Industry Committee - Application 8|Applicant 8]] &amp;lt;br&amp;gt;[[Global Industry Committee - Application 9|Applicant 9]] &amp;lt;br&amp;gt;[[Global Industry Committee - Application 10|Applicant 10]] &amp;lt;br&amp;gt;[[Global Industry Committee - Application 11|Applicant 11]] &amp;lt;br&amp;gt;[[Global Industry Committee - Application 12|Applicant 12]] &amp;lt;br&amp;gt;add [[Global Industry Committee - Template|more]], if needed &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | &amp;lt;br&amp;gt;[[Global Chapter Committee - Application 2|Matthew Chalmers]]&amp;lt;br&amp;gt;[[Global Chapter Committee - Application 3|Mandeep Khera]]&amp;lt;br&amp;gt;[[Global Chapter Committee - Application 4|Tin Zaw.]]&amp;lt;br&amp;gt;[[Global Chapter Committee - Application 5|L. Gustavo C. Barbato]]&amp;lt;br&amp;gt;[[Global Chapter Committee - Application 6|Ofer Maor]]&amp;lt;br&amp;gt;[[Global Chapter Committee - Application 7|Gandhi Aryavalli]]&amp;lt;br&amp;gt;add [[Global Chpaters Committee - Template|more]], if needed &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | &amp;lt;br&amp;gt;'''[[OWASP Connections Committee - Application 1|Lorna Alamri]]'''&amp;lt;br&amp;gt;[[OWASP Connections Committee - Application 2|'''Robert Hansen''']]&amp;lt;br&amp;gt;[[OWASP Connections Committee - Application 3|'''Justin Clarke''']]&amp;lt;br&amp;gt;[[OWASP Connections Committee - Application 4|'''Jim Manico''']]&amp;lt;br&amp;gt;[[OWASP Connections Committee - Application 5|Greg Genung]]&amp;lt;br&amp;gt;[[OWASP Connections Committee - Application 6|Doug Wilson]]&amp;lt;br&amp;gt;add [[OWASP Connections Committee - Template|more]], if needed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MEMBERS WITH OWASP SUMMIT'S APPROVAL  ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width: 90%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;7&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(64, 88, 160); -moz-background-inline-policy: continuous; color: white;&amp;quot; | '''OWASP GLOBAL COMMITTEES - ELECTED AT THE OWASP SUMMIT 08'''&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(242, 152, 76); width: 15%; -moz-background-inline-policy: continuous;&amp;quot; | OWASP GLOBAL COMMITTEES &lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(242, 152, 76); width: 15%; -moz-background-inline-policy: continuous;&amp;quot; | [[Global Projects Committee|'''Projects''']] &lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(242, 152, 76); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | [[Global Membership Committee|'''Membership''']] &lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(242, 152, 76); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | [[Global Education Committee|'''Education''']] &lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(242, 152, 76); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | [[Global Conferences Committee|'''Conferences''']] &lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(242, 152, 76); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | [[Global Industry Committee|'''Industry''']] &lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(242, 152, 76); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | [[Global Chapter Committee|'''Chapters''']]&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(204, 204, 204); width: 15%; -moz-background-inline-policy: continuous;&amp;quot; | Current committee members &lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(204, 204, 204); width: 15%; -moz-background-inline-policy: continuous;&amp;quot; | &lt;br /&gt;
*[[:User:Dinis.cruz|Dinis Cruz]] &lt;br /&gt;
*[[:Image:Image021-Jason Li.jpg|Jason Li]] &lt;br /&gt;
*[[:Image:Image019-Matt Tesauro.jpg|Matt Tesauro]] &lt;br /&gt;
*[[:Image:Image022-Leo Cavallari.jpg|Leo Cavallari]] &lt;br /&gt;
*[[:Image:Image020-Pravir Chandra.jpg|Pravir Chandra]]&lt;br /&gt;
&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(204, 204, 204); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | &lt;br /&gt;
*[[:User:Brennan|Tom Brennan]] &lt;br /&gt;
*[[:Image:Image018-Dan Cornell.jpg|Dan Cornell]] &lt;br /&gt;
*[[:Image:Image017-Michael Coates.jpg|Michael Coates]]&lt;br /&gt;
&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(204, 204, 204); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | &lt;br /&gt;
*[[User:Sdeleersnyder|Seba Deleersnyder]] &lt;br /&gt;
*[[:Image:Image007-Martin Knobloch.jpg|Martin Knobloch]] &lt;br /&gt;
*[[:Image:Image012-Mano Paul.jpg|Mano Paul]] &lt;br /&gt;
*[[:Image:Image008-Eduardo Neves.jpg|Eduardo Neves]] &lt;br /&gt;
*[[:Image:Image010-Kuai Hinjosa.jpg|Kuai Hinjosa]] &lt;br /&gt;
*[[:Image:Image011-Cecil Su.jpg|Cecil Su]] &lt;br /&gt;
*[[:Image:Image009-Fabio Cerullo.jpg|Fabio Cerullo]]&lt;br /&gt;
&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(204, 204, 204); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | &lt;br /&gt;
*[[:User:Wichers|Dave Wichers]] &lt;br /&gt;
*[[:Image:Image005-Wayne Huang.jpg|Wayne Huang]] &lt;br /&gt;
*[[:Image:Image003-Steve Antoniewicz.jpg|Steve Antoniewicz]] &lt;br /&gt;
*[[:Image:Image004-Dhruv Soi.jpg|Dhruv Soi]]&lt;br /&gt;
&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(204, 204, 204); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | &lt;br /&gt;
*[[:User:Brennan|Tom Brennan]] &lt;br /&gt;
*[[:Image:Image014 Rex Booth.jpg|Rex Booth]] &lt;br /&gt;
*[[:Image:Image016-Georg Hess.jpg|Georg Hess]] &lt;br /&gt;
*[[:Image:Image013-Eoin Keary.jpg|Eoin Keary]] &lt;br /&gt;
*[[:Image:Image015-David Campbell.jpg|David Campbell]]&lt;br /&gt;
&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(204, 204, 204); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | &lt;br /&gt;
*[[User:Sdeleersnyder|Seba Deleersnyder]] &lt;br /&gt;
*[[:Image:Image002-Puneet Mehta.jpg|Puneet Mehta]] &lt;br /&gt;
*[[:Image:Image001-Wayne Huang.jpg|Wayne Huang]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=How_to_Join_a_Committee&amp;diff=105215</id>
		<title>How to Join a Committee</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=How_to_Join_a_Committee&amp;diff=105215"/>
				<updated>2011-02-16T01:20:22Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Added myself to the list of applicants for the Global Industry Committee&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[:Global Committee Pages|Click here to return to the Global Committee Pages]]. &lt;br /&gt;
&lt;br /&gt;
The Open Web Application Security Project (OWASP) is a worldwide free and open community focused on improving the security of application software. Our mission is to make application security &amp;quot;visible,&amp;quot; so that people and organizations can make informed decisions about application security risks. Everyone is free to participate in OWASP and all of our materials are available under a free and open software license. The OWASP Foundation is a 501c3 not-for-profit charitable organization that ensures the ongoing availability and support for our work. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Many individuals start with OWASP as a user of a tool/guide or attending a local chapter. From that they may become a individual project leader on a new tool/guide or may serve on the board of a local OWASP chapter. Becoming a member of one of the Global Committees is not only a great achievement in the technical community, but is an opportunity to directly impact the future of OWASP Foundation. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Global Committees are designed to develop a committee plan and then work on a global effort with your peers from around the world. Ideally you nominate a peer as a regional spokesperson and he/she is the conduit for global issues that has approx., 10 hrs per month to volunteer time to OWASP Foundation. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; This NEW ROLE was announced at the OWASP Portugal Summit and several individuals were nominated from the floor of the event and a motion was approved at the public board meeting in November 2008. There is still time.... If you were not at the event and would like to get involved with a global role and are either a project leader or chapter leader and it must be supported by 5 endorsements of you regional peers*. We are calling this the &amp;quot;2009 2nd wave applicants&amp;quot; &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*Note that to prevent conflict of interest, Board members cannot endorse candidates for any committee nor can a committee member endorse a candidate for their own committee. Committee members may endorse candidates for other committees to which they do not belong.&lt;br /&gt;
&lt;br /&gt;
Still have questions - [https://spreadsheets.google.com/a/owasp.org/viewform?hl=en&amp;amp;formkey=dFN1R2NIMTNROXN3dml4ZEcxXzJQYXc6MQ#gid=0 Contact Us]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Fill in one of the below application forms. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Current Committee MEMBERS UNDER ELECTION - APPLICATION FORMS  ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 90%&amp;quot; class=&amp;quot;FCK__ShowTableBorders&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: rgb(64,88,160); color: white; -moz-background-inline-policy: continuous&amp;quot; colspan=&amp;quot;8&amp;quot; align=&amp;quot;center&amp;quot; | '''OWASP GLOBAL COMMITTEES - UNDER ELECTION'''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width: 15%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | OWASP GLOBAL COMMITTEES &lt;br /&gt;
| style=&amp;quot;width: 15%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''Projects''' &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''Membership''' &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''Education''' &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''Conferences''' &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''Industry''' &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''Chapters''' &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(242,152,76); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''[[OWASP_Connections_Committee | Connections]]'''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width: 15%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''Applications -&amp;amp;gt;''' &lt;br /&gt;
| style=&amp;quot;width: 15%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | '''[[Global Projects and Tools Committee - Application 1|Aryavalli Gandhi]]'''&amp;lt;br&amp;gt;'''[[Global Projects and Tools Committee - Application 2|Brad Causey]]'''&amp;lt;br&amp;gt;[[Global Projects and Tools Committee - Application 3|Applicant 3]]&amp;lt;br&amp;gt;[[Global Projects and Tools Committee - Application 4|Applicant 4]]&amp;lt;br&amp;gt;[[Global Projects and Tools Committee - Application 5|Applicant 5]]&amp;lt;br&amp;gt;add [[Global Projects and Tools Committee - Template|more]], if needed &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | [[Global Membership Committee - Application 1|Tony UcedaVelez]]&amp;lt;br&amp;gt;[[Global Membership Committee - Application 2|Mateo Martínez]]&amp;lt;br&amp;gt;[[Global Membership Committee - Application 3|Ofer Maor]]&amp;lt;br&amp;gt;[[Global Membership Committee - Application 4|Aryavalli Gandhi]]&amp;lt;br&amp;gt;[[Global Membership Committee - Application 5|Applicant 5]]&amp;lt;br&amp;gt;add [[Global Membership - Template|more]], if needed &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | &amp;lt;br&amp;gt;[[Global Education Committee - Application 2|'''Carlos Serrão''']]&amp;lt;br&amp;gt;[[Global Education Committee - Application 3|'''Sébastien Gioria''']]&amp;lt;br&amp;gt;[[Global Education Committee - Application 5|Marc Chisinevski]]&amp;lt;br&amp;gt;add [[Global Education Committee - Template|more]], if needed &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | &lt;br /&gt;
&amp;lt;br&amp;gt;[[Global Conferences Committee - Application 7|'''Mohd Fazli Azran''']]&amp;lt;br&amp;gt;[[Global Conferences Committee - Application 8|'''Applicant 8''']]&amp;lt;br&amp;gt;[[Global Conferences Committee - Application 9|'''Applicant 9''']]&amp;lt;br&amp;gt;[[Global Conferences Committee - Application 10|'''Applicant 10''']]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;add [[Global Conferences Committee - Template|more]], if needed&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | [[Global Industry Committee - Application 1|'''Colin Watson''']]&amp;lt;br&amp;gt;[[Global Industry Committee - Application 2|'''Alexander Fry''']]&amp;lt;br&amp;gt;[[Global Industry Committee - Application 3|'''Yiannis Pavlosoglou''']]&amp;lt;br&amp;gt;[[Global Industry Committee - Application 4|'''Joe Bernik''']]&amp;lt;br&amp;gt;[[Global Industry Committee - Application 5|'''Lorna Alamri''']]&amp;lt;br&amp;gt; [[Global Industry Committee - Application 6|Nishi Kumar]]&amp;lt;br&amp;gt;[[Global Industry Committee - Application 7|Applicant 7]]&amp;lt;br&amp;gt;[[Global Industry Committee - Application 8|Applicant 8]] &amp;lt;br&amp;gt;[[Global Industry Committee - Application 9|Applicant 9]] &amp;lt;br&amp;gt;[[Global Industry Committee - Application 10|Applicant 10]] &amp;lt;br&amp;gt;[[Global Industry Committee - Application 11|Applicant 11]] &amp;lt;br&amp;gt;[[Global Industry Committee - Application 12|Applicant 12]] &amp;lt;br&amp;gt;[[Global Industry Committee - Application 13|Michael Scovetta]] &amp;lt;br&amp;gt;add [[Global Industry Committee - Template|more]], if needed &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | &amp;lt;br&amp;gt;[[Global Chapter Committee - Application 2|Matthew Chalmers]]&amp;lt;br&amp;gt;[[Global Chapter Committee - Application 3|Mandeep Khera]]&amp;lt;br&amp;gt;[[Global Chapter Committee - Application 4|Tin Zaw.]]&amp;lt;br&amp;gt;[[Global Chapter Committee - Application 5|L. Gustavo C. Barbato]]&amp;lt;br&amp;gt;[[Global Chapter Committee - Application 6|Ofer Maor]]&amp;lt;br&amp;gt;[[Global Chapter Committee - Application 7|Gandhi Aryavalli]]&amp;lt;br&amp;gt;add [[Global Chpaters Committee - Template|more]], if needed &lt;br /&gt;
| style=&amp;quot;width: 14%; background: rgb(204,204,204); -moz-background-inline-policy: continuous&amp;quot; align=&amp;quot;center&amp;quot; | &amp;lt;br&amp;gt;'''[[OWASP Connections Committee - Application 1|Lorna Alamri]]'''&amp;lt;br&amp;gt;[[OWASP Connections Committee - Application 2|'''Robert Hansen''']]&amp;lt;br&amp;gt;[[OWASP Connections Committee - Application 3|'''Justin Clarke''']]&amp;lt;br&amp;gt;[[OWASP Connections Committee - Application 4|'''Jim Manico''']]&amp;lt;br&amp;gt;[[OWASP Connections Committee - Application 5|Greg Genung]]&amp;lt;br&amp;gt;add [[OWASP Connections Committee - Template|more]], if needed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MEMBERS WITH OWASP SUMMIT'S APPROVAL  ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width: 90%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;7&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(64, 88, 160); -moz-background-inline-policy: continuous; color: white;&amp;quot; | '''OWASP GLOBAL COMMITTEES - ELECTED AT THE OWASP SUMMIT 08'''&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(242, 152, 76); width: 15%; -moz-background-inline-policy: continuous;&amp;quot; | OWASP GLOBAL COMMITTEES &lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(242, 152, 76); width: 15%; -moz-background-inline-policy: continuous;&amp;quot; | [[Global Projects Committee|'''Projects''']] &lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(242, 152, 76); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | [[Global Membership Committee|'''Membership''']] &lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(242, 152, 76); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | [[Global Education Committee|'''Education''']] &lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(242, 152, 76); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | [[Global Conferences Committee|'''Conferences''']] &lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(242, 152, 76); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | [[Global Industry Committee|'''Industry''']] &lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(242, 152, 76); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | [[Global Chapter Committee|'''Chapters''']]&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(204, 204, 204); width: 15%; -moz-background-inline-policy: continuous;&amp;quot; | Current committee members &lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(204, 204, 204); width: 15%; -moz-background-inline-policy: continuous;&amp;quot; | &lt;br /&gt;
*[[:User:Dinis.cruz|Dinis Cruz]] &lt;br /&gt;
*[[:Image:Image021-Jason Li.jpg|Jason Li]] &lt;br /&gt;
*[[:Image:Image019-Matt Tesauro.jpg|Matt Tesauro]] &lt;br /&gt;
*[[:Image:Image022-Leo Cavallari.jpg|Leo Cavallari]] &lt;br /&gt;
*[[:Image:Image020-Pravir Chandra.jpg|Pravir Chandra]]&lt;br /&gt;
&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(204, 204, 204); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | &lt;br /&gt;
*[[:User:Brennan|Tom Brennan]] &lt;br /&gt;
*[[:Image:Image018-Dan Cornell.jpg|Dan Cornell]] &lt;br /&gt;
*[[:Image:Image017-Michael Coates.jpg|Michael Coates]]&lt;br /&gt;
&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(204, 204, 204); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | &lt;br /&gt;
*[[User:Sdeleersnyder|Seba Deleersnyder]] &lt;br /&gt;
*[[:Image:Image007-Martin Knobloch.jpg|Martin Knobloch]] &lt;br /&gt;
*[[:Image:Image012-Mano Paul.jpg|Mano Paul]] &lt;br /&gt;
*[[:Image:Image008-Eduardo Neves.jpg|Eduardo Neves]] &lt;br /&gt;
*[[:Image:Image010-Kuai Hinjosa.jpg|Kuai Hinjosa]] &lt;br /&gt;
*[[:Image:Image011-Cecil Su.jpg|Cecil Su]] &lt;br /&gt;
*[[:Image:Image009-Fabio Cerullo.jpg|Fabio Cerullo]]&lt;br /&gt;
&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(204, 204, 204); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | &lt;br /&gt;
*[[:User:Wichers|Dave Wichers]] &lt;br /&gt;
*[[:Image:Image005-Wayne Huang.jpg|Wayne Huang]] &lt;br /&gt;
*[[:Image:Image003-Steve Antoniewicz.jpg|Steve Antoniewicz]] &lt;br /&gt;
*[[:Image:Image004-Dhruv Soi.jpg|Dhruv Soi]]&lt;br /&gt;
&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(204, 204, 204); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | &lt;br /&gt;
*[[:User:Brennan|Tom Brennan]] &lt;br /&gt;
*[[:Image:Image014 Rex Booth.jpg|Rex Booth]] &lt;br /&gt;
*[[:Image:Image016-Georg Hess.jpg|Georg Hess]] &lt;br /&gt;
*[[:Image:Image013-Eoin Keary.jpg|Eoin Keary]] &lt;br /&gt;
*[[:Image:Image015-David Campbell.jpg|David Campbell]]&lt;br /&gt;
&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(204, 204, 204); width: 14%; -moz-background-inline-policy: continuous;&amp;quot; | &lt;br /&gt;
*[[User:Sdeleersnyder|Seba Deleersnyder]] &lt;br /&gt;
*[[:Image:Image002-Puneet Mehta.jpg|Puneet Mehta]] &lt;br /&gt;
*[[:Image:Image001-Wayne Huang.jpg|Wayne Huang]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Global_Industry_Committee_-_Application_13&amp;diff=105214</id>
		<title>Global Industry Committee - Application 13</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Global_Industry_Committee_-_Application_13&amp;diff=105214"/>
				<updated>2011-02-16T01:18:16Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[How to Join a Committee|Click here to return to 'How to Join a Committee' page]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''COMMITTEE APPLICATION FORM''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''Applicant's Name'''&lt;br /&gt;
 | colspan=&amp;quot;1&amp;quot; style=&amp;quot;width:85%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;|&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt;Michael Scovetta&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;| '''Current and past OWASP Roles''' &lt;br /&gt;
 | colspan=&amp;quot;1&amp;quot; style=&amp;quot;width:85%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;|OWASP Yasca Project (Lead), OWASP Development Guide (Contributor)&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;| '''Committee Applying for''' &lt;br /&gt;
 | colspan=&amp;quot;1&amp;quot; style=&amp;quot;width:85%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;|Global Industry Committee&lt;br /&gt;
 |}&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Please be aware that for an application to be considered by the board, '''you MUST have 5 recommendations'''.  &lt;br /&gt;
An incomplete application will not be considered for vote.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;8&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''COMMITTEE RECOMMENDATIONS''' &lt;br /&gt;
 |- &lt;br /&gt;
 ! align=&amp;quot;center&amp;quot; style=&amp;quot;background:white; color:white&amp;quot;|&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt;&lt;br /&gt;
 ! align=&amp;quot;center&amp;quot; style=&amp;quot;background:#7B8ABD; color:white&amp;quot;|&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt;'''Who Recommends/Name''' &lt;br /&gt;
 ! align=&amp;quot;center&amp;quot; style=&amp;quot;background:#7B8ABD; color:white&amp;quot;|&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt;'''Role in OWASP'''&lt;br /&gt;
 ! align=&amp;quot;center&amp;quot; style=&amp;quot;background:#7B8ABD; color:white&amp;quot;|&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt;'''Recommendation Content''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:3%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|'''1'''&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 | style=&amp;quot;width:57%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:3%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|'''2'''&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 | style=&amp;quot;width:57%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:3%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|'''3'''&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 | style=&amp;quot;width:57%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:3%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|'''4'''&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 | style=&amp;quot;width:57%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:3%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|'''5'''&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 | style=&amp;quot;width:57%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 |}&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Scovetta&amp;diff=96040</id>
		<title>User:Scovetta</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Scovetta&amp;diff=96040"/>
				<updated>2010-12-13T14:20:37Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Initial Version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Current OWASP Involvement ==&lt;br /&gt;
&lt;br /&gt;
I am current involved in a number of OWASP projects, including:&lt;br /&gt;
&lt;br /&gt;
* creator of the [http://www.owasp.org/index.php/Category:OWASP_Yasca_Project OWASP Yasca Project]&lt;br /&gt;
* contributor to the [[:OWASP Guide Project]]&lt;br /&gt;
&lt;br /&gt;
To see my wiki contributions, [[:Special:Contributions/scovetta|click here]].&lt;br /&gt;
 &lt;br /&gt;
== Résumé ==&lt;br /&gt;
* [http://www.scovetta.com/download/resume-20101213.pdf Michael Scovetta's Résumé]&lt;br /&gt;
&lt;br /&gt;
== Security vulnerability research==&lt;br /&gt;
* [http://www.scovetta.com/view.php?f=SCL-2010-001.txt Multiple Vulnerabilities in WebCalendar]&lt;br /&gt;
* [http://www.scovetta.com/view.php?f=SCL-2005-001.txt WebCalendar: Multiple SQL Injection Vulnerabilities from Encoded Cookie] &lt;br /&gt;
* [http://www.scovetta.com/view.php?f=SCL-2005-002.txt IDN Feature Workaround via Proxy.pac]&lt;br /&gt;
&lt;br /&gt;
== Presentations/Video ==&lt;br /&gt;
* [http://www.youtube.com/watch?v=OjtjZSHWkyo Static Analyzer v1.0 Demo (Yasca)], 17/Sep/10&lt;br /&gt;
* [http://www.nyphp.org/PHP-Presentations/134_Static-Code-Analysis-PHP-Zend-Framework-Circa-2009 Static Code Analysis Using Yasca], New York PHP, 24/Feb/09&lt;br /&gt;
&lt;br /&gt;
== External Sites ==&lt;br /&gt;
* [http://www.scovetta.com Personal Home Page]&lt;br /&gt;
* [http://www.linkedin.com/in/scovetta LinkedIn Profile]&lt;br /&gt;
* [http://www.tasecuritygroup.com Trusted Advisor Security]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Trainers/Volunteer_3&amp;diff=96039</id>
		<title>OWASP Trainers/Volunteer 3</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Trainers/Volunteer_3&amp;diff=96039"/>
				<updated>2010-12-13T13:55:51Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:&amp;lt;includeonly&amp;gt;{{{1}}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;OWASP Trainers Volunteers Tab&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| trainer_name1 = Michael Scovetta&lt;br /&gt;
| trainer_email1 = michael.scovetta@gmail.com&lt;br /&gt;
| trainer_wiki_username1 = scovetta&lt;br /&gt;
|-&lt;br /&gt;
| project_interested_in_presenting = OWASP Yasca, OWASP Top 10, OWASP Development Guide&lt;br /&gt;
|-&lt;br /&gt;
| project_already_presented_name1 = OWASP Yasca&lt;br /&gt;
| project_already_presented_url_1 = http://www.scovetta.com/yasca/nyphp-yasca.pdf&lt;br /&gt;
| project_already_presented_name2 = &lt;br /&gt;
| project_already_presented_url_2 = &lt;br /&gt;
| project_already_presented_name3 = &lt;br /&gt;
| project_already_presented_url_3 = &lt;br /&gt;
| project_already_presented_name4 = &lt;br /&gt;
| project_already_presented_url_4 = &lt;br /&gt;
| project_already_presented_name5 = &lt;br /&gt;
| project_already_presented_url_5 = &lt;br /&gt;
|-&lt;br /&gt;
| current_location = Long Island, NY&lt;br /&gt;
|-&lt;br /&gt;
| trainer_name_mask = &amp;lt;!--Please replace DO NOT EDIT this string --&amp;gt; Volunteer_3 &lt;br /&gt;
| trainer_home_page = &amp;lt;!--Please replace DO NOT EDIT this string --&amp;gt; OWASP_Trainers/Volunteer_3 &lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Trainers/Volunteer_3&amp;diff=93790</id>
		<title>OWASP Trainers/Volunteer 3</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Trainers/Volunteer_3&amp;diff=93790"/>
				<updated>2010-11-24T17:14:22Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Added myself&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:&amp;lt;includeonly&amp;gt;{{{1}}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;OWASP Trainers Volunteers Tab&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| trainer_name1 = Michael Scovetta&lt;br /&gt;
| trainer_email1 = michael.scovetta@gmail.com&lt;br /&gt;
| trainer_wiki_username1 = scovetta&lt;br /&gt;
|-&lt;br /&gt;
| project_interested_in_presenting = OWASP Yasca&lt;br /&gt;
|-&lt;br /&gt;
| project_already_presented_name1 = OWASP Yasca&lt;br /&gt;
| project_already_presented_url_1 = http://www.scovetta.com/yasca/nyphp-yasca.pdf&lt;br /&gt;
| project_already_presented_name2 = &lt;br /&gt;
| project_already_presented_url_2 = &lt;br /&gt;
| project_already_presented_name3 = &lt;br /&gt;
| project_already_presented_url_3 = &lt;br /&gt;
| project_already_presented_name4 = &lt;br /&gt;
| project_already_presented_url_4 = &lt;br /&gt;
| project_already_presented_name5 = &lt;br /&gt;
| project_already_presented_url_5 = &lt;br /&gt;
|-&lt;br /&gt;
| current_location = Long Island, NY&lt;br /&gt;
|-&lt;br /&gt;
| trainer_name_mask = &amp;lt;!--Please replace DO NOT EDIT this string --&amp;gt; Volunteer_3 &lt;br /&gt;
| trainer_home_page = &amp;lt;!--Please replace DO NOT EDIT this string --&amp;gt; OWASP_Trainers/Volunteer_3 &lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=GPC_Project_Reviewers/Volunteer_5&amp;diff=88558</id>
		<title>GPC Project Reviewers/Volunteer 5</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=GPC_Project_Reviewers/Volunteer_5&amp;diff=88558"/>
				<updated>2010-09-02T17:13:22Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Added myself in.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:&amp;lt;includeonly&amp;gt;{{{1}}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;OWASP Reviewers Volunteers Tab&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| project_reviewer_name1 = Michael Scovetta&lt;br /&gt;
| project_reviewer_email1 = michael.scovetta@gmail.com&lt;br /&gt;
| project_reviewer_wiki_username1 = scovetta&lt;br /&gt;
|-&lt;br /&gt;
| type_of_project_interested_in_reviewing = Best practices, code review, templates&lt;br /&gt;
|-&lt;br /&gt;
| project_currently_reviewing_name1 = OWASP Secure Coding Practices - Quick Reference Guide&lt;br /&gt;
| project_currently_reviewing_url_1 = http://www.owasp.org/index.php/Projects/OWASP_Secure_Coding_Practices_-_Quick_Reference_Guide&lt;br /&gt;
| project_currently_reviewing_name2 =  &lt;br /&gt;
| project_currently_reviewing_url_2 = &lt;br /&gt;
| project_currently_reviewing_name3 = &lt;br /&gt;
| project_currently_reviewing_url_3 = &lt;br /&gt;
| project_currently_reviewing_name4 = &lt;br /&gt;
| project_currently_reviewing_url_4 = &lt;br /&gt;
| project_currently_reviewing_name5 = &lt;br /&gt;
| project_currently_reviewing_url_5 = &lt;br /&gt;
|-&lt;br /&gt;
|project_reviewed_name1 = &amp;lt;!--Please replace this text by the project's NAME you did review --&amp;gt;&lt;br /&gt;
|project_reviewed_url_1 = &amp;lt;!--Please replace this text by the project's LINK you did review --&amp;gt;&lt;br /&gt;
|project_reviewed_name2 = &lt;br /&gt;
|project_reviewed_url_2 = &lt;br /&gt;
|project_reviewed_name3 = &lt;br /&gt;
|project_reviewed_url_3 = &lt;br /&gt;
|project_reviewed_name4 = &lt;br /&gt;
|project_reviewed_url_4 = &lt;br /&gt;
|project_reviewed_name5 = &lt;br /&gt;
|project_reviewed_url_5 = &lt;br /&gt;
|-&lt;br /&gt;
| reviewer_name_mask = &amp;lt;!--Please replace DO NOT EDIT this string --&amp;gt;&lt;br /&gt;
| reviewer_home_page = &amp;lt;!--Please replace DO NOT EDIT this string --&amp;gt; GPC_Project_Reviewers/Volunteer_5&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:OWASP_Vulnerability_Data_Model_Project_Download&amp;diff=73166</id>
		<title>Category:OWASP Vulnerability Data Model Project Download</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:OWASP_Vulnerability_Data_Model_Project_Download&amp;diff=73166"/>
				<updated>2009-11-13T01:06:44Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Created page with '=== Download ===  You can download the latest version of the OVDMP here. The data model itself currently requires [http://wb.mysql.com/ MySQL Workbench] in order to view.  *[[Med…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Download ===&lt;br /&gt;
&lt;br /&gt;
You can download the latest version of the OVDMP here. The data model itself currently requires [http://wb.mysql.com/ MySQL Workbench] in order to view.&lt;br /&gt;
&lt;br /&gt;
*[[Media:Ovdmp-0.10.zip|OVDMP v0.10]]&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Vulnerability Data Model Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Ovdmp-0.10.zip&amp;diff=73165</id>
		<title>File:Ovdmp-0.10.zip</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Ovdmp-0.10.zip&amp;diff=73165"/>
				<updated>2009-11-13T01:04:53Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: OVDMP v0.10 - Requires MySQL Workbench in order to view.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OVDMP v0.10 - Requires MySQL Workbench in order to view.&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Project_Information:template_Vulnerability_Data_Model_Project&amp;diff=71653</id>
		<title>Project Information:template Vulnerability Data Model Project</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Project_Information:template_Vulnerability_Data_Model_Project&amp;diff=71653"/>
				<updated>2009-10-17T16:40:45Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Initial Page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;8&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''PROJECT IDENTIFICATION''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''Project Name'''&lt;br /&gt;
 | colspan=&amp;quot;7&amp;quot; style=&amp;quot;width:85%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;|&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt;'''OWASP Vulnerability Data Model Project'''  &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;| '''Short Project Description''' &lt;br /&gt;
 | colspan=&amp;quot;7&amp;quot; style=&amp;quot;width:85%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;| &lt;br /&gt;
* The goal of this project is to define a common data model that other OWASP, open source, and commercial tools can use to store vulnerability information discovered during manual or automated testing, including both penetration testing and static analysis. &lt;br /&gt;
* The data model will be available in both abstract and physical forms.&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''Key Project Information'''&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Licensed under&amp;lt;br&amp;gt;[http://en.wikipedia/org/wiki/GPL_license GPL License]&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Project Leader&amp;lt;br&amp;gt;[mailto:michael.scovetta(at)gmail.com '''Michael V. Scovetta''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Project Contributors&amp;lt;br&amp;gt;[mailto:name(at)name '''Name''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Mailing List&amp;lt;br&amp;gt;[https://lists.owasp.org/mailman/listinfo/owasp-yasca-project '''To Subscribe''']&amp;lt;br&amp;gt;[mailto:owasp-vdm-project(at)lists.owasp.org '''To Use''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|First Reviewer&amp;lt;br&amp;gt;[mailto:name(at)name '''Name''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Second Reviewer&amp;lt;br&amp;gt;[mailto:name(at)name '''Name''']&amp;lt;br&amp;gt;&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|OWASP Board Member&amp;lt;br&amp;gt;(if applicable)&amp;lt;br&amp;gt;[mailto:name(at)name '''Name&amp;amp;Email''']&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;6&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''PROJECT MAIN LINKS''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:100%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
TBD.&lt;br /&gt;
&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;6&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''RELATED PROJECTS''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:100%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
* [[:Category:OWASP Orizon Project|OWASP Orizon Project]]&amp;lt;br&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;6&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''SPONSORS &amp;amp; GUIDELINES''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:50%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Sponsor name, if applicable  &lt;br /&gt;
 | style=&amp;quot;width:50%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|[[:Category:OWASP Vulnerability Data Model Project Roadmap|'''Guidelines/Roadmap''']]&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|ASSESSMENT AND REVIEW PROCESS&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#6C82B5&amp;quot; align=&amp;quot;center&amp;quot;|'''Review/Reviewer''' &lt;br /&gt;
 | style=&amp;quot;width:21%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''Author's Self Evaluation'''&amp;lt;br&amp;gt;(applicable for Alpha Quality &amp;amp; further) &lt;br /&gt;
 | style=&amp;quot;width:21%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''First Reviewer'''&amp;lt;br&amp;gt;(applicable for Alpha Quality &amp;amp; further)&lt;br /&gt;
 | style=&amp;quot;width:21%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''Second Reviewer'''&amp;lt;br&amp;gt;(applicable for Beta Quality &amp;amp; further)&lt;br /&gt;
 | style=&amp;quot;width:22%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''OWASP Board Member'''&amp;lt;br&amp;gt;(applicable just for Release Quality) &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''First Review''' &lt;br /&gt;
 | style=&amp;quot;width:21%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Yes'''&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Beta Status'''&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - Self Evaluation - A|See&amp;amp;Edit: First Review/SelfEvaluation (A)]]&lt;br /&gt;
 | style=&amp;quot;width:21%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Not yet''' (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Alpha Status''' - (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - First Reviewer - B|See&amp;amp;Edit: First Review/1st Reviewer (B)]]&lt;br /&gt;
 | style=&amp;quot;width:21%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Yes/No''' (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Alpha Status''' - (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - Second Reviewer - C|See&amp;amp;Edit: First Review/2nd Reviewer (C)]]&lt;br /&gt;
 | style=&amp;quot;width:22%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Yes/No''' (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Alpha Status''' - (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - OWASP Board Member - D|See/Edit: First Review/Board Member (D)]]&lt;br /&gt;
 |-&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:OWASP_Vulnerability_Data_Model_Project&amp;diff=71652</id>
		<title>Category:OWASP Vulnerability Data Model Project</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:OWASP_Vulnerability_Data_Model_Project&amp;diff=71652"/>
				<updated>2009-10-17T16:37:55Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Initial Page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[:Category:OWASP Project|Click here to return to OWASP Projects page.]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[:Project Information:template Vulnerability Data Model Project|Click here to see (&amp;amp; edit, if wanted) the template.]] &lt;br /&gt;
{{:Project Information:template Vulnerability Data Model Project}}&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]&lt;br /&gt;
[[Category:OWASP Download]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Phoenix/Tools&amp;diff=62938</id>
		<title>Phoenix/Tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Phoenix/Tools&amp;diff=62938"/>
				<updated>2009-05-29T00:45:20Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Fixed capitalization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;p&amp;gt;Please send comments or questions to the [https://lists.owasp.org/mailman/listinfo/owasp-phoenix Phoenix-OWASP mailing-list].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==LiveCDs==&lt;br /&gt;
Monday, January 29, 2007  4:02 PM    828569600 AOC_Labrat-ALPHA-0010.iso - http://www.packetfocus.com/hackos/&amp;lt;br /&amp;gt;&lt;br /&gt;
DVL (Damn Vulnerable Linux) - http://www.damnvulnerablelinux.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test sites / testing grounds==&lt;br /&gt;
SPI Dynamics (live) - http://zero.webappsecurity.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
Cenzic (live) - http://crackme.cenzic.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
Watchfire (live) - http://demo.testfire.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Acunetix (live) - http://testphp.acunetix.com/ http://testasp.acunetix.com http://testaspnet.acunetix.com&amp;lt;br /&amp;gt;&lt;br /&gt;
WebMaven / Buggy Bank - http://www.mavensecurity.com/webmaven&amp;lt;br /&amp;gt;&lt;br /&gt;
Foundstone SASS tools - http://www.foundstone.com/us/resources-free-tools.asp&amp;lt;br /&amp;gt;&lt;br /&gt;
Updated HackmeBank - http://www.o2-ounceopen.com/technical-info/2008/12/8/updated-version-of-hacmebank.html&amp;lt;br /&amp;gt;&lt;br /&gt;
OWASP WebGoat - http://www.owasp.org/index.php/OWASP_WebGoat_Project&amp;lt;br /&amp;gt;&lt;br /&gt;
OWASP SiteGenerator - http://www.owasp.org/index.php/Owasp_SiteGenerator&amp;lt;br /&amp;gt;&lt;br /&gt;
Stanford SecuriBench - http://suif.stanford.edu/~livshits/securibench/&amp;lt;br /&amp;gt;&lt;br /&gt;
SecuriBench Micro - http://suif.stanford.edu/~livshits/work/securibench-micro/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HTTP proxying / editing==&lt;br /&gt;
WebScarab - http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project&amp;lt;br /&amp;gt;&lt;br /&gt;
Burp - http://www.portswigger.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Paros - http://www.parosproxy.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
Fiddler - http://www.fiddlertool.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
Web Proxy Editor - http://www.microsoft.com/mspress/companion/0-7356-2187-X/&amp;lt;br /&amp;gt;&lt;br /&gt;
Pantera - http://www.owasp.org/index.php/Category:OWASP_Pantera_Web_Assessment_Studio_Project&amp;lt;br /&amp;gt;&lt;br /&gt;
Suru - http://www.sensepost.com/research/suru/&amp;lt;br /&amp;gt;&lt;br /&gt;
httpedit (curses-based) - http://www.neutralbit.com/en/rd/httpedit/&amp;lt;br /&amp;gt;&lt;br /&gt;
Charles - http://www.xk72.com/charles/&amp;lt;br /&amp;gt;&lt;br /&gt;
Odysseus - http://www.bindshell.net/tools/odysseus&amp;lt;br /&amp;gt;&lt;br /&gt;
Burp, Paros, and WebScarab for Mac OS X - http://www.corsaire.com/downloads/&amp;lt;br /&amp;gt;&lt;br /&gt;
Web-application scanning tool from `Network Security Tools'/O'Reilly - http://examples.oreilly.com/networkst/&amp;lt;br /&amp;gt;&lt;br /&gt;
JS Commander - http://jscmd.rubyforge.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
Ratproxy - http://code.google.com/p/ratproxy/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==RSnake's XSS cheat sheet based-tools, webapp fuzzing, and encoding tools==&lt;br /&gt;
Wfuzz - http://www.edge-security.com/wfuzz.php&amp;lt;br /&amp;gt;&lt;br /&gt;
ProxMon - http://www.isecpartners.com/proxmon.html&amp;lt;br /&amp;gt;&lt;br /&gt;
Wapiti - http://wapiti.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Grabber - http://rgaucher.info/beta/grabber/&amp;lt;br /&amp;gt;&lt;br /&gt;
XSSScan - http://darkcode.ath.cx/scanners/XSSscan.py&amp;lt;br /&amp;gt;&lt;br /&gt;
CAL9000 - http://www.owasp.org/index.php/Category:OWASP_CAL9000_Project&amp;lt;br /&amp;gt;&lt;br /&gt;
HTMangLe - http://www.fishnetsecurity.com/Tools/HTMangLe/publish.htm&amp;lt;br /&amp;gt;&lt;br /&gt;
JBroFuzz - http://sourceforge.net/projects/jbrofuzz&amp;lt;br /&amp;gt;&lt;br /&gt;
XSSFuzz - http://ha.ckers.org/blog/20060921/xssfuzz-released/&amp;lt;br /&amp;gt;&lt;br /&gt;
WhiteAcid's XSS Assistant - http://www.whiteacid.org/greasemonkey/&amp;lt;br /&amp;gt;&lt;br /&gt;
Overlong UTF - http://www.microsoft.com/mspress/companion/0-7356-2187-X/&amp;lt;br /&amp;gt;&lt;br /&gt;
[TGZ] MielieTool (SensePost Research) - http://packetstormsecurity.org/UNIX/utilities/mielietools-v1.0.tgz&amp;lt;br /&amp;gt;&lt;br /&gt;
RegFuzzer: test your regular expression filter - http://rgaucher.info/b/index.php/post/2007/05/26/RegFuzzer%3A-Test-your-regular-expression-filter&amp;lt;br /&amp;gt;&lt;br /&gt;
screamingCobra - http://www.dachb0den.com/projects/screamingcobra.html&amp;lt;br /&amp;gt;&lt;br /&gt;
SPIKE and SPIKE Proxy - http://immunitysec.com/resources-freesoftware.shtml&amp;lt;br /&amp;gt;&lt;br /&gt;
RFuzz - http://rfuzz.rubyforge.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
WebFuzz - http://www.codebreakers-journal.com/index.php?option=com_content&amp;amp;task=view&amp;amp;id=112&amp;amp;Itemid=99999999&amp;lt;br /&amp;gt;&lt;br /&gt;
TestMaker - http://www.pushtotest.com/Docs/downloads/features.html&amp;lt;br /&amp;gt;&lt;br /&gt;
ASP Auditor - http://michaeldaw.org/projects/asp-auditor-v2/&amp;lt;br /&amp;gt;&lt;br /&gt;
WSTool - http://wstool.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Web Hack Control Center (WHCC) - http://ussysadmin.com/whcc/&amp;lt;br /&amp;gt;&lt;br /&gt;
Web Text Converter - http://www.microsoft.com/mspress/companion/0-7356-2187-X/&amp;lt;br /&amp;gt;&lt;br /&gt;
HackBar (Firefox Add-on) - https://addons.mozilla.org/firefox/3899/&amp;lt;br /&amp;gt;&lt;br /&gt;
Net-Force Tools (NF-Tools, Firefox Add-on) - http://www.net-force.nl/library/downloads/&amp;lt;br /&amp;gt;&lt;br /&gt;
PostIntercepter (Greasemonkey script) - http://userscripts.org/scripts/show/743&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HTTP general testing / fingerprinting==&lt;br /&gt;
Wbox: HTTP testing tool - http://hping.org/wbox/&amp;lt;br /&amp;gt;&lt;br /&gt;
ht://Check - http://htcheck.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Mumsie - http://www.lurhq.com/tools/mumsie.html&amp;lt;br /&amp;gt;&lt;br /&gt;
WebInject - http://www.webinject.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
Torture.pl Home Page - http://stein.cshl.org/~lstein/torture/&amp;lt;br /&amp;gt;&lt;br /&gt;
JoeDog's Seige - http://www.joedog.org/JoeDog/Siege/&amp;lt;br /&amp;gt;&lt;br /&gt;
OPEN-LABS: metoscan (http method testing) - http://www.open-labs.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
Load-balancing detector - http://ge.mine.nu/lbd.html&amp;lt;br /&amp;gt;&lt;br /&gt;
HMAP - http://ujeni.murkyroc.com/hmap/&amp;lt;br /&amp;gt;&lt;br /&gt;
Net-Square: httprint - http://net-square.com/httprint/&amp;lt;br /&amp;gt;&lt;br /&gt;
Wpoison: http stress testing - http://wpoison.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Net-square: MSNPawn - http://net-square.com/msnpawn/index.shtml&amp;lt;br /&amp;gt;&lt;br /&gt;
hcraft: HTTP Vuln Request Crafter - http://druid.caughq.org/projects/hcraft/&amp;lt;br /&amp;gt;&lt;br /&gt;
rfp.labs: LibWhisker - http://www.wiretrip.net/rfp/lw.asp&amp;lt;br /&amp;gt;&lt;br /&gt;
Nikto - http://www.cirt.net/code/nikto.shtml&amp;lt;br /&amp;gt;&lt;br /&gt;
twill - http://twill.idyll.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
DirBuster - http://www.owasp.org/index.php/Category:OWASP_DirBuster_Project&amp;lt;br /&amp;gt;&lt;br /&gt;
[ZIP] DFF Scanner - http://security-net.biz/files/dff/DFF.zip&amp;lt;br /&amp;gt;&lt;br /&gt;
[ZIP] The Elza project - http://packetstormsecurity.org/web/elza-1.4.7-beta.zip http://www.stoev.org/elza.html&amp;lt;br /&amp;gt;&lt;br /&gt;
HackerFox and Hacking Addons Bundled: Portable Firefox with web hacking addons bundled&lt;br /&gt;
- http://sf.net/projects/hackfox&lt;br /&gt;
&lt;br /&gt;
==Browser-based HTTP tampering / editing / replaying==&lt;br /&gt;
TamperIE - http://www.bayden.com/Other/&amp;lt;br /&amp;gt;&lt;br /&gt;
isr-form - http://www.infobyte.com.ar/developments.html&amp;lt;br /&amp;gt;&lt;br /&gt;
Modify Headers (Firefox Add-on) - http://modifyheaders.mozdev.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
Tamper Data (Firefox Add-on) - http://tamperdata.mozdev.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
UrlParams (Firefox Add-on) - https://addons.mozilla.org/en-US/firefox/addon/1290/&amp;lt;br /&amp;gt;&lt;br /&gt;
TestGen4Web (Firefox Add-on) - https://addons.mozilla.org/en-US/firefox/addon/1385/&amp;lt;br /&amp;gt;&lt;br /&gt;
DOM Inspector / Inspect This (Firefox Add-on) - https://addons.mozilla.org/en-US/firefox/addon/1806/ https://addons.mozilla.org/en-US/firefox/addon/1913/&amp;lt;br /&amp;gt;&lt;br /&gt;
LiveHTTPHeaders / Header Monitor (Firefox Add-on) - http://livehttpheaders.mozdev.org/ https://addons.mozilla.org/en-US/firefox/addon/575/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Cookie editing / poisoning==&lt;br /&gt;
[TGZ] stompy: session id tool - http://lcamtuf.coredump.cx/stompy.tgz&amp;lt;br /&amp;gt;&lt;br /&gt;
Add'N Edit Cookies (AnEC, Firefox Add-on) - http://addneditcookies.mozdev.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
CookieCuller (Firefox Add-on) - http://cookieculler.mozdev.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
CookiePie (Firefox Add-on) - http://www.nektra.com/oss/firefox/extensions/cookiepie/&amp;lt;br /&amp;gt;&lt;br /&gt;
CookieSpy - http://www.codeproject.com/shell/cookiespy.asp&amp;lt;br /&amp;gt;&lt;br /&gt;
Cookies Explorer - http://www.dutchduck.com/Features/Cookies.aspx&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Ajax and XHR scanning==&lt;br /&gt;
Sahi - http://sahi.co.in/&amp;lt;br /&amp;gt;&lt;br /&gt;
scRUBYt - http://scrubyt.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
jQuery - http://jquery.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
jquery-include - http://www.gnucitizen.org/projects/jquery-include&amp;lt;br /&amp;gt;&lt;br /&gt;
Sprajax - http://www.denimgroup.com/sprajax.html&amp;lt;br /&amp;gt;&lt;br /&gt;
Watir - http://wtr.rubyforge.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
Watij - http://watij.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
Watin - http://watin.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
RBNarcissus - http://idontsmoke.co.uk/2005/rbnarcissus/&amp;lt;br /&amp;gt;&lt;br /&gt;
SpiderTest (Spider Fuzz plugin) - http://blog.caboo.se/articles/2007/2/21/the-fabulous-spider-fuzz-plugin&amp;lt;br /&amp;gt;&lt;br /&gt;
Javascript Inline Debugger (jasildbg) - http://jasildbg.googlepages.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
Firebug Lite - http://www.getfirebug.com/lite.html&amp;lt;br /&amp;gt;&lt;br /&gt;
firewaitr - http://code.google.com/p/firewatir/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==RSS extensions and caching==&lt;br /&gt;
LiveLines (Firefox Add-on) - https://addons.mozilla.org/en-US/firefox/addon/324/&amp;lt;br /&amp;gt;&lt;br /&gt;
rss-cache - http://www.dubfire.net/chris/projects/rss-cache/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SQL injection scanning==&lt;br /&gt;
0x90.org: home of Absinthe, Mezcal, etc - http://0x90.org/releases.php&amp;lt;br /&amp;gt;&lt;br /&gt;
SQLiX - http://www.owasp.org/index.php/Category:OWASP_SQLiX_Project&amp;lt;br /&amp;gt;&lt;br /&gt;
sqlninja: a SQL Server injection and takover tool - http://sqlninja.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
JustinClarke's SQL Brute - http://www.justinclarke.com/archives/2006/03/sqlbrute.html&amp;lt;br /&amp;gt;&lt;br /&gt;
BobCat - http://www.northern-monkee.co.uk/projects/bobcat/bobcat.html&amp;lt;br /&amp;gt;&lt;br /&gt;
sqlmap - http://sqlmap.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Scully: SQL Server DB Front-End and Brute-Forcer - http://www.sensepost.com/research/scully/&amp;lt;br /&amp;gt;&lt;br /&gt;
FG-Injector - http://www.flowgate.net/?lang=en&amp;amp;seccion=herramientas&amp;lt;br /&amp;gt;&lt;br /&gt;
PRIAMOS - http://www.priamos-project.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Web application security malware, backdoors, and evil code==&lt;br /&gt;
W3AF: Web Application Attack and Audit Framework - http://w3af.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Jikto - http://busin3ss.name/jikto-in-the-wild/&amp;lt;br /&amp;gt;&lt;br /&gt;
XSS Shell - http://ferruh.mavituna.com/article/?1338&amp;lt;br /&amp;gt;&lt;br /&gt;
XSS-Proxy - http://xss-proxy.sourceforge.net&amp;lt;br /&amp;gt;&lt;br /&gt;
AttackAPI - http://www.gnucitizen.org/projects/attackapi/&amp;lt;br /&amp;gt;&lt;br /&gt;
FFsniFF - http://azurit.elbiahosting.sk/ffsniff/&amp;lt;br /&amp;gt;&lt;br /&gt;
HoneyBlog's web-based junkyard - http://honeyblog.org/junkyard/web-based/&amp;lt;br /&amp;gt;&lt;br /&gt;
BeEF - http://www.bindshell.net/tools/beef/&amp;lt;br /&amp;gt;&lt;br /&gt;
Firefox Extension Scanner (FEX) - http://www.gnucitizen.org/projects/fex/&amp;lt;br /&amp;gt;&lt;br /&gt;
What is my IP address? - http://reglos.de/myaddress/&amp;lt;br /&amp;gt;&lt;br /&gt;
xRumer: blogspam automation tool - http://www.botmaster.net/movies/XFull.htm&amp;lt;br /&amp;gt;&lt;br /&gt;
SpyJax - http://www.merchantos.com/makebeta/tools/spyjax/&amp;lt;br /&amp;gt;&lt;br /&gt;
Greasecarnaval - http://www.gnucitizen.org/projects/greasecarnaval&amp;lt;br /&amp;gt;&lt;br /&gt;
Technika - http://www.gnucitizen.org/projects/technika/&amp;lt;br /&amp;gt;&lt;br /&gt;
Load-AttackAPI bookmarklet - http://www.gnucitizen.org/projects/load-attackapi-bookmarklet&amp;lt;br /&amp;gt;&lt;br /&gt;
MD's Projects: JS port scanner, pinger, backdoors, etc - http://michaeldaw.org/my-projects/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Web application services that aid in web application security assessment==&lt;br /&gt;
Netcraft - http://www.netcraft.net&amp;lt;br /&amp;gt;&lt;br /&gt;
AboutURL - http://www.abouturl.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
The Scrutinizer - http://www.scrutinizethis.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
net.toolkit - http://clez.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
ServerSniff - http://www.serversniff.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Online Microsoft script decoder - http://www.greymagic.com/security/tools/decoder/&amp;lt;br /&amp;gt;&lt;br /&gt;
Webmaster-Toolkit - http://www.webmaster-toolkit.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
myIPNeighbbors, et al - http://digg.com/security/MyIPNeighbors_Find_Out_Who_Else_is_Hosted_on_Your_Site_s_IP_Address&amp;lt;br /&amp;gt;&lt;br /&gt;
PHP charset encoding - http://h4k.in/encoding&amp;lt;br /&amp;gt;&lt;br /&gt;
data: URL testcases - http://h4k.in/dataurl&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Browser-based security fuzzing / checking==&lt;br /&gt;
Zalewski's MangleMe - http://lcamtuf.coredump.cx/mangleme/mangle.cgi&amp;lt;br /&amp;gt;&lt;br /&gt;
hdm's tools: Hamachi, CSSDIE, DOM-Hanoi, AxMan - http://metasploit.com/users/hdm/tools/&amp;lt;br /&amp;gt;&lt;br /&gt;
Peach Fuzzer Framework - http://peachfuzz.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
TagBruteForcer - http://research.eeye.com/html/tools/RT20060801-3.html&amp;lt;br /&amp;gt;&lt;br /&gt;
PROTOS Test-Suite: c05-http-reply - http://www.ee.oulu.fi/research/ouspg/protos/testing/c05/http-reply/index.html&amp;lt;br /&amp;gt;&lt;br /&gt;
COMRaider - http://labs.idefense.com&amp;lt;br /&amp;gt;&lt;br /&gt;
bcheck - http://bcheck.scanit.be/bcheck/&amp;lt;br /&amp;gt;&lt;br /&gt;
Stop-Phishing: Projects page - http://www.indiana.edu/~phishing/?projects&amp;lt;br /&amp;gt;&lt;br /&gt;
LinkScanner - http://linkscanner.explabs.com/linkscanner/default.asp&amp;lt;br /&amp;gt;&lt;br /&gt;
BrowserCheck - http://www.heise-security.co.uk/services/browsercheck/&amp;lt;br /&amp;gt;&lt;br /&gt;
Cross-browser Exploit Tests - http://www.jungsonnstudios.com/cool.php&amp;lt;br /&amp;gt;&lt;br /&gt;
Stealing information using DNS pinning demo - http://www.jumperz.net/index.php?i=2&amp;amp;a=1&amp;amp;b=7&amp;lt;br /&amp;gt;&lt;br /&gt;
Javascript Website Login Checker - http://ha.ckers.org/weird/javascript-website-login-checker.html&amp;lt;br /&amp;gt;&lt;br /&gt;
Mozilla Activex - http://www.iol.ie/~locka/mozilla/mozilla.htm&amp;lt;br /&amp;gt;&lt;br /&gt;
Jungsonn's Black Dragon Project - http://blackdragon.jungsonnstudios.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
Mr. T (Master Recon Tool, includes Read Firefox Settings PoC) - http://ha.ckers.org/mr-t/&amp;lt;br /&amp;gt;&lt;br /&gt;
Vulnerable Adobe Plugin Detection For UXSS PoC - http://www.0x000000.com/?i=324&amp;lt;br /&amp;gt;&lt;br /&gt;
About Flash: is your flash up-to-date? - http://www.macromedia.com/software/flash/about/&amp;lt;br /&amp;gt;&lt;br /&gt;
Test your installation of Java software - http://java.com/en/download/installed.jsp?detect=jre&amp;amp;try=1&amp;lt;br /&amp;gt;&lt;br /&gt;
WebPageFingerprint - Light-weight Greasemonkey Fuzzer - http://userscripts.org/scripts/show/30285&lt;br /&gt;
&lt;br /&gt;
==PHP static analysis and file inclusion scanning==&lt;br /&gt;
PHP-SAT.org: Static analysis for PHP - http://www.program-transformation.org/PHP/&amp;lt;br /&amp;gt;&lt;br /&gt;
Unl0ck Research Team: tool for searching in google for include bugs - http://unl0ck.net/tools.php&amp;lt;br /&amp;gt;&lt;br /&gt;
FIS: File Inclusion Scanner - http://www.segfault.gr/index.php?cat_id=3&amp;amp;cont_id=25&amp;lt;br/&amp;gt;&lt;br /&gt;
PHPSecAudit - http://developer.spikesource.com/projects/phpsecaudit&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PHP Defensive Tools==&lt;br /&gt;
&lt;br /&gt;
PHPInfoSec - Check phpinfo configuration for security - http://phpsec.org/projects/phpsecinfo/&lt;br /&gt;
&lt;br /&gt;
A Greasemonkey Replacement can be found at http://yehg.net/lab/#tools.greasemonkey&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Php-Brute-Force-Attack Detector - Detect your web servers being scanned by brute force tools such as WFuzz, OWASP DirBuster and vulnerability scanners such as Nessus, Nikto, Acunetix ..etc. &lt;br /&gt;
http://yehg.net/lab/pr0js/files.php/php_brute_force_detect.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PHP-Login-Info-Checker - Strictly enforce admins/users to select stronger passwords. It tests cracking passwords against 4 rules. It has also built-in smoke test page via url loginfo_checker.php?testlic&lt;br /&gt;
&lt;br /&gt;
http://yehg.net/lab/pr0js/files.php/loginfo_checkerv0.1.zip&lt;br /&gt;
&lt;br /&gt;
http://yehg.net/lab/pr0js/files.php/phploginfo_checker_demo.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
php-DDOS-Shield - A tricky script to prevent idiot distributed bots which discontinue their flooding attacks by identifying HTTP 503 header code. http://code.google.com/p/ddos-shield/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PHPMySpamFIGHTER - http://yehg.net/lab/pr0js/files.php/phpmyspamfighter.zip&lt;br /&gt;
http://yehg.net/lab/pr0js/files.php/phpMySpamFighter_demo.rar&lt;br /&gt;
&lt;br /&gt;
==Web Application Firewall (WAF) and Intrusion Detection (APIDS) rules and resources==&lt;br /&gt;
APIDS on Wikipedia - http://en.wikipedia.org/wiki/APIDS&amp;lt;br /&amp;gt;&lt;br /&gt;
PHP Intrusion Detection System (PHP-IDS) - http://php-ids.org/ http://code.google.com/p/phpids/&amp;lt;br /&amp;gt;&lt;br /&gt;
dotnetids - http://code.google.com/p/dotnetids/&amp;lt;br /&amp;gt;&lt;br /&gt;
Secure Science InterScout - http://www.securescience.com/home/newsandevents/news/interscout1.0.html&amp;lt;br /&amp;gt;&lt;br /&gt;
Remo: whitelist rule editor for mod_security - http://remo.netnea.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
GotRoot: ModSecuirty rules - http://www.gotroot.com/tiki-index.php?page=mod_security+rules&amp;lt;br /&amp;gt;&lt;br /&gt;
The Web Security Gateway (WSGW) - http://wsgw.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
mod_security rules generator - http://noeljackson.com/tools/modsecurity/&amp;lt;br /&amp;gt;&lt;br /&gt;
Mod_Anti_Tamper - http://www.wisec.it/projects.php?id=3&amp;lt;br /&amp;gt;&lt;br /&gt;
[TGZ] Automatic Rules Generation for Mod_Security - http://www.wisec.it/rdr.php?fn=/Projects/Rule-o-matic.tgz&amp;lt;br /&amp;gt;&lt;br /&gt;
AQTRONIX WebKnight - http://www.aqtronix.com/?PageID=99&amp;lt;br /&amp;gt;&lt;br /&gt;
Akismet: blog spam defense - http://akismet.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
Samoa: Formal tools for securing web services - http://research.microsoft.com/projects/samoa/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Web services enumeration / scanning / fuzzing==&lt;br /&gt;
WebServiceStudio2.0 - http://www.codeplex.com/WebserviceStudio&amp;lt;br /&amp;gt;&lt;br /&gt;
Net-square: wsChess - http://net-square.com/wschess/index.shtml&amp;lt;br /&amp;gt;&lt;br /&gt;
WSFuzzer - http://www.owasp.org/index.php/Category:OWASP_WSFuzzer_Project&amp;lt;br /&amp;gt;&lt;br /&gt;
SIFT: web method search tool - http://www.sift.com.au/73/171/sift-web-method-search-tool.htm&amp;lt;br /&amp;gt;&lt;br /&gt;
iSecPartners: WSMap, WSBang, etc - http://www.isecpartners.com/tools.html&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Web application non-specific static source-code analysis==&lt;br /&gt;
Pixy: a static analysis tool for detecting XSS vulnerabilities - http://www.seclab.tuwien.ac.at/projects/pixy/&amp;lt;br /&amp;gt;&lt;br /&gt;
Brixoft.Net: Source Edit - http://www.brixoft.net/prodinfo.asp?id=1&amp;lt;br /&amp;gt;&lt;br /&gt;
Security compass web application auditing tools (SWAAT) - http://www.owasp.org/index.php/Category:OWASP_SWAAT_Project&amp;lt;br /&amp;gt;&lt;br /&gt;
An even more complete list here - http://www.cs.cmu.edu/~aldrich/courses/654/tools/&amp;lt;br /&amp;gt;&lt;br /&gt;
A nice list that claims some demos available - http://www.cs.cmu.edu/~aldrich/courses/413/tools.html&amp;lt;br /&amp;gt;&lt;br /&gt;
A smaller, but also good list - http://spinroot.com/static/&amp;lt;br /&amp;gt;&lt;br /&gt;
Yasca: A highly extensible source code analysis framework; incorporates several analysis tools into one package. http://www.yasca.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Static analysis for C/C++ (CGI, ISAPI, etc) in web applications==&lt;br /&gt;
RATS - http://www.securesoftware.com/resources/download_rats.html&amp;lt;br /&amp;gt;&lt;br /&gt;
ITS4 - http://www.cigital.com/its4/&amp;lt;br /&amp;gt;&lt;br /&gt;
FlawFinder - http://www.dwheeler.com/flawfinder/&amp;lt;br /&amp;gt;&lt;br /&gt;
Splint - http://www.splint.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
Uno - http://spinroot.com/uno/&amp;lt;br /&amp;gt;&lt;br /&gt;
BOON (Buffer Overrun detectiON) - http://www.cs.berkeley.edu/~daw/boon/ http://boon.sourceforge.net&amp;lt;br /&amp;gt;&lt;br /&gt;
Valgrind - http://www.valgrind.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Java static analysis, security frameworks, and web application security tools==&lt;br /&gt;
LAPSE - http://suif.stanford.edu/~livshits/work/lapse/ &amp;lt;br/&amp;gt;&lt;br /&gt;
HDIV Struts - http://hdiv.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
Orizon - http://sourceforge.net/projects/orizon/&amp;lt;br /&amp;gt;&lt;br /&gt;
FindBugs: Find bugs in Java programs - http://findbugs.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
PMD - http://pmd.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
CUTE: A Concolic Unit Testing Engine for C and Java - http://osl.cs.uiuc.edu/~ksen/cute/&amp;lt;br /&amp;gt;&lt;br /&gt;
EMMA - http://emma.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
JLint - http://jlint.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Java PathFinder - http://javapathfinder.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Fujaba: Move between UML and Java source code - http://wwwcs.uni-paderborn.de/cs/fujaba/&amp;lt;br /&amp;gt;&lt;br /&gt;
Checkstyle - http://checkstyle.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Cookie Revolver Security Framework - http://sourceforge.net/projects/cookie-revolver&amp;lt;br /&amp;gt;&lt;br /&gt;
tinapoc - http://sourceforge.net/projects/tinapoc&amp;lt;br /&amp;gt;&lt;br /&gt;
jarsigner - http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/jarsigner.html&amp;lt;br /&amp;gt;&lt;br /&gt;
Solex - http://solex.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Java Explorer - http://metal.hurlant.com/jexplore/&amp;lt;br /&amp;gt;&lt;br /&gt;
HTTPClient - http://www.innovation.ch/java/HTTPClient/&amp;lt;br /&amp;gt;&lt;br /&gt;
another HttpClient - http://jakarta.apache.org/commons/httpclient/&amp;lt;br /&amp;gt;&lt;br /&gt;
a list of code coverage and analysis tools for Java - http://mythinkpond.blogspot.com/2007/06/java-foss-freeopen-source-software.html&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Microsoft .NET static analysis and security framework tools, mostly for ASP.NET and ASP.NET AJAX, but also C# and VB.NET==&lt;br /&gt;
* Visual Studio 2008 Code Analysis, available in:&lt;br /&gt;
** VSTS 2008 Development Edition (http://msdn.microsoft.com/vsts2008/products/bb933752.aspx) and &lt;br /&gt;
** VSTS 2008 Team Suite (http://msdn.microsoft.com/vsts2008/products/bb933735.aspx)&lt;br /&gt;
* Visual Studio 2005 Code Analyzer, available in:&lt;br /&gt;
** Visual Studio 2005 Team Edition for Software Developers  (http://msdn.microsoft.com/en-us/vstudio/aa718806.aspx)&lt;br /&gt;
** Visual Studio 2005 Team Suite (http://msdn.microsoft.com/en-us/vstudio/aa718806.aspx)&lt;br /&gt;
* Web Development Helper - http://www.nikhilk.net/Project.WebDevHelper.aspx&lt;br /&gt;
* FxCop:&lt;br /&gt;
** (blog) http://blogs.msdn.com/fxcop/&lt;br /&gt;
** (download) http://code.msdn.microsoft.com/codeanalysis&lt;br /&gt;
* Microsoft internal tools you can't have yet:&lt;br /&gt;
** http://www.microsoft.com/windows/cse/pa_projects.mspx &lt;br /&gt;
** http://research.microsoft.com/Pex/ &lt;br /&gt;
** http://www.owasp.org/images/5/5b/OWASP_IL_7_FuzzGuru.pdf&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Threat modeling==&lt;br /&gt;
Microsoft Threat Analysis and Modeling Tool v2.1 (TAM) - http://www.microsoft.com/downloads/details.aspx?FamilyID=59888078-9daf-4e96-b7d1-944703479451&amp;amp;displaylang=en&amp;lt;br /&amp;gt;&lt;br /&gt;
Amenaza: Attack Tree Modeling (SecurITree) - http://www.amenaza.com/software.php&amp;lt;br /&amp;gt;&lt;br /&gt;
Octotrike - http://www.octotrike.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Add-ons for Firefox that help with general web application security==&lt;br /&gt;
Web Developer Toolbar - https://addons.mozilla.org/firefox/60/&amp;lt;br /&amp;gt;&lt;br /&gt;
Plain Old Webserver (POW) - https://addons.mozilla.org/firefox/3002/&amp;lt;br /&amp;gt;&lt;br /&gt;
XML Developer Toolbar - https://addons.mozilla.org/firefox/2897/&amp;lt;br /&amp;gt;&lt;br /&gt;
Public Fox - https://addons.mozilla.org/firefox/3911/&amp;lt;br /&amp;gt;&lt;br /&gt;
XForms Buddy - http://beaufour.dk/index.php?sec=misc&amp;amp;pagename=xforms&amp;lt;br /&amp;gt;&lt;br /&gt;
MR Tech Local Install - http://www.mrtech.com/extensions/local_install/&amp;lt;br /&amp;gt;&lt;br /&gt;
Nightly Tester Tools - http://users.blueprintit.co.uk/~dave/web/firefox/buildid/index.html&amp;lt;br /&amp;gt;&lt;br /&gt;
IE Tab - https://addons.mozilla.org/firefox/1419/&amp;lt;br /&amp;gt;&lt;br /&gt;
User-Agent Switcher - https://addons.mozilla.org/firefox/59/&amp;lt;br /&amp;gt;&lt;br /&gt;
ServerSwitcher - https://addons.mozilla.org/firefox/2409/&amp;lt;br /&amp;gt;&lt;br /&gt;
HeaderMonitor - https://addons.mozilla.org/firefox/575/&amp;lt;br /&amp;gt;&lt;br /&gt;
RefControl - https://addons.mozilla.org/firefox/953/&amp;lt;br /&amp;gt;&lt;br /&gt;
refspoof - https://addons.mozilla.org/firefox/667/&amp;lt;br /&amp;gt;&lt;br /&gt;
No-Referrer - https://addons.mozilla.org/firefox/1999/&amp;lt;br /&amp;gt;&lt;br /&gt;
LocationBar^2 - https://addons.mozilla.org/firefox/4014/&amp;lt;br /&amp;gt;&lt;br /&gt;
SpiderZilla - http://spiderzilla.mozdev.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
Slogger - https://addons.mozilla.org/en-US/firefox/addon/143&amp;lt;br /&amp;gt;&lt;br /&gt;
Fire Encrypter - https://addons.mozilla.org/firefox/3208/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Add-ons for Firefox that help with Javascript and Ajax web application security==&lt;br /&gt;
Selenium IDE - http://www.openqa.org/selenium-ide/&amp;lt;br /&amp;gt;&lt;br /&gt;
Firebug - http://www.joehewitt.com/software/firebug/&amp;lt;br /&amp;gt;&lt;br /&gt;
Venkman - http://www.mozilla.org/projects/venkman/&amp;lt;br /&amp;gt;&lt;br /&gt;
Chickenfoot - http://groups.csail.mit.edu/uid/chickenfoot/&amp;lt;br /&amp;gt;&lt;br /&gt;
Greasemonkey - http://www.greasespot.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Greasemonkey compiler - http://www.letitblog.com/greasemonkey-compiler/&amp;lt;br /&amp;gt;&lt;br /&gt;
User script compiler - http://arantius.com/misc/greasemonkey/script-compiler&amp;lt;br /&amp;gt;&lt;br /&gt;
Extension Developer's Extension (Firefox Add-on) - http://ted.mielczarek.org/code/mozilla/extensiondev/&amp;lt;br /&amp;gt;&lt;br /&gt;
Smart Middle Click (Firefox Add-on) - https://addons.mozilla.org/en-US/firefox/addon/3885/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bookmarklets that aid in web application security==&lt;br /&gt;
RSnake's security bookmarklets - http://ha.ckers.org/bookmarklets.html&amp;lt;br /&amp;gt;&lt;br /&gt;
BMlets - http://optools.awardspace.com/bmlet.html&amp;lt;br /&amp;gt;&lt;br /&gt;
Huge list of bookmarklets - http://www.squarefree.com/bookmarklets/&amp;lt;br /&amp;gt;&lt;br /&gt;
Blummy: consists of small widgets, called blummlets, which make use of Javascript to provide&lt;br /&gt;
rich functionality - http://www.blummy.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
Bookmarklets every blogger should have - http://www.micropersuasion.com/2005/10/bookmarklets_ev.html&amp;lt;br /&amp;gt;&lt;br /&gt;
Flat Bookmark Editing (Firefox Add-on) - http://n01se.net/chouser/proj/mozhack/&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenBook and Update Bookmark (Firefox Add-ons) - http://www.chuonthis.com/extensions/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SSL certificate checking / scanning==&lt;br /&gt;
[ZIP] THCSSLCheck - http://thc.org/root/tools/THCSSLCheck.zip&amp;lt;br /&amp;gt;&lt;br /&gt;
[ZIP] Foundstone SSLDigger - http://www.foundstone.com/us/resources/termsofuse.asp?file=ssldigger.zip&amp;lt;br /&amp;gt;&lt;br /&gt;
Cert Viewer Plus (Firefox Add-on) - https://addons.mozilla.org/firefox/1964/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Honeyclients, Web Application, and Web Proxy honeypots==&lt;br /&gt;
Honeyclient Project: an open-source honeyclient - http://www.honeyclient.org/trac/ &amp;lt;br /&amp;gt;&lt;br /&gt;
HoneyC: the low-interaction honeyclient - http://honeyc.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Capture: a high-interaction honeyclient - http://capture-hpc.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
Google Hack Honeypot - http://ghh.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
PHP.Hop - PHP Honeynet Project - http://www.rstack.org/phphop/&amp;lt;br /&amp;gt;&lt;br /&gt;
SpyBye - http://www.monkey.org/~provos/spybye/&amp;lt;br /&amp;gt;&lt;br /&gt;
Honeytokens - http://www.securityfocus.com/infocus/1713&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Blackhat SEO and maybe some whitehat SEO==&lt;br /&gt;
SearchStatus (Firefox Add-on) - http://www.quirk.biz/searchstatus/&amp;lt;br /&amp;gt;&lt;br /&gt;
SEO for Firefox (Firefox Add-on) - http://tools.seobook.com/firefox/seo-for-firefox.html&amp;lt;br /&amp;gt;&lt;br /&gt;
SEOQuake (Firefox Add-on) - http://www.seoquake.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Footprinting for web application security==&lt;br /&gt;
Evolution - http://www.paterva.com/evolution-e.html&amp;lt;br /&amp;gt;&lt;br /&gt;
GooSweep - http://www.mcgrewsecurity.com/projects/goosweep/&amp;lt;br /&amp;gt;&lt;br /&gt;
Aura: Google API Utility Tools - http://www.sensepost.com/research/aura/&amp;lt;br /&amp;gt;&lt;br /&gt;
Edge-Security tools - http://www.edge-security.com/soft.php&amp;lt;br /&amp;gt;&lt;br /&gt;
Fierce Domain Scanner - http://ha.ckers.org/fierce/&amp;lt;br /&amp;gt;&lt;br /&gt;
Googlegath - http://www.nothink.org/perl/googlegath/&amp;lt;br /&amp;gt;&lt;br /&gt;
Advanced Dork (Firefox Add-on) - https://addons.mozilla.org/firefox/2144/&amp;lt;br /&amp;gt;&lt;br /&gt;
Passive Cache (Firefox Add-on) - https://addons.mozilla.org/firefox/977/&amp;lt;br /&amp;gt;&lt;br /&gt;
CacheOut! (Firefox Add-on) - https://addons.mozilla.org/en-US/firefox/addon/1453/&amp;lt;br /&amp;gt;&lt;br /&gt;
BugMeNot Extension (Firefox Add-on) - http://roachfiend.com/archives/2005/02/07/bugmenot/&amp;lt;br /&amp;gt;&lt;br /&gt;
TrashMail.net Extension (Firefox Add-on) - https://addons.mozilla.org/en-US/firefox/addon/1813/&amp;lt;br /&amp;gt;&lt;br /&gt;
DiggiDig (Firefox Add-on) - https://addons.mozilla.org/en-US/firefox/addon/2819/&amp;lt;br /&amp;gt;&lt;br /&gt;
Digger (Firefox Add-on) - https://addons.mozilla.org/en-US/firefox/addon/1467/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database security assessment==&lt;br /&gt;
Scuba by Imperva Database Vulnerability Scanner - http://www.imperva.com/scuba/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Browser Defenses==&lt;br /&gt;
DieHard - http://www.diehard-software.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
LocalRodeo (Firefox Add-on) - http://databasement.net/labs/localrodeo/&amp;lt;br /&amp;gt;&lt;br /&gt;
NoMoXSS - http://www.seclab.tuwien.ac.at/projects/jstaint/&amp;lt;br /&amp;gt;&lt;br /&gt;
Request Rodeo - http://savannah.nongnu.org/projects/requestrodeo&amp;lt;br /&amp;gt;&lt;br /&gt;
FlashBlock (Firefox Add-on) - http://flashblock.mozdev.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
CookieSafe (Firefox Add-on) - https://addons.mozilla.org/en-US/firefox/addon/2497&amp;lt;br /&amp;gt;&lt;br /&gt;
NoScript (Firefox Add-on) - http://www.noscript.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
FormFox (Firefox Add-on) - https://addons.mozilla.org/en-US/firefox/addon/1579/&amp;lt;br /&amp;gt;&lt;br /&gt;
Adblock (Firefox Add-on) - http://adblock.mozdev.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
httpOnly in Firefox (Firefox Add-on) - http://blog.php-security.org/archives/40-httpOnly-Cookies-in-Firefox-2.0.html&amp;lt;br /&amp;gt;&lt;br /&gt;
SafeCache (Firefox Add-on) - http://www.safecache.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
SafeHistory (Firefox Add-on) - http://www.safehistory.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
PrefBar (Firefox Add-on) - http://prefbar.mozdev.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
All-in-One Sidebar (Firefox Add-on) - https://addons.mozilla.org/en-US/firefox/addon/1027/&amp;lt;br /&amp;gt;&lt;br /&gt;
QArchive.org web file checker (Firefox Add-on) - https://addons.mozilla.org/firefox/4115/&amp;lt;br /&amp;gt;&lt;br /&gt;
Update Notified (Firefox Add-on) - https://addons.mozilla.org/en-US/firefox/addon/2098/&amp;lt;br /&amp;gt;&lt;br /&gt;
FireKeeper - http://firekeeper.mozdev.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
Greasemonkey: XSS Malware Script Detector - http://yehg.net/lab/#tools.greasemonkey&lt;br /&gt;
&lt;br /&gt;
==Browser Privacy==&lt;br /&gt;
TrackMeNot (Firefox Add-on) - https://addons.mozilla.org/firefox/3173/&amp;lt;br /&amp;gt;&lt;br /&gt;
Privacy Bird - http://www.privacybird.com/&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Application and protocol fuzzing (random instead of targeted)==&lt;br /&gt;
Sulley - http://fuzzing.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
taof: The Art of Fuzzing - http://sourceforge.net/projects/taof/&amp;lt;br /&amp;gt;&lt;br /&gt;
zzuf: multipurpose fuzzer - http://sam.zoy.org/zzuf/&amp;lt;br /&amp;gt;&lt;br /&gt;
autodafé: an act of software torture - http://autodafe.sourceforge.net/&amp;lt;br /&amp;gt;&lt;br /&gt;
EFS and GPF: Evolutionary Fuzzing System - http://www.appliedsec.com/resources.html&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Project_Roadmap&amp;diff=60937</id>
		<title>Category:OWASP Yasca Project Roadmap</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Project_Roadmap&amp;diff=60937"/>
				<updated>2009-05-19T02:14:05Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== The Goal of Yasca ===&lt;br /&gt;
The primary goal of Yasca is to assist '''developers''' in performing a '''security-oriented code review'''. This is accomplished through the following main features:&lt;br /&gt;
* an extensible architecture that other products can be integrated into,&lt;br /&gt;
* a single view of all results, with details down to the line of code (where possible), and&lt;br /&gt;
* a growing set of &amp;quot;open source&amp;quot; rules that anyone can add to.&lt;br /&gt;
&lt;br /&gt;
A secondary goal is to support both the open source and enterprise development communities by delivering a high-quality product that can be relied upon and extended to meet evolving needs.&lt;br /&gt;
&lt;br /&gt;
=== The Roadmap ===&lt;br /&gt;
&lt;br /&gt;
==== Version 1.0 ====&lt;br /&gt;
&lt;br /&gt;
The initial public release of Yasca was made available in October 2008. It offered integration with PMD, FindBugs, J-Lint, and antiC, as well as a limited set of custom rules and report generators.&lt;br /&gt;
&lt;br /&gt;
==== Version 1.1 ====&lt;br /&gt;
&lt;br /&gt;
This version was released on December 19, 2008, with the following changes:&lt;br /&gt;
* Update of all integrated components&lt;br /&gt;
** PMD to version 4.2.4&lt;br /&gt;
** FindBugs to version 1.3.6 (with FB-Contrib as well)&lt;br /&gt;
** PHP to version 5.2.8&lt;br /&gt;
* Addition of new custom rules&lt;br /&gt;
* Minor bug fixes&lt;br /&gt;
&lt;br /&gt;
==== Version 1.2 ====&lt;br /&gt;
&lt;br /&gt;
Version 1.2 was released on January 16, 2009, with the following enhancements:&lt;br /&gt;
* Ability to flag findings to be ignored in subsequent scans&lt;br /&gt;
* New plugins for PHP and C/C++&lt;br /&gt;
* Inclusion of Pixy, a scanner for PHP 4 source code&lt;br /&gt;
* Minor bug fixes&lt;br /&gt;
&lt;br /&gt;
==== Version 2.0 ====&lt;br /&gt;
&lt;br /&gt;
Version 2.0 released on 2009-05-07&lt;br /&gt;
    Redesign separating Yasca-Core from plugin packages.&lt;br /&gt;
    Added ClamAV plugin&lt;br /&gt;
    Added RATS plugin&lt;br /&gt;
    Added new minor plugins and many new rulesets.&lt;br /&gt;
&lt;br /&gt;
Version 2.01 released on 2009-05-18&lt;br /&gt;
    Fixed a few bugs related to calling external plugins.&lt;br /&gt;
    Added a few minor plugins, including one that finds banned functions (via Microsoft SDL)&lt;br /&gt;
&lt;br /&gt;
==== Version 3.0 ====&lt;br /&gt;
While no decisions have been finalized, some ideas for consideration include:&lt;br /&gt;
* Better error handling&lt;br /&gt;
** Automatic disabling of certain plugins based on the type of project (i.e. don't use PMD to scan C only projects)&lt;br /&gt;
* Integration of OunceOpen tools&lt;br /&gt;
* Integration of other OWASP projects ([[:Category:OWASP_Open_Review_Project|Open Review]], [[:Category:OWASP_Code_Review_Project|Code Review]], and [[:Category:OWASP_Orizon_Project|Orizon]])&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Yasca Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Project_Information:template_Yasca_Project&amp;diff=60936</id>
		<title>Project Information:template Yasca Project</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Project_Information:template_Yasca_Project&amp;diff=60936"/>
				<updated>2009-05-19T02:12:16Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Fixed up some links.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;8&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''PROJECT IDENTIFICATION''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''Project Name'''&lt;br /&gt;
 | colspan=&amp;quot;7&amp;quot; style=&amp;quot;width:85%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;|&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt;'''OWASP Yasca Project'''  &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;| '''Short Project Description''' &lt;br /&gt;
 | colspan=&amp;quot;7&amp;quot; style=&amp;quot;width:85%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;| &lt;br /&gt;
* Yasca is an open source program which looks for security vulnerabilities, code-quality, performance, and conformance to best practices in program source code. It leverages external open source programs, such as [http://findbugs.sourceforge.net/ FindBugs], [http://pmd.sourceforge.net PMD], [http://artho.com/jlint JLint], [http://javascriptlint.com/ JavaScript Lint], [http://www.icosaedro.it/phplint/ PHPLint], [http://en.wikipedia.org/wiki/Cppcheck Cppcheck], [http://en.wikipedia.org/wiki/ClamAV ClamAV], [http://en.wikipedia.org/wiki/RATS RATS], and [http://pixybox.seclab.tuwien.ac.at/ Pixy] to scan specific file types, and also contains many custom scanners developed just for Yasca. It is a command-line tool that generates reports in HTML, CSV, XML, SQLite, and other formats. Yasca is easily extensible via a plugin-based architecture, so scanning any particular file is as simple as coming up with the rules or integrating external tools.&amp;lt;br/&amp;gt;&lt;br /&gt;
* Yasca also features a simple regular-expression plugin that allows new rules to be written in less than a minute.&lt;br /&gt;
&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''Key Project Information'''&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Licensed under&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/BSD_license BSD License]&amp;lt;br/&amp;gt;[http://en.wikipedia/org/wiki/GPL_license GPL License]&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Project Leader&amp;lt;br&amp;gt;[mailto:michael.scovetta(at)gmail.com '''Michael V. Scovetta''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Project Contributors&amp;lt;br&amp;gt;[mailto:name(at)name '''Name''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Mailing List&amp;lt;br&amp;gt;[https://lists.owasp.org/mailman/listinfo/owasp-yasca-project '''To Subscribe''']&amp;lt;br&amp;gt;[mailto:owasp-yasca-project(at)lists.owasp.org '''To Use''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|First Reviewer&amp;lt;br&amp;gt;[mailto:name(at)name '''Name''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Second Reviewer&amp;lt;br&amp;gt;[mailto:name(at)name '''Name''']&amp;lt;br&amp;gt;&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|OWASP Board Member&amp;lt;br&amp;gt;(if applicable)&amp;lt;br&amp;gt;[mailto:name(at)name '''Name&amp;amp;Email''']&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;6&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''PROJECT MAIN LINKS''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:100%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
Yasca is hosted on [http://sourceforge.net/projects/yasca SourceForge] and has a main project website at [http://www.yasca.org/ yasca.org].&lt;br /&gt;
&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;6&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''RELATED PROJECTS''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:100%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
* [[:Category:OWASP Orizon Project|OWASP Orizon Project]]&amp;lt;br&amp;gt;&lt;br /&gt;
* [[:Category:OWASP Code Review_Project|OWASP Code Review_Project]]&lt;br /&gt;
* [[:Category:OWASP Open Review Project|OWASP Open Review Project]]&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;6&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''SPONSORS &amp;amp; GUIDELINES''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:50%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Sponsor name, if applicable  &lt;br /&gt;
 | style=&amp;quot;width:50%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|[[:Category:OWASP Yasca Project Roadmap|'''Guidelines/Roadmap''']]&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|ASSESSMENT AND REVIEW PROCESS&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#6C82B5&amp;quot; align=&amp;quot;center&amp;quot;|'''Review/Reviewer''' &lt;br /&gt;
 | style=&amp;quot;width:21%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''Author's Self Evaluation'''&amp;lt;br&amp;gt;(applicable for Alpha Quality &amp;amp; further) &lt;br /&gt;
 | style=&amp;quot;width:21%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''First Reviewer'''&amp;lt;br&amp;gt;(applicable for Alpha Quality &amp;amp; further)&lt;br /&gt;
 | style=&amp;quot;width:21%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''Second Reviewer'''&amp;lt;br&amp;gt;(applicable for Beta Quality &amp;amp; further)&lt;br /&gt;
 | style=&amp;quot;width:22%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''OWASP Board Member'''&amp;lt;br&amp;gt;(applicable just for Release Quality) &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''First Review''' &lt;br /&gt;
 | style=&amp;quot;width:21%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Yes'''&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Beta Status'''&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - Self Evaluation - A|See&amp;amp;Edit: First Review/SelfEvaluation (A)]]&lt;br /&gt;
 | style=&amp;quot;width:21%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Not yet''' (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Alpha Status''' - (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - First Reviewer - B|See&amp;amp;Edit: First Review/1st Reviewer (B)]]&lt;br /&gt;
 | style=&amp;quot;width:21%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Yes/No''' (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Alpha Status''' - (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - Second Reviewer - C|See&amp;amp;Edit: First Review/2nd Reviewer (C)]]&lt;br /&gt;
 | style=&amp;quot;width:22%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Yes/No''' (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Alpha Status''' - (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - OWASP Board Member - D|See/Edit: First Review/Board Member (D)]]&lt;br /&gt;
 |-&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Documentation&amp;diff=55456</id>
		<title>Category:OWASP Yasca Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Documentation&amp;diff=55456"/>
				<updated>2009-02-25T14:39:11Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
=== User Documentation ===&lt;br /&gt;
&lt;br /&gt;
All user documentation for Yasca is provided in the 'doc' directory of the Yasca distribution. It is also available at the Yasca [http://www.yasca.org/h/documentation/ Documentation] page.&lt;br /&gt;
&lt;br /&gt;
=== Presentations ===&lt;br /&gt;
&lt;br /&gt;
*[[Media:NYPHP-Yasca.pdf|Introducing Yasca]] (given at [http://www.nyphp.org/ NYPHP])&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Yasca Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Documentation&amp;diff=55455</id>
		<title>Category:OWASP Yasca Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Documentation&amp;diff=55455"/>
				<updated>2009-02-25T14:38:32Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Added new presentation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
=== User Documentation ===&lt;br /&gt;
&lt;br /&gt;
All user documentation for Yasca is provided in the 'doc' directory of the Yasca distribution. It is also available at the Yasca [http://www.yasca.org/h/documentation/ Documentation] page.&lt;br /&gt;
&lt;br /&gt;
=== Presentations ===&lt;br /&gt;
&lt;br /&gt;
*[[Media:NYPHP-Yasca.pdf‎|Introducing Yasca]] (given at [http://www.nyphp.org/|NYPHP])&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Yasca Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:NYPHP-Yasca.pdf&amp;diff=55454</id>
		<title>File:NYPHP-Yasca.pdf</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:NYPHP-Yasca.pdf&amp;diff=55454"/>
				<updated>2009-02-25T14:37:11Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Presentation given at NYPHP on 24 Feb 2009 titled &amp;quot;Introducing Yasca&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Presentation given at NYPHP on 24 Feb 2009 titled &amp;quot;Introducing Yasca&amp;quot;&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Project_Roadmap&amp;diff=51498</id>
		<title>Category:OWASP Yasca Project Roadmap</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Project_Roadmap&amp;diff=51498"/>
				<updated>2009-01-17T13:17:08Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Updated release v1.2 change log&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== The Goal of Yasca ===&lt;br /&gt;
The primary goal of Yasca is to assist '''developers''' in performing a '''security-oriented code review'''. This is accomplished through the following main features:&lt;br /&gt;
* an extensible architecture that other products can be integrated into,&lt;br /&gt;
* a single view of all results, with details down to the line of code (where possible), and&lt;br /&gt;
* a growing set of &amp;quot;open source&amp;quot; rules that anyone can add to.&lt;br /&gt;
&lt;br /&gt;
A secondary goal is to support both the open source and enterprise development communities by delivering a high-quality product that can be relied upon and extended to meet evolving needs.&lt;br /&gt;
&lt;br /&gt;
=== The Roadmap ===&lt;br /&gt;
&lt;br /&gt;
==== Version 1.0 ====&lt;br /&gt;
&lt;br /&gt;
The initial public release of Yasca was made available in October 2008. It offered integration with PMD, FindBugs, J-Lint, and antiC, as well as a limited set of custom rules and report generators.&lt;br /&gt;
&lt;br /&gt;
==== Version 1.1 ====&lt;br /&gt;
&lt;br /&gt;
This version was released on December 19, 2008, with the following changes:&lt;br /&gt;
* Update of all integrated components&lt;br /&gt;
** PMD to version 4.2.4&lt;br /&gt;
** FindBugs to version 1.3.6 (with FB-Contrib as well)&lt;br /&gt;
** PHP to version 5.2.8&lt;br /&gt;
* Addition of new custom rules&lt;br /&gt;
* Minor bug fixes&lt;br /&gt;
&lt;br /&gt;
==== Version 1.2 ====&lt;br /&gt;
&lt;br /&gt;
Version 1.2 was released on January 16, 2009, with the following enhancements:&lt;br /&gt;
* Ability to flag findings to be ignored in subsequent scans&lt;br /&gt;
* New plugins for PHP and C/C++&lt;br /&gt;
* Inclusion of Pixy, a scanner for PHP 4 source code&lt;br /&gt;
* Minor bug fixes&lt;br /&gt;
&lt;br /&gt;
==== Version 2.0 ====&lt;br /&gt;
&lt;br /&gt;
While no decisions have been finalized, some ideas for consideration include:&lt;br /&gt;
* Better error handling&lt;br /&gt;
** Automatic disabling of certain plugins based on the type of project (i.e. don't use PMD to scan C only projects)&lt;br /&gt;
* Integration of OunceOpen tools&lt;br /&gt;
* Integration of other OWASP projects ([[:Category:OWASP_Open_Review_Project|Open Review]], [[:Category:OWASP_Code_Review_Project|Code Review]], and [[:Category:OWASP_Orizon_Project|Orizon]])&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Yasca Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Documentation&amp;diff=50078</id>
		<title>Category:OWASP Yasca Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Documentation&amp;diff=50078"/>
				<updated>2009-01-04T04:59:17Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
=== User Documentation ===&lt;br /&gt;
&lt;br /&gt;
All user documentation for Yasca is provided in the 'doc' directory of Yasca. It is also available at the Yasca [http://www.yasca.org/h/documentation/ Documentation] page.&lt;br /&gt;
&lt;br /&gt;
=== Presentations ===&lt;br /&gt;
&lt;br /&gt;
*[[Media:OWASP-_Yasca.ppt|Introducing Yasca]]&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Yasca Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Documentation&amp;diff=50077</id>
		<title>Category:OWASP Yasca Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Documentation&amp;diff=50077"/>
				<updated>2009-01-04T04:35:49Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Initial Edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
=== User Documentation ===&lt;br /&gt;
&lt;br /&gt;
All user documentation for Yasca is provided in the 'doc' directory of Yasca. It is also available at the Yasca [http://www.yasca.org/h/documentation/ Documentation] page.&lt;br /&gt;
&lt;br /&gt;
=== Presentations ===&lt;br /&gt;
&lt;br /&gt;
*[[Media:OWASP-_Yasca.ppt|Introducing Yasca]] (January 27, 2009 at the NY/NJ OWASP Chapter Meeting)&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Yasca Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:OWASP-_Yasca.ppt&amp;diff=50076</id>
		<title>File:OWASP- Yasca.ppt</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:OWASP-_Yasca.ppt&amp;diff=50076"/>
				<updated>2009-01-04T04:30:07Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Draft presentation of Yasca for the NY/NJ OWASP January 2009 Chapter Meeting.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Draft presentation of Yasca for the NY/NJ OWASP January 2009 Chapter Meeting.&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Project_Roadmap&amp;diff=50075</id>
		<title>Category:OWASP Yasca Project Roadmap</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Project_Roadmap&amp;diff=50075"/>
				<updated>2009-01-04T04:27:58Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Added v1.2 information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== The Goal of Yasca ===&lt;br /&gt;
The primary goal of Yasca is to assist '''developers''' in performing a '''security-oriented code review'''. This is accomplished through the following main features:&lt;br /&gt;
* an extensible architecture that other products can be integrated into,&lt;br /&gt;
* a single view of all results, with details down to the line of code (where possible), and&lt;br /&gt;
* a growing set of &amp;quot;open source&amp;quot; rules that anyone can add to.&lt;br /&gt;
&lt;br /&gt;
A secondary goal is to support both the open source and enterprise development communities by delivering a high-quality product that can be relied upon and extended to meet evolving needs.&lt;br /&gt;
&lt;br /&gt;
=== The Roadmap ===&lt;br /&gt;
&lt;br /&gt;
==== Version 1.0 ====&lt;br /&gt;
&lt;br /&gt;
The initial public release of Yasca was made available in October 2008. It offered integration with PMD, FindBugs, J-Lint, and antiC, as well as a limited set of custom rules and report generators.&lt;br /&gt;
&lt;br /&gt;
==== Version 1.1 ====&lt;br /&gt;
&lt;br /&gt;
This version was released on December 19, 2008, with the following changes:&lt;br /&gt;
* Update of all integrated components&lt;br /&gt;
** PMD to version 4.2.4&lt;br /&gt;
** FindBugs to version 1.3.6 (with FB-Contrib as well)&lt;br /&gt;
** PHP to version 5.2.8&lt;br /&gt;
* Addition of new custom rules&lt;br /&gt;
* Minor bug fixes&lt;br /&gt;
&lt;br /&gt;
==== Version 1.2 ====&lt;br /&gt;
&lt;br /&gt;
Version 1.2 is expected to be released on January 27, 2009, with the following enhancements:&lt;br /&gt;
* Ability to flag findings to be ignored in subsequent scans&lt;br /&gt;
* New plugins for PHP and C/C++&lt;br /&gt;
* Minor bug fixes&lt;br /&gt;
&lt;br /&gt;
==== Version 2.0 ====&lt;br /&gt;
&lt;br /&gt;
While no decisions have been finalized, some ideas for consideration include:&lt;br /&gt;
* Better error handling&lt;br /&gt;
** Automatic disabling of certain plugins based on the type of project (i.e. don't use PMD to scan C only projects)&lt;br /&gt;
* Integration of OunceOpen tools&lt;br /&gt;
* Integration of other OWASP projects ([[:Category:OWASP_Open_Review_Project|Open Review]], [[:Category:OWASP_Code_Review_Project|Code Review]], and [[:Category:OWASP_Orizon_Project|Orizon]])&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Yasca Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Project_Roadmap&amp;diff=49611</id>
		<title>Category:OWASP Yasca Project Roadmap</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Project_Roadmap&amp;diff=49611"/>
				<updated>2008-12-19T20:40:13Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Updated for version 1.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== The Goal of Yasca ===&lt;br /&gt;
The primary goal of Yasca is to assist '''developers''' in performing a '''security-oriented code review'''. This is accomplished through the following main features:&lt;br /&gt;
* an extensible architecture that other products can be integrated into,&lt;br /&gt;
* a single view of all results, with details down to the line of code (where possible), and&lt;br /&gt;
* a growing set of &amp;quot;open source&amp;quot; rules that anyone can add to.&lt;br /&gt;
&lt;br /&gt;
A secondary goal is to support both the open source and enterprise development communities by delivering a high-quality product that can be relied upon and extended to meet evolving needs.&lt;br /&gt;
&lt;br /&gt;
=== The Roadmap ===&lt;br /&gt;
&lt;br /&gt;
==== Version 1.0 ====&lt;br /&gt;
&lt;br /&gt;
The initial public release of Yasca was made available in October 2008. It offered integration with PMD, FindBugs, J-Lint, and antiC, as well as a limited set of custom rules and report generators.&lt;br /&gt;
&lt;br /&gt;
==== Version 1.1 ====&lt;br /&gt;
&lt;br /&gt;
This version was released on December 19, 2008, with the following changes:&lt;br /&gt;
* Update of all integrated components&lt;br /&gt;
** PMD to version 4.2.4&lt;br /&gt;
** FindBugs to version 1.3.6 (with FB-Contrib as well)&lt;br /&gt;
** PHP to version 5.2.8&lt;br /&gt;
* Addition of new custom rules&lt;br /&gt;
* Minor bug fixes&lt;br /&gt;
&lt;br /&gt;
==== Version 2.0 ====&lt;br /&gt;
&lt;br /&gt;
While no decisions have been finalized, some ideas for consideration include:&lt;br /&gt;
* Better error handling&lt;br /&gt;
** Automatic disabling of certain plugins based on the type of project (i.e. don't use PMD to scan C only projects)&lt;br /&gt;
* Integration of OunceOpen tools&lt;br /&gt;
* Integration of other OWASP projects ([[:Category:OWASP_Open_Review_Project|Open Review]], [[:Category:OWASP_Code_Review_Project|Code Review]], and [[:Category:OWASP_Orizon_Project|Orizon]])&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Yasca Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Project_Information:template_Yasca_Project&amp;diff=49610</id>
		<title>Project Information:template Yasca Project</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Project_Information:template_Yasca_Project&amp;diff=49610"/>
				<updated>2008-12-19T20:32:21Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Added BSD License&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;8&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''PROJECT IDENTIFICATION''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''Project Name'''&lt;br /&gt;
 | colspan=&amp;quot;7&amp;quot; style=&amp;quot;width:85%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;|&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt;'''OWASP Yasca Project'''  &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;| '''Short Project Description''' &lt;br /&gt;
 | colspan=&amp;quot;7&amp;quot; style=&amp;quot;width:85%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;| &lt;br /&gt;
* Yasca is a new static analysis tool designed to scan Java, C/C++, JavaScript, .NET, and other source code for security and code-quality issues. Yasca is easily extensible via a plugin-based architecture, so scanning PHP, Ruby, or other languages is as simple as coming up with rules or integrating external tools.&amp;lt;br&amp;gt;&lt;br /&gt;
* Yasca includes plugins for the following open-source projects:&lt;br /&gt;
** FindBugs (http://findbugs.sourceforge.net/)&lt;br /&gt;
** PMD (http://pmd.sourceforge.net/)&lt;br /&gt;
** Jlint / antiC (http://artho.com/jlint/)&lt;br /&gt;
* Yasca also features a simple regular-expression plugin that allows new rules to be written in less than a minute. It includes many custom rules created specifically for Yasca, and additional rule-packs will be released soon.&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''Key Project Information'''&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Licensed under&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/BSD_license BSD License]&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Project Leader&amp;lt;br&amp;gt;[mailto:michael.scovetta(at)gmail.com '''Michael V. Scovetta''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Project Contributors&amp;lt;br&amp;gt;[mailto:name(at)name '''Name''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Mailing List&amp;lt;br&amp;gt;[https://lists.owasp.org/mailman/listinfo/owasp-yasca-project '''To Subscribe''']&amp;lt;br&amp;gt;[mailto:owasp-yasca-project(at)lists.owasp.org '''To Use''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|First Reviewer&amp;lt;br&amp;gt;[mailto:name(at)name '''Name''']&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Second Reviewer&amp;lt;br&amp;gt;[mailto:name(at)name '''Name''']&amp;lt;br&amp;gt;&lt;br /&gt;
 | style=&amp;quot;width:12%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|OWASP Board Member&amp;lt;br&amp;gt;(if applicable)&amp;lt;br&amp;gt;[mailto:name(at)name '''Name&amp;amp;Email''']&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;6&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''PROJECT MAIN LINKS''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:100%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
Yasca is hosted on SourceForge (http://sourceforge.net/projects/yasca) with additional information at http://yasca.org.&lt;br /&gt;
&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;6&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''RELATED PROJECTS''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:100%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
* [[:Category:OWASP Orizon Project|OWASP Orizon Project]]&amp;lt;br&amp;gt;&lt;br /&gt;
* [[:Category:OWASP Code Review_Project|OWASP Code Review_Project]]&lt;br /&gt;
* [[:Category:OWASP Open Review Project|OWASP Open Review Project]]&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;6&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''SPONSORS &amp;amp; GUIDELINES''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:50%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Sponsor name, if applicable  &lt;br /&gt;
 | style=&amp;quot;width:50%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|[[:Category:OWASP Yasca Project Roadmap|'''Guidelines/Roadmap''']]&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|ASSESSMENT AND REVIEW PROCESS&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#6C82B5&amp;quot; align=&amp;quot;center&amp;quot;|'''Review/Reviewer''' &lt;br /&gt;
 | style=&amp;quot;width:21%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''Author's Self Evaluation'''&amp;lt;br&amp;gt;(applicable for Alpha Quality &amp;amp; further) &lt;br /&gt;
 | style=&amp;quot;width:21%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''First Reviewer'''&amp;lt;br&amp;gt;(applicable for Alpha Quality &amp;amp; further)&lt;br /&gt;
 | style=&amp;quot;width:21%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''Second Reviewer'''&amp;lt;br&amp;gt;(applicable for Beta Quality &amp;amp; further)&lt;br /&gt;
 | style=&amp;quot;width:22%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''OWASP Board Member'''&amp;lt;br&amp;gt;(applicable just for Release Quality) &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''First Review''' &lt;br /&gt;
 | style=&amp;quot;width:21%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Not yet''' (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Alpha Status''' - (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - Self Evaluation - A|See&amp;amp;Edit: First Review/SelfEvaluation (A)]]&lt;br /&gt;
 | style=&amp;quot;width:21%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Not yet''' (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Alpha Status''' - (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - First Reviewer - B|See&amp;amp;Edit: First Review/1st Reviewer (B)]]&lt;br /&gt;
 | style=&amp;quot;width:21%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Yes/No''' (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Alpha Status''' - (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - Second Reviewer - C|See&amp;amp;Edit: First Review/2nd Reviewer (C)]]&lt;br /&gt;
 | style=&amp;quot;width:22%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Objectives &amp;amp; Deliveries reached?&amp;lt;br&amp;gt;'''Yes/No''' (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;Which status has been reached?&amp;lt;br&amp;gt;'''Alpha Status''' - (To update)&amp;lt;br&amp;gt;---------&amp;lt;br&amp;gt;[[Project Information:template Yasca Project - First Review - OWASP Board Member - D|See/Edit: First Review/Board Member (D)]]&lt;br /&gt;
 |-&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Project_Roadmap&amp;diff=48532</id>
		<title>Category:OWASP Yasca Project Roadmap</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Project_Roadmap&amp;diff=48532"/>
				<updated>2008-12-13T15:28:56Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Added category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== The Goal of Yasca ===&lt;br /&gt;
The primary goal of Yasca is to assist '''developers''' in performing a '''security-oriented code review'''. This is accomplished through the following main features:&lt;br /&gt;
* an extensible architecture that other products can be integrated into,&lt;br /&gt;
* a single view of all results, with details down to the line of code (where possible), and&lt;br /&gt;
* a growing set of &amp;quot;open source&amp;quot; rules that anyone can add to.&lt;br /&gt;
&lt;br /&gt;
A secondary goal is to support both the open source and enterprise development communities by delivering a high-quality product that can be relied upon and extended to meet evolving needs.&lt;br /&gt;
&lt;br /&gt;
=== The Roadmap ===&lt;br /&gt;
&lt;br /&gt;
==== Version 1.0 ====&lt;br /&gt;
&lt;br /&gt;
The initial public release of Yasca was made available in October 2008. It offered integration with PMD, FindBugs, J-Lint, and antiC, as well as a limited set of custom rules and report generators.&lt;br /&gt;
&lt;br /&gt;
==== Version 1.1 ====&lt;br /&gt;
&lt;br /&gt;
This version is expected to be released in January 2009, and to offer the following changes:&lt;br /&gt;
* Update of all integrated components&lt;br /&gt;
** PMD to version 4.2.4&lt;br /&gt;
** FindBugs to version 1.3.6&lt;br /&gt;
** PHP to version 5.2.8&lt;br /&gt;
* Addition of new custom rules&lt;br /&gt;
* Better error handling&lt;br /&gt;
** Automatic disabling of certain plugins based on the type of project (i.e. don't use PMD to scan C only projects)&lt;br /&gt;
&lt;br /&gt;
==== Version 2.0 ====&lt;br /&gt;
&lt;br /&gt;
While no decisions have been finalized, some ideas for consideration include:&lt;br /&gt;
* Integration of OunceOpen tools&lt;br /&gt;
* Integration of other OWASP projects ([[:Category:OWASP_Open_Review_Project|Open Review]], [[:Category:OWASP_Code_Review_Project|Code Review]], and [[:Category:OWASP_Orizon_Project|Orizon]])&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Yasca Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Project_Roadmap&amp;diff=48531</id>
		<title>Category:OWASP Yasca Project Roadmap</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:OWASP_Yasca_Project_Roadmap&amp;diff=48531"/>
				<updated>2008-12-13T15:22:27Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Initial Submission&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== The Goal of Yasca ===&lt;br /&gt;
The primary goal of Yasca is to assist '''developers''' in performing a '''security-oriented code review'''. This is accomplished through the following main features:&lt;br /&gt;
* an extensible architecture that other products can be integrated into,&lt;br /&gt;
* a single view of all results, with details down to the line of code (where possible), and&lt;br /&gt;
* a growing set of &amp;quot;open source&amp;quot; rules that anyone can add to.&lt;br /&gt;
&lt;br /&gt;
A secondary goal is to support both the open source and enterprise development communities by delivering a high-quality product that can be relied upon and extended to meet evolving needs.&lt;br /&gt;
&lt;br /&gt;
=== The Roadmap ===&lt;br /&gt;
&lt;br /&gt;
==== Version 1.0 ====&lt;br /&gt;
&lt;br /&gt;
The initial public release of Yasca was made available in October 2008. It offered integration with PMD, FindBugs, J-Lint, and antiC, as well as a limited set of custom rules and report generators.&lt;br /&gt;
&lt;br /&gt;
==== Version 1.1 ====&lt;br /&gt;
&lt;br /&gt;
This version is expected to be released in January 2009, and to offer the following changes:&lt;br /&gt;
* Update of all integrated components&lt;br /&gt;
** PMD to version 4.2.4&lt;br /&gt;
** FindBugs to version 1.3.6&lt;br /&gt;
** PHP to version 5.2.8&lt;br /&gt;
* Addition of new custom rules&lt;br /&gt;
* Better error handling&lt;br /&gt;
** Automatic disabling of certain plugins based on the type of project (i.e. don't use PMD to scan C only projects)&lt;br /&gt;
&lt;br /&gt;
==== Version 2.0 ====&lt;br /&gt;
&lt;br /&gt;
While no decisions have been finalized, some ideas for consideration include:&lt;br /&gt;
* Integration of OunceOpen tools&lt;br /&gt;
* Integration of other OWASP projects ([[:Category:OWASP_Open_Review_Project|Open Review]], [[:Category:OWASP_Code_Review_Project|Code Review]], and [[:Category:OWASP_Orizon_Project|Orizon]])&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Funds_available_for_OWASP_Projects&amp;diff=19917</id>
		<title>Funds available for OWASP Projects</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Funds_available_for_OWASP_Projects&amp;diff=19917"/>
				<updated>2007-07-16T13:49:14Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: corrected spelling of SPI Dynamics&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains details about funds available to OWASP projects.&lt;br /&gt;
&lt;br /&gt;
The sponsorship model is different from the one used in [[OWASP Autumn Of Code 2006|AoC 06]] and [[OWASP Spring Of Code 2007|SpoC 007]] since these are cases where specific money (throughout out the year) has been allocated to OWASP projects (for example by new OWASP members or by companies/organizations with specific requirements/projects) &lt;br /&gt;
&lt;br /&gt;
== July 2007 Batch - Overview ==&lt;br /&gt;
 &lt;br /&gt;
Now with the SpoC 007 (Spring of Code 2007) under way, OWASP is requesting proposals for OWASP projects with sponsorship funds available (28,000 USD in total).&lt;br /&gt;
 &lt;br /&gt;
The projects with funding available are (with details included below):&lt;br /&gt;
&lt;br /&gt;
* '''OSG - OWASP Site Generator''' -  Join Boris in his development of the new version of .NET's OSG (funds from SPI Dynamics and Cenzic membership fees)&lt;br /&gt;
* '''OWASP Corporate Application Security Rating Guide''' - Create and release the first version of this very important document ( funds from Cenzic membership fees)&lt;br /&gt;
* '''Questions for SANS''' - Write 200 questions for SANS with a % of those questions made open to the OWASP community (funds directly allocated by SANS for this project)&lt;br /&gt;
* '''Source Code Review OWASP Projects''' - Implement a workflow where all OWASP projects that use JAVA technology are automatically audited for security flaws (funds directly allocated by Fortify Software for this project)&lt;br /&gt;
* '''BlackTop project''' - Develop a runtime code analysis tool to be used by Penetration Testers during client engagements (funds directly allocated by Ounce Labs for this project).&lt;br /&gt;
&lt;br /&gt;
If you are interested, email your proposal to Dinis.cruz at owasp.net including responses to the following items:&lt;br /&gt;
&lt;br /&gt;
* Your educational and professional background&lt;br /&gt;
* Application security experience and accomplishments&lt;br /&gt;
* Participation and leadership in open communities&lt;br /&gt;
* The opportunity, challenges, issues or need your proposal addresses&lt;br /&gt;
* Milestones and objectives&lt;br /&gt;
* Specific activities and who will carry out these activities&lt;br /&gt;
* Specific deliverables and a rough project schedule so we can track progress&lt;br /&gt;
* Long-term vision for the project&lt;br /&gt;
* Any other reasons why you and your project should be selected&lt;br /&gt;
&lt;br /&gt;
The proposed project delivery time is 3 months and the payment will be made in two 50% parts (one at the 50% mark and one at 100% mark (i.e. project completed))&lt;br /&gt;
&lt;br /&gt;
OWASP will also put the applicants in touch with the contacts at the sponsoring companies so that the brief and project deliverables can be finalized.&lt;br /&gt;
&lt;br /&gt;
== July 2007 Batch - Project details ==&lt;br /&gt;
 &lt;br /&gt;
====OSG - OWASP Site Generator (5k)====&lt;br /&gt;
&lt;br /&gt;
* '''Project description''': Continue development of Site Generator, write new vulnerabilities, work on new dynamic engine, document findings&lt;br /&gt;
* '''Funds available''': 5,000 USD&lt;br /&gt;
* '''Sponsor:''' SPI Dynamics, Cenzic&lt;br /&gt;
&lt;br /&gt;
====OWASP Corporate Application Security Rating Guide (3k)====&lt;br /&gt;
&lt;br /&gt;
* '''Project description''': As per https://www.owasp.org/index.php/OWASP_Corporate_Application_Security_Rating_Guide, finalize criteria, research selected companies and publish a report with the results&lt;br /&gt;
* '''Funds available''': 3,000 USD&lt;br /&gt;
* '''Sponsor''': Cenzic &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Questions for SANS (5k)====&lt;br /&gt;
&lt;br /&gt;
* '''Project description''': Write JAVA/JSP questions for SANS's Software Security Institute certification exams( http://www.sans-ssi.org/). The candidate will need to write 200 questions and answers and must be a knowledgeable and respected member of the Java community. For obvious reasons only 10% to 20% of the questions created will be disclosed to the OWASP community, with the remainder to be used in the certification's exams..&lt;br /&gt;
** Note that although this first request is for questions in JAVA/JSP there are plans to run a similar project for C, C++, PHP, .NET, so if you are interested in these other languages feel free to contact us.. &lt;br /&gt;
* '''Funds available''': 5,000 USD&lt;br /&gt;
* '''Sponsor''': SANS&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Source Code Review OWASP Projects (5k)====&lt;br /&gt;
&lt;br /&gt;
* '''Project description''': Use Fortify Software's source code scanning engine ( http://opensource.fortifysoftware.com) to scan open source projects coded in JAVA. The objectives of this project will be:&lt;br /&gt;
** Develop and document a workflow for open source projects to incorporate static analysis into the Software Development Life Cycle (SDLC).&lt;br /&gt;
** Apply the above workflow as a required step for OWASP projects.&lt;br /&gt;
** Aid in auditing select open source projects to create a baseline for comparing security amongst open source projects. &lt;br /&gt;
* '''Funds available''': 5,000 USD&lt;br /&gt;
* '''Sponsor''': Fortify Software&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====BlackTop - Runtime coverage analysis tool (10k)====&lt;br /&gt;
&lt;br /&gt;
* '''Project description''': Develop and document a &amp;quot;blackbox&amp;quot; pen testing code analysis solution capable of providing runtime coverage analysis for applications written in Java and .NET. In order to ensure the solution does not require access to the applications' source code, the solution should use (for example) the AspectJ and PostSharp bytecode weaving frameworks.&lt;br /&gt;
** The project must produce an open source, release quality application, including a GUI and documentation. The project should utilize a license; either the Eclipse Public License or the Mozilla Public license is allowable. &lt;br /&gt;
** The tool should provide code level details and call trace information of all ingress and egress points of the application and be able to identify gaps in the &amp;quot;blackbox&amp;quot; testing to facilitate more accurate and complete pen testing.  All output and configuration should be done using an open format (such as XML) and enable command line execution of the application.&lt;br /&gt;
* '''Funds available''': 10,000 USD&lt;br /&gt;
* '''Sponsor''': Ounce Labs&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Data_Validation&amp;diff=18769</id>
		<title>Data Validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Data_Validation&amp;diff=18769"/>
				<updated>2007-05-22T15:12:30Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Reformatted code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guide Table of Contents]]__TOC__&lt;br /&gt;
&lt;br /&gt;
==Objective ==&lt;br /&gt;
&lt;br /&gt;
To ensure that the application is robust against all forms of input data, whether obtained from the user, infrastructure, external entities or database systems&lt;br /&gt;
&lt;br /&gt;
==Platforms Affected ==&lt;br /&gt;
&lt;br /&gt;
All. &lt;br /&gt;
&lt;br /&gt;
==Relevant COBIT Topics ==&lt;br /&gt;
&lt;br /&gt;
DS11 – Manage Data. All sections should be reviewed&lt;br /&gt;
&lt;br /&gt;
==Description ==&lt;br /&gt;
&lt;br /&gt;
The most common web application security weakness is the failure to properly validate input from the client or environment. This weakness leads to almost all of the major vulnerabilities in applications, such as interpreter injection, locale/Unicode attacks, file system attacks and buffer overflows. Data from the client should never be trusted for the client has every possibility to tamper with the data.&lt;br /&gt;
&lt;br /&gt;
In many cases, [[Encoding]] has the potential to defuse attacks that rely on lack of input validation. For example, if you use HTML entity encoding on user input before it is sent to a browser, it will prevent most [[XSS]] attacks. However, simply preventing attacks is not enough - you must perform [[Intrusion Detection]] in your applications. Otherwise, you are allowing attackers to repeatedly attack your application until they find a vulnerability that you haven't protected against. Detecting attempts to find these weaknesses is a critical protection mechanism.&lt;br /&gt;
&lt;br /&gt;
==Definitions ==&lt;br /&gt;
&lt;br /&gt;
These definitions are used within this document:&lt;br /&gt;
&lt;br /&gt;
* '''Integrity checks'''&lt;br /&gt;
&lt;br /&gt;
Ensure that the data has not been tampered with and is the same as before&lt;br /&gt;
&lt;br /&gt;
* '''Validation'''&lt;br /&gt;
&lt;br /&gt;
Ensure that the data is strongly typed, correct syntax, within length boundaries, contains only permitted characters, or that numbers are correctly signed and within range boundaries &lt;br /&gt;
&lt;br /&gt;
* '''Business rules'''&lt;br /&gt;
&lt;br /&gt;
Ensure that data is not only validated, but business rule correct. For example, interest rates fall within permitted boundaries.&lt;br /&gt;
&lt;br /&gt;
Some documentation and references interchangeably use the various meanings, which is very confusing to all concerned. This confusion directly causes continuing financial loss to the organization. &lt;br /&gt;
&lt;br /&gt;
==Where to include integrity checks ==&lt;br /&gt;
&lt;br /&gt;
Integrity checks must be included wherever data passes from a trusted to a less trusted boundary, such as from the application to the user's browser in a hidden field, or to a third party payment gateway, such as a transaction ID used internally upon return. &lt;br /&gt;
&lt;br /&gt;
The type of integrity control (checksum, HMAC, encryption, digital signature) should be directly related to the risk of the data transiting the trust boundary. &lt;br /&gt;
&lt;br /&gt;
==Where to include validation ==&lt;br /&gt;
&lt;br /&gt;
Validation must be performed on every tier. However, validation should be performed as per the function of the server executing the code. For example, the web / presentation tier should validate for web related issues, persistence layers should validate for persistence issues such as SQL / HQL injection, directory lookups should check for LDAP injection, and so on.&lt;br /&gt;
&lt;br /&gt;
==Where to include business rule validation ==&lt;br /&gt;
&lt;br /&gt;
Business rules are known during design, and they influence implementation. However, there are bad, good and &amp;quot;best&amp;quot; approaches. Often the best approach is the simplest in terms of code. &lt;br /&gt;
&lt;br /&gt;
===Example - Scenario ===&lt;br /&gt;
&lt;br /&gt;
* You are to populate a list with accounts provided by the back-end system&lt;br /&gt;
* The user will choose an account, choose a biller, and press next&lt;br /&gt;
&lt;br /&gt;
===Wrong way===&lt;br /&gt;
&lt;br /&gt;
The account select option is read directly and provided in a message back to the backend system without validating the account number is one of the accounts provided by the backend system. &lt;br /&gt;
&lt;br /&gt;
===Why this is bad===&lt;br /&gt;
&lt;br /&gt;
An attacker can change the HTML in any way they choose:&lt;br /&gt;
&lt;br /&gt;
* The lack of validation requires a round-trip to the backend to provide an error message that the front end code could easily have eliminated&lt;br /&gt;
&lt;br /&gt;
* The back end may not be able to cope with the data payload the front-end code could have easily eliminated. For example, buffer overflows, XML injection, or similar. &lt;br /&gt;
&lt;br /&gt;
===Acceptable Method ===&lt;br /&gt;
&lt;br /&gt;
The account select option parameter (&amp;quot;payee_id&amp;quot;) is read by the code, and compared to an already-known list. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (account.hasPayee( session.getParameter(&amp;quot;payee_id&amp;quot;) )) {&lt;br /&gt;
    backend.performTransfer( session.getParameter(&amp;quot;payee_id&amp;quot;) );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prevents parameter tampering, but requires the list of possible payee_id's to be to be calculated beforehand.&lt;br /&gt;
&lt;br /&gt;
===Best Method ===&lt;br /&gt;
&lt;br /&gt;
The original code emitted indexes &amp;lt;option value=&amp;quot;1&amp;quot; ... &amp;gt; rather than account names.&lt;br /&gt;
&lt;br /&gt;
''int payeeLstId = session.getParameter('payeelstid');''&lt;br /&gt;
''accountFrom = account.getAcctNumberByIndex(payeeLstId);''&lt;br /&gt;
&lt;br /&gt;
Not only is this easier to render in HTML, it makes validation and business rule validation trivial. The field cannot be tampered with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion ===&lt;br /&gt;
&lt;br /&gt;
To provide defense in depth and to prevent attack payloads from trust boundaries, such as backend hosts, which are probably incapable of handling arbitrary input data, business rule validation is to be performed (preferably in workflow or command patterns), even if it is known that the back end code performs business rule validation.&lt;br /&gt;
&lt;br /&gt;
This is not to say that the entire set of business rules need be applied - it means that the fundamentals are performed to prevent unnecessary round trips to the backend and to prevent the backend from receiving most tampered data.&lt;br /&gt;
&lt;br /&gt;
==Data Validation Strategies ==&lt;br /&gt;
&lt;br /&gt;
There are four strategies for validating data, and they should be used in this order:&lt;br /&gt;
&lt;br /&gt;
===Accept known good===&lt;br /&gt;
&lt;br /&gt;
This strategy is also known as &amp;quot;whitelist&amp;quot; or &amp;quot;positive&amp;quot; validation. The idea is that you should check that the data is one of a set of tightly constrained known good values. Any data that doesn't match should be rejected.  Data should be:&lt;br /&gt;
&lt;br /&gt;
* Strongly typed at all times&lt;br /&gt;
* Length checked and fields length minimized&lt;br /&gt;
* Range checked if a numeric&lt;br /&gt;
* Unsigned unless required to be signed&lt;br /&gt;
* Syntax or grammar should be checked prior to first use or inspection&lt;br /&gt;
&lt;br /&gt;
If you expect a postcode, validate for a postcode (type, length and syntax):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public String isPostcode(String postcode) {&lt;br /&gt;
    return (postcode != null &amp;amp;&amp;amp; Pattern.matches(&amp;quot;^(((2|8|9)\d{2})|((02|08|09)\d{2})|([1-9]\d{3}))$&amp;quot;, postcode)) ? postcode : &amp;quot;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Coding guidelines should use some form of visible tainting on input from the client or untrusted sources, such as third party connectors to make it obvious that the input is unsafe:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
String taintPostcode = request.getParameter(&amp;quot;postcode&amp;quot;);&lt;br /&gt;
ValidationEngine validator = new ValidationEngine();&lt;br /&gt;
boolean isValidPostcode = validator.isPostcode(taintPostcode);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reject known bad===&lt;br /&gt;
&lt;br /&gt;
This strategy, also known as &amp;quot;negative&amp;quot; or &amp;quot;blacklist&amp;quot; validation is a weak alternative to positive validation. Essentially, if you don't expect to see characters such as %3f or JavaScript or similar, reject strings containing them. This is a dangerous strategy, because the set of possible bad data is potentially infinite. Adopting this strategy means that you will have to maintain the list of &amp;quot;known bad&amp;quot; characters and patterns forever, and you will by definition have incomplete protection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''public String removeJavascript(String input) {''&lt;br /&gt;
&lt;br /&gt;
''	Pattern p = Pattern.compile(&amp;quot;javascript&amp;quot;, CASE_INSENSITIVE);''&lt;br /&gt;
&lt;br /&gt;
''	p.matcher(input);''&lt;br /&gt;
&lt;br /&gt;
''	return (!p.matches()) ? input : '';''&lt;br /&gt;
&lt;br /&gt;
''}''&lt;br /&gt;
&lt;br /&gt;
It can take upwards of 90 regular expressions (see the CSS Cheat Sheet in the Guide 2.0) to eliminate known malicious software, and each regex needs to be run over every field. Obviously, this is slow and not secure. Just rejecting &amp;quot;current known bad&amp;quot; (which is at the time of writing hundreds of strings and literally millions of combinations) is insufficient if the input is a string. This strategy is directly akin to anti-virus pattern updates. Unless the business will allow updating &amp;quot;bad&amp;quot; regexes on a daily basis and support someone to research new attacks regularly, this approach will be obviated before long.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sanitize===&lt;br /&gt;
&lt;br /&gt;
Eliminate or translate characters (such as to HTML entities or to remove quotes) in an effort to make the input &amp;quot;safe&amp;quot;. &lt;br /&gt;
Like blacklists, this approach requires maintenance and is usually incomplete. As most fields have a particular grammar, it is simpler, faster, and more secure to simply validate a single correct positive test than to try to include complex and slow sanitization routines for all current and future attacks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public String quoteApostrophe(String input) {&lt;br /&gt;
    if (input != null)&lt;br /&gt;
        return input.replaceAll(&amp;quot;[\']&amp;quot;, &amp;quot;&amp;amp;amp;rsquo;&amp;quot;);&lt;br /&gt;
    else&lt;br /&gt;
        return null;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===No validation===&lt;br /&gt;
&lt;br /&gt;
This is inherently unsafe and strongly discouraged. The business must sign off each and every example of no validation as the lack of validation usually leads to direct obviation of application, host and network security controls.&lt;br /&gt;
&lt;br /&gt;
''account.setAcctId(getParameter('formAcctNo'));''&lt;br /&gt;
''...''&lt;br /&gt;
&lt;br /&gt;
''public setAcctId(String acctId) {''&lt;br /&gt;
''	cAcctId = acctId;''&lt;br /&gt;
''}''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Prevent parameter tampering ==&lt;br /&gt;
&lt;br /&gt;
There are many input sources:&lt;br /&gt;
&lt;br /&gt;
* HTTP headers, such as REMOTE_ADDR, PROXY_VIA or similar&lt;br /&gt;
&lt;br /&gt;
* Environment variables, such as getenv() or via server properties &lt;br /&gt;
&lt;br /&gt;
* All GET, POST and Cookie data&lt;br /&gt;
&lt;br /&gt;
This includes supposedly tamper resistant fields such as radio buttons, drop downs, etc - any client side HTML can be re-written to suit the attacker&lt;br /&gt;
&lt;br /&gt;
Configuration data (mistakes happen :))&lt;br /&gt;
&lt;br /&gt;
External systems (via any form of input mechanism, such as XML input, RMI, web services, etc)&lt;br /&gt;
&lt;br /&gt;
All of these data sources supply untrusted input. Data received from untrusted data sources must be properly checked before first use.&lt;br /&gt;
&lt;br /&gt;
==Hidden fields ==&lt;br /&gt;
&lt;br /&gt;
Hidden fields are a simple way to avoid storing state on the server. Their use is particularly prevalent in &amp;quot;wizard-style&amp;quot; multi-page forms. However, their use exposes the inner workings of your application, and exposes data to trivial tampering, replay, and validation attacks. In general, only use hidden fields for page sequence.&lt;br /&gt;
&lt;br /&gt;
If you have to use hidden fields, there are some rules:&lt;br /&gt;
&lt;br /&gt;
* Secrets, such as passwords, should never be sent in the clear&lt;br /&gt;
&lt;br /&gt;
* Hidden fields need to have integrity checks and preferably encrypted using non-constant initialization vectors (i.e. different users at different times have different yet cryptographically strong random IVs)&lt;br /&gt;
&lt;br /&gt;
* Encrypted hidden fields must be robust against replay attacks, which means some form of temporal keying&lt;br /&gt;
&lt;br /&gt;
* Data sent to the user must be validated on the server once the last page has been received, even if it has been previously validated on the server - this helps reduce the risk from replay attacks.&lt;br /&gt;
&lt;br /&gt;
The preferred integrity control should be at least a HMAC using SHA-256 or preferably digitally signed or encrypted using PGP. IBMJCE supports SHA-256, but PGP JCE support require the inclusion of the Legion of the Bouncy Castle (http://www.bouncycastle.org/) JCE classes.&lt;br /&gt;
&lt;br /&gt;
It is simpler to store this data temporarily in the session object. Using the session object is the safest option as data is never visible to the user, requires (far) less code, nearly no CPU, disk or I/O utilization, less memory (particularly on large multi-page forms), and less network consumption. &lt;br /&gt;
&lt;br /&gt;
In the case of the session object being backed by a database, large session objects may become too large for the inbuilt handler. In this case, the recommended strategy is to store the validated data in the database, but mark the transaction as &amp;quot;incomplete&amp;quot;. Each page will update the incomplete transaction until it is ready for submission. This minimizes the database load, session size, and activity between the users whilst remaining tamperproof. &lt;br /&gt;
&lt;br /&gt;
Code containing hidden fields should be rejected during code reviews.&lt;br /&gt;
&lt;br /&gt;
==ASP.NET Viewstate ==&lt;br /&gt;
&lt;br /&gt;
ASP.NET sends form data back to the client in a hidden “Viewstate” field. Despite looking forbidding, this “encryption” is simply plain-text equivalent (base64 encoding) and has no data integrity without further action on your behalf in ASP.NET 1.0. In ASP.NET 1.1 and 2.0, tamper proofing, called &amp;quot;enableViewStateMAC&amp;quot; is on by default using a SHA/1 hash.&lt;br /&gt;
&lt;br /&gt;
Any application framework with a similar mechanism might be at fault – you should investigate your application framework’s support for sending data back to the user. Preferably it should not round trip.&lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
These configurations are set hierarchically in the .NET framework. The machine.config file contains the global configuration; each web directory may contain a web.config file further specifying or overriding configuration; each page may contain @page directives specifying same configuration or overrides; you must check all three locations:&lt;br /&gt;
&lt;br /&gt;
* If the enableViewStateMac is not set to “true”, you are at risk if your viewstate contains authorization state&lt;br /&gt;
&lt;br /&gt;
* If the viewStateEncryptionMode is not set to “always”, you are at risk if your viewstate contains secrets such as credentials&lt;br /&gt;
&lt;br /&gt;
* If you share a host with many other customers, you all share the same machine key by default in ASP.NET 1.1. In ASP.NET 2.0, it is possible to configure unique viewstate keys per application&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
* If your application relies on data returning from the viewstate without being tampered with, you should turn on viewstate integrity checks at the least, and strongly consider:&lt;br /&gt;
&lt;br /&gt;
* Encrypt viewstate if any of the data is application sensitive&lt;br /&gt;
&lt;br /&gt;
* Upgrade to ASP.NET 2.0 as soon as practical if you are on a shared hosting arrangement&lt;br /&gt;
&lt;br /&gt;
* Move truly sensitive viewstate data to the session variable instead&lt;br /&gt;
&lt;br /&gt;
===Selects, radio buttons, and checkboxes ===&lt;br /&gt;
&lt;br /&gt;
It is commonly held belief that the value settings for these items cannot be easily tampered. This is wrong. In the following example, actual account numbers are used, which can lead to compromise:&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;html:radio value=&amp;quot;&amp;lt;%=acct.getCardNumber(1).toString( )%&amp;gt;&amp;quot; property=&amp;quot;acctNo&amp;quot;&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;bean:message key=&amp;quot;msg.card.name&amp;quot; arg0=&amp;quot;&amp;lt;%=acct.getCardName(1).toString( )%&amp;gt;&amp;quot; /&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;html:radio value=&amp;quot;&amp;lt;%=acct.getCardNumber(1).toString( )%&amp;gt;&amp;quot; property=&amp;quot;acctNo&amp;quot;&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;bean:message key=&amp;quot;msg.card.name&amp;quot; arg0=&amp;quot;&amp;lt;%=acct.getCardName(2).toString( )%&amp;gt;&amp;quot; /&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This produces (for example):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;acctNo&amp;quot; value=&amp;quot;455712341234&amp;quot;&amp;gt;Gold Card''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;acctNo&amp;quot; value=&amp;quot;455712341235&amp;quot;&amp;gt;Platinum Card''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the value is retrieved and then used directly in a SQL query, an interesting form of SQL injection may occur: authorization tampering leading to information disclosure. As the connection pool connects to the database using a single user, it may be possible to see other user's accounts if the SQL looks something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''String acctNo = getParameter('acctNo');''&lt;br /&gt;
&lt;br /&gt;
''String sql = &amp;quot;SELECT acctBal FROM accounts WHERE acctNo = '?'&amp;quot;;''&lt;br /&gt;
&lt;br /&gt;
''PreparedStatement st = conn.prepareStatement(sql);''&lt;br /&gt;
&lt;br /&gt;
''st.setString(1, acctNo);''&lt;br /&gt;
&lt;br /&gt;
''ResultSet rs = st.executeQuery();''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This should be re-written to retrieve the account number via index, and include the client's unique ID to ensure that other valid account numbers are exposed:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''String acctNo = acct.getCardNumber(getParameter('acctIndex'));''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''String sql = &amp;quot;SELECT acctBal FROM accounts WHERE acct_id = '?' AND acctNo = '?'&amp;quot;;''&lt;br /&gt;
&lt;br /&gt;
''PreparedStatement st = conn.prepareStatement(sql);''&lt;br /&gt;
&lt;br /&gt;
''st.setString(1, acct.getID());''&lt;br /&gt;
&lt;br /&gt;
''st.setString(2, acctNo);''&lt;br /&gt;
&lt;br /&gt;
''ResultSet rs = st.executeQuery();''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This approach requires rendering input values from 1 to ... x, and assuming accounts are stored in a Collection which can be iterated using logic:iterate:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;logic:iterate id=&amp;quot;loopVar&amp;quot; name=&amp;quot;MyForm&amp;quot; property=&amp;quot;values&amp;quot;&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''  &amp;lt;html:radio property=&amp;quot;acctIndex&amp;quot; idName=&amp;quot;loopVar&amp;quot; value=&amp;quot;value&amp;quot;/&amp;gt;&amp;amp;nbsp;''&lt;br /&gt;
&lt;br /&gt;
''  &amp;lt;bean:write name=&amp;quot;loopVar&amp;quot; property=&amp;quot;name&amp;quot;/&amp;gt;&amp;lt;br /&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;/logic:iterate&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code will emit HTML with the values &amp;quot;1&amp;quot; .. &amp;quot;x&amp;quot; as per the collection's content. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;acctIndex&amp;quot; value=&amp;quot;1&amp;quot; /&amp;gt;Gold Credit Card''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;acctIndex&amp;quot; value=&amp;quot;2&amp;quot; /&amp;gt;Platinum Credit Card''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This approach should be used for any input type that allows a value to be set: radio buttons, checkboxes, and particularly select / option lists.&lt;br /&gt;
&lt;br /&gt;
===Per-User Data ===&lt;br /&gt;
&lt;br /&gt;
In fully normalized databases, the aim is to minimize the amount of repeated data. However, some data is inferred. For example, users can see messages that are stored in a messages table. Some messages are private to the user. However, in a fully normalized database, the list of message IDs are kept within another table:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If a user marks a message for deletion, the usual way is to recover the message ID from the user, and delete that:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''DELETE FROM message WHERE msgid='frmMsgId'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
However, how do you know if the user is eligible to delete that message ID? Such tables need to be denormalized slightly to include a user ID or make it easy to perform a single query to delete the message safely. For example, by adding back an (optional) uid column, the delete is now made reasonably safe:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''DELETE FROM message WHERE uid='session.myUserID' and msgid='frmMsgId';''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where the data is potentially both a private resource and a public resource (for example, in the secure message service, broadcast messages are just a special type of private message), additional precautions need to be taken to prevent users from deleting public resources without authorization. This can be done using role based checks, as well as using SQL statements to discriminate by message type:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''DELETE FROM message ''&lt;br /&gt;
&lt;br /&gt;
''WHERE''&lt;br /&gt;
&lt;br /&gt;
''uid='session.myUserID' AND''&lt;br /&gt;
&lt;br /&gt;
''msgid='frmMsgId' AND''&lt;br /&gt;
&lt;br /&gt;
''broadcastFlag = false;''&lt;br /&gt;
&lt;br /&gt;
==URL encoding ==&lt;br /&gt;
&lt;br /&gt;
Data sent via the URL, which is strongly discouraged, should be URL encoded and decoded. This reduces the likelihood of cross-site scripting attacks from working.&lt;br /&gt;
&lt;br /&gt;
In general, do not send data via GET request unless for navigational purposes.&lt;br /&gt;
&lt;br /&gt;
==HTML encoding ==&lt;br /&gt;
&lt;br /&gt;
Data sent to the user needs to be safe for the user to view. This can be done using &amp;lt;bean:write ...&amp;gt; and friends. Do not use &amp;lt;%=var%&amp;gt; unless it is used to supply an argument for &amp;lt;bean:write...&amp;gt; or similar. &lt;br /&gt;
&lt;br /&gt;
HTML encoding translates a range of characters into their HTML entities. For example, &amp;gt; becomes &amp;amp;amp;gt; This will still display as &amp;gt; on the user's browser, but it is a safe alternative.&lt;br /&gt;
&lt;br /&gt;
==Encoded strings ==&lt;br /&gt;
&lt;br /&gt;
Some strings may be received in encoded form. It is essential to send the correct locale to the user so that the web server and application server can provide a single level of canoncalization prior to the first use. &lt;br /&gt;
&lt;br /&gt;
Do not use getReader() or getInputStream() as these input methods do not decode encoded strings. If you need to use these constructs, you must decanoncalize data by hand. &lt;br /&gt;
&lt;br /&gt;
==Data Validation and Interpreter Injection ==&lt;br /&gt;
&lt;br /&gt;
This section focuses on preventing injection in ColdFusion. Interpreter Injection involves manipulating application parameters to execute malicious code on the system. The most prevalent of these is SQL injection but it also includes other injection techniques, including LDAP, ORM, User Agent, XML, etc. – see the Interpreter Injection chapter of this document for greater details. As a developer you should assume that all input is malicious. Before processing any input coming from a user, data source, component, or data service it should be validated for type, length, and/or range. ColdFusion includes support for Regular Expressions and CFML tags that can be used to validate input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SQL Injection'''&lt;br /&gt;
&lt;br /&gt;
SQL Injection involves sending extraneous SQL queries as variables. ColdFusion provides the &amp;lt;cfqueryparam&amp;gt; and &amp;lt;cfprocparam&amp;gt; tags for validating database parameters. These tags nests inside &amp;lt;cfquery&amp;gt; and &amp;lt;cfstoredproc&amp;gt;, respectively. For dynamic SQL submitted in &amp;lt;cfquery&amp;gt;, use the CFSQLTYPE attribute of the &amp;lt;cfqueryparam&amp;gt; to validate variables against the expected database datatype. Similarly, use the CFSQLTYPE attribute of &amp;lt;cfprocparam&amp;gt; to validate the datatypes of stored procedure parameters passed through &amp;lt;cfstoredproc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also strengthen your systems against SQL Injection by disabling the Allowed SQL operations for individual data sources. See the '''Configuration''' section below for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''LDAP Injection'''&lt;br /&gt;
&lt;br /&gt;
ColdFusion uses the &amp;lt;cfldap&amp;gt; tag to communicate with LDAP servers. This tag has an ACTION attribute which dictates the query performed against the LDAP. The valid values for this attribute are: add, delete, query (default), modify, and modifyDN. &amp;lt;cfldap&amp;gt; calls are turned into JNDI (Java Naming And Directory Interface) lookups. However, because &amp;lt;cfldap&amp;gt; wraps the calls, it will throw syntax errors if native JNDI code is passed to its attributes making LDAP injection more difficult.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''XML Injection'''&lt;br /&gt;
&lt;br /&gt;
Two parsers exist for XML data – SAX and DOM. ColdFusion uses DOM which reads the entire XML document into the server’s memory. This requires the administrator to restrict the size of the JVM containing ColdFusion.  ColdFusion is built on Java therefore by default, entity references are expanded during parsing. To prevent unbounded entity expansion, before a string is converted to an XML DOM, filter out DOCTYPES elements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the DOM has been read, to reduce the risk of XML, Injection use the ColdFusion XML decision functions: isXML(), isXmlAttribute(), isXmlElement(), isXmlNode(), and isXmlRoot(). The isXML() function determines if a string is well-formed XML. The other functions determine whether or not the passed parameter is a valid part of an XML document. Use the xmlValidate() function to validate external XML documents against a Document Type Definition (DTD) or XML Schema.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Gateway, IM, and SMS Injection'''&lt;br /&gt;
&lt;br /&gt;
ColdFusion MX 7 enables Event Gateways, instant messaging (IM), and SMS (short message service) for interacting with external systems. Event Gateways are ColdFusion components that respond asynchronously to non-HTTP requests – e.g. instant messages, SMS text from wireless devices, etc. ColdFusion provides Lotus Sametime and XMPP (Extensible Messaging and Presence Protocol) gateways for instant messaging. It also provides an event gateway for interacting with SMS text messages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Injection along these gateways can happen when end users (and/or systems) send malicious code to execute on the server. These gateways all utilize ColdFusion Components (CFCs) for processing. Use standard ColdFusion functions, tags, and validation techniques to protect against malicious code injection. Sanitize all input strings and do not allow un-validated code to access backend systems.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Best Practices'''&lt;br /&gt;
&lt;br /&gt;
Use the XML functions to validate XML input.&lt;br /&gt;
&lt;br /&gt;
Before performing XPath searches and transformations in ColdFusion, validate the source before executing.&lt;br /&gt;
&lt;br /&gt;
Use ColdFusion validation techniques to sanitize strings passed to xmlSearch for performing XPath queries. &lt;br /&gt;
&lt;br /&gt;
When performing XML transformations only use a trusted source for the XSL stylesheet.&lt;br /&gt;
&lt;br /&gt;
Ensure that the memory size of the Java Sandbox containing ColdFusion can handle large XML documents without adversely affecting server resources.&lt;br /&gt;
&lt;br /&gt;
Set the memory value to less than the amount of RAM on the server (-Xmx)&lt;br /&gt;
&lt;br /&gt;
Remove DOCTYPE elements from the XML string before converting it to an XML object.&lt;br /&gt;
&lt;br /&gt;
Using scriptProtect can be used to thwart most attempts of cross-site scripting. Set scriptProtect to All in the Application.cfc&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;cfparam&amp;gt; or &amp;lt;cfargument&amp;gt; to instantiate variables in ColdFusion. Use this tag with the name and type attributes. If the value is not of the specified type, ColdFusion returns an error.&lt;br /&gt;
&lt;br /&gt;
To handle untyped variables use IsValid() to validate its value against any legal object type that ColdFusion supports.&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;cfqueryparam&amp;gt; and &amp;lt;cfprocparam&amp;gt; to valid dynamic SQL variables against database datatypes&lt;br /&gt;
&lt;br /&gt;
Use CFLDAP for accessing LDAP servers. Avoid allowing native JNDI calls to connect to LDAP&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Best Practice in Action'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sample code below shows a database authentication function using some of the input validation techniques discussed in this section.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
&lt;br /&gt;
 || &lt;br /&gt;
* &amp;lt;cffunction name=&amp;quot;dblogin&amp;quot; access=&amp;quot;private&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;struct&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfargument name=&amp;quot;strUserName&amp;quot; required=&amp;quot;true&amp;quot; type=&amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfargument name=&amp;quot;strPassword&amp;quot; required=&amp;quot;true&amp;quot; type=&amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfset var retargs = StructNew()&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfif IsValid(&amp;quot;regex&amp;quot;, uUserName, &amp;quot;[A-Za-z0-9%]*&amp;quot;) AND IsValid(&amp;quot;regex&amp;quot;, uPassword, &amp;quot;[A-Za-z0-9%]*&amp;quot;)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;cfquery name=&amp;quot;loginQuery&amp;quot; dataSource=&amp;quot;#Application.DB#&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     SELECT hashed_password, salt&lt;br /&gt;
&lt;br /&gt;
*     FROM UserTable&lt;br /&gt;
&lt;br /&gt;
*     WHERE UserName =&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;cfqueryparam value=&amp;quot;#strUserName#&amp;quot; cfsqltype=&amp;quot;CF_SQL_VARCHAR&amp;quot; maxlength=&amp;quot;25&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;/cfquery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;cfif loginQuery.hashed_password EQ Hash(strPassword &amp;amp; loginQuery.salt, &amp;quot;SHA-256&amp;quot; )&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*       &amp;lt;cfset retargs.authenticated=&amp;quot;YES&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*       &amp;lt;cfset Session.UserName = strUserName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*       &amp;lt;!-- Add code to get roles from database --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*       &amp;lt;cfelse&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*       &amp;lt;cfset retargs.authenticated=&amp;quot;NO&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfelse&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;cfset retargs.authenticated=&amp;quot;NO&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfreturn retargs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Delimiter and special characters ==&lt;br /&gt;
&lt;br /&gt;
There are many characters that mean something special to various programs. If you followed the advice only to accept characters that are considered good, it is very likely that only a few delimiters will catch you out. &lt;br /&gt;
&lt;br /&gt;
Here are the usual suspects:&lt;br /&gt;
&lt;br /&gt;
* NULL (zero) %00&lt;br /&gt;
&lt;br /&gt;
* LF - ANSI chr(10) &amp;quot;\r&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* CR - ANSI chr(13) &amp;quot;\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* CRLF - &amp;quot;\n\r&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* CR - EBCDIC 0x0f &lt;br /&gt;
&lt;br /&gt;
* Quotes &amp;quot; '&lt;br /&gt;
&lt;br /&gt;
* Commas, slashes spaces and tabs and other white space - used in CSV, tab delimited output, and other specialist formats&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;&amp;gt; - XML and HTML tag markers, redirection characters&lt;br /&gt;
&lt;br /&gt;
* ; &amp;amp; - Unix and NT file system continuance&lt;br /&gt;
&lt;br /&gt;
* @ - used for e-mail addresses&lt;br /&gt;
&lt;br /&gt;
* 0xff&lt;br /&gt;
&lt;br /&gt;
* ... more&lt;br /&gt;
&lt;br /&gt;
Whenever you code to a particular technology, you should determine which characters are &amp;quot;special&amp;quot; and prevent them appearing in input, or properly escaping them.&lt;br /&gt;
&lt;br /&gt;
==Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* ASP.NET 2.0 Viewstate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://channel9.msdn.com/wiki/default.aspx/Channel9.HowToConfigureTheMachineKeyInASPNET2&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Guide Table of Contents]]&lt;br /&gt;
[[Category:OWASP_Guide_Project]]&lt;br /&gt;
[[Category:Validation]]&lt;br /&gt;
[[Category:Encoding]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Data_Validation&amp;diff=18768</id>
		<title>Data Validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Data_Validation&amp;diff=18768"/>
				<updated>2007-05-22T15:09:24Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Reformatted code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guide Table of Contents]]__TOC__&lt;br /&gt;
&lt;br /&gt;
==Objective ==&lt;br /&gt;
&lt;br /&gt;
To ensure that the application is robust against all forms of input data, whether obtained from the user, infrastructure, external entities or database systems&lt;br /&gt;
&lt;br /&gt;
==Platforms Affected ==&lt;br /&gt;
&lt;br /&gt;
All. &lt;br /&gt;
&lt;br /&gt;
==Relevant COBIT Topics ==&lt;br /&gt;
&lt;br /&gt;
DS11 – Manage Data. All sections should be reviewed&lt;br /&gt;
&lt;br /&gt;
==Description ==&lt;br /&gt;
&lt;br /&gt;
The most common web application security weakness is the failure to properly validate input from the client or environment. This weakness leads to almost all of the major vulnerabilities in applications, such as interpreter injection, locale/Unicode attacks, file system attacks and buffer overflows. Data from the client should never be trusted for the client has every possibility to tamper with the data.&lt;br /&gt;
&lt;br /&gt;
In many cases, [[Encoding]] has the potential to defuse attacks that rely on lack of input validation. For example, if you use HTML entity encoding on user input before it is sent to a browser, it will prevent most [[XSS]] attacks. However, simply preventing attacks is not enough - you must perform [[Intrusion Detection]] in your applications. Otherwise, you are allowing attackers to repeatedly attack your application until they find a vulnerability that you haven't protected against. Detecting attempts to find these weaknesses is a critical protection mechanism.&lt;br /&gt;
&lt;br /&gt;
==Definitions ==&lt;br /&gt;
&lt;br /&gt;
These definitions are used within this document:&lt;br /&gt;
&lt;br /&gt;
* '''Integrity checks'''&lt;br /&gt;
&lt;br /&gt;
Ensure that the data has not been tampered with and is the same as before&lt;br /&gt;
&lt;br /&gt;
* '''Validation'''&lt;br /&gt;
&lt;br /&gt;
Ensure that the data is strongly typed, correct syntax, within length boundaries, contains only permitted characters, or that numbers are correctly signed and within range boundaries &lt;br /&gt;
&lt;br /&gt;
* '''Business rules'''&lt;br /&gt;
&lt;br /&gt;
Ensure that data is not only validated, but business rule correct. For example, interest rates fall within permitted boundaries.&lt;br /&gt;
&lt;br /&gt;
Some documentation and references interchangeably use the various meanings, which is very confusing to all concerned. This confusion directly causes continuing financial loss to the organization. &lt;br /&gt;
&lt;br /&gt;
==Where to include integrity checks ==&lt;br /&gt;
&lt;br /&gt;
Integrity checks must be included wherever data passes from a trusted to a less trusted boundary, such as from the application to the user's browser in a hidden field, or to a third party payment gateway, such as a transaction ID used internally upon return. &lt;br /&gt;
&lt;br /&gt;
The type of integrity control (checksum, HMAC, encryption, digital signature) should be directly related to the risk of the data transiting the trust boundary. &lt;br /&gt;
&lt;br /&gt;
==Where to include validation ==&lt;br /&gt;
&lt;br /&gt;
Validation must be performed on every tier. However, validation should be performed as per the function of the server executing the code. For example, the web / presentation tier should validate for web related issues, persistence layers should validate for persistence issues such as SQL / HQL injection, directory lookups should check for LDAP injection, and so on.&lt;br /&gt;
&lt;br /&gt;
==Where to include business rule validation ==&lt;br /&gt;
&lt;br /&gt;
Business rules are known during design, and they influence implementation. However, there are bad, good and &amp;quot;best&amp;quot; approaches. Often the best approach is the simplest in terms of code. &lt;br /&gt;
&lt;br /&gt;
===Example - Scenario ===&lt;br /&gt;
&lt;br /&gt;
* You are to populate a list with accounts provided by the back-end system&lt;br /&gt;
* The user will choose an account, choose a biller, and press next&lt;br /&gt;
&lt;br /&gt;
===Wrong way===&lt;br /&gt;
&lt;br /&gt;
The account select option is read directly and provided in a message back to the backend system without validating the account number is one of the accounts provided by the backend system. &lt;br /&gt;
&lt;br /&gt;
===Why this is bad===&lt;br /&gt;
&lt;br /&gt;
An attacker can change the HTML in any way they choose:&lt;br /&gt;
&lt;br /&gt;
* The lack of validation requires a round-trip to the backend to provide an error message that the front end code could easily have eliminated&lt;br /&gt;
&lt;br /&gt;
* The back end may not be able to cope with the data payload the front-end code could have easily eliminated. For example, buffer overflows, XML injection, or similar. &lt;br /&gt;
&lt;br /&gt;
===Acceptable Method ===&lt;br /&gt;
&lt;br /&gt;
The account select option parameter is read by the code, and compared to the previously rendered list. &lt;br /&gt;
&lt;br /&gt;
''if ( account.inList(session.getParameter('payeelstid') ) {''&lt;br /&gt;
''backend.performTransfer(session.getParameter('payeelstid'));''&lt;br /&gt;
''}''&lt;br /&gt;
&lt;br /&gt;
This prevents parameter tampering, but still makes the browser do a lot of work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Best Method ===&lt;br /&gt;
&lt;br /&gt;
The original code emitted indexes &amp;lt;option value=&amp;quot;1&amp;quot; ... &amp;gt; rather than account names.&lt;br /&gt;
&lt;br /&gt;
''int payeeLstId = session.getParameter('payeelstid');''&lt;br /&gt;
''accountFrom = account.getAcctNumberByIndex(payeeLstId);''&lt;br /&gt;
&lt;br /&gt;
Not only is this easier to render in HTML, it makes validation and business rule validation trivial. The field cannot be tampered with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion ===&lt;br /&gt;
&lt;br /&gt;
To provide defense in depth and to prevent attack payloads from trust boundaries, such as backend hosts, which are probably incapable of handling arbitrary input data, business rule validation is to be performed (preferably in workflow or command patterns), even if it is known that the back end code performs business rule validation.&lt;br /&gt;
&lt;br /&gt;
This is not to say that the entire set of business rules need be applied - it means that the fundamentals are performed to prevent unnecessary round trips to the backend and to prevent the backend from receiving most tampered data.&lt;br /&gt;
&lt;br /&gt;
==Data Validation Strategies ==&lt;br /&gt;
&lt;br /&gt;
There are four strategies for validating data, and they should be used in this order:&lt;br /&gt;
&lt;br /&gt;
===Accept known good===&lt;br /&gt;
&lt;br /&gt;
This strategy is also known as &amp;quot;whitelist&amp;quot; or &amp;quot;positive&amp;quot; validation. The idea is that you should check that the data is one of a set of tightly constrained known good values. Any data that doesn't match should be rejected.  Data should be:&lt;br /&gt;
&lt;br /&gt;
* Strongly typed at all times&lt;br /&gt;
* Length checked and fields length minimized&lt;br /&gt;
* Range checked if a numeric&lt;br /&gt;
* Unsigned unless required to be signed&lt;br /&gt;
* Syntax or grammar should be checked prior to first use or inspection&lt;br /&gt;
&lt;br /&gt;
If you expect a postcode, validate for a postcode (type, length and syntax):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public String isPostcode(String postcode) {&lt;br /&gt;
    return (postcode != null &amp;amp;&amp;amp; Pattern.matches(&amp;quot;^(((2|8|9)\d{2})|((02|08|09)\d{2})|([1-9]\d{3}))$&amp;quot;, postcode)) ? postcode : &amp;quot;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Coding guidelines should use some form of visible tainting on input from the client or untrusted sources, such as third party connectors to make it obvious that the input is unsafe:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
String taintPostcode = request.getParameter(&amp;quot;postcode&amp;quot;);&lt;br /&gt;
ValidationEngine validator = new ValidationEngine();&lt;br /&gt;
boolean isValidPostcode = validator.isPostcode(taintPostcode);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reject known bad===&lt;br /&gt;
&lt;br /&gt;
This strategy, also known as &amp;quot;negative&amp;quot; or &amp;quot;blacklist&amp;quot; validation is a weak alternative to positive validation. Essentially, if you don't expect to see characters such as %3f or JavaScript or similar, reject strings containing them. This is a dangerous strategy, because the set of possible bad data is potentially infinite. Adopting this strategy means that you will have to maintain the list of &amp;quot;known bad&amp;quot; characters and patterns forever, and you will by definition have incomplete protection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''public String removeJavascript(String input) {''&lt;br /&gt;
&lt;br /&gt;
''	Pattern p = Pattern.compile(&amp;quot;javascript&amp;quot;, CASE_INSENSITIVE);''&lt;br /&gt;
&lt;br /&gt;
''	p.matcher(input);''&lt;br /&gt;
&lt;br /&gt;
''	return (!p.matches()) ? input : '';''&lt;br /&gt;
&lt;br /&gt;
''}''&lt;br /&gt;
&lt;br /&gt;
It can take upwards of 90 regular expressions (see the CSS Cheat Sheet in the Guide 2.0) to eliminate known malicious software, and each regex needs to be run over every field. Obviously, this is slow and not secure. Just rejecting &amp;quot;current known bad&amp;quot; (which is at the time of writing hundreds of strings and literally millions of combinations) is insufficient if the input is a string. This strategy is directly akin to anti-virus pattern updates. Unless the business will allow updating &amp;quot;bad&amp;quot; regexes on a daily basis and support someone to research new attacks regularly, this approach will be obviated before long.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sanitize===&lt;br /&gt;
&lt;br /&gt;
Eliminate or translate characters (such as to HTML entities or to remove quotes) in an effort to make the input &amp;quot;safe&amp;quot;. &lt;br /&gt;
Like blacklists, this approach requires maintenance and is usually incomplete. As most fields have a particular grammar, it is simpler, faster, and more secure to simply validate a single correct positive test than to try to include complex and slow sanitization routines for all current and future attacks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public String quoteApostrophe(String input) {&lt;br /&gt;
    if (input != null)&lt;br /&gt;
        return input.replaceAll(&amp;quot;[\']&amp;quot;, &amp;quot;&amp;amp;amp;rsquo;&amp;quot;);&lt;br /&gt;
    else&lt;br /&gt;
        return null;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===No validation===&lt;br /&gt;
&lt;br /&gt;
This is inherently unsafe and strongly discouraged. The business must sign off each and every example of no validation as the lack of validation usually leads to direct obviation of application, host and network security controls.&lt;br /&gt;
&lt;br /&gt;
''account.setAcctId(getParameter('formAcctNo'));''&lt;br /&gt;
''...''&lt;br /&gt;
&lt;br /&gt;
''public setAcctId(String acctId) {''&lt;br /&gt;
''	cAcctId = acctId;''&lt;br /&gt;
''}''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Prevent parameter tampering ==&lt;br /&gt;
&lt;br /&gt;
There are many input sources:&lt;br /&gt;
&lt;br /&gt;
* HTTP headers, such as REMOTE_ADDR, PROXY_VIA or similar&lt;br /&gt;
&lt;br /&gt;
* Environment variables, such as getenv() or via server properties &lt;br /&gt;
&lt;br /&gt;
* All GET, POST and Cookie data&lt;br /&gt;
&lt;br /&gt;
This includes supposedly tamper resistant fields such as radio buttons, drop downs, etc - any client side HTML can be re-written to suit the attacker&lt;br /&gt;
&lt;br /&gt;
Configuration data (mistakes happen :))&lt;br /&gt;
&lt;br /&gt;
External systems (via any form of input mechanism, such as XML input, RMI, web services, etc)&lt;br /&gt;
&lt;br /&gt;
All of these data sources supply untrusted input. Data received from untrusted data sources must be properly checked before first use.&lt;br /&gt;
&lt;br /&gt;
==Hidden fields ==&lt;br /&gt;
&lt;br /&gt;
Hidden fields are a simple way to avoid storing state on the server. Their use is particularly prevalent in &amp;quot;wizard-style&amp;quot; multi-page forms. However, their use exposes the inner workings of your application, and exposes data to trivial tampering, replay, and validation attacks. In general, only use hidden fields for page sequence.&lt;br /&gt;
&lt;br /&gt;
If you have to use hidden fields, there are some rules:&lt;br /&gt;
&lt;br /&gt;
* Secrets, such as passwords, should never be sent in the clear&lt;br /&gt;
&lt;br /&gt;
* Hidden fields need to have integrity checks and preferably encrypted using non-constant initialization vectors (i.e. different users at different times have different yet cryptographically strong random IVs)&lt;br /&gt;
&lt;br /&gt;
* Encrypted hidden fields must be robust against replay attacks, which means some form of temporal keying&lt;br /&gt;
&lt;br /&gt;
* Data sent to the user must be validated on the server once the last page has been received, even if it has been previously validated on the server - this helps reduce the risk from replay attacks.&lt;br /&gt;
&lt;br /&gt;
The preferred integrity control should be at least a HMAC using SHA-256 or preferably digitally signed or encrypted using PGP. IBMJCE supports SHA-256, but PGP JCE support require the inclusion of the Legion of the Bouncy Castle (http://www.bouncycastle.org/) JCE classes.&lt;br /&gt;
&lt;br /&gt;
It is simpler to store this data temporarily in the session object. Using the session object is the safest option as data is never visible to the user, requires (far) less code, nearly no CPU, disk or I/O utilization, less memory (particularly on large multi-page forms), and less network consumption. &lt;br /&gt;
&lt;br /&gt;
In the case of the session object being backed by a database, large session objects may become too large for the inbuilt handler. In this case, the recommended strategy is to store the validated data in the database, but mark the transaction as &amp;quot;incomplete&amp;quot;. Each page will update the incomplete transaction until it is ready for submission. This minimizes the database load, session size, and activity between the users whilst remaining tamperproof. &lt;br /&gt;
&lt;br /&gt;
Code containing hidden fields should be rejected during code reviews.&lt;br /&gt;
&lt;br /&gt;
==ASP.NET Viewstate ==&lt;br /&gt;
&lt;br /&gt;
ASP.NET sends form data back to the client in a hidden “Viewstate” field. Despite looking forbidding, this “encryption” is simply plain-text equivalent (base64 encoding) and has no data integrity without further action on your behalf in ASP.NET 1.0. In ASP.NET 1.1 and 2.0, tamper proofing, called &amp;quot;enableViewStateMAC&amp;quot; is on by default using a SHA/1 hash.&lt;br /&gt;
&lt;br /&gt;
Any application framework with a similar mechanism might be at fault – you should investigate your application framework’s support for sending data back to the user. Preferably it should not round trip.&lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
These configurations are set hierarchically in the .NET framework. The machine.config file contains the global configuration; each web directory may contain a web.config file further specifying or overriding configuration; each page may contain @page directives specifying same configuration or overrides; you must check all three locations:&lt;br /&gt;
&lt;br /&gt;
* If the enableViewStateMac is not set to “true”, you are at risk if your viewstate contains authorization state&lt;br /&gt;
&lt;br /&gt;
* If the viewStateEncryptionMode is not set to “always”, you are at risk if your viewstate contains secrets such as credentials&lt;br /&gt;
&lt;br /&gt;
* If you share a host with many other customers, you all share the same machine key by default in ASP.NET 1.1. In ASP.NET 2.0, it is possible to configure unique viewstate keys per application&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
* If your application relies on data returning from the viewstate without being tampered with, you should turn on viewstate integrity checks at the least, and strongly consider:&lt;br /&gt;
&lt;br /&gt;
* Encrypt viewstate if any of the data is application sensitive&lt;br /&gt;
&lt;br /&gt;
* Upgrade to ASP.NET 2.0 as soon as practical if you are on a shared hosting arrangement&lt;br /&gt;
&lt;br /&gt;
* Move truly sensitive viewstate data to the session variable instead&lt;br /&gt;
&lt;br /&gt;
===Selects, radio buttons, and checkboxes ===&lt;br /&gt;
&lt;br /&gt;
It is commonly held belief that the value settings for these items cannot be easily tampered. This is wrong. In the following example, actual account numbers are used, which can lead to compromise:&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;html:radio value=&amp;quot;&amp;lt;%=acct.getCardNumber(1).toString( )%&amp;gt;&amp;quot; property=&amp;quot;acctNo&amp;quot;&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;bean:message key=&amp;quot;msg.card.name&amp;quot; arg0=&amp;quot;&amp;lt;%=acct.getCardName(1).toString( )%&amp;gt;&amp;quot; /&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;html:radio value=&amp;quot;&amp;lt;%=acct.getCardNumber(1).toString( )%&amp;gt;&amp;quot; property=&amp;quot;acctNo&amp;quot;&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;bean:message key=&amp;quot;msg.card.name&amp;quot; arg0=&amp;quot;&amp;lt;%=acct.getCardName(2).toString( )%&amp;gt;&amp;quot; /&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This produces (for example):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;acctNo&amp;quot; value=&amp;quot;455712341234&amp;quot;&amp;gt;Gold Card''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;acctNo&amp;quot; value=&amp;quot;455712341235&amp;quot;&amp;gt;Platinum Card''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the value is retrieved and then used directly in a SQL query, an interesting form of SQL injection may occur: authorization tampering leading to information disclosure. As the connection pool connects to the database using a single user, it may be possible to see other user's accounts if the SQL looks something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''String acctNo = getParameter('acctNo');''&lt;br /&gt;
&lt;br /&gt;
''String sql = &amp;quot;SELECT acctBal FROM accounts WHERE acctNo = '?'&amp;quot;;''&lt;br /&gt;
&lt;br /&gt;
''PreparedStatement st = conn.prepareStatement(sql);''&lt;br /&gt;
&lt;br /&gt;
''st.setString(1, acctNo);''&lt;br /&gt;
&lt;br /&gt;
''ResultSet rs = st.executeQuery();''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This should be re-written to retrieve the account number via index, and include the client's unique ID to ensure that other valid account numbers are exposed:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''String acctNo = acct.getCardNumber(getParameter('acctIndex'));''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''String sql = &amp;quot;SELECT acctBal FROM accounts WHERE acct_id = '?' AND acctNo = '?'&amp;quot;;''&lt;br /&gt;
&lt;br /&gt;
''PreparedStatement st = conn.prepareStatement(sql);''&lt;br /&gt;
&lt;br /&gt;
''st.setString(1, acct.getID());''&lt;br /&gt;
&lt;br /&gt;
''st.setString(2, acctNo);''&lt;br /&gt;
&lt;br /&gt;
''ResultSet rs = st.executeQuery();''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This approach requires rendering input values from 1 to ... x, and assuming accounts are stored in a Collection which can be iterated using logic:iterate:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;logic:iterate id=&amp;quot;loopVar&amp;quot; name=&amp;quot;MyForm&amp;quot; property=&amp;quot;values&amp;quot;&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''  &amp;lt;html:radio property=&amp;quot;acctIndex&amp;quot; idName=&amp;quot;loopVar&amp;quot; value=&amp;quot;value&amp;quot;/&amp;gt;&amp;amp;nbsp;''&lt;br /&gt;
&lt;br /&gt;
''  &amp;lt;bean:write name=&amp;quot;loopVar&amp;quot; property=&amp;quot;name&amp;quot;/&amp;gt;&amp;lt;br /&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;/logic:iterate&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code will emit HTML with the values &amp;quot;1&amp;quot; .. &amp;quot;x&amp;quot; as per the collection's content. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;acctIndex&amp;quot; value=&amp;quot;1&amp;quot; /&amp;gt;Gold Credit Card''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;acctIndex&amp;quot; value=&amp;quot;2&amp;quot; /&amp;gt;Platinum Credit Card''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This approach should be used for any input type that allows a value to be set: radio buttons, checkboxes, and particularly select / option lists.&lt;br /&gt;
&lt;br /&gt;
===Per-User Data ===&lt;br /&gt;
&lt;br /&gt;
In fully normalized databases, the aim is to minimize the amount of repeated data. However, some data is inferred. For example, users can see messages that are stored in a messages table. Some messages are private to the user. However, in a fully normalized database, the list of message IDs are kept within another table:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If a user marks a message for deletion, the usual way is to recover the message ID from the user, and delete that:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''DELETE FROM message WHERE msgid='frmMsgId'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
However, how do you know if the user is eligible to delete that message ID? Such tables need to be denormalized slightly to include a user ID or make it easy to perform a single query to delete the message safely. For example, by adding back an (optional) uid column, the delete is now made reasonably safe:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''DELETE FROM message WHERE uid='session.myUserID' and msgid='frmMsgId';''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where the data is potentially both a private resource and a public resource (for example, in the secure message service, broadcast messages are just a special type of private message), additional precautions need to be taken to prevent users from deleting public resources without authorization. This can be done using role based checks, as well as using SQL statements to discriminate by message type:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''DELETE FROM message ''&lt;br /&gt;
&lt;br /&gt;
''WHERE''&lt;br /&gt;
&lt;br /&gt;
''uid='session.myUserID' AND''&lt;br /&gt;
&lt;br /&gt;
''msgid='frmMsgId' AND''&lt;br /&gt;
&lt;br /&gt;
''broadcastFlag = false;''&lt;br /&gt;
&lt;br /&gt;
==URL encoding ==&lt;br /&gt;
&lt;br /&gt;
Data sent via the URL, which is strongly discouraged, should be URL encoded and decoded. This reduces the likelihood of cross-site scripting attacks from working.&lt;br /&gt;
&lt;br /&gt;
In general, do not send data via GET request unless for navigational purposes.&lt;br /&gt;
&lt;br /&gt;
==HTML encoding ==&lt;br /&gt;
&lt;br /&gt;
Data sent to the user needs to be safe for the user to view. This can be done using &amp;lt;bean:write ...&amp;gt; and friends. Do not use &amp;lt;%=var%&amp;gt; unless it is used to supply an argument for &amp;lt;bean:write...&amp;gt; or similar. &lt;br /&gt;
&lt;br /&gt;
HTML encoding translates a range of characters into their HTML entities. For example, &amp;gt; becomes &amp;amp;amp;gt; This will still display as &amp;gt; on the user's browser, but it is a safe alternative.&lt;br /&gt;
&lt;br /&gt;
==Encoded strings ==&lt;br /&gt;
&lt;br /&gt;
Some strings may be received in encoded form. It is essential to send the correct locale to the user so that the web server and application server can provide a single level of canoncalization prior to the first use. &lt;br /&gt;
&lt;br /&gt;
Do not use getReader() or getInputStream() as these input methods do not decode encoded strings. If you need to use these constructs, you must decanoncalize data by hand. &lt;br /&gt;
&lt;br /&gt;
==Data Validation and Interpreter Injection ==&lt;br /&gt;
&lt;br /&gt;
This section focuses on preventing injection in ColdFusion. Interpreter Injection involves manipulating application parameters to execute malicious code on the system. The most prevalent of these is SQL injection but it also includes other injection techniques, including LDAP, ORM, User Agent, XML, etc. – see the Interpreter Injection chapter of this document for greater details. As a developer you should assume that all input is malicious. Before processing any input coming from a user, data source, component, or data service it should be validated for type, length, and/or range. ColdFusion includes support for Regular Expressions and CFML tags that can be used to validate input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SQL Injection'''&lt;br /&gt;
&lt;br /&gt;
SQL Injection involves sending extraneous SQL queries as variables. ColdFusion provides the &amp;lt;cfqueryparam&amp;gt; and &amp;lt;cfprocparam&amp;gt; tags for validating database parameters. These tags nests inside &amp;lt;cfquery&amp;gt; and &amp;lt;cfstoredproc&amp;gt;, respectively. For dynamic SQL submitted in &amp;lt;cfquery&amp;gt;, use the CFSQLTYPE attribute of the &amp;lt;cfqueryparam&amp;gt; to validate variables against the expected database datatype. Similarly, use the CFSQLTYPE attribute of &amp;lt;cfprocparam&amp;gt; to validate the datatypes of stored procedure parameters passed through &amp;lt;cfstoredproc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also strengthen your systems against SQL Injection by disabling the Allowed SQL operations for individual data sources. See the '''Configuration''' section below for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''LDAP Injection'''&lt;br /&gt;
&lt;br /&gt;
ColdFusion uses the &amp;lt;cfldap&amp;gt; tag to communicate with LDAP servers. This tag has an ACTION attribute which dictates the query performed against the LDAP. The valid values for this attribute are: add, delete, query (default), modify, and modifyDN. &amp;lt;cfldap&amp;gt; calls are turned into JNDI (Java Naming And Directory Interface) lookups. However, because &amp;lt;cfldap&amp;gt; wraps the calls, it will throw syntax errors if native JNDI code is passed to its attributes making LDAP injection more difficult.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''XML Injection'''&lt;br /&gt;
&lt;br /&gt;
Two parsers exist for XML data – SAX and DOM. ColdFusion uses DOM which reads the entire XML document into the server’s memory. This requires the administrator to restrict the size of the JVM containing ColdFusion.  ColdFusion is built on Java therefore by default, entity references are expanded during parsing. To prevent unbounded entity expansion, before a string is converted to an XML DOM, filter out DOCTYPES elements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the DOM has been read, to reduce the risk of XML, Injection use the ColdFusion XML decision functions: isXML(), isXmlAttribute(), isXmlElement(), isXmlNode(), and isXmlRoot(). The isXML() function determines if a string is well-formed XML. The other functions determine whether or not the passed parameter is a valid part of an XML document. Use the xmlValidate() function to validate external XML documents against a Document Type Definition (DTD) or XML Schema.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Gateway, IM, and SMS Injection'''&lt;br /&gt;
&lt;br /&gt;
ColdFusion MX 7 enables Event Gateways, instant messaging (IM), and SMS (short message service) for interacting with external systems. Event Gateways are ColdFusion components that respond asynchronously to non-HTTP requests – e.g. instant messages, SMS text from wireless devices, etc. ColdFusion provides Lotus Sametime and XMPP (Extensible Messaging and Presence Protocol) gateways for instant messaging. It also provides an event gateway for interacting with SMS text messages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Injection along these gateways can happen when end users (and/or systems) send malicious code to execute on the server. These gateways all utilize ColdFusion Components (CFCs) for processing. Use standard ColdFusion functions, tags, and validation techniques to protect against malicious code injection. Sanitize all input strings and do not allow un-validated code to access backend systems.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Best Practices'''&lt;br /&gt;
&lt;br /&gt;
Use the XML functions to validate XML input.&lt;br /&gt;
&lt;br /&gt;
Before performing XPath searches and transformations in ColdFusion, validate the source before executing.&lt;br /&gt;
&lt;br /&gt;
Use ColdFusion validation techniques to sanitize strings passed to xmlSearch for performing XPath queries. &lt;br /&gt;
&lt;br /&gt;
When performing XML transformations only use a trusted source for the XSL stylesheet.&lt;br /&gt;
&lt;br /&gt;
Ensure that the memory size of the Java Sandbox containing ColdFusion can handle large XML documents without adversely affecting server resources.&lt;br /&gt;
&lt;br /&gt;
Set the memory value to less than the amount of RAM on the server (-Xmx)&lt;br /&gt;
&lt;br /&gt;
Remove DOCTYPE elements from the XML string before converting it to an XML object.&lt;br /&gt;
&lt;br /&gt;
Using scriptProtect can be used to thwart most attempts of cross-site scripting. Set scriptProtect to All in the Application.cfc&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;cfparam&amp;gt; or &amp;lt;cfargument&amp;gt; to instantiate variables in ColdFusion. Use this tag with the name and type attributes. If the value is not of the specified type, ColdFusion returns an error.&lt;br /&gt;
&lt;br /&gt;
To handle untyped variables use IsValid() to validate its value against any legal object type that ColdFusion supports.&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;cfqueryparam&amp;gt; and &amp;lt;cfprocparam&amp;gt; to valid dynamic SQL variables against database datatypes&lt;br /&gt;
&lt;br /&gt;
Use CFLDAP for accessing LDAP servers. Avoid allowing native JNDI calls to connect to LDAP&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Best Practice in Action'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sample code below shows a database authentication function using some of the input validation techniques discussed in this section.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
&lt;br /&gt;
 || &lt;br /&gt;
* &amp;lt;cffunction name=&amp;quot;dblogin&amp;quot; access=&amp;quot;private&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;struct&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfargument name=&amp;quot;strUserName&amp;quot; required=&amp;quot;true&amp;quot; type=&amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfargument name=&amp;quot;strPassword&amp;quot; required=&amp;quot;true&amp;quot; type=&amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfset var retargs = StructNew()&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfif IsValid(&amp;quot;regex&amp;quot;, uUserName, &amp;quot;[A-Za-z0-9%]*&amp;quot;) AND IsValid(&amp;quot;regex&amp;quot;, uPassword, &amp;quot;[A-Za-z0-9%]*&amp;quot;)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;cfquery name=&amp;quot;loginQuery&amp;quot; dataSource=&amp;quot;#Application.DB#&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     SELECT hashed_password, salt&lt;br /&gt;
&lt;br /&gt;
*     FROM UserTable&lt;br /&gt;
&lt;br /&gt;
*     WHERE UserName =&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;cfqueryparam value=&amp;quot;#strUserName#&amp;quot; cfsqltype=&amp;quot;CF_SQL_VARCHAR&amp;quot; maxlength=&amp;quot;25&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;/cfquery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;cfif loginQuery.hashed_password EQ Hash(strPassword &amp;amp; loginQuery.salt, &amp;quot;SHA-256&amp;quot; )&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*       &amp;lt;cfset retargs.authenticated=&amp;quot;YES&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*       &amp;lt;cfset Session.UserName = strUserName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*       &amp;lt;!-- Add code to get roles from database --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*       &amp;lt;cfelse&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*       &amp;lt;cfset retargs.authenticated=&amp;quot;NO&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfelse&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;cfset retargs.authenticated=&amp;quot;NO&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfreturn retargs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Delimiter and special characters ==&lt;br /&gt;
&lt;br /&gt;
There are many characters that mean something special to various programs. If you followed the advice only to accept characters that are considered good, it is very likely that only a few delimiters will catch you out. &lt;br /&gt;
&lt;br /&gt;
Here are the usual suspects:&lt;br /&gt;
&lt;br /&gt;
* NULL (zero) %00&lt;br /&gt;
&lt;br /&gt;
* LF - ANSI chr(10) &amp;quot;\r&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* CR - ANSI chr(13) &amp;quot;\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* CRLF - &amp;quot;\n\r&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* CR - EBCDIC 0x0f &lt;br /&gt;
&lt;br /&gt;
* Quotes &amp;quot; '&lt;br /&gt;
&lt;br /&gt;
* Commas, slashes spaces and tabs and other white space - used in CSV, tab delimited output, and other specialist formats&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;&amp;gt; - XML and HTML tag markers, redirection characters&lt;br /&gt;
&lt;br /&gt;
* ; &amp;amp; - Unix and NT file system continuance&lt;br /&gt;
&lt;br /&gt;
* @ - used for e-mail addresses&lt;br /&gt;
&lt;br /&gt;
* 0xff&lt;br /&gt;
&lt;br /&gt;
* ... more&lt;br /&gt;
&lt;br /&gt;
Whenever you code to a particular technology, you should determine which characters are &amp;quot;special&amp;quot; and prevent them appearing in input, or properly escaping them.&lt;br /&gt;
&lt;br /&gt;
==Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* ASP.NET 2.0 Viewstate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://channel9.msdn.com/wiki/default.aspx/Channel9.HowToConfigureTheMachineKeyInASPNET2&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Guide Table of Contents]]&lt;br /&gt;
[[Category:OWASP_Guide_Project]]&lt;br /&gt;
[[Category:Validation]]&lt;br /&gt;
[[Category:Encoding]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Data_Validation&amp;diff=18767</id>
		<title>Data Validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Data_Validation&amp;diff=18767"/>
				<updated>2007-05-22T13:56:08Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Reformatted code, added null check&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guide Table of Contents]]__TOC__&lt;br /&gt;
&lt;br /&gt;
==Objective ==&lt;br /&gt;
&lt;br /&gt;
To ensure that the application is robust against all forms of input data, whether obtained from the user, infrastructure, external entities or database systems&lt;br /&gt;
&lt;br /&gt;
==Platforms Affected ==&lt;br /&gt;
&lt;br /&gt;
All. &lt;br /&gt;
&lt;br /&gt;
==Relevant COBIT Topics ==&lt;br /&gt;
&lt;br /&gt;
DS11 – Manage Data. All sections should be reviewed&lt;br /&gt;
&lt;br /&gt;
==Description ==&lt;br /&gt;
&lt;br /&gt;
The most common web application security weakness is the failure to properly validate input from the client or environment. This weakness leads to almost all of the major vulnerabilities in applications, such as interpreter injection, locale/Unicode attacks, file system attacks and buffer overflows. Data from the client should never be trusted for the client has every possibility to tamper with the data.&lt;br /&gt;
&lt;br /&gt;
In many cases, [[Encoding]] has the potential to defuse attacks that rely on lack of input validation. For example, if you use HTML entity encoding on user input before it is sent to a browser, it will prevent most [[XSS]] attacks. However, simply preventing attacks is not enough - you must perform [[Intrusion Detection]] in your applications. Otherwise, you are allowing attackers to repeatedly attack your application until they find a vulnerability that you haven't protected against. Detecting attempts to find these weaknesses is a critical protection mechanism.&lt;br /&gt;
&lt;br /&gt;
==Definitions ==&lt;br /&gt;
&lt;br /&gt;
These definitions are used within this document:&lt;br /&gt;
&lt;br /&gt;
* '''Integrity checks'''&lt;br /&gt;
&lt;br /&gt;
Ensure that the data has not been tampered with and is the same as before&lt;br /&gt;
&lt;br /&gt;
* '''Validation'''&lt;br /&gt;
&lt;br /&gt;
Ensure that the data is strongly typed, correct syntax, within length boundaries, contains only permitted characters, or that numbers are correctly signed and within range boundaries &lt;br /&gt;
&lt;br /&gt;
* '''Business rules'''&lt;br /&gt;
&lt;br /&gt;
Ensure that data is not only validated, but business rule correct. For example, interest rates fall within permitted boundaries.&lt;br /&gt;
&lt;br /&gt;
Some documentation and references interchangeably use the various meanings, which is very confusing to all concerned. This confusion directly causes continuing financial loss to the organization. &lt;br /&gt;
&lt;br /&gt;
==Where to include integrity checks ==&lt;br /&gt;
&lt;br /&gt;
Integrity checks must be included wherever data passes from a trusted to a less trusted boundary, such as from the application to the user's browser in a hidden field, or to a third party payment gateway, such as a transaction ID used internally upon return. &lt;br /&gt;
&lt;br /&gt;
The type of integrity control (checksum, HMAC, encryption, digital signature) should be directly related to the risk of the data transiting the trust boundary. &lt;br /&gt;
&lt;br /&gt;
==Where to include validation ==&lt;br /&gt;
&lt;br /&gt;
Validation must be performed on every tier. However, validation should be performed as per the function of the server executing the code. For example, the web / presentation tier should validate for web related issues, persistence layers should validate for persistence issues such as SQL / HQL injection, directory lookups should check for LDAP injection, and so on.&lt;br /&gt;
&lt;br /&gt;
==Where to include business rule validation ==&lt;br /&gt;
&lt;br /&gt;
Business rules are known during design, and they influence implementation. However, there are bad, good and &amp;quot;best&amp;quot; approaches. Often the best approach is the simplest in terms of code. &lt;br /&gt;
&lt;br /&gt;
===Example - Scenario ===&lt;br /&gt;
&lt;br /&gt;
* You are to populate a list with accounts provided by the back-end system&lt;br /&gt;
* The user will choose an account, choose a biller, and press next&lt;br /&gt;
&lt;br /&gt;
===Wrong way===&lt;br /&gt;
&lt;br /&gt;
The account select option is read directly and provided in a message back to the backend system without validating the account number is one of the accounts provided by the backend system. &lt;br /&gt;
&lt;br /&gt;
===Why this is bad===&lt;br /&gt;
&lt;br /&gt;
An attacker can change the HTML in any way they choose:&lt;br /&gt;
&lt;br /&gt;
* The lack of validation requires a round-trip to the backend to provide an error message that the front end code could easily have eliminated&lt;br /&gt;
&lt;br /&gt;
* The back end may not be able to cope with the data payload the front-end code could have easily eliminated. For example, buffer overflows, XML injection, or similar. &lt;br /&gt;
&lt;br /&gt;
===Acceptable Method ===&lt;br /&gt;
&lt;br /&gt;
The account select option parameter is read by the code, and compared to the previously rendered list. &lt;br /&gt;
&lt;br /&gt;
''if ( account.inList(session.getParameter('payeelstid') ) {''&lt;br /&gt;
''backend.performTransfer(session.getParameter('payeelstid'));''&lt;br /&gt;
''}''&lt;br /&gt;
&lt;br /&gt;
This prevents parameter tampering, but still makes the browser do a lot of work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Best Method ===&lt;br /&gt;
&lt;br /&gt;
The original code emitted indexes &amp;lt;option value=&amp;quot;1&amp;quot; ... &amp;gt; rather than account names.&lt;br /&gt;
&lt;br /&gt;
''int payeeLstId = session.getParameter('payeelstid');''&lt;br /&gt;
''accountFrom = account.getAcctNumberByIndex(payeeLstId);''&lt;br /&gt;
&lt;br /&gt;
Not only is this easier to render in HTML, it makes validation and business rule validation trivial. The field cannot be tampered with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion ===&lt;br /&gt;
&lt;br /&gt;
To provide defense in depth and to prevent attack payloads from trust boundaries, such as backend hosts, which are probably incapable of handling arbitrary input data, business rule validation is to be performed (preferably in workflow or command patterns), even if it is known that the back end code performs business rule validation.&lt;br /&gt;
&lt;br /&gt;
This is not to say that the entire set of business rules need be applied - it means that the fundamentals are performed to prevent unnecessary round trips to the backend and to prevent the backend from receiving most tampered data.&lt;br /&gt;
&lt;br /&gt;
==Data Validation Strategies ==&lt;br /&gt;
&lt;br /&gt;
There are four strategies for validating data, and they should be used in this order:&lt;br /&gt;
&lt;br /&gt;
===Accept known good===&lt;br /&gt;
&lt;br /&gt;
This strategy is also known as &amp;quot;whitelist&amp;quot; or &amp;quot;positive&amp;quot; validation. The idea is that you should check that the data is one of a set of tightly constrained known good values. Any data that doesn't match should be rejected.  Data should be:&lt;br /&gt;
&lt;br /&gt;
* Strongly typed at all times&lt;br /&gt;
* Length checked and fields length minimized&lt;br /&gt;
* Range checked if a numeric&lt;br /&gt;
* Unsigned unless required to be signed&lt;br /&gt;
* Syntax or grammar should be checked prior to first use or inspection&lt;br /&gt;
&lt;br /&gt;
If you expect a postcode, validate for a postcode (type, length and syntax):&lt;br /&gt;
&lt;br /&gt;
''public String validateAUpostCode(String postcode) {''&lt;br /&gt;
''	return (Pattern.matches(&amp;quot;^(((2|8|9)\d{2})|((02|08|09)\d{2})|([1-9]\d{3}))$&amp;quot;, postcode)) ? postcode : '';''&lt;br /&gt;
''}''&lt;br /&gt;
&lt;br /&gt;
Coding guidelines should use some form of visible tainting on input from the client or untrusted sources, such as third party connectors to make it obvious that the input is unsafe:&lt;br /&gt;
&lt;br /&gt;
''taintPostcode = getParameter('postcode');''&lt;br /&gt;
''validation = new validation();''&lt;br /&gt;
''postcode = validation.isPostcode(taintPostcode);''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Reject known bad===&lt;br /&gt;
&lt;br /&gt;
This strategy, also known as &amp;quot;negative&amp;quot; or &amp;quot;blacklist&amp;quot; validation is a weak alternative to positive validation. Essentially, if you don't expect to see characters such as %3f or JavaScript or similar, reject strings containing them. This is a dangerous strategy, because the set of possible bad data is potentially infinite. Adopting this strategy means that you will have to maintain the list of &amp;quot;known bad&amp;quot; characters and patterns forever, and you will by definition have incomplete protection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''public String removeJavascript(String input) {''&lt;br /&gt;
&lt;br /&gt;
''	Pattern p = Pattern.compile(&amp;quot;javascript&amp;quot;, CASE_INSENSITIVE);''&lt;br /&gt;
&lt;br /&gt;
''	p.matcher(input);''&lt;br /&gt;
&lt;br /&gt;
''	return (!p.matches()) ? input : '';''&lt;br /&gt;
&lt;br /&gt;
''}''&lt;br /&gt;
&lt;br /&gt;
It can take upwards of 90 regular expressions (see the CSS Cheat Sheet in the Guide 2.0) to eliminate known malicious software, and each regex needs to be run over every field. Obviously, this is slow and not secure. Just rejecting &amp;quot;current known bad&amp;quot; (which is at the time of writing hundreds of strings and literally millions of combinations) is insufficient if the input is a string. This strategy is directly akin to anti-virus pattern updates. Unless the business will allow updating &amp;quot;bad&amp;quot; regexes on a daily basis and support someone to research new attacks regularly, this approach will be obviated before long.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sanitize===&lt;br /&gt;
&lt;br /&gt;
Eliminate or translate characters (such as to HTML entities or to remove quotes) in an effort to make the input &amp;quot;safe&amp;quot;. &lt;br /&gt;
Like blacklists, this approach requires maintenance and is usually incomplete. As most fields have a particular grammar, it is simpler, faster, and more secure to simply validate a single correct positive test than to try to include complex and slow sanitization routines for all current and future attacks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public String quoteApostrophe(String input) {&lt;br /&gt;
    if (input != null)&lt;br /&gt;
        return input.replaceAll(&amp;quot;[\']&amp;quot;, &amp;quot;&amp;amp;amp;rsquo;&amp;quot;);&lt;br /&gt;
    else&lt;br /&gt;
        return null;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===No validation===&lt;br /&gt;
&lt;br /&gt;
This is inherently unsafe and strongly discouraged. The business must sign off each and every example of no validation as the lack of validation usually leads to direct obviation of application, host and network security controls.&lt;br /&gt;
&lt;br /&gt;
''account.setAcctId(getParameter('formAcctNo'));''&lt;br /&gt;
''...''&lt;br /&gt;
&lt;br /&gt;
''public setAcctId(String acctId) {''&lt;br /&gt;
''	cAcctId = acctId;''&lt;br /&gt;
''}''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Prevent parameter tampering ==&lt;br /&gt;
&lt;br /&gt;
There are many input sources:&lt;br /&gt;
&lt;br /&gt;
* HTTP headers, such as REMOTE_ADDR, PROXY_VIA or similar&lt;br /&gt;
&lt;br /&gt;
* Environment variables, such as getenv() or via server properties &lt;br /&gt;
&lt;br /&gt;
* All GET, POST and Cookie data&lt;br /&gt;
&lt;br /&gt;
This includes supposedly tamper resistant fields such as radio buttons, drop downs, etc - any client side HTML can be re-written to suit the attacker&lt;br /&gt;
&lt;br /&gt;
Configuration data (mistakes happen :))&lt;br /&gt;
&lt;br /&gt;
External systems (via any form of input mechanism, such as XML input, RMI, web services, etc)&lt;br /&gt;
&lt;br /&gt;
All of these data sources supply untrusted input. Data received from untrusted data sources must be properly checked before first use.&lt;br /&gt;
&lt;br /&gt;
==Hidden fields ==&lt;br /&gt;
&lt;br /&gt;
Hidden fields are a simple way to avoid storing state on the server. Their use is particularly prevalent in &amp;quot;wizard-style&amp;quot; multi-page forms. However, their use exposes the inner workings of your application, and exposes data to trivial tampering, replay, and validation attacks. In general, only use hidden fields for page sequence.&lt;br /&gt;
&lt;br /&gt;
If you have to use hidden fields, there are some rules:&lt;br /&gt;
&lt;br /&gt;
* Secrets, such as passwords, should never be sent in the clear&lt;br /&gt;
&lt;br /&gt;
* Hidden fields need to have integrity checks and preferably encrypted using non-constant initialization vectors (i.e. different users at different times have different yet cryptographically strong random IVs)&lt;br /&gt;
&lt;br /&gt;
* Encrypted hidden fields must be robust against replay attacks, which means some form of temporal keying&lt;br /&gt;
&lt;br /&gt;
* Data sent to the user must be validated on the server once the last page has been received, even if it has been previously validated on the server - this helps reduce the risk from replay attacks.&lt;br /&gt;
&lt;br /&gt;
The preferred integrity control should be at least a HMAC using SHA-256 or preferably digitally signed or encrypted using PGP. IBMJCE supports SHA-256, but PGP JCE support require the inclusion of the Legion of the Bouncy Castle (http://www.bouncycastle.org/) JCE classes.&lt;br /&gt;
&lt;br /&gt;
It is simpler to store this data temporarily in the session object. Using the session object is the safest option as data is never visible to the user, requires (far) less code, nearly no CPU, disk or I/O utilization, less memory (particularly on large multi-page forms), and less network consumption. &lt;br /&gt;
&lt;br /&gt;
In the case of the session object being backed by a database, large session objects may become too large for the inbuilt handler. In this case, the recommended strategy is to store the validated data in the database, but mark the transaction as &amp;quot;incomplete&amp;quot;. Each page will update the incomplete transaction until it is ready for submission. This minimizes the database load, session size, and activity between the users whilst remaining tamperproof. &lt;br /&gt;
&lt;br /&gt;
Code containing hidden fields should be rejected during code reviews.&lt;br /&gt;
&lt;br /&gt;
==ASP.NET Viewstate ==&lt;br /&gt;
&lt;br /&gt;
ASP.NET sends form data back to the client in a hidden “Viewstate” field. Despite looking forbidding, this “encryption” is simply plain-text equivalent (base64 encoding) and has no data integrity without further action on your behalf in ASP.NET 1.0. In ASP.NET 1.1 and 2.0, tamper proofing, called &amp;quot;enableViewStateMAC&amp;quot; is on by default using a SHA/1 hash.&lt;br /&gt;
&lt;br /&gt;
Any application framework with a similar mechanism might be at fault – you should investigate your application framework’s support for sending data back to the user. Preferably it should not round trip.&lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
These configurations are set hierarchically in the .NET framework. The machine.config file contains the global configuration; each web directory may contain a web.config file further specifying or overriding configuration; each page may contain @page directives specifying same configuration or overrides; you must check all three locations:&lt;br /&gt;
&lt;br /&gt;
* If the enableViewStateMac is not set to “true”, you are at risk if your viewstate contains authorization state&lt;br /&gt;
&lt;br /&gt;
* If the viewStateEncryptionMode is not set to “always”, you are at risk if your viewstate contains secrets such as credentials&lt;br /&gt;
&lt;br /&gt;
* If you share a host with many other customers, you all share the same machine key by default in ASP.NET 1.1. In ASP.NET 2.0, it is possible to configure unique viewstate keys per application&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
* If your application relies on data returning from the viewstate without being tampered with, you should turn on viewstate integrity checks at the least, and strongly consider:&lt;br /&gt;
&lt;br /&gt;
* Encrypt viewstate if any of the data is application sensitive&lt;br /&gt;
&lt;br /&gt;
* Upgrade to ASP.NET 2.0 as soon as practical if you are on a shared hosting arrangement&lt;br /&gt;
&lt;br /&gt;
* Move truly sensitive viewstate data to the session variable instead&lt;br /&gt;
&lt;br /&gt;
===Selects, radio buttons, and checkboxes ===&lt;br /&gt;
&lt;br /&gt;
It is commonly held belief that the value settings for these items cannot be easily tampered. This is wrong. In the following example, actual account numbers are used, which can lead to compromise:&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;html:radio value=&amp;quot;&amp;lt;%=acct.getCardNumber(1).toString( )%&amp;gt;&amp;quot; property=&amp;quot;acctNo&amp;quot;&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;bean:message key=&amp;quot;msg.card.name&amp;quot; arg0=&amp;quot;&amp;lt;%=acct.getCardName(1).toString( )%&amp;gt;&amp;quot; /&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;html:radio value=&amp;quot;&amp;lt;%=acct.getCardNumber(1).toString( )%&amp;gt;&amp;quot; property=&amp;quot;acctNo&amp;quot;&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;bean:message key=&amp;quot;msg.card.name&amp;quot; arg0=&amp;quot;&amp;lt;%=acct.getCardName(2).toString( )%&amp;gt;&amp;quot; /&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This produces (for example):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;acctNo&amp;quot; value=&amp;quot;455712341234&amp;quot;&amp;gt;Gold Card''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;acctNo&amp;quot; value=&amp;quot;455712341235&amp;quot;&amp;gt;Platinum Card''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the value is retrieved and then used directly in a SQL query, an interesting form of SQL injection may occur: authorization tampering leading to information disclosure. As the connection pool connects to the database using a single user, it may be possible to see other user's accounts if the SQL looks something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''String acctNo = getParameter('acctNo');''&lt;br /&gt;
&lt;br /&gt;
''String sql = &amp;quot;SELECT acctBal FROM accounts WHERE acctNo = '?'&amp;quot;;''&lt;br /&gt;
&lt;br /&gt;
''PreparedStatement st = conn.prepareStatement(sql);''&lt;br /&gt;
&lt;br /&gt;
''st.setString(1, acctNo);''&lt;br /&gt;
&lt;br /&gt;
''ResultSet rs = st.executeQuery();''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This should be re-written to retrieve the account number via index, and include the client's unique ID to ensure that other valid account numbers are exposed:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''String acctNo = acct.getCardNumber(getParameter('acctIndex'));''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''String sql = &amp;quot;SELECT acctBal FROM accounts WHERE acct_id = '?' AND acctNo = '?'&amp;quot;;''&lt;br /&gt;
&lt;br /&gt;
''PreparedStatement st = conn.prepareStatement(sql);''&lt;br /&gt;
&lt;br /&gt;
''st.setString(1, acct.getID());''&lt;br /&gt;
&lt;br /&gt;
''st.setString(2, acctNo);''&lt;br /&gt;
&lt;br /&gt;
''ResultSet rs = st.executeQuery();''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This approach requires rendering input values from 1 to ... x, and assuming accounts are stored in a Collection which can be iterated using logic:iterate:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;logic:iterate id=&amp;quot;loopVar&amp;quot; name=&amp;quot;MyForm&amp;quot; property=&amp;quot;values&amp;quot;&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''  &amp;lt;html:radio property=&amp;quot;acctIndex&amp;quot; idName=&amp;quot;loopVar&amp;quot; value=&amp;quot;value&amp;quot;/&amp;gt;&amp;amp;nbsp;''&lt;br /&gt;
&lt;br /&gt;
''  &amp;lt;bean:write name=&amp;quot;loopVar&amp;quot; property=&amp;quot;name&amp;quot;/&amp;gt;&amp;lt;br /&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;/logic:iterate&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code will emit HTML with the values &amp;quot;1&amp;quot; .. &amp;quot;x&amp;quot; as per the collection's content. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;acctIndex&amp;quot; value=&amp;quot;1&amp;quot; /&amp;gt;Gold Credit Card''&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;acctIndex&amp;quot; value=&amp;quot;2&amp;quot; /&amp;gt;Platinum Credit Card''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This approach should be used for any input type that allows a value to be set: radio buttons, checkboxes, and particularly select / option lists.&lt;br /&gt;
&lt;br /&gt;
===Per-User Data ===&lt;br /&gt;
&lt;br /&gt;
In fully normalized databases, the aim is to minimize the amount of repeated data. However, some data is inferred. For example, users can see messages that are stored in a messages table. Some messages are private to the user. However, in a fully normalized database, the list of message IDs are kept within another table:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If a user marks a message for deletion, the usual way is to recover the message ID from the user, and delete that:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''DELETE FROM message WHERE msgid='frmMsgId'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
However, how do you know if the user is eligible to delete that message ID? Such tables need to be denormalized slightly to include a user ID or make it easy to perform a single query to delete the message safely. For example, by adding back an (optional) uid column, the delete is now made reasonably safe:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''DELETE FROM message WHERE uid='session.myUserID' and msgid='frmMsgId';''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where the data is potentially both a private resource and a public resource (for example, in the secure message service, broadcast messages are just a special type of private message), additional precautions need to be taken to prevent users from deleting public resources without authorization. This can be done using role based checks, as well as using SQL statements to discriminate by message type:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''DELETE FROM message ''&lt;br /&gt;
&lt;br /&gt;
''WHERE''&lt;br /&gt;
&lt;br /&gt;
''uid='session.myUserID' AND''&lt;br /&gt;
&lt;br /&gt;
''msgid='frmMsgId' AND''&lt;br /&gt;
&lt;br /&gt;
''broadcastFlag = false;''&lt;br /&gt;
&lt;br /&gt;
==URL encoding ==&lt;br /&gt;
&lt;br /&gt;
Data sent via the URL, which is strongly discouraged, should be URL encoded and decoded. This reduces the likelihood of cross-site scripting attacks from working.&lt;br /&gt;
&lt;br /&gt;
In general, do not send data via GET request unless for navigational purposes.&lt;br /&gt;
&lt;br /&gt;
==HTML encoding ==&lt;br /&gt;
&lt;br /&gt;
Data sent to the user needs to be safe for the user to view. This can be done using &amp;lt;bean:write ...&amp;gt; and friends. Do not use &amp;lt;%=var%&amp;gt; unless it is used to supply an argument for &amp;lt;bean:write...&amp;gt; or similar. &lt;br /&gt;
&lt;br /&gt;
HTML encoding translates a range of characters into their HTML entities. For example, &amp;gt; becomes &amp;amp;amp;gt; This will still display as &amp;gt; on the user's browser, but it is a safe alternative.&lt;br /&gt;
&lt;br /&gt;
==Encoded strings ==&lt;br /&gt;
&lt;br /&gt;
Some strings may be received in encoded form. It is essential to send the correct locale to the user so that the web server and application server can provide a single level of canoncalization prior to the first use. &lt;br /&gt;
&lt;br /&gt;
Do not use getReader() or getInputStream() as these input methods do not decode encoded strings. If you need to use these constructs, you must decanoncalize data by hand. &lt;br /&gt;
&lt;br /&gt;
==Data Validation and Interpreter Injection ==&lt;br /&gt;
&lt;br /&gt;
This section focuses on preventing injection in ColdFusion. Interpreter Injection involves manipulating application parameters to execute malicious code on the system. The most prevalent of these is SQL injection but it also includes other injection techniques, including LDAP, ORM, User Agent, XML, etc. – see the Interpreter Injection chapter of this document for greater details. As a developer you should assume that all input is malicious. Before processing any input coming from a user, data source, component, or data service it should be validated for type, length, and/or range. ColdFusion includes support for Regular Expressions and CFML tags that can be used to validate input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SQL Injection'''&lt;br /&gt;
&lt;br /&gt;
SQL Injection involves sending extraneous SQL queries as variables. ColdFusion provides the &amp;lt;cfqueryparam&amp;gt; and &amp;lt;cfprocparam&amp;gt; tags for validating database parameters. These tags nests inside &amp;lt;cfquery&amp;gt; and &amp;lt;cfstoredproc&amp;gt;, respectively. For dynamic SQL submitted in &amp;lt;cfquery&amp;gt;, use the CFSQLTYPE attribute of the &amp;lt;cfqueryparam&amp;gt; to validate variables against the expected database datatype. Similarly, use the CFSQLTYPE attribute of &amp;lt;cfprocparam&amp;gt; to validate the datatypes of stored procedure parameters passed through &amp;lt;cfstoredproc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also strengthen your systems against SQL Injection by disabling the Allowed SQL operations for individual data sources. See the '''Configuration''' section below for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''LDAP Injection'''&lt;br /&gt;
&lt;br /&gt;
ColdFusion uses the &amp;lt;cfldap&amp;gt; tag to communicate with LDAP servers. This tag has an ACTION attribute which dictates the query performed against the LDAP. The valid values for this attribute are: add, delete, query (default), modify, and modifyDN. &amp;lt;cfldap&amp;gt; calls are turned into JNDI (Java Naming And Directory Interface) lookups. However, because &amp;lt;cfldap&amp;gt; wraps the calls, it will throw syntax errors if native JNDI code is passed to its attributes making LDAP injection more difficult.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''XML Injection'''&lt;br /&gt;
&lt;br /&gt;
Two parsers exist for XML data – SAX and DOM. ColdFusion uses DOM which reads the entire XML document into the server’s memory. This requires the administrator to restrict the size of the JVM containing ColdFusion.  ColdFusion is built on Java therefore by default, entity references are expanded during parsing. To prevent unbounded entity expansion, before a string is converted to an XML DOM, filter out DOCTYPES elements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the DOM has been read, to reduce the risk of XML, Injection use the ColdFusion XML decision functions: isXML(), isXmlAttribute(), isXmlElement(), isXmlNode(), and isXmlRoot(). The isXML() function determines if a string is well-formed XML. The other functions determine whether or not the passed parameter is a valid part of an XML document. Use the xmlValidate() function to validate external XML documents against a Document Type Definition (DTD) or XML Schema.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event Gateway, IM, and SMS Injection'''&lt;br /&gt;
&lt;br /&gt;
ColdFusion MX 7 enables Event Gateways, instant messaging (IM), and SMS (short message service) for interacting with external systems. Event Gateways are ColdFusion components that respond asynchronously to non-HTTP requests – e.g. instant messages, SMS text from wireless devices, etc. ColdFusion provides Lotus Sametime and XMPP (Extensible Messaging and Presence Protocol) gateways for instant messaging. It also provides an event gateway for interacting with SMS text messages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Injection along these gateways can happen when end users (and/or systems) send malicious code to execute on the server. These gateways all utilize ColdFusion Components (CFCs) for processing. Use standard ColdFusion functions, tags, and validation techniques to protect against malicious code injection. Sanitize all input strings and do not allow un-validated code to access backend systems.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Best Practices'''&lt;br /&gt;
&lt;br /&gt;
Use the XML functions to validate XML input.&lt;br /&gt;
&lt;br /&gt;
Before performing XPath searches and transformations in ColdFusion, validate the source before executing.&lt;br /&gt;
&lt;br /&gt;
Use ColdFusion validation techniques to sanitize strings passed to xmlSearch for performing XPath queries. &lt;br /&gt;
&lt;br /&gt;
When performing XML transformations only use a trusted source for the XSL stylesheet.&lt;br /&gt;
&lt;br /&gt;
Ensure that the memory size of the Java Sandbox containing ColdFusion can handle large XML documents without adversely affecting server resources.&lt;br /&gt;
&lt;br /&gt;
Set the memory value to less than the amount of RAM on the server (-Xmx)&lt;br /&gt;
&lt;br /&gt;
Remove DOCTYPE elements from the XML string before converting it to an XML object.&lt;br /&gt;
&lt;br /&gt;
Using scriptProtect can be used to thwart most attempts of cross-site scripting. Set scriptProtect to All in the Application.cfc&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;cfparam&amp;gt; or &amp;lt;cfargument&amp;gt; to instantiate variables in ColdFusion. Use this tag with the name and type attributes. If the value is not of the specified type, ColdFusion returns an error.&lt;br /&gt;
&lt;br /&gt;
To handle untyped variables use IsValid() to validate its value against any legal object type that ColdFusion supports.&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;cfqueryparam&amp;gt; and &amp;lt;cfprocparam&amp;gt; to valid dynamic SQL variables against database datatypes&lt;br /&gt;
&lt;br /&gt;
Use CFLDAP for accessing LDAP servers. Avoid allowing native JNDI calls to connect to LDAP&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Best Practice in Action'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sample code below shows a database authentication function using some of the input validation techniques discussed in this section.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
&lt;br /&gt;
 || &lt;br /&gt;
* &amp;lt;cffunction name=&amp;quot;dblogin&amp;quot; access=&amp;quot;private&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;struct&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfargument name=&amp;quot;strUserName&amp;quot; required=&amp;quot;true&amp;quot; type=&amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfargument name=&amp;quot;strPassword&amp;quot; required=&amp;quot;true&amp;quot; type=&amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfset var retargs = StructNew()&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfif IsValid(&amp;quot;regex&amp;quot;, uUserName, &amp;quot;[A-Za-z0-9%]*&amp;quot;) AND IsValid(&amp;quot;regex&amp;quot;, uPassword, &amp;quot;[A-Za-z0-9%]*&amp;quot;)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;cfquery name=&amp;quot;loginQuery&amp;quot; dataSource=&amp;quot;#Application.DB#&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     SELECT hashed_password, salt&lt;br /&gt;
&lt;br /&gt;
*     FROM UserTable&lt;br /&gt;
&lt;br /&gt;
*     WHERE UserName =&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;cfqueryparam value=&amp;quot;#strUserName#&amp;quot; cfsqltype=&amp;quot;CF_SQL_VARCHAR&amp;quot; maxlength=&amp;quot;25&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;/cfquery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;cfif loginQuery.hashed_password EQ Hash(strPassword &amp;amp; loginQuery.salt, &amp;quot;SHA-256&amp;quot; )&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*       &amp;lt;cfset retargs.authenticated=&amp;quot;YES&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*       &amp;lt;cfset Session.UserName = strUserName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*       &amp;lt;!-- Add code to get roles from database --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*       &amp;lt;cfelse&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*       &amp;lt;cfset retargs.authenticated=&amp;quot;NO&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfelse&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*     &amp;lt;cfset retargs.authenticated=&amp;quot;NO&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*   &amp;lt;cfreturn retargs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Delimiter and special characters ==&lt;br /&gt;
&lt;br /&gt;
There are many characters that mean something special to various programs. If you followed the advice only to accept characters that are considered good, it is very likely that only a few delimiters will catch you out. &lt;br /&gt;
&lt;br /&gt;
Here are the usual suspects:&lt;br /&gt;
&lt;br /&gt;
* NULL (zero) %00&lt;br /&gt;
&lt;br /&gt;
* LF - ANSI chr(10) &amp;quot;\r&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* CR - ANSI chr(13) &amp;quot;\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* CRLF - &amp;quot;\n\r&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* CR - EBCDIC 0x0f &lt;br /&gt;
&lt;br /&gt;
* Quotes &amp;quot; '&lt;br /&gt;
&lt;br /&gt;
* Commas, slashes spaces and tabs and other white space - used in CSV, tab delimited output, and other specialist formats&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;&amp;gt; - XML and HTML tag markers, redirection characters&lt;br /&gt;
&lt;br /&gt;
* ; &amp;amp; - Unix and NT file system continuance&lt;br /&gt;
&lt;br /&gt;
* @ - used for e-mail addresses&lt;br /&gt;
&lt;br /&gt;
* 0xff&lt;br /&gt;
&lt;br /&gt;
* ... more&lt;br /&gt;
&lt;br /&gt;
Whenever you code to a particular technology, you should determine which characters are &amp;quot;special&amp;quot; and prevent them appearing in input, or properly escaping them.&lt;br /&gt;
&lt;br /&gt;
==Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* ASP.NET 2.0 Viewstate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://channel9.msdn.com/wiki/default.aspx/Channel9.HowToConfigureTheMachineKeyInASPNET2&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Guide Table of Contents]]&lt;br /&gt;
[[Category:OWASP_Guide_Project]]&lt;br /&gt;
[[Category:Validation]]&lt;br /&gt;
[[Category:Encoding]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Buffer_Overflows&amp;diff=8862</id>
		<title>Buffer Overflows</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Buffer_Overflows&amp;diff=8862"/>
				<updated>2006-08-08T17:49:16Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Added link to Phrack article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guide Table of Contents]]__TOC__'''&lt;br /&gt;
&lt;br /&gt;
==Objective ==&lt;br /&gt;
&lt;br /&gt;
To ensure that:&lt;br /&gt;
&lt;br /&gt;
* Applications do not expose themselves to faulty components&lt;br /&gt;
&lt;br /&gt;
* Applications create as few buffer overflows as possible&lt;br /&gt;
&lt;br /&gt;
* Developers are encouraged to use languages and frameworks that are relatively immune to buffer overflows. &lt;br /&gt;
&lt;br /&gt;
==Platforms Affected ==&lt;br /&gt;
&lt;br /&gt;
Almost every platform, with the following notable exceptions:&lt;br /&gt;
&lt;br /&gt;
* Java/J2EE – as long as native methods or system calls are not invoked&lt;br /&gt;
&lt;br /&gt;
* .NET – as long as unsafe or unmanaged code is not invoked (such as the use of P/Invoke or COM Interop)&lt;br /&gt;
&lt;br /&gt;
* PHP, Python, Perl – as long as external programs or vulnerable extensions are not used.&lt;br /&gt;
&lt;br /&gt;
==Relevant COBIT Topics ==&lt;br /&gt;
&lt;br /&gt;
DS11.9 – Data processing integrity.&lt;br /&gt;
&lt;br /&gt;
==Description ==&lt;br /&gt;
&lt;br /&gt;
Attackers generally use buffer overflows to corrupt the execution stack of a web application. By sending carefully crafted input to a web application, an attacker can cause the web application to execute arbitrary code, possibly taking over the machine. Attackers have managed to identify buffer overflows in a staggering array of products and components. &lt;br /&gt;
&lt;br /&gt;
Buffer overflow flaws can be present in both the web server and application server products that serve the static and dynamic portions of a site, or in the web application itself. Buffer overflows found in commonly used server products are likely to become widely known and can pose a significant risk to users of these products. When web applications use libraries, such as a graphics library to generate images or a communications library to send e-mail, they open themselves to potential buffer overflow attacks. Literature detailing buffer overflow attacks against commonly used products is readily available, and newly discovered vulnerabilities are reported almost daily. &lt;br /&gt;
&lt;br /&gt;
Buffer overflows can also be found in custom web application code, and may even be more likely, given the lack of scrutiny that web applications typically go through. Buffer overflow attacks against customized web applications can sometimes lead to interesting results. In some cases, we have discovered that sending large inputs can cause the web application or the back-end database to malfunction. It is possible to cause a denial of service attack against the web site, depending on the severity and specific nature of the flaw. Overly large inputs could cause the application to display a detailed error message, potentially leading to a successful attack on the system.&lt;br /&gt;
&lt;br /&gt;
Buffer overflow attacks generally rely upon two techniques (and usually the combination):&lt;br /&gt;
&lt;br /&gt;
* Writing data to particular memory addresses&lt;br /&gt;
&lt;br /&gt;
* Having the operating system mishandle data types&lt;br /&gt;
&lt;br /&gt;
* This means that strongly-typed programming languages (and environments) that disallow direct memory access usually prevent buffer overflows from happening.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
|-&lt;br /&gt;
 ! Language/Environment !! Compiled or Interpreted !! Strongly Typed !! Direct Memory Access !! Safe or Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || Java, Java Virtual Machine (JVM) || Both || Yes || No || Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || .NET || Both || Yes || No || Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || Perl  || Both || Yes || No || Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || Python - interpreted || Intepreted || Yes || No || Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || Ruby || Interpreted || Yes || No || Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || C/C++ || Compiled || No || Yes || Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || Assembly || Compiled || No || Yes || Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || COBOL || Compiled || Yes || No || Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
Table 8.1: Language descriptions&lt;br /&gt;
&lt;br /&gt;
==General Prevention Techniques ==&lt;br /&gt;
&lt;br /&gt;
A number of general techniques to prevent buffer overflows include:&lt;br /&gt;
&lt;br /&gt;
* Code auditing (automated or manual)&lt;br /&gt;
&lt;br /&gt;
* Developer training – bounds checking, use of unsafe functions, and group standards&lt;br /&gt;
&lt;br /&gt;
* Non-executable stacks – many operating systems have at least some support for this&lt;br /&gt;
&lt;br /&gt;
* Compiler tools – StackShield, StackGuard, and Libsafe, among others&lt;br /&gt;
&lt;br /&gt;
* Safe functions – use strncat instead of strcat, strncpy instead of strcpy, etc&lt;br /&gt;
&lt;br /&gt;
* Patches – Be sure to keep your web and application servers fully patched, and be aware of bug reports relating to applications upon which your code is dependent.&lt;br /&gt;
&lt;br /&gt;
* Periodically scan your application with one or more of the commonly available scanners that look for buffer overflow flaws in your server products and your custom web applications. &lt;br /&gt;
&lt;br /&gt;
==Stack Overflow ==&lt;br /&gt;
&lt;br /&gt;
Stack overflows are the best understood and the most common form of buffer overflows. The basics of a stack overflow is simple:&lt;br /&gt;
&lt;br /&gt;
* There are two buffers, a source buffer containing arbitrary input (presumably from the attacker), and a destination buffer that is too small for the attack input. The second buffer resides on the stack and somewhat adjacent to the function return address on the stack.&lt;br /&gt;
&lt;br /&gt;
* The faulty code does ''not'' check that the source buffer is too large to fit in the destination buffer. It copies the attack input to the destination buffer, overwriting additional information on the stack (such as the function return address).&lt;br /&gt;
&lt;br /&gt;
* When the function returns, the CPU unwinds the stack frame and pops the (now modified) return address from the stack.&lt;br /&gt;
&lt;br /&gt;
* Control does not return to the function as it should. Instead, arbitrary code (chosen by the attacker when crafting the initial input) is executed. &lt;br /&gt;
&lt;br /&gt;
The following example, written in C, demonstrates a stack overflow exploit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void f(char* s) {&lt;br /&gt;
    char buffer[10];&lt;br /&gt;
    strcpy(buffer, s);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void main(void) {&lt;br /&gt;
    f(&amp;quot;01234567890123456789&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[root /tmp]# ./stacktest&lt;br /&gt;
&lt;br /&gt;
Segmentation fault&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language) that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* copies data from one buffer on the stack to another without checking sizes first AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values or non-executable stacks to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
it is likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
# Deploy on systems capable of using non-executable stacks, such as:&lt;br /&gt;
## AMD and Intel x86-64 chips with associated 64-bit operating systems&lt;br /&gt;
## Windows XP SP2 (both 32- and 64-bit)&lt;br /&gt;
## Windows 2003 SP1 (both 32- and 64-bit)&lt;br /&gt;
## Linux after 2.6.8 on AMD and x86-64 processors in 32- and 64-bit mode&lt;br /&gt;
## OpenBSD (w^x on Intel, AMD, SPARC, Alpha and PowerPC)&lt;br /&gt;
## Solaris 2.6 and later with the “noexec_user_stack” flag enabled&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Heap Overflow ==&lt;br /&gt;
&lt;br /&gt;
Heap overflows are problematic in that they are not necessarily protected by CPUs capable of using non-execuable stacks. A heap is an area of memory allocated by the application at run-time to store data. The following example, written in C, shows a heap overflow exploit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #define BSIZE 16&lt;br /&gt;
 #define OVERSIZE 8 /* overflow buf2 by OVERSIZE bytes */&lt;br /&gt;
&lt;br /&gt;
 void main(void) {&lt;br /&gt;
    u_long b_diff;&lt;br /&gt;
    char *buf0 = (char*)malloc(BSIZE);		// create two buffers&lt;br /&gt;
    char *buf1 = (char*)malloc(BSIZE);&lt;br /&gt;
&lt;br /&gt;
    b_diff = (u_long)buf1 - (u_long)buf0;	// difference between locations&lt;br /&gt;
    printf(&amp;quot;Initial values:  &amp;quot;);&lt;br /&gt;
    printf(&amp;quot;buf0=%p, buf1=%p, b_diff=0x%x bytes\n&amp;quot;, buf0, buf1, b_diff);&lt;br /&gt;
&lt;br /&gt;
    memset(buf1, 'A', BUFSIZE-1), buf1[BUFSIZE-1] = '\0';&lt;br /&gt;
    printf(&amp;quot;Before overflow: buf1=%s\n&amp;quot;, buf1);&lt;br /&gt;
&lt;br /&gt;
    memset(buf0, 'B', (u_int)(diff + OVERSIZE));&lt;br /&gt;
    printf(&amp;quot;After overflow:  buf1=%s\n&amp;quot;, buf1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[root /tmp]# ./heaptest&lt;br /&gt;
&lt;br /&gt;
Initial values:  buf0=0x9322008, buf1=0x9322020, diff=0xff0 bytes&lt;br /&gt;
Before overflow: buf1=AAAAAAAAAAAAAAA&lt;br /&gt;
After overflow:  buf1=BBBBBBBBAAAAAAA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simple program above shows two buffers being allocated on the heap, with the first buffer being overflowed to overwrite the contents of the second buffer. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language)  that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* copies data from one buffer on the stack to another without checking sizes first AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
it is likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Format String ==&lt;br /&gt;
&lt;br /&gt;
Format string buffer overflows (usually called &amp;quot;format string vulnerabilities&amp;quot;) are highly specialized buffer overflows that can have the same effects as other buffer overflow attacks. Basically, format string vulnerabilities take advantage of the mixture of data and control information in certain functions, such as C/C++'s printf. The easiest way to understand this class of vulnerability is with an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void main(void) {&lt;br /&gt;
    char str[100] = scanf(&amp;quot;%s&amp;quot;);&lt;br /&gt;
    printf(&amp;quot;%s&amp;quot;, str);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simple program takes input from the user and displays it back on the screen. The string &amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt; means that the other parameter, str, should be displayed as a string. This example is ''not'' vulnerable to a format string attack, but if one changes the last line, it becomes exploitable:&lt;br /&gt;
&lt;br /&gt;
    printf(str);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see how, consider the user entering the special input:&lt;br /&gt;
&lt;br /&gt;
''%08x.%08x.%08x.%08x.%08x''&lt;br /&gt;
&lt;br /&gt;
By constructing input as such, the program can be exploited to print the first five entries from the stack.  &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* uses functions such as printf, snprintf directly, or indirectly through system services (such as syslog) or other AND&lt;br /&gt;
&lt;br /&gt;
* the use of such functions allows input from the user to contain control information interpreted by the function itself&lt;br /&gt;
&lt;br /&gt;
it is highly likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. Specifically check for control information (meta-characters like '%')&lt;br /&gt;
# Avoid the use of functions like printf that allow user input to contain control information&lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Unicode Overflow ==&lt;br /&gt;
&lt;br /&gt;
Unicode exploits are a bit more difficult to do than typical buffer overflows as demonstrated in Anley’s 2002 paper, but it is wrong to assume that by using Unicode, you are protected against buffer overflows. Examples of Unicode overflows include Code Red, a devastating Trojan with an estimated economic cost in the billions of dollars. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language) that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* takes Unicode input from a user AND&lt;br /&gt;
&lt;br /&gt;
* fails to sanitize the input AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself  ===&lt;br /&gt;
&lt;br /&gt;
# Deploy on systems capable of using non-executable stacks, such as:&lt;br /&gt;
## AMD and Intel x86-64 chips with associated 64-bit operating systems&lt;br /&gt;
## Windows XP SP2 (both 32- and 64-bit)&lt;br /&gt;
## Windows 2003 SP1 (both 32- and 64-bit)&lt;br /&gt;
## Linux after 2.6.8 on AMD and x86-64 processors in 32- and 64-bit mode&lt;br /&gt;
## OpenBSD (w^x on Intel, AMD, SPARC, Alpha and PowerPC)&lt;br /&gt;
## Solaris 2.6 and later with the “noexec_user_stack” flag enabled&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Integer Overflow ==&lt;br /&gt;
&lt;br /&gt;
When an application takes two numbers of fixed word size and perform an operation with them, the result may not fit within the same word size. For example, if the two 8-bit numbers 192 and 208 are added together and stored into another 8-bit byte, the result will not fit into an 8-bit result:&lt;br /&gt;
&lt;br /&gt;
''         1100 0000''&lt;br /&gt;
&lt;br /&gt;
''  +      1101 0000''&lt;br /&gt;
&lt;br /&gt;
''  = 0001 1001 0000''&lt;br /&gt;
&lt;br /&gt;
Although such an operation will usually cause some type of exception, your application must be coded to check for such an exception and take proper action. Otherwise, your application would report that 192 + 208 equals 144.&lt;br /&gt;
&lt;br /&gt;
The following code demonstrates a buffer overflow, and was adapted from [http://www.phrack.org/phrack/60/p60-0x0a.txt Blexim's Phrack article]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void main(int argc, char *argv[]) {&lt;br /&gt;
    int i = atoi(argv[1]);         // input from user&lt;br /&gt;
    unsigned short s = i;          // truncate to a short&lt;br /&gt;
    char buf[50];                  // large buffer&lt;br /&gt;
&lt;br /&gt;
    if (s &amp;gt; 10) {                  // check we're not greater than 10&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    memcpy(buf, argv[2], i);       // copy i bytes to the buffer&lt;br /&gt;
    buf[i] = '\0';                 // add a null byte to the buffer&lt;br /&gt;
    printf(&amp;quot;%s\n&amp;quot;, buf);           // output the buffer contents&lt;br /&gt;
&lt;br /&gt;
    return;&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
[root /tmp]# ./inttest 65580 foobar&lt;br /&gt;
Segmentation fault&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code is exploitable because the validation does not occur on the input value (65580), but rather the value after it has been converted to an unsigned short (45). &lt;br /&gt;
&lt;br /&gt;
Integer overflows can be a problem in any language and can be exploited when integers are used in array indices and implicit short math operations. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
* Examine use of signed integers, bytes, and shorts.&lt;br /&gt;
&lt;br /&gt;
* Are there cases where these values are used as array indices after performing an arithmetic operation (+, -, *, /, or % (modulo))?&lt;br /&gt;
&lt;br /&gt;
* How would your program react to a negative or zero value for integer values, particular during array lookups?&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
* If using .NET, use David LeBlanc’s SafeInt class or a similar construct. Otherwise, use a &amp;quot;BigInteger&amp;quot; or &amp;quot;BigDecimal&amp;quot; implementation in cases where it would be hard to validate input yourself.&lt;br /&gt;
&lt;br /&gt;
* If your compiler supports the option, change the default for integers to be unsigned unless otherwise explicitly stated. Use unsigned integers whenever you don't need negative values.&lt;br /&gt;
&lt;br /&gt;
* Use range checking if your language or framework supports it, or be sure to implement range checking yourself after all arithmetic operations.&lt;br /&gt;
&lt;br /&gt;
* Be sure to check for exceptions if your language supports it.&lt;br /&gt;
&lt;br /&gt;
==Further reading ==&lt;br /&gt;
&lt;br /&gt;
* Team Teso, ''Exploiting Format String Vulnerabilities''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.cs.ucsb.edu/~jzhou/security/formats-teso.html&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Newsham, Tim, ''Format String Attacks&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.lava.net/~newsham/format-string-attacks.pdf&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* w00 w00 and Matt Conover, ''Preliminary Heap Overflow Tutorial''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.w00w00.org/files/articles/heaptut.txt&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Chris Anley, ''Creating Arbitrary Shellcode In Unicode Expanded Strings''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.ngssoftware.com/papers/unicodebo.pdf&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* David Leblanc, ''Integer Handling with the C++ SafeInt Class ''&amp;lt;u&amp;gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncode/html/secure01142004.asp&amp;lt;/u&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
* Aleph One, ''Smashing the Stack for fun and profit''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.phrack.org/phrack/49/P49-14&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Mark Donaldson, ''Inside the buffer Overflow Attack: Mechanism, method, &amp;amp; prevention''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://rr.sans.org/code/inside_buffer.php&amp;lt;/u&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
* ''NX Bit'', Wikipedia article&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://en.wikipedia.org/wiki/NX_bit&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Horizon'', How to bypass Solaris no execute stack protection&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.secinf.net/unix_security/How_to_bypass_Solaris_nonexecutable_stack_protection_.html&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Alexander Anisimov'', Defeating Microsoft Windows XP SP2 Heap protection and DEP bypass'', Positive Technologies&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.maxpatrol.com/defeating-xpsp2-heap-protection.htm&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Matt Conover, w00w00 on Heap Overflows, w00w00 Security Team&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.w00w00.org/files/articles/heaptut.txt&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Blexim, ''Basic Integer Overflows&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.phrack.org/phrack/60/p60-0x0a.txt&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* StackShield&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.angelfire.com/sk/stackshield/index.html&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* StackGuard&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.immunix.org&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Libsafe&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.research.avayalabs.com/project/libsafe&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Guide Table of Contents]]&lt;br /&gt;
[[Category:OWASP_Guide_Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Buffer_Overflows&amp;diff=8861</id>
		<title>Buffer Overflows</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Buffer_Overflows&amp;diff=8861"/>
				<updated>2006-08-08T17:47:07Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Fixed table formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guide Table of Contents]]__TOC__'''&lt;br /&gt;
&lt;br /&gt;
==Objective ==&lt;br /&gt;
&lt;br /&gt;
To ensure that:&lt;br /&gt;
&lt;br /&gt;
* Applications do not expose themselves to faulty components&lt;br /&gt;
&lt;br /&gt;
* Applications create as few buffer overflows as possible&lt;br /&gt;
&lt;br /&gt;
* Developers are encouraged to use languages and frameworks that are relatively immune to buffer overflows. &lt;br /&gt;
&lt;br /&gt;
==Platforms Affected ==&lt;br /&gt;
&lt;br /&gt;
Almost every platform, with the following notable exceptions:&lt;br /&gt;
&lt;br /&gt;
* Java/J2EE – as long as native methods or system calls are not invoked&lt;br /&gt;
&lt;br /&gt;
* .NET – as long as unsafe or unmanaged code is not invoked (such as the use of P/Invoke or COM Interop)&lt;br /&gt;
&lt;br /&gt;
* PHP, Python, Perl – as long as external programs or vulnerable extensions are not used.&lt;br /&gt;
&lt;br /&gt;
==Relevant COBIT Topics ==&lt;br /&gt;
&lt;br /&gt;
DS11.9 – Data processing integrity.&lt;br /&gt;
&lt;br /&gt;
==Description ==&lt;br /&gt;
&lt;br /&gt;
Attackers generally use buffer overflows to corrupt the execution stack of a web application. By sending carefully crafted input to a web application, an attacker can cause the web application to execute arbitrary code, possibly taking over the machine. Attackers have managed to identify buffer overflows in a staggering array of products and components. &lt;br /&gt;
&lt;br /&gt;
Buffer overflow flaws can be present in both the web server and application server products that serve the static and dynamic portions of a site, or in the web application itself. Buffer overflows found in commonly used server products are likely to become widely known and can pose a significant risk to users of these products. When web applications use libraries, such as a graphics library to generate images or a communications library to send e-mail, they open themselves to potential buffer overflow attacks. Literature detailing buffer overflow attacks against commonly used products is readily available, and newly discovered vulnerabilities are reported almost daily. &lt;br /&gt;
&lt;br /&gt;
Buffer overflows can also be found in custom web application code, and may even be more likely, given the lack of scrutiny that web applications typically go through. Buffer overflow attacks against customized web applications can sometimes lead to interesting results. In some cases, we have discovered that sending large inputs can cause the web application or the back-end database to malfunction. It is possible to cause a denial of service attack against the web site, depending on the severity and specific nature of the flaw. Overly large inputs could cause the application to display a detailed error message, potentially leading to a successful attack on the system.&lt;br /&gt;
&lt;br /&gt;
Buffer overflow attacks generally rely upon two techniques (and usually the combination):&lt;br /&gt;
&lt;br /&gt;
* Writing data to particular memory addresses&lt;br /&gt;
&lt;br /&gt;
* Having the operating system mishandle data types&lt;br /&gt;
&lt;br /&gt;
* This means that strongly-typed programming languages (and environments) that disallow direct memory access usually prevent buffer overflows from happening.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
|-&lt;br /&gt;
 ! Language/Environment !! Compiled or Interpreted !! Strongly Typed !! Direct Memory Access !! Safe or Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || Java, Java Virtual Machine (JVM) || Both || Yes || No || Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || .NET || Both || Yes || No || Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || Perl  || Both || Yes || No || Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || Python - interpreted || Intepreted || Yes || No || Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || Ruby || Interpreted || Yes || No || Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || C/C++ || Compiled || No || Yes || Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || Assembly || Compiled || No || Yes || Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || COBOL || Compiled || Yes || No || Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
Table 8.1: Language descriptions&lt;br /&gt;
&lt;br /&gt;
==General Prevention Techniques ==&lt;br /&gt;
&lt;br /&gt;
A number of general techniques to prevent buffer overflows include:&lt;br /&gt;
&lt;br /&gt;
* Code auditing (automated or manual)&lt;br /&gt;
&lt;br /&gt;
* Developer training – bounds checking, use of unsafe functions, and group standards&lt;br /&gt;
&lt;br /&gt;
* Non-executable stacks – many operating systems have at least some support for this&lt;br /&gt;
&lt;br /&gt;
* Compiler tools – StackShield, StackGuard, and Libsafe, among others&lt;br /&gt;
&lt;br /&gt;
* Safe functions – use strncat instead of strcat, strncpy instead of strcpy, etc&lt;br /&gt;
&lt;br /&gt;
* Patches – Be sure to keep your web and application servers fully patched, and be aware of bug reports relating to applications upon which your code is dependent.&lt;br /&gt;
&lt;br /&gt;
* Periodically scan your application with one or more of the commonly available scanners that look for buffer overflow flaws in your server products and your custom web applications. &lt;br /&gt;
&lt;br /&gt;
==Stack Overflow ==&lt;br /&gt;
&lt;br /&gt;
Stack overflows are the best understood and the most common form of buffer overflows. The basics of a stack overflow is simple:&lt;br /&gt;
&lt;br /&gt;
* There are two buffers, a source buffer containing arbitrary input (presumably from the attacker), and a destination buffer that is too small for the attack input. The second buffer resides on the stack and somewhat adjacent to the function return address on the stack.&lt;br /&gt;
&lt;br /&gt;
* The faulty code does ''not'' check that the source buffer is too large to fit in the destination buffer. It copies the attack input to the destination buffer, overwriting additional information on the stack (such as the function return address).&lt;br /&gt;
&lt;br /&gt;
* When the function returns, the CPU unwinds the stack frame and pops the (now modified) return address from the stack.&lt;br /&gt;
&lt;br /&gt;
* Control does not return to the function as it should. Instead, arbitrary code (chosen by the attacker when crafting the initial input) is executed. &lt;br /&gt;
&lt;br /&gt;
The following example, written in C, demonstrates a stack overflow exploit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void f(char* s) {&lt;br /&gt;
    char buffer[10];&lt;br /&gt;
    strcpy(buffer, s);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void main(void) {&lt;br /&gt;
    f(&amp;quot;01234567890123456789&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[root /tmp]# ./stacktest&lt;br /&gt;
&lt;br /&gt;
Segmentation fault&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language) that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* copies data from one buffer on the stack to another without checking sizes first AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values or non-executable stacks to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
it is likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
# Deploy on systems capable of using non-executable stacks, such as:&lt;br /&gt;
## AMD and Intel x86-64 chips with associated 64-bit operating systems&lt;br /&gt;
## Windows XP SP2 (both 32- and 64-bit)&lt;br /&gt;
## Windows 2003 SP1 (both 32- and 64-bit)&lt;br /&gt;
## Linux after 2.6.8 on AMD and x86-64 processors in 32- and 64-bit mode&lt;br /&gt;
## OpenBSD (w^x on Intel, AMD, SPARC, Alpha and PowerPC)&lt;br /&gt;
## Solaris 2.6 and later with the “noexec_user_stack” flag enabled&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Heap Overflow ==&lt;br /&gt;
&lt;br /&gt;
Heap overflows are problematic in that they are not necessarily protected by CPUs capable of using non-execuable stacks. A heap is an area of memory allocated by the application at run-time to store data. The following example, written in C, shows a heap overflow exploit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #define BSIZE 16&lt;br /&gt;
 #define OVERSIZE 8 /* overflow buf2 by OVERSIZE bytes */&lt;br /&gt;
&lt;br /&gt;
 void main(void) {&lt;br /&gt;
    u_long b_diff;&lt;br /&gt;
    char *buf0 = (char*)malloc(BSIZE);		// create two buffers&lt;br /&gt;
    char *buf1 = (char*)malloc(BSIZE);&lt;br /&gt;
&lt;br /&gt;
    b_diff = (u_long)buf1 - (u_long)buf0;	// difference between locations&lt;br /&gt;
    printf(&amp;quot;Initial values:  &amp;quot;);&lt;br /&gt;
    printf(&amp;quot;buf0=%p, buf1=%p, b_diff=0x%x bytes\n&amp;quot;, buf0, buf1, b_diff);&lt;br /&gt;
&lt;br /&gt;
    memset(buf1, 'A', BUFSIZE-1), buf1[BUFSIZE-1] = '\0';&lt;br /&gt;
    printf(&amp;quot;Before overflow: buf1=%s\n&amp;quot;, buf1);&lt;br /&gt;
&lt;br /&gt;
    memset(buf0, 'B', (u_int)(diff + OVERSIZE));&lt;br /&gt;
    printf(&amp;quot;After overflow:  buf1=%s\n&amp;quot;, buf1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[root /tmp]# ./heaptest&lt;br /&gt;
&lt;br /&gt;
Initial values:  buf0=0x9322008, buf1=0x9322020, diff=0xff0 bytes&lt;br /&gt;
Before overflow: buf1=AAAAAAAAAAAAAAA&lt;br /&gt;
After overflow:  buf1=BBBBBBBBAAAAAAA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simple program above shows two buffers being allocated on the heap, with the first buffer being overflowed to overwrite the contents of the second buffer. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language)  that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* copies data from one buffer on the stack to another without checking sizes first AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
it is likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Format String ==&lt;br /&gt;
&lt;br /&gt;
Format string buffer overflows (usually called &amp;quot;format string vulnerabilities&amp;quot;) are highly specialized buffer overflows that can have the same effects as other buffer overflow attacks. Basically, format string vulnerabilities take advantage of the mixture of data and control information in certain functions, such as C/C++'s printf. The easiest way to understand this class of vulnerability is with an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void main(void) {&lt;br /&gt;
    char str[100] = scanf(&amp;quot;%s&amp;quot;);&lt;br /&gt;
    printf(&amp;quot;%s&amp;quot;, str);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simple program takes input from the user and displays it back on the screen. The string &amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt; means that the other parameter, str, should be displayed as a string. This example is ''not'' vulnerable to a format string attack, but if one changes the last line, it becomes exploitable:&lt;br /&gt;
&lt;br /&gt;
    printf(str);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see how, consider the user entering the special input:&lt;br /&gt;
&lt;br /&gt;
''%08x.%08x.%08x.%08x.%08x''&lt;br /&gt;
&lt;br /&gt;
By constructing input as such, the program can be exploited to print the first five entries from the stack.  &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* uses functions such as printf, snprintf directly, or indirectly through system services (such as syslog) or other AND&lt;br /&gt;
&lt;br /&gt;
* the use of such functions allows input from the user to contain control information interpreted by the function itself&lt;br /&gt;
&lt;br /&gt;
it is highly likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. Specifically check for control information (meta-characters like '%')&lt;br /&gt;
# Avoid the use of functions like printf that allow user input to contain control information&lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Unicode Overflow ==&lt;br /&gt;
&lt;br /&gt;
Unicode exploits are a bit more difficult to do than typical buffer overflows as demonstrated in Anley’s 2002 paper, but it is wrong to assume that by using Unicode, you are protected against buffer overflows. Examples of Unicode overflows include Code Red, a devastating Trojan with an estimated economic cost in the billions of dollars. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language) that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* takes Unicode input from a user AND&lt;br /&gt;
&lt;br /&gt;
* fails to sanitize the input AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself  ===&lt;br /&gt;
&lt;br /&gt;
# Deploy on systems capable of using non-executable stacks, such as:&lt;br /&gt;
## AMD and Intel x86-64 chips with associated 64-bit operating systems&lt;br /&gt;
## Windows XP SP2 (both 32- and 64-bit)&lt;br /&gt;
## Windows 2003 SP1 (both 32- and 64-bit)&lt;br /&gt;
## Linux after 2.6.8 on AMD and x86-64 processors in 32- and 64-bit mode&lt;br /&gt;
## OpenBSD (w^x on Intel, AMD, SPARC, Alpha and PowerPC)&lt;br /&gt;
## Solaris 2.6 and later with the “noexec_user_stack” flag enabled&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Integer Overflow ==&lt;br /&gt;
&lt;br /&gt;
When an application takes two numbers of fixed word size and perform an operation with them, the result may not fit within the same word size. For example, if the two 8-bit numbers 192 and 208 are added together and stored into another 8-bit byte, the result will not fit into an 8-bit result:&lt;br /&gt;
&lt;br /&gt;
''         1100 0000''&lt;br /&gt;
&lt;br /&gt;
''  +      1101 0000''&lt;br /&gt;
&lt;br /&gt;
''  = 0001 1001 0000''&lt;br /&gt;
&lt;br /&gt;
Although such an operation will usually cause some type of exception, your application must be coded to check for such an exception and take proper action. Otherwise, your application would report that 192 + 208 equals 144.&lt;br /&gt;
&lt;br /&gt;
The following code demonstrates a buffer overflow, and was adapted from Blexim's ''Phrack ''article:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void main(int argc, char *argv[]) {&lt;br /&gt;
    int i = atoi(argv[1]);         // input from user&lt;br /&gt;
    unsigned short s = i;          // truncate to a short&lt;br /&gt;
    char buf[50];                  // large buffer&lt;br /&gt;
&lt;br /&gt;
    if (s &amp;gt; 10) {                  // check we're not greater than 10&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    memcpy(buf, argv[2], i);       // copy i bytes to the buffer&lt;br /&gt;
    buf[i] = '\0';                 // add a null byte to the buffer&lt;br /&gt;
    printf(&amp;quot;%s\n&amp;quot;, buf);           // output the buffer contents&lt;br /&gt;
&lt;br /&gt;
    return;&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
[root /tmp]# ./inttest 65580 foobar&lt;br /&gt;
Segmentation fault&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code is exploitable because the validation does not occur on the input value (65580), but rather the value after it has been converted to an unsigned short (45). &lt;br /&gt;
&lt;br /&gt;
Integer overflows can be a problem in any language and can be exploited when integers are used in array indices and implicit short math operations. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
* Examine use of signed integers, bytes, and shorts.&lt;br /&gt;
&lt;br /&gt;
* Are there cases where these values are used as array indices after performing an arithmetic operation (+, -, *, /, or % (modulo))?&lt;br /&gt;
&lt;br /&gt;
* How would your program react to a negative or zero value for integer values, particular during array lookups?&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
* If using .NET, use David LeBlanc’s SafeInt class or a similar construct. Otherwise, use a &amp;quot;BigInteger&amp;quot; or &amp;quot;BigDecimal&amp;quot; implementation in cases where it would be hard to validate input yourself.&lt;br /&gt;
&lt;br /&gt;
* If your compiler supports the option, change the default for integers to be unsigned unless otherwise explicitly stated. Use unsigned integers whenever you don't need negative values.&lt;br /&gt;
&lt;br /&gt;
* Use range checking if your language or framework supports it, or be sure to implement range checking yourself after all arithmetic operations.&lt;br /&gt;
&lt;br /&gt;
* Be sure to check for exceptions if your language supports it.&lt;br /&gt;
&lt;br /&gt;
==Further reading ==&lt;br /&gt;
&lt;br /&gt;
* Team Teso, ''Exploiting Format String Vulnerabilities''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.cs.ucsb.edu/~jzhou/security/formats-teso.html&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Newsham, Tim, ''Format String Attacks&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.lava.net/~newsham/format-string-attacks.pdf&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* w00 w00 and Matt Conover, ''Preliminary Heap Overflow Tutorial''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.w00w00.org/files/articles/heaptut.txt&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Chris Anley, ''Creating Arbitrary Shellcode In Unicode Expanded Strings''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.ngssoftware.com/papers/unicodebo.pdf&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* David Leblanc, ''Integer Handling with the C++ SafeInt Class ''&amp;lt;u&amp;gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncode/html/secure01142004.asp&amp;lt;/u&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
* Aleph One, ''Smashing the Stack for fun and profit''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.phrack.org/phrack/49/P49-14&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Mark Donaldson, ''Inside the buffer Overflow Attack: Mechanism, method, &amp;amp; prevention''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://rr.sans.org/code/inside_buffer.php&amp;lt;/u&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
* ''NX Bit'', Wikipedia article&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://en.wikipedia.org/wiki/NX_bit&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Horizon'', How to bypass Solaris no execute stack protection&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.secinf.net/unix_security/How_to_bypass_Solaris_nonexecutable_stack_protection_.html&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Alexander Anisimov'', Defeating Microsoft Windows XP SP2 Heap protection and DEP bypass'', Positive Technologies&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.maxpatrol.com/defeating-xpsp2-heap-protection.htm&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Matt Conover, w00w00 on Heap Overflows, w00w00 Security Team&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.w00w00.org/files/articles/heaptut.txt&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Blexim, ''Basic Integer Overflows&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.phrack.org/phrack/60/p60-0x0a.txt&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* StackShield&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.angelfire.com/sk/stackshield/index.html&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* StackGuard&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.immunix.org&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Libsafe&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.research.avayalabs.com/project/libsafe&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Guide Table of Contents]]&lt;br /&gt;
[[Category:OWASP_Guide_Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Threat_Risk_Modeling&amp;diff=8118</id>
		<title>Threat Risk Modeling</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Threat_Risk_Modeling&amp;diff=8118"/>
				<updated>2006-07-25T15:23:08Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Added threat analysis program from Microsoft.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guide Table of Contents]]&lt;br /&gt;
__TOC__&lt;br /&gt;
When you start a web application design, it is essential to apply threat risk modeling; otherwise you will squander resources, time and money on useless controls that fail to focus on the real risks.&lt;br /&gt;
&lt;br /&gt;
The method used to assess risk is not nearly as important as actually performing a structured threat risk modeling. Microsoft notes that the single most important factor in their security improvement program was the corporate adoption of threat risk modeling .&lt;br /&gt;
&lt;br /&gt;
OWASP recommends Microsoft’s threat modeling process because it works well for addressing the unique challenges facing web application security and is simple to learn and adopt by designers, developers, code reviewers, and the quality assurance team.&lt;br /&gt;
&lt;br /&gt;
The following sections provide some overview information (or see Section 6.9, Further Reading, for additional resources).&lt;br /&gt;
&lt;br /&gt;
==Threat Risk Modeling ==&lt;br /&gt;
&lt;br /&gt;
Threat risk modeling is an essential process for secure web application development. It allows organizations to determine the correct controls and to produce effective countermeasures within budget. For example, there is little point in spending $100,000 for fraud control for a system that has negligible fraud risk.&lt;br /&gt;
&lt;br /&gt;
==Performing threat risk modeling using the Microsoft Threat Modeling Process ==&lt;br /&gt;
&lt;br /&gt;
The threat risk modeling process has five steps , enumerated below and shown graphically in Figure 1. They are:&lt;br /&gt;
&lt;br /&gt;
# Identify Security Objectives&lt;br /&gt;
# Survey the Application&lt;br /&gt;
# Decompose it&lt;br /&gt;
# Identify Threats&lt;br /&gt;
# Identify Vulnerabilities&lt;br /&gt;
&lt;br /&gt;
[[Image:Threat_Model_Flow.gif|Figure 1: Threat Model Flow]]&lt;br /&gt;
&lt;br /&gt;
Let’s consider the steps in more detail.&lt;br /&gt;
&lt;br /&gt;
===Identify Security Objectives ===&lt;br /&gt;
&lt;br /&gt;
The business (or project management) leadership, in concert with the software development and quality assurance teams, all need to understand the security objectives. To facilitate this, start by breaking down the application’s security objectives into the following categories:&lt;br /&gt;
&lt;br /&gt;
* '''Identity:''' Does the application protect user identity from abuse? Are there adequate controls in place to ensure evidence of identity (as required for many banking applications?)&lt;br /&gt;
&lt;br /&gt;
* '''Financial:''' Assess the level of risk the organization is prepared to absorb in remediation, as a potential financial loss. For example, forum software may have a lower estimated financial risk than an Internet banking application.&lt;br /&gt;
&lt;br /&gt;
* '''Reputation:''' Quantify or estimate of the loss of reputation derived from the application being misused or successfully attacked.&lt;br /&gt;
&lt;br /&gt;
* '''Privacy and Regulatory:''' To what extent will the application have to protect user data? Forum software by its nature is public, but a tax preparation application is subject to tax regulations and privacy legislation requirements in most countries.&lt;br /&gt;
&lt;br /&gt;
* '''Availability Guarantees:''' Is the application required to be available per a '''''Service Level Agreement (SLA)''''' or similar guarantee? Is it a nationally protected infrastructure? To what level will the application have to be available? High availability techniques are significantly more expensive, so applying the correct controls up front will save a great deal of time, resources, and money.&lt;br /&gt;
&lt;br /&gt;
This is by no means an exhaustive list, but it gives an idea of some of the business risk decisions leading into selecting and building security controls.&lt;br /&gt;
&lt;br /&gt;
Other sources of risk guidance come from:&lt;br /&gt;
&lt;br /&gt;
* Laws (such as privacy or finance laws)&lt;br /&gt;
&lt;br /&gt;
* Regulations (such as banking or e-commerce regulations)&lt;br /&gt;
&lt;br /&gt;
* Standards (such as ISO 17799)&lt;br /&gt;
&lt;br /&gt;
* Legal Agreements (such as payment card industry standards or merchant agreements)&lt;br /&gt;
&lt;br /&gt;
* Corporate Information Security Policy&lt;br /&gt;
&lt;br /&gt;
===Application Overview ===&lt;br /&gt;
&lt;br /&gt;
Once the security objectives have been defined, analyze the application design to identify the '''''components''''', '''''data flows''''', and '''''trust boundaries'''''.&lt;br /&gt;
&lt;br /&gt;
Do this by surveying the application’s architecture and design documentation. In particular, look for UML component diagrams. Such high level component diagrams are generally sufficient to understand how and why data flows to various places. For example, data movement across a trust boundary (such as from the Internet to the web tier, or from the business logic to the database server), needs to be carefully analyzed, whereas data that flows within the same trust level does not need as much scrutiny.&lt;br /&gt;
&lt;br /&gt;
===Decompose Application ===&lt;br /&gt;
&lt;br /&gt;
Once the application architecture is understood then decompose it further, to identify the features and modules with a security impact that need to be evaluated. For example, when investigating the authentication module, it is necessary to understand how data enters the module, how the module validates and processes the data, where the data flows, how the data is stored, and what fundamental decisions and assumptions are made by the module.&lt;br /&gt;
&lt;br /&gt;
===Identify Threats ===&lt;br /&gt;
&lt;br /&gt;
It is impossible to write down unknown threats, but it is likewise unlikely that new malware will be created to exploit new vulnerabilities within custom systems. Therefore, concentrate on known risks, which can be easily demonstrated using tools or techniques from Bugtraq .&lt;br /&gt;
&lt;br /&gt;
Microsoft suggests two different approaches for writing up threats. One is a threat graph, as shown in Figure 2, and the other is a structured list, as shown in Figure 3.&lt;br /&gt;
&lt;br /&gt;
[[Image:Threat_Graph.gif|Figure 2: Threat Graph]]&lt;br /&gt;
&lt;br /&gt;
Typically, a threat graph imparts more information quickly but it takes longer to construct, while a structured list is easier to create but it will take longer for the threat impacts to become obvious.&lt;br /&gt;
&lt;br /&gt;
# Attacker may be able to read other user’s messages&lt;br /&gt;
# User may not have logged off on a shared PC&lt;br /&gt;
# Data validation may allow SQL injection&lt;br /&gt;
# Implement data validation&lt;br /&gt;
# Authorization may fail, allowing unauthorized access&lt;br /&gt;
# Implement authorization checks&lt;br /&gt;
# Browser cache may contain contents of message&lt;br /&gt;
# Implement anti-caching directive in HTTP headers&lt;br /&gt;
# If eavesdropping risk is high, use SSL&lt;br /&gt;
&lt;br /&gt;
Note that it takes a motivated attacker to exploit a threat; they generally want something from your application or to obviate controls. To understand the relevant threats, use the following categories to understand who might attack the application:&lt;br /&gt;
&lt;br /&gt;
* '''Accidental Discovery:''' An ordinary user stumbles across a functional mistake in your application, just using a web browser, and gains access to privileged information or functionality.&lt;br /&gt;
&lt;br /&gt;
* '''Automated Malware:''' Programs or scripts, which are searching for known vulnerabilities, and then report them back to a central collection site.&lt;br /&gt;
&lt;br /&gt;
* '''The Curious Attacker:''' a security researcher or ordinary user, who notices something wrong with the application, and decides to pursue further.&lt;br /&gt;
&lt;br /&gt;
* '''Script Kiddies:''' Common renegades, seeking to compromise or deface applications for collateral gain, notoriety, or a political agenda, perhaps using the attack categories described in the ''OWASP Web Application Penetration Checklist.''&lt;br /&gt;
&lt;br /&gt;
* '''The Motivated Attacker:''' Potentially, a disgruntled staff member with inside knowledge or a paid professional attacker.&lt;br /&gt;
&lt;br /&gt;
* '''Organized Crime:''' Criminals seeking high stake payouts, such as cracking e-commerce or corporate banking applications, for financial gain.&lt;br /&gt;
&lt;br /&gt;
It is vital to understand the level of attacker you are defending against. For example, a motivated attacker, who understands your internal processes is often more dangerous than script kiddies.&lt;br /&gt;
&lt;br /&gt;
===STRIDE ===&lt;br /&gt;
&lt;br /&gt;
STRIDE is a methodology for identifying known threats. The STRIDE acronym is formed from the first letter of each of the following categories.&lt;br /&gt;
&lt;br /&gt;
'''''Spoofing Identity'''''&lt;br /&gt;
&lt;br /&gt;
“Identity spoofing” is a key risk for applications that have many users but provide a single execution context at the application and database level. In particular, users should not be able to become any other user or assume the attributes of another user.&lt;br /&gt;
&lt;br /&gt;
'''''Tampering with Data'''''&lt;br /&gt;
&lt;br /&gt;
Users can potentially change data delivered to them, return it, and thereby potentially manipulate client-side validation, GET and POST results, cookies, HTTP headers, and so forth. The application should not send data to the user, such as interest rates or periods, which are obtainable only from within the application itself. The application should also carefully check data received from the user and validate that it is sane and applicable before storing or using it.&lt;br /&gt;
&lt;br /&gt;
'''''Repudiation'''''&lt;br /&gt;
&lt;br /&gt;
Users may dispute transactions if there is insufficient auditing or recordkeeping of their activity. For example, if a user says, “But I didn’t transfer any money to this external account!”, and you cannot track his/her activities through the application, then it is extremely likely that the transaction will have to be written off as a loss.&lt;br /&gt;
&lt;br /&gt;
Therefore, consider if the application requires non-repudiation controls, such as web access logs, audit trails at each tier, or the same user context from top to bottom. Preferably, the application should run with the user’s privileges, not more, but this may not be possible with many off-the-shelf application frameworks.&lt;br /&gt;
&lt;br /&gt;
'''''Information Disclosure'''''&lt;br /&gt;
&lt;br /&gt;
Users are rightfully wary of submitting private details to a system. If it is possible for an attacker to publicly reveal user data at large, whether anonymously or as an authorized user, there will be an immediate loss of confidence and a substantial period of reputation loss. Therefore, applications must include strong controls to prevent user ID tampering and abuse, particularly if they use a single context to run the entire application. &lt;br /&gt;
&lt;br /&gt;
Also, consider if the user’s web browser may leak information. Some web browsers may ignore the no caching directives in HTTP headers or handle them incorrectly. In a corresponding fashion, every secure application has a responsibility to minimize the amount of information stored by the web browser, just in case it leaks or leaves information behind, which can be used by an attacker to learn details about the application, the user, or to potentially become that user.&lt;br /&gt;
&lt;br /&gt;
Finally, in implementing persistent values, keep in mind that the use of hidden fields is insecure by nature. Such storage should not be relied on to secure sensitive information or to provide adequate personal privacy safeguards.&lt;br /&gt;
&lt;br /&gt;
'''''Denial of Service'''''&lt;br /&gt;
&lt;br /&gt;
Application designers should be aware that their applications may be subject to a denial of service attack. Therefore, the use of expensive resources such as large files, complex calculations, heavy-duty searches, or long queries should be reserved for authenticated and authorized users, and not available to anonymous users.&lt;br /&gt;
&lt;br /&gt;
For applications that do not have this luxury, every facet of the application should be engineered to perform as little work as possible, to use fast and few database queries, to avoid exposing large files or unique links per user, in order to prevent simple denial of service attacks.&lt;br /&gt;
&lt;br /&gt;
'''''Elevation of Privilege'''''&lt;br /&gt;
&lt;br /&gt;
If an application provides distinct user and administrative roles, then it is vital to ensure that the user cannot elevate his/her role to a higher privilege one. In particular, simply not displaying privileged role links is insufficient. Instead, all actions should be gated through an authorization matrix, to ensure that only the permitted roles can access privileged functionality.&lt;br /&gt;
&lt;br /&gt;
===DREAD ===&lt;br /&gt;
&lt;br /&gt;
The DREAD acronym is formed from the first letter of each category below.&lt;br /&gt;
&lt;br /&gt;
DREAD modeling influences the thinking behind setting the risk rating, and is also used directly to sort the risks. The DREAD algorithm, shown below, is used to compute a risk value, which is an average of all five categories.&lt;br /&gt;
&lt;br /&gt;
'''Risk_DREAD''' = (&amp;lt;u&amp;gt;D&amp;lt;/u&amp;gt;AMAGE + &amp;lt;u&amp;gt;R&amp;lt;/u&amp;gt;EPRODUCIBILITY + &amp;lt;u&amp;gt;E&amp;lt;/u&amp;gt;XPLOITABILITY + &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt;FFECTED USERS + &amp;lt;u&amp;gt;D&amp;lt;/u&amp;gt;ISCOVERABILITY) / 5&lt;br /&gt;
&lt;br /&gt;
The calculation always produces a number between 0 and 10; the higher the number, the more serious the risk.&lt;br /&gt;
&lt;br /&gt;
Here are some examples of how to quantify the DREAD categories.&lt;br /&gt;
&lt;br /&gt;
'''''Damage Potential'''''&lt;br /&gt;
&lt;br /&gt;
* If a threat exploit occurs, how much damage will be caused?&lt;br /&gt;
**0 = Nothing	&lt;br /&gt;
**5 = Individual user data is compromised or affected.	&lt;br /&gt;
**10 = Complete system or data destruction&lt;br /&gt;
&lt;br /&gt;
'''''Reproducibility'''''&lt;br /&gt;
&lt;br /&gt;
* How easy is it to reproduce the threat exploit?&lt;br /&gt;
**0 = Very hard or impossible, even for administrators of the application.&lt;br /&gt;
**5 = One or two steps required, may need to be an authorized user.	&lt;br /&gt;
**10 = Just a web browser and the address bar is sufficient, without authentication.&lt;br /&gt;
&lt;br /&gt;
'''''Exploitability'''''&lt;br /&gt;
&lt;br /&gt;
* What is needed to exploit this threat?&lt;br /&gt;
**0 = Advanced programming and networking knowledge, with custom or advanced attack tools.	&lt;br /&gt;
**5 = Malware exists on the Internet, or an exploit is easily performed, using available attack tools.	&lt;br /&gt;
**10 = Just a web browser&lt;br /&gt;
&lt;br /&gt;
'''''Affected Users'''''&lt;br /&gt;
&lt;br /&gt;
* How many users will be affected?&lt;br /&gt;
**0 = None	&lt;br /&gt;
**5 = Some users, but not all	&lt;br /&gt;
**10 = All users&lt;br /&gt;
&lt;br /&gt;
'''''Discoverability'''''&lt;br /&gt;
&lt;br /&gt;
* How easy is it to discover this threat?&lt;br /&gt;
**0 = Very hard to impossible; requires source code or administrative access.&lt;br /&gt;
**5 = Can figure it out by guessing or by monitoring network traces.	&lt;br /&gt;
**9 = Details of faults like this are already in the public domain and can be easily discovered using a search engine.&lt;br /&gt;
**10 = The information is visible in the web browser address bar or in a form.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' When performing a security review of an existing application, “Discoverability” will often be set to 10 by convention, as it is assumed the threat issues will be discovered.&lt;br /&gt;
&lt;br /&gt;
==Alternative Threat Modeling Systems==&lt;br /&gt;
OWASP recognizes that the adoption of the Microsoft modeling process may not fit all organizations. If STRIDE and DREAD are unacceptable for some reason, we recommend that your organization “dry run” the other threat risk models discussed against an existing application or design. This will allow you to determine which approach works best for you, and to adopt the most appropriate threat modeling tools for your organization.&lt;br /&gt;
&lt;br /&gt;
'''In summary, performing threat modeling provides a far greater return than most any other control in this Guide. Therefore, make threat risk modeling an early priority in your application design process.'''&lt;br /&gt;
&lt;br /&gt;
==Trike==&lt;br /&gt;
Trike is a threat modeling framework with similarities to the Microsoft threat modeling processes. However, Trike differs because it uses a risk based approach with distinct implementation, threat, and risk models, instead of using the STRIDE/DREAD aggregated threat model (attacks, threats, and weaknesses).&lt;br /&gt;
From the Trike paper, Trike’s goals are:&lt;br /&gt;
*	With assistance from the system stakeholders, to ensure that the risk this system entails to each asset is acceptable to all stakeholders.&lt;br /&gt;
*	Be able to tell whether we have done this.&lt;br /&gt;
*	Communicate what we’ve done and its effects to the stakeholders.&lt;br /&gt;
*	Empower stakeholders to understand and reduce the risks to them and other stakeholders implied by their actions within their domains. &lt;br /&gt;
For more information on Trike, please see Section 6.9, reference 8.&lt;br /&gt;
==AS/NZS 4360:2004 Risk Management==&lt;br /&gt;
The Australian/New Zealand Standard AS/NZS 4360, first issued in 1999, and revised in 2004, is the world’s first formal standard for documenting and managing risk and is still one of the few formal standards for managing it.&lt;br /&gt;
The standard’s approach is simple (it’s only 28 pages long), flexible, and iterative. Furthermore, it does not lock organizations into a particular risk management methodology, provided the methodology fulfils the AS/NZS 4360 five steps. It also provides several sets of risk tables as examples, and allows organizations to freely develop and adopt their own.&lt;br /&gt;
&lt;br /&gt;
'''The five steps of the AS/NZS 4360 process are:'''&lt;br /&gt;
*	'''Establish Context:''' Establish the risk domain, i.e., which assets/systems are important?&lt;br /&gt;
*	'''Identify the Risks:''' Within the risk domain, what specific risks are apparent?&lt;br /&gt;
*	'''Analyze the Risks:''' Look at the risks and determine if there are any supporting controls in place.&lt;br /&gt;
*	'''Evaluate the Risks:''' Determine the residual risk.&lt;br /&gt;
*	'''Treat the Risks:''' Describe the method to treat the risks so that risks selected by the business will be mitigated.&lt;br /&gt;
AS/NZS 4360 assumes that risk will be managed by an '''''operational risk group''''', and that the organization has adequate skills and risk management resources in house to identify, analyze, and treat the risks.&lt;br /&gt;
&lt;br /&gt;
'''The advantages of AS/NZS 4360:'''&lt;br /&gt;
*	AS/NZS 4360 works well as a risk management methodology for organizations requiring Sarbanes-Oxley compliance.&lt;br /&gt;
*	AS/NZS 4360 works well for organizations that prefer to manage risks in a traditional way, such as just using likelihood and consequence to determine an overall risk. &lt;br /&gt;
*	AS/NZS 4360 is familiar to most risk managers worldwide, and your organization may already have implemented an AS/NZS 4360 compatible approach.&lt;br /&gt;
*	You are an Australian organization, and may be required to use it if you are audited on a regular basis, or to justify why you aren’t using it. Luckily, the STRIDE/DREAD model discussed earlier is AS/NZS 4360 compatible.&lt;br /&gt;
&lt;br /&gt;
'''The limitations of AS/NZS 4360:'''&lt;br /&gt;
*	The AS/NZS 4360 approach works best for business or systemic risks than for technical risks.&lt;br /&gt;
*	AS/NZS 4360 does not define the methodology to perform a structured threat risk modeling exercise.&lt;br /&gt;
*	As AS/NZS 4360 is a generic framework for managing risk, it does not provide any structured method to enumerate web application security risks. &lt;br /&gt;
Although AS/NZS 4360 may be used to rank risks for security reviews, the lack of structured methods of enumerating threats for web applications makes it less desirable than other methodologies described earlier.&lt;br /&gt;
&lt;br /&gt;
==CVSS==&lt;br /&gt;
The US Department of Homeland Security (DHS) established the NIAC Vulnerability Disclosure Working Group, which incorporates input from Cisco Systems, Symantec, ISS, Qualys, Microsoft, CERT/CC, and eBay. One of the group’s outputs is the Common '''''Vulnerability Scoring System (CVSS).'''''&lt;br /&gt;
&lt;br /&gt;
'''The advantages of CVSS:'''&lt;br /&gt;
*	You have just received notification from a security researcher or other source that your product has vulnerability, and you wish to ensure that it has an accurate and normalized severity rating, so as to alert your customers to the appropriate level of action required when you release the patch.&lt;br /&gt;
*	You are a security researcher, and have found several threat exploits within an application. You would like to use the CVSS ranking system to produce reliable risk rankings, to ensure that the ISV will take the exploits seriously as indicated by their rating.&lt;br /&gt;
*	CVSS has been recommended by the working group for use by US Government departments. However, it is unclear if it will become policy or be widely adopted at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
'''The limitations of CVSS:'''&lt;br /&gt;
*	CVSS does not find or reduce the attack surface area (i.e. design flaws), or help enumerate risks within any arbitrary piece of code, as it is just a scoring system, not a modeling methodology.&lt;br /&gt;
*	CVSS is more complex than STRIDE/DREAD, as it aims to calculate the risk of announced vulnerabilities as applied to deployed software and environmental factors.&lt;br /&gt;
*	The CVSS risk ranking is complex – a spreadsheet is required to calculate the risk components as the assumption behind CVSS is that a specific vulnerability has been identified and announced, or a worm or Trojan has been released targeting a small number of attack vectors. &lt;br /&gt;
*	The overhead of calculating the CVSS risk ranking is quite high if applied to a thorough code review, which may have 250 or more threats to rank.&lt;br /&gt;
&lt;br /&gt;
==OCTAVE==&lt;br /&gt;
OCTAVE is a heavyweight risk methodology approach originating from Carnegie Mellon University’s Software Engineering Institute (SEI) in collaboration with CERT. OCTAVE focuses on organizational risk, not technical risk.&lt;br /&gt;
OCTAVE comes in two versions: Full OCTAVE, for large organizations, and OCTAVE-S for small organizations, both of which have specific catalogs of practices, profiles, and worksheets to document the modeling outcomes.&lt;br /&gt;
&lt;br /&gt;
'''OCTAVE is popular with many sites and is useful when:'''&lt;br /&gt;
*	Implementing an organizational culture of risk management and controls becomes necessary.&lt;br /&gt;
*	Documenting and measuring business risk becomes timely.&lt;br /&gt;
*	Documenting and measuring the overall IT security risk, particularly as it relates to the corporate IT risk management, becomes necessary.&lt;br /&gt;
*	When documenting risks surrounding complete systems becomes necessary.&lt;br /&gt;
*	To accommodate a fundamental reorganization, such as when an organization does not have a working risk methodology in place, and requires a robust risk management framework to be put in place.&lt;br /&gt;
&lt;br /&gt;
'''The limitations of OCTAVE are:''' &lt;br /&gt;
*	OCTAVE is incompatible with AS/NZS 4360, as it mandates Likelihood = 1 (i.e., It assumes a threat will always occur) and this is inappropriate for many organizations. OCTAVE-S makes the inclusion of this probability optional, but this is not part of the more comprehensive OCTAVE standard.&lt;br /&gt;
*	Consisting of 18 volumes, OCTAVE is large and complex, with many worksheets and practices to implement.&lt;br /&gt;
*	It does not provide a list of “out of the box” practices for assessing and mitigating web application security risks.&lt;br /&gt;
Because of these issues, OWASP does not anticipate that OCTAVE will be used at large by application designers or developers, because it fails to take threat risk modeling into consideration, which is useful during all stages of development, by all participants, to reduce the overall risk of an application becoming vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In this chapter, we have touched on the basic principles of threat risk modeling, risk management, and web application security. Applications that leverage the underlying intent of these principles will be more secure than their counterparts, which will only be minimally compliant just by including specific controls.&lt;br /&gt;
==Further Reading==&lt;br /&gt;
*       Threat Analysis &amp;amp;amp; Modeling v2.0, © Microsoft Corporation, 2006,&lt;br /&gt;
http://www.microsoft.com/downloads/details.aspx?familyid=334AD466-8B53-4440-8FF0-6AC8142D9198&amp;amp;displaylang=en&lt;br /&gt;
&lt;br /&gt;
*	Threat Modeling Web Applications, J.D. Meier, Alex Mackman, Blaine Wastell, © Microsoft Corporation, May 2005, &lt;br /&gt;
&lt;br /&gt;
http://msdn.microsoft.com/security/securecode/threatmodeling/default.aspx?pull=/library/en-us/dnpag2/html/tmwa.asp.&lt;br /&gt;
&lt;br /&gt;
*	Improving Web Application Security: Threats and Countermeasures, J.D. Meier, Alex Mackman, Michael Dunner, Srinath Vasireddy, Ray Escamilla and Anandha Murukan, © Microsoft Corporation, June 2003, &lt;br /&gt;
&lt;br /&gt;
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/ThreatCounter.asp.&lt;br /&gt;
&lt;br /&gt;
*	Threat Modeling, Frank Swiderski and Window Snyder, Microsoft Press, June 2004, ISBM 0-7356-1991-3 or &lt;br /&gt;
&lt;br /&gt;
http://www.microsoft.com/downloads/details.aspx?FamilyID=62830f95-0e61-4f87-88a6-e7c663444ac1&amp;amp;displaylang=en.&lt;br /&gt;
&lt;br /&gt;
*	Writing Secure Code, 2nd Edition, Howard and LeBlanc, pp 69 – 124, Microsoft Press, 2003, ISBN 0-7356-1722-8.&lt;br /&gt;
&lt;br /&gt;
*	Improving Web Application Security: Threats and Countermeasures, Meier et al, Microsoft Press, 2003.&lt;br /&gt;
&lt;br /&gt;
*	The STRIDE Threat Model, © Microsoft Corporation, 2005, &lt;br /&gt;
&lt;br /&gt;
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csvr2002/htm/cs_se_securecode_zlsj.asp&lt;br /&gt;
&lt;br /&gt;
*	The DREAD Threat Model, © Microsoft Corporation, 2005.&lt;br /&gt;
&lt;br /&gt;
*	A Conceptual Model for Threat Modeling Applications, Saitta, Larcom, and Michael Eddington, July 2005, http://dymaxion.org/trike/ or &lt;br /&gt;
&lt;br /&gt;
http://dymaxion.org/trike/Trike_v1_Methodology_Document-draft.pdf.&lt;br /&gt;
&lt;br /&gt;
*	AS/NZS 4360:2004 Risk Management, Standards Australia and Standards New Zealand, &lt;br /&gt;
&lt;br /&gt;
http://www.standards.co.nz/web-shop/?action=viewSearchProduct&amp;amp;mod=catalog&amp;amp;pid=4360:2004(AS|NZS).&lt;br /&gt;
&lt;br /&gt;
*	CVSS, U.S. Department of Homeland Security library, February 2005, &lt;br /&gt;
&lt;br /&gt;
http://www.dhs.gov/interweb/assetlibrary/NIAC_CyberVulnerabilitiesPaper_Feb05.pdf.&lt;br /&gt;
&lt;br /&gt;
*	OCTAVE, CERT library, http://www.cert.org/octave/.&lt;br /&gt;
&lt;br /&gt;
==Reference==&lt;br /&gt;
[[Guide Table of Contents]]&lt;br /&gt;
[[Category:OWASP_Guide_Project]]&lt;br /&gt;
[[Category:Threat]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Guide_Frontispiece&amp;diff=8117</id>
		<title>Guide Frontispiece</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Guide_Frontispiece&amp;diff=8117"/>
				<updated>2006-07-25T15:20:25Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Sorted by last name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''A Guide to Building Secure Web Applications and Web Services'''&lt;br /&gt;
&lt;br /&gt;
2.1 	(DRAFT 3) &lt;br /&gt;
February 2006 &lt;br /&gt;
OWASP Foundation&lt;br /&gt;
&lt;br /&gt;
[[Guide Table of Contents]]&lt;br /&gt;
__TOC__&lt;br /&gt;
==Dedication ==&lt;br /&gt;
To my fellow procrastinators and TiVo addicts, this book proves that given enough “tomorrows,” anything is possible. --Andrew van der Stock&lt;br /&gt;
&lt;br /&gt;
==Copyright and license ==&lt;br /&gt;
© 2001 – 2006 OWASP Foundation. &lt;br /&gt;
The Guide is licensed under the Free Documentation License, a copy of which is found in the Appendix. PERMISSION IS GRANTED TO COPY, DISTRIBUTE, AND/OR MODIFY THIS DOCUMENT PROVIDED THIS COPYRIGHT NOTICE AND ATTRIBUTION TO OWASP IS RETAINED. &lt;br /&gt;
==Editors ==&lt;br /&gt;
The Guide has had several editors over various editions, all of whom have contributed immensely as authors, project managers, and editors over the lengthy period of the Guide’s gestation. &lt;br /&gt;
Guide 2.x series editors:&lt;br /&gt;
 &lt;br /&gt;
Andrew van der Stock&lt;br /&gt;
Adrian Wiesmann&lt;br /&gt;
 &lt;br /&gt;
==Authors and Reviewers ==&lt;br /&gt;
The Guide would not be where it is today without the generous gift of volunteer time and effort from many individuals. The following people helped develop Guide 2.x:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; &lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*Ernesto Arroyo&lt;br /&gt;
*José Pedro Arroyo&lt;br /&gt;
*Derek Browne&lt;br /&gt;
*Izhar By-Gad&lt;br /&gt;
*Daniel Cornell&lt;br /&gt;
*Martin Eizner&lt;br /&gt;
*David Endler&lt;br /&gt;
*Raoul Endres&lt;br /&gt;
*Brian Greidanus&lt;br /&gt;
*Dennis Groves&lt;br /&gt;
*Darrel Grundy&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*Robert Hansen&lt;br /&gt;
*William Hau&lt;br /&gt;
*Michael Howard&lt;br /&gt;
*Sverre Huseby&lt;br /&gt;
*Abraham Kang&lt;br /&gt;
*Eoin Keary&lt;br /&gt;
*Amit Klein&lt;br /&gt;
*Neal Krawetz&lt;br /&gt;
*Erik Lee&lt;br /&gt;
*Frank Lemmon&lt;br /&gt;
*Hal Lockhart&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*Gene McKenna&lt;br /&gt;
*Kevin McLaughlin&lt;br /&gt;
*Roy McNamara&lt;br /&gt;
*K.K. Mookhey&lt;br /&gt;
*Richard Parke&lt;br /&gt;
*Denis Pilipchuk&lt;br /&gt;
*Jeremy Poteet&lt;br /&gt;
*Michael Scovetta&lt;br /&gt;
*Mikael Simonsson&lt;br /&gt;
*Tim Smith&lt;br /&gt;
*Ray Stirbei&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*Steve Taylor&lt;br /&gt;
*Christopher Todd&lt;br /&gt;
*Nigel Tranter&lt;br /&gt;
*Andrew van der Stock&lt;br /&gt;
*Adrian Wiesmann&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Revision History ==&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 || '''Date''' || '''Version''' || '''Pages''' || '''Notes'''&lt;br /&gt;
|-&lt;br /&gt;
 || July 26, 2005 || 2.0 Blackhat Edition || 280 pages || Andrew van der Stock, Guide Lead&lt;br /&gt;
|-&lt;br /&gt;
 || July 27, 2005 || 2.0.1 Blackhat Edition++ || 293 pages || Cryptography chapter review&lt;br /&gt;
from Michael Howard incorporated&lt;br /&gt;
|-&lt;br /&gt;
 || September 12, 2005 || 2.1 DRAFT 1 || X pages || Changes from many sources&lt;br /&gt;
New SQA chapter from Frank Lemmon&lt;br /&gt;
|-&lt;br /&gt;
 || January 2006 || 2.1 DRAFT 2 || X pages || Changes from Bill Pollock&lt;br /&gt;
New chapters from Erick Lee&lt;br /&gt;
New revisions from Dan Cornell&lt;br /&gt;
|-&lt;br /&gt;
 || February 2006 || 2.1 DRAFT 3 || X pages || Ajax chapter&lt;br /&gt;
Many chapters back from reviewers&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Guide Table of Contents]]&lt;br /&gt;
[[Category:OWASP_Guide_Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Guide:Frontispiece&amp;diff=6241</id>
		<title>Guide:Frontispiece</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Guide:Frontispiece&amp;diff=6241"/>
				<updated>2006-06-14T17:02:57Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: /* Dedication */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Guide to Building Secure Web Applications and&lt;br /&gt;
Web Services&lt;br /&gt;
&lt;br /&gt;
2.1 	(DRAFT 3)&lt;br /&gt;
February 2006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OWASP Foundation&lt;br /&gt;
 &lt;br /&gt;
=Frontispiece =&lt;br /&gt;
==Dedication ==&lt;br /&gt;
''To my fellow procrastinators and TiVo addicts, this book proves that given enough &amp;quot;tomorrows&amp;quot;, anything is possible.'' -- Andrew van der Stock&lt;br /&gt;
&lt;br /&gt;
==Copyright and license ==&lt;br /&gt;
© 2001 – 2006 OWASP Foundation. &lt;br /&gt;
The Guide is licensed under the Free Documentation License, a copy of which is found in the Appendix. PERMISSION IS GRANTED TO COPY, DISTRIBUTE, AND/OR MODIFY THIS DOCUMENT PROVIDED THIS COPYRIGHT NOTICE AND ATTRIBUTION TO OWASP IS RETAINED. &lt;br /&gt;
==Editors ==&lt;br /&gt;
The Guide has had several editors over various editions, all of whom have contributed immensely as authors, project managers, and editors over the lengthy period of the Guide’s gestation. &lt;br /&gt;
Guide 2.x series editors:&lt;br /&gt;
 &lt;br /&gt;
Andrew van der Stock&lt;br /&gt;
Adrian Wiesmann&lt;br /&gt;
 &lt;br /&gt;
==Authors and Reviewers ==&lt;br /&gt;
The Guide would not be where it is today without the generous gift of volunteer time and effort from many individuals. The following people helped develop Guide 2.x:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;5&amp;quot; valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
* Abraham Kang&lt;br /&gt;
* Adrian Wiesmann&lt;br /&gt;
* Amit Klein&lt;br /&gt;
* Andrew van der Stock&lt;br /&gt;
* Brian Greidanus&lt;br /&gt;
* Christopher Todd&lt;br /&gt;
* Darrel Grundy&lt;br /&gt;
* Daniel Cornell&lt;br /&gt;
* David Endler&lt;br /&gt;
* Denis Pilipchuk&lt;br /&gt;
|&lt;br /&gt;
* Dennis Groves&lt;br /&gt;
* Derek Browne&lt;br /&gt;
* Eoin Keary&lt;br /&gt;
* Erik Lee&lt;br /&gt;
* Ernesto Arroyo&lt;br /&gt;
* Frank Lemmon&lt;br /&gt;
* Gene McKenna&lt;br /&gt;
* Hal Lockhart&lt;br /&gt;
* Izhar By-Gad&lt;br /&gt;
* Jeremy Poteet&lt;br /&gt;
|&lt;br /&gt;
* José Pedro Arroyo&lt;br /&gt;
* K.K. Mookhey&lt;br /&gt;
* Kevin McLaughlin&lt;br /&gt;
* Martin Eizner&lt;br /&gt;
* Michael Howard&lt;br /&gt;
* Michael Scovetta&lt;br /&gt;
* Mikael Simonsson&lt;br /&gt;
* Neal Krawetz&lt;br /&gt;
* Nigel Tranter&lt;br /&gt;
* Raoul Endres&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Ray Stirbei&lt;br /&gt;
* Richard Parke&lt;br /&gt;
* Robert Hansen&lt;br /&gt;
* Roy McNamara&lt;br /&gt;
* Steve Taylor&lt;br /&gt;
* Sverre Huseby&lt;br /&gt;
* Tim Smith&lt;br /&gt;
* William Hau&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Revision History ==&lt;br /&gt;
&lt;br /&gt;
'''Date'''	'''Version'''	'''Pages'''	'''Notes'''&lt;br /&gt;
July 26, 2005	2.0 Blackhat Edition	280 pages	Andrew van der Stock, Guide Lead&lt;br /&gt;
July 27, 2005	2.0.1 Blackhat Edition++	293 pages	Cryptography chapter review&lt;br /&gt;
from Michael Howard incorporated&lt;br /&gt;
September 12, 2005	2.1 DRAFT 1	X pages	Changes from many sources&lt;br /&gt;
New SQA chapter from Frank Lemmon&lt;br /&gt;
January 2006	2.1 DRAFT 2	X pages	Changes from Bill Pollock&lt;br /&gt;
New chapters from Erick Lee&lt;br /&gt;
New revisions from Dan Cornell&lt;br /&gt;
February 2006	2.1 DRAFT 3	X pages	Ajax chapter&lt;br /&gt;
Many chapters back from reviewers&lt;br /&gt;
{| border=1&lt;br /&gt;
 || '''Date''' || '''Version''' || '''Pages''' || '''Notes'''&lt;br /&gt;
|-&lt;br /&gt;
 || July 26, 2005 || 2.0 Blackhat Edition || 280 pages || Andrew van der Stock, Guide Lead&lt;br /&gt;
|-&lt;br /&gt;
 || July 27, 2005 || 2.0.1 Blackhat Edition++ || 293 pages || Cryptography chapter review&lt;br /&gt;
from Michael Howard incorporated&lt;br /&gt;
|-&lt;br /&gt;
 || September 12, 2005 || 2.1 DRAFT 1 || X pages || Changes from many sources&lt;br /&gt;
New SQA chapter from Frank Lemmon&lt;br /&gt;
|-&lt;br /&gt;
 || January 2006 || 2.1 DRAFT 2 || X pages || Changes from Bill Pollock&lt;br /&gt;
New chapters from Erick Lee&lt;br /&gt;
New revisions from Dan Cornell&lt;br /&gt;
|-&lt;br /&gt;
 || February 2006 || 2.1 DRAFT 3 || X pages || Ajax chapter&lt;br /&gt;
Many chapters back from reviewers&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Table of Contents =&lt;br /&gt;
&lt;br /&gt;
[[Guide:Table of Contents]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Guide:Frontispiece&amp;diff=6240</id>
		<title>Guide:Frontispiece</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Guide:Frontispiece&amp;diff=6240"/>
				<updated>2006-06-14T16:55:57Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Reformatted authors and reviewers section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Guide to Building Secure Web Applications and&lt;br /&gt;
Web Services&lt;br /&gt;
&lt;br /&gt;
2.1 	(DRAFT 3)&lt;br /&gt;
February 2006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OWASP Foundation&lt;br /&gt;
 &lt;br /&gt;
=Frontispiece =&lt;br /&gt;
==Dedication ==&lt;br /&gt;
To my fellow procrastinators and TiVo addicts, this book proves that given enough “tomorrows,” anything is possible.&lt;br /&gt;
Andrew van der Stock&lt;br /&gt;
==Copyright and license ==&lt;br /&gt;
© 2001 – 2006 OWASP Foundation. &lt;br /&gt;
The Guide is licensed under the Free Documentation License, a copy of which is found in the Appendix. PERMISSION IS GRANTED TO COPY, DISTRIBUTE, AND/OR MODIFY THIS DOCUMENT PROVIDED THIS COPYRIGHT NOTICE AND ATTRIBUTION TO OWASP IS RETAINED. &lt;br /&gt;
==Editors ==&lt;br /&gt;
The Guide has had several editors over various editions, all of whom have contributed immensely as authors, project managers, and editors over the lengthy period of the Guide’s gestation. &lt;br /&gt;
Guide 2.x series editors:&lt;br /&gt;
 &lt;br /&gt;
Andrew van der Stock&lt;br /&gt;
Adrian Wiesmann&lt;br /&gt;
 &lt;br /&gt;
==Authors and Reviewers ==&lt;br /&gt;
The Guide would not be where it is today without the generous gift of volunteer time and effort from many individuals. The following people helped develop Guide 2.x:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;5&amp;quot; valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
* Abraham Kang&lt;br /&gt;
* Adrian Wiesmann&lt;br /&gt;
* Amit Klein&lt;br /&gt;
* Andrew van der Stock&lt;br /&gt;
* Brian Greidanus&lt;br /&gt;
* Christopher Todd&lt;br /&gt;
* Darrel Grundy&lt;br /&gt;
* Daniel Cornell&lt;br /&gt;
* David Endler&lt;br /&gt;
* Denis Pilipchuk&lt;br /&gt;
|&lt;br /&gt;
* Dennis Groves&lt;br /&gt;
* Derek Browne&lt;br /&gt;
* Eoin Keary&lt;br /&gt;
* Erik Lee&lt;br /&gt;
* Ernesto Arroyo&lt;br /&gt;
* Frank Lemmon&lt;br /&gt;
* Gene McKenna&lt;br /&gt;
* Hal Lockhart&lt;br /&gt;
* Izhar By-Gad&lt;br /&gt;
* Jeremy Poteet&lt;br /&gt;
|&lt;br /&gt;
* José Pedro Arroyo&lt;br /&gt;
* K.K. Mookhey&lt;br /&gt;
* Kevin McLaughlin&lt;br /&gt;
* Martin Eizner&lt;br /&gt;
* Michael Howard&lt;br /&gt;
* Michael Scovetta&lt;br /&gt;
* Mikael Simonsson&lt;br /&gt;
* Neal Krawetz&lt;br /&gt;
* Nigel Tranter&lt;br /&gt;
* Raoul Endres&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* Ray Stirbei&lt;br /&gt;
* Richard Parke&lt;br /&gt;
* Robert Hansen&lt;br /&gt;
* Roy McNamara&lt;br /&gt;
* Steve Taylor&lt;br /&gt;
* Sverre Huseby&lt;br /&gt;
* Tim Smith&lt;br /&gt;
* William Hau&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Revision History ==&lt;br /&gt;
&lt;br /&gt;
'''Date'''	'''Version'''	'''Pages'''	'''Notes'''&lt;br /&gt;
July 26, 2005	2.0 Blackhat Edition	280 pages	Andrew van der Stock, Guide Lead&lt;br /&gt;
July 27, 2005	2.0.1 Blackhat Edition++	293 pages	Cryptography chapter review&lt;br /&gt;
from Michael Howard incorporated&lt;br /&gt;
September 12, 2005	2.1 DRAFT 1	X pages	Changes from many sources&lt;br /&gt;
New SQA chapter from Frank Lemmon&lt;br /&gt;
January 2006	2.1 DRAFT 2	X pages	Changes from Bill Pollock&lt;br /&gt;
New chapters from Erick Lee&lt;br /&gt;
New revisions from Dan Cornell&lt;br /&gt;
February 2006	2.1 DRAFT 3	X pages	Ajax chapter&lt;br /&gt;
Many chapters back from reviewers&lt;br /&gt;
{| border=1&lt;br /&gt;
 || '''Date''' || '''Version''' || '''Pages''' || '''Notes'''&lt;br /&gt;
|-&lt;br /&gt;
 || July 26, 2005 || 2.0 Blackhat Edition || 280 pages || Andrew van der Stock, Guide Lead&lt;br /&gt;
|-&lt;br /&gt;
 || July 27, 2005 || 2.0.1 Blackhat Edition++ || 293 pages || Cryptography chapter review&lt;br /&gt;
from Michael Howard incorporated&lt;br /&gt;
|-&lt;br /&gt;
 || September 12, 2005 || 2.1 DRAFT 1 || X pages || Changes from many sources&lt;br /&gt;
New SQA chapter from Frank Lemmon&lt;br /&gt;
|-&lt;br /&gt;
 || January 2006 || 2.1 DRAFT 2 || X pages || Changes from Bill Pollock&lt;br /&gt;
New chapters from Erick Lee&lt;br /&gt;
New revisions from Dan Cornell&lt;br /&gt;
|-&lt;br /&gt;
 || February 2006 || 2.1 DRAFT 3 || X pages || Ajax chapter&lt;br /&gt;
Many chapters back from reviewers&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Table of Contents =&lt;br /&gt;
&lt;br /&gt;
[[Guide:Table of Contents]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=What_are_web_applications%3F&amp;diff=5290</id>
		<title>What are web applications?</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=What_are_web_applications%3F&amp;diff=5290"/>
				<updated>2006-06-08T11:05:01Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Added reason why they are written in c/c++&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guide Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
In the early days of the web, web sites consisted of static pages, which severely limited interaction with the user. In the early 1990’s, this limitation was removed when web servers were modified to allow communication with server-side custom scripts. No longer were applications just static brochure-ware, edited only by those who knew the arcane mysteries of HTML; with this single change, normal users could interact with the application for the first time.&lt;br /&gt;
&lt;br /&gt;
[[Image:What are web applications.JPG]]&lt;br /&gt;
&lt;br /&gt;
This is a huge and fundamental step towards the web as we know it today. Without interactivity, there would be no e-commerce (such as Amazon), no web e-mail (Hotmail or GMail), no Internet Banking, no blogs, no online share trading, and no web forums or communities like Orkut or Friendster. The static Internet would have been vastly different to today. &lt;br /&gt;
&lt;br /&gt;
The trend towards increased interactivity has continued apace, with the advent of “Web 2.0”, a term that encompasses many existing technologies, but heavily features highly interactive, user centric, web-aware applications. &lt;br /&gt;
&lt;br /&gt;
==Technologies ==&lt;br /&gt;
&lt;br /&gt;
Initially, it was quite difficult to write sophisticated applications. The first generation web applications were primitive, usually little more than form submissions and search applications. Even these basic applications took quite a great deal of skill to craft. &lt;br /&gt;
&lt;br /&gt;
Over time, the arcane knowledge required to write applications has been reduced. Today, it is relatively easy to write sophisticated applications with modern platforms and simpler languages, like PHP or VB.NET. &lt;br /&gt;
&lt;br /&gt;
However, this push to make applications as easy to write as possible has a downside – many entry-level programmers are completely unaware of the security implications of their code. This is discussed further in the “Security Principles” chapter.&lt;br /&gt;
&lt;br /&gt;
Let’s look at the various generations of web application technology. &lt;br /&gt;
&lt;br /&gt;
==First generation – CGI ==&lt;br /&gt;
&lt;br /&gt;
Common Gateway Interface (CGI) reigned supreme from approximately 1993 through to the late 1990’s when scripting languages took over in a big way.&lt;br /&gt;
&lt;br /&gt;
CGI works by encapsulating user supplied data in environment variables. These are inherited by the custom written scripts or programs, usually developed in Perl or C. The custom programs process the supplied user data, and send fully formed HTML to the “standard out” (stdout), which is captured by the web server and passed back to the user. &lt;br /&gt;
&lt;br /&gt;
Examples of complex CGI include Hotmail, which was essentially Perl scripts running on top of FreeBSD boxes and Slashdot, again a large Perl script running under Linux&lt;br /&gt;
&lt;br /&gt;
As few sites today write new CGI applications, the techniques to secure CGI applications are not discussed within the Guide. However, many of the techniques discussed can be used with few or no changes.&lt;br /&gt;
&lt;br /&gt;
==Filters ==&lt;br /&gt;
&lt;br /&gt;
Filters can be used to control access to a web site, implement a different web application framework (such as Perl, PHP, or ASP), or to provide a security check. Filters are generally written in C/C++ because they usually integrate with the web/app server at a low-level.&lt;br /&gt;
&lt;br /&gt;
Because filters live within the execution context of the web server itself, they can be high performance. Typical examples of a filter interface include Apache web server modules, SunONE’s NSAPI, and Microsoft’s ISAPI. Because filters are rarely used specialist interfaces that can directly affect the availability of the web server, they are not considered further.&lt;br /&gt;
&lt;br /&gt;
==Scripting ==&lt;br /&gt;
&lt;br /&gt;
CGI’s lack of session management and authorization controls hampered the development of commercially useful web applications. &lt;br /&gt;
&lt;br /&gt;
Web developers turned to scripting languages, such as JavaScript and PHP to solve these problems. Scripting languages run script code within the web server, and, because the scripts are not compiled, they are more quickly developed and implemented.&lt;br /&gt;
&lt;br /&gt;
I’m not sure if that’s what you mean above but please clarify.&lt;br /&gt;
&lt;br /&gt;
Unlike low-level languages, scripting languages rarely suffer from buffer overflows or resource leaks. Thus, programmers who use them can avoid two of the most common security issues. However, they do have their disadvantages:&lt;br /&gt;
&lt;br /&gt;
* Most scripting languages aren’t strongly typed and do not promote good programming practices&lt;br /&gt;
&lt;br /&gt;
* Scripting languages are generally slower than their compiled counterparts (sometimes as much as 100 times slower)&lt;br /&gt;
&lt;br /&gt;
* Scripts often lead to unmanageable code bases that perform poorly as their size grows&lt;br /&gt;
&lt;br /&gt;
* It’s difficult (but not impossible) to write multi-tier large scale applications in scripting languages, because often the presentation, application and data tiers reside on the same machine, thus limiting scalability and security&lt;br /&gt;
&lt;br /&gt;
* Most scripting languages do not natively support remote method or web service calls, which makes it difficult to communicate with application servers and external web services. &lt;br /&gt;
&lt;br /&gt;
Despite their disadvantages, many large and useful applications have been written with scripting languages, such as eGroupWare (egroupware.org), which is written in PHP. Too, many older Internet banking sites are written in ASP. &lt;br /&gt;
&lt;br /&gt;
Scripting frameworks include ASP, Perl, Cold Fusion, and PHP. However, many of these would be considered interpreted hybrids now, particularly later versions of PHP and Cold Fusion, which pre-tokenize and optimize scripts. &lt;br /&gt;
&lt;br /&gt;
==Web application frameworks – J2EE and ASP.NET ==&lt;br /&gt;
&lt;br /&gt;
As scripting languages reached the boundaries of performance and scalability, many larger vendors jumped on Sun’s J2EE web development platform. There are many J2EE implementations, including Tomcat from the Apache Foundation and _______. &lt;br /&gt;
&lt;br /&gt;
J2EE:&lt;br /&gt;
&lt;br /&gt;
* Uses the Java language to produce applications which run nearly as quickly as C++ based ones, and that do not easily suffer from buffer overflows and memory leaks&lt;br /&gt;
&lt;br /&gt;
* Allowed large distributed applications to run acceptably for the first time&lt;br /&gt;
&lt;br /&gt;
* Possesses good session and authorization controls&lt;br /&gt;
&lt;br /&gt;
* Enabled relatively transparent multi-tier applications via various remote component invocation mechanisms, and &lt;br /&gt;
&lt;br /&gt;
* Is strongly typed to prevent many common security and programming issues before the program even runs&lt;br /&gt;
&lt;br /&gt;
J2EE’s downside is that it has a steep learning curve which  makes it difficult for web designers and entry-level programmers to use it to write applications. While certain graphical development tools make it somewhat easier to program with J2EE, a scripting language like PHP is still much easier to use.&lt;br /&gt;
&lt;br /&gt;
When Microsoft updated their ASP technology to ASP.NET. which mimics the J2EE framework in many ways, they offered several improvements on the development process. For example, .NET: &lt;br /&gt;
&lt;br /&gt;
* Makes it easy for entry level programmers and web designers to whip up smaller applications &lt;br /&gt;
&lt;br /&gt;
* Allows large distributed applications &lt;br /&gt;
&lt;br /&gt;
* Offers good session and authorization controls&lt;br /&gt;
&lt;br /&gt;
* Allows programmers to use their favorite language, which is compiled to native code for excellent performance (near C++ speeds), along with buffer overflow and resource garbage collection &lt;br /&gt;
&lt;br /&gt;
* Permits transparent communication with remote and external components&lt;br /&gt;
&lt;br /&gt;
* Is strongly typed to prevent many common security and programming issues before the program even runs&lt;br /&gt;
&lt;br /&gt;
The choice of J2EE or ASP.NET frameworks is largely dependent upon platform. There is little reason to choose one over the other from a security perspective.&lt;br /&gt;
&lt;br /&gt;
Applications targeting J2EE theoretically can run with few (if any) changes between any of the major vendors and on many platforms from Linux, to AIX, MacOS X, or Windows. (While in practice, some tweaking is required, complete re-writes are not required. )&lt;br /&gt;
&lt;br /&gt;
# ''ASP.Net is primarily available for Microsoft Windows. The Mono project (http://www.go-mono.com/) can run ASP.NET applications on many platforms including Solaris, Netware, and Linux. ''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Small to medium scale applications ==&lt;br /&gt;
&lt;br /&gt;
Most applications are either small or medium scale. The usual architecture is a simple linear procedural script. This is the most common form of coding for ASP, Cold Fusion and PHP scripts, but rarer (but not impossible) for ASP.NET and J2EE applications. &lt;br /&gt;
&lt;br /&gt;
The reason for this architecture is that it is easy to write, and few skills are required to maintain the code. For smaller applications, any perceived performance benefit from moving to a more scalable architecture will never be recovered in the runtime for those applications. For example, if it takes an additional three weeks of developer time to re-factor the scripts into an MVC approach, the three weeks will never be recovered (or noticed by end users) from the improvements in scalability.&lt;br /&gt;
&lt;br /&gt;
It is typical to find many security issues in such applications, including dynamic database queries constructed from insufficiently validated data input, poor error handling and weak authorization controls. &lt;br /&gt;
&lt;br /&gt;
This Guide provides advice throughout to help improve the security of these applications. &lt;br /&gt;
&lt;br /&gt;
==Large scale applications ==&lt;br /&gt;
&lt;br /&gt;
Larger applications need a different architecture to that of a simple survey or feedback form. As applications get larger, it becomes ever more difficult to implement and maintain features and to keep scalability high. Using scalable application architectures becomes a necessity rather than a luxury when an application needs more than about three database tables or presents more than approximately 20 - 50 functions to a user.&lt;br /&gt;
&lt;br /&gt;
Scalable application architecture is often divided into tiers, and if design patterns are used, often broken down into re-usable chunks using specific guidelines to enforce modularity, interface requirements and object re-use. Breaking the application into tiers allows the application to be distributed to various servers, thus improving the scalability of the application at the expense of complexity. &lt;br /&gt;
&lt;br /&gt;
One of the most common web application architectures is model-view-controller (MVC), which implements the Smalltalk 80 application architecture. MVC is typical of most Apache Foundation Jakarta Struts J2EE applications, and the code-behinds of ASP.NET can be considered a partial implementation of this approach. For PHP, the WACT project (http://wact.sourceforge.net) aims to implement the MVC paradigm in a PHP friendly fashion.&lt;br /&gt;
&lt;br /&gt;
==View ==&lt;br /&gt;
&lt;br /&gt;
The front-end rendering code, often called the presentation tier, should aim to produce the HTML output for the user with little to no application logic.&lt;br /&gt;
&lt;br /&gt;
As many applications will be internationalized (i.e. contain no localized strings or culture information in the presentation layer), they must use calls into the model (application logic) to obtain the data required to render useful information to the user in their preferred language and culture, script direction, and units.&lt;br /&gt;
&lt;br /&gt;
All user input is directed back to controllers in the application logic.&lt;br /&gt;
&lt;br /&gt;
==Controller ==&lt;br /&gt;
&lt;br /&gt;
The controller (or application logic) takes input from the users and gates it through various workflows that call on the application’s model objects to retrieve, process, or store the data. &lt;br /&gt;
&lt;br /&gt;
Well written controllers centrally server-side validate input data against common security issues before passing the data to the model for processing, and ensure that output is safe or in a ready form for safe output by the view code.&lt;br /&gt;
&lt;br /&gt;
As the application is likely to be internationalized and accessible, the data needs to be in the local language and culture. For example, dates cannot only be in different orders, but an entirely different calendar could be in use. Applications need to be flexible about presenting and storing data. Simply displaying “7/4/2005” is ambiguous to anyone outside a few countries. &lt;br /&gt;
&lt;br /&gt;
==Model ==&lt;br /&gt;
&lt;br /&gt;
Models encapsulate functionality, such as “Account” or “User”. A good model should be transparent to the caller, and provide a method to deal with high-level business processes rather than a thin shim to the data store. For example, a good model will allow pseudo code such as this to exist in the controller:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
oAccount-&amp;gt;TransferFunds(fromAcct, ToAcct, Amount)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rather than writing it such as this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ( oAccount-&amp;gt;isMyAcct(fromAcct) &amp;amp;&amp;amp;&lt;br /&gt;
     amount &amp;lt; oAccount-&amp;gt;getMaxTransferLimit() &amp;amp;&amp;amp;&lt;br /&gt;
     oAccount-&amp;gt;getBalance(fromAcct) &amp;gt; amount &amp;amp;&amp;amp;&lt;br /&gt;
     oAccount-&amp;gt;ToAccountExists(ToAcct) )&lt;br /&gt;
then&lt;br /&gt;
     if oAccount-&amp;gt;withdraw(fromAcct, Amount) == OK &lt;br /&gt;
     then oAccount-&amp;gt;deposit(ToAcct, Amount)&lt;br /&gt;
     end if&lt;br /&gt;
end if&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The idea is to encapsulate the actual dirty work into the model code, rather than exposing primitives. If the controller and model are on different machines, the performance difference will be staggering, so it is important for the model to be useful at a high level. &lt;br /&gt;
&lt;br /&gt;
The model is responsible for checking data against business rules, and any residual risks unique to the data store in use. For example, if a model stores data in a flat file, the code needs to check for OS injection commands if the flat files are named by the user. If the model stores data in an interpreted language, such as SQL, then the model is responsible for preventing SQL injection. If it uses a message queue interface to a mainframe, the message queue data format (typically XML) needs to be well formed and compliant with a DTD. &lt;br /&gt;
&lt;br /&gt;
The contract between the controller and the model needs to be carefully considered to ensure that data is strongly typed, with reasonable structure (syntax), and appropriate length, whilst allowing flexibility to allow for internationalization and future needs.&lt;br /&gt;
&lt;br /&gt;
Calls by the model to the data store should be through the most secure method possible. Often the weakest possibility is dynamic queries, where a string is built up from unverified user input. This leads directly to SQL injection and is frowned upon. For more information, see the Interpreter Injections chapter. &lt;br /&gt;
&lt;br /&gt;
The best performance and highest security is often obtained through parameterized stored procedures, followed by parameterized queries (also known as prepared statements) with strong typing of the parameters and schema. The major reason for using stored procedures is to minimize network traffic for a multi-stage transaction or to remove security sensitive information from traversing the network. &lt;br /&gt;
&lt;br /&gt;
Stored procedures are not always a good idea – they tie you to a particular database vendor and many implementations are not fast for numeric computation. If you use the 80/20 rule for optimization and move the slow and high-risk transactions to stored procedures, the wins can be worthwhile from a security and performance perspective.&lt;br /&gt;
&lt;br /&gt;
==Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Web applications can be written in many different ways, and in many different languages. Although the Guide concentrates upon three common choices for its examples (PHP, J2EE and ASP.NET), the Guide can be used with any web application technology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Guide Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP_Guide_Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=What_are_web_applications%3F&amp;diff=5289</id>
		<title>What are web applications?</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=What_are_web_applications%3F&amp;diff=5289"/>
				<updated>2006-06-08T11:01:43Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Reformatted code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guide Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
In the early days of the web, web sites consisted of static pages, which severely limited interaction with the user. In the early 1990’s, this limitation was removed when web servers were modified to allow communication with server-side custom scripts. No longer were applications just static brochure-ware, edited only by those who knew the arcane mysteries of HTML; with this single change, normal users could interact with the application for the first time.&lt;br /&gt;
&lt;br /&gt;
[[Image:What are web applications.JPG]]&lt;br /&gt;
&lt;br /&gt;
This is a huge and fundamental step towards the web as we know it today. Without interactivity, there would be no e-commerce (such as Amazon), no web e-mail (Hotmail or GMail), no Internet Banking, no blogs, no online share trading, and no web forums or communities like Orkut or Friendster. The static Internet would have been vastly different to today. &lt;br /&gt;
&lt;br /&gt;
The trend towards increased interactivity has continued apace, with the advent of “Web 2.0”, a term that encompasses many existing technologies, but heavily features highly interactive, user centric, web-aware applications. &lt;br /&gt;
&lt;br /&gt;
==Technologies ==&lt;br /&gt;
&lt;br /&gt;
Initially, it was quite difficult to write sophisticated applications. The first generation web applications were primitive, usually little more than form submissions and search applications. Even these basic applications took quite a great deal of skill to craft. &lt;br /&gt;
&lt;br /&gt;
Over time, the arcane knowledge required to write applications has been reduced. Today, it is relatively easy to write sophisticated applications with modern platforms and simpler languages, like PHP or VB.NET. &lt;br /&gt;
&lt;br /&gt;
However, this push to make applications as easy to write as possible has a downside – many entry-level programmers are completely unaware of the security implications of their code. This is discussed further in the “Security Principles” chapter.&lt;br /&gt;
&lt;br /&gt;
Let’s look at the various generations of web application technology. &lt;br /&gt;
&lt;br /&gt;
==First generation – CGI ==&lt;br /&gt;
&lt;br /&gt;
Common Gateway Interface (CGI) reigned supreme from approximately 1993 through to the late 1990’s when scripting languages took over in a big way.&lt;br /&gt;
&lt;br /&gt;
CGI works by encapsulating user supplied data in environment variables. These are inherited by the custom written scripts or programs, usually developed in Perl or C. The custom programs process the supplied user data, and send fully formed HTML to the “standard out” (stdout), which is captured by the web server and passed back to the user. &lt;br /&gt;
&lt;br /&gt;
Examples of complex CGI include Hotmail, which was essentially Perl scripts running on top of FreeBSD boxes and Slashdot, again a large Perl script running under Linux&lt;br /&gt;
&lt;br /&gt;
As few sites today write new CGI applications, the techniques to secure CGI applications are not discussed within the Guide. However, many of the techniques discussed can be used with few or no changes.&lt;br /&gt;
&lt;br /&gt;
==Filters ==&lt;br /&gt;
&lt;br /&gt;
Filters can be used to control access to a web site, implement a different web application framework (such as Perl, PHP, or ASP), or to provide a security check. Filters must be written in C or C++ because __________.&lt;br /&gt;
&lt;br /&gt;
Because filters live within the execution context of the web server itself, they can be high performance. Typical examples of a filter interface include Apache web server modules, SunONE’s NSAPI, and Microsoft’s ISAPI. Because filters are rarely used specialist interfaces that can directly affect the availability of the web server, they are not considered further.&lt;br /&gt;
&lt;br /&gt;
==Scripting ==&lt;br /&gt;
&lt;br /&gt;
CGI’s lack of session management and authorization controls hampered the development of commercially useful web applications. &lt;br /&gt;
&lt;br /&gt;
Web developers turned to scripting languages, such as JavaScript and PHP to solve these problems. Scripting languages run script code within the web server, and, because the scripts are not compiled, they are more quickly developed and implemented.&lt;br /&gt;
&lt;br /&gt;
I’m not sure if that’s what you mean above but please clarify.&lt;br /&gt;
&lt;br /&gt;
Unlike low-level languages, scripting languages rarely suffer from buffer overflows or resource leaks. Thus, programmers who use them can avoid two of the most common security issues. However, they do have their disadvantages:&lt;br /&gt;
&lt;br /&gt;
* Most scripting languages aren’t strongly typed and do not promote good programming practices&lt;br /&gt;
&lt;br /&gt;
* Scripting languages are generally slower than their compiled counterparts (sometimes as much as 100 times slower)&lt;br /&gt;
&lt;br /&gt;
* Scripts often lead to unmanageable code bases that perform poorly as their size grows&lt;br /&gt;
&lt;br /&gt;
* It’s difficult (but not impossible) to write multi-tier large scale applications in scripting languages, because often the presentation, application and data tiers reside on the same machine, thus limiting scalability and security&lt;br /&gt;
&lt;br /&gt;
* Most scripting languages do not natively support remote method or web service calls, which makes it difficult to communicate with application servers and external web services. &lt;br /&gt;
&lt;br /&gt;
Despite their disadvantages, many large and useful applications have been written with scripting languages, such as eGroupWare (egroupware.org), which is written in PHP. Too, many older Internet banking sites are written in ASP. &lt;br /&gt;
&lt;br /&gt;
Scripting frameworks include ASP, Perl, Cold Fusion, and PHP. However, many of these would be considered interpreted hybrids now, particularly later versions of PHP and Cold Fusion, which pre-tokenize and optimize scripts. &lt;br /&gt;
&lt;br /&gt;
==Web application frameworks – J2EE and ASP.NET ==&lt;br /&gt;
&lt;br /&gt;
As scripting languages reached the boundaries of performance and scalability, many larger vendors jumped on Sun’s J2EE web development platform. There are many J2EE implementations, including Tomcat from the Apache Foundation and _______. &lt;br /&gt;
&lt;br /&gt;
J2EE:&lt;br /&gt;
&lt;br /&gt;
* Uses the Java language to produce applications which run nearly as quickly as C++ based ones, and that do not easily suffer from buffer overflows and memory leaks&lt;br /&gt;
&lt;br /&gt;
* Allowed large distributed applications to run acceptably for the first time&lt;br /&gt;
&lt;br /&gt;
* Possesses good session and authorization controls&lt;br /&gt;
&lt;br /&gt;
* Enabled relatively transparent multi-tier applications via various remote component invocation mechanisms, and &lt;br /&gt;
&lt;br /&gt;
* Is strongly typed to prevent many common security and programming issues before the program even runs&lt;br /&gt;
&lt;br /&gt;
J2EE’s downside is that it has a steep learning curve which  makes it difficult for web designers and entry-level programmers to use it to write applications. While certain graphical development tools make it somewhat easier to program with J2EE, a scripting language like PHP is still much easier to use.&lt;br /&gt;
&lt;br /&gt;
When Microsoft updated their ASP technology to ASP.NET. which mimics the J2EE framework in many ways, they offered several improvements on the development process. For example, .NET: &lt;br /&gt;
&lt;br /&gt;
* Makes it easy for entry level programmers and web designers to whip up smaller applications &lt;br /&gt;
&lt;br /&gt;
* Allows large distributed applications &lt;br /&gt;
&lt;br /&gt;
* Offers good session and authorization controls&lt;br /&gt;
&lt;br /&gt;
* Allows programmers to use their favorite language, which is compiled to native code for excellent performance (near C++ speeds), along with buffer overflow and resource garbage collection &lt;br /&gt;
&lt;br /&gt;
* Permits transparent communication with remote and external components&lt;br /&gt;
&lt;br /&gt;
* Is strongly typed to prevent many common security and programming issues before the program even runs&lt;br /&gt;
&lt;br /&gt;
The choice of J2EE or ASP.NET frameworks is largely dependent upon platform. There is little reason to choose one over the other from a security perspective.&lt;br /&gt;
&lt;br /&gt;
Applications targeting J2EE theoretically can run with few (if any) changes between any of the major vendors and on many platforms from Linux, to AIX, MacOS X, or Windows. (While in practice, some tweaking is required, complete re-writes are not required. )&lt;br /&gt;
&lt;br /&gt;
# ''ASP.Net is primarily available for Microsoft Windows. The Mono project (http://www.go-mono.com/) can run ASP.NET applications on many platforms including Solaris, Netware, and Linux. ''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Small to medium scale applications ==&lt;br /&gt;
&lt;br /&gt;
Most applications are either small or medium scale. The usual architecture is a simple linear procedural script. This is the most common form of coding for ASP, Cold Fusion and PHP scripts, but rarer (but not impossible) for ASP.NET and J2EE applications. &lt;br /&gt;
&lt;br /&gt;
The reason for this architecture is that it is easy to write, and few skills are required to maintain the code. For smaller applications, any perceived performance benefit from moving to a more scalable architecture will never be recovered in the runtime for those applications. For example, if it takes an additional three weeks of developer time to re-factor the scripts into an MVC approach, the three weeks will never be recovered (or noticed by end users) from the improvements in scalability.&lt;br /&gt;
&lt;br /&gt;
It is typical to find many security issues in such applications, including dynamic database queries constructed from insufficiently validated data input, poor error handling and weak authorization controls. &lt;br /&gt;
&lt;br /&gt;
This Guide provides advice throughout to help improve the security of these applications. &lt;br /&gt;
&lt;br /&gt;
==Large scale applications ==&lt;br /&gt;
&lt;br /&gt;
Larger applications need a different architecture to that of a simple survey or feedback form. As applications get larger, it becomes ever more difficult to implement and maintain features and to keep scalability high. Using scalable application architectures becomes a necessity rather than a luxury when an application needs more than about three database tables or presents more than approximately 20 - 50 functions to a user.&lt;br /&gt;
&lt;br /&gt;
Scalable application architecture is often divided into tiers, and if design patterns are used, often broken down into re-usable chunks using specific guidelines to enforce modularity, interface requirements and object re-use. Breaking the application into tiers allows the application to be distributed to various servers, thus improving the scalability of the application at the expense of complexity. &lt;br /&gt;
&lt;br /&gt;
One of the most common web application architectures is model-view-controller (MVC), which implements the Smalltalk 80 application architecture. MVC is typical of most Apache Foundation Jakarta Struts J2EE applications, and the code-behinds of ASP.NET can be considered a partial implementation of this approach. For PHP, the WACT project (http://wact.sourceforge.net) aims to implement the MVC paradigm in a PHP friendly fashion.&lt;br /&gt;
&lt;br /&gt;
==View ==&lt;br /&gt;
&lt;br /&gt;
The front-end rendering code, often called the presentation tier, should aim to produce the HTML output for the user with little to no application logic.&lt;br /&gt;
&lt;br /&gt;
As many applications will be internationalized (i.e. contain no localized strings or culture information in the presentation layer), they must use calls into the model (application logic) to obtain the data required to render useful information to the user in their preferred language and culture, script direction, and units.&lt;br /&gt;
&lt;br /&gt;
All user input is directed back to controllers in the application logic.&lt;br /&gt;
&lt;br /&gt;
==Controller ==&lt;br /&gt;
&lt;br /&gt;
The controller (or application logic) takes input from the users and gates it through various workflows that call on the application’s model objects to retrieve, process, or store the data. &lt;br /&gt;
&lt;br /&gt;
Well written controllers centrally server-side validate input data against common security issues before passing the data to the model for processing, and ensure that output is safe or in a ready form for safe output by the view code.&lt;br /&gt;
&lt;br /&gt;
As the application is likely to be internationalized and accessible, the data needs to be in the local language and culture. For example, dates cannot only be in different orders, but an entirely different calendar could be in use. Applications need to be flexible about presenting and storing data. Simply displaying “7/4/2005” is ambiguous to anyone outside a few countries. &lt;br /&gt;
&lt;br /&gt;
==Model ==&lt;br /&gt;
&lt;br /&gt;
Models encapsulate functionality, such as “Account” or “User”. A good model should be transparent to the caller, and provide a method to deal with high-level business processes rather than a thin shim to the data store. For example, a good model will allow pseudo code such as this to exist in the controller:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
oAccount-&amp;gt;TransferFunds(fromAcct, ToAcct, Amount)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rather than writing it such as this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ( oAccount-&amp;gt;isMyAcct(fromAcct) &amp;amp;&amp;amp;&lt;br /&gt;
     amount &amp;lt; oAccount-&amp;gt;getMaxTransferLimit() &amp;amp;&amp;amp;&lt;br /&gt;
     oAccount-&amp;gt;getBalance(fromAcct) &amp;gt; amount &amp;amp;&amp;amp;&lt;br /&gt;
     oAccount-&amp;gt;ToAccountExists(ToAcct) )&lt;br /&gt;
then&lt;br /&gt;
     if oAccount-&amp;gt;withdraw(fromAcct, Amount) == OK &lt;br /&gt;
     then oAccount-&amp;gt;deposit(ToAcct, Amount)&lt;br /&gt;
     end if&lt;br /&gt;
end if&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The idea is to encapsulate the actual dirty work into the model code, rather than exposing primitives. If the controller and model are on different machines, the performance difference will be staggering, so it is important for the model to be useful at a high level. &lt;br /&gt;
&lt;br /&gt;
The model is responsible for checking data against business rules, and any residual risks unique to the data store in use. For example, if a model stores data in a flat file, the code needs to check for OS injection commands if the flat files are named by the user. If the model stores data in an interpreted language, such as SQL, then the model is responsible for preventing SQL injection. If it uses a message queue interface to a mainframe, the message queue data format (typically XML) needs to be well formed and compliant with a DTD. &lt;br /&gt;
&lt;br /&gt;
The contract between the controller and the model needs to be carefully considered to ensure that data is strongly typed, with reasonable structure (syntax), and appropriate length, whilst allowing flexibility to allow for internationalization and future needs.&lt;br /&gt;
&lt;br /&gt;
Calls by the model to the data store should be through the most secure method possible. Often the weakest possibility is dynamic queries, where a string is built up from unverified user input. This leads directly to SQL injection and is frowned upon. For more information, see the Interpreter Injections chapter. &lt;br /&gt;
&lt;br /&gt;
The best performance and highest security is often obtained through parameterized stored procedures, followed by parameterized queries (also known as prepared statements) with strong typing of the parameters and schema. The major reason for using stored procedures is to minimize network traffic for a multi-stage transaction or to remove security sensitive information from traversing the network. &lt;br /&gt;
&lt;br /&gt;
Stored procedures are not always a good idea – they tie you to a particular database vendor and many implementations are not fast for numeric computation. If you use the 80/20 rule for optimization and move the slow and high-risk transactions to stored procedures, the wins can be worthwhile from a security and performance perspective.&lt;br /&gt;
&lt;br /&gt;
==Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Web applications can be written in many different ways, and in many different languages. Although the Guide concentrates upon three common choices for its examples (PHP, J2EE and ASP.NET), the Guide can be used with any web application technology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Guide Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP_Guide_Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category_talk:OWASP_Guide_Project&amp;diff=5162</id>
		<title>Category talk:OWASP Guide Project</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category_talk:OWASP_Guide_Project&amp;diff=5162"/>
				<updated>2006-06-07T15:57:03Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: question about official version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently in the process of uploading the current draft. Each page discussion has the edit notes as I know them. [[User:Vanderaj|Vanderaj]]&lt;br /&gt;
&lt;br /&gt;
Is the official Guide version the word docs or the wiki now? (I don't want to make updates and have them get replaced) [[User:Scovetta|Scovetta]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Buffer_Overflows&amp;diff=5161</id>
		<title>Buffer Overflows</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Buffer_Overflows&amp;diff=5161"/>
				<updated>2006-06-07T15:55:03Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Fixed formatting for code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guide Table of Contents]]__TOC__'''&lt;br /&gt;
&lt;br /&gt;
==Objective ==&lt;br /&gt;
&lt;br /&gt;
To ensure that:&lt;br /&gt;
&lt;br /&gt;
* Applications do not expose themselves to faulty components&lt;br /&gt;
&lt;br /&gt;
* Applications create as few buffer overflows as possible&lt;br /&gt;
&lt;br /&gt;
* Developers are encouraged to use languages and frameworks that are relatively immune to buffer overflows. &lt;br /&gt;
&lt;br /&gt;
==Platforms Affected ==&lt;br /&gt;
&lt;br /&gt;
Almost every platform, with the following notable exceptions:&lt;br /&gt;
&lt;br /&gt;
* Java/J2EE – as long as native methods or system calls are not invoked&lt;br /&gt;
&lt;br /&gt;
* .NET – as long as unsafe or unmanaged code is not invoked (such as the use of P/Invoke or COM Interop)&lt;br /&gt;
&lt;br /&gt;
* PHP, Python, Perl – as long as external programs or vulnerable extensions are not used.&lt;br /&gt;
&lt;br /&gt;
==Relevant COBIT Topics ==&lt;br /&gt;
&lt;br /&gt;
DS11.9 – Data processing integrity.&lt;br /&gt;
&lt;br /&gt;
==Description ==&lt;br /&gt;
&lt;br /&gt;
Attackers generally use buffer overflows to corrupt the execution stack of a web application. By sending carefully crafted input to a web application, an attacker can cause the web application to execute arbitrary code, possibly taking over the machine. Attackers have managed to identify buffer overflows in a staggering array of products and components. &lt;br /&gt;
&lt;br /&gt;
Buffer overflow flaws can be present in both the web server and application server products that serve the static and dynamic portions of a site, or in the web application itself. Buffer overflows found in commonly used server products are likely to become widely known and can pose a significant risk to users of these products. When web applications use libraries, such as a graphics library to generate images or a communications library to send e-mail, they open themselves to potential buffer overflow attacks. Literature detailing buffer overflow attacks against commonly used products is readily available, and newly discovered vulnerabilities are reported almost daily. &lt;br /&gt;
&lt;br /&gt;
Buffer overflows can also be found in custom web application code, and may even be more likely, given the lack of scrutiny that web applications typically go through. Buffer overflow attacks against customized web applications can sometimes lead to interesting results. In some cases, we have discovered that sending large inputs can cause the web application or the back-end database to malfunction. It is possible to cause a denial of service attack against the web site, depending on the severity and specific nature of the flaw. Overly large inputs could cause the application to display a detailed error message, potentially leading to a successful attack on the system.&lt;br /&gt;
&lt;br /&gt;
Buffer overflow attacks generally rely upon two techniques (and usually the combination):&lt;br /&gt;
&lt;br /&gt;
* Writing data to particular memory addresses&lt;br /&gt;
&lt;br /&gt;
* Having the operating system mishandle data types&lt;br /&gt;
&lt;br /&gt;
* This means that strongly-typed programming languages (and environments) that disallow direct memory access usually prevent buffer overflows from happening.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
&lt;br /&gt;
 || * Language/Environment || * Compiled or Interpreted || * Strongly Typed || * Direct Memory Access || * Safe or Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Java, Java Virtual Machine (JVM) || * Both || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * .NET || * Both || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Perl  || * Both || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Python - interpreted || * Intepreted || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Ruby || * Interpreted || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * C/C++ || * Compiled || * No || * Yes || * Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Assembly || * Compiled || * No || * Yes || * Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * COBOL || * Compiled || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Table 8.1: Language descriptions&lt;br /&gt;
&lt;br /&gt;
==General Prevention Techniques ==&lt;br /&gt;
&lt;br /&gt;
A number of general techniques to prevent buffer overflows include:&lt;br /&gt;
&lt;br /&gt;
* Code auditing (automated or manual)&lt;br /&gt;
&lt;br /&gt;
* Developer training – bounds checking, use of unsafe functions, and group standards&lt;br /&gt;
&lt;br /&gt;
* Non-executable stacks – many operating systems have at least some support for this&lt;br /&gt;
&lt;br /&gt;
* Compiler tools – StackShield, StackGuard, and Libsafe, among others&lt;br /&gt;
&lt;br /&gt;
* Safe functions – use strncat instead of strcat, strncpy instead of strcpy, etc&lt;br /&gt;
&lt;br /&gt;
* Patches – Be sure to keep your web and application servers fully patched, and be aware of bug reports relating to applications upon which your code is dependent.&lt;br /&gt;
&lt;br /&gt;
* Periodically scan your application with one or more of the commonly available scanners that look for buffer overflow flaws in your server products and your custom web applications. &lt;br /&gt;
&lt;br /&gt;
==Stack Overflow ==&lt;br /&gt;
&lt;br /&gt;
Stack overflows are the best understood and the most common form of buffer overflows. The basics of a stack overflow is simple:&lt;br /&gt;
&lt;br /&gt;
* There are two buffers, a source buffer containing arbitrary input (presumably from the attacker), and a destination buffer that is too small for the attack input. The second buffer resides on the stack and somewhat adjacent to the function return address on the stack.&lt;br /&gt;
&lt;br /&gt;
* The faulty code does ''not'' check that the source buffer is too large to fit in the destination buffer. It copies the attack input to the destination buffer, overwriting additional information on the stack (such as the function return address).&lt;br /&gt;
&lt;br /&gt;
* When the function returns, the CPU unwinds the stack frame and pops the (now modified) return address from the stack.&lt;br /&gt;
&lt;br /&gt;
* Control does not return to the function as it should. Instead, arbitrary code (chosen by the attacker when crafting the initial input) is executed. &lt;br /&gt;
&lt;br /&gt;
The following example, written in C, demonstrates a stack overflow exploit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void f(char* s) {&lt;br /&gt;
    char buffer[10];&lt;br /&gt;
    strcpy(buffer, s);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void main(void) {&lt;br /&gt;
    f(&amp;quot;01234567890123456789&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[root /tmp]# ./stacktest&lt;br /&gt;
&lt;br /&gt;
Segmentation fault&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language) that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* copies data from one buffer on the stack to another without checking sizes first AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values or non-executable stacks to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
it is likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
# Deploy on systems capable of using non-executable stacks, such as:&lt;br /&gt;
## AMD and Intel x86-64 chips with associated 64-bit operating systems&lt;br /&gt;
## Windows XP SP2 (both 32- and 64-bit)&lt;br /&gt;
## Windows 2003 SP1 (both 32- and 64-bit)&lt;br /&gt;
## Linux after 2.6.8 on AMD and x86-64 processors in 32- and 64-bit mode&lt;br /&gt;
## OpenBSD (w^x on Intel, AMD, SPARC, Alpha and PowerPC)&lt;br /&gt;
## Solaris 2.6 and later with the “noexec_user_stack” flag enabled&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Heap Overflow ==&lt;br /&gt;
&lt;br /&gt;
Heap overflows are problematic in that they are not necessarily protected by CPUs capable of using non-execuable stacks. A heap is an area of memory allocated by the application at run-time to store data. The following example, written in C, shows a heap overflow exploit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #define BSIZE 16&lt;br /&gt;
 #define OVERSIZE 8 /* overflow buf2 by OVERSIZE bytes */&lt;br /&gt;
&lt;br /&gt;
 void main(void) {&lt;br /&gt;
    u_long b_diff;&lt;br /&gt;
    char *buf0 = (char*)malloc(BSIZE);		// create two buffers&lt;br /&gt;
    char *buf1 = (char*)malloc(BSIZE);&lt;br /&gt;
&lt;br /&gt;
    b_diff = (u_long)buf1 - (u_long)buf0;	// difference between locations&lt;br /&gt;
    printf(&amp;quot;Initial values:  &amp;quot;);&lt;br /&gt;
    printf(&amp;quot;buf0=%p, buf1=%p, b_diff=0x%x bytes\n&amp;quot;, buf0, buf1, b_diff);&lt;br /&gt;
&lt;br /&gt;
    memset(buf1, 'A', BUFSIZE-1), buf1[BUFSIZE-1] = '\0';&lt;br /&gt;
    printf(&amp;quot;Before overflow: buf1=%s\n&amp;quot;, buf1);&lt;br /&gt;
&lt;br /&gt;
    memset(buf0, 'B', (u_int)(diff + OVERSIZE));&lt;br /&gt;
    printf(&amp;quot;After overflow:  buf1=%s\n&amp;quot;, buf1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[root /tmp]# ./heaptest&lt;br /&gt;
&lt;br /&gt;
Initial values:  buf0=0x9322008, buf1=0x9322020, diff=0xff0 bytes&lt;br /&gt;
Before overflow: buf1=AAAAAAAAAAAAAAA&lt;br /&gt;
After overflow:  buf1=BBBBBBBBAAAAAAA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simple program above shows two buffers being allocated on the heap, with the first buffer being overflowed to overwrite the contents of the second buffer. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language)  that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* copies data from one buffer on the stack to another without checking sizes first AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
it is likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Format String ==&lt;br /&gt;
&lt;br /&gt;
Format string buffer overflows (usually called &amp;quot;format string vulnerabilities&amp;quot;) are highly specialized buffer overflows that can have the same effects as other buffer overflow attacks. Basically, format string vulnerabilities take advantage of the mixture of data and control information in certain functions, such as C/C++'s printf. The easiest way to understand this class of vulnerability is with an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void main(void) {&lt;br /&gt;
    char str[100] = scanf(&amp;quot;%s&amp;quot;);&lt;br /&gt;
    printf(&amp;quot;%s&amp;quot;, str);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simple program takes input from the user and displays it back on the screen. The string &amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt; means that the other parameter, str, should be displayed as a string. This example is ''not'' vulnerable to a format string attack, but if one changes the last line, it becomes exploitable:&lt;br /&gt;
&lt;br /&gt;
    printf(str);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see how, consider the user entering the special input:&lt;br /&gt;
&lt;br /&gt;
''%08x.%08x.%08x.%08x.%08x''&lt;br /&gt;
&lt;br /&gt;
By constructing input as such, the program can be exploited to print the first five entries from the stack.  &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* uses functions such as printf, snprintf directly, or indirectly through system services (such as syslog) or other AND&lt;br /&gt;
&lt;br /&gt;
* the use of such functions allows input from the user to contain control information interpreted by the function itself&lt;br /&gt;
&lt;br /&gt;
it is highly likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. Specifically check for control information (meta-characters like '%')&lt;br /&gt;
# Avoid the use of functions like printf that allow user input to contain control information&lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Unicode Overflow ==&lt;br /&gt;
&lt;br /&gt;
Unicode exploits are a bit more difficult to do than typical buffer overflows as demonstrated in Anley’s 2002 paper, but it is wrong to assume that by using Unicode, you are protected against buffer overflows. Examples of Unicode overflows include Code Red, a devastating Trojan with an estimated economic cost in the billions of dollars. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language) that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* takes Unicode input from a user AND&lt;br /&gt;
&lt;br /&gt;
* fails to sanitize the input AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself  ===&lt;br /&gt;
&lt;br /&gt;
# Deploy on systems capable of using non-executable stacks, such as:&lt;br /&gt;
## AMD and Intel x86-64 chips with associated 64-bit operating systems&lt;br /&gt;
## Windows XP SP2 (both 32- and 64-bit)&lt;br /&gt;
## Windows 2003 SP1 (both 32- and 64-bit)&lt;br /&gt;
## Linux after 2.6.8 on AMD and x86-64 processors in 32- and 64-bit mode&lt;br /&gt;
## OpenBSD (w^x on Intel, AMD, SPARC, Alpha and PowerPC)&lt;br /&gt;
## Solaris 2.6 and later with the “noexec_user_stack” flag enabled&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Integer Overflow ==&lt;br /&gt;
&lt;br /&gt;
When an application takes two numbers of fixed word size and perform an operation with them, the result may not fit within the same word size. For example, if the two 8-bit numbers 192 and 208 are added together and stored into another 8-bit byte, the result will not fit into an 8-bit result:&lt;br /&gt;
&lt;br /&gt;
''         1100 0000''&lt;br /&gt;
&lt;br /&gt;
''  +      1101 0000''&lt;br /&gt;
&lt;br /&gt;
''  = 0001 1001 0000''&lt;br /&gt;
&lt;br /&gt;
Although such an operation will usually cause some type of exception, your application must be coded to check for such an exception and take proper action. Otherwise, your application would report that 192 + 208 equals 144.&lt;br /&gt;
&lt;br /&gt;
The following code demonstrates a buffer overflow, and was adapted from Blexim's ''Phrack ''article:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void main(int argc, char *argv[]) {&lt;br /&gt;
    int i = atoi(argv[1]);         // input from user&lt;br /&gt;
    unsigned short s = i;          // truncate to a short&lt;br /&gt;
    char buf[50];                  // large buffer&lt;br /&gt;
&lt;br /&gt;
    if (s &amp;gt; 10) {                  // check we're not greater than 10&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    memcpy(buf, argv[2], i);       // copy i bytes to the buffer&lt;br /&gt;
    buf[i] = '\0';                 // add a null byte to the buffer&lt;br /&gt;
    printf(&amp;quot;%s\n&amp;quot;, buf);           // output the buffer contents&lt;br /&gt;
&lt;br /&gt;
    return;&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
[root /tmp]# ./inttest 65580 foobar&lt;br /&gt;
Segmentation fault&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code is exploitable because the validation does not occur on the input value (65580), but rather the value after it has been converted to an unsigned short (45). &lt;br /&gt;
&lt;br /&gt;
Integer overflows can be a problem in any language and can be exploited when integers are used in array indices and implicit short math operations. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
* Examine use of signed integers, bytes, and shorts.&lt;br /&gt;
&lt;br /&gt;
* Are there cases where these values are used as array indices after performing an arithmetic operation (+, -, *, /, or % (modulo))?&lt;br /&gt;
&lt;br /&gt;
* How would your program react to a negative or zero value for integer values, particular during array lookups?&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
* If using .NET, use David LeBlanc’s SafeInt class or a similar construct. Otherwise, use a &amp;quot;BigInteger&amp;quot; or &amp;quot;BigDecimal&amp;quot; implementation in cases where it would be hard to validate input yourself.&lt;br /&gt;
&lt;br /&gt;
* If your compiler supports the option, change the default for integers to be unsigned unless otherwise explicitly stated. Use unsigned integers whenever you don't need negative values.&lt;br /&gt;
&lt;br /&gt;
* Use range checking if your language or framework supports it, or be sure to implement range checking yourself after all arithmetic operations.&lt;br /&gt;
&lt;br /&gt;
* Be sure to check for exceptions if your language supports it.&lt;br /&gt;
&lt;br /&gt;
==Further reading ==&lt;br /&gt;
&lt;br /&gt;
* Team Teso, ''Exploiting Format String Vulnerabilities''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.cs.ucsb.edu/~jzhou/security/formats-teso.html&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Newsham, Tim, ''Format String Attacks&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.lava.net/~newsham/format-string-attacks.pdf&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* w00 w00 and Matt Conover, ''Preliminary Heap Overflow Tutorial''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.w00w00.org/files/articles/heaptut.txt&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Chris Anley, ''Creating Arbitrary Shellcode In Unicode Expanded Strings''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.ngssoftware.com/papers/unicodebo.pdf&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* David Leblanc, ''Integer Handling with the C++ SafeInt Class ''&amp;lt;u&amp;gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncode/html/secure01142004.asp&amp;lt;/u&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
* Aleph One, ''Smashing the Stack for fun and profit''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.phrack.org/phrack/49/P49-14&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Mark Donaldson, ''Inside the buffer Overflow Attack: Mechanism, method, &amp;amp; prevention''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://rr.sans.org/code/inside_buffer.php&amp;lt;/u&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
* ''NX Bit'', Wikipedia article&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://en.wikipedia.org/wiki/NX_bit&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Horizon'', How to bypass Solaris no execute stack protection&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.secinf.net/unix_security/How_to_bypass_Solaris_nonexecutable_stack_protection_.html&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Alexander Anisimov'', Defeating Microsoft Windows XP SP2 Heap protection and DEP bypass'', Positive Technologies&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.maxpatrol.com/defeating-xpsp2-heap-protection.htm&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Matt Conover, w00w00 on Heap Overflows, w00w00 Security Team&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.w00w00.org/files/articles/heaptut.txt&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Blexim, ''Basic Integer Overflows&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.phrack.org/phrack/60/p60-0x0a.txt&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* StackShield&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.angelfire.com/sk/stackshield/index.html&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* StackGuard&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.immunix.org&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Libsafe&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.research.avayalabs.com/project/libsafe&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Guide Table of Contents]]&lt;br /&gt;
[[Category:OWASP_Guide_Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Buffer_Overflows&amp;diff=5160</id>
		<title>Buffer Overflows</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Buffer_Overflows&amp;diff=5160"/>
				<updated>2006-06-07T15:52:27Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Fixed formatting for code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guide Table of Contents]]__TOC__'''&lt;br /&gt;
&lt;br /&gt;
==Objective ==&lt;br /&gt;
&lt;br /&gt;
To ensure that:&lt;br /&gt;
&lt;br /&gt;
* Applications do not expose themselves to faulty components&lt;br /&gt;
&lt;br /&gt;
* Applications create as few buffer overflows as possible&lt;br /&gt;
&lt;br /&gt;
* Developers are encouraged to use languages and frameworks that are relatively immune to buffer overflows. &lt;br /&gt;
&lt;br /&gt;
==Platforms Affected ==&lt;br /&gt;
&lt;br /&gt;
Almost every platform, with the following notable exceptions:&lt;br /&gt;
&lt;br /&gt;
* Java/J2EE – as long as native methods or system calls are not invoked&lt;br /&gt;
&lt;br /&gt;
* .NET – as long as unsafe or unmanaged code is not invoked (such as the use of P/Invoke or COM Interop)&lt;br /&gt;
&lt;br /&gt;
* PHP, Python, Perl – as long as external programs or vulnerable extensions are not used.&lt;br /&gt;
&lt;br /&gt;
==Relevant COBIT Topics ==&lt;br /&gt;
&lt;br /&gt;
DS11.9 – Data processing integrity.&lt;br /&gt;
&lt;br /&gt;
==Description ==&lt;br /&gt;
&lt;br /&gt;
Attackers generally use buffer overflows to corrupt the execution stack of a web application. By sending carefully crafted input to a web application, an attacker can cause the web application to execute arbitrary code, possibly taking over the machine. Attackers have managed to identify buffer overflows in a staggering array of products and components. &lt;br /&gt;
&lt;br /&gt;
Buffer overflow flaws can be present in both the web server and application server products that serve the static and dynamic portions of a site, or in the web application itself. Buffer overflows found in commonly used server products are likely to become widely known and can pose a significant risk to users of these products. When web applications use libraries, such as a graphics library to generate images or a communications library to send e-mail, they open themselves to potential buffer overflow attacks. Literature detailing buffer overflow attacks against commonly used products is readily available, and newly discovered vulnerabilities are reported almost daily. &lt;br /&gt;
&lt;br /&gt;
Buffer overflows can also be found in custom web application code, and may even be more likely, given the lack of scrutiny that web applications typically go through. Buffer overflow attacks against customized web applications can sometimes lead to interesting results. In some cases, we have discovered that sending large inputs can cause the web application or the back-end database to malfunction. It is possible to cause a denial of service attack against the web site, depending on the severity and specific nature of the flaw. Overly large inputs could cause the application to display a detailed error message, potentially leading to a successful attack on the system.&lt;br /&gt;
&lt;br /&gt;
Buffer overflow attacks generally rely upon two techniques (and usually the combination):&lt;br /&gt;
&lt;br /&gt;
* Writing data to particular memory addresses&lt;br /&gt;
&lt;br /&gt;
* Having the operating system mishandle data types&lt;br /&gt;
&lt;br /&gt;
* This means that strongly-typed programming languages (and environments) that disallow direct memory access usually prevent buffer overflows from happening.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
&lt;br /&gt;
 || * Language/Environment || * Compiled or Interpreted || * Strongly Typed || * Direct Memory Access || * Safe or Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Java, Java Virtual Machine (JVM) || * Both || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * .NET || * Both || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Perl  || * Both || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Python - interpreted || * Intepreted || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Ruby || * Interpreted || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * C/C++ || * Compiled || * No || * Yes || * Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Assembly || * Compiled || * No || * Yes || * Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * COBOL || * Compiled || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Table 8.1: Language descriptions&lt;br /&gt;
&lt;br /&gt;
==General Prevention Techniques ==&lt;br /&gt;
&lt;br /&gt;
A number of general techniques to prevent buffer overflows include:&lt;br /&gt;
&lt;br /&gt;
* Code auditing (automated or manual)&lt;br /&gt;
&lt;br /&gt;
* Developer training – bounds checking, use of unsafe functions, and group standards&lt;br /&gt;
&lt;br /&gt;
* Non-executable stacks – many operating systems have at least some support for this&lt;br /&gt;
&lt;br /&gt;
* Compiler tools – StackShield, StackGuard, and Libsafe, among others&lt;br /&gt;
&lt;br /&gt;
* Safe functions – use strncat instead of strcat, strncpy instead of strcpy, etc&lt;br /&gt;
&lt;br /&gt;
* Patches – Be sure to keep your web and application servers fully patched, and be aware of bug reports relating to applications upon which your code is dependent.&lt;br /&gt;
&lt;br /&gt;
* Periodically scan your application with one or more of the commonly available scanners that look for buffer overflow flaws in your server products and your custom web applications. &lt;br /&gt;
&lt;br /&gt;
==Stack Overflow ==&lt;br /&gt;
&lt;br /&gt;
Stack overflows are the best understood and the most common form of buffer overflows. The basics of a stack overflow is simple:&lt;br /&gt;
&lt;br /&gt;
* There are two buffers, a source buffer containing arbitrary input (presumably from the attacker), and a destination buffer that is too small for the attack input. The second buffer resides on the stack and somewhat adjacent to the function return address on the stack.&lt;br /&gt;
&lt;br /&gt;
* The faulty code does ''not'' check that the source buffer is too large to fit in the destination buffer. It copies the attack input to the destination buffer, overwriting additional information on the stack (such as the function return address).&lt;br /&gt;
&lt;br /&gt;
* When the function returns, the CPU unwinds the stack frame and pops the (now modified) return address from the stack.&lt;br /&gt;
&lt;br /&gt;
* Control does not return to the function as it should. Instead, arbitrary code (chosen by the attacker when crafting the initial input) is executed. &lt;br /&gt;
&lt;br /&gt;
The following example, written in C, demonstrates a stack overflow exploit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void f(char* s) {&lt;br /&gt;
    char buffer[10];&lt;br /&gt;
    strcpy(buffer, s);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void main(void) {&lt;br /&gt;
    f(&amp;quot;01234567890123456789&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[root /tmp]# ./stacktest&lt;br /&gt;
&lt;br /&gt;
Segmentation fault&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language) that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* copies data from one buffer on the stack to another without checking sizes first AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values or non-executable stacks to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
it is likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
# Deploy on systems capable of using non-executable stacks, such as:&lt;br /&gt;
## AMD and Intel x86-64 chips with associated 64-bit operating systems&lt;br /&gt;
## Windows XP SP2 (both 32- and 64-bit)&lt;br /&gt;
## Windows 2003 SP1 (both 32- and 64-bit)&lt;br /&gt;
## Linux after 2.6.8 on AMD and x86-64 processors in 32- and 64-bit mode&lt;br /&gt;
## OpenBSD (w^x on Intel, AMD, SPARC, Alpha and PowerPC)&lt;br /&gt;
## Solaris 2.6 and later with the “noexec_user_stack” flag enabled&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Heap Overflow ==&lt;br /&gt;
&lt;br /&gt;
Heap overflows are problematic in that they are not necessarily protected by CPUs capable of using non-execuable stacks. A heap is an area of memory allocated by the application at run-time to store data. The following example, written in C, shows a heap overflow exploit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #define BSIZE 16&lt;br /&gt;
 #define OVERSIZE 8 /* overflow buf2 by OVERSIZE bytes */&lt;br /&gt;
&lt;br /&gt;
 void main(void) {&lt;br /&gt;
    u_long b_diff;&lt;br /&gt;
    char *buf0 = (char*)malloc(BSIZE);		// create two buffers&lt;br /&gt;
    char *buf1 = (char*)malloc(BSIZE);&lt;br /&gt;
&lt;br /&gt;
    b_diff = (u_long)buf1 - (u_long)buf0;	// difference between locations&lt;br /&gt;
    printf(&amp;quot;Initial values:  &amp;quot;);&lt;br /&gt;
    printf(&amp;quot;buf0=%p, buf1=%p, b_diff=0x%x bytes\n&amp;quot;, buf0, buf1, b_diff);&lt;br /&gt;
&lt;br /&gt;
    memset(buf1, 'A', BUFSIZE-1), buf1[BUFSIZE-1] = '\0';&lt;br /&gt;
    printf(&amp;quot;Before overflow: buf1=%s\n&amp;quot;, buf1);&lt;br /&gt;
&lt;br /&gt;
    memset(buf0, 'B', (u_int)(diff + OVERSIZE));&lt;br /&gt;
    printf(&amp;quot;After overflow:  buf1=%s\n&amp;quot;, buf1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[root /tmp]# ./heaptest&lt;br /&gt;
&lt;br /&gt;
Initial values:  buf0=0x9322008, buf1=0x9322020, diff=0xff0 bytes&lt;br /&gt;
Before overflow: buf1=AAAAAAAAAAAAAAA&lt;br /&gt;
After overflow:  buf1=BBBBBBBBAAAAAAA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simple program above shows two buffers being allocated on the heap, with the first buffer being overflowed to overwrite the contents of the second buffer. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language)  that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* copies data from one buffer on the stack to another without checking sizes first AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
it is likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Format String ==&lt;br /&gt;
&lt;br /&gt;
Format string buffer overflows (usually called &amp;quot;format string vulnerabilities&amp;quot;) are highly specialized buffer overflows that can have the same effects as other buffer overflow attacks. Basically, format string vulnerabilities take advantage of the mixture of data and control information in certain functions, such as C/C++'s printf. The easiest way to understand this class of vulnerability is with an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void main(void) {&lt;br /&gt;
    char str[100] = scanf(&amp;quot;%s&amp;quot;);&lt;br /&gt;
    printf(&amp;quot;%s&amp;quot;, str);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simple program takes input from the user and displays it back on the screen. The string &amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt; means that the other parameter, str, should be displayed as a string. This example is ''not'' vulnerable to a format string attack, but if one changes the last line, it becomes exploitable:&lt;br /&gt;
&lt;br /&gt;
    printf(str);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see how, consider the user entering the special input:&lt;br /&gt;
&lt;br /&gt;
''%08x.%08x.%08x.%08x.%08x''&lt;br /&gt;
&lt;br /&gt;
By constructing input as such, the program can be exploited to print the first five entries from the stack.  &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* uses functions such as printf, snprintf directly, or indirectly through system services (such as syslog) or other AND&lt;br /&gt;
&lt;br /&gt;
* the use of such functions allows input from the user to contain control information interpreted by the function itself&lt;br /&gt;
&lt;br /&gt;
it is highly likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. Specifically check for control information (meta-characters like '%')&lt;br /&gt;
# Avoid the use of functions like printf that allow user input to contain control information&lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Unicode Overflow ==&lt;br /&gt;
&lt;br /&gt;
Unicode exploits are a bit more difficult to do than typical buffer overflows as demonstrated in Anley’s 2002 paper, but it is wrong to assume that by using Unicode, you are protected against buffer overflows. Examples of Unicode overflows include Code Red, a devastating Trojan with an estimated economic cost in the billions of dollars. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language) that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* takes Unicode input from a user AND&lt;br /&gt;
&lt;br /&gt;
* fails to sanitize the input AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself  ===&lt;br /&gt;
&lt;br /&gt;
# Deploy on systems capable of using non-executable stacks, such as:&lt;br /&gt;
## AMD and Intel x86-64 chips with associated 64-bit operating systems&lt;br /&gt;
## Windows XP SP2 (both 32- and 64-bit)&lt;br /&gt;
## Windows 2003 SP1 (both 32- and 64-bit)&lt;br /&gt;
## Linux after 2.6.8 on AMD and x86-64 processors in 32- and 64-bit mode&lt;br /&gt;
## OpenBSD (w^x on Intel, AMD, SPARC, Alpha and PowerPC)&lt;br /&gt;
## Solaris 2.6 and later with the “noexec_user_stack” flag enabled&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Integer Overflow ==&lt;br /&gt;
&lt;br /&gt;
When an application takes two numbers of fixed word size and perform an operation with them, the result may not fit within the same word size. For example, if the two 8-bit numbers 192 and 208 are added together and stored into another 8-bit byte, the result will not fit into an 8-bit result:&lt;br /&gt;
&lt;br /&gt;
''         1100 0000''&lt;br /&gt;
&lt;br /&gt;
''  +      1101 0000''&lt;br /&gt;
&lt;br /&gt;
''  = 0001 1001 0000''&lt;br /&gt;
&lt;br /&gt;
Although such an operation will usually cause some type of exception, your application must be coded to check for such an exception and take proper action. Otherwise, your application would report that 192 + 208 equals 144.&lt;br /&gt;
&lt;br /&gt;
The following code demonstrates a buffer overflow, and was adapted from Blexim's ''Phrack ''article:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'' #include &amp;lt;stdio.h&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
'' #include &amp;lt;string.h&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'' void main(int argc, char *argv[]){''&lt;br /&gt;
&lt;br /&gt;
''   int i = atoi(argv[1]);		// input from user''&lt;br /&gt;
&lt;br /&gt;
''   unsigned short s = i;		// truncate to a short''&lt;br /&gt;
&lt;br /&gt;
''   char buf[50];				// large buffer''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''   if (s &amp;gt; 10) {				// check we're not greater than 10''&lt;br /&gt;
&lt;br /&gt;
''     return;''&lt;br /&gt;
&lt;br /&gt;
''   }''&lt;br /&gt;
&lt;br /&gt;
''   memcpy(buf, argv[2], i);		// copy i bytes to the buffer''&lt;br /&gt;
&lt;br /&gt;
''   buf[i] = '\0';				// add a null byte to the buffer''&lt;br /&gt;
&lt;br /&gt;
''   printf(&amp;quot;%s\n&amp;quot;, buf);			// output the buffer contents''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''   return;''&lt;br /&gt;
&lt;br /&gt;
'' } ''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''[root /tmp]# ./inttest 65580 foobar''&lt;br /&gt;
&lt;br /&gt;
''Segmentation fault''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code is exploitable because the validation does not occur on the input value (65580), but rather the value after it has been converted to an unsigned short (45). &lt;br /&gt;
&lt;br /&gt;
Integer overflows can be a problem in any language and can be exploited when integers are used in array indices and implicit short math operations. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
* Examine use of signed integers, bytes, and shorts.&lt;br /&gt;
&lt;br /&gt;
* Are there cases where these values are used as array indices after performing an arithmetic operation (+, -, *, /, or % (modulo))?&lt;br /&gt;
&lt;br /&gt;
* How would your program react to a negative or zero value for integer values, particular during array lookups?&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
* If using .NET, use David LeBlanc’s SafeInt class or a similar construct. Otherwise, use a &amp;quot;BigInteger&amp;quot; or &amp;quot;BigDecimal&amp;quot; implementation in cases where it would be hard to validate input yourself.&lt;br /&gt;
&lt;br /&gt;
* If your compiler supports the option, change the default for integers to be unsigned unless otherwise explicitly stated. Use unsigned integers whenever you don't need negative values.&lt;br /&gt;
&lt;br /&gt;
* Use range checking if your language or framework supports it, or be sure to implement range checking yourself after all arithmetic operations.&lt;br /&gt;
&lt;br /&gt;
* Be sure to check for exceptions if your language supports it. &lt;br /&gt;
&lt;br /&gt;
==Further reading ==&lt;br /&gt;
&lt;br /&gt;
* Team Teso, ''Exploiting Format String Vulnerabilities''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.cs.ucsb.edu/~jzhou/security/formats-teso.html&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Newsham, Tim, ''Format String Attacks&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.lava.net/~newsham/format-string-attacks.pdf&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* w00 w00 and Matt Conover, ''Preliminary Heap Overflow Tutorial''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.w00w00.org/files/articles/heaptut.txt&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Chris Anley, ''Creating Arbitrary Shellcode In Unicode Expanded Strings''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.ngssoftware.com/papers/unicodebo.pdf&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* David Leblanc, ''Integer Handling with the C++ SafeInt Class ''&amp;lt;u&amp;gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncode/html/secure01142004.asp&amp;lt;/u&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
* Aleph One, ''Smashing the Stack for fun and profit''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.phrack.org/phrack/49/P49-14&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Mark Donaldson, ''Inside the buffer Overflow Attack: Mechanism, method, &amp;amp; prevention''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://rr.sans.org/code/inside_buffer.php&amp;lt;/u&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
* ''NX Bit'', Wikipedia article&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://en.wikipedia.org/wiki/NX_bit&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Horizon'', How to bypass Solaris no execute stack protection&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.secinf.net/unix_security/How_to_bypass_Solaris_nonexecutable_stack_protection_.html&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Alexander Anisimov'', Defeating Microsoft Windows XP SP2 Heap protection and DEP bypass'', Positive Technologies&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.maxpatrol.com/defeating-xpsp2-heap-protection.htm&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Matt Conover, w00w00 on Heap Overflows, w00w00 Security Team&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.w00w00.org/files/articles/heaptut.txt&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Blexim, ''Basic Integer Overflows&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.phrack.org/phrack/60/p60-0x0a.txt&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* StackShield&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.angelfire.com/sk/stackshield/index.html&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* StackGuard&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.immunix.org&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Libsafe&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.research.avayalabs.com/project/libsafe&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Guide Table of Contents]]&lt;br /&gt;
[[Category:OWASP_Guide_Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Buffer_Overflows&amp;diff=5159</id>
		<title>Buffer Overflows</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Buffer_Overflows&amp;diff=5159"/>
				<updated>2006-06-07T15:51:30Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: Fixed formatting for code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guide Table of Contents]]__TOC__'''&lt;br /&gt;
&lt;br /&gt;
==Objective ==&lt;br /&gt;
&lt;br /&gt;
To ensure that:&lt;br /&gt;
&lt;br /&gt;
* Applications do not expose themselves to faulty components&lt;br /&gt;
&lt;br /&gt;
* Applications create as few buffer overflows as possible&lt;br /&gt;
&lt;br /&gt;
* Developers are encouraged to use languages and frameworks that are relatively immune to buffer overflows. &lt;br /&gt;
&lt;br /&gt;
==Platforms Affected ==&lt;br /&gt;
&lt;br /&gt;
Almost every platform, with the following notable exceptions:&lt;br /&gt;
&lt;br /&gt;
* Java/J2EE – as long as native methods or system calls are not invoked&lt;br /&gt;
&lt;br /&gt;
* .NET – as long as unsafe or unmanaged code is not invoked (such as the use of P/Invoke or COM Interop)&lt;br /&gt;
&lt;br /&gt;
* PHP, Python, Perl – as long as external programs or vulnerable extensions are not used.&lt;br /&gt;
&lt;br /&gt;
==Relevant COBIT Topics ==&lt;br /&gt;
&lt;br /&gt;
DS11.9 – Data processing integrity.&lt;br /&gt;
&lt;br /&gt;
==Description ==&lt;br /&gt;
&lt;br /&gt;
Attackers generally use buffer overflows to corrupt the execution stack of a web application. By sending carefully crafted input to a web application, an attacker can cause the web application to execute arbitrary code, possibly taking over the machine. Attackers have managed to identify buffer overflows in a staggering array of products and components. &lt;br /&gt;
&lt;br /&gt;
Buffer overflow flaws can be present in both the web server and application server products that serve the static and dynamic portions of a site, or in the web application itself. Buffer overflows found in commonly used server products are likely to become widely known and can pose a significant risk to users of these products. When web applications use libraries, such as a graphics library to generate images or a communications library to send e-mail, they open themselves to potential buffer overflow attacks. Literature detailing buffer overflow attacks against commonly used products is readily available, and newly discovered vulnerabilities are reported almost daily. &lt;br /&gt;
&lt;br /&gt;
Buffer overflows can also be found in custom web application code, and may even be more likely, given the lack of scrutiny that web applications typically go through. Buffer overflow attacks against customized web applications can sometimes lead to interesting results. In some cases, we have discovered that sending large inputs can cause the web application or the back-end database to malfunction. It is possible to cause a denial of service attack against the web site, depending on the severity and specific nature of the flaw. Overly large inputs could cause the application to display a detailed error message, potentially leading to a successful attack on the system.&lt;br /&gt;
&lt;br /&gt;
Buffer overflow attacks generally rely upon two techniques (and usually the combination):&lt;br /&gt;
&lt;br /&gt;
* Writing data to particular memory addresses&lt;br /&gt;
&lt;br /&gt;
* Having the operating system mishandle data types&lt;br /&gt;
&lt;br /&gt;
* This means that strongly-typed programming languages (and environments) that disallow direct memory access usually prevent buffer overflows from happening.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
&lt;br /&gt;
 || * Language/Environment || * Compiled or Interpreted || * Strongly Typed || * Direct Memory Access || * Safe or Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Java, Java Virtual Machine (JVM) || * Both || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * .NET || * Both || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Perl  || * Both || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Python - interpreted || * Intepreted || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Ruby || * Interpreted || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * C/C++ || * Compiled || * No || * Yes || * Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Assembly || * Compiled || * No || * Yes || * Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * COBOL || * Compiled || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Table 8.1: Language descriptions&lt;br /&gt;
&lt;br /&gt;
==General Prevention Techniques ==&lt;br /&gt;
&lt;br /&gt;
A number of general techniques to prevent buffer overflows include:&lt;br /&gt;
&lt;br /&gt;
* Code auditing (automated or manual)&lt;br /&gt;
&lt;br /&gt;
* Developer training – bounds checking, use of unsafe functions, and group standards&lt;br /&gt;
&lt;br /&gt;
* Non-executable stacks – many operating systems have at least some support for this&lt;br /&gt;
&lt;br /&gt;
* Compiler tools – StackShield, StackGuard, and Libsafe, among others&lt;br /&gt;
&lt;br /&gt;
* Safe functions – use strncat instead of strcat, strncpy instead of strcpy, etc&lt;br /&gt;
&lt;br /&gt;
* Patches – Be sure to keep your web and application servers fully patched, and be aware of bug reports relating to applications upon which your code is dependent.&lt;br /&gt;
&lt;br /&gt;
* Periodically scan your application with one or more of the commonly available scanners that look for buffer overflow flaws in your server products and your custom web applications. &lt;br /&gt;
&lt;br /&gt;
==Stack Overflow ==&lt;br /&gt;
&lt;br /&gt;
Stack overflows are the best understood and the most common form of buffer overflows. The basics of a stack overflow is simple:&lt;br /&gt;
&lt;br /&gt;
* There are two buffers, a source buffer containing arbitrary input (presumably from the attacker), and a destination buffer that is too small for the attack input. The second buffer resides on the stack and somewhat adjacent to the function return address on the stack.&lt;br /&gt;
&lt;br /&gt;
* The faulty code does ''not'' check that the source buffer is too large to fit in the destination buffer. It copies the attack input to the destination buffer, overwriting additional information on the stack (such as the function return address).&lt;br /&gt;
&lt;br /&gt;
* When the function returns, the CPU unwinds the stack frame and pops the (now modified) return address from the stack.&lt;br /&gt;
&lt;br /&gt;
* Control does not return to the function as it should. Instead, arbitrary code (chosen by the attacker when crafting the initial input) is executed. &lt;br /&gt;
&lt;br /&gt;
The following example, written in C, demonstrates a stack overflow exploit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void f(char* s) {&lt;br /&gt;
    char buffer[10];&lt;br /&gt;
    strcpy(buffer, s);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void main(void) {&lt;br /&gt;
    f(&amp;quot;01234567890123456789&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[root /tmp]# ./stacktest&lt;br /&gt;
&lt;br /&gt;
Segmentation fault&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language) that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* copies data from one buffer on the stack to another without checking sizes first AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values or non-executable stacks to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
it is likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
# Deploy on systems capable of using non-executable stacks, such as:&lt;br /&gt;
## AMD and Intel x86-64 chips with associated 64-bit operating systems&lt;br /&gt;
## Windows XP SP2 (both 32- and 64-bit)&lt;br /&gt;
## Windows 2003 SP1 (both 32- and 64-bit)&lt;br /&gt;
## Linux after 2.6.8 on AMD and x86-64 processors in 32- and 64-bit mode&lt;br /&gt;
## OpenBSD (w^x on Intel, AMD, SPARC, Alpha and PowerPC)&lt;br /&gt;
## Solaris 2.6 and later with the “noexec_user_stack” flag enabled&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Heap Overflow ==&lt;br /&gt;
&lt;br /&gt;
Heap overflows are problematic in that they are not necessarily protected by CPUs capable of using non-execuable stacks. A heap is an area of memory allocated by the application at run-time to store data. The following example, written in C, shows a heap overflow exploit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #define BSIZE 16&lt;br /&gt;
 #define OVERSIZE 8 /* overflow buf2 by OVERSIZE bytes */&lt;br /&gt;
&lt;br /&gt;
 void main(void) {&lt;br /&gt;
    u_long b_diff;&lt;br /&gt;
    char *buf0 = (char*)malloc(BSIZE);		// create two buffers&lt;br /&gt;
    char *buf1 = (char*)malloc(BSIZE);&lt;br /&gt;
&lt;br /&gt;
    b_diff = (u_long)buf1 - (u_long)buf0;	// difference between locations&lt;br /&gt;
    printf(&amp;quot;Initial values:  &amp;quot;);&lt;br /&gt;
    printf(&amp;quot;buf0=%p, buf1=%p, b_diff=0x%x bytes\n&amp;quot;, buf0, buf1, b_diff);&lt;br /&gt;
&lt;br /&gt;
    memset(buf1, 'A', BUFSIZE-1), buf1[BUFSIZE-1] = '\0';&lt;br /&gt;
    printf(&amp;quot;Before overflow: buf1=%s\n&amp;quot;, buf1);&lt;br /&gt;
&lt;br /&gt;
    memset(buf0, 'B', (u_int)(diff + OVERSIZE));&lt;br /&gt;
    printf(&amp;quot;After overflow:  buf1=%s\n&amp;quot;, buf1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[root /tmp]# ./heaptest&lt;br /&gt;
&lt;br /&gt;
Initial values:  buf0=0x9322008, buf1=0x9322020, diff=0xff0 bytes&lt;br /&gt;
Before overflow: buf1=AAAAAAAAAAAAAAA&lt;br /&gt;
After overflow:  buf1=BBBBBBBBAAAAAAA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simple program above shows two buffers being allocated on the heap, with the first buffer being overflowed to overwrite the contents of the second buffer. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language)  that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* copies data from one buffer on the stack to another without checking sizes first AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
it is likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Format String ==&lt;br /&gt;
&lt;br /&gt;
Format string buffer overflows (usually called &amp;quot;format string vulnerabilities&amp;quot;) are highly specialized buffer overflows that can have the same effects as other buffer overflow attacks. Basically, format string vulnerabilities take advantage of the mixture of data and control information in certain functions, such as C/C++'s printf. The easiest way to understand this class of vulnerability is with an example:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 void main(void) {&lt;br /&gt;
&lt;br /&gt;
    char str[100] = scanf(&amp;quot;%s&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;%s&amp;quot;, str);&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This simple program takes input from the user and displays it back on the screen. The string %s means that the other parameter, str, should be displayed as a string. This example is ''not ''vulnerable to a format string attack, but if one changes the last line, it becomes exploitable:&lt;br /&gt;
&lt;br /&gt;
    printf(str);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see how, consider the user entering the special input:&lt;br /&gt;
&lt;br /&gt;
''%08x.%08x.%08x.%08x.%08x''&lt;br /&gt;
&lt;br /&gt;
By constructing input as such, the program can be exploited to print the first five entries from the stack.  &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* uses functions such as printf, snprintf directly, or indirectly through system services (such as syslog) or other AND&lt;br /&gt;
&lt;br /&gt;
* the use of such functions allows input from the user to contain control information interpreted by the function itself&lt;br /&gt;
&lt;br /&gt;
it is highly likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. Specifically check for control information (meta-characters like '%')&lt;br /&gt;
# Avoid the use of functions like printf that allow user input to contain control information&lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Unicode Overflow ==&lt;br /&gt;
&lt;br /&gt;
Unicode exploits are a bit more difficult to do than typical buffer overflows as demonstrated in Anley’s 2002 paper, but it is wrong to assume that by using Unicode, you are protected against buffer overflows. Examples of Unicode overflows include Code Red, a devastating Trojan with an estimated economic cost in the billions of dollars. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language) that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* takes Unicode input from a user AND&lt;br /&gt;
&lt;br /&gt;
* fails to sanitize the input AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself  ===&lt;br /&gt;
&lt;br /&gt;
# Deploy on systems capable of using non-executable stacks, such as:&lt;br /&gt;
## AMD and Intel x86-64 chips with associated 64-bit operating systems&lt;br /&gt;
## Windows XP SP2 (both 32- and 64-bit)&lt;br /&gt;
## Windows 2003 SP1 (both 32- and 64-bit)&lt;br /&gt;
## Linux after 2.6.8 on AMD and x86-64 processors in 32- and 64-bit mode&lt;br /&gt;
## OpenBSD (w^x on Intel, AMD, SPARC, Alpha and PowerPC)&lt;br /&gt;
## Solaris 2.6 and later with the “noexec_user_stack” flag enabled&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Integer Overflow ==&lt;br /&gt;
&lt;br /&gt;
When an application takes two numbers of fixed word size and perform an operation with them, the result may not fit within the same word size. For example, if the two 8-bit numbers 192 and 208 are added together and stored into another 8-bit byte, the result will not fit into an 8-bit result:&lt;br /&gt;
&lt;br /&gt;
''         1100 0000''&lt;br /&gt;
&lt;br /&gt;
''  +      1101 0000''&lt;br /&gt;
&lt;br /&gt;
''  = 0001 1001 0000''&lt;br /&gt;
&lt;br /&gt;
Although such an operation will usually cause some type of exception, your application must be coded to check for such an exception and take proper action. Otherwise, your application would report that 192 + 208 equals 144.&lt;br /&gt;
&lt;br /&gt;
The following code demonstrates a buffer overflow, and was adapted from Blexim's ''Phrack ''article:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'' #include &amp;lt;stdio.h&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
'' #include &amp;lt;string.h&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'' void main(int argc, char *argv[]){''&lt;br /&gt;
&lt;br /&gt;
''   int i = atoi(argv[1]);		// input from user''&lt;br /&gt;
&lt;br /&gt;
''   unsigned short s = i;		// truncate to a short''&lt;br /&gt;
&lt;br /&gt;
''   char buf[50];				// large buffer''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''   if (s &amp;gt; 10) {				// check we're not greater than 10''&lt;br /&gt;
&lt;br /&gt;
''     return;''&lt;br /&gt;
&lt;br /&gt;
''   }''&lt;br /&gt;
&lt;br /&gt;
''   memcpy(buf, argv[2], i);		// copy i bytes to the buffer''&lt;br /&gt;
&lt;br /&gt;
''   buf[i] = '\0';				// add a null byte to the buffer''&lt;br /&gt;
&lt;br /&gt;
''   printf(&amp;quot;%s\n&amp;quot;, buf);			// output the buffer contents''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''   return;''&lt;br /&gt;
&lt;br /&gt;
'' } ''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''[root /tmp]# ./inttest 65580 foobar''&lt;br /&gt;
&lt;br /&gt;
''Segmentation fault''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code is exploitable because the validation does not occur on the input value (65580), but rather the value after it has been converted to an unsigned short (45). &lt;br /&gt;
&lt;br /&gt;
Integer overflows can be a problem in any language and can be exploited when integers are used in array indices and implicit short math operations. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
* Examine use of signed integers, bytes, and shorts.&lt;br /&gt;
&lt;br /&gt;
* Are there cases where these values are used as array indices after performing an arithmetic operation (+, -, *, /, or % (modulo))?&lt;br /&gt;
&lt;br /&gt;
* How would your program react to a negative or zero value for integer values, particular during array lookups?&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
* If using .NET, use David LeBlanc’s SafeInt class or a similar construct. Otherwise, use a &amp;quot;BigInteger&amp;quot; or &amp;quot;BigDecimal&amp;quot; implementation in cases where it would be hard to validate input yourself.&lt;br /&gt;
&lt;br /&gt;
* If your compiler supports the option, change the default for integers to be unsigned unless otherwise explicitly stated. Use unsigned integers whenever you don't need negative values.&lt;br /&gt;
&lt;br /&gt;
* Use range checking if your language or framework supports it, or be sure to implement range checking yourself after all arithmetic operations.&lt;br /&gt;
&lt;br /&gt;
* Be sure to check for exceptions if your language supports it. &lt;br /&gt;
&lt;br /&gt;
==Further reading ==&lt;br /&gt;
&lt;br /&gt;
* Team Teso, ''Exploiting Format String Vulnerabilities''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.cs.ucsb.edu/~jzhou/security/formats-teso.html&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Newsham, Tim, ''Format String Attacks&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.lava.net/~newsham/format-string-attacks.pdf&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* w00 w00 and Matt Conover, ''Preliminary Heap Overflow Tutorial''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.w00w00.org/files/articles/heaptut.txt&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Chris Anley, ''Creating Arbitrary Shellcode In Unicode Expanded Strings''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.ngssoftware.com/papers/unicodebo.pdf&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* David Leblanc, ''Integer Handling with the C++ SafeInt Class ''&amp;lt;u&amp;gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncode/html/secure01142004.asp&amp;lt;/u&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
* Aleph One, ''Smashing the Stack for fun and profit''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.phrack.org/phrack/49/P49-14&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Mark Donaldson, ''Inside the buffer Overflow Attack: Mechanism, method, &amp;amp; prevention''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://rr.sans.org/code/inside_buffer.php&amp;lt;/u&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
* ''NX Bit'', Wikipedia article&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://en.wikipedia.org/wiki/NX_bit&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Horizon'', How to bypass Solaris no execute stack protection&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.secinf.net/unix_security/How_to_bypass_Solaris_nonexecutable_stack_protection_.html&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Alexander Anisimov'', Defeating Microsoft Windows XP SP2 Heap protection and DEP bypass'', Positive Technologies&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.maxpatrol.com/defeating-xpsp2-heap-protection.htm&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Matt Conover, w00w00 on Heap Overflows, w00w00 Security Team&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.w00w00.org/files/articles/heaptut.txt&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Blexim, ''Basic Integer Overflows&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.phrack.org/phrack/60/p60-0x0a.txt&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* StackShield&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.angelfire.com/sk/stackshield/index.html&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* StackGuard&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.immunix.org&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Libsafe&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.research.avayalabs.com/project/libsafe&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Guide Table of Contents]]&lt;br /&gt;
[[Category:OWASP_Guide_Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Buffer_Overflows&amp;diff=5158</id>
		<title>Buffer Overflows</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Buffer_Overflows&amp;diff=5158"/>
				<updated>2006-06-07T15:50:24Z</updated>
		
		<summary type="html">&lt;p&gt;Scovetta: /* Heap Overflow */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guide Table of Contents]]__TOC__'''&lt;br /&gt;
&lt;br /&gt;
==Objective ==&lt;br /&gt;
&lt;br /&gt;
To ensure that:&lt;br /&gt;
&lt;br /&gt;
* Applications do not expose themselves to faulty components&lt;br /&gt;
&lt;br /&gt;
* Applications create as few buffer overflows as possible&lt;br /&gt;
&lt;br /&gt;
* Developers are encouraged to use languages and frameworks that are relatively immune to buffer overflows. &lt;br /&gt;
&lt;br /&gt;
==Platforms Affected ==&lt;br /&gt;
&lt;br /&gt;
Almost every platform, with the following notable exceptions:&lt;br /&gt;
&lt;br /&gt;
* Java/J2EE – as long as native methods or system calls are not invoked&lt;br /&gt;
&lt;br /&gt;
* .NET – as long as unsafe or unmanaged code is not invoked (such as the use of P/Invoke or COM Interop)&lt;br /&gt;
&lt;br /&gt;
* PHP, Python, Perl – as long as external programs or vulnerable extensions are not used.&lt;br /&gt;
&lt;br /&gt;
==Relevant COBIT Topics ==&lt;br /&gt;
&lt;br /&gt;
DS11.9 – Data processing integrity.&lt;br /&gt;
&lt;br /&gt;
==Description ==&lt;br /&gt;
&lt;br /&gt;
Attackers generally use buffer overflows to corrupt the execution stack of a web application. By sending carefully crafted input to a web application, an attacker can cause the web application to execute arbitrary code, possibly taking over the machine. Attackers have managed to identify buffer overflows in a staggering array of products and components. &lt;br /&gt;
&lt;br /&gt;
Buffer overflow flaws can be present in both the web server and application server products that serve the static and dynamic portions of a site, or in the web application itself. Buffer overflows found in commonly used server products are likely to become widely known and can pose a significant risk to users of these products. When web applications use libraries, such as a graphics library to generate images or a communications library to send e-mail, they open themselves to potential buffer overflow attacks. Literature detailing buffer overflow attacks against commonly used products is readily available, and newly discovered vulnerabilities are reported almost daily. &lt;br /&gt;
&lt;br /&gt;
Buffer overflows can also be found in custom web application code, and may even be more likely, given the lack of scrutiny that web applications typically go through. Buffer overflow attacks against customized web applications can sometimes lead to interesting results. In some cases, we have discovered that sending large inputs can cause the web application or the back-end database to malfunction. It is possible to cause a denial of service attack against the web site, depending on the severity and specific nature of the flaw. Overly large inputs could cause the application to display a detailed error message, potentially leading to a successful attack on the system.&lt;br /&gt;
&lt;br /&gt;
Buffer overflow attacks generally rely upon two techniques (and usually the combination):&lt;br /&gt;
&lt;br /&gt;
* Writing data to particular memory addresses&lt;br /&gt;
&lt;br /&gt;
* Having the operating system mishandle data types&lt;br /&gt;
&lt;br /&gt;
* This means that strongly-typed programming languages (and environments) that disallow direct memory access usually prevent buffer overflows from happening.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
&lt;br /&gt;
 || * Language/Environment || * Compiled or Interpreted || * Strongly Typed || * Direct Memory Access || * Safe or Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Java, Java Virtual Machine (JVM) || * Both || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * .NET || * Both || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Perl  || * Both || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Python - interpreted || * Intepreted || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Ruby || * Interpreted || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * C/C++ || * Compiled || * No || * Yes || * Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * Assembly || * Compiled || * No || * Yes || * Unsafe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
 || * COBOL || * Compiled || * Yes || * No || * Safe&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Table 8.1: Language descriptions&lt;br /&gt;
&lt;br /&gt;
==General Prevention Techniques ==&lt;br /&gt;
&lt;br /&gt;
A number of general techniques to prevent buffer overflows include:&lt;br /&gt;
&lt;br /&gt;
* Code auditing (automated or manual)&lt;br /&gt;
&lt;br /&gt;
* Developer training – bounds checking, use of unsafe functions, and group standards&lt;br /&gt;
&lt;br /&gt;
* Non-executable stacks – many operating systems have at least some support for this&lt;br /&gt;
&lt;br /&gt;
* Compiler tools – StackShield, StackGuard, and Libsafe, among others&lt;br /&gt;
&lt;br /&gt;
* Safe functions – use strncat instead of strcat, strncpy instead of strcpy, etc&lt;br /&gt;
&lt;br /&gt;
* Patches – Be sure to keep your web and application servers fully patched, and be aware of bug reports relating to applications upon which your code is dependent.&lt;br /&gt;
&lt;br /&gt;
* Periodically scan your application with one or more of the commonly available scanners that look for buffer overflow flaws in your server products and your custom web applications. &lt;br /&gt;
&lt;br /&gt;
==Stack Overflow ==&lt;br /&gt;
&lt;br /&gt;
Stack overflows are the best understood and the most common form of buffer overflows. The basics of a stack overflow is simple:&lt;br /&gt;
&lt;br /&gt;
* There are two buffers, a source buffer containing arbitrary input (presumably from the attacker), and a destination buffer that is too small for the attack input. The second buffer resides on the stack and somewhat adjacent to the function return address on the stack.&lt;br /&gt;
&lt;br /&gt;
* The faulty code does ''not'' check that the source buffer is too large to fit in the destination buffer. It copies the attack input to the destination buffer, overwriting additional information on the stack (such as the function return address).&lt;br /&gt;
&lt;br /&gt;
* When the function returns, the CPU unwinds the stack frame and pops the (now modified) return address from the stack.&lt;br /&gt;
&lt;br /&gt;
* Control does not return to the function as it should. Instead, arbitrary code (chosen by the attacker when crafting the initial input) is executed. &lt;br /&gt;
&lt;br /&gt;
The following example, written in C, demonstrates a stack overflow exploit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 void f(char* s) {&lt;br /&gt;
&lt;br /&gt;
    char buffer[10];&lt;br /&gt;
&lt;br /&gt;
    strcpy(buffer, s);&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 void main(void) {&lt;br /&gt;
&lt;br /&gt;
    f(&amp;quot;01234567890123456789&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[root /tmp]# ./stacktest&lt;br /&gt;
&lt;br /&gt;
Segmentation fault&lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language) that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* copies data from one buffer on the stack to another without checking sizes first AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values or non-executable stacks to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
it is likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
# Deploy on systems capable of using non-executable stacks, such as:&lt;br /&gt;
## AMD and Intel x86-64 chips with associated 64-bit operating systems&lt;br /&gt;
## Windows XP SP2 (both 32- and 64-bit)&lt;br /&gt;
## Windows 2003 SP1 (both 32- and 64-bit)&lt;br /&gt;
## Linux after 2.6.8 on AMD and x86-64 processors in 32- and 64-bit mode&lt;br /&gt;
## OpenBSD (w^x on Intel, AMD, SPARC, Alpha and PowerPC)&lt;br /&gt;
## Solaris 2.6 and later with the “noexec_user_stack” flag enabled&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Heap Overflow ==&lt;br /&gt;
&lt;br /&gt;
Heap overflows are problematic in that they are not necessarily protected by CPUs capable of using non-execuable stacks. A heap is an area of memory allocated by the application at run-time to store data. The following example, written in C, shows a heap overflow exploit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #define BSIZE 16&lt;br /&gt;
 #define OVERSIZE 8 /* overflow buf2 by OVERSIZE bytes */&lt;br /&gt;
&lt;br /&gt;
 void main(void) {&lt;br /&gt;
    u_long b_diff;&lt;br /&gt;
    char *buf0 = (char*)malloc(BSIZE);		// create two buffers&lt;br /&gt;
    char *buf1 = (char*)malloc(BSIZE);&lt;br /&gt;
&lt;br /&gt;
    b_diff = (u_long)buf1 - (u_long)buf0;	// difference between locations&lt;br /&gt;
    printf(&amp;quot;Initial values:  &amp;quot;);&lt;br /&gt;
    printf(&amp;quot;buf0=%p, buf1=%p, b_diff=0x%x bytes\n&amp;quot;, buf0, buf1, b_diff);&lt;br /&gt;
&lt;br /&gt;
    memset(buf1, 'A', BUFSIZE-1), buf1[BUFSIZE-1] = '\0';&lt;br /&gt;
    printf(&amp;quot;Before overflow: buf1=%s\n&amp;quot;, buf1);&lt;br /&gt;
&lt;br /&gt;
    memset(buf0, 'B', (u_int)(diff + OVERSIZE));&lt;br /&gt;
    printf(&amp;quot;After overflow:  buf1=%s\n&amp;quot;, buf1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[root /tmp]# ./heaptest&lt;br /&gt;
&lt;br /&gt;
Initial values:  buf0=0x9322008, buf1=0x9322020, diff=0xff0 bytes&lt;br /&gt;
Before overflow: buf1=AAAAAAAAAAAAAAA&lt;br /&gt;
After overflow:  buf1=BBBBBBBBAAAAAAA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simple program above shows two buffers being allocated on the heap, with the first buffer being overflowed to overwrite the contents of the second buffer. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language)  that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* copies data from one buffer on the stack to another without checking sizes first AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
it is likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Format String ==&lt;br /&gt;
&lt;br /&gt;
Format string buffer overflows (usually called &amp;quot;format string vulnerabilities&amp;quot;) are highly specialized buffer overflows that can have the same effects as other buffer overflow attacks. Basically, format string vulnerabilities take advantage of the mixture of data and control information in certain functions, such as C/C++'s printf. The easiest way to understand this class of vulnerability is with an example:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 void main(void) {&lt;br /&gt;
&lt;br /&gt;
    char str[100] = scanf(&amp;quot;%s&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;%s&amp;quot;, str);&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This simple program takes input from the user and displays it back on the screen. The string %s means that the other parameter, str, should be displayed as a string. This example is ''not ''vulnerable to a format string attack, but if one changes the last line, it becomes exploitable:&lt;br /&gt;
&lt;br /&gt;
    printf(str);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see how, consider the user entering the special input:&lt;br /&gt;
&lt;br /&gt;
''%08x.%08x.%08x.%08x.%08x''&lt;br /&gt;
&lt;br /&gt;
By constructing input as such, the program can be exploited to print the first five entries from the stack.  &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* uses functions such as printf, snprintf directly, or indirectly through system services (such as syslog) or other AND&lt;br /&gt;
&lt;br /&gt;
* the use of such functions allows input from the user to contain control information interpreted by the function itself&lt;br /&gt;
&lt;br /&gt;
it is highly likely that the application is vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. Specifically check for control information (meta-characters like '%')&lt;br /&gt;
# Avoid the use of functions like printf that allow user input to contain control information&lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Unicode Overflow ==&lt;br /&gt;
&lt;br /&gt;
Unicode exploits are a bit more difficult to do than typical buffer overflows as demonstrated in Anley’s 2002 paper, but it is wrong to assume that by using Unicode, you are protected against buffer overflows. Examples of Unicode overflows include Code Red, a devastating Trojan with an estimated economic cost in the billions of dollars. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
If your program:&lt;br /&gt;
&lt;br /&gt;
* is written in a language (or depends upon a program that is written in a language) that allows buffer overflows to be created (see Table 8.1) AND&lt;br /&gt;
&lt;br /&gt;
* takes Unicode input from a user AND&lt;br /&gt;
&lt;br /&gt;
* fails to sanitize the input AND&lt;br /&gt;
&lt;br /&gt;
* does not use techniques such as canary values to prevent buffer overflows THEN&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself  ===&lt;br /&gt;
&lt;br /&gt;
# Deploy on systems capable of using non-executable stacks, such as:&lt;br /&gt;
## AMD and Intel x86-64 chips with associated 64-bit operating systems&lt;br /&gt;
## Windows XP SP2 (both 32- and 64-bit)&lt;br /&gt;
## Windows 2003 SP1 (both 32- and 64-bit)&lt;br /&gt;
## Linux after 2.6.8 on AMD and x86-64 processors in 32- and 64-bit mode&lt;br /&gt;
## OpenBSD (w^x on Intel, AMD, SPARC, Alpha and PowerPC)&lt;br /&gt;
## Solaris 2.6 and later with the “noexec_user_stack” flag enabled&lt;br /&gt;
# Use higher-level programming languages that are strongly typed and that disallow direct memory access. &lt;br /&gt;
# Validate input to prevent unexpected data from being processed, such as being too long, of the wrong data type, containing &amp;quot;junk&amp;quot; characters, etc. &lt;br /&gt;
# If relying upon operating system functions or utilities written in a vulnerable language, ensure that they:&lt;br /&gt;
## use the principle of least privilege&lt;br /&gt;
## use compilers that protect against stack and heap overflows&lt;br /&gt;
## are current in terms of patches&lt;br /&gt;
&lt;br /&gt;
==Integer Overflow ==&lt;br /&gt;
&lt;br /&gt;
When an application takes two numbers of fixed word size and perform an operation with them, the result may not fit within the same word size. For example, if the two 8-bit numbers 192 and 208 are added together and stored into another 8-bit byte, the result will not fit into an 8-bit result:&lt;br /&gt;
&lt;br /&gt;
''         1100 0000''&lt;br /&gt;
&lt;br /&gt;
''  +      1101 0000''&lt;br /&gt;
&lt;br /&gt;
''  = 0001 1001 0000''&lt;br /&gt;
&lt;br /&gt;
Although such an operation will usually cause some type of exception, your application must be coded to check for such an exception and take proper action. Otherwise, your application would report that 192 + 208 equals 144.&lt;br /&gt;
&lt;br /&gt;
The following code demonstrates a buffer overflow, and was adapted from Blexim's ''Phrack ''article:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'' #include &amp;lt;stdio.h&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
'' #include &amp;lt;string.h&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'' void main(int argc, char *argv[]){''&lt;br /&gt;
&lt;br /&gt;
''   int i = atoi(argv[1]);		// input from user''&lt;br /&gt;
&lt;br /&gt;
''   unsigned short s = i;		// truncate to a short''&lt;br /&gt;
&lt;br /&gt;
''   char buf[50];				// large buffer''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''   if (s &amp;gt; 10) {				// check we're not greater than 10''&lt;br /&gt;
&lt;br /&gt;
''     return;''&lt;br /&gt;
&lt;br /&gt;
''   }''&lt;br /&gt;
&lt;br /&gt;
''   memcpy(buf, argv[2], i);		// copy i bytes to the buffer''&lt;br /&gt;
&lt;br /&gt;
''   buf[i] = '\0';				// add a null byte to the buffer''&lt;br /&gt;
&lt;br /&gt;
''   printf(&amp;quot;%s\n&amp;quot;, buf);			// output the buffer contents''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''   return;''&lt;br /&gt;
&lt;br /&gt;
'' } ''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''[root /tmp]# ./inttest 65580 foobar''&lt;br /&gt;
&lt;br /&gt;
''Segmentation fault''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code is exploitable because the validation does not occur on the input value (65580), but rather the value after it has been converted to an unsigned short (45). &lt;br /&gt;
&lt;br /&gt;
Integer overflows can be a problem in any language and can be exploited when integers are used in array indices and implicit short math operations. &lt;br /&gt;
&lt;br /&gt;
===How to determine if you are vulnerable ===&lt;br /&gt;
&lt;br /&gt;
* Examine use of signed integers, bytes, and shorts.&lt;br /&gt;
&lt;br /&gt;
* Are there cases where these values are used as array indices after performing an arithmetic operation (+, -, *, /, or % (modulo))?&lt;br /&gt;
&lt;br /&gt;
* How would your program react to a negative or zero value for integer values, particular during array lookups?&lt;br /&gt;
&lt;br /&gt;
===How to protect yourself ===&lt;br /&gt;
&lt;br /&gt;
* If using .NET, use David LeBlanc’s SafeInt class or a similar construct. Otherwise, use a &amp;quot;BigInteger&amp;quot; or &amp;quot;BigDecimal&amp;quot; implementation in cases where it would be hard to validate input yourself.&lt;br /&gt;
&lt;br /&gt;
* If your compiler supports the option, change the default for integers to be unsigned unless otherwise explicitly stated. Use unsigned integers whenever you don't need negative values.&lt;br /&gt;
&lt;br /&gt;
* Use range checking if your language or framework supports it, or be sure to implement range checking yourself after all arithmetic operations.&lt;br /&gt;
&lt;br /&gt;
* Be sure to check for exceptions if your language supports it. &lt;br /&gt;
&lt;br /&gt;
==Further reading ==&lt;br /&gt;
&lt;br /&gt;
* Team Teso, ''Exploiting Format String Vulnerabilities''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.cs.ucsb.edu/~jzhou/security/formats-teso.html&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Newsham, Tim, ''Format String Attacks&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.lava.net/~newsham/format-string-attacks.pdf&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* w00 w00 and Matt Conover, ''Preliminary Heap Overflow Tutorial''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.w00w00.org/files/articles/heaptut.txt&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Chris Anley, ''Creating Arbitrary Shellcode In Unicode Expanded Strings''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.ngssoftware.com/papers/unicodebo.pdf&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* David Leblanc, ''Integer Handling with the C++ SafeInt Class ''&amp;lt;u&amp;gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncode/html/secure01142004.asp&amp;lt;/u&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
* Aleph One, ''Smashing the Stack for fun and profit''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.phrack.org/phrack/49/P49-14&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Mark Donaldson, ''Inside the buffer Overflow Attack: Mechanism, method, &amp;amp; prevention''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://rr.sans.org/code/inside_buffer.php&amp;lt;/u&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
* ''NX Bit'', Wikipedia article&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://en.wikipedia.org/wiki/NX_bit&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Horizon'', How to bypass Solaris no execute stack protection&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.secinf.net/unix_security/How_to_bypass_Solaris_nonexecutable_stack_protection_.html&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Alexander Anisimov'', Defeating Microsoft Windows XP SP2 Heap protection and DEP bypass'', Positive Technologies&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.maxpatrol.com/defeating-xpsp2-heap-protection.htm&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Matt Conover, w00w00 on Heap Overflows, w00w00 Security Team&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.w00w00.org/files/articles/heaptut.txt&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Blexim, ''Basic Integer Overflows&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;u&amp;gt;http://www.phrack.org/phrack/60/p60-0x0a.txt&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* StackShield&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.angelfire.com/sk/stackshield/index.html&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* StackGuard&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.immunix.org&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Libsafe&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.research.avayalabs.com/project/libsafe&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Guide Table of Contents]]&lt;br /&gt;
[[Category:OWASP_Guide_Project]]&lt;/div&gt;</summary>
		<author><name>Scovetta</name></author>	</entry>

	</feed>