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

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:Penetration_Testing_Tools&amp;diff=164299</id>
		<title>Category:Penetration Testing Tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:Penetration_Testing_Tools&amp;diff=164299"/>
				<updated>2013-12-04T16:47:27Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Stub}}&lt;br /&gt;
[[Category:OWASP Tools Project]]&lt;br /&gt;
&lt;br /&gt;
== Penetration Testing Tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Information Gathering Tools ===&lt;br /&gt;
*'''Fingerprinting'''&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://net-square.com/httprint/index.shtml httprint]&lt;br /&gt;
| tool_owner = NetSquare Inc&lt;br /&gt;
| tool_licence = no cost for personal, educational and non-commercial use.&lt;br /&gt;
| tool_platforms = Win, Lin, Mac, FreeBSD&lt;br /&gt;
}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://www.computec.ch/projekte/httprecon/ httprecon]&lt;br /&gt;
| tool_owner = Marc Ruef&lt;br /&gt;
| tool_licence = GPL&lt;br /&gt;
| tool_platforms = Win&lt;br /&gt;
}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://www.netcraft.com Netcraft]| tool_owner = Netcraft Inc &lt;br /&gt;
| tool_licence = N/A | tool_platforms = WebBased&lt;br /&gt;
}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://yehg.net/q WebRecon]| tool_owner = Aung Khant&lt;br /&gt;
| tool_licence =GPL | tool_platforms = WebBased&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Configuration Management Testing Tools ===&lt;br /&gt;
*'''SSL Testing'''&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.openssl.org/ OpenSSL]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.foundstone.com/us/resources/proddesc/ssldigger.htm SSL Digger]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*''' DB Listener Testing'''&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.jammed.com/%7Ejwa/hacks/security/tnscmd/tnscmd-doc.html TNS Listener]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.quest.com/toad Toad]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Authentication Testing Tools ===&lt;br /&gt;
*'''Password Brute Force Testing'''&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://portswigger.net/intruder/ Burp Intruder]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.hoobie.net/brutus/ Brutus]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.oxid.it/cain.html Cain &amp;amp; Abel] | tool_owner = oxid &lt;br /&gt;
| tool_licence = Freeware | tool_platforms = Windows}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.openwall.com/john/ John the Ripper]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://ophcrack.sourceforge.net/ Ophcrack]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.thc.org/thc-hydra/ THC Hydra] | tool_owner= The Hacker's Choise | tool_platforms = Lin}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Session Management Testing Tools ===&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.foundstone.com/us/resources/proddesc/cookiedigger.htm CookieDigger]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Authorization Testing Tools ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Data Validation Testing Tools ===&lt;br /&gt;
*'''Fuzzers'''&lt;br /&gt;
*'''SQL Injection Testing'''&lt;br /&gt;
*'''XSS Testing'''&lt;br /&gt;
*'''Buffer Overflow Testing'''&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://code.google.com/p/skipfish/ Skipfish] &lt;br /&gt;
| tool_owner = N/A &lt;br /&gt;
| tool_licence = Apache &lt;br /&gt;
| tool_platforms = Linux&lt;br /&gt;
}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://w3af.sourceforge.net/ w3af] | tool_owner = NA &lt;br /&gt;
| tool_licence = GPL v2 | tool_platforms = Python required (cross platform)&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Denial of Service Testing Tools ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Web Services Testing Tools ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ajax Testing Tools ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Traffic Monitoring ===&lt;br /&gt;
*'''Web Proxies'''&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://portswigger.net/proxy/ Burp Suite]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.parosproxy.org/download.shtml Paros Proxy]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [[OWASP_WebScarab_Project|Webscarab]]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.bayden.com/TamperIE/ TamperIE]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [https://addons.mozilla.org/en-US/firefox/addon/966 Tamper Data]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.immunitysec.com/resources-freesoftware.shtml SPIKE Proxy]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.sensepost.com/research/suru/ Suru Web Proxy]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.charlesproxy.com/ Charles]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.bindshell.net/tools/odysseus Odysseus]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://jscmd.rubyforge.org/ JS Commander]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://code.google.com/p/ratproxy/ ratproxy]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*'''Sniffers'''&lt;br /&gt;
&lt;br /&gt;
=== Encoders / Decoders ===&lt;br /&gt;
*'''CAPTCHA Decoders'''&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://caca.zoy.org/wiki/PWNtcha PWNtcha]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://churchturing.org/captcha-dist/ The Captcha Breaker]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Web Testing Frameworks ===&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://w3af.sourceforge.net/ w3af]&lt;br /&gt;
| tool_owner = Andres Riancho and w3af team&lt;br /&gt;
| tool_licence = GPLv2&lt;br /&gt;
| tool_platforms = Windows, Linux&lt;br /&gt;
}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://www.websecurify.com Websecurify]&lt;br /&gt;
| tool_owner = GNUCITIZEN / Websecurify&lt;br /&gt;
| tool_licence = GPLv2&lt;br /&gt;
| tool_platforms = Windows, Mac OS, Linux&lt;br /&gt;
}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://www.zerodayscan.com/ ZeroDayScan] &lt;br /&gt;
| tool_owner = &lt;br /&gt;
| tool_licence = Free&lt;br /&gt;
| tool_platforms = Online, Cloud&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:Penetration_Testing_Tools&amp;diff=164298</id>
		<title>Category:Penetration Testing Tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:Penetration_Testing_Tools&amp;diff=164298"/>
				<updated>2013-12-04T16:46:39Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Stub}}&lt;br /&gt;
[[Category:OWASP Tools Project]]&lt;br /&gt;
&lt;br /&gt;
== Penetration Testing Tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Information Gathering Tools ===&lt;br /&gt;
*'''Fingerprinting'''&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://net-square.com/httprint/index.shtml httprint]&lt;br /&gt;
| tool_owner = NetSquare Inc&lt;br /&gt;
| tool_licence = no cost for personal, educational and non-commercial use.&lt;br /&gt;
| tool_platforms = Win, Lin, Mac, FreeBSD&lt;br /&gt;
}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://www.computec.ch/projekte/httprecon/ httprecon]&lt;br /&gt;
| tool_owner = Marc Ruef&lt;br /&gt;
| tool_licence = GPL&lt;br /&gt;
| tool_platforms = Win&lt;br /&gt;
}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://www.netcraft.com Netcraft]| tool_owner = Netcraft Inc &lt;br /&gt;
| tool_licence = N/A | tool_platforms = WebBased&lt;br /&gt;
}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://yehg.net/q WebRecon]| tool_owner = Aung Khant&lt;br /&gt;
| tool_licence =GPL | tool_platforms = WebBased&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Configuration Management Testing Tools ===&lt;br /&gt;
*'''SSL Testing'''&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.openssl.org/ OpenSSL]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.foundstone.com/us/resources/proddesc/ssldigger.htm SSL Digger]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*''' DB Listener Testing'''&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.jammed.com/%7Ejwa/hacks/security/tnscmd/tnscmd-doc.html TNS Listener]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.quest.com/toad Toad]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Authentication Testing Tools ===&lt;br /&gt;
*'''Password Brute Force Testing'''&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://portswigger.net/intruder/ Burp Intruder]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.hoobie.net/brutus/ Brutus]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.oxid.it/cain.html Cain &amp;amp; Abel] | tool_owner = oxid &lt;br /&gt;
| tool_licence = Freeware | tool_platforms = Windows}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.openwall.com/john/ John the Ripper]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://ophcrack.sourceforge.net/ Ophcrack]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.thc.org/thc-hydra/ THC Hydra] | tool_owner= The Hacker's Choise | tool_platforms = Lin--[[User:Jorge Correa|Jorge Correa]] ([[User talk:Jorge Correa|talk]]) 10:46, 4 December 2013 (CST)}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Session Management Testing Tools ===&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.foundstone.com/us/resources/proddesc/cookiedigger.htm CookieDigger]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Authorization Testing Tools ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Data Validation Testing Tools ===&lt;br /&gt;
*'''Fuzzers'''&lt;br /&gt;
*'''SQL Injection Testing'''&lt;br /&gt;
*'''XSS Testing'''&lt;br /&gt;
*'''Buffer Overflow Testing'''&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://code.google.com/p/skipfish/ Skipfish] &lt;br /&gt;
| tool_owner = N/A &lt;br /&gt;
| tool_licence = Apache &lt;br /&gt;
| tool_platforms = Linux&lt;br /&gt;
}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://w3af.sourceforge.net/ w3af] | tool_owner = NA &lt;br /&gt;
| tool_licence = GPL v2 | tool_platforms = Python required (cross platform)&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Denial of Service Testing Tools ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Web Services Testing Tools ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ajax Testing Tools ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Traffic Monitoring ===&lt;br /&gt;
*'''Web Proxies'''&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://portswigger.net/proxy/ Burp Suite]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.parosproxy.org/download.shtml Paros Proxy]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [[OWASP_WebScarab_Project|Webscarab]]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.bayden.com/TamperIE/ TamperIE]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [https://addons.mozilla.org/en-US/firefox/addon/966 Tamper Data]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.immunitysec.com/resources-freesoftware.shtml SPIKE Proxy]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.sensepost.com/research/suru/ Suru Web Proxy]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.charlesproxy.com/ Charles]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://www.bindshell.net/tools/odysseus Odysseus]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://jscmd.rubyforge.org/ JS Commander]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://code.google.com/p/ratproxy/ ratproxy]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*'''Sniffers'''&lt;br /&gt;
&lt;br /&gt;
=== Encoders / Decoders ===&lt;br /&gt;
*'''CAPTCHA Decoders'''&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://caca.zoy.org/wiki/PWNtcha PWNtcha]}}&lt;br /&gt;
{{OWASP Tool Info || tool_name = [http://churchturing.org/captcha-dist/ The Captcha Breaker]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Web Testing Frameworks ===&lt;br /&gt;
&lt;br /&gt;
{{:Template:OWASP Tool Headings}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://w3af.sourceforge.net/ w3af]&lt;br /&gt;
| tool_owner = Andres Riancho and w3af team&lt;br /&gt;
| tool_licence = GPLv2&lt;br /&gt;
| tool_platforms = Windows, Linux&lt;br /&gt;
}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://www.websecurify.com Websecurify]&lt;br /&gt;
| tool_owner = GNUCITIZEN / Websecurify&lt;br /&gt;
| tool_licence = GPLv2&lt;br /&gt;
| tool_platforms = Windows, Mac OS, Linux&lt;br /&gt;
}}&lt;br /&gt;
{{OWASP Tool Info | tool_name = [http://www.zerodayscan.com/ ZeroDayScan] &lt;br /&gt;
| tool_owner = &lt;br /&gt;
| tool_licence = Free&lt;br /&gt;
| tool_platforms = Online, Cloud&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137510</id>
		<title>OWASP Top Ten Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137510"/>
				<updated>2012-10-11T00:00:07Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The following is a developer-centric defensive cheat sheet for the [[OWASP Top Ten Project]]. It also presents a quick reference based on [[OWASP Testing Project]] to help how to identify the risks.&lt;br /&gt;
&lt;br /&gt;
= OWASP Top Ten Cheat Sheet =&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
| &lt;br /&gt;
||'''Presentation'''&lt;br /&gt;
||'''Controller'''&lt;br /&gt;
||'''Model'''&lt;br /&gt;
||'''Testing (OWASP Testing Guide V3)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A1 Injection'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Set a correct content type&lt;br /&gt;
*Set safe character set (UTF-8)&lt;br /&gt;
*Set correct locale&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
*Enforce input field type and lengths.&lt;br /&gt;
*Validate fields and provide feedback.&lt;br /&gt;
*Ensure option selects and radio contain only sent values.&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation.&lt;br /&gt;
(LR) Sanitize input.&lt;br /&gt;
&lt;br /&gt;
''Tip: updating a negative list (such as looking for &amp;quot;script&amp;quot;, &amp;quot;sCrIpT&amp;quot;, &amp;quot;ßCrîpt&amp;quot;, etc) will require expensive and constant deployments and will '''always '''fail as attackers work out your list of &amp;quot;bad&amp;quot; words. Positive validation is simpler, faster and usually more secure and needs updating far less than any other validation mechanism. ''&lt;br /&gt;
||*'''[https://www.owasp.org/index.php/Query_Parameterization_Cheat_Sheet Parameterized queries]'''&lt;br /&gt;
&lt;br /&gt;
*Object relational model (Hibernate).&lt;br /&gt;
*Active Record design pattern.&lt;br /&gt;
*Stored procedures.&lt;br /&gt;
&lt;br /&gt;
*Escape mechanisms such as ESAPI's Encoder:&lt;br /&gt;
**EncodeForLDAP()&lt;br /&gt;
**Encoder.EncodeforOS()&lt;br /&gt;
&lt;br /&gt;
''Tip: '''All '''SQL Injection is due to dynamic SQL queries. Strongly consider prohibiting dynamic SQL queries within your organization ''&lt;br /&gt;
&lt;br /&gt;
||''4.8.5 SQL Injection (OWASP-DV-005)''&lt;br /&gt;
''4.8.6 LDAP Injection (OWASP-DV-006)''&lt;br /&gt;
''4.8.7 ORM Injection (OWASP-DV-007)''&lt;br /&gt;
''4.8.8 XML Injection (OWASP-DV-008)''&lt;br /&gt;
''4.8.9 SSI Injection (OWASP-DV-009)''&lt;br /&gt;
''4.8.10 XPath Injection (OWASP-DV-010)''&lt;br /&gt;
''4.8.11 IMAP/SMTP Injection (OWASP-DV-011)''&lt;br /&gt;
''4.8.12 Code Injection (OWASP-DV-012)''&lt;br /&gt;
''4.8.13 OS Commanding (OWASP-DV-013)''&lt;br /&gt;
''4.8.14 Buffer overflow (OWASP-DV-014)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A2 XSS'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Set correct content type&lt;br /&gt;
*Set safe character set (UTF-8)&lt;br /&gt;
*Set correct locale&lt;br /&gt;
*Output encode all user data as per output context&lt;br /&gt;
*Set input constraints&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
*Enforce input field type and lengths.&lt;br /&gt;
*Validate fields and provide feedback.&lt;br /&gt;
*Ensure option selects and radio contain only sent values.&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation &lt;br /&gt;
(LR) Sanitize input &lt;br /&gt;
&lt;br /&gt;
''Tip: Only process data that is 100% trustworthy. Everything else is hostile and should be rejected.''&lt;br /&gt;
||''Tip: Do not store data HTML encoded in the database. This prevents new uses for the data, such as web services, RSS feeds, FTP batches, data warehousing, cloud computing, and so on.''&lt;br /&gt;
&lt;br /&gt;
''Tip: Use OWASP Scrubbr to clean tainted or hostile data from legacy data''&lt;br /&gt;
&lt;br /&gt;
||''4.8.1 Testing for Reflected Cross Site Scripting (OWASP-DV-001)''&lt;br /&gt;
''4.8.2 Testing for Stored Cross Site Scripting (OWASP-DV-002)''&lt;br /&gt;
''4.8.3 Testing for DOM based Cross Site Scripting (OWASP-DV-003)''&lt;br /&gt;
''4.8.4 Testing for Cross Site Flashing (OWASP-DV004)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A3 Weak authentication and session management'''&lt;br /&gt;
||''Render:''&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient for this view.&lt;br /&gt;
*Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies.&lt;br /&gt;
*Send CSRF token with forms.&lt;br /&gt;
&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Only use inbuilt session management.&lt;br /&gt;
*Store secondary SSO / framework / custom session identifiers in native session object – do not send as additional headers or cookies.&lt;br /&gt;
&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient to perform this action.&lt;br /&gt;
*Validate CSRF token.&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
''Tip: Consider the use of a &amp;quot;governor&amp;quot; to regulate the maximum number of requests per second / minute / hour that this user may perform. For example, a typical banking user should not perform more than ten transactions a minute, and one hundred per second is dangerous and should be blocked.''&lt;br /&gt;
&lt;br /&gt;
||''4.4.2 Testing for user enumeration (OWASP-AT-002)''&lt;br /&gt;
''4.4.3 Testing for Guessable (Dictionary) User Account (OWASP-AT-003)''&lt;br /&gt;
''4.4.4 Brute Force Testing (OWASP-AT-004)''&lt;br /&gt;
''4.4.6 Testing for vulnerable remember password and pwd reset (OWASP-AT-006)''&lt;br /&gt;
''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.4.7 Testing for Logout and Browser Cache Management (OWASP-AT-007)''&lt;br /&gt;
''4.4.8 Testing for CAPTCHA (OWASP-AT-008)''&lt;br /&gt;
''4.4.9 Testing Multiple Factors Authentication (OWASP-AT-009)''&lt;br /&gt;
''4.4.10 Testing for Race Conditions (OWASP-AT-010)''&lt;br /&gt;
''4.5.1 Testing for Session Management Schema (OWASP-SM-001)''&lt;br /&gt;
''4.5.2 Testing for Cookies attributes (OWASP-SM-002)''&lt;br /&gt;
''4.5.3 Testing for Session Fixation (OWASP-SM_003)''&lt;br /&gt;
''4.5.4 Testing for Exposed Session Variables (OWASP-SM-004)''&lt;br /&gt;
''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
''4.6.3 Testing for Privilege Escalation (OWASP-AZ-003)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A4 Insecure Direct Object Reference'''&lt;br /&gt;
||If data is from internal trusted sources, no data is sent.&lt;br /&gt;
&lt;br /&gt;
Or&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Send indirect random access reference map value.&lt;br /&gt;
||Obtain data from internal, trusted sources.&lt;br /&gt;
&lt;br /&gt;
Or&lt;br /&gt;
&lt;br /&gt;
Obtain direct value from random access reference access map.&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data.&lt;br /&gt;
&lt;br /&gt;
||''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A5 Cross Site Request Forgery'''&lt;br /&gt;
||''Pre-render:''&lt;br /&gt;
*Validate user is authenticated&lt;br /&gt;
*Validate role is sufficient for this view&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Send CSRF token.&lt;br /&gt;
*Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies.&lt;br /&gt;
||&lt;br /&gt;
*Validate CSRF token.&lt;br /&gt;
*Validate role is sufficient to perform this action.&lt;br /&gt;
*Validate role is sufficient.&lt;br /&gt;
&lt;br /&gt;
''Tip: CSRF is '''always '''possible if there is XSS, so make sure XSS is eliminated within your application.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A6 Security Misconfiguration'''&lt;br /&gt;
||Ensure web servers and application servers are hardened.&lt;br /&gt;
&lt;br /&gt;
PHP: Ensure allow_url_fopen and allow_url_include are both disabled in php.ini. Consider the use of Suhosin extension &lt;br /&gt;
||Ensure web servers and application servers are hardened &lt;br /&gt;
&lt;br /&gt;
XML: Ensure common web attacks (remote XSLT transforms, hostile XPath queries, recursive DTDs, and so on) are protected by your XML stack. Do not hand craft XML documents or queries – use the XML layer. &lt;br /&gt;
||Ensure database servers are hardened &lt;br /&gt;
&lt;br /&gt;
||''4.2.6 Analysis of Error Codes (OWASP-IG-006)''&lt;br /&gt;
''4.3.2 DB Listener Testing (OWASP-CM-002)''&lt;br /&gt;
''4.3.3 Infrastructure Configuration Management Testing (OWASP-CM-003)''&lt;br /&gt;
''4.3.4 Application Configuration Management Testing (OWASP-CM-004)''&lt;br /&gt;
''4.3.5 Testing for File Extensions Handling (OWASP-CM-005)''&lt;br /&gt;
''4.3.6 Old, Backup and Unreferenced Files (OWASP-CM-006)''&lt;br /&gt;
''4.3.7 Infrastructure and Application Admin Interfaces (OWASP-CM-007)''&lt;br /&gt;
''4.3.8 Testing for HTTP Methods and XST (OWASP-CM-008)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A7 Insufficient Cryptographic Storage'''&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Use strong ciphers (AES 128 or better).&lt;br /&gt;
*Use strong hashes (SHA 256 or better) with salts for passwords.&lt;br /&gt;
*Protect keys more than any other asset.&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Do not send keys or hashes to the browser.&lt;br /&gt;
&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Use strong ciphers (AES 128 or better).&lt;br /&gt;
*Use strong hashes (SHA 256 or better) with salts for passwords.&lt;br /&gt;
*Protect keys more than any other asset.&lt;br /&gt;
&lt;br /&gt;
''Tip: Only certain personally identifiable information and sensitive values MUST be encrypted. Encrypt data that would be embarrassing or costly if it was leaked or stolen. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: It is best to encrypt data on the application server, rather than the database server.''&lt;br /&gt;
&lt;br /&gt;
||''Design:''&lt;br /&gt;
&lt;br /&gt;
''Tip: Do not use RDBMS database, row or table level encryption. The data can be retrieved in the clear by anyone with direct access to the server, or over the network using the application credentials. It might even traverse the network in the clear despite being &amp;quot;encrypted&amp;quot; on disk. ''&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A8 Failure to Restrict URL access'''&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Ensure all non-web data is outside the web root (logs, configuration, etc).&lt;br /&gt;
*Use octet byte streaming instead of providing access to real files such as PDFs or CSVs or similar.&lt;br /&gt;
*Ensure every page requires a role, even if it is &amp;quot;guest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
''Pre-render:''&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient to view secured URL.&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Send CSRF token.&lt;br /&gt;
||&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient to perform secured action.&lt;br /&gt;
*Validate CSRF token.&lt;br /&gt;
&lt;br /&gt;
''Tip: It's impossible to control access to secured resources that the web application server does not directly serve. Therefore, PDF reports or similar should be served by the web application server using binary octet streaming. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: Assume attackers '''will''' learn where &amp;quot;hidden&amp;quot; directories and &amp;quot;random&amp;quot; filenames are, so do not store these files in the web root, even if they are not directly linked.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A9 Insufficient Transport Layer Protection'''&lt;br /&gt;
||&lt;br /&gt;
*Use TLS 1.2 or later for all web communications.&lt;br /&gt;
*Buy extended validation (EV) certificates for public web servers.&lt;br /&gt;
&lt;br /&gt;
''Tip: Use TLS 1.2 always – even internally. Most snooping is done within corporate networks – and it is as easy and unethical as fishing with dynamite.''&lt;br /&gt;
||&lt;br /&gt;
*Mandate strong encrypted communications between web and database servers and any other servers or administrative users.&lt;br /&gt;
||&lt;br /&gt;
*Mandate strong encrypted communications with application servers and any other servers or administrative users.&lt;br /&gt;
&lt;br /&gt;
||''4.3.1 SSL/TLS Testing (OWASP-CM-001)''&lt;br /&gt;
''4.4.1 Credentials transport over an encrypted channel (OWASP-AT-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A10 Unvalidated Redirects and Forwards'''&lt;br /&gt;
||&lt;br /&gt;
*Design the app without URL redirection parameters.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Use random indirect object references for redirection parameters.&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
*Design the app without URL redirection parameters.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
*Obtain direct redirection parameter from random indirect reference access map.&lt;br /&gt;
*(LR) Positive validation of redirection parameter.&lt;br /&gt;
*(NR) Java – Do not forward() requests as this prevents SSO access control mechanisms.&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
*Validate role is sufficient to create, read, update, or delete data.&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Andrew van der Stock vanderaj[at]owasp.org&lt;br /&gt;
&lt;br /&gt;
Ismael Rocha Gonçalves ismaelrg[at]gmail.com&lt;br /&gt;
&lt;br /&gt;
Jorge Correa jacorream@gmail.com&lt;br /&gt;
&lt;br /&gt;
= Other Cheatsheets =&lt;br /&gt;
{{Cheatsheet_Navigation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137509</id>
		<title>OWASP Top Ten Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137509"/>
				<updated>2012-10-10T23:59:35Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The following is a developer-centric defensive cheat sheet for the [[OWASP Top Ten Project]]. It also presents a quick reference based on [[OWASP Testing Project]] to help how to identify the risks.&lt;br /&gt;
&lt;br /&gt;
= OWASP Top Ten Cheat Sheet =&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
| &lt;br /&gt;
||'''Presentation'''&lt;br /&gt;
||'''Controller'''&lt;br /&gt;
||'''Model'''&lt;br /&gt;
||'''Testing (OWASP Testing Guide V3)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A1 Injection'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Set a correct content type&lt;br /&gt;
*Set safe character set (UTF-8)&lt;br /&gt;
*Set correct locale&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
*Enforce input field type and lengths.&lt;br /&gt;
*Validate fields and provide feedback.&lt;br /&gt;
*Ensure option selects and radio contain only sent values.&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation.&lt;br /&gt;
(LR) Sanitize input.&lt;br /&gt;
&lt;br /&gt;
''Tip: updating a negative list (such as looking for &amp;quot;script&amp;quot;, &amp;quot;sCrIpT&amp;quot;, &amp;quot;ßCrîpt&amp;quot;, etc) will require expensive and constant deployments and will '''always '''fail as attackers work out your list of &amp;quot;bad&amp;quot; words. Positive validation is simpler, faster and usually more secure and needs updating far less than any other validation mechanism. ''&lt;br /&gt;
||*'''[https://www.owasp.org/index.php/Query_Parameterization_Cheat_Sheet Parameterized queries]'''&lt;br /&gt;
&lt;br /&gt;
*Object relational model (Hibernate).&lt;br /&gt;
*Active Record design pattern.&lt;br /&gt;
*Stored procedures.&lt;br /&gt;
&lt;br /&gt;
*Escape mechanisms such as ESAPI's Encoder:&lt;br /&gt;
**EncodeForLDAP()&lt;br /&gt;
**Encoder.EncodeforOS()&lt;br /&gt;
&lt;br /&gt;
''Tip: '''All '''SQL Injection is due to dynamic SQL queries. Strongly consider prohibiting dynamic SQL queries within your organization ''&lt;br /&gt;
&lt;br /&gt;
||''4.8.5 SQL Injection (OWASP-DV-005)''&lt;br /&gt;
''4.8.6 LDAP Injection (OWASP-DV-006)''&lt;br /&gt;
''4.8.7 ORM Injection (OWASP-DV-007)''&lt;br /&gt;
''4.8.8 XML Injection (OWASP-DV-008)''&lt;br /&gt;
''4.8.9 SSI Injection (OWASP-DV-009)''&lt;br /&gt;
''4.8.10 XPath Injection (OWASP-DV-010)''&lt;br /&gt;
''4.8.11 IMAP/SMTP Injection (OWASP-DV-011)''&lt;br /&gt;
''4.8.12 Code Injection (OWASP-DV-012)''&lt;br /&gt;
''4.8.13 OS Commanding (OWASP-DV-013)''&lt;br /&gt;
''4.8.14 Buffer overflow (OWASP-DV-014)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A2 XSS'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Set correct content type&lt;br /&gt;
*Set safe character set (UTF-8)&lt;br /&gt;
*Set correct locale&lt;br /&gt;
*Output encode all user data as per output context&lt;br /&gt;
*Set input constraints&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
*Enforce input field type and lengths.&lt;br /&gt;
*Validate fields and provide feedback.&lt;br /&gt;
*Ensure option selects and radio contain only sent values.&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation &lt;br /&gt;
(LR) Sanitize input &lt;br /&gt;
&lt;br /&gt;
''Tip: Only process data that is 100% trustworthy. Everything else is hostile and should be rejected.''&lt;br /&gt;
||''Tip: Do not store data HTML encoded in the database. This prevents new uses for the data, such as web services, RSS feeds, FTP batches, data warehousing, cloud computing, and so on.''&lt;br /&gt;
&lt;br /&gt;
''Tip: Use OWASP Scrubbr to clean tainted or hostile data from legacy data''&lt;br /&gt;
&lt;br /&gt;
||''4.8.1 Testing for Reflected Cross Site Scripting (OWASP-DV-001)''&lt;br /&gt;
''4.8.2 Testing for Stored Cross Site Scripting (OWASP-DV-002)''&lt;br /&gt;
''4.8.3 Testing for DOM based Cross Site Scripting (OWASP-DV-003)''&lt;br /&gt;
''4.8.4 Testing for Cross Site Flashing (OWASP-DV004)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A3 Weak authentication and session management'''&lt;br /&gt;
||''Render:''&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient for this view.&lt;br /&gt;
*Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies.&lt;br /&gt;
*Send CSRF token with forms.&lt;br /&gt;
&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Only use inbuilt session management.&lt;br /&gt;
*Store secondary SSO / framework / custom session identifiers in native session object – do not send as additional headers or cookies.&lt;br /&gt;
&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient to perform this action.&lt;br /&gt;
*Validate CSRF token.&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
''Tip: Consider the use of a &amp;quot;governor&amp;quot; to regulate the maximum number of requests per second / minute / hour that this user may perform. For example, a typical banking user should not perform more than ten transactions a minute, and one hundred per second is dangerous and should be blocked.''&lt;br /&gt;
&lt;br /&gt;
||''4.4.2 Testing for user enumeration (OWASP-AT-002)''&lt;br /&gt;
''4.4.3 Testing for Guessable (Dictionary) User Account (OWASP-AT-003)''&lt;br /&gt;
''4.4.4 Brute Force Testing (OWASP-AT-004)''&lt;br /&gt;
''4.4.6 Testing for vulnerable remember password and pwd reset (OWASP-AT-006)''&lt;br /&gt;
''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.4.7 Testing for Logout and Browser Cache Management (OWASP-AT-007)''&lt;br /&gt;
''4.4.8 Testing for CAPTCHA (OWASP-AT-008)''&lt;br /&gt;
''4.4.9 Testing Multiple Factors Authentication (OWASP-AT-009)''&lt;br /&gt;
''4.4.10 Testing for Race Conditions (OWASP-AT-010)''&lt;br /&gt;
''4.5.1 Testing for Session Management Schema (OWASP-SM-001)''&lt;br /&gt;
''4.5.2 Testing for Cookies attributes (OWASP-SM-002)''&lt;br /&gt;
''4.5.3 Testing for Session Fixation (OWASP-SM_003)''&lt;br /&gt;
''4.5.4 Testing for Exposed Session Variables (OWASP-SM-004)''&lt;br /&gt;
''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
''4.6.3 Testing for Privilege Escalation (OWASP-AZ-003)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A4 Insecure Direct Object Reference'''&lt;br /&gt;
||If data is from internal trusted sources, no data is sent.&lt;br /&gt;
&lt;br /&gt;
Or&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Send indirect random access reference map value.&lt;br /&gt;
||Obtain data from internal, trusted sources.&lt;br /&gt;
&lt;br /&gt;
Or&lt;br /&gt;
&lt;br /&gt;
Obtain direct value from random access reference access map.&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data.&lt;br /&gt;
&lt;br /&gt;
||''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A5 Cross Site Request Forgery'''&lt;br /&gt;
||''Pre-render:''&lt;br /&gt;
*Validate user is authenticated&lt;br /&gt;
*Validate role is sufficient for this view&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Send CSRF token.&lt;br /&gt;
*Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies.&lt;br /&gt;
||&lt;br /&gt;
*Validate CSRF token.&lt;br /&gt;
*Validate role is sufficient to perform this action.&lt;br /&gt;
*Validate role is sufficient.&lt;br /&gt;
&lt;br /&gt;
''Tip: CSRF is '''always '''possible if there is XSS, so make sure XSS is eliminated within your application.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A6 Security Misconfiguration'''&lt;br /&gt;
||Ensure web servers and application servers are hardened.&lt;br /&gt;
&lt;br /&gt;
PHP: Ensure allow_url_fopen and allow_url_include are both disabled in php.ini. Consider the use of Suhosin extension &lt;br /&gt;
||Ensure web servers and application servers are hardened &lt;br /&gt;
&lt;br /&gt;
XML: Ensure common web attacks (remote XSLT transforms, hostile XPath queries, recursive DTDs, and so on) are protected by your XML stack. Do not hand craft XML documents or queries – use the XML layer. &lt;br /&gt;
||Ensure database servers are hardened &lt;br /&gt;
&lt;br /&gt;
||''4.2.6 Analysis of Error Codes (OWASP-IG-006)''&lt;br /&gt;
''4.3.2 DB Listener Testing (OWASP-CM-002)''&lt;br /&gt;
''4.3.3 Infrastructure Configuration Management Testing (OWASP-CM-003)''&lt;br /&gt;
''4.3.4 Application Configuration Management Testing (OWASP-CM-004)''&lt;br /&gt;
''4.3.5 Testing for File Extensions Handling (OWASP-CM-005)''&lt;br /&gt;
''4.3.6 Old, Backup and Unreferenced Files (OWASP-CM-006)''&lt;br /&gt;
''4.3.7 Infrastructure and Application Admin Interfaces (OWASP-CM-007)''&lt;br /&gt;
''4.3.8 Testing for HTTP Methods and XST (OWASP-CM-008)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A7 Insufficient Cryptographic Storage'''&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Use strong ciphers (AES 128 or better).&lt;br /&gt;
*Use strong hashes (SHA 256 or better) with salts for passwords.&lt;br /&gt;
*Protect keys more than any other asset.&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Do not send keys or hashes to the browser.&lt;br /&gt;
&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Use strong ciphers (AES 128 or better).&lt;br /&gt;
*Use strong hashes (SHA 256 or better) with salts for passwords.&lt;br /&gt;
*Protect keys more than any other asset.&lt;br /&gt;
&lt;br /&gt;
''Tip: Only certain personally identifiable information and sensitive values MUST be encrypted. Encrypt data that would be embarrassing or costly if it was leaked or stolen. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: It is best to encrypt data on the application server, rather than the database server.''&lt;br /&gt;
&lt;br /&gt;
||''Design:''&lt;br /&gt;
&lt;br /&gt;
''Tip: Do not use RDBMS database, row or table level encryption. The data can be retrieved in the clear by anyone with direct access to the server, or over the network using the application credentials. It might even traverse the network in the clear despite being &amp;quot;encrypted&amp;quot; on disk. ''&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A8 Failure to Restrict URL access'''&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Ensure all non-web data is outside the web root (logs, configuration, etc).&lt;br /&gt;
*Use octet byte streaming instead of providing access to real files such as PDFs or CSVs or similar.&lt;br /&gt;
*Ensure every page requires a role, even if it is &amp;quot;guest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
''Pre-render:''&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient to view secured URL.&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Send CSRF token.&lt;br /&gt;
||&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient to perform secured action.&lt;br /&gt;
*Validate CSRF token.&lt;br /&gt;
&lt;br /&gt;
''Tip: It's impossible to control access to secured resources that the web application server does not directly serve. Therefore, PDF reports or similar should be served by the web application server using binary octet streaming. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: Assume attackers '''will''' learn where &amp;quot;hidden&amp;quot; directories and &amp;quot;random&amp;quot; filenames are, so do not store these files in the web root, even if they are not directly linked.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A9 Insufficient Transport Layer Protection'''&lt;br /&gt;
||&lt;br /&gt;
*Use TLS 1.2 or later for all web communications.&lt;br /&gt;
*Buy extended validation (EV) certificates for public web servers.&lt;br /&gt;
&lt;br /&gt;
''Tip: Use TLS 1.2 always – even internally. Most snooping is done within corporate networks – and it is as easy and unethical as fishing with dynamite.''&lt;br /&gt;
||&lt;br /&gt;
*Mandate strong encrypted communications between web and database servers and any other servers or administrative users.&lt;br /&gt;
||&lt;br /&gt;
*Mandate strong encrypted communications with application servers and any other servers or administrative users.&lt;br /&gt;
&lt;br /&gt;
||''4.3.1 SSL/TLS Testing (OWASP-CM-001)''&lt;br /&gt;
''4.4.1 Credentials transport over an encrypted channel (OWASP-AT-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A10 Unvalidated Redirects and Forwards'''&lt;br /&gt;
||&lt;br /&gt;
*Design the app without URL redirection parameters.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Use random indirect object references for redirection parameters.&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
*Design the app without URL redirection parameters.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
*Obtain direct redirection parameter from random indirect reference access map.&lt;br /&gt;
*(LR) Positive validation of redirection parameter.&lt;br /&gt;
*(NR) Java – Do not forward() requests as this prevents SSO access control mechanisms.&lt;br /&gt;
&lt;br /&gt;
||*Validate role is sufficient to create, read, update, or delete data.&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Andrew van der Stock vanderaj[at]owasp.org&lt;br /&gt;
&lt;br /&gt;
Ismael Rocha Gonçalves ismaelrg[at]gmail.com&lt;br /&gt;
&lt;br /&gt;
Jorge Correa jacorream@gmail.com&lt;br /&gt;
&lt;br /&gt;
= Other Cheatsheets =&lt;br /&gt;
{{Cheatsheet_Navigation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137508</id>
		<title>OWASP Top Ten Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137508"/>
				<updated>2012-10-10T23:58:48Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The following is a developer-centric defensive cheat sheet for the [[OWASP Top Ten Project]]. It also presents a quick reference based on [[OWASP Testing Project]] to help how to identify the risks.&lt;br /&gt;
&lt;br /&gt;
= OWASP Top Ten Cheat Sheet =&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
| &lt;br /&gt;
||'''Presentation'''&lt;br /&gt;
||'''Controller'''&lt;br /&gt;
||'''Model'''&lt;br /&gt;
||'''Testing (OWASP Testing Guide V3)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A1 Injection'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Set a correct content type&lt;br /&gt;
*Set safe character set (UTF-8)&lt;br /&gt;
*Set correct locale&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
*Enforce input field type and lengths.&lt;br /&gt;
*Validate fields and provide feedback.&lt;br /&gt;
*Ensure option selects and radio contain only sent values.&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation.&lt;br /&gt;
(LR) Sanitize input.&lt;br /&gt;
&lt;br /&gt;
''Tip: updating a negative list (such as looking for &amp;quot;script&amp;quot;, &amp;quot;sCrIpT&amp;quot;, &amp;quot;ßCrîpt&amp;quot;, etc) will require expensive and constant deployments and will '''always '''fail as attackers work out your list of &amp;quot;bad&amp;quot; words. Positive validation is simpler, faster and usually more secure and needs updating far less than any other validation mechanism. ''&lt;br /&gt;
||*'''[https://www.owasp.org/index.php/Query_Parameterization_Cheat_Sheet Parameterized queries]'''&lt;br /&gt;
&lt;br /&gt;
*Object relational model (Hibernate).&lt;br /&gt;
*Active Record design pattern.&lt;br /&gt;
*Stored procedures.&lt;br /&gt;
&lt;br /&gt;
*Escape mechanisms such as ESAPI's Encoder:&lt;br /&gt;
**EncodeForLDAP()&lt;br /&gt;
**Encoder.EncodeforOS()&lt;br /&gt;
&lt;br /&gt;
''Tip: '''All '''SQL Injection is due to dynamic SQL queries. Strongly consider prohibiting dynamic SQL queries within your organization ''&lt;br /&gt;
&lt;br /&gt;
||''4.8.5 SQL Injection (OWASP-DV-005)''&lt;br /&gt;
''4.8.6 LDAP Injection (OWASP-DV-006)''&lt;br /&gt;
''4.8.7 ORM Injection (OWASP-DV-007)''&lt;br /&gt;
''4.8.8 XML Injection (OWASP-DV-008)''&lt;br /&gt;
''4.8.9 SSI Injection (OWASP-DV-009)''&lt;br /&gt;
''4.8.10 XPath Injection (OWASP-DV-010)''&lt;br /&gt;
''4.8.11 IMAP/SMTP Injection (OWASP-DV-011)''&lt;br /&gt;
''4.8.12 Code Injection (OWASP-DV-012)''&lt;br /&gt;
''4.8.13 OS Commanding (OWASP-DV-013)''&lt;br /&gt;
''4.8.14 Buffer overflow (OWASP-DV-014)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A2 XSS'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Set correct content type&lt;br /&gt;
*Set safe character set (UTF-8)&lt;br /&gt;
*Set correct locale&lt;br /&gt;
*Output encode all user data as per output context&lt;br /&gt;
*Set input constraints&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
*Enforce input field type and lengths.&lt;br /&gt;
*Validate fields and provide feedback.&lt;br /&gt;
*Ensure option selects and radio contain only sent values.&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation &lt;br /&gt;
(LR) Sanitize input &lt;br /&gt;
&lt;br /&gt;
''Tip: Only process data that is 100% trustworthy. Everything else is hostile and should be rejected.''&lt;br /&gt;
||''Tip: Do not store data HTML encoded in the database. This prevents new uses for the data, such as web services, RSS feeds, FTP batches, data warehousing, cloud computing, and so on.''&lt;br /&gt;
&lt;br /&gt;
''Tip: Use OWASP Scrubbr to clean tainted or hostile data from legacy data''&lt;br /&gt;
&lt;br /&gt;
||''4.8.1 Testing for Reflected Cross Site Scripting (OWASP-DV-001)''&lt;br /&gt;
''4.8.2 Testing for Stored Cross Site Scripting (OWASP-DV-002)''&lt;br /&gt;
''4.8.3 Testing for DOM based Cross Site Scripting (OWASP-DV-003)''&lt;br /&gt;
''4.8.4 Testing for Cross Site Flashing (OWASP-DV004)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A3 Weak authentication and session management'''&lt;br /&gt;
||''Render:''&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient for this view.&lt;br /&gt;
*Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies.&lt;br /&gt;
*Send CSRF token with forms.&lt;br /&gt;
&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Only use inbuilt session management.&lt;br /&gt;
*Store secondary SSO / framework / custom session identifiers in native session object – do not send as additional headers or cookies.&lt;br /&gt;
&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient to perform this action.&lt;br /&gt;
*Validate CSRF token.&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
''Tip: Consider the use of a &amp;quot;governor&amp;quot; to regulate the maximum number of requests per second / minute / hour that this user may perform. For example, a typical banking user should not perform more than ten transactions a minute, and one hundred per second is dangerous and should be blocked.''&lt;br /&gt;
&lt;br /&gt;
||''4.4.2 Testing for user enumeration (OWASP-AT-002)''&lt;br /&gt;
''4.4.3 Testing for Guessable (Dictionary) User Account (OWASP-AT-003)''&lt;br /&gt;
''4.4.4 Brute Force Testing (OWASP-AT-004)''&lt;br /&gt;
''4.4.6 Testing for vulnerable remember password and pwd reset (OWASP-AT-006)''&lt;br /&gt;
''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.4.7 Testing for Logout and Browser Cache Management (OWASP-AT-007)''&lt;br /&gt;
''4.4.8 Testing for CAPTCHA (OWASP-AT-008)''&lt;br /&gt;
''4.4.9 Testing Multiple Factors Authentication (OWASP-AT-009)''&lt;br /&gt;
''4.4.10 Testing for Race Conditions (OWASP-AT-010)''&lt;br /&gt;
''4.5.1 Testing for Session Management Schema (OWASP-SM-001)''&lt;br /&gt;
''4.5.2 Testing for Cookies attributes (OWASP-SM-002)''&lt;br /&gt;
''4.5.3 Testing for Session Fixation (OWASP-SM_003)''&lt;br /&gt;
''4.5.4 Testing for Exposed Session Variables (OWASP-SM-004)''&lt;br /&gt;
''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
''4.6.3 Testing for Privilege Escalation (OWASP-AZ-003)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A4 Insecure Direct Object Reference'''&lt;br /&gt;
||If data is from internal trusted sources, no data is sent.&lt;br /&gt;
&lt;br /&gt;
Or&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Send indirect random access reference map value.&lt;br /&gt;
||Obtain data from internal, trusted sources.&lt;br /&gt;
&lt;br /&gt;
Or&lt;br /&gt;
&lt;br /&gt;
Obtain direct value from random access reference access map.&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data.&lt;br /&gt;
&lt;br /&gt;
||''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A5 Cross Site Request Forgery'''&lt;br /&gt;
||''Pre-render:''&lt;br /&gt;
*Validate user is authenticated&lt;br /&gt;
*Validate role is sufficient for this view&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Send CSRF token.&lt;br /&gt;
*Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies.&lt;br /&gt;
||&lt;br /&gt;
*Validate CSRF token.&lt;br /&gt;
*Validate role is sufficient to perform this action.&lt;br /&gt;
*Validate role is sufficient.&lt;br /&gt;
&lt;br /&gt;
''Tip: CSRF is '''always '''possible if there is XSS, so make sure XSS is eliminated within your application.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A6 Security Misconfiguration'''&lt;br /&gt;
||Ensure web servers and application servers are hardened.&lt;br /&gt;
&lt;br /&gt;
PHP: Ensure allow_url_fopen and allow_url_include are both disabled in php.ini. Consider the use of Suhosin extension &lt;br /&gt;
||Ensure web servers and application servers are hardened &lt;br /&gt;
&lt;br /&gt;
XML: Ensure common web attacks (remote XSLT transforms, hostile XPath queries, recursive DTDs, and so on) are protected by your XML stack. Do not hand craft XML documents or queries – use the XML layer. &lt;br /&gt;
||Ensure database servers are hardened &lt;br /&gt;
&lt;br /&gt;
||''4.2.6 Analysis of Error Codes (OWASP-IG-006)''&lt;br /&gt;
''4.3.2 DB Listener Testing (OWASP-CM-002)''&lt;br /&gt;
''4.3.3 Infrastructure Configuration Management Testing (OWASP-CM-003)''&lt;br /&gt;
''4.3.4 Application Configuration Management Testing (OWASP-CM-004)''&lt;br /&gt;
''4.3.5 Testing for File Extensions Handling (OWASP-CM-005)''&lt;br /&gt;
''4.3.6 Old, Backup and Unreferenced Files (OWASP-CM-006)''&lt;br /&gt;
''4.3.7 Infrastructure and Application Admin Interfaces (OWASP-CM-007)''&lt;br /&gt;
''4.3.8 Testing for HTTP Methods and XST (OWASP-CM-008)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A7 Insufficient Cryptographic Storage'''&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Use strong ciphers (AES 128 or better).&lt;br /&gt;
*Use strong hashes (SHA 256 or better) with salts for passwords.&lt;br /&gt;
*Protect keys more than any other asset.&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Do not send keys or hashes to the browser.&lt;br /&gt;
&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Use strong ciphers (AES 128 or better).&lt;br /&gt;
*Use strong hashes (SHA 256 or better) with salts for passwords.&lt;br /&gt;
*Protect keys more than any other asset.&lt;br /&gt;
&lt;br /&gt;
''Tip: Only certain personally identifiable information and sensitive values MUST be encrypted. Encrypt data that would be embarrassing or costly if it was leaked or stolen. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: It is best to encrypt data on the application server, rather than the database server.''&lt;br /&gt;
&lt;br /&gt;
||''Design:''&lt;br /&gt;
&lt;br /&gt;
''Tip: Do not use RDBMS database, row or table level encryption. The data can be retrieved in the clear by anyone with direct access to the server, or over the network using the application credentials. It might even traverse the network in the clear despite being &amp;quot;encrypted&amp;quot; on disk. ''&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A8 Failure to Restrict URL access'''&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Ensure all non-web data is outside the web root (logs, configuration, etc).&lt;br /&gt;
*Use octet byte streaming instead of providing access to real files such as PDFs or CSVs or similar.&lt;br /&gt;
*Ensure every page requires a role, even if it is &amp;quot;guest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
''Pre-render:''&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient to view secured URL.&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Send CSRF token.&lt;br /&gt;
||*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient to perform secured action.&lt;br /&gt;
*Validate CSRF token.&lt;br /&gt;
&lt;br /&gt;
''Tip: It's impossible to control access to secured resources that the web application server does not directly serve. Therefore, PDF reports or similar should be served by the web application server using binary octet streaming. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: Assume attackers '''will''' learn where &amp;quot;hidden&amp;quot; directories and &amp;quot;random&amp;quot; filenames are, so do not store these files in the web root, even if they are not directly linked.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A9 Insufficient Transport Layer Protection'''&lt;br /&gt;
||*Use TLS 1.2 or later for all web communications.&lt;br /&gt;
*Buy extended validation (EV) certificates for public web servers.&lt;br /&gt;
&lt;br /&gt;
''Tip: Use TLS 1.2 always – even internally. Most snooping is done within corporate networks – and it is as easy and unethical as fishing with dynamite.''&lt;br /&gt;
||*Mandate strong encrypted communications between web and database servers and any other servers or administrative users.&lt;br /&gt;
||*Mandate strong encrypted communications with application servers and any other servers or administrative users.&lt;br /&gt;
&lt;br /&gt;
||''4.3.1 SSL/TLS Testing (OWASP-CM-001)''&lt;br /&gt;
''4.4.1 Credentials transport over an encrypted channel (OWASP-AT-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A10 Unvalidated Redirects and Forwards'''&lt;br /&gt;
||*Design the app without URL redirection parameters.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Use random indirect object references for redirection parameters.&lt;br /&gt;
&lt;br /&gt;
||*Design the app without URL redirection parameters.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
*Obtain direct redirection parameter from random indirect reference access map.&lt;br /&gt;
*(LR) Positive validation of redirection parameter.&lt;br /&gt;
*(NR) Java – Do not forward() requests as this prevents SSO access control mechanisms.&lt;br /&gt;
&lt;br /&gt;
||*Validate role is sufficient to create, read, update, or delete data.&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Andrew van der Stock vanderaj[at]owasp.org&lt;br /&gt;
&lt;br /&gt;
Ismael Rocha Gonçalves ismaelrg[at]gmail.com&lt;br /&gt;
&lt;br /&gt;
Jorge Correa jacorream@gmail.com&lt;br /&gt;
&lt;br /&gt;
= Other Cheatsheets =&lt;br /&gt;
{{Cheatsheet_Navigation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137507</id>
		<title>OWASP Top Ten Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137507"/>
				<updated>2012-10-10T23:56:27Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The following is a developer-centric defensive cheat sheet for the [[OWASP Top Ten Project]]. It also presents a quick reference based on [[OWASP Testing Project]] to help how to identify the risks.&lt;br /&gt;
&lt;br /&gt;
= OWASP Top Ten Cheat Sheet =&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
| &lt;br /&gt;
||'''Presentation'''&lt;br /&gt;
||'''Controller'''&lt;br /&gt;
||'''Model'''&lt;br /&gt;
||'''Testing (OWASP Testing Guide V3)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A1 Injection'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Set a correct content type&lt;br /&gt;
*Set safe character set (UTF-8)&lt;br /&gt;
*Set correct locale&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
*Enforce input field type and lengths.&lt;br /&gt;
*Validate fields and provide feedback.&lt;br /&gt;
*Ensure option selects and radio contain only sent values.&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation.&lt;br /&gt;
(LR) Sanitize input.&lt;br /&gt;
&lt;br /&gt;
''Tip: updating a negative list (such as looking for &amp;quot;script&amp;quot;, &amp;quot;sCrIpT&amp;quot;, &amp;quot;ßCrîpt&amp;quot;, etc) will require expensive and constant deployments and will '''always '''fail as attackers work out your list of &amp;quot;bad&amp;quot; words. Positive validation is simpler, faster and usually more secure and needs updating far less than any other validation mechanism. ''&lt;br /&gt;
||*'''[https://www.owasp.org/index.php/Query_Parameterization_Cheat_Sheet Parameterized queries]'''&lt;br /&gt;
&lt;br /&gt;
*Object relational model (Hibernate).&lt;br /&gt;
*Active Record design pattern.&lt;br /&gt;
*Stored procedures.&lt;br /&gt;
&lt;br /&gt;
*Escape mechanisms such as ESAPI's Encoder:&lt;br /&gt;
**EncodeForLDAP()&lt;br /&gt;
**Encoder.EncodeforOS()&lt;br /&gt;
&lt;br /&gt;
''Tip: '''All '''SQL Injection is due to dynamic SQL queries. Strongly consider prohibiting dynamic SQL queries within your organization ''&lt;br /&gt;
&lt;br /&gt;
||''4.8.5 SQL Injection (OWASP-DV-005)''&lt;br /&gt;
''4.8.6 LDAP Injection (OWASP-DV-006)''&lt;br /&gt;
''4.8.7 ORM Injection (OWASP-DV-007)''&lt;br /&gt;
''4.8.8 XML Injection (OWASP-DV-008)''&lt;br /&gt;
''4.8.9 SSI Injection (OWASP-DV-009)''&lt;br /&gt;
''4.8.10 XPath Injection (OWASP-DV-010)''&lt;br /&gt;
''4.8.11 IMAP/SMTP Injection (OWASP-DV-011)''&lt;br /&gt;
''4.8.12 Code Injection (OWASP-DV-012)''&lt;br /&gt;
''4.8.13 OS Commanding (OWASP-DV-013)''&lt;br /&gt;
''4.8.14 Buffer overflow (OWASP-DV-014)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A2 XSS'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Set correct content type&lt;br /&gt;
*Set safe character set (UTF-8)&lt;br /&gt;
*Set correct locale&lt;br /&gt;
*Output encode all user data as per output context&lt;br /&gt;
*Set input constraints&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
*Enforce input field type and lengths.&lt;br /&gt;
*Validate fields and provide feedback.&lt;br /&gt;
*Ensure option selects and radio contain only sent values.&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation &lt;br /&gt;
(LR) Sanitize input &lt;br /&gt;
&lt;br /&gt;
''Tip: Only process data that is 100% trustworthy. Everything else is hostile and should be rejected.''&lt;br /&gt;
||''Tip: Do not store data HTML encoded in the database. This prevents new uses for the data, such as web services, RSS feeds, FTP batches, data warehousing, cloud computing, and so on.''&lt;br /&gt;
&lt;br /&gt;
''Tip: Use OWASP Scrubbr to clean tainted or hostile data from legacy data''&lt;br /&gt;
&lt;br /&gt;
||''4.8.1 Testing for Reflected Cross Site Scripting (OWASP-DV-001)''&lt;br /&gt;
''4.8.2 Testing for Stored Cross Site Scripting (OWASP-DV-002)''&lt;br /&gt;
''4.8.3 Testing for DOM based Cross Site Scripting (OWASP-DV-003)''&lt;br /&gt;
''4.8.4 Testing for Cross Site Flashing (OWASP-DV004)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A3 Weak authentication and session management'''&lt;br /&gt;
||''Render:''&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient for this view.&lt;br /&gt;
*Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies.&lt;br /&gt;
*Send CSRF token with forms.&lt;br /&gt;
&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Only use inbuilt session management.&lt;br /&gt;
*Store secondary SSO / framework / custom session identifiers in native session object – do not send as additional headers or cookies.&lt;br /&gt;
&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient to perform this action.&lt;br /&gt;
*Validate CSRF token.&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
''Tip: Consider the use of a &amp;quot;governor&amp;quot; to regulate the maximum number of requests per second / minute / hour that this user may perform. For example, a typical banking user should not perform more than ten transactions a minute, and one hundred per second is dangerous and should be blocked.''&lt;br /&gt;
&lt;br /&gt;
||''4.4.2 Testing for user enumeration (OWASP-AT-002)''&lt;br /&gt;
''4.4.3 Testing for Guessable (Dictionary) User Account (OWASP-AT-003)''&lt;br /&gt;
''4.4.4 Brute Force Testing (OWASP-AT-004)''&lt;br /&gt;
''4.4.6 Testing for vulnerable remember password and pwd reset (OWASP-AT-006)''&lt;br /&gt;
''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.4.7 Testing for Logout and Browser Cache Management (OWASP-AT-007)''&lt;br /&gt;
''4.4.8 Testing for CAPTCHA (OWASP-AT-008)''&lt;br /&gt;
''4.4.9 Testing Multiple Factors Authentication (OWASP-AT-009)''&lt;br /&gt;
''4.4.10 Testing for Race Conditions (OWASP-AT-010)''&lt;br /&gt;
''4.5.1 Testing for Session Management Schema (OWASP-SM-001)''&lt;br /&gt;
''4.5.2 Testing for Cookies attributes (OWASP-SM-002)''&lt;br /&gt;
''4.5.3 Testing for Session Fixation (OWASP-SM_003)''&lt;br /&gt;
''4.5.4 Testing for Exposed Session Variables (OWASP-SM-004)''&lt;br /&gt;
''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
''4.6.3 Testing for Privilege Escalation (OWASP-AZ-003)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A4 Insecure Direct Object Reference'''&lt;br /&gt;
||If data is from internal trusted sources, no data is sent.&lt;br /&gt;
&lt;br /&gt;
Or&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Send indirect random access reference map value.&lt;br /&gt;
||Obtain data from internal, trusted sources.&lt;br /&gt;
&lt;br /&gt;
Or&lt;br /&gt;
&lt;br /&gt;
Obtain direct value from random access reference access map.&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data.&lt;br /&gt;
&lt;br /&gt;
||''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A5 Cross Site Request Forgery'''&lt;br /&gt;
||''Pre-render:''&lt;br /&gt;
*Validate user is authenticated&lt;br /&gt;
*Validate role is sufficient for this view&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Send CSRF token.&lt;br /&gt;
*Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies.&lt;br /&gt;
||*Validate CSRF token.&lt;br /&gt;
*Validate role is sufficient to perform this action.&lt;br /&gt;
*Validate role is sufficient.&lt;br /&gt;
&lt;br /&gt;
''Tip: CSRF is '''always '''possible if there is XSS, so make sure XSS is eliminated within your application.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A6 Security Misconfiguration'''&lt;br /&gt;
||Ensure web servers and application servers are hardened.&lt;br /&gt;
&lt;br /&gt;
PHP: Ensure allow_url_fopen and allow_url_include are both disabled in php.ini. Consider the use of Suhosin extension &lt;br /&gt;
||Ensure web servers and application servers are hardened &lt;br /&gt;
&lt;br /&gt;
XML: Ensure common web attacks (remote XSLT transforms, hostile XPath queries, recursive DTDs, and so on) are protected by your XML stack. Do not hand craft XML documents or queries – use the XML layer. &lt;br /&gt;
||Ensure database servers are hardened &lt;br /&gt;
&lt;br /&gt;
||''4.2.6 Analysis of Error Codes (OWASP-IG-006)''&lt;br /&gt;
''4.3.2 DB Listener Testing (OWASP-CM-002)''&lt;br /&gt;
''4.3.3 Infrastructure Configuration Management Testing (OWASP-CM-003)''&lt;br /&gt;
''4.3.4 Application Configuration Management Testing (OWASP-CM-004)''&lt;br /&gt;
''4.3.5 Testing for File Extensions Handling (OWASP-CM-005)''&lt;br /&gt;
''4.3.6 Old, Backup and Unreferenced Files (OWASP-CM-006)''&lt;br /&gt;
''4.3.7 Infrastructure and Application Admin Interfaces (OWASP-CM-007)''&lt;br /&gt;
''4.3.8 Testing for HTTP Methods and XST (OWASP-CM-008)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A7 Insufficient Cryptographic Storage'''&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Use strong ciphers (AES 128 or better).&lt;br /&gt;
*Use strong hashes (SHA 256 or better) with salts for passwords.&lt;br /&gt;
*Protect keys more than any other asset.&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Do not send keys or hashes to the browser.&lt;br /&gt;
&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Use strong ciphers (AES 128 or better).&lt;br /&gt;
*Use strong hashes (SHA 256 or better) with salts for passwords.&lt;br /&gt;
*Protect keys more than any other asset.&lt;br /&gt;
&lt;br /&gt;
''Tip: Only certain personally identifiable information and sensitive values MUST be encrypted. Encrypt data that would be embarrassing or costly if it was leaked or stolen. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: It is best to encrypt data on the application server, rather than the database server.''&lt;br /&gt;
&lt;br /&gt;
||''Design:''&lt;br /&gt;
&lt;br /&gt;
''Tip: Do not use RDBMS database, row or table level encryption. The data can be retrieved in the clear by anyone with direct access to the server, or over the network using the application credentials. It might even traverse the network in the clear despite being &amp;quot;encrypted&amp;quot; on disk. ''&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A8 Failure to Restrict URL access'''&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Ensure all non-web data is outside the web root (logs, configuration, etc).&lt;br /&gt;
*Use octet byte streaming instead of providing access to real files such as PDFs or CSVs or similar.&lt;br /&gt;
*Ensure every page requires a role, even if it is &amp;quot;guest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
''Pre-render:''&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient to view secured URL.&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Send CSRF token.&lt;br /&gt;
||*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient to perform secured action.&lt;br /&gt;
*Validate CSRF token.&lt;br /&gt;
&lt;br /&gt;
''Tip: It's impossible to control access to secured resources that the web application server does not directly serve. Therefore, PDF reports or similar should be served by the web application server using binary octet streaming. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: Assume attackers '''will''' learn where &amp;quot;hidden&amp;quot; directories and &amp;quot;random&amp;quot; filenames are, so do not store these files in the web root, even if they are not directly linked.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A9 Insufficient Transport Layer Protection'''&lt;br /&gt;
||*Use TLS 1.2 or later for all web communications.&lt;br /&gt;
*Buy extended validation (EV) certificates for public web servers.&lt;br /&gt;
&lt;br /&gt;
''Tip: Use TLS 1.2 always – even internally. Most snooping is done within corporate networks – and it is as easy and unethical as fishing with dynamite.''&lt;br /&gt;
||*Mandate strong encrypted communications between web and database servers and any other servers or administrative users.&lt;br /&gt;
||*Mandate strong encrypted communications with application servers and any other servers or administrative users.&lt;br /&gt;
&lt;br /&gt;
||''4.3.1 SSL/TLS Testing (OWASP-CM-001)''&lt;br /&gt;
''4.4.1 Credentials transport over an encrypted channel (OWASP-AT-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A10 Unvalidated Redirects and Forwards'''&lt;br /&gt;
||*Design the app without URL redirection parameters.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Use random indirect object references for redirection parameters.&lt;br /&gt;
&lt;br /&gt;
||*Design the app without URL redirection parameters.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
*Obtain direct redirection parameter from random indirect reference access map.&lt;br /&gt;
*(LR) Positive validation of redirection parameter.&lt;br /&gt;
*(NR) Java – Do not forward() requests as this prevents SSO access control mechanisms.&lt;br /&gt;
&lt;br /&gt;
||*Validate role is sufficient to create, read, update, or delete data.&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Andrew van der Stock vanderaj[at]owasp.org&lt;br /&gt;
&lt;br /&gt;
Ismael Rocha Gonçalves ismaelrg[at]gmail.com&lt;br /&gt;
&lt;br /&gt;
Jorge Correa jacorream@gmail.com&lt;br /&gt;
&lt;br /&gt;
= Other Cheatsheets =&lt;br /&gt;
{{Cheatsheet_Navigation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137279</id>
		<title>OWASP Top Ten Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137279"/>
				<updated>2012-10-08T20:52:51Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The following is a developer-centric defensive cheat sheet for the [[OWASP Top Ten Project]]. It also presents a quick reference based on [[OWASP Testing Project]] to help how to identify the risks.&lt;br /&gt;
&lt;br /&gt;
= OWASP Top Ten Cheat Sheet =&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
| &lt;br /&gt;
||'''Presentation'''&lt;br /&gt;
||'''Controller'''&lt;br /&gt;
||'''Model'''&lt;br /&gt;
||'''Testing (OWASP Testing Guide V3)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A1 Injection'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Set a correct content type&lt;br /&gt;
*Set safe character set (UTF-8)&lt;br /&gt;
*Set correct locale&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
*Enforce input field type and lengths.&lt;br /&gt;
*Validate fields and provide feedback.&lt;br /&gt;
*Ensure option selects and radio contain only sent values.&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation.&lt;br /&gt;
(LR) Sanitize input.&lt;br /&gt;
&lt;br /&gt;
''Tip: updating a negative list (such as looking for &amp;quot;script&amp;quot;, &amp;quot;sCrIpT&amp;quot;, &amp;quot;ßCrîpt&amp;quot;, etc) will require expensive and constant deployments and will '''always '''fail as attackers work out your list of &amp;quot;bad&amp;quot; words. Positive validation is simpler, faster and usually more secure and needs updating far less than any other validation mechanism. ''&lt;br /&gt;
||*'''[https://www.owasp.org/index.php/Query_Parameterization_Cheat_Sheet Parameterized queries]'''&lt;br /&gt;
&lt;br /&gt;
*Object relational model (Hibernate).&lt;br /&gt;
*Active Record design pattern.&lt;br /&gt;
*Stored procedures.&lt;br /&gt;
&lt;br /&gt;
*Escape mechanisms such as ESAPI's Encoder:&lt;br /&gt;
**EncodeForLDAP()&lt;br /&gt;
**Encoder.EncodeforOS()&lt;br /&gt;
&lt;br /&gt;
''Tip: '''All '''SQL Injection is due to dynamic SQL queries. Strongly consider prohibiting dynamic SQL queries within your organization ''&lt;br /&gt;
&lt;br /&gt;
||''4.8.5 SQL Injection (OWASP-DV-005)''&lt;br /&gt;
''4.8.6 LDAP Injection (OWASP-DV-006)''&lt;br /&gt;
''4.8.7 ORM Injection (OWASP-DV-007)''&lt;br /&gt;
''4.8.8 XML Injection (OWASP-DV-008)''&lt;br /&gt;
''4.8.9 SSI Injection (OWASP-DV-009)''&lt;br /&gt;
''4.8.10 XPath Injection (OWASP-DV-010)''&lt;br /&gt;
''4.8.11 IMAP/SMTP Injection (OWASP-DV-011)''&lt;br /&gt;
''4.8.12 Code Injection (OWASP-DV-012)''&lt;br /&gt;
''4.8.13 OS Commanding (OWASP-DV-013)''&lt;br /&gt;
''4.8.14 Buffer overflow (OWASP-DV-014)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A2 XSS'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Set correct content type&lt;br /&gt;
*Set safe character set (UTF-8)&lt;br /&gt;
*Set correct locale&lt;br /&gt;
*Output encode all user data as per output context&lt;br /&gt;
*Set input constraints&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
*Enforce input field type and lengths.&lt;br /&gt;
*Validate fields and provide feedback.&lt;br /&gt;
*Ensure option selects and radio contain only sent values.&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation &lt;br /&gt;
(LR) Sanitize input &lt;br /&gt;
&lt;br /&gt;
''Tip: Only process data that is 100% trustworthy. Everything else is hostile and should be rejected.''&lt;br /&gt;
||''Tip: Do not store data HTML encoded in the database. This prevents new uses for the data, such as web services, RSS feeds, FTP batches, data warehousing, cloud computing, and so on.''&lt;br /&gt;
&lt;br /&gt;
''Tip: Use OWASP Scrubbr to clean tainted or hostile data from legacy data''&lt;br /&gt;
&lt;br /&gt;
||''4.8.1 Testing for Reflected Cross Site Scripting (OWASP-DV-001)''&lt;br /&gt;
''4.8.2 Testing for Stored Cross Site Scripting (OWASP-DV-002)''&lt;br /&gt;
''4.8.3 Testing for DOM based Cross Site Scripting (OWASP-DV-003)''&lt;br /&gt;
''4.8.4 Testing for Cross Site Flashing (OWASP-DV004)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A3 Weak authentication and session management'''&lt;br /&gt;
||''Render:''&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient for this view.&lt;br /&gt;
*Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies.&lt;br /&gt;
*Send CSRF token with forms.&lt;br /&gt;
&lt;br /&gt;
||''Design:''&lt;br /&gt;
*Only use inbuilt session management.&lt;br /&gt;
*Store secondary SSO / framework / custom session identifiers in native session object – do not send as additional headers or cookies.&lt;br /&gt;
&lt;br /&gt;
*Validate user is authenticated.&lt;br /&gt;
*Validate role is sufficient to perform this action.&lt;br /&gt;
*Validate CSRF token.&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
''Tip: Consider the use of a &amp;quot;governor&amp;quot; to regulate the maximum number of requests per second / minute / hour that this user may perform. For example, a typical banking user should not perform more than ten transactions a minute, and one hundred per second is dangerous and should be blocked.''&lt;br /&gt;
&lt;br /&gt;
||''4.4.2 Testing for user enumeration (OWASP-AT-002)''&lt;br /&gt;
''4.4.3 Testing for Guessable (Dictionary) User Account (OWASP-AT-003)''&lt;br /&gt;
''4.4.4 Brute Force Testing (OWASP-AT-004)''&lt;br /&gt;
''4.4.6 Testing for vulnerable remember password and pwd reset (OWASP-AT-006)''&lt;br /&gt;
''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.4.7 Testing for Logout and Browser Cache Management (OWASP-AT-007)''&lt;br /&gt;
''4.4.8 Testing for CAPTCHA (OWASP-AT-008)''&lt;br /&gt;
''4.4.9 Testing Multiple Factors Authentication (OWASP-AT-009)''&lt;br /&gt;
''4.4.10 Testing for Race Conditions (OWASP-AT-010)''&lt;br /&gt;
''4.5.1 Testing for Session Management Schema (OWASP-SM-001)''&lt;br /&gt;
''4.5.2 Testing for Cookies attributes (OWASP-SM-002)''&lt;br /&gt;
''4.5.3 Testing for Session Fixation (OWASP-SM_003)''&lt;br /&gt;
''4.5.4 Testing for Exposed Session Variables (OWASP-SM-004)''&lt;br /&gt;
''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
''4.6.3 Testing for Privilege Escalation (OWASP-AZ-003)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A4 Insecure Direct Object Reference'''&lt;br /&gt;
||'''If data is from internal trusted sources, no data is sent'''&lt;br /&gt;
&lt;br /&gt;
''Or''&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Send indirect random access reference map value.&lt;br /&gt;
||'''Obtain data from internal, trusted sources'''&lt;br /&gt;
&lt;br /&gt;
''Or ''&lt;br /&gt;
&lt;br /&gt;
'''Obtain direct value from random access reference access map'''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A5 Cross Site Request Forgery'''&lt;br /&gt;
||''Pre-render''&lt;br /&gt;
Validate user is authenticated&lt;br /&gt;
Validate role is sufficient for this view&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies&lt;br /&gt;
||'''Validate CSRF token'''&lt;br /&gt;
Validate role is sufficient to perform this action&lt;br /&gt;
Validate role is sufficient &lt;br /&gt;
&lt;br /&gt;
''Tip: CSRF is '''always '''possible if there is XSS, so make sure XSS is eliminated within your application.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A6 Security Misconfiguration'''&lt;br /&gt;
||Ensure web servers and application servers are hardened&lt;br /&gt;
&lt;br /&gt;
PHP – Ensure allow_url_fopen and allow_url_include are both disabled in php.ini. Consider the use of Suhosin extension &lt;br /&gt;
||Ensure web servers and application servers are hardened &lt;br /&gt;
&lt;br /&gt;
XML – Ensure common web attacks (remote XSLT transforms, hostile XPath queries, recursive DTDs, and so on) are protected by your XML stack. Do not hand craft XML documents or queries – use the XML layer. &lt;br /&gt;
||Ensure database servers are hardened &lt;br /&gt;
&lt;br /&gt;
||''4.2.6 Analysis of Error Codes (OWASP-IG-006)''&lt;br /&gt;
''4.3.2 DB Listener Testing (OWASP-CM-002)''&lt;br /&gt;
''4.3.3 Infrastructure Configuration Management Testing (OWASP-CM-003)''&lt;br /&gt;
''4.3.4 Application Configuration Management Testing (OWASP-CM-004)''&lt;br /&gt;
''4.3.5 Testing for File Extensions Handling (OWASP-CM-005)''&lt;br /&gt;
''4.3.6 Old, Backup and Unreferenced Files (OWASP-CM-006)''&lt;br /&gt;
''4.3.7 Infrastructure and Application Admin Interfaces (OWASP-CM-007)''&lt;br /&gt;
''4.3.8 Testing for HTTP Methods and XST (OWASP-CM-008)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A7 Insufficient Cryptographic Storage'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Do not send keys or hashes to the browser&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Tip: Only certain personally identifiable information and sensitive values MUST be encrypted. Encrypt data that would be embarrassing or costly if it was leaked or stolen. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: It is best to encrypt data on the application server, rather than the database server.''&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
&lt;br /&gt;
''Tip: Do not use RDBMS database, row or table level encryption. The data can be retrieved in the clear by anyone with direct access to the server, or over the network using the application credentials. It might even traverse the network in the clear despite being &amp;quot;encrypted&amp;quot; on disk. ''&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A8 Failure to Restrict URL access'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Ensure all non-web data is outside the web root (logs, configuration, etc)'''&lt;br /&gt;
'''Use octet byte streaming instead of providing access to real files such as PDFs or CSVs or similar'''&lt;br /&gt;
'''Ensure every page requires a role, even if it is &amp;quot;guest&amp;quot;'''&lt;br /&gt;
''	''&lt;br /&gt;
''Pre-render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to view secured URL'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
||'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform secured action'''&lt;br /&gt;
'''Validate CSRF token'''&lt;br /&gt;
&lt;br /&gt;
''Tip: It's impossible to control access to secured resources that the web application server does not directly serve. Therefore, PDF reports or similar should be served by the web application server using binary octet streaming. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: Assume attackers '''will''' learn where &amp;quot;hidden&amp;quot; directories and &amp;quot;random&amp;quot; filenames are, so do not store these files in the web root, even if they are not directly linked.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A9 Insufficient Transport Layer Protection'''&lt;br /&gt;
||Use TLS 1.2 or later for all web communications &lt;br /&gt;
Buy extended validation (EV) certificates for public web servers&lt;br /&gt;
&lt;br /&gt;
''Tip: Use TLS 1.2 always – even internally. Most snooping is done within corporate networks – and it is as easy and unethical as fishing with dynamite.''&lt;br /&gt;
||Mandate strong encrypted communications between web and database servers and any other servers or administrative users&lt;br /&gt;
||Mandate strong encrypted communications with application servers and any other servers or administrative users&lt;br /&gt;
&lt;br /&gt;
||''4.3.1 SSL/TLS Testing (OWASP-CM-001)''&lt;br /&gt;
''4.4.1 Credentials transport over an encrypted channel (OWASP-AT-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A10 Unvalidated Redirects and Forwards'''&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Use random indirect object references for redirection parameters&lt;br /&gt;
&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
Obtain direct redirection parameter from random indirect reference access map&lt;br /&gt;
(LR) Positive validation of redirection parameter &lt;br /&gt;
(NR) Java – Do not forward() requests as this prevents SSO access control mechanisms &lt;br /&gt;
&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Andrew van der Stock vanderaj[at]owasp.org&lt;br /&gt;
&lt;br /&gt;
Ismael Rocha Gonçalves ismaelrg[at]gmail.com&lt;br /&gt;
&lt;br /&gt;
= Other Cheatsheets =&lt;br /&gt;
{{Cheatsheet_Navigation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137277</id>
		<title>OWASP Top Ten Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137277"/>
				<updated>2012-10-08T20:39:23Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The following is a developer-centric defensive cheat sheet for the [[OWASP Top Ten Project]]. It also presents a quick reference based on [[OWASP Testing Project]] to help how to identify the risks.&lt;br /&gt;
&lt;br /&gt;
= OWASP Top Ten Cheat Sheet =&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
| &lt;br /&gt;
||'''Presentation'''&lt;br /&gt;
||'''Controller'''&lt;br /&gt;
||'''Model'''&lt;br /&gt;
||'''Testing (OWASP Testing Guide V3)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A1 Injection'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Set a correct content type&lt;br /&gt;
*Set safe character set (UTF-8)&lt;br /&gt;
*Set correct locale&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
Enforce input field type and lengths &lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation.&lt;br /&gt;
(LR) Sanitize input.&lt;br /&gt;
&lt;br /&gt;
''Tip: updating a negative list (such as looking for &amp;quot;script&amp;quot;, &amp;quot;sCrIpT&amp;quot;, &amp;quot;ßCrîpt&amp;quot;, etc) will require expensive and constant deployments and will '''always '''fail as attackers work out your list of &amp;quot;bad&amp;quot; words. Positive validation is simpler, faster and usually more secure and needs updating far less than any other validation mechanism. ''&lt;br /&gt;
||*'''[https://www.owasp.org/index.php/Query_Parameterization_Cheat_Sheet Parameterized queries]'''&lt;br /&gt;
&lt;br /&gt;
*Object relational model (Hibernate).&lt;br /&gt;
*Active Record design pattern.&lt;br /&gt;
*Stored procedures.&lt;br /&gt;
&lt;br /&gt;
*Escape mechanisms such as ESAPI's Encoder:&lt;br /&gt;
**EncodeForLDAP()&lt;br /&gt;
**Encoder.EncodeforOS()&lt;br /&gt;
&lt;br /&gt;
''Tip: '''All '''SQL Injection is due to dynamic SQL queries. Strongly consider prohibiting dynamic SQL queries within your organization ''&lt;br /&gt;
&lt;br /&gt;
||''4.8.5 SQL Injection (OWASP-DV-005)''&lt;br /&gt;
''4.8.6 LDAP Injection (OWASP-DV-006)''&lt;br /&gt;
''4.8.7 ORM Injection (OWASP-DV-007)''&lt;br /&gt;
''4.8.8 XML Injection (OWASP-DV-008)''&lt;br /&gt;
''4.8.9 SSI Injection (OWASP-DV-009)''&lt;br /&gt;
''4.8.10 XPath Injection (OWASP-DV-010)''&lt;br /&gt;
''4.8.11 IMAP/SMTP Injection (OWASP-DV-011)''&lt;br /&gt;
''4.8.12 Code Injection (OWASP-DV-012)''&lt;br /&gt;
''4.8.13 OS Commanding (OWASP-DV-013)''&lt;br /&gt;
''4.8.14 Buffer overflow (OWASP-DV-014)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A2 XSS'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
*Set correct content type&lt;br /&gt;
*Set safe character set (UTF-8)&lt;br /&gt;
*Set correct locale&lt;br /&gt;
*Output encode all user data as per output context&lt;br /&gt;
*Set input constraints&lt;br /&gt;
&lt;br /&gt;
''On Submit''&lt;br /&gt;
Enforce input field type and lengths&lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation &lt;br /&gt;
(LR) Sanitize input &lt;br /&gt;
&lt;br /&gt;
''Tip: Only process data that is 100% trustworthy. Everything else is hostile and should be rejected.''&lt;br /&gt;
||''Tip: Do not store data HTML encoded in the database. This prevents new uses for the data, such as web services, RSS feeds, FTP batches, data warehousing, cloud computing, and so on.''&lt;br /&gt;
&lt;br /&gt;
''Tip: Use OWASP Scrubbr to clean tainted or hostile data from legacy data''&lt;br /&gt;
&lt;br /&gt;
||''4.8.1 Testing for Reflected Cross Site Scripting (OWASP-DV-001)''&lt;br /&gt;
''4.8.2 Testing for Stored Cross Site Scripting (OWASP-DV-002)''&lt;br /&gt;
''4.8.3 Testing for DOM based Cross Site Scripting (OWASP-DV-003)''&lt;br /&gt;
''4.8.4 Testing for Cross Site Flashing (OWASP-DV004)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A3 Weak authentication and session management'''&lt;br /&gt;
||''Render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient for this view'''&lt;br /&gt;
'''Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies'''&lt;br /&gt;
Send CSRF token with forms&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Only use inbuilt session management'''&lt;br /&gt;
'''Store secondary SSO / framework / custom session identifiers in native session object – do not send as additional headers or cookies'''&lt;br /&gt;
&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform this action'''&lt;br /&gt;
Validate CSRF token&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
''Tip: Consider the use of a &amp;quot;governor&amp;quot; to regulate the maximum number of requests per second / minute / hour that this user may perform. For example, a typical banking user should not perform more than ten transactions a minute, and one hundred per second is dangerous and should be blocked.''&lt;br /&gt;
&lt;br /&gt;
||''4.4.2 Testing for user enumeration (OWASP-AT-002)''&lt;br /&gt;
''4.4.3 Testing for Guessable (Dictionary) User Account (OWASP-AT-003)''&lt;br /&gt;
''4.4.4 Brute Force Testing (OWASP-AT-004)''&lt;br /&gt;
''4.4.6 Testing for vulnerable remember password and pwd reset (OWASP-AT-006)''&lt;br /&gt;
''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.4.7 Testing for Logout and Browser Cache Management (OWASP-AT-007)''&lt;br /&gt;
''4.4.8 Testing for CAPTCHA (OWASP-AT-008)''&lt;br /&gt;
''4.4.9 Testing Multiple Factors Authentication (OWASP-AT-009)''&lt;br /&gt;
''4.4.10 Testing for Race Conditions (OWASP-AT-010)''&lt;br /&gt;
''4.5.1 Testing for Session Management Schema (OWASP-SM-001)''&lt;br /&gt;
''4.5.2 Testing for Cookies attributes (OWASP-SM-002)''&lt;br /&gt;
''4.5.3 Testing for Session Fixation (OWASP-SM_003)''&lt;br /&gt;
''4.5.4 Testing for Exposed Session Variables (OWASP-SM-004)''&lt;br /&gt;
''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
''4.6.3 Testing for Privilege Escalation (OWASP-AZ-003)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A4 Insecure Direct Object Reference'''&lt;br /&gt;
||'''If data is from internal trusted sources, no data is sent'''&lt;br /&gt;
&lt;br /&gt;
''Or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send indirect random access reference map value'''&lt;br /&gt;
||'''Obtain data from internal, trusted sources'''&lt;br /&gt;
&lt;br /&gt;
''Or ''&lt;br /&gt;
&lt;br /&gt;
'''Obtain direct value from random access reference access map'''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A5 Cross Site Request Forgery'''&lt;br /&gt;
||''Pre-render''&lt;br /&gt;
Validate user is authenticated&lt;br /&gt;
Validate role is sufficient for this view&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies&lt;br /&gt;
||'''Validate CSRF token'''&lt;br /&gt;
Validate role is sufficient to perform this action&lt;br /&gt;
Validate role is sufficient &lt;br /&gt;
&lt;br /&gt;
''Tip: CSRF is '''always '''possible if there is XSS, so make sure XSS is eliminated within your application.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A6 Security Misconfiguration'''&lt;br /&gt;
||Ensure web servers and application servers are hardened&lt;br /&gt;
&lt;br /&gt;
PHP – Ensure allow_url_fopen and allow_url_include are both disabled in php.ini. Consider the use of Suhosin extension &lt;br /&gt;
||Ensure web servers and application servers are hardened &lt;br /&gt;
&lt;br /&gt;
XML – Ensure common web attacks (remote XSLT transforms, hostile XPath queries, recursive DTDs, and so on) are protected by your XML stack. Do not hand craft XML documents or queries – use the XML layer. &lt;br /&gt;
||Ensure database servers are hardened &lt;br /&gt;
&lt;br /&gt;
||''4.2.6 Analysis of Error Codes (OWASP-IG-006)''&lt;br /&gt;
''4.3.2 DB Listener Testing (OWASP-CM-002)''&lt;br /&gt;
''4.3.3 Infrastructure Configuration Management Testing (OWASP-CM-003)''&lt;br /&gt;
''4.3.4 Application Configuration Management Testing (OWASP-CM-004)''&lt;br /&gt;
''4.3.5 Testing for File Extensions Handling (OWASP-CM-005)''&lt;br /&gt;
''4.3.6 Old, Backup and Unreferenced Files (OWASP-CM-006)''&lt;br /&gt;
''4.3.7 Infrastructure and Application Admin Interfaces (OWASP-CM-007)''&lt;br /&gt;
''4.3.8 Testing for HTTP Methods and XST (OWASP-CM-008)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A7 Insufficient Cryptographic Storage'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Do not send keys or hashes to the browser&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Tip: Only certain personally identifiable information and sensitive values MUST be encrypted. Encrypt data that would be embarrassing or costly if it was leaked or stolen. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: It is best to encrypt data on the application server, rather than the database server.''&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
&lt;br /&gt;
''Tip: Do not use RDBMS database, row or table level encryption. The data can be retrieved in the clear by anyone with direct access to the server, or over the network using the application credentials. It might even traverse the network in the clear despite being &amp;quot;encrypted&amp;quot; on disk. ''&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A8 Failure to Restrict URL access'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Ensure all non-web data is outside the web root (logs, configuration, etc)'''&lt;br /&gt;
'''Use octet byte streaming instead of providing access to real files such as PDFs or CSVs or similar'''&lt;br /&gt;
'''Ensure every page requires a role, even if it is &amp;quot;guest&amp;quot;'''&lt;br /&gt;
''	''&lt;br /&gt;
''Pre-render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to view secured URL'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
||'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform secured action'''&lt;br /&gt;
'''Validate CSRF token'''&lt;br /&gt;
&lt;br /&gt;
''Tip: It's impossible to control access to secured resources that the web application server does not directly serve. Therefore, PDF reports or similar should be served by the web application server using binary octet streaming. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: Assume attackers '''will''' learn where &amp;quot;hidden&amp;quot; directories and &amp;quot;random&amp;quot; filenames are, so do not store these files in the web root, even if they are not directly linked.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A9 Insufficient Transport Layer Protection'''&lt;br /&gt;
||Use TLS 1.2 or later for all web communications &lt;br /&gt;
Buy extended validation (EV) certificates for public web servers&lt;br /&gt;
&lt;br /&gt;
''Tip: Use TLS 1.2 always – even internally. Most snooping is done within corporate networks – and it is as easy and unethical as fishing with dynamite.''&lt;br /&gt;
||Mandate strong encrypted communications between web and database servers and any other servers or administrative users&lt;br /&gt;
||Mandate strong encrypted communications with application servers and any other servers or administrative users&lt;br /&gt;
&lt;br /&gt;
||''4.3.1 SSL/TLS Testing (OWASP-CM-001)''&lt;br /&gt;
''4.4.1 Credentials transport over an encrypted channel (OWASP-AT-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A10 Unvalidated Redirects and Forwards'''&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Use random indirect object references for redirection parameters&lt;br /&gt;
&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
Obtain direct redirection parameter from random indirect reference access map&lt;br /&gt;
(LR) Positive validation of redirection parameter &lt;br /&gt;
(NR) Java – Do not forward() requests as this prevents SSO access control mechanisms &lt;br /&gt;
&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Andrew van der Stock vanderaj[at]owasp.org&lt;br /&gt;
&lt;br /&gt;
Ismael Rocha Gonçalves ismaelrg[at]gmail.com&lt;br /&gt;
&lt;br /&gt;
= Other Cheatsheets =&lt;br /&gt;
{{Cheatsheet_Navigation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137275</id>
		<title>OWASP Top Ten Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137275"/>
				<updated>2012-10-08T20:34:25Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The following is a developer-centric defensive cheat sheet for the [[OWASP Top Ten Project]]. It also presents a quick reference based on [[OWASP Testing Project]] to help how to identify the risks.&lt;br /&gt;
&lt;br /&gt;
= OWASP Top Ten Cheat Sheet =&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
| &lt;br /&gt;
||'''Presentation'''&lt;br /&gt;
||'''Controller'''&lt;br /&gt;
||'''Model'''&lt;br /&gt;
||'''Testing (OWASP Testing Guide V3)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A1 Injection'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
Set a correct content type&lt;br /&gt;
Set safe character set (UTF-8)&lt;br /&gt;
Set correct locale&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
Enforce input field type and lengths &lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation.&lt;br /&gt;
(LR) Sanitize input.&lt;br /&gt;
&lt;br /&gt;
''Tip: updating a negative list (such as looking for &amp;quot;script&amp;quot;, &amp;quot;sCrIpT&amp;quot;, &amp;quot;ßCrîpt&amp;quot;, etc) will require expensive and constant deployments and will '''always '''fail as attackers work out your list of &amp;quot;bad&amp;quot; words. Positive validation is simpler, faster and usually more secure and needs updating far less than any other validation mechanism. ''&lt;br /&gt;
||*'''[https://www.owasp.org/index.php/Query_Parameterization_Cheat_Sheet Parameterized queries]'''&lt;br /&gt;
&lt;br /&gt;
*Object relational model (Hibernate).&lt;br /&gt;
*Active Record design pattern.&lt;br /&gt;
*Stored procedures.&lt;br /&gt;
&lt;br /&gt;
*Escape mechanisms such as ESAPI's Encoder:&lt;br /&gt;
**EncodeForLDAP()&lt;br /&gt;
**Encoder.EncodeforOS()&lt;br /&gt;
&lt;br /&gt;
''Tip: '''All '''SQL Injection is due to dynamic SQL queries. Strongly consider prohibiting dynamic SQL queries within your organization ''&lt;br /&gt;
&lt;br /&gt;
||''4.8.5 SQL Injection (OWASP-DV-005)''&lt;br /&gt;
''4.8.6 LDAP Injection (OWASP-DV-006)''&lt;br /&gt;
''4.8.7 ORM Injection (OWASP-DV-007)''&lt;br /&gt;
''4.8.8 XML Injection (OWASP-DV-008)''&lt;br /&gt;
''4.8.9 SSI Injection (OWASP-DV-009)''&lt;br /&gt;
''4.8.10 XPath Injection (OWASP-DV-010)''&lt;br /&gt;
''4.8.11 IMAP/SMTP Injection (OWASP-DV-011)''&lt;br /&gt;
''4.8.12 Code Injection (OWASP-DV-012)''&lt;br /&gt;
''4.8.13 OS Commanding (OWASP-DV-013)''&lt;br /&gt;
''4.8.14 Buffer overflow (OWASP-DV-014)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A2 XSS'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Set correct content type'''&lt;br /&gt;
'''Set safe character set (UTF-8) '''&lt;br /&gt;
'''Set correct locale'''&lt;br /&gt;
'''Output encode all user data as per output context'''&lt;br /&gt;
'''Set input constraints '''&lt;br /&gt;
&lt;br /&gt;
''On Submit''&lt;br /&gt;
Enforce input field type and lengths&lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation &lt;br /&gt;
(LR) Sanitize input &lt;br /&gt;
&lt;br /&gt;
''Tip: Only process data that is 100% trustworthy. Everything else is hostile and should be rejected.''&lt;br /&gt;
||''Tip: Do not store data HTML encoded in the database. This prevents new uses for the data, such as web services, RSS feeds, FTP batches, data warehousing, cloud computing, and so on.''&lt;br /&gt;
&lt;br /&gt;
''Tip: Use OWASP Scrubbr to clean tainted or hostile data from legacy data''&lt;br /&gt;
&lt;br /&gt;
||''4.8.1 Testing for Reflected Cross Site Scripting (OWASP-DV-001)''&lt;br /&gt;
''4.8.2 Testing for Stored Cross Site Scripting (OWASP-DV-002)''&lt;br /&gt;
''4.8.3 Testing for DOM based Cross Site Scripting (OWASP-DV-003)''&lt;br /&gt;
''4.8.4 Testing for Cross Site Flashing (OWASP-DV004)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A3 Weak authentication and session management'''&lt;br /&gt;
||''Render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient for this view'''&lt;br /&gt;
'''Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies'''&lt;br /&gt;
Send CSRF token with forms&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Only use inbuilt session management'''&lt;br /&gt;
'''Store secondary SSO / framework / custom session identifiers in native session object – do not send as additional headers or cookies'''&lt;br /&gt;
&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform this action'''&lt;br /&gt;
Validate CSRF token&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
''Tip: Consider the use of a &amp;quot;governor&amp;quot; to regulate the maximum number of requests per second / minute / hour that this user may perform. For example, a typical banking user should not perform more than ten transactions a minute, and one hundred per second is dangerous and should be blocked.''&lt;br /&gt;
&lt;br /&gt;
||''4.4.2 Testing for user enumeration (OWASP-AT-002)''&lt;br /&gt;
''4.4.3 Testing for Guessable (Dictionary) User Account (OWASP-AT-003)''&lt;br /&gt;
''4.4.4 Brute Force Testing (OWASP-AT-004)''&lt;br /&gt;
''4.4.6 Testing for vulnerable remember password and pwd reset (OWASP-AT-006)''&lt;br /&gt;
''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.4.7 Testing for Logout and Browser Cache Management (OWASP-AT-007)''&lt;br /&gt;
''4.4.8 Testing for CAPTCHA (OWASP-AT-008)''&lt;br /&gt;
''4.4.9 Testing Multiple Factors Authentication (OWASP-AT-009)''&lt;br /&gt;
''4.4.10 Testing for Race Conditions (OWASP-AT-010)''&lt;br /&gt;
''4.5.1 Testing for Session Management Schema (OWASP-SM-001)''&lt;br /&gt;
''4.5.2 Testing for Cookies attributes (OWASP-SM-002)''&lt;br /&gt;
''4.5.3 Testing for Session Fixation (OWASP-SM_003)''&lt;br /&gt;
''4.5.4 Testing for Exposed Session Variables (OWASP-SM-004)''&lt;br /&gt;
''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
''4.6.3 Testing for Privilege Escalation (OWASP-AZ-003)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A4 Insecure Direct Object Reference'''&lt;br /&gt;
||'''If data is from internal trusted sources, no data is sent'''&lt;br /&gt;
&lt;br /&gt;
''Or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send indirect random access reference map value'''&lt;br /&gt;
||'''Obtain data from internal, trusted sources'''&lt;br /&gt;
&lt;br /&gt;
''Or ''&lt;br /&gt;
&lt;br /&gt;
'''Obtain direct value from random access reference access map'''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A5 Cross Site Request Forgery'''&lt;br /&gt;
||''Pre-render''&lt;br /&gt;
Validate user is authenticated&lt;br /&gt;
Validate role is sufficient for this view&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies&lt;br /&gt;
||'''Validate CSRF token'''&lt;br /&gt;
Validate role is sufficient to perform this action&lt;br /&gt;
Validate role is sufficient &lt;br /&gt;
&lt;br /&gt;
''Tip: CSRF is '''always '''possible if there is XSS, so make sure XSS is eliminated within your application.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A6 Security Misconfiguration'''&lt;br /&gt;
||Ensure web servers and application servers are hardened&lt;br /&gt;
&lt;br /&gt;
PHP – Ensure allow_url_fopen and allow_url_include are both disabled in php.ini. Consider the use of Suhosin extension &lt;br /&gt;
||Ensure web servers and application servers are hardened &lt;br /&gt;
&lt;br /&gt;
XML – Ensure common web attacks (remote XSLT transforms, hostile XPath queries, recursive DTDs, and so on) are protected by your XML stack. Do not hand craft XML documents or queries – use the XML layer. &lt;br /&gt;
||Ensure database servers are hardened &lt;br /&gt;
&lt;br /&gt;
||''4.2.6 Analysis of Error Codes (OWASP-IG-006)''&lt;br /&gt;
''4.3.2 DB Listener Testing (OWASP-CM-002)''&lt;br /&gt;
''4.3.3 Infrastructure Configuration Management Testing (OWASP-CM-003)''&lt;br /&gt;
''4.3.4 Application Configuration Management Testing (OWASP-CM-004)''&lt;br /&gt;
''4.3.5 Testing for File Extensions Handling (OWASP-CM-005)''&lt;br /&gt;
''4.3.6 Old, Backup and Unreferenced Files (OWASP-CM-006)''&lt;br /&gt;
''4.3.7 Infrastructure and Application Admin Interfaces (OWASP-CM-007)''&lt;br /&gt;
''4.3.8 Testing for HTTP Methods and XST (OWASP-CM-008)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A7 Insufficient Cryptographic Storage'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Do not send keys or hashes to the browser&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Tip: Only certain personally identifiable information and sensitive values MUST be encrypted. Encrypt data that would be embarrassing or costly if it was leaked or stolen. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: It is best to encrypt data on the application server, rather than the database server.''&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
&lt;br /&gt;
''Tip: Do not use RDBMS database, row or table level encryption. The data can be retrieved in the clear by anyone with direct access to the server, or over the network using the application credentials. It might even traverse the network in the clear despite being &amp;quot;encrypted&amp;quot; on disk. ''&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A8 Failure to Restrict URL access'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Ensure all non-web data is outside the web root (logs, configuration, etc)'''&lt;br /&gt;
'''Use octet byte streaming instead of providing access to real files such as PDFs or CSVs or similar'''&lt;br /&gt;
'''Ensure every page requires a role, even if it is &amp;quot;guest&amp;quot;'''&lt;br /&gt;
''	''&lt;br /&gt;
''Pre-render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to view secured URL'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
||'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform secured action'''&lt;br /&gt;
'''Validate CSRF token'''&lt;br /&gt;
&lt;br /&gt;
''Tip: It's impossible to control access to secured resources that the web application server does not directly serve. Therefore, PDF reports or similar should be served by the web application server using binary octet streaming. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: Assume attackers '''will''' learn where &amp;quot;hidden&amp;quot; directories and &amp;quot;random&amp;quot; filenames are, so do not store these files in the web root, even if they are not directly linked.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A9 Insufficient Transport Layer Protection'''&lt;br /&gt;
||Use TLS 1.2 or later for all web communications &lt;br /&gt;
Buy extended validation (EV) certificates for public web servers&lt;br /&gt;
&lt;br /&gt;
''Tip: Use TLS 1.2 always – even internally. Most snooping is done within corporate networks – and it is as easy and unethical as fishing with dynamite.''&lt;br /&gt;
||Mandate strong encrypted communications between web and database servers and any other servers or administrative users&lt;br /&gt;
||Mandate strong encrypted communications with application servers and any other servers or administrative users&lt;br /&gt;
&lt;br /&gt;
||''4.3.1 SSL/TLS Testing (OWASP-CM-001)''&lt;br /&gt;
''4.4.1 Credentials transport over an encrypted channel (OWASP-AT-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A10 Unvalidated Redirects and Forwards'''&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Use random indirect object references for redirection parameters&lt;br /&gt;
&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
Obtain direct redirection parameter from random indirect reference access map&lt;br /&gt;
(LR) Positive validation of redirection parameter &lt;br /&gt;
(NR) Java – Do not forward() requests as this prevents SSO access control mechanisms &lt;br /&gt;
&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Andrew van der Stock vanderaj[at]owasp.org&lt;br /&gt;
&lt;br /&gt;
Ismael Rocha Gonçalves ismaelrg[at]gmail.com&lt;br /&gt;
&lt;br /&gt;
= Other Cheatsheets =&lt;br /&gt;
{{Cheatsheet_Navigation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137274</id>
		<title>OWASP Top Ten Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137274"/>
				<updated>2012-10-08T20:33:06Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The following is a developer-centric defensive cheat sheet for the [[OWASP Top Ten Project]]. It also presents a quick reference based on [[OWASP Testing Project]] to help how to identify the risks.&lt;br /&gt;
&lt;br /&gt;
= OWASP Top Ten Cheat Sheet =&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
| &lt;br /&gt;
||'''Presentation'''&lt;br /&gt;
||'''Controller'''&lt;br /&gt;
||'''Model'''&lt;br /&gt;
||'''Testing (OWASP Testing Guide V3)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A1 Injection'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
Set a correct content type&lt;br /&gt;
Set safe character set (UTF-8)&lt;br /&gt;
Set correct locale&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
Enforce input field type and lengths &lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation.&lt;br /&gt;
(LR) Sanitize input.&lt;br /&gt;
&lt;br /&gt;
''Tip: updating a negative list (such as looking for &amp;quot;script&amp;quot;, &amp;quot;sCrIpT&amp;quot;, &amp;quot;ßCrîpt&amp;quot;, etc) will require expensive and constant deployments and will '''always '''fail as attackers work out your list of &amp;quot;bad&amp;quot; words. Positive validation is simpler, faster and usually more secure and needs updating far less than any other validation mechanism. ''&lt;br /&gt;
||*'''[https://www.owasp.org/index.php/Query_Parameterization_Cheat_Sheet Parameterized queries]'''&lt;br /&gt;
&lt;br /&gt;
*Object relational model (Hibernate).&lt;br /&gt;
*Active Record design pattern.&lt;br /&gt;
*Stored procedures.&lt;br /&gt;
&lt;br /&gt;
*Escape mechanisms such as:&lt;br /&gt;
**ESAPI's Encoder&lt;br /&gt;
**EncodeForLDAP()&lt;br /&gt;
**Encoder.EncodeforOS()&lt;br /&gt;
&lt;br /&gt;
''Tip: '''All '''SQL Injection is due to dynamic SQL queries. Strongly consider prohibiting dynamic SQL queries within your organization ''&lt;br /&gt;
&lt;br /&gt;
||''4.8.5 SQL Injection (OWASP-DV-005)''&lt;br /&gt;
''4.8.6 LDAP Injection (OWASP-DV-006)''&lt;br /&gt;
''4.8.7 ORM Injection (OWASP-DV-007)''&lt;br /&gt;
''4.8.8 XML Injection (OWASP-DV-008)''&lt;br /&gt;
''4.8.9 SSI Injection (OWASP-DV-009)''&lt;br /&gt;
''4.8.10 XPath Injection (OWASP-DV-010)''&lt;br /&gt;
''4.8.11 IMAP/SMTP Injection (OWASP-DV-011)''&lt;br /&gt;
''4.8.12 Code Injection (OWASP-DV-012)''&lt;br /&gt;
''4.8.13 OS Commanding (OWASP-DV-013)''&lt;br /&gt;
''4.8.14 Buffer overflow (OWASP-DV-014)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A2 XSS'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Set correct content type'''&lt;br /&gt;
'''Set safe character set (UTF-8) '''&lt;br /&gt;
'''Set correct locale'''&lt;br /&gt;
'''Output encode all user data as per output context'''&lt;br /&gt;
'''Set input constraints '''&lt;br /&gt;
&lt;br /&gt;
''On Submit''&lt;br /&gt;
Enforce input field type and lengths&lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation &lt;br /&gt;
(LR) Sanitize input &lt;br /&gt;
&lt;br /&gt;
''Tip: Only process data that is 100% trustworthy. Everything else is hostile and should be rejected.''&lt;br /&gt;
||''Tip: Do not store data HTML encoded in the database. This prevents new uses for the data, such as web services, RSS feeds, FTP batches, data warehousing, cloud computing, and so on.''&lt;br /&gt;
&lt;br /&gt;
''Tip: Use OWASP Scrubbr to clean tainted or hostile data from legacy data''&lt;br /&gt;
&lt;br /&gt;
||''4.8.1 Testing for Reflected Cross Site Scripting (OWASP-DV-001)''&lt;br /&gt;
''4.8.2 Testing for Stored Cross Site Scripting (OWASP-DV-002)''&lt;br /&gt;
''4.8.3 Testing for DOM based Cross Site Scripting (OWASP-DV-003)''&lt;br /&gt;
''4.8.4 Testing for Cross Site Flashing (OWASP-DV004)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A3 Weak authentication and session management'''&lt;br /&gt;
||''Render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient for this view'''&lt;br /&gt;
'''Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies'''&lt;br /&gt;
Send CSRF token with forms&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Only use inbuilt session management'''&lt;br /&gt;
'''Store secondary SSO / framework / custom session identifiers in native session object – do not send as additional headers or cookies'''&lt;br /&gt;
&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform this action'''&lt;br /&gt;
Validate CSRF token&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
''Tip: Consider the use of a &amp;quot;governor&amp;quot; to regulate the maximum number of requests per second / minute / hour that this user may perform. For example, a typical banking user should not perform more than ten transactions a minute, and one hundred per second is dangerous and should be blocked.''&lt;br /&gt;
&lt;br /&gt;
||''4.4.2 Testing for user enumeration (OWASP-AT-002)''&lt;br /&gt;
''4.4.3 Testing for Guessable (Dictionary) User Account (OWASP-AT-003)''&lt;br /&gt;
''4.4.4 Brute Force Testing (OWASP-AT-004)''&lt;br /&gt;
''4.4.6 Testing for vulnerable remember password and pwd reset (OWASP-AT-006)''&lt;br /&gt;
''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.4.7 Testing for Logout and Browser Cache Management (OWASP-AT-007)''&lt;br /&gt;
''4.4.8 Testing for CAPTCHA (OWASP-AT-008)''&lt;br /&gt;
''4.4.9 Testing Multiple Factors Authentication (OWASP-AT-009)''&lt;br /&gt;
''4.4.10 Testing for Race Conditions (OWASP-AT-010)''&lt;br /&gt;
''4.5.1 Testing for Session Management Schema (OWASP-SM-001)''&lt;br /&gt;
''4.5.2 Testing for Cookies attributes (OWASP-SM-002)''&lt;br /&gt;
''4.5.3 Testing for Session Fixation (OWASP-SM_003)''&lt;br /&gt;
''4.5.4 Testing for Exposed Session Variables (OWASP-SM-004)''&lt;br /&gt;
''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
''4.6.3 Testing for Privilege Escalation (OWASP-AZ-003)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A4 Insecure Direct Object Reference'''&lt;br /&gt;
||'''If data is from internal trusted sources, no data is sent'''&lt;br /&gt;
&lt;br /&gt;
''Or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send indirect random access reference map value'''&lt;br /&gt;
||'''Obtain data from internal, trusted sources'''&lt;br /&gt;
&lt;br /&gt;
''Or ''&lt;br /&gt;
&lt;br /&gt;
'''Obtain direct value from random access reference access map'''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A5 Cross Site Request Forgery'''&lt;br /&gt;
||''Pre-render''&lt;br /&gt;
Validate user is authenticated&lt;br /&gt;
Validate role is sufficient for this view&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies&lt;br /&gt;
||'''Validate CSRF token'''&lt;br /&gt;
Validate role is sufficient to perform this action&lt;br /&gt;
Validate role is sufficient &lt;br /&gt;
&lt;br /&gt;
''Tip: CSRF is '''always '''possible if there is XSS, so make sure XSS is eliminated within your application.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A6 Security Misconfiguration'''&lt;br /&gt;
||Ensure web servers and application servers are hardened&lt;br /&gt;
&lt;br /&gt;
PHP – Ensure allow_url_fopen and allow_url_include are both disabled in php.ini. Consider the use of Suhosin extension &lt;br /&gt;
||Ensure web servers and application servers are hardened &lt;br /&gt;
&lt;br /&gt;
XML – Ensure common web attacks (remote XSLT transforms, hostile XPath queries, recursive DTDs, and so on) are protected by your XML stack. Do not hand craft XML documents or queries – use the XML layer. &lt;br /&gt;
||Ensure database servers are hardened &lt;br /&gt;
&lt;br /&gt;
||''4.2.6 Analysis of Error Codes (OWASP-IG-006)''&lt;br /&gt;
''4.3.2 DB Listener Testing (OWASP-CM-002)''&lt;br /&gt;
''4.3.3 Infrastructure Configuration Management Testing (OWASP-CM-003)''&lt;br /&gt;
''4.3.4 Application Configuration Management Testing (OWASP-CM-004)''&lt;br /&gt;
''4.3.5 Testing for File Extensions Handling (OWASP-CM-005)''&lt;br /&gt;
''4.3.6 Old, Backup and Unreferenced Files (OWASP-CM-006)''&lt;br /&gt;
''4.3.7 Infrastructure and Application Admin Interfaces (OWASP-CM-007)''&lt;br /&gt;
''4.3.8 Testing for HTTP Methods and XST (OWASP-CM-008)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A7 Insufficient Cryptographic Storage'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Do not send keys or hashes to the browser&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Tip: Only certain personally identifiable information and sensitive values MUST be encrypted. Encrypt data that would be embarrassing or costly if it was leaked or stolen. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: It is best to encrypt data on the application server, rather than the database server.''&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
&lt;br /&gt;
''Tip: Do not use RDBMS database, row or table level encryption. The data can be retrieved in the clear by anyone with direct access to the server, or over the network using the application credentials. It might even traverse the network in the clear despite being &amp;quot;encrypted&amp;quot; on disk. ''&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A8 Failure to Restrict URL access'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Ensure all non-web data is outside the web root (logs, configuration, etc)'''&lt;br /&gt;
'''Use octet byte streaming instead of providing access to real files such as PDFs or CSVs or similar'''&lt;br /&gt;
'''Ensure every page requires a role, even if it is &amp;quot;guest&amp;quot;'''&lt;br /&gt;
''	''&lt;br /&gt;
''Pre-render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to view secured URL'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
||'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform secured action'''&lt;br /&gt;
'''Validate CSRF token'''&lt;br /&gt;
&lt;br /&gt;
''Tip: It's impossible to control access to secured resources that the web application server does not directly serve. Therefore, PDF reports or similar should be served by the web application server using binary octet streaming. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: Assume attackers '''will''' learn where &amp;quot;hidden&amp;quot; directories and &amp;quot;random&amp;quot; filenames are, so do not store these files in the web root, even if they are not directly linked.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A9 Insufficient Transport Layer Protection'''&lt;br /&gt;
||Use TLS 1.2 or later for all web communications &lt;br /&gt;
Buy extended validation (EV) certificates for public web servers&lt;br /&gt;
&lt;br /&gt;
''Tip: Use TLS 1.2 always – even internally. Most snooping is done within corporate networks – and it is as easy and unethical as fishing with dynamite.''&lt;br /&gt;
||Mandate strong encrypted communications between web and database servers and any other servers or administrative users&lt;br /&gt;
||Mandate strong encrypted communications with application servers and any other servers or administrative users&lt;br /&gt;
&lt;br /&gt;
||''4.3.1 SSL/TLS Testing (OWASP-CM-001)''&lt;br /&gt;
''4.4.1 Credentials transport over an encrypted channel (OWASP-AT-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A10 Unvalidated Redirects and Forwards'''&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Use random indirect object references for redirection parameters&lt;br /&gt;
&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
Obtain direct redirection parameter from random indirect reference access map&lt;br /&gt;
(LR) Positive validation of redirection parameter &lt;br /&gt;
(NR) Java – Do not forward() requests as this prevents SSO access control mechanisms &lt;br /&gt;
&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Andrew van der Stock vanderaj[at]owasp.org&lt;br /&gt;
&lt;br /&gt;
Ismael Rocha Gonçalves ismaelrg[at]gmail.com&lt;br /&gt;
&lt;br /&gt;
= Other Cheatsheets =&lt;br /&gt;
{{Cheatsheet_Navigation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137273</id>
		<title>OWASP Top Ten Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137273"/>
				<updated>2012-10-08T20:32:06Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The following is a developer-centric defensive cheat sheet for the [[OWASP Top Ten Project]]. It also presents a quick reference based on [[OWASP Testing Project]] to help how to identify the risks.&lt;br /&gt;
&lt;br /&gt;
= OWASP Top Ten Cheat Sheet =&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
| &lt;br /&gt;
||'''Presentation'''&lt;br /&gt;
||'''Controller'''&lt;br /&gt;
||'''Model'''&lt;br /&gt;
||'''Testing (OWASP Testing Guide V3)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A1 Injection'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
Set a correct content type&lt;br /&gt;
Set safe character set (UTF-8)&lt;br /&gt;
Set correct locale&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
Enforce input field type and lengths &lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation.&lt;br /&gt;
(LR) Sanitize input.&lt;br /&gt;
&lt;br /&gt;
''Tip: updating a negative list (such as looking for &amp;quot;script&amp;quot;, &amp;quot;sCrIpT&amp;quot;, &amp;quot;ßCrîpt&amp;quot;, etc) will require expensive and constant deployments and will '''always '''fail as attackers work out your list of &amp;quot;bad&amp;quot; words. Positive validation is simpler, faster and usually more secure and needs updating far less than any other validation mechanism. ''&lt;br /&gt;
||'''[https://www.owasp.org/index.php/Query_Parameterization_Cheat_Sheet Parameterized queries]'''&lt;br /&gt;
&lt;br /&gt;
*Object relational model (Hibernate).&lt;br /&gt;
*Active Record design pattern.&lt;br /&gt;
*Stored procedures.&lt;br /&gt;
&lt;br /&gt;
Escape mechanisms such as ESAPI's Encoder, EncodeForLDAP() or Encoder.EncodeforOS()&lt;br /&gt;
&lt;br /&gt;
''Tip: '''All '''SQL Injection is due to dynamic SQL queries. Strongly consider prohibiting dynamic SQL queries within your organization ''&lt;br /&gt;
&lt;br /&gt;
||''4.8.5 SQL Injection (OWASP-DV-005)''&lt;br /&gt;
''4.8.6 LDAP Injection (OWASP-DV-006)''&lt;br /&gt;
''4.8.7 ORM Injection (OWASP-DV-007)''&lt;br /&gt;
''4.8.8 XML Injection (OWASP-DV-008)''&lt;br /&gt;
''4.8.9 SSI Injection (OWASP-DV-009)''&lt;br /&gt;
''4.8.10 XPath Injection (OWASP-DV-010)''&lt;br /&gt;
''4.8.11 IMAP/SMTP Injection (OWASP-DV-011)''&lt;br /&gt;
''4.8.12 Code Injection (OWASP-DV-012)''&lt;br /&gt;
''4.8.13 OS Commanding (OWASP-DV-013)''&lt;br /&gt;
''4.8.14 Buffer overflow (OWASP-DV-014)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A2 XSS'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Set correct content type'''&lt;br /&gt;
'''Set safe character set (UTF-8) '''&lt;br /&gt;
'''Set correct locale'''&lt;br /&gt;
'''Output encode all user data as per output context'''&lt;br /&gt;
'''Set input constraints '''&lt;br /&gt;
&lt;br /&gt;
''On Submit''&lt;br /&gt;
Enforce input field type and lengths&lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation &lt;br /&gt;
(LR) Sanitize input &lt;br /&gt;
&lt;br /&gt;
''Tip: Only process data that is 100% trustworthy. Everything else is hostile and should be rejected.''&lt;br /&gt;
||''Tip: Do not store data HTML encoded in the database. This prevents new uses for the data, such as web services, RSS feeds, FTP batches, data warehousing, cloud computing, and so on.''&lt;br /&gt;
&lt;br /&gt;
''Tip: Use OWASP Scrubbr to clean tainted or hostile data from legacy data''&lt;br /&gt;
&lt;br /&gt;
||''4.8.1 Testing for Reflected Cross Site Scripting (OWASP-DV-001)''&lt;br /&gt;
''4.8.2 Testing for Stored Cross Site Scripting (OWASP-DV-002)''&lt;br /&gt;
''4.8.3 Testing for DOM based Cross Site Scripting (OWASP-DV-003)''&lt;br /&gt;
''4.8.4 Testing for Cross Site Flashing (OWASP-DV004)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A3 Weak authentication and session management'''&lt;br /&gt;
||''Render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient for this view'''&lt;br /&gt;
'''Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies'''&lt;br /&gt;
Send CSRF token with forms&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Only use inbuilt session management'''&lt;br /&gt;
'''Store secondary SSO / framework / custom session identifiers in native session object – do not send as additional headers or cookies'''&lt;br /&gt;
&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform this action'''&lt;br /&gt;
Validate CSRF token&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
''Tip: Consider the use of a &amp;quot;governor&amp;quot; to regulate the maximum number of requests per second / minute / hour that this user may perform. For example, a typical banking user should not perform more than ten transactions a minute, and one hundred per second is dangerous and should be blocked.''&lt;br /&gt;
&lt;br /&gt;
||''4.4.2 Testing for user enumeration (OWASP-AT-002)''&lt;br /&gt;
''4.4.3 Testing for Guessable (Dictionary) User Account (OWASP-AT-003)''&lt;br /&gt;
''4.4.4 Brute Force Testing (OWASP-AT-004)''&lt;br /&gt;
''4.4.6 Testing for vulnerable remember password and pwd reset (OWASP-AT-006)''&lt;br /&gt;
''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.4.7 Testing for Logout and Browser Cache Management (OWASP-AT-007)''&lt;br /&gt;
''4.4.8 Testing for CAPTCHA (OWASP-AT-008)''&lt;br /&gt;
''4.4.9 Testing Multiple Factors Authentication (OWASP-AT-009)''&lt;br /&gt;
''4.4.10 Testing for Race Conditions (OWASP-AT-010)''&lt;br /&gt;
''4.5.1 Testing for Session Management Schema (OWASP-SM-001)''&lt;br /&gt;
''4.5.2 Testing for Cookies attributes (OWASP-SM-002)''&lt;br /&gt;
''4.5.3 Testing for Session Fixation (OWASP-SM_003)''&lt;br /&gt;
''4.5.4 Testing for Exposed Session Variables (OWASP-SM-004)''&lt;br /&gt;
''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
''4.6.3 Testing for Privilege Escalation (OWASP-AZ-003)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A4 Insecure Direct Object Reference'''&lt;br /&gt;
||'''If data is from internal trusted sources, no data is sent'''&lt;br /&gt;
&lt;br /&gt;
''Or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send indirect random access reference map value'''&lt;br /&gt;
||'''Obtain data from internal, trusted sources'''&lt;br /&gt;
&lt;br /&gt;
''Or ''&lt;br /&gt;
&lt;br /&gt;
'''Obtain direct value from random access reference access map'''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A5 Cross Site Request Forgery'''&lt;br /&gt;
||''Pre-render''&lt;br /&gt;
Validate user is authenticated&lt;br /&gt;
Validate role is sufficient for this view&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies&lt;br /&gt;
||'''Validate CSRF token'''&lt;br /&gt;
Validate role is sufficient to perform this action&lt;br /&gt;
Validate role is sufficient &lt;br /&gt;
&lt;br /&gt;
''Tip: CSRF is '''always '''possible if there is XSS, so make sure XSS is eliminated within your application.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A6 Security Misconfiguration'''&lt;br /&gt;
||Ensure web servers and application servers are hardened&lt;br /&gt;
&lt;br /&gt;
PHP – Ensure allow_url_fopen and allow_url_include are both disabled in php.ini. Consider the use of Suhosin extension &lt;br /&gt;
||Ensure web servers and application servers are hardened &lt;br /&gt;
&lt;br /&gt;
XML – Ensure common web attacks (remote XSLT transforms, hostile XPath queries, recursive DTDs, and so on) are protected by your XML stack. Do not hand craft XML documents or queries – use the XML layer. &lt;br /&gt;
||Ensure database servers are hardened &lt;br /&gt;
&lt;br /&gt;
||''4.2.6 Analysis of Error Codes (OWASP-IG-006)''&lt;br /&gt;
''4.3.2 DB Listener Testing (OWASP-CM-002)''&lt;br /&gt;
''4.3.3 Infrastructure Configuration Management Testing (OWASP-CM-003)''&lt;br /&gt;
''4.3.4 Application Configuration Management Testing (OWASP-CM-004)''&lt;br /&gt;
''4.3.5 Testing for File Extensions Handling (OWASP-CM-005)''&lt;br /&gt;
''4.3.6 Old, Backup and Unreferenced Files (OWASP-CM-006)''&lt;br /&gt;
''4.3.7 Infrastructure and Application Admin Interfaces (OWASP-CM-007)''&lt;br /&gt;
''4.3.8 Testing for HTTP Methods and XST (OWASP-CM-008)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A7 Insufficient Cryptographic Storage'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Do not send keys or hashes to the browser&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Tip: Only certain personally identifiable information and sensitive values MUST be encrypted. Encrypt data that would be embarrassing or costly if it was leaked or stolen. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: It is best to encrypt data on the application server, rather than the database server.''&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
&lt;br /&gt;
''Tip: Do not use RDBMS database, row or table level encryption. The data can be retrieved in the clear by anyone with direct access to the server, or over the network using the application credentials. It might even traverse the network in the clear despite being &amp;quot;encrypted&amp;quot; on disk. ''&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A8 Failure to Restrict URL access'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Ensure all non-web data is outside the web root (logs, configuration, etc)'''&lt;br /&gt;
'''Use octet byte streaming instead of providing access to real files such as PDFs or CSVs or similar'''&lt;br /&gt;
'''Ensure every page requires a role, even if it is &amp;quot;guest&amp;quot;'''&lt;br /&gt;
''	''&lt;br /&gt;
''Pre-render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to view secured URL'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
||'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform secured action'''&lt;br /&gt;
'''Validate CSRF token'''&lt;br /&gt;
&lt;br /&gt;
''Tip: It's impossible to control access to secured resources that the web application server does not directly serve. Therefore, PDF reports or similar should be served by the web application server using binary octet streaming. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: Assume attackers '''will''' learn where &amp;quot;hidden&amp;quot; directories and &amp;quot;random&amp;quot; filenames are, so do not store these files in the web root, even if they are not directly linked.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A9 Insufficient Transport Layer Protection'''&lt;br /&gt;
||Use TLS 1.2 or later for all web communications &lt;br /&gt;
Buy extended validation (EV) certificates for public web servers&lt;br /&gt;
&lt;br /&gt;
''Tip: Use TLS 1.2 always – even internally. Most snooping is done within corporate networks – and it is as easy and unethical as fishing with dynamite.''&lt;br /&gt;
||Mandate strong encrypted communications between web and database servers and any other servers or administrative users&lt;br /&gt;
||Mandate strong encrypted communications with application servers and any other servers or administrative users&lt;br /&gt;
&lt;br /&gt;
||''4.3.1 SSL/TLS Testing (OWASP-CM-001)''&lt;br /&gt;
''4.4.1 Credentials transport over an encrypted channel (OWASP-AT-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A10 Unvalidated Redirects and Forwards'''&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Use random indirect object references for redirection parameters&lt;br /&gt;
&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
Obtain direct redirection parameter from random indirect reference access map&lt;br /&gt;
(LR) Positive validation of redirection parameter &lt;br /&gt;
(NR) Java – Do not forward() requests as this prevents SSO access control mechanisms &lt;br /&gt;
&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Andrew van der Stock vanderaj[at]owasp.org&lt;br /&gt;
&lt;br /&gt;
Ismael Rocha Gonçalves ismaelrg[at]gmail.com&lt;br /&gt;
&lt;br /&gt;
= Other Cheatsheets =&lt;br /&gt;
{{Cheatsheet_Navigation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137271</id>
		<title>OWASP Top Ten Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137271"/>
				<updated>2012-10-08T20:29:56Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The following is a developer-centric defensive cheat sheet for the [[OWASP Top Ten Project]]. It also presents a quick reference based on [[OWASP Testing Project]] to help how to identify the risks.&lt;br /&gt;
&lt;br /&gt;
= OWASP Top Ten Cheat Sheet =&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
| &lt;br /&gt;
||'''Presentation'''&lt;br /&gt;
||'''Controller'''&lt;br /&gt;
||'''Model'''&lt;br /&gt;
||'''Testing (OWASP Testing Guide V3)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A1 Injection'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
Set a correct content type&lt;br /&gt;
Set safe character set (UTF-8)&lt;br /&gt;
Set correct locale&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
Enforce input field type and lengths &lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation.&lt;br /&gt;
(LR) Sanitize input.&lt;br /&gt;
&lt;br /&gt;
''Tip: updating a negative list (such as looking for &amp;quot;script&amp;quot;, &amp;quot;sCrIpT&amp;quot;, &amp;quot;ßCrîpt&amp;quot;, etc) will require expensive and constant deployments and will '''always '''fail as attackers work out your list of &amp;quot;bad&amp;quot; words. Positive validation is simpler, faster and usually more secure and needs updating far less than any other validation mechanism. ''&lt;br /&gt;
||'''[https://www.owasp.org/index.php/Query_Parameterization_Cheat_Sheet Parameterized queries]'''&lt;br /&gt;
&lt;br /&gt;
Object relational model (Hibernate).&lt;br /&gt;
Active Record design pattern.&lt;br /&gt;
Stored procedures.&lt;br /&gt;
Escape mechanisms such as ESAPI's Encoder, EncodeForLDAP() or Encoder.EncodeforOS()&lt;br /&gt;
&lt;br /&gt;
''Tip: '''All '''SQL Injection is due to dynamic SQL queries. Strongly consider prohibiting dynamic SQL queries within your organization ''&lt;br /&gt;
&lt;br /&gt;
||''4.8.5 SQL Injection (OWASP-DV-005)''&lt;br /&gt;
''4.8.6 LDAP Injection (OWASP-DV-006)''&lt;br /&gt;
''4.8.7 ORM Injection (OWASP-DV-007)''&lt;br /&gt;
''4.8.8 XML Injection (OWASP-DV-008)''&lt;br /&gt;
''4.8.9 SSI Injection (OWASP-DV-009)''&lt;br /&gt;
''4.8.10 XPath Injection (OWASP-DV-010)''&lt;br /&gt;
''4.8.11 IMAP/SMTP Injection (OWASP-DV-011)''&lt;br /&gt;
''4.8.12 Code Injection (OWASP-DV-012)''&lt;br /&gt;
''4.8.13 OS Commanding (OWASP-DV-013)''&lt;br /&gt;
''4.8.14 Buffer overflow (OWASP-DV-014)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A2 XSS'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Set correct content type'''&lt;br /&gt;
'''Set safe character set (UTF-8) '''&lt;br /&gt;
'''Set correct locale'''&lt;br /&gt;
'''Output encode all user data as per output context'''&lt;br /&gt;
'''Set input constraints '''&lt;br /&gt;
&lt;br /&gt;
''On Submit''&lt;br /&gt;
Enforce input field type and lengths&lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation &lt;br /&gt;
(LR) Sanitize input &lt;br /&gt;
&lt;br /&gt;
''Tip: Only process data that is 100% trustworthy. Everything else is hostile and should be rejected.''&lt;br /&gt;
||''Tip: Do not store data HTML encoded in the database. This prevents new uses for the data, such as web services, RSS feeds, FTP batches, data warehousing, cloud computing, and so on.''&lt;br /&gt;
&lt;br /&gt;
''Tip: Use OWASP Scrubbr to clean tainted or hostile data from legacy data''&lt;br /&gt;
&lt;br /&gt;
||''4.8.1 Testing for Reflected Cross Site Scripting (OWASP-DV-001)''&lt;br /&gt;
''4.8.2 Testing for Stored Cross Site Scripting (OWASP-DV-002)''&lt;br /&gt;
''4.8.3 Testing for DOM based Cross Site Scripting (OWASP-DV-003)''&lt;br /&gt;
''4.8.4 Testing for Cross Site Flashing (OWASP-DV004)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A3 Weak authentication and session management'''&lt;br /&gt;
||''Render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient for this view'''&lt;br /&gt;
'''Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies'''&lt;br /&gt;
Send CSRF token with forms&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Only use inbuilt session management'''&lt;br /&gt;
'''Store secondary SSO / framework / custom session identifiers in native session object – do not send as additional headers or cookies'''&lt;br /&gt;
&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform this action'''&lt;br /&gt;
Validate CSRF token&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
''Tip: Consider the use of a &amp;quot;governor&amp;quot; to regulate the maximum number of requests per second / minute / hour that this user may perform. For example, a typical banking user should not perform more than ten transactions a minute, and one hundred per second is dangerous and should be blocked.''&lt;br /&gt;
&lt;br /&gt;
||''4.4.2 Testing for user enumeration (OWASP-AT-002)''&lt;br /&gt;
''4.4.3 Testing for Guessable (Dictionary) User Account (OWASP-AT-003)''&lt;br /&gt;
''4.4.4 Brute Force Testing (OWASP-AT-004)''&lt;br /&gt;
''4.4.6 Testing for vulnerable remember password and pwd reset (OWASP-AT-006)''&lt;br /&gt;
''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.4.7 Testing for Logout and Browser Cache Management (OWASP-AT-007)''&lt;br /&gt;
''4.4.8 Testing for CAPTCHA (OWASP-AT-008)''&lt;br /&gt;
''4.4.9 Testing Multiple Factors Authentication (OWASP-AT-009)''&lt;br /&gt;
''4.4.10 Testing for Race Conditions (OWASP-AT-010)''&lt;br /&gt;
''4.5.1 Testing for Session Management Schema (OWASP-SM-001)''&lt;br /&gt;
''4.5.2 Testing for Cookies attributes (OWASP-SM-002)''&lt;br /&gt;
''4.5.3 Testing for Session Fixation (OWASP-SM_003)''&lt;br /&gt;
''4.5.4 Testing for Exposed Session Variables (OWASP-SM-004)''&lt;br /&gt;
''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
''4.6.3 Testing for Privilege Escalation (OWASP-AZ-003)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A4 Insecure Direct Object Reference'''&lt;br /&gt;
||'''If data is from internal trusted sources, no data is sent'''&lt;br /&gt;
&lt;br /&gt;
''Or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send indirect random access reference map value'''&lt;br /&gt;
||'''Obtain data from internal, trusted sources'''&lt;br /&gt;
&lt;br /&gt;
''Or ''&lt;br /&gt;
&lt;br /&gt;
'''Obtain direct value from random access reference access map'''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A5 Cross Site Request Forgery'''&lt;br /&gt;
||''Pre-render''&lt;br /&gt;
Validate user is authenticated&lt;br /&gt;
Validate role is sufficient for this view&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies&lt;br /&gt;
||'''Validate CSRF token'''&lt;br /&gt;
Validate role is sufficient to perform this action&lt;br /&gt;
Validate role is sufficient &lt;br /&gt;
&lt;br /&gt;
''Tip: CSRF is '''always '''possible if there is XSS, so make sure XSS is eliminated within your application.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A6 Security Misconfiguration'''&lt;br /&gt;
||Ensure web servers and application servers are hardened&lt;br /&gt;
&lt;br /&gt;
PHP – Ensure allow_url_fopen and allow_url_include are both disabled in php.ini. Consider the use of Suhosin extension &lt;br /&gt;
||Ensure web servers and application servers are hardened &lt;br /&gt;
&lt;br /&gt;
XML – Ensure common web attacks (remote XSLT transforms, hostile XPath queries, recursive DTDs, and so on) are protected by your XML stack. Do not hand craft XML documents or queries – use the XML layer. &lt;br /&gt;
||Ensure database servers are hardened &lt;br /&gt;
&lt;br /&gt;
||''4.2.6 Analysis of Error Codes (OWASP-IG-006)''&lt;br /&gt;
''4.3.2 DB Listener Testing (OWASP-CM-002)''&lt;br /&gt;
''4.3.3 Infrastructure Configuration Management Testing (OWASP-CM-003)''&lt;br /&gt;
''4.3.4 Application Configuration Management Testing (OWASP-CM-004)''&lt;br /&gt;
''4.3.5 Testing for File Extensions Handling (OWASP-CM-005)''&lt;br /&gt;
''4.3.6 Old, Backup and Unreferenced Files (OWASP-CM-006)''&lt;br /&gt;
''4.3.7 Infrastructure and Application Admin Interfaces (OWASP-CM-007)''&lt;br /&gt;
''4.3.8 Testing for HTTP Methods and XST (OWASP-CM-008)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A7 Insufficient Cryptographic Storage'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Do not send keys or hashes to the browser&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Tip: Only certain personally identifiable information and sensitive values MUST be encrypted. Encrypt data that would be embarrassing or costly if it was leaked or stolen. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: It is best to encrypt data on the application server, rather than the database server.''&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
&lt;br /&gt;
''Tip: Do not use RDBMS database, row or table level encryption. The data can be retrieved in the clear by anyone with direct access to the server, or over the network using the application credentials. It might even traverse the network in the clear despite being &amp;quot;encrypted&amp;quot; on disk. ''&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A8 Failure to Restrict URL access'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Ensure all non-web data is outside the web root (logs, configuration, etc)'''&lt;br /&gt;
'''Use octet byte streaming instead of providing access to real files such as PDFs or CSVs or similar'''&lt;br /&gt;
'''Ensure every page requires a role, even if it is &amp;quot;guest&amp;quot;'''&lt;br /&gt;
''	''&lt;br /&gt;
''Pre-render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to view secured URL'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
||'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform secured action'''&lt;br /&gt;
'''Validate CSRF token'''&lt;br /&gt;
&lt;br /&gt;
''Tip: It's impossible to control access to secured resources that the web application server does not directly serve. Therefore, PDF reports or similar should be served by the web application server using binary octet streaming. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: Assume attackers '''will''' learn where &amp;quot;hidden&amp;quot; directories and &amp;quot;random&amp;quot; filenames are, so do not store these files in the web root, even if they are not directly linked.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A9 Insufficient Transport Layer Protection'''&lt;br /&gt;
||Use TLS 1.2 or later for all web communications &lt;br /&gt;
Buy extended validation (EV) certificates for public web servers&lt;br /&gt;
&lt;br /&gt;
''Tip: Use TLS 1.2 always – even internally. Most snooping is done within corporate networks – and it is as easy and unethical as fishing with dynamite.''&lt;br /&gt;
||Mandate strong encrypted communications between web and database servers and any other servers or administrative users&lt;br /&gt;
||Mandate strong encrypted communications with application servers and any other servers or administrative users&lt;br /&gt;
&lt;br /&gt;
||''4.3.1 SSL/TLS Testing (OWASP-CM-001)''&lt;br /&gt;
''4.4.1 Credentials transport over an encrypted channel (OWASP-AT-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A10 Unvalidated Redirects and Forwards'''&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Use random indirect object references for redirection parameters&lt;br /&gt;
&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
Obtain direct redirection parameter from random indirect reference access map&lt;br /&gt;
(LR) Positive validation of redirection parameter &lt;br /&gt;
(NR) Java – Do not forward() requests as this prevents SSO access control mechanisms &lt;br /&gt;
&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Andrew van der Stock vanderaj[at]owasp.org&lt;br /&gt;
&lt;br /&gt;
Ismael Rocha Gonçalves ismaelrg[at]gmail.com&lt;br /&gt;
&lt;br /&gt;
= Other Cheatsheets =&lt;br /&gt;
{{Cheatsheet_Navigation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137270</id>
		<title>OWASP Top Ten Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137270"/>
				<updated>2012-10-08T20:29:20Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The following is a developer-centric defensive cheat sheet for the [[OWASP Top Ten Project]]. It also presents a quick reference based on [[OWASP Testing Project]] to help how to identify the risks.&lt;br /&gt;
&lt;br /&gt;
= OWASP Top Ten Cheat Sheet =&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
| &lt;br /&gt;
||'''Presentation'''&lt;br /&gt;
||'''Controller'''&lt;br /&gt;
||'''Model'''&lt;br /&gt;
||'''Testing (OWASP Testing Guide V3)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A1 Injection'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
Set a correct content type&lt;br /&gt;
Set safe character set (UTF-8)&lt;br /&gt;
Set correct locale&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
Enforce input field type and lengths &lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation.&lt;br /&gt;
(LR) Sanitize input.&lt;br /&gt;
&lt;br /&gt;
''Tip: updating a negative list (such as looking for &amp;quot;script&amp;quot;, &amp;quot;sCrIpT&amp;quot;, &amp;quot;ßCrîpt&amp;quot;, etc) will require expensive and constant deployments and will '''always '''fail as attackers work out your list of &amp;quot;bad&amp;quot; words. Positive validation is simpler, faster and usually more secure and needs updating far less than any other validation mechanism. ''&lt;br /&gt;
||'''[https://www.owasp.org/index.php/Query_Parameterization_Cheat_Sheet Parameterized queries]'''&lt;br /&gt;
''Object relational model (Hibernate).''&lt;br /&gt;
''Active Record design pattern.''&lt;br /&gt;
''Stored procedures.''&lt;br /&gt;
Escape mechanisms such as ESAPI's Encoder, EncodeForLDAP() or Encoder.EncodeforOS()&lt;br /&gt;
&lt;br /&gt;
''Tip: '''All '''SQL Injection is due to dynamic SQL queries. Strongly consider prohibiting dynamic SQL queries within your organization ''&lt;br /&gt;
&lt;br /&gt;
||''4.8.5 SQL Injection (OWASP-DV-005)''&lt;br /&gt;
''4.8.6 LDAP Injection (OWASP-DV-006)''&lt;br /&gt;
''4.8.7 ORM Injection (OWASP-DV-007)''&lt;br /&gt;
''4.8.8 XML Injection (OWASP-DV-008)''&lt;br /&gt;
''4.8.9 SSI Injection (OWASP-DV-009)''&lt;br /&gt;
''4.8.10 XPath Injection (OWASP-DV-010)''&lt;br /&gt;
''4.8.11 IMAP/SMTP Injection (OWASP-DV-011)''&lt;br /&gt;
''4.8.12 Code Injection (OWASP-DV-012)''&lt;br /&gt;
''4.8.13 OS Commanding (OWASP-DV-013)''&lt;br /&gt;
''4.8.14 Buffer overflow (OWASP-DV-014)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A2 XSS'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Set correct content type'''&lt;br /&gt;
'''Set safe character set (UTF-8) '''&lt;br /&gt;
'''Set correct locale'''&lt;br /&gt;
'''Output encode all user data as per output context'''&lt;br /&gt;
'''Set input constraints '''&lt;br /&gt;
&lt;br /&gt;
''On Submit''&lt;br /&gt;
Enforce input field type and lengths&lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation &lt;br /&gt;
(LR) Sanitize input &lt;br /&gt;
&lt;br /&gt;
''Tip: Only process data that is 100% trustworthy. Everything else is hostile and should be rejected.''&lt;br /&gt;
||''Tip: Do not store data HTML encoded in the database. This prevents new uses for the data, such as web services, RSS feeds, FTP batches, data warehousing, cloud computing, and so on.''&lt;br /&gt;
&lt;br /&gt;
''Tip: Use OWASP Scrubbr to clean tainted or hostile data from legacy data''&lt;br /&gt;
&lt;br /&gt;
||''4.8.1 Testing for Reflected Cross Site Scripting (OWASP-DV-001)''&lt;br /&gt;
''4.8.2 Testing for Stored Cross Site Scripting (OWASP-DV-002)''&lt;br /&gt;
''4.8.3 Testing for DOM based Cross Site Scripting (OWASP-DV-003)''&lt;br /&gt;
''4.8.4 Testing for Cross Site Flashing (OWASP-DV004)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A3 Weak authentication and session management'''&lt;br /&gt;
||''Render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient for this view'''&lt;br /&gt;
'''Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies'''&lt;br /&gt;
Send CSRF token with forms&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Only use inbuilt session management'''&lt;br /&gt;
'''Store secondary SSO / framework / custom session identifiers in native session object – do not send as additional headers or cookies'''&lt;br /&gt;
&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform this action'''&lt;br /&gt;
Validate CSRF token&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
''Tip: Consider the use of a &amp;quot;governor&amp;quot; to regulate the maximum number of requests per second / minute / hour that this user may perform. For example, a typical banking user should not perform more than ten transactions a minute, and one hundred per second is dangerous and should be blocked.''&lt;br /&gt;
&lt;br /&gt;
||''4.4.2 Testing for user enumeration (OWASP-AT-002)''&lt;br /&gt;
''4.4.3 Testing for Guessable (Dictionary) User Account (OWASP-AT-003)''&lt;br /&gt;
''4.4.4 Brute Force Testing (OWASP-AT-004)''&lt;br /&gt;
''4.4.6 Testing for vulnerable remember password and pwd reset (OWASP-AT-006)''&lt;br /&gt;
''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.4.7 Testing for Logout and Browser Cache Management (OWASP-AT-007)''&lt;br /&gt;
''4.4.8 Testing for CAPTCHA (OWASP-AT-008)''&lt;br /&gt;
''4.4.9 Testing Multiple Factors Authentication (OWASP-AT-009)''&lt;br /&gt;
''4.4.10 Testing for Race Conditions (OWASP-AT-010)''&lt;br /&gt;
''4.5.1 Testing for Session Management Schema (OWASP-SM-001)''&lt;br /&gt;
''4.5.2 Testing for Cookies attributes (OWASP-SM-002)''&lt;br /&gt;
''4.5.3 Testing for Session Fixation (OWASP-SM_003)''&lt;br /&gt;
''4.5.4 Testing for Exposed Session Variables (OWASP-SM-004)''&lt;br /&gt;
''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
''4.6.3 Testing for Privilege Escalation (OWASP-AZ-003)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A4 Insecure Direct Object Reference'''&lt;br /&gt;
||'''If data is from internal trusted sources, no data is sent'''&lt;br /&gt;
&lt;br /&gt;
''Or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send indirect random access reference map value'''&lt;br /&gt;
||'''Obtain data from internal, trusted sources'''&lt;br /&gt;
&lt;br /&gt;
''Or ''&lt;br /&gt;
&lt;br /&gt;
'''Obtain direct value from random access reference access map'''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A5 Cross Site Request Forgery'''&lt;br /&gt;
||''Pre-render''&lt;br /&gt;
Validate user is authenticated&lt;br /&gt;
Validate role is sufficient for this view&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies&lt;br /&gt;
||'''Validate CSRF token'''&lt;br /&gt;
Validate role is sufficient to perform this action&lt;br /&gt;
Validate role is sufficient &lt;br /&gt;
&lt;br /&gt;
''Tip: CSRF is '''always '''possible if there is XSS, so make sure XSS is eliminated within your application.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A6 Security Misconfiguration'''&lt;br /&gt;
||Ensure web servers and application servers are hardened&lt;br /&gt;
&lt;br /&gt;
PHP – Ensure allow_url_fopen and allow_url_include are both disabled in php.ini. Consider the use of Suhosin extension &lt;br /&gt;
||Ensure web servers and application servers are hardened &lt;br /&gt;
&lt;br /&gt;
XML – Ensure common web attacks (remote XSLT transforms, hostile XPath queries, recursive DTDs, and so on) are protected by your XML stack. Do not hand craft XML documents or queries – use the XML layer. &lt;br /&gt;
||Ensure database servers are hardened &lt;br /&gt;
&lt;br /&gt;
||''4.2.6 Analysis of Error Codes (OWASP-IG-006)''&lt;br /&gt;
''4.3.2 DB Listener Testing (OWASP-CM-002)''&lt;br /&gt;
''4.3.3 Infrastructure Configuration Management Testing (OWASP-CM-003)''&lt;br /&gt;
''4.3.4 Application Configuration Management Testing (OWASP-CM-004)''&lt;br /&gt;
''4.3.5 Testing for File Extensions Handling (OWASP-CM-005)''&lt;br /&gt;
''4.3.6 Old, Backup and Unreferenced Files (OWASP-CM-006)''&lt;br /&gt;
''4.3.7 Infrastructure and Application Admin Interfaces (OWASP-CM-007)''&lt;br /&gt;
''4.3.8 Testing for HTTP Methods and XST (OWASP-CM-008)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A7 Insufficient Cryptographic Storage'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Do not send keys or hashes to the browser&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Tip: Only certain personally identifiable information and sensitive values MUST be encrypted. Encrypt data that would be embarrassing or costly if it was leaked or stolen. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: It is best to encrypt data on the application server, rather than the database server.''&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
&lt;br /&gt;
''Tip: Do not use RDBMS database, row or table level encryption. The data can be retrieved in the clear by anyone with direct access to the server, or over the network using the application credentials. It might even traverse the network in the clear despite being &amp;quot;encrypted&amp;quot; on disk. ''&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A8 Failure to Restrict URL access'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Ensure all non-web data is outside the web root (logs, configuration, etc)'''&lt;br /&gt;
'''Use octet byte streaming instead of providing access to real files such as PDFs or CSVs or similar'''&lt;br /&gt;
'''Ensure every page requires a role, even if it is &amp;quot;guest&amp;quot;'''&lt;br /&gt;
''	''&lt;br /&gt;
''Pre-render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to view secured URL'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
||'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform secured action'''&lt;br /&gt;
'''Validate CSRF token'''&lt;br /&gt;
&lt;br /&gt;
''Tip: It's impossible to control access to secured resources that the web application server does not directly serve. Therefore, PDF reports or similar should be served by the web application server using binary octet streaming. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: Assume attackers '''will''' learn where &amp;quot;hidden&amp;quot; directories and &amp;quot;random&amp;quot; filenames are, so do not store these files in the web root, even if they are not directly linked.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A9 Insufficient Transport Layer Protection'''&lt;br /&gt;
||Use TLS 1.2 or later for all web communications &lt;br /&gt;
Buy extended validation (EV) certificates for public web servers&lt;br /&gt;
&lt;br /&gt;
''Tip: Use TLS 1.2 always – even internally. Most snooping is done within corporate networks – and it is as easy and unethical as fishing with dynamite.''&lt;br /&gt;
||Mandate strong encrypted communications between web and database servers and any other servers or administrative users&lt;br /&gt;
||Mandate strong encrypted communications with application servers and any other servers or administrative users&lt;br /&gt;
&lt;br /&gt;
||''4.3.1 SSL/TLS Testing (OWASP-CM-001)''&lt;br /&gt;
''4.4.1 Credentials transport over an encrypted channel (OWASP-AT-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A10 Unvalidated Redirects and Forwards'''&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Use random indirect object references for redirection parameters&lt;br /&gt;
&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
Obtain direct redirection parameter from random indirect reference access map&lt;br /&gt;
(LR) Positive validation of redirection parameter &lt;br /&gt;
(NR) Java – Do not forward() requests as this prevents SSO access control mechanisms &lt;br /&gt;
&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Andrew van der Stock vanderaj[at]owasp.org&lt;br /&gt;
&lt;br /&gt;
Ismael Rocha Gonçalves ismaelrg[at]gmail.com&lt;br /&gt;
&lt;br /&gt;
= Other Cheatsheets =&lt;br /&gt;
{{Cheatsheet_Navigation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137269</id>
		<title>OWASP Top Ten Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137269"/>
				<updated>2012-10-08T20:28:12Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The following is a developer-centric defensive cheat sheet for the [[OWASP Top Ten Project]]. It also presents a quick reference based on [[OWASP Testing Project]] to help how to identify the risks.&lt;br /&gt;
&lt;br /&gt;
= OWASP Top Ten Cheat Sheet =&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
| &lt;br /&gt;
||'''Presentation'''&lt;br /&gt;
||'''Controller'''&lt;br /&gt;
||'''Model'''&lt;br /&gt;
||'''Testing (OWASP Testing Guide V3)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A1 Injection'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
Set a correct content type&lt;br /&gt;
Set safe character set (UTF-8)&lt;br /&gt;
Set correct locale&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
Enforce input field type and lengths &lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation &lt;br /&gt;
(LR) Sanitize input &lt;br /&gt;
&lt;br /&gt;
''Tip: updating a negative list (such as looking for &amp;quot;script&amp;quot;, &amp;quot;sCrIpT&amp;quot;, &amp;quot;ßCrîpt&amp;quot;, etc) will require expensive and constant deployments and will '''always '''fail as attackers work out your list of &amp;quot;bad&amp;quot; words. Positive validation is simpler, faster and usually more secure and needs updating far less than any other validation mechanism. ''&lt;br /&gt;
||'''[https://www.owasp.org/index.php/Query_Parameterization_Cheat_Sheet Parameterized queries]'''&lt;br /&gt;
Object relational model (Hibernate).&lt;br /&gt;
&lt;br /&gt;
Active Record design pattern.&lt;br /&gt;
&lt;br /&gt;
Stored procedures.&lt;br /&gt;
&lt;br /&gt;
Escape mechanisms such as ESAPI's Encoder, EncodeForLDAP() or Encoder.EncodeforOS()&lt;br /&gt;
&lt;br /&gt;
''Tip: '''All '''SQL Injection is due to dynamic SQL queries. Strongly consider prohibiting dynamic SQL queries within your organization ''&lt;br /&gt;
&lt;br /&gt;
||''4.8.5 SQL Injection (OWASP-DV-005)''&lt;br /&gt;
''4.8.6 LDAP Injection (OWASP-DV-006)''&lt;br /&gt;
''4.8.7 ORM Injection (OWASP-DV-007)''&lt;br /&gt;
''4.8.8 XML Injection (OWASP-DV-008)''&lt;br /&gt;
''4.8.9 SSI Injection (OWASP-DV-009)''&lt;br /&gt;
''4.8.10 XPath Injection (OWASP-DV-010)''&lt;br /&gt;
''4.8.11 IMAP/SMTP Injection (OWASP-DV-011)''&lt;br /&gt;
''4.8.12 Code Injection (OWASP-DV-012)''&lt;br /&gt;
''4.8.13 OS Commanding (OWASP-DV-013)''&lt;br /&gt;
''4.8.14 Buffer overflow (OWASP-DV-014)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A2 XSS'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Set correct content type'''&lt;br /&gt;
'''Set safe character set (UTF-8) '''&lt;br /&gt;
'''Set correct locale'''&lt;br /&gt;
'''Output encode all user data as per output context'''&lt;br /&gt;
'''Set input constraints '''&lt;br /&gt;
&lt;br /&gt;
''On Submit''&lt;br /&gt;
Enforce input field type and lengths&lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation &lt;br /&gt;
(LR) Sanitize input &lt;br /&gt;
&lt;br /&gt;
''Tip: Only process data that is 100% trustworthy. Everything else is hostile and should be rejected.''&lt;br /&gt;
||''Tip: Do not store data HTML encoded in the database. This prevents new uses for the data, such as web services, RSS feeds, FTP batches, data warehousing, cloud computing, and so on.''&lt;br /&gt;
&lt;br /&gt;
''Tip: Use OWASP Scrubbr to clean tainted or hostile data from legacy data''&lt;br /&gt;
&lt;br /&gt;
||''4.8.1 Testing for Reflected Cross Site Scripting (OWASP-DV-001)''&lt;br /&gt;
''4.8.2 Testing for Stored Cross Site Scripting (OWASP-DV-002)''&lt;br /&gt;
''4.8.3 Testing for DOM based Cross Site Scripting (OWASP-DV-003)''&lt;br /&gt;
''4.8.4 Testing for Cross Site Flashing (OWASP-DV004)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A3 Weak authentication and session management'''&lt;br /&gt;
||''Render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient for this view'''&lt;br /&gt;
'''Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies'''&lt;br /&gt;
Send CSRF token with forms&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Only use inbuilt session management'''&lt;br /&gt;
'''Store secondary SSO / framework / custom session identifiers in native session object – do not send as additional headers or cookies'''&lt;br /&gt;
&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform this action'''&lt;br /&gt;
Validate CSRF token&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
''Tip: Consider the use of a &amp;quot;governor&amp;quot; to regulate the maximum number of requests per second / minute / hour that this user may perform. For example, a typical banking user should not perform more than ten transactions a minute, and one hundred per second is dangerous and should be blocked.''&lt;br /&gt;
&lt;br /&gt;
||''4.4.2 Testing for user enumeration (OWASP-AT-002)''&lt;br /&gt;
''4.4.3 Testing for Guessable (Dictionary) User Account (OWASP-AT-003)''&lt;br /&gt;
''4.4.4 Brute Force Testing (OWASP-AT-004)''&lt;br /&gt;
''4.4.6 Testing for vulnerable remember password and pwd reset (OWASP-AT-006)''&lt;br /&gt;
''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.4.7 Testing for Logout and Browser Cache Management (OWASP-AT-007)''&lt;br /&gt;
''4.4.8 Testing for CAPTCHA (OWASP-AT-008)''&lt;br /&gt;
''4.4.9 Testing Multiple Factors Authentication (OWASP-AT-009)''&lt;br /&gt;
''4.4.10 Testing for Race Conditions (OWASP-AT-010)''&lt;br /&gt;
''4.5.1 Testing for Session Management Schema (OWASP-SM-001)''&lt;br /&gt;
''4.5.2 Testing for Cookies attributes (OWASP-SM-002)''&lt;br /&gt;
''4.5.3 Testing for Session Fixation (OWASP-SM_003)''&lt;br /&gt;
''4.5.4 Testing for Exposed Session Variables (OWASP-SM-004)''&lt;br /&gt;
''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
''4.6.3 Testing for Privilege Escalation (OWASP-AZ-003)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A4 Insecure Direct Object Reference'''&lt;br /&gt;
||'''If data is from internal trusted sources, no data is sent'''&lt;br /&gt;
&lt;br /&gt;
''Or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send indirect random access reference map value'''&lt;br /&gt;
||'''Obtain data from internal, trusted sources'''&lt;br /&gt;
&lt;br /&gt;
''Or ''&lt;br /&gt;
&lt;br /&gt;
'''Obtain direct value from random access reference access map'''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A5 Cross Site Request Forgery'''&lt;br /&gt;
||''Pre-render''&lt;br /&gt;
Validate user is authenticated&lt;br /&gt;
Validate role is sufficient for this view&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies&lt;br /&gt;
||'''Validate CSRF token'''&lt;br /&gt;
Validate role is sufficient to perform this action&lt;br /&gt;
Validate role is sufficient &lt;br /&gt;
&lt;br /&gt;
''Tip: CSRF is '''always '''possible if there is XSS, so make sure XSS is eliminated within your application.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A6 Security Misconfiguration'''&lt;br /&gt;
||Ensure web servers and application servers are hardened&lt;br /&gt;
&lt;br /&gt;
PHP – Ensure allow_url_fopen and allow_url_include are both disabled in php.ini. Consider the use of Suhosin extension &lt;br /&gt;
||Ensure web servers and application servers are hardened &lt;br /&gt;
&lt;br /&gt;
XML – Ensure common web attacks (remote XSLT transforms, hostile XPath queries, recursive DTDs, and so on) are protected by your XML stack. Do not hand craft XML documents or queries – use the XML layer. &lt;br /&gt;
||Ensure database servers are hardened &lt;br /&gt;
&lt;br /&gt;
||''4.2.6 Analysis of Error Codes (OWASP-IG-006)''&lt;br /&gt;
''4.3.2 DB Listener Testing (OWASP-CM-002)''&lt;br /&gt;
''4.3.3 Infrastructure Configuration Management Testing (OWASP-CM-003)''&lt;br /&gt;
''4.3.4 Application Configuration Management Testing (OWASP-CM-004)''&lt;br /&gt;
''4.3.5 Testing for File Extensions Handling (OWASP-CM-005)''&lt;br /&gt;
''4.3.6 Old, Backup and Unreferenced Files (OWASP-CM-006)''&lt;br /&gt;
''4.3.7 Infrastructure and Application Admin Interfaces (OWASP-CM-007)''&lt;br /&gt;
''4.3.8 Testing for HTTP Methods and XST (OWASP-CM-008)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A7 Insufficient Cryptographic Storage'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Do not send keys or hashes to the browser&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Tip: Only certain personally identifiable information and sensitive values MUST be encrypted. Encrypt data that would be embarrassing or costly if it was leaked or stolen. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: It is best to encrypt data on the application server, rather than the database server.''&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
&lt;br /&gt;
''Tip: Do not use RDBMS database, row or table level encryption. The data can be retrieved in the clear by anyone with direct access to the server, or over the network using the application credentials. It might even traverse the network in the clear despite being &amp;quot;encrypted&amp;quot; on disk. ''&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A8 Failure to Restrict URL access'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Ensure all non-web data is outside the web root (logs, configuration, etc)'''&lt;br /&gt;
'''Use octet byte streaming instead of providing access to real files such as PDFs or CSVs or similar'''&lt;br /&gt;
'''Ensure every page requires a role, even if it is &amp;quot;guest&amp;quot;'''&lt;br /&gt;
''	''&lt;br /&gt;
''Pre-render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to view secured URL'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
||'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform secured action'''&lt;br /&gt;
'''Validate CSRF token'''&lt;br /&gt;
&lt;br /&gt;
''Tip: It's impossible to control access to secured resources that the web application server does not directly serve. Therefore, PDF reports or similar should be served by the web application server using binary octet streaming. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: Assume attackers '''will''' learn where &amp;quot;hidden&amp;quot; directories and &amp;quot;random&amp;quot; filenames are, so do not store these files in the web root, even if they are not directly linked.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A9 Insufficient Transport Layer Protection'''&lt;br /&gt;
||Use TLS 1.2 or later for all web communications &lt;br /&gt;
Buy extended validation (EV) certificates for public web servers&lt;br /&gt;
&lt;br /&gt;
''Tip: Use TLS 1.2 always – even internally. Most snooping is done within corporate networks – and it is as easy and unethical as fishing with dynamite.''&lt;br /&gt;
||Mandate strong encrypted communications between web and database servers and any other servers or administrative users&lt;br /&gt;
||Mandate strong encrypted communications with application servers and any other servers or administrative users&lt;br /&gt;
&lt;br /&gt;
||''4.3.1 SSL/TLS Testing (OWASP-CM-001)''&lt;br /&gt;
''4.4.1 Credentials transport over an encrypted channel (OWASP-AT-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A10 Unvalidated Redirects and Forwards'''&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Use random indirect object references for redirection parameters&lt;br /&gt;
&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
Obtain direct redirection parameter from random indirect reference access map&lt;br /&gt;
(LR) Positive validation of redirection parameter &lt;br /&gt;
(NR) Java – Do not forward() requests as this prevents SSO access control mechanisms &lt;br /&gt;
&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Andrew van der Stock vanderaj[at]owasp.org&lt;br /&gt;
&lt;br /&gt;
Ismael Rocha Gonçalves ismaelrg[at]gmail.com&lt;br /&gt;
&lt;br /&gt;
= Other Cheatsheets =&lt;br /&gt;
{{Cheatsheet_Navigation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137268</id>
		<title>OWASP Top Ten Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Top_Ten_Cheat_Sheet&amp;diff=137268"/>
				<updated>2012-10-08T20:27:31Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The following is a developer-centric defensive cheat sheet for the [[OWASP Top Ten Project]]. It also presents a quick reference based on [[OWASP Testing Project]] to help how to identify the risks.&lt;br /&gt;
&lt;br /&gt;
= OWASP Top Ten Cheat Sheet =&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
| &lt;br /&gt;
||'''Presentation'''&lt;br /&gt;
||'''Controller'''&lt;br /&gt;
||'''Model'''&lt;br /&gt;
||'''Testing (OWASP Testing Guide V3)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A1 Injection'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render:''&lt;br /&gt;
Set a correct content type&lt;br /&gt;
Set safe character set (UTF-8)&lt;br /&gt;
Set correct locale&lt;br /&gt;
&lt;br /&gt;
''On Submit:''&lt;br /&gt;
Enforce input field type and lengths &lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation &lt;br /&gt;
(LR) Sanitize input &lt;br /&gt;
&lt;br /&gt;
''Tip: updating a negative list (such as looking for &amp;quot;script&amp;quot;, &amp;quot;sCrIpT&amp;quot;, &amp;quot;ßCrîpt&amp;quot;, etc) will require expensive and constant deployments and will '''always '''fail as attackers work out your list of &amp;quot;bad&amp;quot; words. Positive validation is simpler, faster and usually more secure and needs updating far less than any other validation mechanism. ''&lt;br /&gt;
||'''[https://www.owasp.org/index.php/Query_Parameterization_Cheat_Sheet Parameterized queries]'''&lt;br /&gt;
Object relational model (Hibernate).&lt;br /&gt;
Active Record design pattern.&lt;br /&gt;
Stored procedures.&lt;br /&gt;
&lt;br /&gt;
Escape mechanisms such as ESAPI's Encoder, EncodeForLDAP() or Encoder.EncodeforOS()&lt;br /&gt;
&lt;br /&gt;
''Tip: '''All '''SQL Injection is due to dynamic SQL queries. Strongly consider prohibiting dynamic SQL queries within your organization ''&lt;br /&gt;
&lt;br /&gt;
||''4.8.5 SQL Injection (OWASP-DV-005)''&lt;br /&gt;
''4.8.6 LDAP Injection (OWASP-DV-006)''&lt;br /&gt;
''4.8.7 ORM Injection (OWASP-DV-007)''&lt;br /&gt;
''4.8.8 XML Injection (OWASP-DV-008)''&lt;br /&gt;
''4.8.9 SSI Injection (OWASP-DV-009)''&lt;br /&gt;
''4.8.10 XPath Injection (OWASP-DV-010)''&lt;br /&gt;
''4.8.11 IMAP/SMTP Injection (OWASP-DV-011)''&lt;br /&gt;
''4.8.12 Code Injection (OWASP-DV-012)''&lt;br /&gt;
''4.8.13 OS Commanding (OWASP-DV-013)''&lt;br /&gt;
''4.8.14 Buffer overflow (OWASP-DV-014)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A2 XSS'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Set correct content type'''&lt;br /&gt;
'''Set safe character set (UTF-8) '''&lt;br /&gt;
'''Set correct locale'''&lt;br /&gt;
'''Output encode all user data as per output context'''&lt;br /&gt;
'''Set input constraints '''&lt;br /&gt;
&lt;br /&gt;
''On Submit''&lt;br /&gt;
Enforce input field type and lengths&lt;br /&gt;
Validate fields and provide feedback&lt;br /&gt;
Ensure option selects and radio contain only sent values&lt;br /&gt;
||'''Canonicalize using correct character set'''&lt;br /&gt;
'''Positive input validation using correct character set'''&lt;br /&gt;
&lt;br /&gt;
(NR) Negative input validation &lt;br /&gt;
(LR) Sanitize input &lt;br /&gt;
&lt;br /&gt;
''Tip: Only process data that is 100% trustworthy. Everything else is hostile and should be rejected.''&lt;br /&gt;
||''Tip: Do not store data HTML encoded in the database. This prevents new uses for the data, such as web services, RSS feeds, FTP batches, data warehousing, cloud computing, and so on.''&lt;br /&gt;
&lt;br /&gt;
''Tip: Use OWASP Scrubbr to clean tainted or hostile data from legacy data''&lt;br /&gt;
&lt;br /&gt;
||''4.8.1 Testing for Reflected Cross Site Scripting (OWASP-DV-001)''&lt;br /&gt;
''4.8.2 Testing for Stored Cross Site Scripting (OWASP-DV-002)''&lt;br /&gt;
''4.8.3 Testing for DOM based Cross Site Scripting (OWASP-DV-003)''&lt;br /&gt;
''4.8.4 Testing for Cross Site Flashing (OWASP-DV004)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A3 Weak authentication and session management'''&lt;br /&gt;
||''Render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient for this view'''&lt;br /&gt;
'''Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies'''&lt;br /&gt;
Send CSRF token with forms&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Only use inbuilt session management'''&lt;br /&gt;
'''Store secondary SSO / framework / custom session identifiers in native session object – do not send as additional headers or cookies'''&lt;br /&gt;
&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform this action'''&lt;br /&gt;
Validate CSRF token&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
''Tip: Consider the use of a &amp;quot;governor&amp;quot; to regulate the maximum number of requests per second / minute / hour that this user may perform. For example, a typical banking user should not perform more than ten transactions a minute, and one hundred per second is dangerous and should be blocked.''&lt;br /&gt;
&lt;br /&gt;
||''4.4.2 Testing for user enumeration (OWASP-AT-002)''&lt;br /&gt;
''4.4.3 Testing for Guessable (Dictionary) User Account (OWASP-AT-003)''&lt;br /&gt;
''4.4.4 Brute Force Testing (OWASP-AT-004)''&lt;br /&gt;
''4.4.6 Testing for vulnerable remember password and pwd reset (OWASP-AT-006)''&lt;br /&gt;
''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.4.7 Testing for Logout and Browser Cache Management (OWASP-AT-007)''&lt;br /&gt;
''4.4.8 Testing for CAPTCHA (OWASP-AT-008)''&lt;br /&gt;
''4.4.9 Testing Multiple Factors Authentication (OWASP-AT-009)''&lt;br /&gt;
''4.4.10 Testing for Race Conditions (OWASP-AT-010)''&lt;br /&gt;
''4.5.1 Testing for Session Management Schema (OWASP-SM-001)''&lt;br /&gt;
''4.5.2 Testing for Cookies attributes (OWASP-SM-002)''&lt;br /&gt;
''4.5.3 Testing for Session Fixation (OWASP-SM_003)''&lt;br /&gt;
''4.5.4 Testing for Exposed Session Variables (OWASP-SM-004)''&lt;br /&gt;
''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
''4.6.3 Testing for Privilege Escalation (OWASP-AZ-003)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A4 Insecure Direct Object Reference'''&lt;br /&gt;
||'''If data is from internal trusted sources, no data is sent'''&lt;br /&gt;
&lt;br /&gt;
''Or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send indirect random access reference map value'''&lt;br /&gt;
||'''Obtain data from internal, trusted sources'''&lt;br /&gt;
&lt;br /&gt;
''Or ''&lt;br /&gt;
&lt;br /&gt;
'''Obtain direct value from random access reference access map'''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A5 Cross Site Request Forgery'''&lt;br /&gt;
||''Pre-render''&lt;br /&gt;
Validate user is authenticated&lt;br /&gt;
Validate role is sufficient for this view&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
Set &amp;quot;secure&amp;quot; and &amp;quot;HttpOnly&amp;quot; flags for session cookies&lt;br /&gt;
||'''Validate CSRF token'''&lt;br /&gt;
Validate role is sufficient to perform this action&lt;br /&gt;
Validate role is sufficient &lt;br /&gt;
&lt;br /&gt;
''Tip: CSRF is '''always '''possible if there is XSS, so make sure XSS is eliminated within your application.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.5.5 Testing for CSRF (OWASP-SM-005)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A6 Security Misconfiguration'''&lt;br /&gt;
||Ensure web servers and application servers are hardened&lt;br /&gt;
&lt;br /&gt;
PHP – Ensure allow_url_fopen and allow_url_include are both disabled in php.ini. Consider the use of Suhosin extension &lt;br /&gt;
||Ensure web servers and application servers are hardened &lt;br /&gt;
&lt;br /&gt;
XML – Ensure common web attacks (remote XSLT transforms, hostile XPath queries, recursive DTDs, and so on) are protected by your XML stack. Do not hand craft XML documents or queries – use the XML layer. &lt;br /&gt;
||Ensure database servers are hardened &lt;br /&gt;
&lt;br /&gt;
||''4.2.6 Analysis of Error Codes (OWASP-IG-006)''&lt;br /&gt;
''4.3.2 DB Listener Testing (OWASP-CM-002)''&lt;br /&gt;
''4.3.3 Infrastructure Configuration Management Testing (OWASP-CM-003)''&lt;br /&gt;
''4.3.4 Application Configuration Management Testing (OWASP-CM-004)''&lt;br /&gt;
''4.3.5 Testing for File Extensions Handling (OWASP-CM-005)''&lt;br /&gt;
''4.3.6 Old, Backup and Unreferenced Files (OWASP-CM-006)''&lt;br /&gt;
''4.3.7 Infrastructure and Application Admin Interfaces (OWASP-CM-007)''&lt;br /&gt;
''4.3.8 Testing for HTTP Methods and XST (OWASP-CM-008)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A7 Insufficient Cryptographic Storage'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Do not send keys or hashes to the browser&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Use strong ciphers (AES 128 or better)'''&lt;br /&gt;
'''Use strong hashes (SHA 256 or better) with salts for passwords'''&lt;br /&gt;
'''Protect keys more than any other asset'''&lt;br /&gt;
&lt;br /&gt;
''Tip: Only certain personally identifiable information and sensitive values MUST be encrypted. Encrypt data that would be embarrassing or costly if it was leaked or stolen. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: It is best to encrypt data on the application server, rather than the database server.''&lt;br /&gt;
&lt;br /&gt;
||''Design''&lt;br /&gt;
&lt;br /&gt;
''Tip: Do not use RDBMS database, row or table level encryption. The data can be retrieved in the clear by anyone with direct access to the server, or over the network using the application credentials. It might even traverse the network in the clear despite being &amp;quot;encrypted&amp;quot; on disk. ''&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A8 Failure to Restrict URL access'''&lt;br /&gt;
||''Design''&lt;br /&gt;
'''Ensure all non-web data is outside the web root (logs, configuration, etc)'''&lt;br /&gt;
'''Use octet byte streaming instead of providing access to real files such as PDFs or CSVs or similar'''&lt;br /&gt;
'''Ensure every page requires a role, even if it is &amp;quot;guest&amp;quot;'''&lt;br /&gt;
''	''&lt;br /&gt;
''Pre-render''&lt;br /&gt;
'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to view secured URL'''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
'''Send CSRF token '''&lt;br /&gt;
||'''Validate user is authenticated'''&lt;br /&gt;
'''Validate role is sufficient to perform secured action'''&lt;br /&gt;
'''Validate CSRF token'''&lt;br /&gt;
&lt;br /&gt;
''Tip: It's impossible to control access to secured resources that the web application server does not directly serve. Therefore, PDF reports or similar should be served by the web application server using binary octet streaming. ''&lt;br /&gt;
&lt;br /&gt;
''Tip: Assume attackers '''will''' learn where &amp;quot;hidden&amp;quot; directories and &amp;quot;random&amp;quot; filenames are, so do not store these files in the web root, even if they are not directly linked.''&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||''4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)''&lt;br /&gt;
''4.6.1 Testing for Path Traversal (OWASP-AZ-001)''&lt;br /&gt;
''4.6.2 Testing for bypassing authorization schema (OWASP-AZ-002)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A9 Insufficient Transport Layer Protection'''&lt;br /&gt;
||Use TLS 1.2 or later for all web communications &lt;br /&gt;
Buy extended validation (EV) certificates for public web servers&lt;br /&gt;
&lt;br /&gt;
''Tip: Use TLS 1.2 always – even internally. Most snooping is done within corporate networks – and it is as easy and unethical as fishing with dynamite.''&lt;br /&gt;
||Mandate strong encrypted communications between web and database servers and any other servers or administrative users&lt;br /&gt;
||Mandate strong encrypted communications with application servers and any other servers or administrative users&lt;br /&gt;
&lt;br /&gt;
||''4.3.1 SSL/TLS Testing (OWASP-CM-001)''&lt;br /&gt;
''4.4.1 Credentials transport over an encrypted channel (OWASP-AT-001)''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''A10 Unvalidated Redirects and Forwards'''&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
''Render''&lt;br /&gt;
Use random indirect object references for redirection parameters&lt;br /&gt;
&lt;br /&gt;
||'''Design the app without URL redirection parameters'''&lt;br /&gt;
&lt;br /&gt;
''or''&lt;br /&gt;
&lt;br /&gt;
Obtain direct redirection parameter from random indirect reference access map&lt;br /&gt;
(LR) Positive validation of redirection parameter &lt;br /&gt;
(NR) Java – Do not forward() requests as this prevents SSO access control mechanisms &lt;br /&gt;
&lt;br /&gt;
||Validate role is sufficient to create, read, update, or delete data&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Andrew van der Stock vanderaj[at]owasp.org&lt;br /&gt;
&lt;br /&gt;
Ismael Rocha Gonçalves ismaelrg[at]gmail.com&lt;br /&gt;
&lt;br /&gt;
= Other Cheatsheets =&lt;br /&gt;
{{Cheatsheet_Navigation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Web_Services&amp;diff=114619</id>
		<title>Web Services</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Web_Services&amp;diff=114619"/>
				<updated>2011-07-26T16:18:31Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guide Table of Contents|Development Guide Table of Contents]] __TOC__ This section of the Development Guide details the common issues facing Web services developers, and methods to address common issues. Due to the space limitations, it cannot look at all of the surrounding issues in great detail, since each of them deserves a separate book of its own. Instead, an attempt is made to steer the reader to the appropriate usage patterns, and warn about potential roadblocks on the way. &lt;br /&gt;
&lt;br /&gt;
Web Services have received a lot of press, and with that comes a great deal of confusion over what they really are. Some are heralding Web Services as the biggest technology breakthrough since the web itself; others are more skeptical that they are nothing more than evolved web applications. In either case, the issues of web application security apply to web services just as they do to web applications. &lt;br /&gt;
&lt;br /&gt;
== What are Web Services?  ==&lt;br /&gt;
&lt;br /&gt;
Suppose you were making an application that you wanted other applications to be able to communicate with. For example, your Java application has stock information updated every 5 minutes and you would like other applications, ones that may not even exist yet, to be able to use the data. &lt;br /&gt;
&lt;br /&gt;
One way you can do this is to serialize your Java objects and send them over the wire to the application that requests them. The problem with this approach is that a C# application would not be able to use these objects because it serializes and deserializes objects differently than Java. &lt;br /&gt;
&lt;br /&gt;
Another approach you could take is to send a text file filled with data to the application that requests it. This is better because a C# application could read the data. But this has another flaw: Lets assume your stock application is not the only one the C# application needs to interact with. Maybe it needs weather data, local restaurant data, movie data, etc. If every one of these applications uses its own unique file format, it would take considerable research to get the C# application to a working state. &lt;br /&gt;
&lt;br /&gt;
The solution to both of these problems is to send a standard file format. A format that any application can use, regardless of the data being transported. Web Services are this solution. They let any application communicate with any other application without having to consider the language it was developed in or the format of the data. &lt;br /&gt;
&lt;br /&gt;
At the simplest level, web services can be seen as a specialized web application that differs mainly at the presentation tier level. While web applications typically are HTML-based, web services are XML-based. Interactive users for B2C (business to consumer) transactions normally access web applications, while web services are employed as building blocks by other web applications for forming B2B (business to business) chains using the so-called SOA model. Web services typically present a public functional interface, callable in a programmatic fashion, while web applications tend to deal with a richer set of features and are content-driven in most cases. &lt;br /&gt;
&lt;br /&gt;
== Securing Web Services  ==&lt;br /&gt;
&lt;br /&gt;
Web services, like other distributed applications, require protection at multiple levels: &lt;br /&gt;
&lt;br /&gt;
*SOAP messages that are sent on the wire should be delivered confidentially and without tampering&lt;br /&gt;
&lt;br /&gt;
*The server needs to be confident who it is talking to and what the clients are entitled to&lt;br /&gt;
&lt;br /&gt;
*The clients need to know that they are talking to the right server, and not a phishing site (see the Phishing chapter for more information)&lt;br /&gt;
&lt;br /&gt;
*System message logs should contain sufficient information to reliably reconstruct the chain of events and track those back to the authenticated callers&lt;br /&gt;
&lt;br /&gt;
Correspondingly, the high-level approaches to solutions, discussed in the following sections, are valid for pretty much any distributed application, with some variations in the implementation details. &lt;br /&gt;
&lt;br /&gt;
The good news for Web Services developers is that these are infrastructure-level tasks, so, theoretically, it is only the system administrators who should be worrying about these issues. However, for a number of reasons discussed later in this chapter, WS developers usually have to be at least aware of all these risks, and oftentimes they still have to resort to manually coding or tweaking the protection components. &lt;br /&gt;
&lt;br /&gt;
== Communication security  ==&lt;br /&gt;
&lt;br /&gt;
There is a commonly cited statement, and even more often implemented approach &amp;quot;We are using SSL to protect all communication, we are secure&amp;quot;. At the same time, there have been so many articles published on the topic of &amp;quot;channel security vs. token security&amp;quot; that it hardly makes sense to repeat those arguments here. Therefore, listed below is just a brief rundown of most common pitfalls when using channel security alone: &lt;br /&gt;
&lt;br /&gt;
*It provides only &amp;quot;point-to-point&amp;quot; security&lt;br /&gt;
&lt;br /&gt;
Any communication with multiple &amp;quot;hops&amp;quot; requires establishing separate channels (and trusts) between each communicating node along the way. There is also a subtle issue of trust transitivity, as trusts between node pairs {A,B} and {B,C} do not automatically imply {A,C} trust relationship. &lt;br /&gt;
&lt;br /&gt;
*Storage issue&lt;br /&gt;
&lt;br /&gt;
After messages are received on the server (even if it is not the intended recipient), they exist in the clear-text form, at least temporarily. Storing the transmitted information at the intermediate aggravates the problem or destination servers in log files (where it can be browsed by anybody) and local caches. &lt;br /&gt;
&lt;br /&gt;
*Lack of interoperability&lt;br /&gt;
&lt;br /&gt;
While SSL provides a standard mechanism for transport protection, applications then have to utilize highly proprietary mechanisms for transmitting credentials, ensuring freshness, integrity, and confidentiality of data sent over the secure channel. Using a different server, which is semantically equivalent, but accepts a different format of the same credentials, would require altering the client and prevent forming automatic B2B service chains. &lt;br /&gt;
&lt;br /&gt;
Standards-based token protection in many cases provides a superior alternative for message-oriented Web Service SOAP communication model. &lt;br /&gt;
&lt;br /&gt;
That said the reality is that the most Web Services today are still protected by some form of channel security mechanism, which alone might suffice for a simple internal application. However, one should clearly realize the limitations of such approach, and make conscious trade-offs at the design time, whether channel, token, or combined protection would work better for each specific case. &lt;br /&gt;
&lt;br /&gt;
== Passing credentials  ==&lt;br /&gt;
&lt;br /&gt;
In order to enable credentials exchange and authentication for Web Services, their developers must address the following issues. &lt;br /&gt;
&lt;br /&gt;
First, since SOAP messages are XML-based, all passed credentials have to be converted to text format. This is not a problem for username/password types of credentials, but binary ones (like X.509 certificates or Kerberos tokens) require converting them into text prior to sending and unambiguously restoring them upon receiving, which is usually done via a procedure called Base64 encoding and decoding. &lt;br /&gt;
&lt;br /&gt;
Second, passing credentials carries an inherited risk of their disclosure, either by sniffing them during the wire transmission, or by analyzing the server logs. Therefore, things like passwords and private keys need to be either encrypted, or just never sent &amp;quot;in the clear&amp;quot;. Usual ways to avoid sending sensitive credentials are using cryptographic hashing and/or signatures. &lt;br /&gt;
&lt;br /&gt;
== Ensuring message freshness  ==&lt;br /&gt;
&lt;br /&gt;
Even a valid message may present a danger if it is utilized in a &amp;quot;replay attack&amp;quot;. i.e. it is sent multiple times to the server to make it repeat the requested operation. This may be achieved by capturing an entire message, even if it is sufficiently protected against tampering, since it is the message itself that is used for attack now (see the XML Injection section of the Interpreter Injection chapter). &lt;br /&gt;
&lt;br /&gt;
Usual means to protect against replayed messages is either using unique identifiers (nonces) on messages and keeping track of processed ones, or using a relatively short validity time window. In the Web Services world, information about the message creation time is usually communicated by inserting timestamps, which may just tell the instant the message was created, or have additional information, like its expiration time, or certain conditions. &lt;br /&gt;
&lt;br /&gt;
The latter solution, although easier to implement, requires clock synchronization and is sensitive to server time skew, whereas server or clients' clocks drift too much, preventing timely message delivery, although this usually does not present significant problems with modern-day computers. A greater issue lies with message queuing at the servers, where messages may be expiring while waiting to be processed in the queue of an especially busy or non-responsive server. &lt;br /&gt;
&lt;br /&gt;
== Protecting message integrity  ==&lt;br /&gt;
&lt;br /&gt;
When a message is received by a web service, it must always ask two questions: ¿whether I trust the caller?, ¿whether it created this message&amp;amp;nbsp;?. Assuming that the caller trust has been established one way or another, the server has to be assured that the message it is looking at was indeed issued by the caller, and not altered along the way (intentionally or not). This may affect technical qualities of a SOAP message, such as the message's timestamp, or business content, such as the amount to be withdrawn from the bank account. Obviously, neither change should go undetected by the server. &lt;br /&gt;
&lt;br /&gt;
In communication protocols, there are usually some mechanisms like checksum applied to ensure packet's integrity. This would not be sufficient, however, in the realm of publicly exposed Web Services, since checksums (or digests, their cryptographic equivalents) are easily replaceable and cannot be reliably tracked back to the issuer. The required association may be established by utilizing HMAC, or by combining message digests with either cryptographic signatures or with secret key-encryption (assuming the keys are only known to the two communicating parties) to ensure that any change will immediately result in a cryptographic error. &lt;br /&gt;
&lt;br /&gt;
== Protecting message confidentiality  ==&lt;br /&gt;
&lt;br /&gt;
Oftentimes, it is not sufficient to ensure the integrity; in many cases it is also desirable that nobody can see the data that is passed around and/or stored locally. It may apply to the entire message being processed, or only to certain parts of it; In either case, some type of encryption is required to conceal the content. Normally, symmetric encryption algorithms are used to encrypt bulk data, since it is significantly faster than the asymmetric ones. Asymmetric encryption is then applied to protect the symmetric session keys, which, in many implementations, are valid for one communication only and are subsequently discarded. &lt;br /&gt;
&lt;br /&gt;
Applying encryption requires conducting an extensive setup work, since the communicating parties now have to be aware of which keys they can trust, deal with certificate and key validation, and know which keys should be used for communication. &lt;br /&gt;
&lt;br /&gt;
In many cases, encryption is combined with signatures to provide both integrity and confidentiality. Normally, signing keys are different from the encrypting ones, primarily because of their different lifecycles, signing keys are permanently associated with their owners, while encryption keys may be invalidated after the message exchange. Another reason may be separation of business responsibilities - the signing authority (and the corresponding key) may belong to one department or person, while encryption keys are generated by the server controlled by members of IT department. &lt;br /&gt;
&lt;br /&gt;
== Access control  ==&lt;br /&gt;
&lt;br /&gt;
After the message has been received and successfully validated, the server must decide: &lt;br /&gt;
&lt;br /&gt;
*Does it know who is requesting the operation (Identification)&lt;br /&gt;
&lt;br /&gt;
*Does it trust the caller's identity claim (Authentication)&lt;br /&gt;
&lt;br /&gt;
*Does it allow the caller to perform this operation (Authorization)&lt;br /&gt;
&lt;br /&gt;
There is not much WS-specific activity that takes place at this stage, just several new ways of passing the credentials for authentication. Most often, authorization (or entitlement) tasks occur completely outside of the Web Service implementation, at the Policy Server that protects the whole domain. &lt;br /&gt;
&lt;br /&gt;
There is another significant problem here, the traditional HTTP firewalls do not help at stopping attacks at the Web Services. An organization would need an XML/SOAP firewall, which is capable of conducting application-level analysis of the web server's traffic and make intelligent decision about passing SOAP messages to their destination. The reader would need to refer to other books and publications on this very important topic, as it is impossible to cover it within just one chapter. &lt;br /&gt;
&lt;br /&gt;
== Audit  ==&lt;br /&gt;
&lt;br /&gt;
A common task, typically required from the audits, is reconstructing the chain of events that led to a certain problem. Normally, this would be achieved by saving server logs in a secure location, available only to the IT administrators and system auditors, in order to create what is commonly referred to as &amp;quot;audit trail&amp;quot;. Web Services are no exception to this practice, and follow the general approach of other types of Web Applications. &lt;br /&gt;
&lt;br /&gt;
Another auditing goal is non-repudiation, meaning that a message can be verifiably traced back to the caller. Following the standard legal practice, electronic documents now require some form of an &amp;quot;electronic signature&amp;quot;, but its definition is extremely broad and can mean practically anything, in many cases, entering your name and birthday qualifies as an e-signature. &lt;br /&gt;
&lt;br /&gt;
As far as the WS are concerned, such level of protection would be insufficient and easily forgeable. The standard practice is to require cryptographic digital signatures over any content that has to be legally binding, if a document with such a signature is saved in the audit log, it can be reliably traced to the owner of the signing key &lt;br /&gt;
&lt;br /&gt;
== Web Services Security Hierarchy  ==&lt;br /&gt;
&lt;br /&gt;
Technically speaking, Web Services themselves are very simple and versatile, XML-based communication, described by an XML-based grammar, called Web Services Description Language (WSDL, see &amp;lt;u&amp;gt;http://www.w3.org/TR/2005/WD-wsdl20-20050510&amp;lt;/u&amp;gt;), which binds abstract service interfaces, consisting of messages, expressed as XML Schema, and operations, to the underlying wire format. Although it is by no means a requirement, the format of choice is currently SOAP over HTTP. This means that Web Service interfaces are described in terms of the incoming and outgoing SOAP messages, transmitted over HTTP protocol. &lt;br /&gt;
&lt;br /&gt;
=== Standards committees  ===&lt;br /&gt;
&lt;br /&gt;
Before reviewing the individual standards, it is worth taking a brief look at the organizations which are developing and promoting them. There are quite a few industry-wide groups and consortiums working in this area, most important of which are listed below. &lt;br /&gt;
&lt;br /&gt;
W3C (see &amp;lt;u&amp;gt;http://www.w3.org&amp;lt;/u&amp;gt;) is the most well known industry group, which owns many Web-related standards and develops them in Working Group format. Of particular interest to this chapter are XML Schema, SOAP, XML-dsig, XML-enc, and WSDL standards (called recommendations in the W3C's jargon). &lt;br /&gt;
&lt;br /&gt;
OASIS (see &amp;lt;u&amp;gt;http://www.oasis-open.org&amp;lt;/u&amp;gt;) mostly deals with Web Service-specific standards, not necessarily security-related. It also operates on a committee basis, forming so-called Technical Committees (TC) for the standards that it is going to be developing. Of interest for this discussion, OASIS owns WS-Security and SAML standards. &lt;br /&gt;
&lt;br /&gt;
Web Services Interoperability Organization (WS-I, see &amp;lt;u&amp;gt;http://www.ws-i.org/&amp;lt;/u&amp;gt;) was formed to promote a general framework for interoperable Web Services. Mostly its work consists of taking other broadly accepted standards, and developing so-called profiles, or sets of requirements for conforming Web Service implementations. In particular, its Basic Security Profile (BSP) relies on the OASIS' WS-Security standard and specifies sets of optional and required security features in Web Services that claim interoperability. &lt;br /&gt;
&lt;br /&gt;
Liberty Alliance (LA, see &amp;lt;u&amp;gt;http://projectliberty.org&amp;lt;/u&amp;gt;) consortium was formed to develop and promote an interoperable Identity Federation framework. Although this framework is not strictly Web Service-specific, but rather general, it is important for this topic because of its close relation with the SAML standard developed by OASIS. &lt;br /&gt;
&lt;br /&gt;
Besides the previously listed organizations, there are other industry associations, both permanently established and short-lived, which push forward various Web Service security activities. They are usually made up of software industry's leading companies, such as Microsoft, IBM, Verisign, BEA, Sun, and others, that join them to work on a particular issue or proposal. Results of these joint activities, once they reach certain maturity, are often submitted to standardizations committees as a basis for new industry standards. &lt;br /&gt;
&lt;br /&gt;
== SOAP  ==&lt;br /&gt;
&lt;br /&gt;
Simple Object Access Protocol (SOAP, see &amp;lt;u&amp;gt;http://www.w3.org/TR/2003/REC-soap12-part1-20030624/&amp;lt;/u&amp;gt;) provides an XML-based framework for exchanging structured and typed information between peer services. This information, formatted into Header and Body, can theoretically be transmitted over a number of transport protocols, but only HTTP binding has been formally defined and is in active use today. SOAP provides for Remote Procedure Call-style (RPC) interactions, similar to remote function calls, and Document-style communication, with message contents based exclusively on XML Schema definitions in the Web Service's WSDL. Invocation results may be optionally returned in the response message, or a Fault may be raised, which is roughly equivalent to using exceptions in traditional programming languages. &lt;br /&gt;
&lt;br /&gt;
SOAP protocol, while defining the communication framework, provides no help in terms of securing message exchanges, the communications must either happen over secure channels, or use protection mechanisms described later in this chapter. &lt;br /&gt;
&lt;br /&gt;
=== XML security specifications (XML-dsig &amp;amp;amp; Encryption)  ===&lt;br /&gt;
&lt;br /&gt;
XML Signature (XML-dsig, see &amp;lt;u&amp;gt;http://www.w3.org/TR/2002/REC-xmldsig-core-20020212&amp;lt;/u&amp;gt;/), and XML Encryption (XML-enc, see &amp;lt;u&amp;gt;http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/&amp;lt;/u&amp;gt;) add cryptographic protection to plain XML documents. These specifications add integrity, message and signer authentication, as well as support for encryption/decryption of whole XML documents or only of some elements inside them. &lt;br /&gt;
&lt;br /&gt;
The real value of those standards comes from the highly flexible framework developed to reference the data being processed (both internal and external relative to the XML document), refer to the secret keys and key pairs, and to represent results of signing/encrypting operations as XML, which is added to/substituted in the original document. &lt;br /&gt;
&lt;br /&gt;
However, by themselves, XML-dsig and XML-enc do not solve the problem of securing SOAP-based Web Service interactions, since the client and service first have to agree on the order of those operations, where to look for the signature, how to retrieve cryptographic tokens, which message elements should be signed and encrypted, how long a message is considered to be valid, and so on. These issues are addressed by the higher-level specifications, reviewed in the following sections. &lt;br /&gt;
&lt;br /&gt;
=== Security specifications  ===&lt;br /&gt;
&lt;br /&gt;
In addition to the above standards, there is a broad set of security-related specifications being currently developed for various aspects of Web Service operations. &lt;br /&gt;
&lt;br /&gt;
One of them is SAML, which defines how identity, attribute, and authorization assertions should be exchanged among participating services in a secure and interoperable way. &lt;br /&gt;
&lt;br /&gt;
A broad consortium, headed by Microsoft and IBM, with the input from Verisign, RSA Security, and other participants, developed a family of specifications, collectively known as &amp;quot;Web Services Roadmap&amp;quot;. Its foundation, WS-Security, has been submitted to OASIS and became an OASIS standard in 2004. Other important specifications from this family are still found in different development stages, and plans for their submission have not yet been announced, although they cover such important issues as security policies (WS-Policy et al), trust issues and security token exchange (WS-Trust), establishing context for secure conversation (WS-SecureConversation). One of the specifications in this family, WS-Federation, directly competes with the work being done by the LA consortium, and, although it is supposed to be incorporated into the Longhorn release of Windows, its future is not clear at the moment, since it has been significantly delayed and presently does not have industry momentum behind it. &lt;br /&gt;
&lt;br /&gt;
== WS-Security Standard  ==&lt;br /&gt;
&lt;br /&gt;
WS-Security specification (WSS) was originally developed by Microsoft, IBM, and Verisign as part of a &amp;quot;Roadmap&amp;quot;, which was later renamed to Web Services Architecture, or WSA. WSS served as the foundation for all other specifications in this domain, creating a basic infrastructure for developing message-based security exchange. Because of its importance for establishing interoperable Web Services, it was submitted to OASIS and, after undergoing the required committee process, became an officially accepted standard. Current version is 1.1, and it was released on February 17, 2006.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The protocol is currently officially called WSS and developed via committee in Oasis-Open.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Organization of the standard  ===&lt;br /&gt;
&lt;br /&gt;
The WSS standard itself deals with several core security areas, leaving many details to so-called profile documents. The core areas, broadly defined by the standard, are: &lt;br /&gt;
&lt;br /&gt;
*Ways to add security headers (WSSE Header) to SOAP Envelopes&lt;br /&gt;
&lt;br /&gt;
*Attachment of security tokens and credentials to the message&lt;br /&gt;
&lt;br /&gt;
*Inserting a timestamp&lt;br /&gt;
&lt;br /&gt;
*Signing the message&lt;br /&gt;
&lt;br /&gt;
*Encrypting the message&lt;br /&gt;
&lt;br /&gt;
*Extensibility&lt;br /&gt;
&lt;br /&gt;
Flexibility of the WS-Security standard lies in its extensibility, so that it remains adaptable to new types of security tokens and protocols that are being developed. This flexibility is achieved by defining additional profiles for inserting new types of security tokens into the WSS framework. While the signing and encrypting parts of the standards are not expected to require significant changes (only when the underlying XML-dsig and XML-enc are updated), the types of tokens, passed in WSS messages, and ways of attaching them to the message may vary substantially. At the high level the WSS standard defines three types of security tokens, attachable to a WSS Header: Username/password, Binary, and XML tokens. Each of those types is further specified in one (or more) profile document, which defines additional tokens' attributes and elements, needed to represent a particular type of security token. &lt;br /&gt;
&lt;br /&gt;
[[Image:WSS Specification Hierarchy.gif|Figure 4: WSS specification hierarchy]] &lt;br /&gt;
&lt;br /&gt;
=== Purpose  ===&lt;br /&gt;
&lt;br /&gt;
The primary goal of the WSS standard is providing tools for message-level communication protection, whereas each message represents an isolated piece of information, carrying enough security data to verify all important message properties, such as: authenticity, integrity, freshness, and to initiate decryption of any encrypted message parts. This concept is a stark contrast to the traditional channel security, which methodically applies pre-negotiated security context to the whole stream, as opposed to the selective process of securing individual messages in WSS. In the Roadmap, that type of service is eventually expected to be provided by implementations of standards like WS-SecureConversation. &lt;br /&gt;
&lt;br /&gt;
From the beginning, the WSS standard was conceived as a message-level toolkit for securely delivering data for higher level protocols. Those protocols, based on the standards like WS-Policy, WS-Trust, and Liberty Alliance, rely on the transmitted tokens to implement access control policies, token exchange, and other types of protection and integration. However, taken alone, the WSS standard does not mandate any specific security properties, and an ad-hoc application of its constructs can lead to subtle security vulnerabilities and hard to detect problems, as is also discussed in later sections of this chapter. &lt;br /&gt;
&lt;br /&gt;
== WS-Security Building Blocks  ==&lt;br /&gt;
&lt;br /&gt;
The WSS standard actually consists of a number of documents, one core document, which defines how security headers may be included into SOAP envelope and describes all high-level blocks, which must be present in a valid security header. Profile documents have the dual task of extending definitions for the token types they are dealing with, providing additional attributes, elements, as well as defining relationships left out of the core specification, such as using attachments. &lt;br /&gt;
&lt;br /&gt;
Core WSS 1.1 specification, located at &amp;lt;u&amp;gt;http://www.oasis-open.org/committees/download.php/16790/wss-v1.1-spec-os-SOAPMessageSecurity.pdf&amp;lt;/u&amp;gt;, defines several types of security tokens (discussed later in this section: see 0), ways to reference them, timestamps, and ways to apply XML-dsig and XML-enc in the security headers, see the XML Dsig section for more details about their general structure. &lt;br /&gt;
&lt;br /&gt;
Associated specifications are: &lt;br /&gt;
&lt;br /&gt;
*Username token profile 1.1, located at &amp;lt;u&amp;gt;http://www.oasis-open.org/committees/download.php/16782/wss-v1.1-spec-os-UsernameTokenProfile.pdf&amp;lt;/u&amp;gt;, which adds various password-related extensions to the basic UsernameToken from the core specification&lt;br /&gt;
&lt;br /&gt;
*X.509 token profile 1.1, located at &amp;lt;u&amp;gt;http://www.oasis-open.org/committees/download.php/16785/wss-v1.1-spec-os-x509TokenProfile.pdf&amp;lt;/u&amp;gt; which specifies, how X.509 certificates may be passed in the BinarySecurityToken, specified by the core document&lt;br /&gt;
&lt;br /&gt;
*SAML Token profile 1.1, located at &amp;lt;u&amp;gt;http://www.oasis-open.org/committees/download.php/16768/wss-v1.1-spec-os-SAMLTokenProfile.pdf&amp;lt;/u&amp;gt; that specifies how XML-based SAML tokens can be inserted into WSS headers.&lt;br /&gt;
&lt;br /&gt;
*Kerberos Token Profile 1.1, located at &amp;lt;u&amp;gt;http://www.oasis-open.org/committees/download.php/16788/wss-v1.1-spec-os-KerberosTokenProfile.pdf&amp;lt;/u&amp;gt; that defines how to encode Kerberos tickets and attach them to SOAP messages.&lt;br /&gt;
&lt;br /&gt;
*Rights Expression Language (REL) Token Profile 1.1, located at &amp;lt;u&amp;gt;http://www.oasis-open.org/committees/download.php/16687/oasis-wss-rel-token-profile-1.1.pdf&amp;lt;/u&amp;gt; that describes the use of ISO/IEC 21000-5 Rights Expressions with respect to the WS-Security specification.&lt;br /&gt;
&lt;br /&gt;
*SOAP with Attachments (SWA) Profile 1.1, located at &amp;lt;u&amp;gt;http://www.oasis-open.org/committees/download.php/16672/wss-v1.1-spec-os-SwAProfile.pdf&amp;lt;/u&amp;gt; that describes how to use WSS-Sec with SOAP Messages with Attachments.&lt;br /&gt;
&lt;br /&gt;
=== How data is passed  ===&lt;br /&gt;
&lt;br /&gt;
WSS security specification deals with two distinct types of data: security information, which includes security tokens, signatures, digests, etc; and message data, i.e. everything else that is passed in the SOAP message. Being an XML-based standard, WSS works with textual information grouped into XML elements. Any binary data, such as cryptographic signatures or Kerberos tokens, has to go through a special transform, called Base64 encoding/decoding, which provides straightforward conversion from binary to ASCII formats and back. The example below demonstrates how binary data looks like in the encoded format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
''cCBDQTAeFw0wNDA1MTIxNjIzMDRaFw0wNTA1MTIxNjIzMDRaMG8xCz'' &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
After encoding a binary element, an attribute with the algorithm's identifier is added to the XML element carrying the data, so that the receiver would know to apply the correct decoder to read it. These identifiers are defined in the WSS specification documents. &lt;br /&gt;
&lt;br /&gt;
=== Security header's structure  ===&lt;br /&gt;
&lt;br /&gt;
A security header in a message is used as a sort of an envelope around a letter, it seals and protects the letter, but does not care about its content. This &amp;quot;indifference&amp;quot; works in the other direction as well, as the letter (SOAP message) should not know, nor should it care about its envelope (WSS Header), since the different units of information, carried on the envelope and in the letter, are presumably targeted at different people or applications. &lt;br /&gt;
&lt;br /&gt;
A SOAP Header may actually contain multiple security headers, as long as they are addressed to different actors (for SOAP 1.1), or roles (for SOAP 1.2). Their contents may also be referring to each other, but such references present a very complicated logistical problem for determining the proper order of decryptions/signature verifications, and should generally be avoided. WSS security header itself has a loose structure, as the specification itself does not require any elements to be present; so, the minimalist header with an empty message will look like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;soap:Envelope xmlns:soap=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot;&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;soap:Header&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;wsse:Security xmlns:wsse=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&amp;quot; xmlns:wsu=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&amp;quot; soap:mustUnderstand=&amp;quot;1&amp;quot;&amp;amp;gt;&lt;br /&gt;
 &lt;br /&gt;
     &amp;amp;lt;/wsse:Security&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/soap:Header&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;soap:Body&amp;amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;amp;lt;/soap:Body&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/soap:Envelope&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
However, to be useful, it must carry some information, which is going to help securing the message. It means including one or more security tokens (see 0) with references, XML Signature, and XML Encryption elements, if the message is signed and/or encrypted. So, a typical header will look more like the following picture: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;soap:Envelope xmlns:soap=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot;&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;soap:Header&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;wsse:Security xmlns=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&amp;quot; xmlns:wsse=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&amp;quot; xmlns:wsu=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&amp;quot; soap:mustUnderstand=&amp;quot;1&amp;quot;&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;wsse:BinarySecurityToken EncodingType=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary&amp;quot; ValueType=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3&amp;quot; wsu:Id=&amp;quot;aXhOJ5&amp;quot;&amp;amp;gt;MIICtzCCAi... &lt;br /&gt;
   &amp;amp;lt;/wsse:BinarySecurityToken&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;xenc:EncryptedKey xmlns:xenc=&amp;quot;http://www.w3.org/2001/04/xmlenc#&amp;quot;&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;xenc:EncryptionMethod Algorithm=&amp;quot;http://www.w3.org/2001/04/xmlenc#rsa-1_5&amp;quot;/&amp;amp;gt;&lt;br /&gt;
 	&amp;amp;lt;dsig:KeyInfo xmlns:dsig=&amp;quot;http://www.w3.org/2000/09/xmldsig#&amp;quot;&amp;amp;gt;&lt;br /&gt;
 	  &amp;amp;lt;wsse:SecurityTokenReference&amp;amp;gt;&lt;br /&gt;
 	    &amp;amp;lt;wsse:Reference URI=&amp;quot;#aXhOJ5&amp;quot; ValueType=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3&amp;quot;/&amp;amp;gt;&lt;br /&gt;
 	  &amp;amp;lt;/wsse:SecurityTokenReference&amp;amp;gt;  &lt;br /&gt;
 	&amp;amp;lt;/dsig:KeyInfo&amp;amp;gt;&lt;br /&gt;
 	&amp;amp;lt;xenc:CipherData&amp;amp;gt;&lt;br /&gt;
 	  &amp;amp;lt;xenc:CipherValue&amp;amp;gt;Nb0Mf...&amp;amp;lt;/xenc:CipherValue&amp;amp;gt;&lt;br /&gt;
 	&amp;amp;lt;/xenc:CipherData&amp;amp;gt;&lt;br /&gt;
 	&amp;amp;lt;xenc:ReferenceList&amp;amp;gt;&lt;br /&gt;
 	  &amp;amp;lt;xenc:DataReference URI=&amp;quot;#aDNa2iD&amp;quot;/&amp;amp;gt;&lt;br /&gt;
 	&amp;amp;lt;/xenc:ReferenceList&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;/xenc:EncryptedKey&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;wsse:SecurityTokenReference wsu:Id=&amp;quot;aZG0sG&amp;quot;&amp;amp;gt;&lt;br /&gt;
 	&amp;amp;lt;wsse:KeyIdentifier ValueType=&amp;quot;http://docs.oasis-open.org/wss/2004/XX/oasis-2004XX-wss-saml-token-profile-1.0#SAMLAssertionID&amp;quot; wsu:Id=&amp;quot;a2tv1Uz&amp;quot;&amp;amp;gt; 1106844369755&amp;amp;lt;/wsse:KeyIdentifier&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;/wsse:SecurityTokenReference&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;saml:Assertion AssertionID=&amp;quot;1106844369755&amp;quot; IssueInstant=&amp;quot;2005-01-27T16:46:09.755Z&amp;quot; Issuer=&amp;quot;www.my.com&amp;quot; MajorVersion=&amp;quot;1&amp;quot; MinorVersion=&amp;quot;1&amp;quot; xmlns:saml=&amp;quot;urn:oasis:names:tc:SAML:1.0:assertion&amp;quot;&amp;amp;gt;&lt;br /&gt;
 		...				&lt;br /&gt;
   &amp;amp;lt;/saml:Assertion&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;wsu:Timestamp wsu:Id=&amp;quot;afc6fbe-a7d8-fbf3-9ac4-f884f435a9c1&amp;quot;&amp;amp;gt;&lt;br /&gt;
 	&amp;amp;lt;wsu:Created&amp;amp;gt;2005-01-27T16:46:10Z&amp;amp;lt;/wsu:Created&amp;amp;gt;&lt;br /&gt;
 	&amp;amp;lt;wsu:Expires&amp;amp;gt;2005-01-27T18:46:10Z&amp;amp;lt;/wsu:Expires&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;/wsu:Timestamp&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;dsig:Signature xmlns:dsig=&amp;quot;http://www.w3.org/2000/09/xmldsig#&amp;quot; Id=&amp;quot;sb738c7&amp;quot;&amp;amp;gt;&lt;br /&gt;
 	&amp;amp;lt;dsig:SignedInfo Id=&amp;quot;obLkHzaCOrAW4kxC9az0bLA22&amp;quot;&amp;amp;gt;&lt;br /&gt;
 		...&lt;br /&gt;
 	  &amp;amp;lt;dsig:Reference URI=&amp;quot;#s91397860&amp;quot;&amp;amp;gt;&lt;br /&gt;
 		...									&lt;br /&gt;
         &amp;amp;lt;dsig:DigestValue&amp;amp;gt;5R3GSp+OOn17lSdE0knq4GXqgYM=&amp;amp;lt;/dsig:DigestValue&amp;amp;gt;&lt;br /&gt;
 	  &amp;amp;lt;/dsig:Reference&amp;amp;gt;&lt;br /&gt;
 	  &amp;amp;lt;/dsig:SignedInfo&amp;amp;gt;&lt;br /&gt;
 	  &amp;amp;lt;dsig:SignatureValue Id=&amp;quot;a9utKU9UZk&amp;quot;&amp;amp;gt;LIkagbCr5bkXLs8l...&amp;amp;lt;/dsig:SignatureValue&amp;amp;gt;&lt;br /&gt;
 	  &amp;amp;lt;dsig:KeyInfo&amp;amp;gt;&lt;br /&gt;
 	  &amp;amp;lt;wsse:SecurityTokenReference&amp;amp;gt;&lt;br /&gt;
 	    &amp;amp;lt;wsse:Reference URI=&amp;quot;#aXhOJ5&amp;quot; ValueType=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3&amp;quot;/&amp;amp;gt;&lt;br /&gt;
 	  &amp;amp;lt;/wsse:SecurityTokenReference&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;/dsig:KeyInfo&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;/dsig:Signature&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/wsse:Security&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/soap:Header&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;soap:Body xmlns:wsu=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&amp;quot; wsu:Id=&amp;quot;s91397860&amp;quot;&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;xenc:EncryptedData xmlns:xenc=&amp;quot;http://www.w3.org/2001/04/xmlenc#&amp;quot; Id=&amp;quot;aDNa2iD&amp;quot; Type=&amp;quot;http://www.w3.org/2001/04/xmlenc#Content&amp;quot;&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;xenc:EncryptionMethod Algorithm=&amp;quot;http://www.w3.org/2001/04/xmlenc#tripledes-cbc&amp;quot;/&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;xenc:CipherData&amp;amp;gt;&lt;br /&gt;
 	&amp;amp;lt;xenc:CipherValue&amp;amp;gt;XFM4J6C...&amp;amp;lt;/xenc:CipherValue&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;/xenc:CipherData&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/xenc:EncryptedData&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/soap:Body&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/soap:Envelope&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Types of tokens  ===&lt;br /&gt;
&lt;br /&gt;
A WSS Header may have the following types of security tokens in it: &lt;br /&gt;
&lt;br /&gt;
*Username token&lt;br /&gt;
&lt;br /&gt;
Defines mechanisms to pass username and, optionally, a password - the latter is described in the username profile document. Unless the whole token is encrypted, a message which includes a clear-text password should always be transmitted via a secured channel. In situations where the target Web Service has access to clear-text passwords for verification (this might not be possible with LDAP or some other user directories, which do not return clear-text passwords), using a hashed version with nonce and a timestamp is generally preferable. The profile document defines an unambiguous algorithm for producing password hash: &lt;br /&gt;
&lt;br /&gt;
 Password_Digest = Base64 ( SHA-1 ( nonce + created + password ) )&lt;br /&gt;
&lt;br /&gt;
*Binary token&lt;br /&gt;
&lt;br /&gt;
They are used to convey binary data, such as X.509 certificates, in a text-encoded format, Base64 by default. The core specification defines BinarySecurityToken element, while profile documents specify additional attributes and sub-elements to handle attachment of various tokens. Presently, both the X.509 and the Kerberos profiles have been adopted. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
       &amp;amp;lt;wsse:BinarySecurityToken EncodingType=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary&amp;quot; ValueType=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3&amp;quot; wsu:Id=&amp;quot;aXhOJ5&amp;quot;&amp;amp;gt;&lt;br /&gt;
     MIICtzCCAi...&lt;br /&gt;
   &amp;amp;lt;/wsse:BinarySecurityToken&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*XML token&lt;br /&gt;
&lt;br /&gt;
These are meant for any kind of XML-based tokens, but primarily, for SAML assertions. The core specification merely mentions the possibility of inserting such tokens, leaving all details to the profile documents. At the moment, SAML 1.1 profile has been accepted by OASIS. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 	&amp;amp;lt;saml:Assertion AssertionID=&amp;quot;1106844369755&amp;quot; IssueInstant=&amp;quot;2005-01-27T16:46:09.755Z&amp;quot; Issuer=&amp;quot;www.my.com&amp;quot; MajorVersion=&amp;quot;1&amp;quot; MinorVersion=&amp;quot;1&amp;quot; xmlns:saml=&amp;quot;urn:oasis:names:tc:SAML:1.0:assertion&amp;quot;&amp;amp;gt;&lt;br /&gt;
 		...				&lt;br /&gt;
 	&amp;amp;lt;/saml:Assertion&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Although technically it is not a security token, a Timestamp element may be inserted into a security header to ensure message's freshness. See the further reading section for a design pattern on this. &lt;br /&gt;
&lt;br /&gt;
=== Referencing message parts  ===&lt;br /&gt;
&lt;br /&gt;
In order to retrieve security tokens, passed in the message, or to identify signed and encrypted message parts, the core specification adopts usage of a special attribute, wsu:Id. The only requirement on this attribute is that the values of such IDs should be unique within the scope of XML document where they are defined. Its application has a significant advantage for the intermediate processors, as it does not require understanding of the message's XML Schema. Unfortunately, XML Signature and Encryption specifications do not allow for attribute extensibility (i.e. they have closed schema), so, when trying to locate signature or encryption elements, local IDs of the Signature and Encryption elements must be considered first. &lt;br /&gt;
&lt;br /&gt;
WSS core specification also defines a general mechanism for referencing security tokens via SecurityTokenReference element. An example of such element, referring to a SAML assertion in the same header, is provided below: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 	&amp;amp;lt;wsse:SecurityTokenReference wsu:Id=&amp;quot;aZG0sGbRpXLySzgM1X6aSjg22&amp;quot;&amp;amp;gt;&lt;br /&gt;
 	  &amp;amp;lt;wsse:KeyIdentifier ValueType=&amp;quot;http://docs.oasis-open.org/wss/2004/XX/oasis-2004XX-wss-saml-token-profile-1.0#SAMLAssertionID&amp;quot; wsu:Id=&amp;quot;a2tv1Uz&amp;quot;&amp;amp;gt;&lt;br /&gt;
         1106844369755&lt;br /&gt;
       &amp;amp;lt;/wsse:KeyIdentifier&amp;amp;gt;&lt;br /&gt;
 	&amp;amp;lt;/wsse:SecurityTokenReference&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
As this element was designed to refer to pretty much any possible token type (including encryption keys, certificates, SAML assertions, etc) both internal and external to the WSS Header, it is enormously complicated. The specification recommends using two of its possible four reference types: Direct References (by URI) and Key Identifiers (some kind of token identifier). Profile documents (SAML, X.509 for instance) provide additional extensions to these mechanisms to take advantage of specific qualities of different token types. &lt;br /&gt;
&lt;br /&gt;
== Communication Protection Mechanisms  ==&lt;br /&gt;
&lt;br /&gt;
As was already explained earlier (see 0), channel security, while providing important services, is not a panacea, as it does not solve many of the issues facing Web Service developers. WSS helps addressing some of them at the SOAP message level, using the mechanisms described in the sections below. &lt;br /&gt;
&lt;br /&gt;
=== Integrity  ===&lt;br /&gt;
&lt;br /&gt;
WSS specification makes use of the XML-dsig standard to ensure message integrity, restricting its functionality in certain cases; for instance, only explicitly referenced elements can be signed (i.e. no Embedding or Embedded signature modes are allowed). Prior to signing an XML document, a transformation is required to create its canonical representation, taking into account the fact that XML documents can be represented in a number of semantically equivalent ways. There are two main transformations defined by the XML Digital Signature WG at W3C, Inclusive and Exclusive Canonicalization Transforms (C14N and EXC-C14N), which differ in the way namespace declarations are processed. The WSS core specification specifically recommends using EXC-C14N, as it allows copying signed XML content into other documents without invalidating the signature. &lt;br /&gt;
&lt;br /&gt;
In order to provide a uniform way of addressing signed tokens, WSS adds a Security Token Reference (STR) Dereference Transform option, which is comparable with dereferencing a pointer to an object of specific data type in programming languages. Similarly, in addition to the XML Signature-defined ways of addressing signing keys, WSS allows for references to signing security tokens through the STR mechanism (explained in 0), extended by token profiles to accommodate specific token types. A typical signature example is shown in an earlier sample in the section 0. &lt;br /&gt;
&lt;br /&gt;
Typically, an XML signature is applied to secure elements such as SOAP Body and the timestamp, as well as any user credentials, passed in the request. There is an interesting twist when a particular element is both signed and encrypted, since these operations may follow (even repeatedly) in any order, and knowledge of their ordering is required for signature verification. To address this issue, the WSS core specification requires that each new element is pre-pended to the security header, thus defining the &amp;quot;natural&amp;quot; order of operations. A particularly nasty problem arises when there are several security headers in a single SOAP message, using overlapping signature and encryption blocks, as there is nothing in this case that would point to the right order of operations. &lt;br /&gt;
&lt;br /&gt;
=== Confidentiality  ===&lt;br /&gt;
&lt;br /&gt;
For its confidentiality protection, WSS relies on yet another standard, XML Encryption. Similarly to XML-dsig, this standard operates on selected elements of the SOAP message, but it then replaces the encrypted element's data with a &amp;amp;lt;xenc:EncryptedData&amp;amp;gt; sub-element carrying the encrypted bytes. For encryption efficiency, the specification recommends using a unique key, which is then encrypted by the recipient's public key and pre-pended to the security header in a &amp;amp;lt;xenc:EncryptedKey&amp;amp;gt; element. A SOAP message with encrypted body is shown in the section 0. &lt;br /&gt;
&lt;br /&gt;
=== Freshness  ===&lt;br /&gt;
&lt;br /&gt;
SOAP messages' freshness is addressed via timestamp mechanism, each security header may contain just one such element, which states, in UTC time and using the UTC time format, creation and expiration moments of the security header. It is important to realize that the timestamp is applied to the WSS Header, not to the SOAP message itself, since the latter may contain multiple security headers, each with a different timestamp. There is an unresolved problem with this &amp;quot;single timestampt&amp;quot; approach, since, once the timestamp is created and signed, it is impossible to update it without breaking existing signatures, even in case of a legitimate change in the WSS Header. &lt;br /&gt;
&lt;br /&gt;
       &amp;amp;lt;wsu:Timestamp wsu:Id=&amp;quot;afc6fbe-a7d8-fbf3-9ac4-f884f435a9c1&amp;quot;&amp;amp;gt;&lt;br /&gt;
 	&amp;amp;lt;wsu:Created&amp;amp;gt;2005-01-27T16:46:10Z&amp;amp;lt;/wsu:Created&amp;amp;gt;&lt;br /&gt;
 	&amp;amp;lt;wsu:Expires&amp;amp;gt;2005-01-27T18:46:10Z&amp;amp;lt;/wsu:Expires&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;/wsu:Timestamp&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a timestamp is included in a message, it is typically signed to prevent tampering and replay attacks. There is no mechanism foreseen to address clock synchronization issue (which, as was already point out earlier, is generally not an issue in modern day systems), this has to be addressed out-of-band as far as the WSS mechanics is concerned. See the further reading section for a design pattern addressing this issue. &lt;br /&gt;
&lt;br /&gt;
== Access Control Mechanisms  ==&lt;br /&gt;
&lt;br /&gt;
When it comes to access control decisions, Web Services do not offer specific protection mechanisms by themselves, they just have the means to carry the tokens and data payloads in a secure manner between source and destination SOAP endpoints. &lt;br /&gt;
&lt;br /&gt;
For more complete description of access control tasks, please, refer to other sections of this Development Guide. &lt;br /&gt;
&lt;br /&gt;
=== Identification  ===&lt;br /&gt;
&lt;br /&gt;
Identification represents a claim to have certain identity, which is expressed by attaching certain information to the message. This can be a username, an SAML assertion, a Kerberos ticket, or any other piece of information, from which the service can infer who the caller claims to be. &lt;br /&gt;
&lt;br /&gt;
WSS represents a very good way to convey this information, as it defines an extensible mechanism for attaching various token types to a message (see 0). It is the receiver's job to extract the attached token and figure out which identity it carries, or to reject the message if it can find no acceptable token in it. &lt;br /&gt;
&lt;br /&gt;
=== Authentication  ===&lt;br /&gt;
&lt;br /&gt;
Authentication can come in two flavors: credentials verification or token validation. The subtle difference between the two is that tokens are issued after some kind of authentication has already happened prior to the current invocation, and they usually contain user's identity along with the proof of its integrity. &lt;br /&gt;
&lt;br /&gt;
WSS offers support for a number of standard authentication protocols by defining binding mechanism for transmitting protocol-specific tokens and reliably linking them to the sender. However, the mechanics of proof that the caller is who he claims to be is completely at the Web Service's discretion. Whether it takes the supplied username and password's hash and checks it against the backend user store, or extracts subject name from the X.509 certificate used for signing the message, verifies the certificate chain and looks up the user in its store, at the moment, there are no requirements or standards which would dictate that it should be done one way or another. &lt;br /&gt;
&lt;br /&gt;
=== Authorization  ===&lt;br /&gt;
&lt;br /&gt;
XACML may be used for expressing authorization rules, but its usage is not Web Service-specific, it has much broader scope. So, whatever policy or role-based authorization mechanism the host server already has in place will most likely be utilized to protect the deployed Web Services deployed as well. &lt;br /&gt;
&lt;br /&gt;
Depending on the implementation, there may be several layers of authorization involved at the server. For instance, JSRs 224 (JAX-RPC 2.0) and 109 (Implementing Enterprise Web Services), which define Java binding for Web Services, specify implementing Web Services in J2EE containers. This means that when a Web Service is accessed, there will be a URL authorization check executed by the J2EE container, followed by a check at the Web Service layer for the Web Service-specific resource. Granularity of such checks is implementation-specific and is not dictated by any standards. In the Windows universe it happens in a similar fashion, since IIS is going to execute its access checks on the incoming HTTP calls before they reach the ASP.NET runtime, where SOAP message is going to be further decomposed and analyzed. &lt;br /&gt;
&lt;br /&gt;
=== Policy Agreement  ===&lt;br /&gt;
&lt;br /&gt;
Normally, Web Services communication is based on the endpoint's public interface, defined in its WSDL file. This descriptor has sufficient details to express SOAP binding requirements, but it does not define any security parameters, leaving Web Service developers struggling to find out-of-band mechanisms to determine the endpoint's security requirements. &lt;br /&gt;
&lt;br /&gt;
To make up for these shortcomings, WS-Policy specification was conceived as a mechanism for expressing complex policy requirements and qualities, sort of WSDL on steroids. Through the published policy SOAP endpoints can advertise their security requirements, and their clients can apply appropriate measures of message protection to construct the requests. The general WS-Policy specification (actually comprised of three separate documents) also has extensions for specific policy types, one of them,&amp;amp;nbsp; for security, WS-SecurityPolicy. &lt;br /&gt;
&lt;br /&gt;
If the requestor does not possess the required tokens, it can try obtaining them via trust mechanism, using WS-Trust-enabled services, which are called to securely exchange various token types for the requested identity. &lt;br /&gt;
&lt;br /&gt;
[[Image:Using Trust Service.gif|Figure 5. Using Trust service]] &lt;br /&gt;
&lt;br /&gt;
Unfortunately, both WS-Policy and WS-Trust specifications have not been submitted for standardization to public bodies, and their development is progressing via private collaboration of several companies, although it was opened up for other participants as well. As a positive factor, there have been several interoperability events conducted for these specifications, so the development process of these critical links in the Web Services' security infrastructure is not a complete black box. &lt;br /&gt;
&lt;br /&gt;
== Forming Web Service Chains  ==&lt;br /&gt;
&lt;br /&gt;
Many existing or planned implementations of SOA or B2B systems rely on dynamic chains of Web Services for accomplishing various business specific tasks, from taking the orders through manufacturing and up to the distribution process. &lt;br /&gt;
&lt;br /&gt;
[[Image:Service Chain.gif|Figure 6: Service chain]] &lt;br /&gt;
&lt;br /&gt;
This is in theory. In practice, there are a lot of obstacles hidden among the way, and one of the major ones among them, security concerns about publicly exposing processing functions to intra- or Internet-based clients. &lt;br /&gt;
&lt;br /&gt;
Here are just a few of the issues that hamper Web Services interaction, incompatible authentication and authorization models for users, amount of trust between services themselves and ways of establishing such trust, maintaining secure connections, and synchronization of user directories or otherwise exchanging users' attributes. These issues will be briefly tackled in the following paragraphs. &lt;br /&gt;
&lt;br /&gt;
=== Incompatible user access control models  ===&lt;br /&gt;
&lt;br /&gt;
As explained earlier, in section 0, Web Services themselves do not include separate extensions for access control, relying instead on the existing security framework. What they do provide, however, are mechanisms for discovering and describing security requirements of a SOAP service (via WS-Policy), and for obtaining appropriate security credentials via WS-Trust based services. &lt;br /&gt;
&lt;br /&gt;
=== Service trust  ===&lt;br /&gt;
&lt;br /&gt;
In order to establish mutual trust between client and service, they have to satisfy each other's policy requirements. A simple and popular model is mutual certificate authentication via SSL, but it is not scalable for open service models, and supports only one authentication type. Services that require more flexibility have to use pretty much the same access control mechanisms as with users to establish each other's identities prior to engaging in a conversation. &lt;br /&gt;
&lt;br /&gt;
=== Secure connections  ===&lt;br /&gt;
&lt;br /&gt;
Once trust is established it would be impractical to require its confirmation on each interaction. Instead, a secure client-server link is formed and maintained the entire time a client's session is active. Again, the most popular mechanism today for maintaining such link is SSL, but it is not a Web Service-specific mechanism, and it has a number of shortcomings when applied to SOAP communication, as explained in 0. &lt;br /&gt;
&lt;br /&gt;
=== Synchronization of user directories  ===&lt;br /&gt;
&lt;br /&gt;
This is a very acute problem when dealing with cross-domain applications, as users' population tends to change frequently among different domains. So, how does a service in domain B decide whether it is going to trust user's claim that he has been already authenticated in domain A? There exist different aspects of this problem. First, a common SSO mechanism, which implies that a user is known in both domains (through synchronization, or by some other means), and authentication tokens from one domain are acceptable in another. In Web Services world, this would be accomplished by passing around a SAML or Kerberos token for a user. &lt;br /&gt;
&lt;br /&gt;
=== Domain federation  ===&lt;br /&gt;
&lt;br /&gt;
Another aspect of the problem is when users are not shared across domains, but merely the fact that a user with certain ID has successfully authenticated in another domain, as would be the case with several large corporations, which would like to form a partnership, but would be reluctant to share customers' details. The decision to accept this request is then based on the inter-domain procedures, establishing special trust relationships and allowing for exchanging such opaque tokens, which would be an example of Federation relationships. Of those efforts, most notable example is Liberty Alliance project, which is now being used as a basis for SAML 2.0 specifications. The work in this area is still far from being completed, and most of the existing deployments are nothing more than POC or internal pilot projects than to real cross-companies deployments, although LA's website does list some case studies of large-scale projects. &lt;br /&gt;
&lt;br /&gt;
== Available Implementations  ==&lt;br /&gt;
&lt;br /&gt;
It is important to realize from the beginning that no security standard by itself is going to provide security to the message exchanges, it is the installed implementations, which will be assessing conformance of the incoming SOAP messages to the applicable standards, as well as appropriately securing the outgoing messages. &lt;br /&gt;
&lt;br /&gt;
=== .NET Web Service Extensions  ===&lt;br /&gt;
&lt;br /&gt;
Since new standards are being developed at a rather quick pace, .NET platform is not trying to catch up immediately, but uses Web Service Extensions (WSE) instead. WSE, currently at the version 2.0, adds development and runtime support for the latest Web Service security standards to the platform and development tools, even while they are still &amp;quot;work in progress&amp;quot;. Once standards mature, their support is incorporated into new releases of the .NET platform, which is what is going to happen when .NET 2.0 finally sees the world. The next release of WSE, 3.0, is going to coincide with VS.2005 release and will take advantages of the latest innovations of .NET 2.0 platform in messaging and Web Application areas. &lt;br /&gt;
&lt;br /&gt;
Considering that Microsoft is one of the most active players in the Web Service security area and recognizing its influence in the industry, its WSE implementation is probably one of the most complete and up to date, and it is strongly advisable to run at least a quick interoperability check with WSE-secured .NET Web Service clients. If you have a Java-based Web Service, and the interoperability is a requirement (which is usually the case), in addition to the questions of security testing one needs to keep in mind the basic interoperability between Java and .NET Web Service data structures. &lt;br /&gt;
&lt;br /&gt;
This is especially important since current versions of .NET Web Service tools frequently do not cleanly handle WS-Security's and related XML schemas as published by OASIS, so some creativity on the part of a Web Service designer is needed. That said, WSE package itself contains very rich and well-structured functionality, which can be utilized both with ASP.NET-based and standalone Web Service clients to check incoming SOAP messages and secure outgoing ones at the infrastructure level, relieving Web Service programmers from knowing these details. Among other things, WSE 2.0 supports the most recent set of WS-Policy and WS-Security profiles, providing for basic message security and WS-Trust with WS-SecureConversation. Those are needed for establishing secure exchanges and sessions - similar to what SSL does at the transport level, but applied to message-based communication. &lt;br /&gt;
&lt;br /&gt;
=== Java toolkits  ===&lt;br /&gt;
&lt;br /&gt;
Most of the publicly available Java toolkits work at the level of XML security, i.e. XML-dsig and XML-enc, such as IBM's XML Security Suite and Apache's XML Security Java project. Java's JSR 105 and JSR 106 (still not finalized) define Java bindings for signatures and encryption, which will allow plugging the implementations as JCA providers once work on those JSRs is completed. &lt;br /&gt;
&lt;br /&gt;
Moving one level up, to address Web Services themselves, the picture becomes muddier, at the moment, there are many implementations in various stages of incompleteness. For instance, Apache is currently working on the WSS4J project, which is moving rather slowly, and there is commercial software package from Phaos (now owned by Oracle), which suffers from a lot of implementation problems. &lt;br /&gt;
&lt;br /&gt;
A popular choice among Web Service developers today is Sun's JWSDP, which includes support for Web Service security. However, its support for Web Service security specifications in the version 1.5 is only limited to implementation of the core WSS standard with username and X.509 certificate profiles. Security features are implemented as part of the JAX-RPC framework and configuration-driven, which allows for clean separation from the Web Service's implementation. &lt;br /&gt;
&lt;br /&gt;
=== Hardware, software systems  ===&lt;br /&gt;
&lt;br /&gt;
This category includes complete systems, rather than toolkits or frameworks. On one hand, they usually provide rich functionality right off the shelf, on the other hand, its usage model is rigidly constrained by the solution's architecture and implementation. This is in contrast to the toolkits, which do not provide any services by themselves, but handing system developers necessary tools to include the desired Web Service security features in their products' or to shoot themselves in the foot by applying them inappropriately. &lt;br /&gt;
&lt;br /&gt;
These systems can be used at the infrastructure layer to verify incoming messages against the effective policy, check signatures, tokens, etc, before passing them on to the target Web Service. When applied to the outgoing SOAP messages, they act as a proxy, now altering the messages to decorate with the required security elements, sign and/or encrypt them. &lt;br /&gt;
&lt;br /&gt;
Software systems are characterized by significant configuration flexibility, but comparatively slow processing. On the bright side, they often provide high level of integration with the existing enterprise infrastructure, relying on the back-end user and policy stores to look at the credentials, extracted from the WSS header, from the broader perspective. An example of such service is TransactionMinder from the former Netegrity, a Policy Enforcement Point for Web Services behind it, layered on top of the Policy Server, which makes policy decisions by checking the extracted credentials against the configured stores and policies. &lt;br /&gt;
&lt;br /&gt;
For hardware systems, performance is the key, they have already broken gigabyte processing threshold, and allow for real-time processing of huge documents, decorated according to the variety of the latest Web Service security standards, not only WSS. The usage simplicity is another attractive point of those systems - in the most trivial cases, the hardware box may be literally dropped in, plugged, and be used right away. These qualities come with a price, however, this performance and simplicity can be achieved as long as the user stays within the pre-configured confines of the hardware box. The moment he tries to integrate with the back-end stores via callbacks (for those solutions that have this capability, since not all of them do), most of the advantages are lost. As an example of such hardware device, Layer 7 Technologies provides a scalable SecureSpan Networking Gateway, which acts both as the inbound firewall and the outbound proxy to handle XML traffic in real time. &lt;br /&gt;
&lt;br /&gt;
== Problems  ==&lt;br /&gt;
&lt;br /&gt;
As is probably clear from the previous sections, Web Services are still experiencing a lot of turbulence, and it will take a while before they can really catch on. Here is a brief look at what problems surround currently existing security standards and their implementations. &lt;br /&gt;
&lt;br /&gt;
=== Immaturity of the standards  ===&lt;br /&gt;
&lt;br /&gt;
Most of the standards are either very recent (couple years old at most), or still being developed. Although standards development is done in committees, which, presumably, reduces risks by going through an exhaustive reviewing and commenting process, some error scenarios still slip in periodically, as no theory can possibly match the testing resulting from pounding by thousands of developers working in the real field. &lt;br /&gt;
&lt;br /&gt;
Additionally, it does not help that for political reasons some of these standards are withheld from public process, which is the case with many standards from the WSA arena (see 0), or that some of the efforts are duplicated, as was the case with LA and WS-Federation specifications. &lt;br /&gt;
&lt;br /&gt;
=== Performance  ===&lt;br /&gt;
&lt;br /&gt;
XML parsing is a slow task, which is an accepted reality, and SOAP processing slows it down even more. Now, with expensive cryptographic and textual conversion operations thrown into the mix, these tasks become a performance bottleneck, even with the latest crypto- and XML-processing hardware solutions offered today. All of the products currently on the market are facing this issue, and they are trying to resolve it with varying degrees of success. &lt;br /&gt;
&lt;br /&gt;
Hardware solutions, while substantially (by orders of magnitude) improving the performance, cannot always be used as an optimal solution, as they cannot be easily integrated with the already existing back-end software infrastructure, at least, not without making performance sacrifices. Another consideration whether hardware-based systems are the right solution, they are usually highly specialized in what they are doing, while modern Application Servers and security frameworks can usually offer a much greater variety of protection mechanisms, protecting not only Web Services, but also other deployed applications in a uniform and consistent way. &lt;br /&gt;
&lt;br /&gt;
=== Complexity and interoperability  ===&lt;br /&gt;
&lt;br /&gt;
As could be deduced from the previous sections, Web Service security standards are fairly complex, and have very steep learning curve associated with them. Most of the current products, dealing with Web Service security, suffer from very mediocre usability due to the complexity of the underlying infrastructure. Configuring all different policies, identities, keys, and protocols takes a lot of time and good understanding of the involved technologies, as most of the times errors that end users are seeing have very cryptic and misleading descriptions. &lt;br /&gt;
&lt;br /&gt;
In order to help administrators and reduce security risks from service misconfigurations, many companies develop policy templates, which group together best practices for protecting incoming and outgoing SOAP messages. Unfortunately, this work is not currently on the radar of any of the standard's bodies, so it appears unlikely that such templates will be released for public use any time soon. Closest to this effort may be WS-I's Basic Security Profile (BSP), which tries to define the rules for better interoperability among Web Services, using a subset of common security features from various security standards like WSS. However, this work is not aimed at supplying the administrators with ready for deployment security templates matching the most popular business use cases, but rather at establishing the least common denominator. &lt;br /&gt;
&lt;br /&gt;
=== Key management  ===&lt;br /&gt;
&lt;br /&gt;
Key management usually lies at the foundation of any other security activity, as most protection mechanisms rely on cryptographic keys one way or another. While Web Services have XKMS protocol for key distribution, local key management still presents a huge challenge in most cases, since PKI mechanism has a lot of well-documented deployment and usability issues. Those systems that opt to use homegrown mechanisms for key management run significant risks in many cases, since questions of storing, updating, and recovering secret and private keys more often than not are not adequately addressed in such solutions. &lt;br /&gt;
&lt;br /&gt;
== Further Reading  ==&lt;br /&gt;
&lt;br /&gt;
*SearchSOA, SOA needs practical operational governance, Toufic Boubez&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://searchsoa.techtarget.com/news/interview/0,289202,sid26_gci1288649,00.html?track=NL-110&amp;amp;amp;ad=618937&amp;amp;amp;asrc=EM_NLN_2827289&amp;amp;amp;uid=4724698&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*Whitepaper: Securing XML Web Services: XML Firewalls and XML VPNs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://forms.layer7tech.com/content/Download?docid=1114&amp;amp;amp;docname=Securing%20XML%20Web%20Services:%20SSL,%20XML%20Firewalling,%20and%20Beyond&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*eBizQ, The Challenges of SOA Security, Peter Schooff&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.ebizq.net/blogs/news_security/2008/01/the_complexity_of_soa_security.php&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*Piliptchouk, D., WS-Security in the Enterprise, O'Reilly ONJava&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.onjava.com/pub/a/onjava/2005/02/09/wssecurity.html&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.onjava.com/pub/a/onjava/2005/03/30/wssecurity2.html&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*WS-Security OASIS site&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wss&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*Microsoft, ''What's new with WSE 3.0''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;http://msdn.microsoft.com/webservices/webservices/building/wse/default.aspx?pull=/library/en-us/dnwse/html/newwse3.asp&amp;lt;/u&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*Eoin Keary, Preventing DOS attacks on web services&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;https://www.threatsandcountermeasures.com/wiki/default.aspx/ThreatsAndCountermeasuresCommunityKB.PreventingDOSAttacksOnWebServices&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Reference  ==&lt;br /&gt;
&lt;br /&gt;
[[Guide Table of Contents|Development Guide Table of Contents]] &lt;br /&gt;
&lt;br /&gt;
[[Category:FIXME|broken link]] [[Category:OWASP_Guide_Project]] [[Category:Web_Services]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:Top_10_2004&amp;diff=108810</id>
		<title>Talk:Top 10 2004</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:Top_10_2004&amp;diff=108810"/>
				<updated>2011-04-14T14:07:19Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: Created page with &amp;quot;It's necessary to change the link to the last version of top ten, because It's pointing to the 2007 version and should point to 2010 version.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It's necessary to change the link to the last version of top ten, because It's pointing to the 2007 version and should point to 2010 version.&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Diez_Mayores_2007&amp;diff=85089</id>
		<title>Diez Mayores 2007</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Diez_Mayores_2007&amp;diff=85089"/>
				<updated>2010-06-17T21:41:25Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Top_10_2007:TopTemplate|usenext=NextLink|next=-Metodología|useprev=Nothing|usemain=Nothing}}&lt;br /&gt;
&lt;br /&gt;
==Presentación==&lt;br /&gt;
&lt;br /&gt;
Bienvenidos a la lista de las 10 mayores vulnerabilidades de OWASP 2007!  Esta edición, totalmente reescrita lista las vulnerabilidades más serias en aplicaciones web, discute como protegerse de ellas y provee ligas a mas información.  '''La lista de las 10 mayores vulnerabilidades de OWASP ha sido traducida al Español. [https://www.owasp.org/images/a/ae/OWASP_Top_10_2007_Spanish.pdf De clic aquí] para la traducción al español!'''&lt;br /&gt;
&lt;br /&gt;
La lista de las 10 mayores de OWASP para la versión empresarial de Java esta disponible para bajarla [https://www.owasp.org/images/8/89/OWASP_Top_10_2007_for_JEE.pdf aqui]&lt;br /&gt;
&lt;br /&gt;
== Objetivo ==&lt;br /&gt;
&lt;br /&gt;
'''El objetivo principal de la lista de las 10 de OWASP es formar desarrolladores, diseñadores, arquitectos y organizaciones''' sobre las consecuencias de las vulnerabilidades más comunes en aplicaciones web. Las lista provee métodos básicos para protegerse contra estas vulnerabilidades - un gran inicio para su programa de codificación segura.&lt;br /&gt;
&lt;br /&gt;
'''La seguridad no es un evento de una sola vez'''. No es suficiente asegurar su código solo una vez. Para 2008, esta lista cambiará y sin cambiar una línea de el código de su aplicación, puede ser vulnerable. Por favor revise el consejo en [[Top_10_2007-Where to Go From Here|Top 10 2007-¿A dondé sigo Ahora?]] para mas información.&lt;br /&gt;
&lt;br /&gt;
'''Una iniciativa de codificación segura debe lidiar con todas las etapas de desarrollo del programa'''. Las aplicaciones Web seguras '''''solo''''' es posible cuando un SDLC seguro es usado. Los programas seguros desde el inicio por su diseño y desarrollo. Hay al menos 300 problemas que afectan la seguridad en general de una aplicación Web. Estos mas de 300 problemas están detallados en la [http://www.owasp.org/index.php/OWASP_Guide_Project Guía de OWASP], la cua es una lectura escencial para cualquiera que desarolle aplicaciones Web en la actualidad.&lt;br /&gt;
&lt;br /&gt;
'''Este documento es el principalmente un documento educativo, no un standard'''.  Por favor no adopte este documento como una política o estándar sin [mailto:owasp@owasp.org hablar con nosotros] primero! Si necesita una política o estandar de codificación segura, OWASP tiene proyectos de políticas y estándares de seguridad que están en progreso.  Por favor considere unirse o asistir financieramente estos esfuerzos.&lt;br /&gt;
&lt;br /&gt;
== Retroalimentación ==&lt;br /&gt;
&lt;br /&gt;
{| &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|Agradecemos a [http://www.mitre.org/ MITRE] por hacer ''La  distribución de tipos de vulnerabilidades en el [http://cve.mitre.org/ CVE]'' disponibles libremente para su uso. El proyecto de la lista de las 10 mayores esta dirijida y patrocinada por [http://www.aspectsecurity.com https://www.owasp.org/images/d/d1/Aspect_logo.gif].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Líder de proyecto: Andrew van der Stock (Director ejecutivo, Fundación OWASP)&lt;br /&gt;
Co-autores:        Jeff Williams (Presidencia, Fundación OWASP), Dave Wichers (Presidencia de conferencia, Fundación OWASP)&lt;br /&gt;
&lt;br /&gt;
Queremos agradecer a los revisores:&lt;br /&gt;
&lt;br /&gt;
*Raoul Endres por ayudar a echar a andar la lista de nuevo y por sus valiosos comentarios.&lt;br /&gt;
*[mailto:coley...at...mitre.org Steve Christey](MITRE) por una importante revisión y la adición de los datos del MITRE CWE&lt;br /&gt;
*[http://jeremiahgrossman.blogspot.com/ Jeremiah Grossman] ([http://www.whitehatsec.com/ WhiteHat Security]) por revisar y contribuir con información sobre el éxico (o falla) de la medidas de detección automatizadas.&lt;br /&gt;
*[http://www.smithline.net/ Neil Smithline] ([http://www.bea.com/ BEA Systems]) por sus comentarios y producir la versión Wiki-&lt;br /&gt;
*Sylvan von Stuppe por una revisión ejemplar.&lt;br /&gt;
*Colin Wong, Nigel Evans y Andre Gironda por comentarios enviados por correo.&lt;br /&gt;
&lt;br /&gt;
== Conclusión ==&lt;br /&gt;
&lt;br /&gt;
{| border='1' cellpadding='2' &lt;br /&gt;
|-	&lt;br /&gt;
|[[Top 10 2007-Secuencia de Comandos en Sitios Cruzados (XSS)|A1 - Secuencia de comandos en sitios cruzados (XSS)]]&lt;br /&gt;
|Las fallas de XSS acurren cuando una aplicación toma la información proveida por el usuario y la envia a un navegador sin validarla primero o codificar el contenido. El XSS permite a los atacantes ejecurar scripts en el navegador de la víctima la cual puede secuestrar la sesión del usuario, modificación de sitios web, la posible introducción de gusanos, etc.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Fallas de Inyección|A2 - Inyección de código]]&lt;br /&gt;
|La fallas de inyección, particularmente la inyección de SQL, son comunes en las aplicaciones Web. La inyección ocurre cuando los datos proveidos por el usuario son enviados a un interprete como parte de un comando o petición. Los datos hostiles del atacante engañan al interprete a ejecutar comandos no intencionados o cambiar los datos.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Ejecución de Ficheros Malintencionados|A3 - Ejecución maliciosa de archivos]]&lt;br /&gt;
|El código vulnerable a inclusión remota de archivos permite a los atacantes incluir código y datos hostiles, resultando en ataques devastadores, como secuestro total del servidor. Los ataques de ejecución maliciosa de archivos afectan a PHP, XML y cualquier marco de trabajo que soporte el manejo de nombres de archivos o permita la interacción con los usuarios mediante el intercambio de archivos.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Referencia Insegura y Directa a Objetos|A4 - Referencia directa e insegura a objetos]]&lt;br /&gt;
|Una referencia directa e insegura a objetos ocurre cuando un desarrollador expone una referencia a una implementación interna de un objeto como unn archivo, un directorio, un registro de BD o una llave, en forma de parámetro de URL o de una forma. Los atacantes pueden manipular esas referencias para acceder a otros objetos sin tener autorización&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Vulnerabilidades de Falsificación de Petición en Sitios Cruzados (CSRF)|A5 - Falsificación de petición en sitios crusados (CSRF)]]&lt;br /&gt;
|A CSRF attack forces a logged-on victim's browser to send a pre-authenticated request to a vulnerable web application, which then forces the victim's browser to perform a hostile action to the benefit of the attacker. CSRF can be as powerful as the web application that it attacks.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Revelación de Información y Gestión Incorrecta de Errores|A6 - Revelación de Información y Gestión Incorrecta de Errores]]&lt;br /&gt;
|Las aplicaciones pueden (sin intención) revelar información sobre su configuración, funcionalidad interna o violar la privacidad a travez de una variedad de problemas de la aplicación. Los atacantes usan estas debilidades para robar información delicada o conducir ataques mas serios. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Autenticación y Gestión de Sesiones Disfuncional|A7 - Autentificación y gestión de sesiones disfuncional]]&lt;br /&gt;
|Las credenciales de las cuenta y testigos de sesión son frecuentemente protegidos inadecuadamente. Los atacantes roban contraseñas, llaves o testigos de autneticación para asumir la identidad de otros usuarios.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Almacenamiento Criptográfico Inseguro|A8 - Almacenamiento cirptográfico inseguro]]&lt;br /&gt;
|Las aplicaciones Web raramente usan funciones criptográdicas apropiadamente para proteger información y credenciales. Los atacantes usan la información mal protegida para hacer robos de identidad y otros crimenes, como fraude con tarjetas de crédito.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Comunicaciones inseguras|A9 - Comunicación Insegura]]&lt;br /&gt;
|Las aplicaciones frecuentement falla al cifrar el tráfico de red cuando es necesario proteger comunicaciones delicadas.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Falla de restricción de acceso a URL|A10 - Falla de restricción de acceso a URL]]&lt;br /&gt;
|Frecuentemente, una aplicacion solo protege funcionalidad delicada evitando mostrar la ligas o URLs a usuarios no autorizados. Los atacantes pueden usar esta debilidad para acceder y realizar operaciones no autorizadas al acceder a esas URLs directamente.&lt;br /&gt;
|}&lt;br /&gt;
'''&amp;lt;center&amp;gt;Tabla 1: La 10 mayores vulnerabilidades de OWASP 2007&amp;lt;/center&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hay muchas páginas en este documento que no están dedicadas a vulnerabilidades en específico y por lo tanto no están listadas en la tabla. Aqui hay una lista de ellas.&lt;br /&gt;
&lt;br /&gt;
{| border='1' cellpadding='2' &lt;br /&gt;
|-	&lt;br /&gt;
|[[Top 10 2007]]&lt;br /&gt;
|Ademas de proveer una presentación, y un marcador de la sección de &amp;quot;conclusiones&amp;quot; (esto puede hacerse arrastrando [https://www.owasp.org/index.php/Top_10_2007#Summary este enlace] a sus favoritos) nos da acceso rápido a el documento completo.&lt;br /&gt;
|-&lt;br /&gt;
|[[Top 10 2007-Metodología]]&lt;br /&gt;
|Una descripción de la metodología usada para selecionar las vulnerabilidades para este documento.&lt;br /&gt;
|-&lt;br /&gt;
|[[Top 10 2007-¿A dondé sigo Ahora?]]&lt;br /&gt;
|Algunas sugerencias sobre como proceder una ves que ha leído este documento.&lt;br /&gt;
|-&lt;br /&gt;
|[[Top 10 2007-Referencias]]&lt;br /&gt;
|Recomendaciones para lectura posterior.&lt;br /&gt;
|}&lt;br /&gt;
'''&amp;lt;center&amp;gt;Tabla 1a: Paginas en el documento de la ''lista de las 10 mayores 2007'' que no son la lista de vulnerabilidades mencionadas arriba.&amp;lt;/center&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
==Una nota sobre las diferentes versiones==&lt;br /&gt;
Mientras que la única versión oficial de la ''lista de las 10 mayores vulnerabilidades de OWASP 2007'' es la version en PDF y en inglés, OWASP ah puesto a su disposición este Wiki que inicialmente contenia el mismo contenido que el PDF. Pero OWASP espera que cambien con su ayuda. OWASP promueve el envolvimiento de la comunidad y quiere su ayuda para hacer la versión Wiki mejor que nunca. Para ayudar a esto han creado un pequeño [[Editing:Top_10_2007|tutorial]] para iniciarlo en este proceso.&lt;br /&gt;
&lt;br /&gt;
==Versiones para bajar==&lt;br /&gt;
Puede bajar la lista 2007 (versión final) aqui:&lt;br /&gt;
&lt;br /&gt;
* [http://www.owasp.org/images/e/e8/OWASP_Top_10_2007.pdf (PDF, 930 kb)]&lt;br /&gt;
&amp;lt;!--* [http://www.owasp.org/images/2/24/OWASP_Top_10_2007.doc (Word, 514 kb)]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/a/ae/OWASP_Top_10_2007_Spanish.pdf (Español PDF, 488kb)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/c/ce/OWASP_Top_10_2007_-_French.pdf (Francés PDF, 455 kb)]&lt;br /&gt;
&lt;br /&gt;
* [http://www.metasecurity.org/owasp/OWASP_Top_10_2007_Korean.pdf (Koreano PDF, 768 kb)]&lt;br /&gt;
&lt;br /&gt;
* [http://csirt.ulakbim.gov.tr/dokumanlar/Ceviri_OWASP_ilk10_2007.pdf (Turco PDF, 718 kb)]&lt;br /&gt;
&lt;br /&gt;
* [http://www.owasp.org/images/4/42/OWASP_TOP_10_2007_PT-BR.pdf (Portuguese Brasileño PDF, 329 kb)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/8/89/OWASP_Top_10_2007_for_JEE.pdf OWASP Top 10 para la versión empresarial de Java (PDF, 630 kb)]&lt;br /&gt;
&lt;br /&gt;
* Le gustaría tener esta versión en otro idioma? podriamos usar su ayuda para traducirla. Contacte a Andrew van der Stock (vanderaj ...(@)... owasp.org) para ayudarnos a traducir la lista de las 10 mayores a otro idioma.&lt;br /&gt;
&lt;br /&gt;
{{Top_10_2007:BottomTemplate|usenext=NextLink|next=-Metodología|useprev=Nothing|usemain=Nothing}}&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_JBroFuzz_Tutorial&amp;diff=83957</id>
		<title>OWASP JBroFuzz Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_JBroFuzz_Tutorial&amp;diff=83957"/>
				<updated>2010-05-26T16:47:59Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Introduction  ==&lt;br /&gt;
&lt;br /&gt;
''“If you can’t fuzz with JBroFuzz, you probably do not want to fuzz!”'' &lt;br /&gt;
&amp;lt;div align=&amp;quot;right&amp;quot;&amp;gt;Old JBroFuzz Motto &amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The art of teaching, Mark Van Doren said, is the art of assisting discovery. Fuzzing is a representative discipline towards assisting the discovery of security vulnerabilities, that is just beginning to come of age. Over the last two years, through continuous development, JBroFuzz has attempted to expose the intrinsic beauty of the subject: Constantly submit a vast amount of payloads to a service, device or prompt, waiting for the one response that makes all the difference. This is the mentality that JBroFuzz embraces and attempts to offer back to security professionals. &lt;br /&gt;
&lt;br /&gt;
Fuzzing as a concept goes beyond a conventional work flow or a standard methodology. I would argue that to know how to fuzz well, is to master a new language. Thus, similar to the process of learning a programming (or foreign) language, there are three things you must master: &lt;br /&gt;
&lt;br /&gt;
• Grammar: How fuzzing as a process is structured&amp;lt;br&amp;gt; • Vocabulary: How to name fuzzing concepts you want to use&amp;lt;br&amp;gt; • Usage: Ways of achieving everyday effective results with fuzzing&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:001-JBroFuzz-Tutorial.jpg|right|300px|JBroFuzz Splash Screen]]From the pre-existing information available for JBroFuzz, this tutorial focuses on usage: How to best put a fuzzing tool to good use, either via the UI, or using APIs that ''JBroFuzz.jar'' is constituted of. As a result, this document has a small requirement as a caveat; you need to have a beginner level understanding of the Java programming language in order to understand some sections. &lt;br /&gt;
&lt;br /&gt;
There are a number of working examples described here within, which '''grep''' for statements such as “''&amp;lt;nowiki&amp;gt;public static void main(String[] args)&amp;lt;/nowiki&amp;gt;''”. The majority of the content relates to reviewing these examples and putting the Java syntax into a fuzzing perspective. &lt;br /&gt;
&lt;br /&gt;
To summarise, this tutorial focuses on customary and effective usage of fuzzing through the JBroFuzz Java APIs and the respective UI. It is targeting (without attacking them) web applications. Without further redo, let’s get fuzzing!&lt;br /&gt;
&lt;br /&gt;
== JBroFuzz Basic Functionality  ==&lt;br /&gt;
&lt;br /&gt;
This section carries a number of basic fuzzing examples to get you started with JBroFuzz. Overall, even though the actions performed to not produce any amazing fuzzing results, it serves as a starting point in understanding how to perform particular fuzzing operations on web applications. &lt;br /&gt;
&lt;br /&gt;
=== 'Hello Google!' (forget 'Hello World')  ===&lt;br /&gt;
&lt;br /&gt;
As the traditional first program that you learn when indulging in a new programming language, 'Hello World!' represents the norm for understanding the basic output operations and syntax (let alone compiler and execution behaviour) of the language in question. &lt;br /&gt;
&lt;br /&gt;
As with most web application security related tools, when I am given the responsibility to run them, often in order to understand how they work, I would first craft a legitimate, single request to a trusted (to be up and behaving) popular Internet location. Needless, to say this request more than on occasion finds itself on Google servers. &lt;br /&gt;
&lt;br /&gt;
So 'Hello World!' for programming languages seems to transform to 'Hello Google!' for understanding how web application security related tools work. Let us see, how JBroFuzz does it. &lt;br /&gt;
&lt;br /&gt;
• Double-click on JBroFuzz and browse to the 'Fuzzing' tab &lt;br /&gt;
&lt;br /&gt;
JBroFuzz is constituted of tabs, typically located in the bottom or top (if you bother to change the settings) of the main window. &lt;br /&gt;
&lt;br /&gt;
The 'Fuzzing' tab is where you craft your request message to a particular host. Once that is in place, you can select any part of the request and proceed into adding any number of payloads. We shall see how in later sections. &lt;br /&gt;
&lt;br /&gt;
• In the 'URL' field type: http://www.google.com/ http://www.google.com &lt;br /&gt;
&lt;br /&gt;
Unlike conventional URLs, the URL field in JBroFuzz is only used for the underlying protocol (HTTP or HTTPS), host name (e.g. www.yahoo.com) and (optionally) port number. &lt;br /&gt;
&lt;br /&gt;
All remaining information pasted or typed into the 'URL' field will be ignored; you are expected to enter it in the 'Request' field below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Still, if you want to just copy-paste a URL from a browser, hit [Ctrl+L] while you are not fuzzing, paste the URL value that you have copied from a browser and JBroFuzz will automatically do the work for you. &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Examples of valid URL values to be put in the &lt;br /&gt;
&lt;br /&gt;
Treat the 'URL' and 'Request' fields as the two stages of a 'telnet' session on port 80; you are effectively using the 'URL' field to specify the equivalent of: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;amp;gt;telnet www.google.com 8088&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
As equivalent to: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;http://www.google.com:8088&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
or in the case of HTTPS: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;https://www.google.com:8088&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Naturally, default ports for HTTP is 80 and HTTPS is 443. &lt;br /&gt;
&lt;br /&gt;
• In the 'Request' field type: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET / HTTP/1.0&amp;lt;br&amp;gt; &amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
And press 'Enter' twice &lt;br /&gt;
&lt;br /&gt;
This is where the body of the message you are sending is to be placed. So anything obeying HTTP/S protocol, such as GET and POST requests, header fields and/or HTML content should be included here. &lt;br /&gt;
&lt;br /&gt;
As part of the process of fuzzing web applications with JBroFuzz you need to have done your homework, in terms of providing a base request message. This message is what will be used later on to add payloads to particular sections of the request. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;• Hit 'Start' [Ctrl+Enter]&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This will instigate the process of sending a single request to the specified host on a given (or default) port, over HTTP or HTTPS. &lt;br /&gt;
&lt;br /&gt;
Once a connection has been established JBroFuzz will proceed to submit the message you have typed into the 'Request' field. &lt;br /&gt;
&lt;br /&gt;
Finally, JBroFuzz will log all data sent and received into a file; accessing this file is typically a process of double clicking on the output line on the table at the bottom section of the 'Fuzzing' tab. &lt;br /&gt;
&lt;br /&gt;
You should see a response received in the bottom part of the 'Fuzzing' panel. Double click (or right click for more options) to see the information exchanged; typically this would be a 302 redirect pointing you to another location. Congratulations, you have just said &amp;quot;Hello&amp;quot; to Google! &lt;br /&gt;
&lt;br /&gt;
[[Image:002-JBroFuzz-Tutorial.png|500px|JBroFuzz Hello Google!]] &lt;br /&gt;
&lt;br /&gt;
Now this would typically be enough under RFC rules, to get a response back; but damn all the bots out here, most websites require further information to respond back. So, in the 'Request' field let's pretend to be a (kind of) legitimate browser by typing: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET / HTTP/1.0&amp;lt;br&amp;gt; Host: www.google.com&amp;lt;br&amp;gt; User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729) JBroFuzz/1.5&amp;lt;br&amp;gt; Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-gb,en;q=0.5Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&amp;lt;br&amp;gt; &amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Not forgetting to end the request typed with two returns: Press 'Enter' twice. Again, you should be able to see a line added with the response received back. &lt;br /&gt;
&lt;br /&gt;
Practice sending single requests to a website of your choice by changing the URL and also the 'Host:' field from the 'Request' above. Also try accessing an HTTPS website. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Alternatively, you can use the shortcut [Ctrl+L] to type in your URL, with the 'Request' field filled automatically, based on the URL you have typed. &amp;lt;/nowiki&amp;gt; &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== HTTP Version Numbers &amp;amp;amp; www.cia.gov Headerless Responses  ===&lt;br /&gt;
&lt;br /&gt;
For web applications, very often ill-defined requests submitted over the Internet, will trigger semi-legitimate responses that actually do not obey HTTP RFC protocol specification. Often, even though this is not the case in this example, these responses can lead to the identification of one or more security vulnerabilities. &lt;br /&gt;
&lt;br /&gt;
In this example we test for the responses received for invalid HTTP version numbers on a particular website, namely www.cia.gov, over https. Now a word of caution here; please do not attempt to fuzz web applications that you do not have the authority to do so, especially over the Internet. &lt;br /&gt;
&lt;br /&gt;
Still, for the purposes of this tutorial exercise, we will subject a web server to no more than a dozen or so requests. These requests would be otherwise identical, if it was not for the HTTP version number incrementing by a value of 1 on each request. &lt;br /&gt;
&lt;br /&gt;
In terms of having the authority to do so, well this is identical to hitting 'Refresh' in your web browser a dozen or so times, while you are browsing to www.cia.gov. I do not consider this remotely close to any form of hacking, cracking, or proper fuzzing; web servers across the globe receive a lot more abuse than this on a daily basis. &lt;br /&gt;
&lt;br /&gt;
Finally, by the time you are reading this, the particular issue described might have been fixed. So here goes: &lt;br /&gt;
&lt;br /&gt;
• Within JBroFuzz, select: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;File -&amp;amp;gt; Open Location [Ctrl+L]&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Type: https://www.cia.gov and hit enter. This is depicted in the following screenshot: &lt;br /&gt;
&lt;br /&gt;
[[Image:003-JBroFuzz-Tutorial.png|JBroFuzz Open Location]] &lt;br /&gt;
&lt;br /&gt;
Hitting 'Enter' should automatically populate the 'URL' field and the 'Request' field within the 'Fuzzing' tab. What you see is the base request that we intend to add fuzzing payloads to. Before we do so, let us make one small alteration first: &lt;br /&gt;
&lt;br /&gt;
• Modify the first line of the 'Request' field to: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET / HTTP/0.0&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Our objective is to enumerate the supported by the web server (in this case www.cia.gov) HTTP version numbers, following the two digit format that it has. We could be a lot more agressive here and test for buffer overflows and all types of injection; that would be out of line without the authority to do so. Instead we are going to see how JBroFuzz will iterate through the values of 0.0 to 1.4 by means of adding a Fuzzer to our base request. &lt;br /&gt;
&lt;br /&gt;
• Highlight the second zero from the line 'GET / HTTP/0.0' and right-click, selecting 'Add'. This is depicted in the screeshot below: &lt;br /&gt;
&lt;br /&gt;
[[Image:004-JBroFuzz-Tutorial.png|400px|Adding a Fuzzer to the HTTP version number]] &lt;br /&gt;
&lt;br /&gt;
• From the appearing 'Add a Fuzzer' window, select as 'Category Name', in the most left column 'Base' and as 'Fuzzer Name' in the middle column 'Base 10 (Decimal) Alphabet. &lt;br /&gt;
&lt;br /&gt;
• Click on 'Add Fuzzer' on the bottom right of the window &lt;br /&gt;
&lt;br /&gt;
[[Image:005-JBroFuzz-Tutorial.png|400px|Adding a Fuzzer]] &lt;br /&gt;
&lt;br /&gt;
This should add a Fuzzer of length 1 that iterates over the decimal (i.e. base 10) numbers 0 to 9. If we have added a hexadecimal Fuzzer instead of a decimal one (i.e. base 16) the iteration would from 0 to F. If we had selected two digits instead of one and proceeded to add a decimal Fuzzer, the iteration would be from: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;00&amp;lt;br&amp;gt; 01&amp;lt;br&amp;gt; ..&amp;lt;br&amp;gt; 98&amp;lt;br&amp;gt; 99&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
From a User Interface (UI) perspective you should see a line added to the 'Added Payloads Table'. &lt;br /&gt;
&lt;br /&gt;
• Click 'Start' [Ctrl+Enter] &lt;br /&gt;
&lt;br /&gt;
This process will send 10 requests to the specified web server changing only first line of the request to: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET / HTTP/0.0...&amp;lt;br&amp;gt; GET / HTTP/0.1...&amp;lt;br&amp;gt; ...&amp;lt;br&amp;gt; GET / HTTP/0.8...&amp;lt;br&amp;gt; GET / HTTP/0.9...&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
While this is ongoing, you can sort the results by 'No' in the 'Output' table in the bottom of the 'Fuzzing' tab. This should enable you to see what request is currently being transmitted and received in real time. &lt;br /&gt;
&lt;br /&gt;
Once complete, change the first line of the 'Request' field to read: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET / HTTP/1.0&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
• Click 'Start' [Ctrl+Enter] &lt;br /&gt;
&lt;br /&gt;
The resulting output should resemble the following screenshot: &lt;br /&gt;
&lt;br /&gt;
[[Image:006-JBroFuzz-Tutorial.png|500px|JBroFuzz Output from a Fuzzing Session]] &lt;br /&gt;
&lt;br /&gt;
Straight away we can notice a difference in the response size: For HTTP version numbers 0.0 to 0.9 we are getting back what seems fairly big in size responses; 32222 bytes in size worth of responses, given that HTTP protocol version 0.0 to 0.8 do not officially exist! &lt;br /&gt;
&lt;br /&gt;
By double-clicking on one of these requests, we can see that the web server in question is responding back with no headers, yet returning a full HTML body; this represents the 32222 bytes of response of data we are receiving back. The following screenshot illustrates this: &lt;br /&gt;
&lt;br /&gt;
[[Image:007-JBroFuzz-Tutorial.png|300px|JBroFuzz Output for a Single Request/Response]] &lt;br /&gt;
&lt;br /&gt;
Using the 'Graphing' tab we can proceed to graph the particular requests and responses for this given session. &lt;br /&gt;
&lt;br /&gt;
• Within the 'Graphing' tab, click 'Start' [Ctrl+Enter]. &lt;br /&gt;
&lt;br /&gt;
• Select the directory corresponding to the Output folder we have used for this fuzzing session. This will typically be the last one. &lt;br /&gt;
&lt;br /&gt;
• Right-click and select 'Graph' &lt;br /&gt;
&lt;br /&gt;
Once complete, browse to the 'Response Size' tab within the 'Graphing' tab, as illustrated in the screenshot below: &lt;br /&gt;
&lt;br /&gt;
[[Image:008-JBroFuzz-Tutorial.png|300px|JBroFuzz Graphing different 'Response Sizes']] &lt;br /&gt;
&lt;br /&gt;
To re-iterate this does not present a security vulnerability in any shape or form; merely the fact that by manipulating HTTP version numbers as part of the request we transmit, we can impact the response that we get back. In this case, what changes is the non-existent header fields, with some HTML content being received back. &lt;br /&gt;
&lt;br /&gt;
If I was to guess what is causing this, I would say that some sort of load balancing or content delivery is not happening as it should when non-existent version numbers are being transmitted. &lt;br /&gt;
&lt;br /&gt;
== Using JBroFuzz with a Generic Proxy  ==&lt;br /&gt;
&lt;br /&gt;
JBrofuzz 2.0 and subsequent releases include generic proxy support. As of this writing, basic authentication is supported with plans to eventually support NTLM and Kerberos authentication as well. We've tried to make the use of a proxy as straight forward as possible. All arguments for the proxy can be passed in the URL field and will take one of the following forms. &lt;br /&gt;
&amp;lt;pre&amp;gt;Without Authentication: &amp;amp;lt;proxy server&amp;amp;gt;:&amp;amp;lt;proxy port&amp;amp;gt;&lt;br /&gt;
With Authentication: &amp;amp;lt;proxy username&amp;amp;gt;:&amp;amp;lt;proxy password&amp;amp;gt;@&amp;amp;lt;proxy server&amp;amp;gt;:&amp;amp;lt;proxy port&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The structure of the request field and whether the GET parameter contains an absolute URL depends on the proxy you are using. For this reason, you may have to do a bit of trial and error to determine what format(s) your proxy accepts. To make all of this a bit clearer lets look at a couple of examples. &lt;br /&gt;
&lt;br /&gt;
=== Squid Proxy  ===&lt;br /&gt;
&lt;br /&gt;
In the first example, we are fuzzing through a squid proxy that requires ncsa user authentication as shown in the figure below. When producing similar results, its important that you use your own proxy and not the one shown in the figure. This proxy was setup for demonstration purposes, will not accept connections from your IP address, and the credentials will no longer be active. &lt;br /&gt;
&lt;br /&gt;
[[Image:016-JBroFuzz-Tutorial.jpg|503x449px]] &lt;br /&gt;
&lt;br /&gt;
=== Paros Proxy  ===&lt;br /&gt;
&lt;br /&gt;
In the second example, we are fuzzing through a local Paros proxy running on port 8080 that does not require user authentication. Notice the difference in the syntax of the URL field when user authentication is not required. &lt;br /&gt;
&lt;br /&gt;
[[Image:017-JBroFuzz-Tutorial.jpg|503x449px]] &lt;br /&gt;
&lt;br /&gt;
In the third example, we are still fuzzing through Paros, but notice the slight difference in the Request Field. Specifically, pay special attention to the GET line. We are no longer including the fully qualified path. Unlike Squid, Paros will accept both formats. Keep this in mind when you are performing initial testing with JBroFuzz and the proxy of your choice. &lt;br /&gt;
&lt;br /&gt;
[[Image:018-JBroFuzz-Tutorial.jpg|503x449px]]&lt;br /&gt;
&lt;br /&gt;
=== Burp Proxy  ===&lt;br /&gt;
In the final example, we are fuzzing through Burp. Similar to Squid, Burp requires absolute URLs in the request. A successful Burp request is shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:019-JBroFuzz-Tutorial.jpg|503x449px]]&lt;br /&gt;
&lt;br /&gt;
== Using JBroFuzz with Paros Proxy ==&lt;br /&gt;
&lt;br /&gt;
JBroFuzz is a standalone fuzzer; it can release and create sockets over HTTP and HTTPS, but in order to use JBroFuzz correctly you will have to know what it is that you are fuzzing. &lt;br /&gt;
&lt;br /&gt;
In comes the need for a proxy tool; the opening versions of JBroFuzz actually had a proxy tab that you could use to intercept traffic generated by your web browser. That functionality got removed in an attempt to focus and deliver solely on the fuzzing capabilities of the tool. &lt;br /&gt;
&lt;br /&gt;
This section details how to use JBroFuzz in combination with a client side proxy. The one selected is Paros Proxy, which, despite the fact that it hasn't been updated since 2006 is still a popular tool that you see in web security testing live CDs. You could use any of the other proxy tools available. &lt;br /&gt;
&lt;br /&gt;
=== Winning on a Remix of the Year Award ===&lt;br /&gt;
&lt;br /&gt;
At 17:53, on a frosty winter evening, a message window popped up: &lt;br /&gt;
&amp;lt;pre&amp;gt;17:53 http://www.localhost.com/remixcontest/club/annual2010.html&lt;br /&gt;
17:53 Hey bro, could you cast in a vote here for the Such &amp;amp;amp; Such Remix?&lt;br /&gt;
17:53 Appreciated!&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
A friend in need is a friend indeed, so here goes I thought. Opening up a web browser configured to work with Paros as an intermediate proxy, allowed for the casting of my vote. while keeping a record of each request and reply. &lt;br /&gt;
&lt;br /&gt;
No registration, or any other form of submitting an identifier was needed. The request that Paros stored for the casting of the actual vote was: &lt;br /&gt;
&amp;lt;pre&amp;gt;GET http://www.localhost.com/remixcontest/club/vote.php?onLoad=%5Btype%20Method%5D&amp;amp;amp;id=55 HTTP/1.1&lt;br /&gt;
Host: www.localhost.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) Paros/3.2.13&lt;br /&gt;
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&lt;br /&gt;
Accept-Language: en-gb,en;q=0.5&lt;br /&gt;
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&lt;br /&gt;
Keep-Alive: 300&lt;br /&gt;
Proxy-Connection: keep-alive&lt;br /&gt;
Cookie: PHPSESSID=ab6afb883dbgf8084f6dcf1eafdb225e&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Paros Proxy actually places the domain (in this case www.localhost.com) with the protocol (i.e. http) in front of the GET request. As a result, you can't open a telnet/netcat session and just copy-paste the above. Similarly when we bring the request into JBroFuzz, a bit of tweaking is required. &lt;br /&gt;
&lt;br /&gt;
*In the URL field, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.localhost.com&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
In the Request field, let's keep what is of interest: &lt;br /&gt;
&amp;lt;pre&amp;gt;GET /remixcontest/club/vote.php?onLoad=%5Btype%20Method%5D&amp;amp;amp;id=55 HTTP/1.0&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5&lt;br /&gt;
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&lt;br /&gt;
Accept-Language: en-gb,en;q=0.5&lt;br /&gt;
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&lt;br /&gt;
Cookie: PHPSESSID=ab6afb883dbgf8084f6dcf1eafdb225e&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
No needs for Keep-Alive and Proxy-Connection. Let's simplify the HTTP request by making it a version 1.0 request and getting rid of the Host header as well. Also on the user agent, let us keep that mainstream vanilla: Firefox on Windows (popular browser combination), getting rid of the .NET and Paros additives. &lt;br /&gt;
&lt;br /&gt;
Checking on the website, our Such &amp;amp;amp; Such remix already has about 100 votes or so and the top remix has approximately 310 votes. Let's fuzz this: &lt;br /&gt;
&lt;br /&gt;
*Select 2 of the digits of the cookie value:&lt;br /&gt;
&amp;lt;pre&amp;gt;PHPSESSID=ab6afb883dbgf8084f6dcf1eafdb225e&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Select: Panel -&amp;amp;gt; Add&lt;br /&gt;
&lt;br /&gt;
*In the &amp;quot;Add a Fuzzer&amp;quot; panel, select:&lt;br /&gt;
&amp;lt;pre&amp;gt;Base -&amp;amp;gt; Base16 (HEX)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
and select &amp;quot;Add Fuzzer&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
This will add a line within the Payloads tab on the right hand side. &lt;br /&gt;
&lt;br /&gt;
Our cookie value above (PHPSESSID=ab6afb883dbgf8084f6dcf1eafdb225e) is in lowercase, hexadecimal format. Let's make sure the encoding we select is also that. &lt;br /&gt;
&lt;br /&gt;
Within the Payloads tab, click on the encoding drop down menu and select lowercase. Just before clicking &amp;quot;Start&amp;quot;, JBroFuzz should look something like the screenshot below. &lt;br /&gt;
&lt;br /&gt;
[[Image:014-JBroFuzz-Tutorial.png|Adding Votes by iterating through PHPSESSID cookie values]] &lt;br /&gt;
&lt;br /&gt;
== Performing User Enumeration with a Valid Set of Credentials  ==&lt;br /&gt;
&lt;br /&gt;
Often you encounter an application that allows for the enumeration of one or more pages after a user has been successfully granted a set of session credentials. One of the key areas to test from an application specific perspective, relates to the page(s) that provide user account information. &lt;br /&gt;
&lt;br /&gt;
In the following example, we investigate an ASP.NET 2.0 application with a C# back-end. In this, an authenticated user has the option to select to &amp;quot;View My Profile&amp;quot;. This page provides them with account information (including the typical username, email address, further notes) that they can proceed to update and save to the back-end system. &lt;br /&gt;
&lt;br /&gt;
After a user has authenticated, the following URL, gives them access to their profile information stored on the database: &lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.myattackingdomain.com/portal-location/UserInfo.aspx?UserID=23&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Simple investigation confirms that the digits allowed as part of the UserID value are decimal numbers only. Lets feed that information into JBroFuzz. &lt;br /&gt;
&lt;br /&gt;
=== Fuzzing a User ID ===&lt;br /&gt;
&lt;br /&gt;
• Within JBroFuzz, select: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;File -&amp;amp;gt; Open Location [Ctrl+L]&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Type: http://www.myattackingdomain.com/portal-location/UserInfo.aspx?UserID=23 and hit enter. This is depicted in the following screenshot: &lt;br /&gt;
&lt;br /&gt;
[[Image:009-JBroFuzz-Tutorial.png|300px|JBroFuzz 'GET' Request with a 'UserID' parameter]] &lt;br /&gt;
&lt;br /&gt;
From the URL the important parameter is the value of the UserID query string (the value 23, above). We want to fuzz that. &lt;br /&gt;
&lt;br /&gt;
• Within the Fuzzing Tab, in the &amp;quot;Request&amp;quot; text area, highlight the above number 23 • Right-click and select &amp;quot;Add&amp;quot; &lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;Add a Fuzzer&amp;quot; window that appears, select: &lt;br /&gt;
&lt;br /&gt;
• Category Name: &amp;lt;code&amp;gt;Base&amp;lt;/code&amp;gt; • Fuzzer Name: &amp;lt;code&amp;gt;Base10 (DEC)&amp;lt;/code&amp;gt; • Select &amp;quot;Add Fuzzer&amp;quot; in the bottom right &lt;br /&gt;
&lt;br /&gt;
This would have added a decimal (base 10 fuzzer) of length 2 onto the location. &lt;br /&gt;
&lt;br /&gt;
• You will see a row added within the &amp;quot;Added Fuzzers Table&amp;quot; of the Fuzzing panel. • Click &amp;quot;Start&amp;quot; &amp;lt;code&amp;gt;Ctrl+Enter&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This will transmit 100 requests to the domain in question, which in this case is assumed: www.myattackingdomain.com. The value being changed within each request will be: &lt;br /&gt;
&amp;lt;pre&amp;gt;• GET /portal-location/UserInfo.aspx?UserID=00 HTTP/1.0&lt;br /&gt;
• GET /portal-location/UserInfo.aspx?UserID=01 HTTP/1.0&lt;br /&gt;
...&lt;br /&gt;
• GET /portal-location/UserInfo.aspx?UserID=98 HTTP/1.0&lt;br /&gt;
• GET /portal-location/UserInfo.aspx?UserID=99 HTTP/1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Done. Let's proceed to graph the responses that we have obtained. Our objective is to understand which two-digit numbers from 00 to 99 correspond to valid user accounts. &lt;br /&gt;
&lt;br /&gt;
=== Graphing Results ===&lt;br /&gt;
&lt;br /&gt;
• Within the &amp;quot;Graphing&amp;quot; tab, click &amp;quot;Start&amp;quot; &amp;lt;code&amp;gt;Ctrl+Enter&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A list of directories will appear on the left-hand side. If you scroll to the bottom of the list you should see the directory corresponding to your fuzzing session, in our case it was (175 2009-06-24 16-18-24) &lt;br /&gt;
&amp;lt;pre&amp;gt;• Right-click on (175 2009-06-24 16-18-24)&lt;br /&gt;
• Click &amp;quot;Graph&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This will generate the graphs in their respective tabs. The question now becomes which graph is of interest for our user enumeration exercise. &lt;br /&gt;
&lt;br /&gt;
By definition enumerating users against an ID value, or any other identifier involves being able to obtain a different response for an existing user to that of a user that is not have a corresponding ID value. &lt;br /&gt;
&lt;br /&gt;
Thus, from the metrics available, the one useful for enumerating users will be that of measuring the &amp;quot;Hamming Distance&amp;quot; between responses received. Based on the JBroFuzz documentation: &lt;br /&gt;
&lt;br /&gt;
'''Fuzzing Hamming Distance ''' &lt;br /&gt;
&amp;lt;pre&amp;gt;A bar chart with the hamming distance of the characters in the response, &lt;br /&gt;
relative to the first response received. Check each character of the first&lt;br /&gt;
response received, against the character at the same position of the&lt;br /&gt;
current response received. If they are not identical, increment the &lt;br /&gt;
hamming distance.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
As we can see the Fuzzing Hamming Distance (FHD) varies quite a bit from the definition of the normal hamming distance term, used in telecommunications. Still, they share a lot of similarities. &lt;br /&gt;
&lt;br /&gt;
As we can from the above, the first request is critical to calibrating our user enumeration exercise. It represents the value that all other Fuzzing Hamming Distances (FHD) will be measured and normalised towards. For the java-skilled audience, the algorithm is quite trivial, but offers spectacular results in distinguishing responses: &lt;br /&gt;
&amp;lt;pre&amp;gt;in = new BufferedReader(new FileReader(f));&lt;br /&gt;
   58 &lt;br /&gt;
   59 			int counter = 0;&lt;br /&gt;
   60 			int check = 0;&lt;br /&gt;
   61 			int c;&lt;br /&gt;
   62 			while (((c = in.read()) &amp;amp;gt; 0) &amp;amp;amp;&amp;amp;amp; (counter &amp;amp;lt; MAX_CHARS)) {&lt;br /&gt;
   63 &lt;br /&gt;
   64 				// If we are passed &amp;quot;--jbrofuzz--&amp;amp;gt;\n&amp;quot; in the file&lt;br /&gt;
   65 				if (check == END_SIGNATURE.length()) {&lt;br /&gt;
   66 &lt;br /&gt;
   67 					firstSet.append((char) c);&lt;br /&gt;
   68 &lt;br /&gt;
   69 				}&lt;br /&gt;
   70 				// Else find &amp;quot;--jbrofuzz--&amp;amp;gt;\n&amp;quot; using a counter&lt;br /&gt;
   71 				else {&lt;br /&gt;
   72 					// Increment the counter for each success&lt;br /&gt;
   73 					if (c == END_SIGNATURE.charAt(check)) {&lt;br /&gt;
   74 						check++;&lt;br /&gt;
   75 					} else {&lt;br /&gt;
   76 						check = 0;&lt;br /&gt;
   77 					}&lt;br /&gt;
   78 				}&lt;br /&gt;
   79 &lt;br /&gt;
   80 				counter++;&lt;br /&gt;
   81 &lt;br /&gt;
   82 			}&lt;br /&gt;
   83 			in.close();&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Ergo, the corresponding graph is depicted in the screenshot below. The peak graphs correspond to number that if you hover the mouse over will give you the enumeration ID of a valid user. &lt;br /&gt;
&lt;br /&gt;
[[Image:015-JBroFuzz-Tutorial.png|500px|Measuring Hamming Distance for User Enumeration]] &lt;br /&gt;
&lt;br /&gt;
== Eliminating False Positives: LDAP Injection ==&lt;br /&gt;
&lt;br /&gt;
Every now and then a tool (that does not produce false positives) will hit an application reporting back a huge variety of (hopefully not confirmed, but pending further investigation) injection findings. &lt;br /&gt;
&lt;br /&gt;
Due to the limited number of characters required in performing LDAP Injection, such issues will be high on that list. But let's refresh our memory a bit of how LDAP injection works:&lt;br /&gt;
&lt;br /&gt;
http://www.owasp.org/index.php/LDAP_injection&lt;br /&gt;
&lt;br /&gt;
So typically, during an automated scan, negating LDAP cn-type queries would be submitted and their responses noted. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET /myfilelocation.jsp?lang=en&amp;amp;city=user)(sn=*&amp;amp;rid=97 HTTP/1.1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET /myfilelocation.jsp?lang=en&amp;amp;city=user)!(sn=*&amp;amp;rid=97 HTTP/1.1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET /myfilelocation.jsp?lang=en&amp;amp;city=admin*)((|userpassword=*)&amp;amp;rid=97 HTTP/1.1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As great as this check might be from an LDAP perspective, it has a high likelihood of generating false positives, due to the character sets being used. Ergo, a protection mechanism (silly worst-case blacklist present for example) would typically hunt down cross-site scripting and sql injection type of characters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt; &amp;gt; ' etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not considering =, *, or brackets as completely bad (he says). &lt;br /&gt;
&lt;br /&gt;
=== What characters are allowed through? ===&lt;br /&gt;
&lt;br /&gt;
Enough of all that; we want to know what responses are allowed back and what's different about them for all characters being filtered through a black-list.&lt;br /&gt;
&lt;br /&gt;
Let's transform the above GET into the following and proceed to add a single fuzzer that tells us that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET /myfilelocation.jsp?lang=en&amp;amp;city=X&amp;amp;rid=97 HTTP/1.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now in the position of the X character, proceed to add an ASCII 94 Alphabet Fuzzer (available in version 2.1 and above). This will check the responses for all characters which are printable ASCII, with the exception of space.&lt;br /&gt;
&lt;br /&gt;
In total there are 95 printable ASCII characters; minus the one present for space (yes, the one you hit all the time, every day) leaves 94. This fuzzer produces each of those values, in incrementing ASCII order.&lt;br /&gt;
&lt;br /&gt;
[[Image:020-JBroFuzz-Tutorial.png|500px|Measuring Size Length for Single Character ASCII 94 Fuzzing]] &lt;br /&gt;
&lt;br /&gt;
Based on the above graph, the following responses trigger a different response size. Thus the characters blocked by a black-list are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! &amp;quot; , &amp;lt; &amp;gt; @ [ \ ] ^ ` { | } ~&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Interesting. Know any payloads that can evade those?&lt;br /&gt;
:)&lt;br /&gt;
&lt;br /&gt;
== JBroFuzz Development Corner  ==&lt;br /&gt;
&lt;br /&gt;
This section presents how to setup and use JBroFuzz as a fuzzing library. Also, it offers an insight in how to setup and compile your own version of JBroFuzz. As different people have different levels of expertise of the java programming language, eclipse, ant and subversion, some of the steps presented herein might be considered basic by advanced developers. &lt;br /&gt;
&lt;br /&gt;
=== Setting up a JBroFuzz Development Environment ===&lt;br /&gt;
&lt;br /&gt;
This section guides you towards setting up a development environment for JBroFuzz. Despite the Operating System (O/S) being windows XP, a similar process can be followed in a number of other O/S. &lt;br /&gt;
&lt;br /&gt;
You will need to have installed: &lt;br /&gt;
&lt;br /&gt;
*Tortoise SVN (using TortoiseSVN-1.6.6.17493-win32-svn-1.6.6.msi) &lt;br /&gt;
*Eclipse Java (using eclipse-java-galileo-SR1-win32.zip)&lt;br /&gt;
&lt;br /&gt;
Optionally, if you don't like building your application through eclipse you could also require to install Apache Ant. &lt;br /&gt;
&lt;br /&gt;
==== Step 1: Obtain the source code ====&lt;br /&gt;
&lt;br /&gt;
JBroFuzz uses SubVersion with the repository being publicly available for download through anonymous access on sourceforge. There is a plan to move it the source to the OWASP Git repository, but until then, use the guidelines below. &lt;br /&gt;
&lt;br /&gt;
[[Image:010-JBroFuzz-Tutorial.png|Tortoise SVN Check out JBroFuzz Source Code]] &lt;br /&gt;
&lt;br /&gt;
Right click on the folder location where you want to download the source code and select: &lt;br /&gt;
&lt;br /&gt;
*SVN Checkout&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;URL of repository&amp;quot;, enter: &lt;br /&gt;
&amp;lt;pre&amp;gt;https://jbrofuzz.svn.sourceforge.net/svnroot/jbrofuzz&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
In the &amp;quot;Checkout directory&amp;quot;, enter the folder location of your choice, in this case: &lt;br /&gt;
&amp;lt;pre&amp;gt;C:\root\code\jbrofuzz&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
In the &amp;quot;Checkout Depth&amp;quot; select: &lt;br /&gt;
&lt;br /&gt;
*Fully recursive&lt;br /&gt;
&lt;br /&gt;
Untick &amp;quot;Omit Externals&amp;quot; (should be unticked by default) &lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;Revision&amp;quot; select: &lt;br /&gt;
&lt;br /&gt;
*&amp;quot;Head revision&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Select OK. &lt;br /&gt;
&lt;br /&gt;
This process, once complete will checkout the entirety of the JBroFuzz source code from the SVN repository on sourceforge. &lt;br /&gt;
&lt;br /&gt;
==== Step 2: Configuring a JBroFuzz Project within Eclipse ====&lt;br /&gt;
&lt;br /&gt;
Having obtained the latest copy of the source code, the next step entails importing that source code within the Eclipse IDE. &lt;br /&gt;
&lt;br /&gt;
Within Eclipse, select: &lt;br /&gt;
&amp;lt;pre&amp;gt;File -&amp;amp;gt; New -&amp;amp;gt; Other&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
From the &amp;quot;New&amp;quot; panel that appears, select: &lt;br /&gt;
&amp;lt;pre&amp;gt;Java -&amp;amp;gt; Java Project from Existig Ant Buildfile&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
[[Image:011-JBroFuzz-Tutorial.png|Import JBroFuzz Code into Eclipse from Ant File]] &lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Next&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
In the next menu, under &amp;quot;Ant buildfile&amp;quot;, select &amp;quot;Browse&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Browse to the location where you have just (step 1) downloaded the source code and select the following file: &lt;br /&gt;
&lt;br /&gt;
*build.xml&lt;br /&gt;
&lt;br /&gt;
The build.xml file is an Ant build file that JBroFuzz uses. &lt;br /&gt;
&lt;br /&gt;
[[Image:012-JBroFuzz-Tutorial.png|Select the Ant File]] &lt;br /&gt;
&lt;br /&gt;
Selecting that file should have populated the &amp;quot;Project name&amp;quot; as jbrofuzz and also given you: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;javac&amp;quot; task found in target &amp;quot;compile&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
MAKE SURE TO TICK: &lt;br /&gt;
&lt;br /&gt;
*&amp;quot;Link to the buildfile in the filesystem&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Otherwise eclipse will try to replicate the source code within your workspace and that makes the process a tiny bit more complicated when it comes to actually building JBroFuzz. &lt;br /&gt;
&lt;br /&gt;
Click &amp;quot;Finish&amp;quot; &lt;br /&gt;
&lt;br /&gt;
You will see the item &amp;quot;Building workspace (76%) on the bottom right hand side of Eclipse. Once that is complete, you should see the jbrofuzz project on the top left corner of the Package Explorer within Eclipse. &lt;br /&gt;
&lt;br /&gt;
==== Step 3: Building JBroFuzz ====&lt;br /&gt;
&lt;br /&gt;
Within the Package Explorer, expand the jbrofuzz project and double-click on the build.xml file. &lt;br /&gt;
&lt;br /&gt;
Right click on the &amp;quot;build [default]&amp;quot; task within the &amp;quot;Outline&amp;quot; window (typically seen on the right hand side) and select: &lt;br /&gt;
&amp;lt;pre&amp;gt;Run As -&amp;amp;gt; 1. Ant Build [Alt+Shift+X, Q]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the build has been successful, a JBroFuzz.jar file within the the /jar folder would have been created. Following the path conventions above that should be in: &lt;br /&gt;
&amp;lt;pre&amp;gt;C:\root\code\jbrofuzz\jar\JBroFuzz.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
[[Image:013-JBroFuzz-Tutorial.png|Building JBroFuzz within Eclipse]] &lt;br /&gt;
&lt;br /&gt;
=== How to Use JBroFuzz as a Fuzzing Library ===&lt;br /&gt;
&lt;br /&gt;
Quite often what you need to do in terms of fuzzing, far exceeds the User Interface (UI) of JBroFuzz. For this reason, a set of core fuzzing APIs have been made available that can be used for more advanced fuzzing scenarios. &lt;br /&gt;
&lt;br /&gt;
The JBroFuzz.jar standalone archive (made available with every release) carries a core fuzzing library that holds a number of key classes. These are located under: &lt;br /&gt;
&amp;lt;pre&amp;gt;org.owasp.jbrofuzz.core.*;&lt;br /&gt;
-Database.java&lt;br /&gt;
-Fuzzer.java&lt;br /&gt;
-FuzzerBigInteger.java&lt;br /&gt;
-NoSuchFuzzerException.java&lt;br /&gt;
-Prototype.java&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The class of importance is Fuzzer.java. If you are going to use recursive iterators of great length, there is also FuzzerBigInteger.java. The difference between the two is that Fuzzer.java uses the primitive java data type long (up to 16^16 values) while FuzzerBigInteger.java uses java BigInteger to perform the counting. Naturally, the class FuzzerBigInteger is slower and takes more memory than the Fuzzer class. &lt;br /&gt;
&lt;br /&gt;
Within JBroFuzz a Fuzzer is an instance of a java Iterator. This implies that values can be accessed by simply calling the &amp;lt;code&amp;gt;next()&amp;lt;/code&amp;gt; method once an object has been made available. Typically, a call to &amp;lt;code&amp;gt;hasNext()&amp;lt;/code&amp;gt; should also be performed prior to avoid an exception being thrown. &lt;br /&gt;
&lt;br /&gt;
A Fuzzer can be obtained from the factory method &amp;lt;code&amp;gt;createFuzzer(String, int);&amp;lt;/code&amp;gt; available for every instance of the fuzzing Database. Ergo: &lt;br /&gt;
&lt;br /&gt;
==== A HelloFuzzer Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;Database myDatabase = new Database();&lt;br /&gt;
&lt;br /&gt;
Fuzzer myFuzzer = myDatabase.createFuzzer(&amp;quot;031-B16-HEX&amp;quot;, 5);&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
So how do I use the API? Here is a simple HelloFuzzer (file called HelloFuzzer.java) example: &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
&lt;br /&gt;
 try {&lt;br /&gt;
     for(Fuzzer f = fuzzDB.createFuzzer(&amp;quot;031-B16-HEX&amp;quot;, 4); f.hasNext();) {&lt;br /&gt;
       // Get the next payload value...&lt;br /&gt;
       System.out.println(&amp;quot; The fuzzer payload is: &amp;quot; + f.next());&lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloFuzzer.java OWASP JBroFuzz Example 1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
To compile the above use: &lt;br /&gt;
&amp;lt;pre&amp;gt;javac -classpath &amp;quot;.\jbrofuzz\jar\JBroFuzz.jar&amp;quot; HelloFuzzer.java&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This assumes that you are currently inside the directory where HelloFuzzer.java resides and that the JBroFuzz.jar is located two directories within your current location i.e. in jbrofuzz/jar. In order to run the above compiled HelloFuzzer class issue: &lt;br /&gt;
&amp;lt;pre&amp;gt;java -cp &amp;quot;.\jbrofuzz\jar\JBroFuzz.jar;.&amp;quot; HelloFuzzer&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note: The above 2 commands have been crafted in a win32 environment. The process for compiling and running HelloFuzzer.java above is the same in *nix machines. Simply replace the backslash &amp;quot;\&amp;quot; with &amp;quot;/&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
==== Fuzzing Payload Definitions ====&lt;br /&gt;
&lt;br /&gt;
Within the JBroFuzz.jar file, there is a file called fuzzers.jbrf that carries all the fuzzer definitions that you see in the UI payloads tab of JBroFuzz. To view a latest copy of this file you can browse the SVN repository of JBroFuzz: &lt;br /&gt;
&amp;lt;pre&amp;gt;http://jbrofuzz.svn.sourceforge.net/viewvc/jbrofuzz/tar/fuzzers.jbrf?view=log&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
A note here worth mentioning: Files ending in .jbrofuzz are session files saved by users while performing fuzzing operations. Files ending in .jbrf are JBroFuzz system files. Typical examples of .jbrf files are headers.jbrf, as well as fuzzers.jbrf. Both these use an internal proprietary format not to be confused with the .jbrofuzz file format. &lt;br /&gt;
&lt;br /&gt;
Fuzzers belong in categories (1 to many) and each fuzzer carries a set of payloads that define the alphabet of the fuzzer. &lt;br /&gt;
&lt;br /&gt;
Also, you have replacive and recursive fuzzers, zero fuzzers, etc. There are a number of different fuzzer categories. As an example of a fuzzer within the fuzzers.jbrf file, consider the hexadecimal fuzzer: &lt;br /&gt;
&amp;lt;pre&amp;gt;Fuzzer Name: Base16 (HEX)&lt;br /&gt;
Fuzzer Type: Recursive&lt;br /&gt;
Fuzzer Id:   031-B16-HEX&lt;br /&gt;
&lt;br /&gt;
Total Number of Payloads: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Within the fuzzers.jbrf file this fuzzer is defined in plain-text format as follows: &lt;br /&gt;
&amp;lt;pre&amp;gt;R:031-B16-HEX:Base16 (HEX):16&lt;br /&gt;
&amp;amp;gt; Number Systems | Base | Recursive Fuzzers&lt;br /&gt;
0&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
3&lt;br /&gt;
4&lt;br /&gt;
5&lt;br /&gt;
6&lt;br /&gt;
7&lt;br /&gt;
8&lt;br /&gt;
9&lt;br /&gt;
a&lt;br /&gt;
b&lt;br /&gt;
c&lt;br /&gt;
d&lt;br /&gt;
e&lt;br /&gt;
f&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; There is very little preventing you from defining your own fuzzers within this file, by following the file format specified above. You can use the UI to see if they have been loaded successfully. &lt;br /&gt;
&lt;br /&gt;
Further to recursive and replacive fuzzers you also have zero fuzzers (i.e. a zero fuzzer of 1000 will just transmit 1000 requests as they are, without adding any payloads) double fuzzers, cross product fuzzers, etc. &lt;br /&gt;
&lt;br /&gt;
Notice the factory method Database.createFuzzer(&amp;quot;031-B16-HEX&amp;quot;, 4) yielding: &amp;quot;I want a 4 digit recursive fuzzer (why because NUM-HEX is recursive in its definition, starts with R: instead of P:) of HEX digits.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Thus the above scenario would iterate through all the digits from 0000 to ffff. I wouldn't recommend using the above scenario for such trivial fuzzing capabilities; simply presented as an example of the inner workings of JBroFuzz.jar &lt;br /&gt;
&lt;br /&gt;
==== HelloFuzzer Refined ====&lt;br /&gt;
&lt;br /&gt;
A more detailed code breakdown of the above HelloFuzzer example can be found below: &lt;br /&gt;
&amp;lt;pre&amp;gt;/**&lt;br /&gt;
 * JBroFuzz API Examples 01&lt;br /&gt;
 *&lt;br /&gt;
 * JBroFuzz - A stateless network protocol fuzzer for web applications.&lt;br /&gt;
 * &lt;br /&gt;
 * Copyright (C) 2007, 2008, 2009 subere@uncon.org&lt;br /&gt;
 *&lt;br /&gt;
 * This file is part of the JBroFuzz API examples on how to use the &lt;br /&gt;
 * fuzzer libraries included in JBroFuzz.jar.&lt;br /&gt;
 * &lt;br /&gt;
 * JBroFuzz is free software: you can redistribute it and/or modify&lt;br /&gt;
 * it under the terms of the GNU General Public License as published by&lt;br /&gt;
 * the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
 * (at your option) any later version.&lt;br /&gt;
 * &lt;br /&gt;
 * JBroFuzz is distributed in the hope that it will be useful,&lt;br /&gt;
 * but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
 * GNU General Public License for more details.&lt;br /&gt;
 * &lt;br /&gt;
 * You should have received a copy of the GNU General Public License&lt;br /&gt;
 * along with JBroFuzz.  If not, see &amp;amp;lt;http://www.gnu.org/licenses/&amp;amp;gt;.&lt;br /&gt;
 * Alternatively, write to the Free Software Foundation, Inc., 51 &lt;br /&gt;
 * Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.&lt;br /&gt;
 * &lt;br /&gt;
 * Verbatim copying and distribution of this entire program file is &lt;br /&gt;
 * permitted in any medium without royalty provided this notice &lt;br /&gt;
 * is preserved. &lt;br /&gt;
 * &lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
import org.owasp.jbrofuzz.core.NoSuchFuzzerException;&lt;br /&gt;
import org.owasp.jbrofuzz.core.Database;&lt;br /&gt;
import org.owasp.jbrofuzz.core.Fuzzer; &lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;In JBroFuzz a Fuzzer is a java Iterator.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;In order to create a Fuzzer, use the factory method&lt;br /&gt;
 * Database.createFuzzer(String, int), passing as arguments&lt;br /&gt;
 * the Fuzzer ID and the specified length as a positive int.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;Be careful to check that the fuzzer ID (labelled as f_ID)&lt;br /&gt;
 * is actually an existing ID from the Database of Fuzzers.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;Expected Output:&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &amp;amp;lt;code&amp;amp;gt;&lt;br /&gt;
 *  The fuzzer payload is: 00000&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  The fuzzer payload is: 00001&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  ...&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  (a total of 16^5 = 1048576 lines)&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  ...&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  The fuzzer payload is: ffffd&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  The fuzzer payload is: ffffe&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  The fuzzer payload is: fffff&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 * &amp;amp;lt;/code&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;For more information on the Database of Fuzzers, see the&lt;br /&gt;
 * HelloDatabase Class.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * @author subere@uncon.org&lt;br /&gt;
 * @version n/a&lt;br /&gt;
 */&lt;br /&gt;
public class HelloFuzzer {&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * @param args&lt;br /&gt;
	 */&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
		// You have to construct an instance of the fuzzers database&lt;br /&gt;
		Database fuzzDB = new Database();&lt;br /&gt;
		// You have to supply a valid fuzzer ID&lt;br /&gt;
		String f_ID = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
		// You have to supply a (+)tive int&lt;br /&gt;
		int f_len = 5;&lt;br /&gt;
		&lt;br /&gt;
		try {&lt;br /&gt;
			&lt;br /&gt;
			for(Fuzzer f = fuzzDB.createFuzzer(f_ID, f_len); f.hasNext();) {&lt;br /&gt;
				&lt;br /&gt;
				// Get the next payload value...&lt;br /&gt;
				System.out.println(&amp;quot; The fuzzer payload is: &amp;quot; + f.next());&lt;br /&gt;
				&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
		} catch (NoSuchFuzzerException e) {&lt;br /&gt;
			&lt;br /&gt;
			System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
			&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Hello Database of Fuzzers ====&lt;br /&gt;
&lt;br /&gt;
Having seen how to access a single Fuzzer through the createFuzzer() method available in the Database object. The next question that comes naturally is what are the Fuzzers that are available by default in JBroFuzz? &lt;br /&gt;
&lt;br /&gt;
To answer that, this example focuses more on the database component that we previously initialised, investigating the list of available methods that it offers. &lt;br /&gt;
&lt;br /&gt;
In JBroFuzz, all Fuzzers are stored in a Database object that you will be required to construct in order to access them. &lt;br /&gt;
&amp;lt;pre&amp;gt;/**&lt;br /&gt;
 * JBroFuzz API Examples 02&lt;br /&gt;
 *&lt;br /&gt;
 * JBroFuzz - A stateless network protocol fuzzer for web applications.&lt;br /&gt;
 * &lt;br /&gt;
 * Copyright (C) 2007, 2008, 2009 subere@uncon.org&lt;br /&gt;
 *&lt;br /&gt;
 * This file is part of the JBroFuzz API examples on how to use the &lt;br /&gt;
 * fuzzer libraries included in JBroFuzz.jar.&lt;br /&gt;
 * &lt;br /&gt;
 * JBroFuzz is free software: you can redistribute it and/or modify&lt;br /&gt;
 * it under the terms of the GNU General Public License as published by&lt;br /&gt;
 * the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
 * (at your option) any later version.&lt;br /&gt;
 * &lt;br /&gt;
 * JBroFuzz is distributed in the hope that it will be useful,&lt;br /&gt;
 * but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
 * GNU General Public License for more details.&lt;br /&gt;
 * &lt;br /&gt;
 * You should have received a copy of the GNU General Public License&lt;br /&gt;
 * along with JBroFuzz.  If not, see &amp;amp;lt;http://www.gnu.org/licenses/&amp;amp;gt;.&lt;br /&gt;
 * Alternatively, write to the Free Software Foundation, Inc., 51 &lt;br /&gt;
 * Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.&lt;br /&gt;
 * &lt;br /&gt;
 * Verbatim copying and distribution of this entire program file is &lt;br /&gt;
 * permitted in any medium without royalty provided this notice &lt;br /&gt;
 * is preserved. &lt;br /&gt;
 * &lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
import org.owasp.jbrofuzz.core.NoSuchFuzzerException;&lt;br /&gt;
import org.owasp.jbrofuzz.core.Database;&lt;br /&gt;
import org.owasp.jbrofuzz.core.Fuzzer; &lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;In JBroFuzz all Fuzzers are stored in a Database&lt;br /&gt;
 * object that you will be required to construct in order&lt;br /&gt;
 * to access them.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;Within the Database, each Fuzzer is a collection of &lt;br /&gt;
 * payloads, which carries a unique ID string value.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;Example ID values are the output of this program:&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &amp;amp;lt;code&amp;amp;gt;&lt;br /&gt;
 *  The fuzzer ID is: 013-LDP-INJ&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	The name of the fuzzer is:			LDAP Injection&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	The id of the fuzzer is:			013-LDP-INJ&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	The of payloads it carries (it's alphabet) is:	20&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	It has as 1st payload:&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *		|&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  The fuzzer ID is: 018-XSS-4IE&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	The name of the fuzzer is:			XSS IE&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	The id of the fuzzer is:			018-XSS-4IE&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	The of payloads it carries (it's alphabet) is:	38&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	It has as 1st payload:&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *		&amp;amp;lt; img src=`x` onrerror= `&amp;amp;nbsp;;; alert(1) ` /&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 * &amp;amp;lt;/code&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;Do not be confused between Prototypes and Fuzzers; &lt;br /&gt;
 * JBroFuzz uses Prototype objects to construct the Fuzzers&lt;br /&gt;
 * that get added into the Database upon initialisation.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;As a result, the getter methods available within a Database&lt;br /&gt;
 * object can carry the name of getAllPrototypeIDs and &lt;br /&gt;
 * getAllFuzzerIDs interchangebly.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * @author subere@uncon.org&lt;br /&gt;
 * @version n/a&lt;br /&gt;
 */&lt;br /&gt;
public class HelloDatabase {&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * @param args&lt;br /&gt;
	 */&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
		// You have to construct an instance of the fuzzers database&lt;br /&gt;
		Database fuzzDB = new Database();&lt;br /&gt;
&lt;br /&gt;
		// Get a list of all the fuzzer IDs from the database&lt;br /&gt;
		String[] fuzzer_IDs = fuzzDB.getAllPrototypeIDs();&lt;br /&gt;
		&lt;br /&gt;
		System.out.println(&amp;quot;The fuzzer IDs found are:&amp;quot;);&lt;br /&gt;
		&lt;br /&gt;
		for(String fuzzerID&amp;amp;nbsp;: fuzzer_IDs) {&lt;br /&gt;
			&lt;br /&gt;
			System.out.println(&amp;quot;The fuzzer ID is: &amp;quot; + fuzzerID);&lt;br /&gt;
			&lt;br /&gt;
			// We pass of length of 1, irrelevant if we are&lt;br /&gt;
			// just going to access the first payload&lt;br /&gt;
			// of the fuzzer&lt;br /&gt;
			Fuzzer fuzzer;&lt;br /&gt;
			try {&lt;br /&gt;
				&lt;br /&gt;
				fuzzer = fuzzDB.createFuzzer(fuzzerID, 1);&lt;br /&gt;
				// Normally you should check for fuzzer.hasNext()				&lt;br /&gt;
				String payload = fuzzer.next();&lt;br /&gt;
				&lt;br /&gt;
				System.out.println(&amp;quot;\tThe name of the fuzzer is:\t\t\t&amp;quot; + fuzzer.getName() );&lt;br /&gt;
				System.out.println(&amp;quot;\tThe id of the fuzzer is:\t\t\t&amp;quot; + fuzzer.getId() );&lt;br /&gt;
				System.out.println(&amp;quot;\tThe of payloads it carries (it's alphabet) is:\t&amp;quot; + fuzzDB.getSize(fuzzerID));&lt;br /&gt;
				System.out.println(&amp;quot;\tIt has as 1st payload:\n\t\t&amp;quot; + payload );&lt;br /&gt;
&lt;br /&gt;
			} catch (NoSuchFuzzerException e) {&lt;br /&gt;
				System.out.println(&amp;quot;Could not find the specified fuzzer!&amp;quot;);&lt;br /&gt;
				System.out.println(&amp;quot;Going to print all the fuzzer IDs I know:&amp;quot;);&lt;br /&gt;
				// old vs new for loop&amp;amp;nbsp;:)&lt;br /&gt;
				// in case of an error, print just the &lt;br /&gt;
				// fuzzer IDs, accessed from the DB&lt;br /&gt;
				for(int j = 0; j &amp;amp;lt; fuzzer_IDs.length; j++) {&lt;br /&gt;
					System.out.println(&amp;quot;The fuzzer ID is: &amp;quot; + fuzzer_IDs[j]);&lt;br /&gt;
				}&lt;br /&gt;
				&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Methods available within the Fuzzer Class ====&lt;br /&gt;
&lt;br /&gt;
A final example of this section, involves seeing the usage of all the method calls available in the Fuzzer.java class &lt;br /&gt;
&amp;lt;pre&amp;gt;/**&lt;br /&gt;
 * JBroFuzz API Examples 03&lt;br /&gt;
 *&lt;br /&gt;
 * JBroFuzz - A stateless network protocol fuzzer for web applications.&lt;br /&gt;
 * &lt;br /&gt;
 * Copyright (C) 2007, 2008, 2009 subere@uncon.org&lt;br /&gt;
 *&lt;br /&gt;
 * This file is part of the JBroFuzz API examples on how to use the &lt;br /&gt;
 * fuzzer libraries included in JBroFuzz.jar.&lt;br /&gt;
 * &lt;br /&gt;
 * JBroFuzz is free software: you can redistribute it and/or modify&lt;br /&gt;
 * it under the terms of the GNU General Public License as published by&lt;br /&gt;
 * the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
 * (at your option) any later version.&lt;br /&gt;
 * &lt;br /&gt;
 * JBroFuzz is distributed in the hope that it will be useful,&lt;br /&gt;
 * but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
 * GNU General Public License for more details.&lt;br /&gt;
 * &lt;br /&gt;
 * You should have received a copy of the GNU General Public License&lt;br /&gt;
 * along with JBroFuzz.  If not, see &amp;amp;lt;http://www.gnu.org/licenses/&amp;amp;gt;.&lt;br /&gt;
 * Alternatively, write to the Free Software Foundation, Inc., 51 &lt;br /&gt;
 * Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.&lt;br /&gt;
 * &lt;br /&gt;
 * Verbatim copying and distribution of this entire program file is &lt;br /&gt;
 * permitted in any medium without royalty provided this notice &lt;br /&gt;
 * is preserved. &lt;br /&gt;
 * &lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
import org.owasp.jbrofuzz.core.NoSuchFuzzerException;&lt;br /&gt;
import org.owasp.jbrofuzz.core.Database;&lt;br /&gt;
import org.owasp.jbrofuzz.core.Fuzzer; &lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;Example iterating through all the methods available&lt;br /&gt;
 * in the Fuzzer Object and their respective outputs.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 * @author subere@uncon.org&lt;br /&gt;
 * @version n/a&lt;br /&gt;
 */&lt;br /&gt;
public class IndigoFuzzerTests {&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * @param args&lt;br /&gt;
	 */&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
		// You have to construct an instance of the fuzzers database&lt;br /&gt;
		Database fuzzDB = new Database();&lt;br /&gt;
		// You have to supply a valid fuzzer ID&lt;br /&gt;
		String f_ID = &amp;quot;033-B08-OCT&amp;quot;;&lt;br /&gt;
		// You have to supply a (+)tive int&lt;br /&gt;
		int f_len = 5;&lt;br /&gt;
&lt;br /&gt;
		try {&lt;br /&gt;
			&lt;br /&gt;
			Fuzzer f = fuzzDB.createFuzzer(f_ID, f_len);&lt;br /&gt;
&lt;br /&gt;
			while(f.hasNext()) {&lt;br /&gt;
				&lt;br /&gt;
				// Could do this via reflection, but..&lt;br /&gt;
				f.next();&lt;br /&gt;
				// System.out.println(&amp;quot; The fuzzer payload is: &amp;quot; + f.next());&lt;br /&gt;
				System.out.println(&amp;quot; The maximum value is: &amp;quot; + f.getMaximumValue());&lt;br /&gt;
&lt;br /&gt;
				System.out.println(&amp;quot; The current value is: &amp;quot; + f.getCurrectValue());&lt;br /&gt;
				&lt;br /&gt;
&lt;br /&gt;
				&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		} catch (NoSuchFuzzerException e) {&lt;br /&gt;
			&lt;br /&gt;
			System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
			&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Advanced Fuzzing with the JBroFuzz Library ===&lt;br /&gt;
&lt;br /&gt;
This section covers more advanced APIs that are available under the '''org.owasp.jbrofuzz.core package'''. It should be noted that some of these classes and their corresponding functionality are not used by the JBroFuzz program application. Instead, they are made available for incorporation into other java code that you have perhaps written that requires more specialized type of fuzzing. &lt;br /&gt;
&lt;br /&gt;
==== Fuzzing Really Long Values with Big Integer ====&lt;br /&gt;
&lt;br /&gt;
As stated previously, within JBroFuzz a Fuzzer is a java Iterator. This implies that while fuzzing, we typically keep track of a counter representing the value that we are currently on. Consider the example of HelloFuzzer.java, above: &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
&lt;br /&gt;
 try {&lt;br /&gt;
     for(Fuzzer f = fuzzDB.createFuzzer(&amp;quot;031-B16-HEX&amp;quot;, 4); f.hasNext();) {&lt;br /&gt;
       // Get the next payload value...&lt;br /&gt;
       System.out.println(&amp;quot; The fuzzer payload is: &amp;quot; + f.next());&lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloFuzzer.java OWASP JBroFuzz Example 1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If we compile this program: &lt;br /&gt;
&amp;lt;pre&amp;gt;javac -classpath &amp;quot;.\jbrofuzz\jar\JBroFuzz.jar&amp;quot; HelloFuzzer.java&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
and run it: &lt;br /&gt;
&amp;lt;pre&amp;gt;java -cp &amp;quot;.\jbrofuzz\jar\JBroFuzz.jar;.&amp;quot; HelloFuzzer&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
We are going to see output similar to: &lt;br /&gt;
&amp;lt;pre&amp;gt; The fuzzer payload is: 0000&lt;br /&gt;
 ... (output omitted)&lt;br /&gt;
 The fuzzer payload is: fffd&lt;br /&gt;
 The fuzzer payload is: fffe&lt;br /&gt;
 The fuzzer payload is: ffff&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Now what if we want a hexadecimal fuzzer of length not 4, but, say, 24. Let's try compile and run the above program with a length of 24. Changing the line to: &lt;br /&gt;
&amp;lt;pre&amp;gt;     for(Fuzzer f = fuzzDB.createFuzzer(&amp;quot;031-B16-HEX&amp;quot;, 24); f.hasNext();) {&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Running this modified version of HelloFuzzer.java, yields: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt;javac -classpath &amp;quot;.\jbrofuzz\jar\JBroFuzz.jar;.&amp;quot; HelloFuzzer.java&lt;br /&gt;
&lt;br /&gt;
&amp;amp;gt;java -classpath &amp;quot;.\jbrofuzz\jar\JBroFuzz.jar;.&amp;quot; HelloFuzzer&lt;br /&gt;
&lt;br /&gt;
&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Nothing! What is actually happening is JBroFuzz is figuring out that the specified length of the Fuzzer we are about to create is far greater than that of the long java data type. As a result, the Fuzzer is not even entering the iteration mode that is typically expected with methods next() and hasNext(). &lt;br /&gt;
&lt;br /&gt;
That's all great, but we still want a hexadecimal fuzzer, 24 digits long going from: &lt;br /&gt;
&amp;lt;pre&amp;gt;000000000000000000000000&lt;br /&gt;
...to...&lt;br /&gt;
ffffffffffffffffffffffff&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For this JBroFuzz offers another type of Fuzzer class, that of FuzzerBigInteger. Let's modify the critical line within the original HelloFuzzer.java program that we had: &lt;br /&gt;
&amp;lt;pre&amp;gt;     for(FuzzerBigInteger f = fuzzDB.createFuzzerBigInteger(&amp;quot;031-B16-HEX&amp;quot;, 24); f.hasNext();) {&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
With the entire program becoming: &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
&lt;br /&gt;
 try {&lt;br /&gt;
     for(FuzzerBigInteger f = fuzzDB.createFuzzerBigInteger(&amp;quot;031-B16-HEX&amp;quot;, 24); f.hasNext();) {&lt;br /&gt;
       // Get the next payload value...&lt;br /&gt;
       System.out.println(&amp;quot; The fuzzer payload is: &amp;quot; + f.next());&lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloFuzzer.java OWASP JBroFuzz Example 1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Compiling and running this program yields: &lt;br /&gt;
&amp;lt;pre&amp;gt; The fuzzer payload is: 000000000000000000000000&lt;br /&gt;
 The fuzzer payload is: 000000000000000000000001&lt;br /&gt;
 ... (output omitted)&lt;br /&gt;
 The fuzzer payload is: 00000000000000000001a982&lt;br /&gt;
 ... (output omitted)&lt;br /&gt;
 The fuzzer payload is: 00000000000000000001a982&lt;br /&gt;
 The fuzzer payload is: ffffffffffffffffffffffff&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
There are limitations to this class, as governed by the BigInteger class itself. Further information can be found at: &lt;br /&gt;
&amp;lt;pre&amp;gt;http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Still, on a virtual windows xp machine with 256Mb of RAM the above code had no problem running to completion. It took some time though.. Characteristics of the windows machine while this iteration was ongoing: The CPU was being utilised at 100% and memory usage was constant at 212 Mb. Overall, a clean sheet for FuzzerBigInteger.java. &lt;br /&gt;
&lt;br /&gt;
==== Using the Power Fuzzer API ====&lt;br /&gt;
&lt;br /&gt;
With web applications, it is often that you find yourself re-using part of, or the entirety of a fuzzing payload in more than one location, as part of the GET, POST, or any other type of request you submit. &lt;br /&gt;
&lt;br /&gt;
For this reason, JBroFuzz offers the PowerFuzzer class: A type of iterator for which you can specify how many copies of the payload you require in each request. &lt;br /&gt;
&lt;br /&gt;
Let's consider the following trivial scenario. You are in need of all hexadecimal values, which are 4-digits long (i.e. 0000 to FFFF) and you are in need of these 5 times for each request. &lt;br /&gt;
&lt;br /&gt;
This scenario is trivial, because typically you can assign the fuzzing payload (i.e. the value you get back from Fuzzer.next() ) to a String variable and re-use it as many times as you see fit. &lt;br /&gt;
&amp;lt;pre&amp;gt; Database fuzzDB = new Database();&lt;br /&gt;
 &lt;br /&gt;
 String fuzzerID = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
 int length = 4;&lt;br /&gt;
 ....&lt;br /&gt;
     for(Fuzzer f = fuzzDB.createFuzzer(fuzzerID, length); f.hasNext();) {&lt;br /&gt;
          String payload = f.next();&lt;br /&gt;
          ....&lt;br /&gt;
     }&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Using the PowerFuzzer.class, the following HelloPowerFuzzer.java program can be created: &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloPowerFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
 &lt;br /&gt;
 String fuzzerID = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
 int length = 4;&lt;br /&gt;
 int power = 5;&lt;br /&gt;
&lt;br /&gt;
 try {&lt;br /&gt;
     for(PowerFuzzer f = fuzzDB.createPowerFuzzer(fuzzerID, length, power); f.hasNext();) {&lt;br /&gt;
       // Get the next payload in an array of length[power]&lt;br /&gt;
	   String [] identicalElements = f.nextPower();&lt;br /&gt;
&lt;br /&gt;
	    // f.getPower() == identicalElements.length, always&lt;br /&gt;
		System.out.print(&amp;quot; I have &amp;quot; + f.getPower() + &amp;quot; elements: &amp;quot;);&lt;br /&gt;
	   &lt;br /&gt;
	   for(String elem&amp;amp;nbsp;: identicalElements) {&lt;br /&gt;
		&lt;br /&gt;
	     System.out.print(elem + &amp;quot; &amp;quot;);&lt;br /&gt;
	   }&lt;br /&gt;
	   System.out.println(&amp;quot;&amp;quot;);&lt;br /&gt;
	   &lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloPowerFuzzer.java OWASP JBroFuzz Power Fuzzer Example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This program would output the following; no rocket science here: &lt;br /&gt;
&amp;lt;pre&amp;gt;....&lt;br /&gt;
 I have 5 elements: 4817 4817 4817 4817 4817&lt;br /&gt;
 I have 5 elements: 4818 4818 4818 4818 4818&lt;br /&gt;
 I have 5 elements: 4819 4819 4819 4819 4819&lt;br /&gt;
 I have 5 elements: 481a 481a 481a 481a 481a&lt;br /&gt;
 I have 5 elements: 481b 481b 481b 481b 481b&lt;br /&gt;
 I have 5 elements: 481c 481c 481c 481c 481c&lt;br /&gt;
 I have 5 elements: 481d 481d 481d 481d 481d&lt;br /&gt;
 I have 5 elements: 481e 481e 481e 481e 481e&lt;br /&gt;
 I have 5 elements: 481f 481f 481f 481f 481f&lt;br /&gt;
 I have 5 elements: 4820 4820 4820 4820 4820&lt;br /&gt;
 I have 5 elements: 4821 4821 4821 4821 4821&lt;br /&gt;
 I have 5 elements: 4822 4822 4822 4822 4822&lt;br /&gt;
 I have 5 elements: 4823 4823 4823 4823 4823&lt;br /&gt;
 I have 5 elements: 4824 4824 4824 4824 4824&lt;br /&gt;
 I have 5 elements: 4825 4825 4825 4825 4825&lt;br /&gt;
 I have 5 elements: 4826 4826 4826 4826 4826&lt;br /&gt;
....&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Now imagine you need to change the number of elements you obtain back every time. For every second request, you need to obtain back two identical payloads, for every third request, you need to obtain back three payloads and for every fourth request, you need to obtain back four payloads. &lt;br /&gt;
&lt;br /&gt;
The PowerFuzzer class, with the corresponding method '''setPower(int)''' allows you to set how many identical elements you obtain back, without having to worry about the length argument. Below is a class that solves the above scenario: &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloPowerFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
 &lt;br /&gt;
 String fuzzerID = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
 int length = 4;&lt;br /&gt;
 int power = 5;&lt;br /&gt;
&lt;br /&gt;
 try {&lt;br /&gt;
     for(PowerFuzzer f = fuzzDB.createPowerFuzzer(fuzzerID, length, power); f.hasNext();) {&lt;br /&gt;
	 &lt;br /&gt;
	   int currentValue = (int) f.getCurrentValue(); &lt;br /&gt;
	   currentValue&amp;amp;nbsp;%= 4;&lt;br /&gt;
	   switch (currentValue) {&lt;br /&gt;
			case 0: f.setPower(1); break;&lt;br /&gt;
			case 1: f.setPower(2); break;&lt;br /&gt;
			case 2: f.setPower(3); break;&lt;br /&gt;
			default: f.setPower(4); break;&lt;br /&gt;
	   }&lt;br /&gt;
	   &lt;br /&gt;
       // Get the next payload in an array of length[power]&lt;br /&gt;
	   String [] identicalElements = f.nextPower();&lt;br /&gt;
	   &lt;br /&gt;
	    // f.getPower() == identicalElements.length, always&lt;br /&gt;
		System.out.print(&amp;quot; I have &amp;quot; + f.getPower() + &amp;quot; elements: &amp;quot;);&lt;br /&gt;
		// System.out.println(currentValue);&lt;br /&gt;
	   &lt;br /&gt;
	   for(String elem&amp;amp;nbsp;: identicalElements) {&lt;br /&gt;
		&lt;br /&gt;
	     System.out.print(elem + &amp;quot; &amp;quot;);&lt;br /&gt;
	   }&lt;br /&gt;
	   System.out.println(&amp;quot;&amp;quot;);&lt;br /&gt;
	   &lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloPowerFuzzer.java&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This class has as output: &lt;br /&gt;
&amp;lt;pre&amp;gt; ....&lt;br /&gt;
 I have 1 elements: 22a8&lt;br /&gt;
 I have 2 elements: 22a9 22a9&lt;br /&gt;
 I have 3 elements: 22aa 22aa 22aa&lt;br /&gt;
 I have 4 elements: 22ab 22ab 22ab 22ab&lt;br /&gt;
 I have 1 elements: 22ac&lt;br /&gt;
 I have 2 elements: 22ad 22ad&lt;br /&gt;
 I have 3 elements: 22ae 22ae 22ae&lt;br /&gt;
 I have 4 elements: 22af 22af 22af 22af&lt;br /&gt;
 I have 1 elements: 22b0&lt;br /&gt;
 I have 2 elements: 22b1 22b1&lt;br /&gt;
 I have 3 elements: 22b2 22b2 22b2&lt;br /&gt;
 I have 4 elements: 22b3 22b3 22b3 22b3&lt;br /&gt;
 I have 1 elements: 22b4&lt;br /&gt;
 I have 2 elements: 22b5 22b5&lt;br /&gt;
 I have 3 elements: 22b6 22b6 22b6&lt;br /&gt;
 I have 4 elements: 22b7 22b7 22b7 22b7&lt;br /&gt;
 I have 1 elements: 22b8&lt;br /&gt;
 I have 2 elements: 22b9 22b9&lt;br /&gt;
 ....&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Naturally, the algorithm of the number of elements required can vary based on any number of parameters. The PowerFuzzer class gives you a quick way to control the number of identical payloads you obtain back, without having to worry about creating a data type to store them in. &lt;br /&gt;
&lt;br /&gt;
==== Using the Double Fuzzer API ====&lt;br /&gt;
&lt;br /&gt;
In some cases of fuzzing web applications, a requirement to fuzz two (or more) locations part of the request being submitted to the web server becomes apparent. &lt;br /&gt;
&lt;br /&gt;
The DoubleFuzzer class allows you to create a fuzzer based on two prototype definitions. Similarly to instantiating a Fuzzer through a prototype and a given length, with a DoubleFuzzer, we pass two prototype definitions and two lengths. The corresponding method call available within the '''Database''' class of org.owasp.jbrofuzz.core is: &lt;br /&gt;
&amp;lt;pre&amp;gt;public DoubleFuzzer createDoubleFuzzer(String id1, int length1,  &lt;br /&gt;
								String id2, int length2) throws NoSuchFuzzerException {&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Let's cross-breed some fuzzers, see what results we get back during an iteration. &lt;br /&gt;
&lt;br /&gt;
The first example below, uses two hexadecimal fuzzers of different lengths, as specified by the variables: &lt;br /&gt;
&amp;lt;pre&amp;gt;String fuzzID1 = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
String fuzzID2 = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
int length1 = 4;&lt;br /&gt;
int length2 = 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
As the double fuzzer iteration is taking place, the second fuzzer, defined by the fuzzID2 &amp;amp;amp; length2 loops, starting from 00 and going all the way up to FF. An example output is: &lt;br /&gt;
&amp;lt;pre&amp;gt; I have 2 elements: fefb fb&lt;br /&gt;
 I have 2 elements: fefc fc&lt;br /&gt;
 I have 2 elements: fefd fd&lt;br /&gt;
 I have 2 elements: fefe fe&lt;br /&gt;
 I have 2 elements: feff ff&lt;br /&gt;
 I have 2 elements: ff00 00&lt;br /&gt;
 I have 2 elements: ff01 01&lt;br /&gt;
 I have 2 elements: ff02 02&lt;br /&gt;
 I have 2 elements: ff03 03&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The complete code listing of HelloDoubleFuzzer.java is: &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloDoubleFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
 &lt;br /&gt;
 String fuzzID1 = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
 String fuzzID2 = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 int length1 = 4;&lt;br /&gt;
 int length2 = 2;&lt;br /&gt;
 &lt;br /&gt;
 try {&lt;br /&gt;
     DoubleFuzzer f = fuzzDB.createDoubleFuzzer(fuzzID1, length1, fuzzID2, length2);&lt;br /&gt;
	 &lt;br /&gt;
     while( f.hasNext() ) {&lt;br /&gt;
       // Get the next payload in an array of length[power]&lt;br /&gt;
	   String [] payloads = f.next();&lt;br /&gt;
	   &lt;br /&gt;
	    // f.getPower() == identicalElements.length, always&lt;br /&gt;
		System.out.print(&amp;quot; I have &amp;quot; + f.getPower() + &amp;quot; elements: &amp;quot;);&lt;br /&gt;
		// System.out.println(currentValue);&lt;br /&gt;
	   &lt;br /&gt;
	   for(String elem&amp;amp;nbsp;: payloads) {&lt;br /&gt;
		&lt;br /&gt;
	     System.out.print(elem + &amp;quot; &amp;quot;);&lt;br /&gt;
	   }&lt;br /&gt;
	   System.out.println(&amp;quot;&amp;quot;);&lt;br /&gt;
	   &lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloDoubleFuzzer.java&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
That's simple enough; now let's cross-breed something a bit more exotic: Imagine a 3-digit octal ID value [000 - 777] being submitted inline with, say, a parameter that we want to test for Cross-Site Scripting (XSS). Let's adjust the program above with the corresponding fuzzer IDs of these fuzzers. Remember all the IDs of all the fuzzers can be found in the fuzzers.jbrf file within JBroFuzz.jar: &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloDoubleFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
 &lt;br /&gt;
 String fuzzID1 = &amp;quot;033-B08-OCT&amp;quot;;&lt;br /&gt;
 String fuzzID2 = &amp;quot;019-XSS-GEK&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 int length1 = 3;&lt;br /&gt;
 int length2 = 1;&lt;br /&gt;
 &lt;br /&gt;
 try {&lt;br /&gt;
     DoubleFuzzer f = fuzzDB.createDoubleFuzzer(fuzzID1, length1, fuzzID2, length2);&lt;br /&gt;
	 &lt;br /&gt;
     while( f.hasNext() ) {&lt;br /&gt;
       // Get the next payload in an array of length[power]&lt;br /&gt;
	   String [] payloads = f.next();&lt;br /&gt;
	   &lt;br /&gt;
	    // f.getPower() == identicalElements.length, always&lt;br /&gt;
		System.out.print(&amp;quot; I have &amp;quot; + f.getPower() + &amp;quot; elements: &amp;quot;);&lt;br /&gt;
		// System.out.println(currentValue);&lt;br /&gt;
	   &lt;br /&gt;
	   for(String elem&amp;amp;nbsp;: payloads) {&lt;br /&gt;
		&lt;br /&gt;
	     System.out.print(elem + &amp;quot; &amp;quot;);&lt;br /&gt;
	   }&lt;br /&gt;
	   System.out.println(&amp;quot;&amp;quot;);&lt;br /&gt;
	   &lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloDoubleFuzzer.java&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The output from this program is: &lt;br /&gt;
&amp;lt;pre&amp;gt; I have 2 elements: 000 (1?(1?{a:1?&amp;quot;&amp;quot;[1?&amp;quot;ev\a\l&amp;quot;:0](1?&amp;quot;\a\lert&amp;quot;:0):0}:0).a:0)[1?&amp;quot;\c\a\l\l&amp;quot;:0](content,1?&amp;quot;x\s\s&amp;quot;:0)&lt;br /&gt;
 I have 2 elements: 001 &amp;amp;lt;STYLE TYPE=&amp;quot;text/javascript&amp;quot;&amp;amp;gt;alert('XSS');&amp;amp;lt;/STYLE&amp;amp;gt;&lt;br /&gt;
 I have 2 elements: 002 &amp;amp;lt;SCRIPT SRC=http://ha.ckers.org/xss.js&lt;br /&gt;
 I have 2 elements: 003 &amp;amp;lt;A HREF=&amp;quot;http://google:ha.ckers.org&amp;quot;&amp;amp;gt;XSS&amp;amp;lt;/A&amp;amp;gt;&lt;br /&gt;
 I have 2 elements: 004 &amp;amp;lt;A HREF=&amp;quot;http://ha.ckers.org@google&amp;quot;&amp;amp;gt;XSS&amp;amp;lt;/A&amp;amp;gt;&lt;br /&gt;
 I have 2 elements: 005 &amp;amp;lt;A HREF=&amp;quot;//google&amp;quot;&amp;amp;gt;XSS&amp;amp;lt;/A&amp;amp;gt;&lt;br /&gt;
 ....&lt;br /&gt;
 ...&lt;br /&gt;
 ..&lt;br /&gt;
 .&lt;br /&gt;
 ..&lt;br /&gt;
 ...&lt;br /&gt;
 ....&lt;br /&gt;
 I have 2 elements: 774 &amp;amp;lt;SCRIPT SRC=http://ha.ckers.org/xss.js&lt;br /&gt;
 I have 2 elements: 775 &amp;amp;lt;A HREF=&amp;quot;http://google:ha.ckers.org&amp;quot;&amp;amp;gt;XSS&amp;amp;lt;/A&amp;amp;gt;&lt;br /&gt;
 I have 2 elements: 776 &amp;amp;lt;A HREF=&amp;quot;http://ha.ckers.org@google&amp;quot;&amp;amp;gt;XSS&amp;amp;lt;/A&amp;amp;gt;&lt;br /&gt;
 I have 2 elements: 777 &amp;amp;lt;A HREF=&amp;quot;//google&amp;quot;&amp;amp;gt;XSS&amp;amp;lt;/A&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
With the list stopping iterating at the last element of the greatest of the two fuzzers. &lt;br /&gt;
&lt;br /&gt;
==== Using the Cross Product Fuzzer API ====&lt;br /&gt;
&lt;br /&gt;
A final case of a special Double Fuzzer is the the Cross Product Fuzzer of the payloads of two fuzzers. This type of fuzzing is virtually encountered in username/password login form on the Internet. Let's work on this by example. &lt;br /&gt;
&lt;br /&gt;
Consider your home network router. You recall changing the default password to one of the typical password values that you use. Also, you are not 100% certain about the username for the router either, it is one of the typical admin, user, administrator, root, yoda type values, but you cannot recall which one. Needless to say, you don't know what the username, or password actually is. &lt;br /&gt;
&lt;br /&gt;
So in a mini brute-forcing attack scenario, you have the following list of usernames, out of which one is valid: &lt;br /&gt;
&amp;lt;pre&amp;gt;admin&lt;br /&gt;
administrator&lt;br /&gt;
Administrator&lt;br /&gt;
root&lt;br /&gt;
adminUser&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Also you know that the password is one of the following (Top 10 Threadwatch 2007 passwords): &lt;br /&gt;
&amp;lt;pre&amp;gt;password&lt;br /&gt;
123456&lt;br /&gt;
qwerty&lt;br /&gt;
abc123&lt;br /&gt;
letmein&lt;br /&gt;
monkey&lt;br /&gt;
myspace1&lt;br /&gt;
password1&lt;br /&gt;
blink182&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The set that contains every possible combination of the two sets is the Cross Product of the list of usernames, times the list of passwords. So manually, (as most people do while locking themselves out) you would try, popular combinations of the above, starting with: &lt;br /&gt;
&amp;lt;pre&amp;gt;admin password&lt;br /&gt;
admin 123456&lt;br /&gt;
admin qwerty&lt;br /&gt;
....&lt;br /&gt;
admin blink182&lt;br /&gt;
administrator password&lt;br /&gt;
administrator 123456&lt;br /&gt;
administrator qwerty&lt;br /&gt;
....&lt;br /&gt;
adminUser password1&lt;br /&gt;
adminUser blink182&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Thus the total number of attempts would be (number of usernames) x (number of passwords). No rocket science here. &lt;br /&gt;
&lt;br /&gt;
JBroFuzz introduces the CrossProductFuzzer class capable of iterating through the cross product of two fuzzers. Let's put it into code; the following program provides a list of all 2-digit octal numbers with every 2-digit binary number. A total of (8 x 8) x (2 x 2) = 256 values. &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloCrossFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
 &lt;br /&gt;
 String fuzzID1 = &amp;quot;033-B08-OCT&amp;quot;;&lt;br /&gt;
 String fuzzID2 = &amp;quot;034-B02-BIN&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 int length1 = 2;&lt;br /&gt;
 int length2 = 2;&lt;br /&gt;
 &lt;br /&gt;
 try {&lt;br /&gt;
     CrossProductFuzzer f = fuzzDB.createCrossFuzzer(fuzzID1, length1, fuzzID2, length2);&lt;br /&gt;
	 &lt;br /&gt;
     while( f.hasNext() ) {&lt;br /&gt;
       // Get the next payload in an array of length[power]&lt;br /&gt;
	   String [] payloads = f.next();&lt;br /&gt;
	   &lt;br /&gt;
	    // f.getPower() == identicalElements.length, always&lt;br /&gt;
		System.out.print(&amp;quot; I have &amp;quot; + f.getPower() + &amp;quot; elements: &amp;quot;);&lt;br /&gt;
		// System.out.println(currentValue);&lt;br /&gt;
	   &lt;br /&gt;
	   for(String elem&amp;amp;nbsp;: payloads) {&lt;br /&gt;
		&lt;br /&gt;
	     System.out.print(elem + &amp;quot; &amp;quot;);&lt;br /&gt;
	   }&lt;br /&gt;
	   System.out.println(&amp;quot;&amp;quot;);&lt;br /&gt;
	   &lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloCrossFuzzer.java&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This program has as output: &lt;br /&gt;
&amp;lt;pre&amp;gt; I have 2 elements: 00 00&lt;br /&gt;
 ...&lt;br /&gt;
 ..&lt;br /&gt;
 .&lt;br /&gt;
 ..&lt;br /&gt;
 ...&lt;br /&gt;
 I have 2 elements: 74 00&lt;br /&gt;
 I have 2 elements: 74 01&lt;br /&gt;
 I have 2 elements: 74 10&lt;br /&gt;
 I have 2 elements: 74 11&lt;br /&gt;
 I have 2 elements: 75 00&lt;br /&gt;
 I have 2 elements: 75 01&lt;br /&gt;
 I have 2 elements: 75 10&lt;br /&gt;
 I have 2 elements: 75 11&lt;br /&gt;
 I have 2 elements: 76 00&lt;br /&gt;
 I have 2 elements: 76 01&lt;br /&gt;
 I have 2 elements: 76 10&lt;br /&gt;
 I have 2 elements: 76 11&lt;br /&gt;
 I have 2 elements: 77 00&lt;br /&gt;
 I have 2 elements: 77 01&lt;br /&gt;
 I have 2 elements: 77 10&lt;br /&gt;
 I have 2 elements: 77 11&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
You can substitute any list of fuzzer ID to the IDs you use in this program. &lt;br /&gt;
&lt;br /&gt;
'''Remember!''' The total number of payloads must not exceed that of the the maximum value of the long primitive java data type ''Long.MAX_VALUE'' which is 2^63 - 1. If you are in need of more than that payloads, you would have to use the big integer implementation of the Fuzzer class, namely: FuzzerBigInteger.java. &lt;br /&gt;
&lt;br /&gt;
== Graphing with JBroFuzz ==&lt;br /&gt;
&lt;br /&gt;
Once a fuzzing session has completed, JBroFuzz offers the ability to generate a number of graphs, using various metrics. This section investigates how to further the graphing functionality available with the application. &lt;br /&gt;
&lt;br /&gt;
=== Customizing the logo on each Graph ===&lt;br /&gt;
&lt;br /&gt;
As of version 2.0, all image icons within JBroFuzz are located within the /icons directory of the application. The particular transparent image file displayed on top right part of the graphs is named: &lt;br /&gt;
&amp;lt;pre&amp;gt;/icons/owasp-med.png&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This file is a 64 x 64 PNG image file. You can replace it with your own file, as follows: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt;ls -l JBroFuzz.jar&lt;br /&gt;
-rw-rw-rw-   1 user     group     4033612 Feb 15 12:33 JBroFuzz.jar&lt;br /&gt;
&lt;br /&gt;
&amp;amp;gt;unzip -oq JBroFuzz.jar&lt;br /&gt;
&amp;amp;gt;cd icons&lt;br /&gt;
&amp;amp;gt;mv owasp-med.png file64x64-file.png&lt;br /&gt;
&amp;amp;gt;cd ..&lt;br /&gt;
&amp;amp;gt;zip -r JBroFuzz.zip *&lt;br /&gt;
&amp;amp;gt;mv JBroFuzz.zip JBroFuzz.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This enables you to have your own (company logo) on JBroFuzz graphs. Further to this, a number of other customization options are available, by right clicking on each of the graph generated. &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP_JBroFuzz]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_JBroFuzz_Tutorial&amp;diff=83956</id>
		<title>OWASP JBroFuzz Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_JBroFuzz_Tutorial&amp;diff=83956"/>
				<updated>2010-05-26T16:47:28Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Introduction  ==&lt;br /&gt;
&lt;br /&gt;
''“Si you can’t fuzz with JBroFuzz, you probably do not want to fuzz!”'' &lt;br /&gt;
&amp;lt;div align=&amp;quot;right&amp;quot;&amp;gt;Old JBroFuzz Motto &amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; The art of teaching, Mark Van Doren said, is the art of assisting discovery. Fuzzing is a representative discipline towards assisting the discovery of security vulnerabilities, that is just beginning to come of age. Over the last two years, through continuous development, JBroFuzz has attempted to expose the intrinsic beauty of the subject: Constantly submit a vast amount of payloads to a service, device or prompt, waiting for the one response that makes all the difference. This is the mentality that JBroFuzz embraces and attempts to offer back to security professionals. &lt;br /&gt;
&lt;br /&gt;
Fuzzing as a concept goes beyond a conventional work flow or a standard methodology. I would argue that to know how to fuzz well, is to master a new language. Thus, similar to the process of learning a programming (or foreign) language, there are three things you must master: &lt;br /&gt;
&lt;br /&gt;
• Grammar: How fuzzing as a process is structured&amp;lt;br&amp;gt; • Vocabulary: How to name fuzzing concepts you want to use&amp;lt;br&amp;gt; • Usage: Ways of achieving everyday effective results with fuzzing&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:001-JBroFuzz-Tutorial.jpg|right|300px|JBroFuzz Splash Screen]]From the pre-existing information available for JBroFuzz, this tutorial focuses on usage: How to best put a fuzzing tool to good use, either via the UI, or using APIs that ''JBroFuzz.jar'' is constituted of. As a result, this document has a small requirement as a caveat; you need to have a beginner level understanding of the Java programming language in order to understand some sections. &lt;br /&gt;
&lt;br /&gt;
There are a number of working examples described here within, which '''grep''' for statements such as “''&amp;lt;nowiki&amp;gt;public static void main(String[] args)&amp;lt;/nowiki&amp;gt;''”. The majority of the content relates to reviewing these examples and putting the Java syntax into a fuzzing perspective. &lt;br /&gt;
&lt;br /&gt;
To summarise, this tutorial focuses on customary and effective usage of fuzzing through the JBroFuzz Java APIs and the respective UI. It is targeting (without attacking them) web applications. Without further redo, let’s get fuzzing!&lt;br /&gt;
&lt;br /&gt;
== JBroFuzz Basic Functionality  ==&lt;br /&gt;
&lt;br /&gt;
This section carries a number of basic fuzzing examples to get you started with JBroFuzz. Overall, even though the actions performed to not produce any amazing fuzzing results, it serves as a starting point in understanding how to perform particular fuzzing operations on web applications. &lt;br /&gt;
&lt;br /&gt;
=== 'Hello Google!' (forget 'Hello World')  ===&lt;br /&gt;
&lt;br /&gt;
As the traditional first program that you learn when indulging in a new programming language, 'Hello World!' represents the norm for understanding the basic output operations and syntax (let alone compiler and execution behaviour) of the language in question. &lt;br /&gt;
&lt;br /&gt;
As with most web application security related tools, when I am given the responsibility to run them, often in order to understand how they work, I would first craft a legitimate, single request to a trusted (to be up and behaving) popular Internet location. Needless, to say this request more than on occasion finds itself on Google servers. &lt;br /&gt;
&lt;br /&gt;
So 'Hello World!' for programming languages seems to transform to 'Hello Google!' for understanding how web application security related tools work. Let us see, how JBroFuzz does it. &lt;br /&gt;
&lt;br /&gt;
• Double-click on JBroFuzz and browse to the 'Fuzzing' tab &lt;br /&gt;
&lt;br /&gt;
JBroFuzz is constituted of tabs, typically located in the bottom or top (if you bother to change the settings) of the main window. &lt;br /&gt;
&lt;br /&gt;
The 'Fuzzing' tab is where you craft your request message to a particular host. Once that is in place, you can select any part of the request and proceed into adding any number of payloads. We shall see how in later sections. &lt;br /&gt;
&lt;br /&gt;
• In the 'URL' field type: http://www.google.com/ http://www.google.com &lt;br /&gt;
&lt;br /&gt;
Unlike conventional URLs, the URL field in JBroFuzz is only used for the underlying protocol (HTTP or HTTPS), host name (e.g. www.yahoo.com) and (optionally) port number. &lt;br /&gt;
&lt;br /&gt;
All remaining information pasted or typed into the 'URL' field will be ignored; you are expected to enter it in the 'Request' field below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Still, if you want to just copy-paste a URL from a browser, hit [Ctrl+L] while you are not fuzzing, paste the URL value that you have copied from a browser and JBroFuzz will automatically do the work for you. &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Examples of valid URL values to be put in the &lt;br /&gt;
&lt;br /&gt;
Treat the 'URL' and 'Request' fields as the two stages of a 'telnet' session on port 80; you are effectively using the 'URL' field to specify the equivalent of: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;amp;gt;telnet www.google.com 8088&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
As equivalent to: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;http://www.google.com:8088&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
or in the case of HTTPS: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;https://www.google.com:8088&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Naturally, default ports for HTTP is 80 and HTTPS is 443. &lt;br /&gt;
&lt;br /&gt;
• In the 'Request' field type: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET / HTTP/1.0&amp;lt;br&amp;gt; &amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
And press 'Enter' twice &lt;br /&gt;
&lt;br /&gt;
This is where the body of the message you are sending is to be placed. So anything obeying HTTP/S protocol, such as GET and POST requests, header fields and/or HTML content should be included here. &lt;br /&gt;
&lt;br /&gt;
As part of the process of fuzzing web applications with JBroFuzz you need to have done your homework, in terms of providing a base request message. This message is what will be used later on to add payloads to particular sections of the request. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;• Hit 'Start' [Ctrl+Enter]&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This will instigate the process of sending a single request to the specified host on a given (or default) port, over HTTP or HTTPS. &lt;br /&gt;
&lt;br /&gt;
Once a connection has been established JBroFuzz will proceed to submit the message you have typed into the 'Request' field. &lt;br /&gt;
&lt;br /&gt;
Finally, JBroFuzz will log all data sent and received into a file; accessing this file is typically a process of double clicking on the output line on the table at the bottom section of the 'Fuzzing' tab. &lt;br /&gt;
&lt;br /&gt;
You should see a response received in the bottom part of the 'Fuzzing' panel. Double click (or right click for more options) to see the information exchanged; typically this would be a 302 redirect pointing you to another location. Congratulations, you have just said &amp;quot;Hello&amp;quot; to Google! &lt;br /&gt;
&lt;br /&gt;
[[Image:002-JBroFuzz-Tutorial.png|500px|JBroFuzz Hello Google!]] &lt;br /&gt;
&lt;br /&gt;
Now this would typically be enough under RFC rules, to get a response back; but damn all the bots out here, most websites require further information to respond back. So, in the 'Request' field let's pretend to be a (kind of) legitimate browser by typing: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET / HTTP/1.0&amp;lt;br&amp;gt; Host: www.google.com&amp;lt;br&amp;gt; User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729) JBroFuzz/1.5&amp;lt;br&amp;gt; Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-gb,en;q=0.5Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&amp;lt;br&amp;gt; &amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Not forgetting to end the request typed with two returns: Press 'Enter' twice. Again, you should be able to see a line added with the response received back. &lt;br /&gt;
&lt;br /&gt;
Practice sending single requests to a website of your choice by changing the URL and also the 'Host:' field from the 'Request' above. Also try accessing an HTTPS website. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Alternatively, you can use the shortcut [Ctrl+L] to type in your URL, with the 'Request' field filled automatically, based on the URL you have typed. &amp;lt;/nowiki&amp;gt; &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== HTTP Version Numbers &amp;amp;amp; www.cia.gov Headerless Responses  ===&lt;br /&gt;
&lt;br /&gt;
For web applications, very often ill-defined requests submitted over the Internet, will trigger semi-legitimate responses that actually do not obey HTTP RFC protocol specification. Often, even though this is not the case in this example, these responses can lead to the identification of one or more security vulnerabilities. &lt;br /&gt;
&lt;br /&gt;
In this example we test for the responses received for invalid HTTP version numbers on a particular website, namely www.cia.gov, over https. Now a word of caution here; please do not attempt to fuzz web applications that you do not have the authority to do so, especially over the Internet. &lt;br /&gt;
&lt;br /&gt;
Still, for the purposes of this tutorial exercise, we will subject a web server to no more than a dozen or so requests. These requests would be otherwise identical, if it was not for the HTTP version number incrementing by a value of 1 on each request. &lt;br /&gt;
&lt;br /&gt;
In terms of having the authority to do so, well this is identical to hitting 'Refresh' in your web browser a dozen or so times, while you are browsing to www.cia.gov. I do not consider this remotely close to any form of hacking, cracking, or proper fuzzing; web servers across the globe receive a lot more abuse than this on a daily basis. &lt;br /&gt;
&lt;br /&gt;
Finally, by the time you are reading this, the particular issue described might have been fixed. So here goes: &lt;br /&gt;
&lt;br /&gt;
• Within JBroFuzz, select: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;File -&amp;amp;gt; Open Location [Ctrl+L]&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Type: https://www.cia.gov and hit enter. This is depicted in the following screenshot: &lt;br /&gt;
&lt;br /&gt;
[[Image:003-JBroFuzz-Tutorial.png|JBroFuzz Open Location]] &lt;br /&gt;
&lt;br /&gt;
Hitting 'Enter' should automatically populate the 'URL' field and the 'Request' field within the 'Fuzzing' tab. What you see is the base request that we intend to add fuzzing payloads to. Before we do so, let us make one small alteration first: &lt;br /&gt;
&lt;br /&gt;
• Modify the first line of the 'Request' field to: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET / HTTP/0.0&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Our objective is to enumerate the supported by the web server (in this case www.cia.gov) HTTP version numbers, following the two digit format that it has. We could be a lot more agressive here and test for buffer overflows and all types of injection; that would be out of line without the authority to do so. Instead we are going to see how JBroFuzz will iterate through the values of 0.0 to 1.4 by means of adding a Fuzzer to our base request. &lt;br /&gt;
&lt;br /&gt;
• Highlight the second zero from the line 'GET / HTTP/0.0' and right-click, selecting 'Add'. This is depicted in the screeshot below: &lt;br /&gt;
&lt;br /&gt;
[[Image:004-JBroFuzz-Tutorial.png|400px|Adding a Fuzzer to the HTTP version number]] &lt;br /&gt;
&lt;br /&gt;
• From the appearing 'Add a Fuzzer' window, select as 'Category Name', in the most left column 'Base' and as 'Fuzzer Name' in the middle column 'Base 10 (Decimal) Alphabet. &lt;br /&gt;
&lt;br /&gt;
• Click on 'Add Fuzzer' on the bottom right of the window &lt;br /&gt;
&lt;br /&gt;
[[Image:005-JBroFuzz-Tutorial.png|400px|Adding a Fuzzer]] &lt;br /&gt;
&lt;br /&gt;
This should add a Fuzzer of length 1 that iterates over the decimal (i.e. base 10) numbers 0 to 9. If we have added a hexadecimal Fuzzer instead of a decimal one (i.e. base 16) the iteration would from 0 to F. If we had selected two digits instead of one and proceeded to add a decimal Fuzzer, the iteration would be from: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;00&amp;lt;br&amp;gt; 01&amp;lt;br&amp;gt; ..&amp;lt;br&amp;gt; 98&amp;lt;br&amp;gt; 99&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
From a User Interface (UI) perspective you should see a line added to the 'Added Payloads Table'. &lt;br /&gt;
&lt;br /&gt;
• Click 'Start' [Ctrl+Enter] &lt;br /&gt;
&lt;br /&gt;
This process will send 10 requests to the specified web server changing only first line of the request to: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET / HTTP/0.0...&amp;lt;br&amp;gt; GET / HTTP/0.1...&amp;lt;br&amp;gt; ...&amp;lt;br&amp;gt; GET / HTTP/0.8...&amp;lt;br&amp;gt; GET / HTTP/0.9...&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
While this is ongoing, you can sort the results by 'No' in the 'Output' table in the bottom of the 'Fuzzing' tab. This should enable you to see what request is currently being transmitted and received in real time. &lt;br /&gt;
&lt;br /&gt;
Once complete, change the first line of the 'Request' field to read: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET / HTTP/1.0&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
• Click 'Start' [Ctrl+Enter] &lt;br /&gt;
&lt;br /&gt;
The resulting output should resemble the following screenshot: &lt;br /&gt;
&lt;br /&gt;
[[Image:006-JBroFuzz-Tutorial.png|500px|JBroFuzz Output from a Fuzzing Session]] &lt;br /&gt;
&lt;br /&gt;
Straight away we can notice a difference in the response size: For HTTP version numbers 0.0 to 0.9 we are getting back what seems fairly big in size responses; 32222 bytes in size worth of responses, given that HTTP protocol version 0.0 to 0.8 do not officially exist! &lt;br /&gt;
&lt;br /&gt;
By double-clicking on one of these requests, we can see that the web server in question is responding back with no headers, yet returning a full HTML body; this represents the 32222 bytes of response of data we are receiving back. The following screenshot illustrates this: &lt;br /&gt;
&lt;br /&gt;
[[Image:007-JBroFuzz-Tutorial.png|300px|JBroFuzz Output for a Single Request/Response]] &lt;br /&gt;
&lt;br /&gt;
Using the 'Graphing' tab we can proceed to graph the particular requests and responses for this given session. &lt;br /&gt;
&lt;br /&gt;
• Within the 'Graphing' tab, click 'Start' [Ctrl+Enter]. &lt;br /&gt;
&lt;br /&gt;
• Select the directory corresponding to the Output folder we have used for this fuzzing session. This will typically be the last one. &lt;br /&gt;
&lt;br /&gt;
• Right-click and select 'Graph' &lt;br /&gt;
&lt;br /&gt;
Once complete, browse to the 'Response Size' tab within the 'Graphing' tab, as illustrated in the screenshot below: &lt;br /&gt;
&lt;br /&gt;
[[Image:008-JBroFuzz-Tutorial.png|300px|JBroFuzz Graphing different 'Response Sizes']] &lt;br /&gt;
&lt;br /&gt;
To re-iterate this does not present a security vulnerability in any shape or form; merely the fact that by manipulating HTTP version numbers as part of the request we transmit, we can impact the response that we get back. In this case, what changes is the non-existent header fields, with some HTML content being received back. &lt;br /&gt;
&lt;br /&gt;
If I was to guess what is causing this, I would say that some sort of load balancing or content delivery is not happening as it should when non-existent version numbers are being transmitted. &lt;br /&gt;
&lt;br /&gt;
== Using JBroFuzz with a Generic Proxy  ==&lt;br /&gt;
&lt;br /&gt;
JBrofuzz 2.0 and subsequent releases include generic proxy support. As of this writing, basic authentication is supported with plans to eventually support NTLM and Kerberos authentication as well. We've tried to make the use of a proxy as straight forward as possible. All arguments for the proxy can be passed in the URL field and will take one of the following forms. &lt;br /&gt;
&amp;lt;pre&amp;gt;Without Authentication: &amp;amp;lt;proxy server&amp;amp;gt;:&amp;amp;lt;proxy port&amp;amp;gt;&lt;br /&gt;
With Authentication: &amp;amp;lt;proxy username&amp;amp;gt;:&amp;amp;lt;proxy password&amp;amp;gt;@&amp;amp;lt;proxy server&amp;amp;gt;:&amp;amp;lt;proxy port&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The structure of the request field and whether the GET parameter contains an absolute URL depends on the proxy you are using. For this reason, you may have to do a bit of trial and error to determine what format(s) your proxy accepts. To make all of this a bit clearer lets look at a couple of examples. &lt;br /&gt;
&lt;br /&gt;
=== Squid Proxy  ===&lt;br /&gt;
&lt;br /&gt;
In the first example, we are fuzzing through a squid proxy that requires ncsa user authentication as shown in the figure below. When producing similar results, its important that you use your own proxy and not the one shown in the figure. This proxy was setup for demonstration purposes, will not accept connections from your IP address, and the credentials will no longer be active. &lt;br /&gt;
&lt;br /&gt;
[[Image:016-JBroFuzz-Tutorial.jpg|503x449px]] &lt;br /&gt;
&lt;br /&gt;
=== Paros Proxy  ===&lt;br /&gt;
&lt;br /&gt;
In the second example, we are fuzzing through a local Paros proxy running on port 8080 that does not require user authentication. Notice the difference in the syntax of the URL field when user authentication is not required. &lt;br /&gt;
&lt;br /&gt;
[[Image:017-JBroFuzz-Tutorial.jpg|503x449px]] &lt;br /&gt;
&lt;br /&gt;
In the third example, we are still fuzzing through Paros, but notice the slight difference in the Request Field. Specifically, pay special attention to the GET line. We are no longer including the fully qualified path. Unlike Squid, Paros will accept both formats. Keep this in mind when you are performing initial testing with JBroFuzz and the proxy of your choice. &lt;br /&gt;
&lt;br /&gt;
[[Image:018-JBroFuzz-Tutorial.jpg|503x449px]]&lt;br /&gt;
&lt;br /&gt;
=== Burp Proxy  ===&lt;br /&gt;
In the final example, we are fuzzing through Burp. Similar to Squid, Burp requires absolute URLs in the request. A successful Burp request is shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:019-JBroFuzz-Tutorial.jpg|503x449px]]&lt;br /&gt;
&lt;br /&gt;
== Using JBroFuzz with Paros Proxy ==&lt;br /&gt;
&lt;br /&gt;
JBroFuzz is a standalone fuzzer; it can release and create sockets over HTTP and HTTPS, but in order to use JBroFuzz correctly you will have to know what it is that you are fuzzing. &lt;br /&gt;
&lt;br /&gt;
In comes the need for a proxy tool; the opening versions of JBroFuzz actually had a proxy tab that you could use to intercept traffic generated by your web browser. That functionality got removed in an attempt to focus and deliver solely on the fuzzing capabilities of the tool. &lt;br /&gt;
&lt;br /&gt;
This section details how to use JBroFuzz in combination with a client side proxy. The one selected is Paros Proxy, which, despite the fact that it hasn't been updated since 2006 is still a popular tool that you see in web security testing live CDs. You could use any of the other proxy tools available. &lt;br /&gt;
&lt;br /&gt;
=== Winning on a Remix of the Year Award ===&lt;br /&gt;
&lt;br /&gt;
At 17:53, on a frosty winter evening, a message window popped up: &lt;br /&gt;
&amp;lt;pre&amp;gt;17:53 http://www.localhost.com/remixcontest/club/annual2010.html&lt;br /&gt;
17:53 Hey bro, could you cast in a vote here for the Such &amp;amp;amp; Such Remix?&lt;br /&gt;
17:53 Appreciated!&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
A friend in need is a friend indeed, so here goes I thought. Opening up a web browser configured to work with Paros as an intermediate proxy, allowed for the casting of my vote. while keeping a record of each request and reply. &lt;br /&gt;
&lt;br /&gt;
No registration, or any other form of submitting an identifier was needed. The request that Paros stored for the casting of the actual vote was: &lt;br /&gt;
&amp;lt;pre&amp;gt;GET http://www.localhost.com/remixcontest/club/vote.php?onLoad=%5Btype%20Method%5D&amp;amp;amp;id=55 HTTP/1.1&lt;br /&gt;
Host: www.localhost.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) Paros/3.2.13&lt;br /&gt;
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&lt;br /&gt;
Accept-Language: en-gb,en;q=0.5&lt;br /&gt;
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&lt;br /&gt;
Keep-Alive: 300&lt;br /&gt;
Proxy-Connection: keep-alive&lt;br /&gt;
Cookie: PHPSESSID=ab6afb883dbgf8084f6dcf1eafdb225e&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Paros Proxy actually places the domain (in this case www.localhost.com) with the protocol (i.e. http) in front of the GET request. As a result, you can't open a telnet/netcat session and just copy-paste the above. Similarly when we bring the request into JBroFuzz, a bit of tweaking is required. &lt;br /&gt;
&lt;br /&gt;
*In the URL field, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.localhost.com&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
In the Request field, let's keep what is of interest: &lt;br /&gt;
&amp;lt;pre&amp;gt;GET /remixcontest/club/vote.php?onLoad=%5Btype%20Method%5D&amp;amp;amp;id=55 HTTP/1.0&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5&lt;br /&gt;
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&lt;br /&gt;
Accept-Language: en-gb,en;q=0.5&lt;br /&gt;
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&lt;br /&gt;
Cookie: PHPSESSID=ab6afb883dbgf8084f6dcf1eafdb225e&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
No needs for Keep-Alive and Proxy-Connection. Let's simplify the HTTP request by making it a version 1.0 request and getting rid of the Host header as well. Also on the user agent, let us keep that mainstream vanilla: Firefox on Windows (popular browser combination), getting rid of the .NET and Paros additives. &lt;br /&gt;
&lt;br /&gt;
Checking on the website, our Such &amp;amp;amp; Such remix already has about 100 votes or so and the top remix has approximately 310 votes. Let's fuzz this: &lt;br /&gt;
&lt;br /&gt;
*Select 2 of the digits of the cookie value:&lt;br /&gt;
&amp;lt;pre&amp;gt;PHPSESSID=ab6afb883dbgf8084f6dcf1eafdb225e&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
*Select: Panel -&amp;amp;gt; Add&lt;br /&gt;
&lt;br /&gt;
*In the &amp;quot;Add a Fuzzer&amp;quot; panel, select:&lt;br /&gt;
&amp;lt;pre&amp;gt;Base -&amp;amp;gt; Base16 (HEX)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
and select &amp;quot;Add Fuzzer&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
This will add a line within the Payloads tab on the right hand side. &lt;br /&gt;
&lt;br /&gt;
Our cookie value above (PHPSESSID=ab6afb883dbgf8084f6dcf1eafdb225e) is in lowercase, hexadecimal format. Let's make sure the encoding we select is also that. &lt;br /&gt;
&lt;br /&gt;
Within the Payloads tab, click on the encoding drop down menu and select lowercase. Just before clicking &amp;quot;Start&amp;quot;, JBroFuzz should look something like the screenshot below. &lt;br /&gt;
&lt;br /&gt;
[[Image:014-JBroFuzz-Tutorial.png|Adding Votes by iterating through PHPSESSID cookie values]] &lt;br /&gt;
&lt;br /&gt;
== Performing User Enumeration with a Valid Set of Credentials  ==&lt;br /&gt;
&lt;br /&gt;
Often you encounter an application that allows for the enumeration of one or more pages after a user has been successfully granted a set of session credentials. One of the key areas to test from an application specific perspective, relates to the page(s) that provide user account information. &lt;br /&gt;
&lt;br /&gt;
In the following example, we investigate an ASP.NET 2.0 application with a C# back-end. In this, an authenticated user has the option to select to &amp;quot;View My Profile&amp;quot;. This page provides them with account information (including the typical username, email address, further notes) that they can proceed to update and save to the back-end system. &lt;br /&gt;
&lt;br /&gt;
After a user has authenticated, the following URL, gives them access to their profile information stored on the database: &lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.myattackingdomain.com/portal-location/UserInfo.aspx?UserID=23&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Simple investigation confirms that the digits allowed as part of the UserID value are decimal numbers only. Lets feed that information into JBroFuzz. &lt;br /&gt;
&lt;br /&gt;
=== Fuzzing a User ID ===&lt;br /&gt;
&lt;br /&gt;
• Within JBroFuzz, select: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;File -&amp;amp;gt; Open Location [Ctrl+L]&amp;lt;br&amp;gt; &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Type: http://www.myattackingdomain.com/portal-location/UserInfo.aspx?UserID=23 and hit enter. This is depicted in the following screenshot: &lt;br /&gt;
&lt;br /&gt;
[[Image:009-JBroFuzz-Tutorial.png|300px|JBroFuzz 'GET' Request with a 'UserID' parameter]] &lt;br /&gt;
&lt;br /&gt;
From the URL the important parameter is the value of the UserID query string (the value 23, above). We want to fuzz that. &lt;br /&gt;
&lt;br /&gt;
• Within the Fuzzing Tab, in the &amp;quot;Request&amp;quot; text area, highlight the above number 23 • Right-click and select &amp;quot;Add&amp;quot; &lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;Add a Fuzzer&amp;quot; window that appears, select: &lt;br /&gt;
&lt;br /&gt;
• Category Name: &amp;lt;code&amp;gt;Base&amp;lt;/code&amp;gt; • Fuzzer Name: &amp;lt;code&amp;gt;Base10 (DEC)&amp;lt;/code&amp;gt; • Select &amp;quot;Add Fuzzer&amp;quot; in the bottom right &lt;br /&gt;
&lt;br /&gt;
This would have added a decimal (base 10 fuzzer) of length 2 onto the location. &lt;br /&gt;
&lt;br /&gt;
• You will see a row added within the &amp;quot;Added Fuzzers Table&amp;quot; of the Fuzzing panel. • Click &amp;quot;Start&amp;quot; &amp;lt;code&amp;gt;Ctrl+Enter&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This will transmit 100 requests to the domain in question, which in this case is assumed: www.myattackingdomain.com. The value being changed within each request will be: &lt;br /&gt;
&amp;lt;pre&amp;gt;• GET /portal-location/UserInfo.aspx?UserID=00 HTTP/1.0&lt;br /&gt;
• GET /portal-location/UserInfo.aspx?UserID=01 HTTP/1.0&lt;br /&gt;
...&lt;br /&gt;
• GET /portal-location/UserInfo.aspx?UserID=98 HTTP/1.0&lt;br /&gt;
• GET /portal-location/UserInfo.aspx?UserID=99 HTTP/1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Done. Let's proceed to graph the responses that we have obtained. Our objective is to understand which two-digit numbers from 00 to 99 correspond to valid user accounts. &lt;br /&gt;
&lt;br /&gt;
=== Graphing Results ===&lt;br /&gt;
&lt;br /&gt;
• Within the &amp;quot;Graphing&amp;quot; tab, click &amp;quot;Start&amp;quot; &amp;lt;code&amp;gt;Ctrl+Enter&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A list of directories will appear on the left-hand side. If you scroll to the bottom of the list you should see the directory corresponding to your fuzzing session, in our case it was (175 2009-06-24 16-18-24) &lt;br /&gt;
&amp;lt;pre&amp;gt;• Right-click on (175 2009-06-24 16-18-24)&lt;br /&gt;
• Click &amp;quot;Graph&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This will generate the graphs in their respective tabs. The question now becomes which graph is of interest for our user enumeration exercise. &lt;br /&gt;
&lt;br /&gt;
By definition enumerating users against an ID value, or any other identifier involves being able to obtain a different response for an existing user to that of a user that is not have a corresponding ID value. &lt;br /&gt;
&lt;br /&gt;
Thus, from the metrics available, the one useful for enumerating users will be that of measuring the &amp;quot;Hamming Distance&amp;quot; between responses received. Based on the JBroFuzz documentation: &lt;br /&gt;
&lt;br /&gt;
'''Fuzzing Hamming Distance ''' &lt;br /&gt;
&amp;lt;pre&amp;gt;A bar chart with the hamming distance of the characters in the response, &lt;br /&gt;
relative to the first response received. Check each character of the first&lt;br /&gt;
response received, against the character at the same position of the&lt;br /&gt;
current response received. If they are not identical, increment the &lt;br /&gt;
hamming distance.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
As we can see the Fuzzing Hamming Distance (FHD) varies quite a bit from the definition of the normal hamming distance term, used in telecommunications. Still, they share a lot of similarities. &lt;br /&gt;
&lt;br /&gt;
As we can from the above, the first request is critical to calibrating our user enumeration exercise. It represents the value that all other Fuzzing Hamming Distances (FHD) will be measured and normalised towards. For the java-skilled audience, the algorithm is quite trivial, but offers spectacular results in distinguishing responses: &lt;br /&gt;
&amp;lt;pre&amp;gt;in = new BufferedReader(new FileReader(f));&lt;br /&gt;
   58 &lt;br /&gt;
   59 			int counter = 0;&lt;br /&gt;
   60 			int check = 0;&lt;br /&gt;
   61 			int c;&lt;br /&gt;
   62 			while (((c = in.read()) &amp;amp;gt; 0) &amp;amp;amp;&amp;amp;amp; (counter &amp;amp;lt; MAX_CHARS)) {&lt;br /&gt;
   63 &lt;br /&gt;
   64 				// If we are passed &amp;quot;--jbrofuzz--&amp;amp;gt;\n&amp;quot; in the file&lt;br /&gt;
   65 				if (check == END_SIGNATURE.length()) {&lt;br /&gt;
   66 &lt;br /&gt;
   67 					firstSet.append((char) c);&lt;br /&gt;
   68 &lt;br /&gt;
   69 				}&lt;br /&gt;
   70 				// Else find &amp;quot;--jbrofuzz--&amp;amp;gt;\n&amp;quot; using a counter&lt;br /&gt;
   71 				else {&lt;br /&gt;
   72 					// Increment the counter for each success&lt;br /&gt;
   73 					if (c == END_SIGNATURE.charAt(check)) {&lt;br /&gt;
   74 						check++;&lt;br /&gt;
   75 					} else {&lt;br /&gt;
   76 						check = 0;&lt;br /&gt;
   77 					}&lt;br /&gt;
   78 				}&lt;br /&gt;
   79 &lt;br /&gt;
   80 				counter++;&lt;br /&gt;
   81 &lt;br /&gt;
   82 			}&lt;br /&gt;
   83 			in.close();&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Ergo, the corresponding graph is depicted in the screenshot below. The peak graphs correspond to number that if you hover the mouse over will give you the enumeration ID of a valid user. &lt;br /&gt;
&lt;br /&gt;
[[Image:015-JBroFuzz-Tutorial.png|500px|Measuring Hamming Distance for User Enumeration]] &lt;br /&gt;
&lt;br /&gt;
== Eliminating False Positives: LDAP Injection ==&lt;br /&gt;
&lt;br /&gt;
Every now and then a tool (that does not produce false positives) will hit an application reporting back a huge variety of (hopefully not confirmed, but pending further investigation) injection findings. &lt;br /&gt;
&lt;br /&gt;
Due to the limited number of characters required in performing LDAP Injection, such issues will be high on that list. But let's refresh our memory a bit of how LDAP injection works:&lt;br /&gt;
&lt;br /&gt;
http://www.owasp.org/index.php/LDAP_injection&lt;br /&gt;
&lt;br /&gt;
So typically, during an automated scan, negating LDAP cn-type queries would be submitted and their responses noted. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET /myfilelocation.jsp?lang=en&amp;amp;city=user)(sn=*&amp;amp;rid=97 HTTP/1.1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET /myfilelocation.jsp?lang=en&amp;amp;city=user)!(sn=*&amp;amp;rid=97 HTTP/1.1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET /myfilelocation.jsp?lang=en&amp;amp;city=admin*)((|userpassword=*)&amp;amp;rid=97 HTTP/1.1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As great as this check might be from an LDAP perspective, it has a high likelihood of generating false positives, due to the character sets being used. Ergo, a protection mechanism (silly worst-case blacklist present for example) would typically hunt down cross-site scripting and sql injection type of characters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt; &amp;gt; ' etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not considering =, *, or brackets as completely bad (he says). &lt;br /&gt;
&lt;br /&gt;
=== What characters are allowed through? ===&lt;br /&gt;
&lt;br /&gt;
Enough of all that; we want to know what responses are allowed back and what's different about them for all characters being filtered through a black-list.&lt;br /&gt;
&lt;br /&gt;
Let's transform the above GET into the following and proceed to add a single fuzzer that tells us that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET /myfilelocation.jsp?lang=en&amp;amp;city=X&amp;amp;rid=97 HTTP/1.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now in the position of the X character, proceed to add an ASCII 94 Alphabet Fuzzer (available in version 2.1 and above). This will check the responses for all characters which are printable ASCII, with the exception of space.&lt;br /&gt;
&lt;br /&gt;
In total there are 95 printable ASCII characters; minus the one present for space (yes, the one you hit all the time, every day) leaves 94. This fuzzer produces each of those values, in incrementing ASCII order.&lt;br /&gt;
&lt;br /&gt;
[[Image:020-JBroFuzz-Tutorial.png|500px|Measuring Size Length for Single Character ASCII 94 Fuzzing]] &lt;br /&gt;
&lt;br /&gt;
Based on the above graph, the following responses trigger a different response size. Thus the characters blocked by a black-list are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! &amp;quot; , &amp;lt; &amp;gt; @ [ \ ] ^ ` { | } ~&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Interesting. Know any payloads that can evade those?&lt;br /&gt;
:)&lt;br /&gt;
&lt;br /&gt;
== JBroFuzz Development Corner  ==&lt;br /&gt;
&lt;br /&gt;
This section presents how to setup and use JBroFuzz as a fuzzing library. Also, it offers an insight in how to setup and compile your own version of JBroFuzz. As different people have different levels of expertise of the java programming language, eclipse, ant and subversion, some of the steps presented herein might be considered basic by advanced developers. &lt;br /&gt;
&lt;br /&gt;
=== Setting up a JBroFuzz Development Environment ===&lt;br /&gt;
&lt;br /&gt;
This section guides you towards setting up a development environment for JBroFuzz. Despite the Operating System (O/S) being windows XP, a similar process can be followed in a number of other O/S. &lt;br /&gt;
&lt;br /&gt;
You will need to have installed: &lt;br /&gt;
&lt;br /&gt;
*Tortoise SVN (using TortoiseSVN-1.6.6.17493-win32-svn-1.6.6.msi) &lt;br /&gt;
*Eclipse Java (using eclipse-java-galileo-SR1-win32.zip)&lt;br /&gt;
&lt;br /&gt;
Optionally, if you don't like building your application through eclipse you could also require to install Apache Ant. &lt;br /&gt;
&lt;br /&gt;
==== Step 1: Obtain the source code ====&lt;br /&gt;
&lt;br /&gt;
JBroFuzz uses SubVersion with the repository being publicly available for download through anonymous access on sourceforge. There is a plan to move it the source to the OWASP Git repository, but until then, use the guidelines below. &lt;br /&gt;
&lt;br /&gt;
[[Image:010-JBroFuzz-Tutorial.png|Tortoise SVN Check out JBroFuzz Source Code]] &lt;br /&gt;
&lt;br /&gt;
Right click on the folder location where you want to download the source code and select: &lt;br /&gt;
&lt;br /&gt;
*SVN Checkout&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;URL of repository&amp;quot;, enter: &lt;br /&gt;
&amp;lt;pre&amp;gt;https://jbrofuzz.svn.sourceforge.net/svnroot/jbrofuzz&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
In the &amp;quot;Checkout directory&amp;quot;, enter the folder location of your choice, in this case: &lt;br /&gt;
&amp;lt;pre&amp;gt;C:\root\code\jbrofuzz&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
In the &amp;quot;Checkout Depth&amp;quot; select: &lt;br /&gt;
&lt;br /&gt;
*Fully recursive&lt;br /&gt;
&lt;br /&gt;
Untick &amp;quot;Omit Externals&amp;quot; (should be unticked by default) &lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;Revision&amp;quot; select: &lt;br /&gt;
&lt;br /&gt;
*&amp;quot;Head revision&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Select OK. &lt;br /&gt;
&lt;br /&gt;
This process, once complete will checkout the entirety of the JBroFuzz source code from the SVN repository on sourceforge. &lt;br /&gt;
&lt;br /&gt;
==== Step 2: Configuring a JBroFuzz Project within Eclipse ====&lt;br /&gt;
&lt;br /&gt;
Having obtained the latest copy of the source code, the next step entails importing that source code within the Eclipse IDE. &lt;br /&gt;
&lt;br /&gt;
Within Eclipse, select: &lt;br /&gt;
&amp;lt;pre&amp;gt;File -&amp;amp;gt; New -&amp;amp;gt; Other&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
From the &amp;quot;New&amp;quot; panel that appears, select: &lt;br /&gt;
&amp;lt;pre&amp;gt;Java -&amp;amp;gt; Java Project from Existig Ant Buildfile&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
[[Image:011-JBroFuzz-Tutorial.png|Import JBroFuzz Code into Eclipse from Ant File]] &lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Next&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
In the next menu, under &amp;quot;Ant buildfile&amp;quot;, select &amp;quot;Browse&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Browse to the location where you have just (step 1) downloaded the source code and select the following file: &lt;br /&gt;
&lt;br /&gt;
*build.xml&lt;br /&gt;
&lt;br /&gt;
The build.xml file is an Ant build file that JBroFuzz uses. &lt;br /&gt;
&lt;br /&gt;
[[Image:012-JBroFuzz-Tutorial.png|Select the Ant File]] &lt;br /&gt;
&lt;br /&gt;
Selecting that file should have populated the &amp;quot;Project name&amp;quot; as jbrofuzz and also given you: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;javac&amp;quot; task found in target &amp;quot;compile&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
MAKE SURE TO TICK: &lt;br /&gt;
&lt;br /&gt;
*&amp;quot;Link to the buildfile in the filesystem&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Otherwise eclipse will try to replicate the source code within your workspace and that makes the process a tiny bit more complicated when it comes to actually building JBroFuzz. &lt;br /&gt;
&lt;br /&gt;
Click &amp;quot;Finish&amp;quot; &lt;br /&gt;
&lt;br /&gt;
You will see the item &amp;quot;Building workspace (76%) on the bottom right hand side of Eclipse. Once that is complete, you should see the jbrofuzz project on the top left corner of the Package Explorer within Eclipse. &lt;br /&gt;
&lt;br /&gt;
==== Step 3: Building JBroFuzz ====&lt;br /&gt;
&lt;br /&gt;
Within the Package Explorer, expand the jbrofuzz project and double-click on the build.xml file. &lt;br /&gt;
&lt;br /&gt;
Right click on the &amp;quot;build [default]&amp;quot; task within the &amp;quot;Outline&amp;quot; window (typically seen on the right hand side) and select: &lt;br /&gt;
&amp;lt;pre&amp;gt;Run As -&amp;amp;gt; 1. Ant Build [Alt+Shift+X, Q]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If the build has been successful, a JBroFuzz.jar file within the the /jar folder would have been created. Following the path conventions above that should be in: &lt;br /&gt;
&amp;lt;pre&amp;gt;C:\root\code\jbrofuzz\jar\JBroFuzz.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
[[Image:013-JBroFuzz-Tutorial.png|Building JBroFuzz within Eclipse]] &lt;br /&gt;
&lt;br /&gt;
=== How to Use JBroFuzz as a Fuzzing Library ===&lt;br /&gt;
&lt;br /&gt;
Quite often what you need to do in terms of fuzzing, far exceeds the User Interface (UI) of JBroFuzz. For this reason, a set of core fuzzing APIs have been made available that can be used for more advanced fuzzing scenarios. &lt;br /&gt;
&lt;br /&gt;
The JBroFuzz.jar standalone archive (made available with every release) carries a core fuzzing library that holds a number of key classes. These are located under: &lt;br /&gt;
&amp;lt;pre&amp;gt;org.owasp.jbrofuzz.core.*;&lt;br /&gt;
-Database.java&lt;br /&gt;
-Fuzzer.java&lt;br /&gt;
-FuzzerBigInteger.java&lt;br /&gt;
-NoSuchFuzzerException.java&lt;br /&gt;
-Prototype.java&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The class of importance is Fuzzer.java. If you are going to use recursive iterators of great length, there is also FuzzerBigInteger.java. The difference between the two is that Fuzzer.java uses the primitive java data type long (up to 16^16 values) while FuzzerBigInteger.java uses java BigInteger to perform the counting. Naturally, the class FuzzerBigInteger is slower and takes more memory than the Fuzzer class. &lt;br /&gt;
&lt;br /&gt;
Within JBroFuzz a Fuzzer is an instance of a java Iterator. This implies that values can be accessed by simply calling the &amp;lt;code&amp;gt;next()&amp;lt;/code&amp;gt; method once an object has been made available. Typically, a call to &amp;lt;code&amp;gt;hasNext()&amp;lt;/code&amp;gt; should also be performed prior to avoid an exception being thrown. &lt;br /&gt;
&lt;br /&gt;
A Fuzzer can be obtained from the factory method &amp;lt;code&amp;gt;createFuzzer(String, int);&amp;lt;/code&amp;gt; available for every instance of the fuzzing Database. Ergo: &lt;br /&gt;
&lt;br /&gt;
==== A HelloFuzzer Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;Database myDatabase = new Database();&lt;br /&gt;
&lt;br /&gt;
Fuzzer myFuzzer = myDatabase.createFuzzer(&amp;quot;031-B16-HEX&amp;quot;, 5);&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
So how do I use the API? Here is a simple HelloFuzzer (file called HelloFuzzer.java) example: &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
&lt;br /&gt;
 try {&lt;br /&gt;
     for(Fuzzer f = fuzzDB.createFuzzer(&amp;quot;031-B16-HEX&amp;quot;, 4); f.hasNext();) {&lt;br /&gt;
       // Get the next payload value...&lt;br /&gt;
       System.out.println(&amp;quot; The fuzzer payload is: &amp;quot; + f.next());&lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloFuzzer.java OWASP JBroFuzz Example 1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
To compile the above use: &lt;br /&gt;
&amp;lt;pre&amp;gt;javac -classpath &amp;quot;.\jbrofuzz\jar\JBroFuzz.jar&amp;quot; HelloFuzzer.java&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This assumes that you are currently inside the directory where HelloFuzzer.java resides and that the JBroFuzz.jar is located two directories within your current location i.e. in jbrofuzz/jar. In order to run the above compiled HelloFuzzer class issue: &lt;br /&gt;
&amp;lt;pre&amp;gt;java -cp &amp;quot;.\jbrofuzz\jar\JBroFuzz.jar;.&amp;quot; HelloFuzzer&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note: The above 2 commands have been crafted in a win32 environment. The process for compiling and running HelloFuzzer.java above is the same in *nix machines. Simply replace the backslash &amp;quot;\&amp;quot; with &amp;quot;/&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
==== Fuzzing Payload Definitions ====&lt;br /&gt;
&lt;br /&gt;
Within the JBroFuzz.jar file, there is a file called fuzzers.jbrf that carries all the fuzzer definitions that you see in the UI payloads tab of JBroFuzz. To view a latest copy of this file you can browse the SVN repository of JBroFuzz: &lt;br /&gt;
&amp;lt;pre&amp;gt;http://jbrofuzz.svn.sourceforge.net/viewvc/jbrofuzz/tar/fuzzers.jbrf?view=log&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
A note here worth mentioning: Files ending in .jbrofuzz are session files saved by users while performing fuzzing operations. Files ending in .jbrf are JBroFuzz system files. Typical examples of .jbrf files are headers.jbrf, as well as fuzzers.jbrf. Both these use an internal proprietary format not to be confused with the .jbrofuzz file format. &lt;br /&gt;
&lt;br /&gt;
Fuzzers belong in categories (1 to many) and each fuzzer carries a set of payloads that define the alphabet of the fuzzer. &lt;br /&gt;
&lt;br /&gt;
Also, you have replacive and recursive fuzzers, zero fuzzers, etc. There are a number of different fuzzer categories. As an example of a fuzzer within the fuzzers.jbrf file, consider the hexadecimal fuzzer: &lt;br /&gt;
&amp;lt;pre&amp;gt;Fuzzer Name: Base16 (HEX)&lt;br /&gt;
Fuzzer Type: Recursive&lt;br /&gt;
Fuzzer Id:   031-B16-HEX&lt;br /&gt;
&lt;br /&gt;
Total Number of Payloads: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Within the fuzzers.jbrf file this fuzzer is defined in plain-text format as follows: &lt;br /&gt;
&amp;lt;pre&amp;gt;R:031-B16-HEX:Base16 (HEX):16&lt;br /&gt;
&amp;amp;gt; Number Systems | Base | Recursive Fuzzers&lt;br /&gt;
0&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
3&lt;br /&gt;
4&lt;br /&gt;
5&lt;br /&gt;
6&lt;br /&gt;
7&lt;br /&gt;
8&lt;br /&gt;
9&lt;br /&gt;
a&lt;br /&gt;
b&lt;br /&gt;
c&lt;br /&gt;
d&lt;br /&gt;
e&lt;br /&gt;
f&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; There is very little preventing you from defining your own fuzzers within this file, by following the file format specified above. You can use the UI to see if they have been loaded successfully. &lt;br /&gt;
&lt;br /&gt;
Further to recursive and replacive fuzzers you also have zero fuzzers (i.e. a zero fuzzer of 1000 will just transmit 1000 requests as they are, without adding any payloads) double fuzzers, cross product fuzzers, etc. &lt;br /&gt;
&lt;br /&gt;
Notice the factory method Database.createFuzzer(&amp;quot;031-B16-HEX&amp;quot;, 4) yielding: &amp;quot;I want a 4 digit recursive fuzzer (why because NUM-HEX is recursive in its definition, starts with R: instead of P:) of HEX digits.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Thus the above scenario would iterate through all the digits from 0000 to ffff. I wouldn't recommend using the above scenario for such trivial fuzzing capabilities; simply presented as an example of the inner workings of JBroFuzz.jar &lt;br /&gt;
&lt;br /&gt;
==== HelloFuzzer Refined ====&lt;br /&gt;
&lt;br /&gt;
A more detailed code breakdown of the above HelloFuzzer example can be found below: &lt;br /&gt;
&amp;lt;pre&amp;gt;/**&lt;br /&gt;
 * JBroFuzz API Examples 01&lt;br /&gt;
 *&lt;br /&gt;
 * JBroFuzz - A stateless network protocol fuzzer for web applications.&lt;br /&gt;
 * &lt;br /&gt;
 * Copyright (C) 2007, 2008, 2009 subere@uncon.org&lt;br /&gt;
 *&lt;br /&gt;
 * This file is part of the JBroFuzz API examples on how to use the &lt;br /&gt;
 * fuzzer libraries included in JBroFuzz.jar.&lt;br /&gt;
 * &lt;br /&gt;
 * JBroFuzz is free software: you can redistribute it and/or modify&lt;br /&gt;
 * it under the terms of the GNU General Public License as published by&lt;br /&gt;
 * the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
 * (at your option) any later version.&lt;br /&gt;
 * &lt;br /&gt;
 * JBroFuzz is distributed in the hope that it will be useful,&lt;br /&gt;
 * but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
 * GNU General Public License for more details.&lt;br /&gt;
 * &lt;br /&gt;
 * You should have received a copy of the GNU General Public License&lt;br /&gt;
 * along with JBroFuzz.  If not, see &amp;amp;lt;http://www.gnu.org/licenses/&amp;amp;gt;.&lt;br /&gt;
 * Alternatively, write to the Free Software Foundation, Inc., 51 &lt;br /&gt;
 * Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.&lt;br /&gt;
 * &lt;br /&gt;
 * Verbatim copying and distribution of this entire program file is &lt;br /&gt;
 * permitted in any medium without royalty provided this notice &lt;br /&gt;
 * is preserved. &lt;br /&gt;
 * &lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
import org.owasp.jbrofuzz.core.NoSuchFuzzerException;&lt;br /&gt;
import org.owasp.jbrofuzz.core.Database;&lt;br /&gt;
import org.owasp.jbrofuzz.core.Fuzzer; &lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;In JBroFuzz a Fuzzer is a java Iterator.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;In order to create a Fuzzer, use the factory method&lt;br /&gt;
 * Database.createFuzzer(String, int), passing as arguments&lt;br /&gt;
 * the Fuzzer ID and the specified length as a positive int.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;Be careful to check that the fuzzer ID (labelled as f_ID)&lt;br /&gt;
 * is actually an existing ID from the Database of Fuzzers.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;Expected Output:&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &amp;amp;lt;code&amp;amp;gt;&lt;br /&gt;
 *  The fuzzer payload is: 00000&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  The fuzzer payload is: 00001&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  ...&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  (a total of 16^5 = 1048576 lines)&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  ...&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  The fuzzer payload is: ffffd&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  The fuzzer payload is: ffffe&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  The fuzzer payload is: fffff&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 * &amp;amp;lt;/code&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;For more information on the Database of Fuzzers, see the&lt;br /&gt;
 * HelloDatabase Class.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * @author subere@uncon.org&lt;br /&gt;
 * @version n/a&lt;br /&gt;
 */&lt;br /&gt;
public class HelloFuzzer {&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * @param args&lt;br /&gt;
	 */&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
		// You have to construct an instance of the fuzzers database&lt;br /&gt;
		Database fuzzDB = new Database();&lt;br /&gt;
		// You have to supply a valid fuzzer ID&lt;br /&gt;
		String f_ID = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
		// You have to supply a (+)tive int&lt;br /&gt;
		int f_len = 5;&lt;br /&gt;
		&lt;br /&gt;
		try {&lt;br /&gt;
			&lt;br /&gt;
			for(Fuzzer f = fuzzDB.createFuzzer(f_ID, f_len); f.hasNext();) {&lt;br /&gt;
				&lt;br /&gt;
				// Get the next payload value...&lt;br /&gt;
				System.out.println(&amp;quot; The fuzzer payload is: &amp;quot; + f.next());&lt;br /&gt;
				&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
		} catch (NoSuchFuzzerException e) {&lt;br /&gt;
			&lt;br /&gt;
			System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
			&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Hello Database of Fuzzers ====&lt;br /&gt;
&lt;br /&gt;
Having seen how to access a single Fuzzer through the createFuzzer() method available in the Database object. The next question that comes naturally is what are the Fuzzers that are available by default in JBroFuzz? &lt;br /&gt;
&lt;br /&gt;
To answer that, this example focuses more on the database component that we previously initialised, investigating the list of available methods that it offers. &lt;br /&gt;
&lt;br /&gt;
In JBroFuzz, all Fuzzers are stored in a Database object that you will be required to construct in order to access them. &lt;br /&gt;
&amp;lt;pre&amp;gt;/**&lt;br /&gt;
 * JBroFuzz API Examples 02&lt;br /&gt;
 *&lt;br /&gt;
 * JBroFuzz - A stateless network protocol fuzzer for web applications.&lt;br /&gt;
 * &lt;br /&gt;
 * Copyright (C) 2007, 2008, 2009 subere@uncon.org&lt;br /&gt;
 *&lt;br /&gt;
 * This file is part of the JBroFuzz API examples on how to use the &lt;br /&gt;
 * fuzzer libraries included in JBroFuzz.jar.&lt;br /&gt;
 * &lt;br /&gt;
 * JBroFuzz is free software: you can redistribute it and/or modify&lt;br /&gt;
 * it under the terms of the GNU General Public License as published by&lt;br /&gt;
 * the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
 * (at your option) any later version.&lt;br /&gt;
 * &lt;br /&gt;
 * JBroFuzz is distributed in the hope that it will be useful,&lt;br /&gt;
 * but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
 * GNU General Public License for more details.&lt;br /&gt;
 * &lt;br /&gt;
 * You should have received a copy of the GNU General Public License&lt;br /&gt;
 * along with JBroFuzz.  If not, see &amp;amp;lt;http://www.gnu.org/licenses/&amp;amp;gt;.&lt;br /&gt;
 * Alternatively, write to the Free Software Foundation, Inc., 51 &lt;br /&gt;
 * Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.&lt;br /&gt;
 * &lt;br /&gt;
 * Verbatim copying and distribution of this entire program file is &lt;br /&gt;
 * permitted in any medium without royalty provided this notice &lt;br /&gt;
 * is preserved. &lt;br /&gt;
 * &lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
import org.owasp.jbrofuzz.core.NoSuchFuzzerException;&lt;br /&gt;
import org.owasp.jbrofuzz.core.Database;&lt;br /&gt;
import org.owasp.jbrofuzz.core.Fuzzer; &lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;In JBroFuzz all Fuzzers are stored in a Database&lt;br /&gt;
 * object that you will be required to construct in order&lt;br /&gt;
 * to access them.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;Within the Database, each Fuzzer is a collection of &lt;br /&gt;
 * payloads, which carries a unique ID string value.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;Example ID values are the output of this program:&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &amp;amp;lt;code&amp;amp;gt;&lt;br /&gt;
 *  The fuzzer ID is: 013-LDP-INJ&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	The name of the fuzzer is:			LDAP Injection&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	The id of the fuzzer is:			013-LDP-INJ&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	The of payloads it carries (it's alphabet) is:	20&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	It has as 1st payload:&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *		|&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *  The fuzzer ID is: 018-XSS-4IE&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	The name of the fuzzer is:			XSS IE&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	The id of the fuzzer is:			018-XSS-4IE&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	The of payloads it carries (it's alphabet) is:	38&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *	It has as 1st payload:&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *		&amp;amp;lt; img src=`x` onrerror= `&amp;amp;nbsp;;; alert(1) ` /&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 * &amp;amp;lt;/code&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;Do not be confused between Prototypes and Fuzzers; &lt;br /&gt;
 * JBroFuzz uses Prototype objects to construct the Fuzzers&lt;br /&gt;
 * that get added into the Database upon initialisation.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;As a result, the getter methods available within a Database&lt;br /&gt;
 * object can carry the name of getAllPrototypeIDs and &lt;br /&gt;
 * getAllFuzzerIDs interchangebly.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 * &lt;br /&gt;
 * @author subere@uncon.org&lt;br /&gt;
 * @version n/a&lt;br /&gt;
 */&lt;br /&gt;
public class HelloDatabase {&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * @param args&lt;br /&gt;
	 */&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
		// You have to construct an instance of the fuzzers database&lt;br /&gt;
		Database fuzzDB = new Database();&lt;br /&gt;
&lt;br /&gt;
		// Get a list of all the fuzzer IDs from the database&lt;br /&gt;
		String[] fuzzer_IDs = fuzzDB.getAllPrototypeIDs();&lt;br /&gt;
		&lt;br /&gt;
		System.out.println(&amp;quot;The fuzzer IDs found are:&amp;quot;);&lt;br /&gt;
		&lt;br /&gt;
		for(String fuzzerID&amp;amp;nbsp;: fuzzer_IDs) {&lt;br /&gt;
			&lt;br /&gt;
			System.out.println(&amp;quot;The fuzzer ID is: &amp;quot; + fuzzerID);&lt;br /&gt;
			&lt;br /&gt;
			// We pass of length of 1, irrelevant if we are&lt;br /&gt;
			// just going to access the first payload&lt;br /&gt;
			// of the fuzzer&lt;br /&gt;
			Fuzzer fuzzer;&lt;br /&gt;
			try {&lt;br /&gt;
				&lt;br /&gt;
				fuzzer = fuzzDB.createFuzzer(fuzzerID, 1);&lt;br /&gt;
				// Normally you should check for fuzzer.hasNext()				&lt;br /&gt;
				String payload = fuzzer.next();&lt;br /&gt;
				&lt;br /&gt;
				System.out.println(&amp;quot;\tThe name of the fuzzer is:\t\t\t&amp;quot; + fuzzer.getName() );&lt;br /&gt;
				System.out.println(&amp;quot;\tThe id of the fuzzer is:\t\t\t&amp;quot; + fuzzer.getId() );&lt;br /&gt;
				System.out.println(&amp;quot;\tThe of payloads it carries (it's alphabet) is:\t&amp;quot; + fuzzDB.getSize(fuzzerID));&lt;br /&gt;
				System.out.println(&amp;quot;\tIt has as 1st payload:\n\t\t&amp;quot; + payload );&lt;br /&gt;
&lt;br /&gt;
			} catch (NoSuchFuzzerException e) {&lt;br /&gt;
				System.out.println(&amp;quot;Could not find the specified fuzzer!&amp;quot;);&lt;br /&gt;
				System.out.println(&amp;quot;Going to print all the fuzzer IDs I know:&amp;quot;);&lt;br /&gt;
				// old vs new for loop&amp;amp;nbsp;:)&lt;br /&gt;
				// in case of an error, print just the &lt;br /&gt;
				// fuzzer IDs, accessed from the DB&lt;br /&gt;
				for(int j = 0; j &amp;amp;lt; fuzzer_IDs.length; j++) {&lt;br /&gt;
					System.out.println(&amp;quot;The fuzzer ID is: &amp;quot; + fuzzer_IDs[j]);&lt;br /&gt;
				}&lt;br /&gt;
				&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== Methods available within the Fuzzer Class ====&lt;br /&gt;
&lt;br /&gt;
A final example of this section, involves seeing the usage of all the method calls available in the Fuzzer.java class &lt;br /&gt;
&amp;lt;pre&amp;gt;/**&lt;br /&gt;
 * JBroFuzz API Examples 03&lt;br /&gt;
 *&lt;br /&gt;
 * JBroFuzz - A stateless network protocol fuzzer for web applications.&lt;br /&gt;
 * &lt;br /&gt;
 * Copyright (C) 2007, 2008, 2009 subere@uncon.org&lt;br /&gt;
 *&lt;br /&gt;
 * This file is part of the JBroFuzz API examples on how to use the &lt;br /&gt;
 * fuzzer libraries included in JBroFuzz.jar.&lt;br /&gt;
 * &lt;br /&gt;
 * JBroFuzz is free software: you can redistribute it and/or modify&lt;br /&gt;
 * it under the terms of the GNU General Public License as published by&lt;br /&gt;
 * the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
 * (at your option) any later version.&lt;br /&gt;
 * &lt;br /&gt;
 * JBroFuzz is distributed in the hope that it will be useful,&lt;br /&gt;
 * but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
 * GNU General Public License for more details.&lt;br /&gt;
 * &lt;br /&gt;
 * You should have received a copy of the GNU General Public License&lt;br /&gt;
 * along with JBroFuzz.  If not, see &amp;amp;lt;http://www.gnu.org/licenses/&amp;amp;gt;.&lt;br /&gt;
 * Alternatively, write to the Free Software Foundation, Inc., 51 &lt;br /&gt;
 * Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.&lt;br /&gt;
 * &lt;br /&gt;
 * Verbatim copying and distribution of this entire program file is &lt;br /&gt;
 * permitted in any medium without royalty provided this notice &lt;br /&gt;
 * is preserved. &lt;br /&gt;
 * &lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
import org.owasp.jbrofuzz.core.NoSuchFuzzerException;&lt;br /&gt;
import org.owasp.jbrofuzz.core.Database;&lt;br /&gt;
import org.owasp.jbrofuzz.core.Fuzzer; &lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * &amp;amp;lt;p&amp;amp;gt;Example iterating through all the methods available&lt;br /&gt;
 * in the Fuzzer Object and their respective outputs.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 * @author subere@uncon.org&lt;br /&gt;
 * @version n/a&lt;br /&gt;
 */&lt;br /&gt;
public class IndigoFuzzerTests {&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * @param args&lt;br /&gt;
	 */&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
		// You have to construct an instance of the fuzzers database&lt;br /&gt;
		Database fuzzDB = new Database();&lt;br /&gt;
		// You have to supply a valid fuzzer ID&lt;br /&gt;
		String f_ID = &amp;quot;033-B08-OCT&amp;quot;;&lt;br /&gt;
		// You have to supply a (+)tive int&lt;br /&gt;
		int f_len = 5;&lt;br /&gt;
&lt;br /&gt;
		try {&lt;br /&gt;
			&lt;br /&gt;
			Fuzzer f = fuzzDB.createFuzzer(f_ID, f_len);&lt;br /&gt;
&lt;br /&gt;
			while(f.hasNext()) {&lt;br /&gt;
				&lt;br /&gt;
				// Could do this via reflection, but..&lt;br /&gt;
				f.next();&lt;br /&gt;
				// System.out.println(&amp;quot; The fuzzer payload is: &amp;quot; + f.next());&lt;br /&gt;
				System.out.println(&amp;quot; The maximum value is: &amp;quot; + f.getMaximumValue());&lt;br /&gt;
&lt;br /&gt;
				System.out.println(&amp;quot; The current value is: &amp;quot; + f.getCurrectValue());&lt;br /&gt;
				&lt;br /&gt;
&lt;br /&gt;
				&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		} catch (NoSuchFuzzerException e) {&lt;br /&gt;
			&lt;br /&gt;
			System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
			&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Advanced Fuzzing with the JBroFuzz Library ===&lt;br /&gt;
&lt;br /&gt;
This section covers more advanced APIs that are available under the '''org.owasp.jbrofuzz.core package'''. It should be noted that some of these classes and their corresponding functionality are not used by the JBroFuzz program application. Instead, they are made available for incorporation into other java code that you have perhaps written that requires more specialized type of fuzzing. &lt;br /&gt;
&lt;br /&gt;
==== Fuzzing Really Long Values with Big Integer ====&lt;br /&gt;
&lt;br /&gt;
As stated previously, within JBroFuzz a Fuzzer is a java Iterator. This implies that while fuzzing, we typically keep track of a counter representing the value that we are currently on. Consider the example of HelloFuzzer.java, above: &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
&lt;br /&gt;
 try {&lt;br /&gt;
     for(Fuzzer f = fuzzDB.createFuzzer(&amp;quot;031-B16-HEX&amp;quot;, 4); f.hasNext();) {&lt;br /&gt;
       // Get the next payload value...&lt;br /&gt;
       System.out.println(&amp;quot; The fuzzer payload is: &amp;quot; + f.next());&lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloFuzzer.java OWASP JBroFuzz Example 1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
If we compile this program: &lt;br /&gt;
&amp;lt;pre&amp;gt;javac -classpath &amp;quot;.\jbrofuzz\jar\JBroFuzz.jar&amp;quot; HelloFuzzer.java&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
and run it: &lt;br /&gt;
&amp;lt;pre&amp;gt;java -cp &amp;quot;.\jbrofuzz\jar\JBroFuzz.jar;.&amp;quot; HelloFuzzer&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
We are going to see output similar to: &lt;br /&gt;
&amp;lt;pre&amp;gt; The fuzzer payload is: 0000&lt;br /&gt;
 ... (output omitted)&lt;br /&gt;
 The fuzzer payload is: fffd&lt;br /&gt;
 The fuzzer payload is: fffe&lt;br /&gt;
 The fuzzer payload is: ffff&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Now what if we want a hexadecimal fuzzer of length not 4, but, say, 24. Let's try compile and run the above program with a length of 24. Changing the line to: &lt;br /&gt;
&amp;lt;pre&amp;gt;     for(Fuzzer f = fuzzDB.createFuzzer(&amp;quot;031-B16-HEX&amp;quot;, 24); f.hasNext();) {&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Running this modified version of HelloFuzzer.java, yields: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt;javac -classpath &amp;quot;.\jbrofuzz\jar\JBroFuzz.jar;.&amp;quot; HelloFuzzer.java&lt;br /&gt;
&lt;br /&gt;
&amp;amp;gt;java -classpath &amp;quot;.\jbrofuzz\jar\JBroFuzz.jar;.&amp;quot; HelloFuzzer&lt;br /&gt;
&lt;br /&gt;
&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Nothing! What is actually happening is JBroFuzz is figuring out that the specified length of the Fuzzer we are about to create is far greater than that of the long java data type. As a result, the Fuzzer is not even entering the iteration mode that is typically expected with methods next() and hasNext(). &lt;br /&gt;
&lt;br /&gt;
That's all great, but we still want a hexadecimal fuzzer, 24 digits long going from: &lt;br /&gt;
&amp;lt;pre&amp;gt;000000000000000000000000&lt;br /&gt;
...to...&lt;br /&gt;
ffffffffffffffffffffffff&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
For this JBroFuzz offers another type of Fuzzer class, that of FuzzerBigInteger. Let's modify the critical line within the original HelloFuzzer.java program that we had: &lt;br /&gt;
&amp;lt;pre&amp;gt;     for(FuzzerBigInteger f = fuzzDB.createFuzzerBigInteger(&amp;quot;031-B16-HEX&amp;quot;, 24); f.hasNext();) {&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
With the entire program becoming: &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
&lt;br /&gt;
 try {&lt;br /&gt;
     for(FuzzerBigInteger f = fuzzDB.createFuzzerBigInteger(&amp;quot;031-B16-HEX&amp;quot;, 24); f.hasNext();) {&lt;br /&gt;
       // Get the next payload value...&lt;br /&gt;
       System.out.println(&amp;quot; The fuzzer payload is: &amp;quot; + f.next());&lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloFuzzer.java OWASP JBroFuzz Example 1&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Compiling and running this program yields: &lt;br /&gt;
&amp;lt;pre&amp;gt; The fuzzer payload is: 000000000000000000000000&lt;br /&gt;
 The fuzzer payload is: 000000000000000000000001&lt;br /&gt;
 ... (output omitted)&lt;br /&gt;
 The fuzzer payload is: 00000000000000000001a982&lt;br /&gt;
 ... (output omitted)&lt;br /&gt;
 The fuzzer payload is: 00000000000000000001a982&lt;br /&gt;
 The fuzzer payload is: ffffffffffffffffffffffff&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
There are limitations to this class, as governed by the BigInteger class itself. Further information can be found at: &lt;br /&gt;
&amp;lt;pre&amp;gt;http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Still, on a virtual windows xp machine with 256Mb of RAM the above code had no problem running to completion. It took some time though.. Characteristics of the windows machine while this iteration was ongoing: The CPU was being utilised at 100% and memory usage was constant at 212 Mb. Overall, a clean sheet for FuzzerBigInteger.java. &lt;br /&gt;
&lt;br /&gt;
==== Using the Power Fuzzer API ====&lt;br /&gt;
&lt;br /&gt;
With web applications, it is often that you find yourself re-using part of, or the entirety of a fuzzing payload in more than one location, as part of the GET, POST, or any other type of request you submit. &lt;br /&gt;
&lt;br /&gt;
For this reason, JBroFuzz offers the PowerFuzzer class: A type of iterator for which you can specify how many copies of the payload you require in each request. &lt;br /&gt;
&lt;br /&gt;
Let's consider the following trivial scenario. You are in need of all hexadecimal values, which are 4-digits long (i.e. 0000 to FFFF) and you are in need of these 5 times for each request. &lt;br /&gt;
&lt;br /&gt;
This scenario is trivial, because typically you can assign the fuzzing payload (i.e. the value you get back from Fuzzer.next() ) to a String variable and re-use it as many times as you see fit. &lt;br /&gt;
&amp;lt;pre&amp;gt; Database fuzzDB = new Database();&lt;br /&gt;
 &lt;br /&gt;
 String fuzzerID = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
 int length = 4;&lt;br /&gt;
 ....&lt;br /&gt;
     for(Fuzzer f = fuzzDB.createFuzzer(fuzzerID, length); f.hasNext();) {&lt;br /&gt;
          String payload = f.next();&lt;br /&gt;
          ....&lt;br /&gt;
     }&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Using the PowerFuzzer.class, the following HelloPowerFuzzer.java program can be created: &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloPowerFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
 &lt;br /&gt;
 String fuzzerID = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
 int length = 4;&lt;br /&gt;
 int power = 5;&lt;br /&gt;
&lt;br /&gt;
 try {&lt;br /&gt;
     for(PowerFuzzer f = fuzzDB.createPowerFuzzer(fuzzerID, length, power); f.hasNext();) {&lt;br /&gt;
       // Get the next payload in an array of length[power]&lt;br /&gt;
	   String [] identicalElements = f.nextPower();&lt;br /&gt;
&lt;br /&gt;
	    // f.getPower() == identicalElements.length, always&lt;br /&gt;
		System.out.print(&amp;quot; I have &amp;quot; + f.getPower() + &amp;quot; elements: &amp;quot;);&lt;br /&gt;
	   &lt;br /&gt;
	   for(String elem&amp;amp;nbsp;: identicalElements) {&lt;br /&gt;
		&lt;br /&gt;
	     System.out.print(elem + &amp;quot; &amp;quot;);&lt;br /&gt;
	   }&lt;br /&gt;
	   System.out.println(&amp;quot;&amp;quot;);&lt;br /&gt;
	   &lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloPowerFuzzer.java OWASP JBroFuzz Power Fuzzer Example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This program would output the following; no rocket science here: &lt;br /&gt;
&amp;lt;pre&amp;gt;....&lt;br /&gt;
 I have 5 elements: 4817 4817 4817 4817 4817&lt;br /&gt;
 I have 5 elements: 4818 4818 4818 4818 4818&lt;br /&gt;
 I have 5 elements: 4819 4819 4819 4819 4819&lt;br /&gt;
 I have 5 elements: 481a 481a 481a 481a 481a&lt;br /&gt;
 I have 5 elements: 481b 481b 481b 481b 481b&lt;br /&gt;
 I have 5 elements: 481c 481c 481c 481c 481c&lt;br /&gt;
 I have 5 elements: 481d 481d 481d 481d 481d&lt;br /&gt;
 I have 5 elements: 481e 481e 481e 481e 481e&lt;br /&gt;
 I have 5 elements: 481f 481f 481f 481f 481f&lt;br /&gt;
 I have 5 elements: 4820 4820 4820 4820 4820&lt;br /&gt;
 I have 5 elements: 4821 4821 4821 4821 4821&lt;br /&gt;
 I have 5 elements: 4822 4822 4822 4822 4822&lt;br /&gt;
 I have 5 elements: 4823 4823 4823 4823 4823&lt;br /&gt;
 I have 5 elements: 4824 4824 4824 4824 4824&lt;br /&gt;
 I have 5 elements: 4825 4825 4825 4825 4825&lt;br /&gt;
 I have 5 elements: 4826 4826 4826 4826 4826&lt;br /&gt;
....&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Now imagine you need to change the number of elements you obtain back every time. For every second request, you need to obtain back two identical payloads, for every third request, you need to obtain back three payloads and for every fourth request, you need to obtain back four payloads. &lt;br /&gt;
&lt;br /&gt;
The PowerFuzzer class, with the corresponding method '''setPower(int)''' allows you to set how many identical elements you obtain back, without having to worry about the length argument. Below is a class that solves the above scenario: &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloPowerFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
 &lt;br /&gt;
 String fuzzerID = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
 int length = 4;&lt;br /&gt;
 int power = 5;&lt;br /&gt;
&lt;br /&gt;
 try {&lt;br /&gt;
     for(PowerFuzzer f = fuzzDB.createPowerFuzzer(fuzzerID, length, power); f.hasNext();) {&lt;br /&gt;
	 &lt;br /&gt;
	   int currentValue = (int) f.getCurrentValue(); &lt;br /&gt;
	   currentValue&amp;amp;nbsp;%= 4;&lt;br /&gt;
	   switch (currentValue) {&lt;br /&gt;
			case 0: f.setPower(1); break;&lt;br /&gt;
			case 1: f.setPower(2); break;&lt;br /&gt;
			case 2: f.setPower(3); break;&lt;br /&gt;
			default: f.setPower(4); break;&lt;br /&gt;
	   }&lt;br /&gt;
	   &lt;br /&gt;
       // Get the next payload in an array of length[power]&lt;br /&gt;
	   String [] identicalElements = f.nextPower();&lt;br /&gt;
	   &lt;br /&gt;
	    // f.getPower() == identicalElements.length, always&lt;br /&gt;
		System.out.print(&amp;quot; I have &amp;quot; + f.getPower() + &amp;quot; elements: &amp;quot;);&lt;br /&gt;
		// System.out.println(currentValue);&lt;br /&gt;
	   &lt;br /&gt;
	   for(String elem&amp;amp;nbsp;: identicalElements) {&lt;br /&gt;
		&lt;br /&gt;
	     System.out.print(elem + &amp;quot; &amp;quot;);&lt;br /&gt;
	   }&lt;br /&gt;
	   System.out.println(&amp;quot;&amp;quot;);&lt;br /&gt;
	   &lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloPowerFuzzer.java&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This class has as output: &lt;br /&gt;
&amp;lt;pre&amp;gt; ....&lt;br /&gt;
 I have 1 elements: 22a8&lt;br /&gt;
 I have 2 elements: 22a9 22a9&lt;br /&gt;
 I have 3 elements: 22aa 22aa 22aa&lt;br /&gt;
 I have 4 elements: 22ab 22ab 22ab 22ab&lt;br /&gt;
 I have 1 elements: 22ac&lt;br /&gt;
 I have 2 elements: 22ad 22ad&lt;br /&gt;
 I have 3 elements: 22ae 22ae 22ae&lt;br /&gt;
 I have 4 elements: 22af 22af 22af 22af&lt;br /&gt;
 I have 1 elements: 22b0&lt;br /&gt;
 I have 2 elements: 22b1 22b1&lt;br /&gt;
 I have 3 elements: 22b2 22b2 22b2&lt;br /&gt;
 I have 4 elements: 22b3 22b3 22b3 22b3&lt;br /&gt;
 I have 1 elements: 22b4&lt;br /&gt;
 I have 2 elements: 22b5 22b5&lt;br /&gt;
 I have 3 elements: 22b6 22b6 22b6&lt;br /&gt;
 I have 4 elements: 22b7 22b7 22b7 22b7&lt;br /&gt;
 I have 1 elements: 22b8&lt;br /&gt;
 I have 2 elements: 22b9 22b9&lt;br /&gt;
 ....&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Naturally, the algorithm of the number of elements required can vary based on any number of parameters. The PowerFuzzer class gives you a quick way to control the number of identical payloads you obtain back, without having to worry about creating a data type to store them in. &lt;br /&gt;
&lt;br /&gt;
==== Using the Double Fuzzer API ====&lt;br /&gt;
&lt;br /&gt;
In some cases of fuzzing web applications, a requirement to fuzz two (or more) locations part of the request being submitted to the web server becomes apparent. &lt;br /&gt;
&lt;br /&gt;
The DoubleFuzzer class allows you to create a fuzzer based on two prototype definitions. Similarly to instantiating a Fuzzer through a prototype and a given length, with a DoubleFuzzer, we pass two prototype definitions and two lengths. The corresponding method call available within the '''Database''' class of org.owasp.jbrofuzz.core is: &lt;br /&gt;
&amp;lt;pre&amp;gt;public DoubleFuzzer createDoubleFuzzer(String id1, int length1,  &lt;br /&gt;
								String id2, int length2) throws NoSuchFuzzerException {&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Let's cross-breed some fuzzers, see what results we get back during an iteration. &lt;br /&gt;
&lt;br /&gt;
The first example below, uses two hexadecimal fuzzers of different lengths, as specified by the variables: &lt;br /&gt;
&amp;lt;pre&amp;gt;String fuzzID1 = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
String fuzzID2 = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
int length1 = 4;&lt;br /&gt;
int length2 = 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
As the double fuzzer iteration is taking place, the second fuzzer, defined by the fuzzID2 &amp;amp;amp; length2 loops, starting from 00 and going all the way up to FF. An example output is: &lt;br /&gt;
&amp;lt;pre&amp;gt; I have 2 elements: fefb fb&lt;br /&gt;
 I have 2 elements: fefc fc&lt;br /&gt;
 I have 2 elements: fefd fd&lt;br /&gt;
 I have 2 elements: fefe fe&lt;br /&gt;
 I have 2 elements: feff ff&lt;br /&gt;
 I have 2 elements: ff00 00&lt;br /&gt;
 I have 2 elements: ff01 01&lt;br /&gt;
 I have 2 elements: ff02 02&lt;br /&gt;
 I have 2 elements: ff03 03&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The complete code listing of HelloDoubleFuzzer.java is: &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloDoubleFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
 &lt;br /&gt;
 String fuzzID1 = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
 String fuzzID2 = &amp;quot;031-B16-HEX&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 int length1 = 4;&lt;br /&gt;
 int length2 = 2;&lt;br /&gt;
 &lt;br /&gt;
 try {&lt;br /&gt;
     DoubleFuzzer f = fuzzDB.createDoubleFuzzer(fuzzID1, length1, fuzzID2, length2);&lt;br /&gt;
	 &lt;br /&gt;
     while( f.hasNext() ) {&lt;br /&gt;
       // Get the next payload in an array of length[power]&lt;br /&gt;
	   String [] payloads = f.next();&lt;br /&gt;
	   &lt;br /&gt;
	    // f.getPower() == identicalElements.length, always&lt;br /&gt;
		System.out.print(&amp;quot; I have &amp;quot; + f.getPower() + &amp;quot; elements: &amp;quot;);&lt;br /&gt;
		// System.out.println(currentValue);&lt;br /&gt;
	   &lt;br /&gt;
	   for(String elem&amp;amp;nbsp;: payloads) {&lt;br /&gt;
		&lt;br /&gt;
	     System.out.print(elem + &amp;quot; &amp;quot;);&lt;br /&gt;
	   }&lt;br /&gt;
	   System.out.println(&amp;quot;&amp;quot;);&lt;br /&gt;
	   &lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloDoubleFuzzer.java&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
That's simple enough; now let's cross-breed something a bit more exotic: Imagine a 3-digit octal ID value [000 - 777] being submitted inline with, say, a parameter that we want to test for Cross-Site Scripting (XSS). Let's adjust the program above with the corresponding fuzzer IDs of these fuzzers. Remember all the IDs of all the fuzzers can be found in the fuzzers.jbrf file within JBroFuzz.jar: &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloDoubleFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
 &lt;br /&gt;
 String fuzzID1 = &amp;quot;033-B08-OCT&amp;quot;;&lt;br /&gt;
 String fuzzID2 = &amp;quot;019-XSS-GEK&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 int length1 = 3;&lt;br /&gt;
 int length2 = 1;&lt;br /&gt;
 &lt;br /&gt;
 try {&lt;br /&gt;
     DoubleFuzzer f = fuzzDB.createDoubleFuzzer(fuzzID1, length1, fuzzID2, length2);&lt;br /&gt;
	 &lt;br /&gt;
     while( f.hasNext() ) {&lt;br /&gt;
       // Get the next payload in an array of length[power]&lt;br /&gt;
	   String [] payloads = f.next();&lt;br /&gt;
	   &lt;br /&gt;
	    // f.getPower() == identicalElements.length, always&lt;br /&gt;
		System.out.print(&amp;quot; I have &amp;quot; + f.getPower() + &amp;quot; elements: &amp;quot;);&lt;br /&gt;
		// System.out.println(currentValue);&lt;br /&gt;
	   &lt;br /&gt;
	   for(String elem&amp;amp;nbsp;: payloads) {&lt;br /&gt;
		&lt;br /&gt;
	     System.out.print(elem + &amp;quot; &amp;quot;);&lt;br /&gt;
	   }&lt;br /&gt;
	   System.out.println(&amp;quot;&amp;quot;);&lt;br /&gt;
	   &lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloDoubleFuzzer.java&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The output from this program is: &lt;br /&gt;
&amp;lt;pre&amp;gt; I have 2 elements: 000 (1?(1?{a:1?&amp;quot;&amp;quot;[1?&amp;quot;ev\a\l&amp;quot;:0](1?&amp;quot;\a\lert&amp;quot;:0):0}:0).a:0)[1?&amp;quot;\c\a\l\l&amp;quot;:0](content,1?&amp;quot;x\s\s&amp;quot;:0)&lt;br /&gt;
 I have 2 elements: 001 &amp;amp;lt;STYLE TYPE=&amp;quot;text/javascript&amp;quot;&amp;amp;gt;alert('XSS');&amp;amp;lt;/STYLE&amp;amp;gt;&lt;br /&gt;
 I have 2 elements: 002 &amp;amp;lt;SCRIPT SRC=http://ha.ckers.org/xss.js&lt;br /&gt;
 I have 2 elements: 003 &amp;amp;lt;A HREF=&amp;quot;http://google:ha.ckers.org&amp;quot;&amp;amp;gt;XSS&amp;amp;lt;/A&amp;amp;gt;&lt;br /&gt;
 I have 2 elements: 004 &amp;amp;lt;A HREF=&amp;quot;http://ha.ckers.org@google&amp;quot;&amp;amp;gt;XSS&amp;amp;lt;/A&amp;amp;gt;&lt;br /&gt;
 I have 2 elements: 005 &amp;amp;lt;A HREF=&amp;quot;//google&amp;quot;&amp;amp;gt;XSS&amp;amp;lt;/A&amp;amp;gt;&lt;br /&gt;
 ....&lt;br /&gt;
 ...&lt;br /&gt;
 ..&lt;br /&gt;
 .&lt;br /&gt;
 ..&lt;br /&gt;
 ...&lt;br /&gt;
 ....&lt;br /&gt;
 I have 2 elements: 774 &amp;amp;lt;SCRIPT SRC=http://ha.ckers.org/xss.js&lt;br /&gt;
 I have 2 elements: 775 &amp;amp;lt;A HREF=&amp;quot;http://google:ha.ckers.org&amp;quot;&amp;amp;gt;XSS&amp;amp;lt;/A&amp;amp;gt;&lt;br /&gt;
 I have 2 elements: 776 &amp;amp;lt;A HREF=&amp;quot;http://ha.ckers.org@google&amp;quot;&amp;amp;gt;XSS&amp;amp;lt;/A&amp;amp;gt;&lt;br /&gt;
 I have 2 elements: 777 &amp;amp;lt;A HREF=&amp;quot;//google&amp;quot;&amp;amp;gt;XSS&amp;amp;lt;/A&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
With the list stopping iterating at the last element of the greatest of the two fuzzers. &lt;br /&gt;
&lt;br /&gt;
==== Using the Cross Product Fuzzer API ====&lt;br /&gt;
&lt;br /&gt;
A final case of a special Double Fuzzer is the the Cross Product Fuzzer of the payloads of two fuzzers. This type of fuzzing is virtually encountered in username/password login form on the Internet. Let's work on this by example. &lt;br /&gt;
&lt;br /&gt;
Consider your home network router. You recall changing the default password to one of the typical password values that you use. Also, you are not 100% certain about the username for the router either, it is one of the typical admin, user, administrator, root, yoda type values, but you cannot recall which one. Needless to say, you don't know what the username, or password actually is. &lt;br /&gt;
&lt;br /&gt;
So in a mini brute-forcing attack scenario, you have the following list of usernames, out of which one is valid: &lt;br /&gt;
&amp;lt;pre&amp;gt;admin&lt;br /&gt;
administrator&lt;br /&gt;
Administrator&lt;br /&gt;
root&lt;br /&gt;
adminUser&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Also you know that the password is one of the following (Top 10 Threadwatch 2007 passwords): &lt;br /&gt;
&amp;lt;pre&amp;gt;password&lt;br /&gt;
123456&lt;br /&gt;
qwerty&lt;br /&gt;
abc123&lt;br /&gt;
letmein&lt;br /&gt;
monkey&lt;br /&gt;
myspace1&lt;br /&gt;
password1&lt;br /&gt;
blink182&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The set that contains every possible combination of the two sets is the Cross Product of the list of usernames, times the list of passwords. So manually, (as most people do while locking themselves out) you would try, popular combinations of the above, starting with: &lt;br /&gt;
&amp;lt;pre&amp;gt;admin password&lt;br /&gt;
admin 123456&lt;br /&gt;
admin qwerty&lt;br /&gt;
....&lt;br /&gt;
admin blink182&lt;br /&gt;
administrator password&lt;br /&gt;
administrator 123456&lt;br /&gt;
administrator qwerty&lt;br /&gt;
....&lt;br /&gt;
adminUser password1&lt;br /&gt;
adminUser blink182&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Thus the total number of attempts would be (number of usernames) x (number of passwords). No rocket science here. &lt;br /&gt;
&lt;br /&gt;
JBroFuzz introduces the CrossProductFuzzer class capable of iterating through the cross product of two fuzzers. Let's put it into code; the following program provides a list of all 2-digit octal numbers with every 2-digit binary number. A total of (8 x 8) x (2 x 2) = 256 values. &lt;br /&gt;
&amp;lt;pre&amp;gt;import org.owasp.jbrofuzz.core.*;&lt;br /&gt;
&lt;br /&gt;
public class HelloCrossFuzzer {&lt;br /&gt;
&lt;br /&gt;
 public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
 Database fuzzDB = new Database();&lt;br /&gt;
 &lt;br /&gt;
 String fuzzID1 = &amp;quot;033-B08-OCT&amp;quot;;&lt;br /&gt;
 String fuzzID2 = &amp;quot;034-B02-BIN&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 int length1 = 2;&lt;br /&gt;
 int length2 = 2;&lt;br /&gt;
 &lt;br /&gt;
 try {&lt;br /&gt;
     CrossProductFuzzer f = fuzzDB.createCrossFuzzer(fuzzID1, length1, fuzzID2, length2);&lt;br /&gt;
	 &lt;br /&gt;
     while( f.hasNext() ) {&lt;br /&gt;
       // Get the next payload in an array of length[power]&lt;br /&gt;
	   String [] payloads = f.next();&lt;br /&gt;
	   &lt;br /&gt;
	    // f.getPower() == identicalElements.length, always&lt;br /&gt;
		System.out.print(&amp;quot; I have &amp;quot; + f.getPower() + &amp;quot; elements: &amp;quot;);&lt;br /&gt;
		// System.out.println(currentValue);&lt;br /&gt;
	   &lt;br /&gt;
	   for(String elem&amp;amp;nbsp;: payloads) {&lt;br /&gt;
		&lt;br /&gt;
	     System.out.print(elem + &amp;quot; &amp;quot;);&lt;br /&gt;
	   }&lt;br /&gt;
	   System.out.println(&amp;quot;&amp;quot;);&lt;br /&gt;
	   &lt;br /&gt;
     }&lt;br /&gt;
   } catch (NoSuchFuzzerException e) {&lt;br /&gt;
       System.out.println(&amp;quot;Could not find fuzzer &amp;quot; + e.getMessage());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
} // HelloCrossFuzzer.java&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This program has as output: &lt;br /&gt;
&amp;lt;pre&amp;gt; I have 2 elements: 00 00&lt;br /&gt;
 ...&lt;br /&gt;
 ..&lt;br /&gt;
 .&lt;br /&gt;
 ..&lt;br /&gt;
 ...&lt;br /&gt;
 I have 2 elements: 74 00&lt;br /&gt;
 I have 2 elements: 74 01&lt;br /&gt;
 I have 2 elements: 74 10&lt;br /&gt;
 I have 2 elements: 74 11&lt;br /&gt;
 I have 2 elements: 75 00&lt;br /&gt;
 I have 2 elements: 75 01&lt;br /&gt;
 I have 2 elements: 75 10&lt;br /&gt;
 I have 2 elements: 75 11&lt;br /&gt;
 I have 2 elements: 76 00&lt;br /&gt;
 I have 2 elements: 76 01&lt;br /&gt;
 I have 2 elements: 76 10&lt;br /&gt;
 I have 2 elements: 76 11&lt;br /&gt;
 I have 2 elements: 77 00&lt;br /&gt;
 I have 2 elements: 77 01&lt;br /&gt;
 I have 2 elements: 77 10&lt;br /&gt;
 I have 2 elements: 77 11&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
You can substitute any list of fuzzer ID to the IDs you use in this program. &lt;br /&gt;
&lt;br /&gt;
'''Remember!''' The total number of payloads must not exceed that of the the maximum value of the long primitive java data type ''Long.MAX_VALUE'' which is 2^63 - 1. If you are in need of more than that payloads, you would have to use the big integer implementation of the Fuzzer class, namely: FuzzerBigInteger.java. &lt;br /&gt;
&lt;br /&gt;
== Graphing with JBroFuzz ==&lt;br /&gt;
&lt;br /&gt;
Once a fuzzing session has completed, JBroFuzz offers the ability to generate a number of graphs, using various metrics. This section investigates how to further the graphing functionality available with the application. &lt;br /&gt;
&lt;br /&gt;
=== Customizing the logo on each Graph ===&lt;br /&gt;
&lt;br /&gt;
As of version 2.0, all image icons within JBroFuzz are located within the /icons directory of the application. The particular transparent image file displayed on top right part of the graphs is named: &lt;br /&gt;
&amp;lt;pre&amp;gt;/icons/owasp-med.png&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This file is a 64 x 64 PNG image file. You can replace it with your own file, as follows: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;gt;ls -l JBroFuzz.jar&lt;br /&gt;
-rw-rw-rw-   1 user     group     4033612 Feb 15 12:33 JBroFuzz.jar&lt;br /&gt;
&lt;br /&gt;
&amp;amp;gt;unzip -oq JBroFuzz.jar&lt;br /&gt;
&amp;amp;gt;cd icons&lt;br /&gt;
&amp;amp;gt;mv owasp-med.png file64x64-file.png&lt;br /&gt;
&amp;amp;gt;cd ..&lt;br /&gt;
&amp;amp;gt;zip -r JBroFuzz.zip *&lt;br /&gt;
&amp;amp;gt;mv JBroFuzz.zip JBroFuzz.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
This enables you to have your own (company logo) on JBroFuzz graphs. Further to this, a number of other customization options are available, by right clicking on each of the graph generated. &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP_JBroFuzz]]&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Category:OWASP_Enterprise_Security_API/es&amp;diff=81079</id>
		<title>Category:OWASP Enterprise Security API/es</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Category:OWASP_Enterprise_Security_API/es&amp;diff=81079"/>
				<updated>2010-04-07T15:12:08Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: /* Proyecto OWASP API de seguridad empresarial (ESAPI) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Proyecto OWASP API de seguridad empresarial (ESAPI) =&lt;br /&gt;
&lt;br /&gt;
La ESAPI es una colección gratis y abierta de todos los métodos de seguridad que un desarrollador necesita para construir una aplicación Web segura. Usted puede usar solo las interfases y construir su propia implementación usando la infraestructura de su compañía. O, puede user la implementación de referencia como un punto de inicio. En concepto, la API es independiente del lenguaje. Sin embargo, los primeros entregables del proyecto son una API Java y una referencia de implementación Java. Esfuerzos para construir ESAPI en .NET y PHP están en marcha.&lt;br /&gt;
&lt;br /&gt;
Desafortunadamente, las plataformas disponibles, y herramientas (Java EE, Struts, Spring, etc...) simplemente no proporcionan protección suficiente. Esto deja a los desarrolladores con la responsabilidad de diseñar y construir mecanismos de seguridad. Este reinventado de la rueda para cada aplicación lleva a una perdida de tiempo y agujeros de seguridad masivos.&lt;br /&gt;
&lt;br /&gt;
Los ahorros de costos a través de tiempos de desarrollo reducidos, y la seguridad incrementada debido al uso de métodos de seguridad fuertemente analizados y cuidadosamente diseñados proporcionan a los desarrolladores con ventajas masivas sobre organizaciones que están tratando de lidiar con la seguridad usando técnicas seguras de programación para este propósito. Esta API esta diseñada para hacerse cargo automáticamente de muchos aspectos de la seguridad en aplicaciones, haciendo estos problemas invisibles para los desarrolladores.&lt;br /&gt;
&lt;br /&gt;
El proyecto OWASP ESAPI  es dirigido por [[User:Jeff Williams|Jeff Williams]], quien sirve como presidente de voluntariado de OWASP y es el CEO de Aspect Security. Jeff es un desarrollador de software que se ha especializado en seguridad de aplicaciones desde 1995. ESAPI es el resultado de mas de una década de revisión de código y pruebas de intrusión de aplicaciones empresariales criticas. Si desea ser voluntario para ayudar en el proyecto, puede contactarlo en jeff.williams@owasp.org.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Descargar ahora==&lt;br /&gt;
&lt;br /&gt;
Esta versión es la primera versión publica e indudablemente se someterá a una revisión significativa en los próximos meses. Estamos buscando organizaciones dispuestas a usar ESAPI en un programa piloto y que trabajen con nosotros para hacer esta biblioteca mejor. Por favor contacte a jeff.williams@owasp.org para mas información.  Si esta interesado en seguridad de aplicaciones, por favor únase a la[http://lists.owasp.org/mailman/listinfo/owasp-esapi lista de correos de OWASP ESAPI] y ayude a hacer ESAPI mejor!&lt;br /&gt;
&lt;br /&gt;
* [http://code.google.com/p/owasp-esapi-java/ Repositorio de código]&lt;br /&gt;
* [http://code.google.com/p/owasp-esapi-java/issues/list Reportar problemas]&lt;br /&gt;
&lt;br /&gt;
Ultima versión (versiones anteriores están publicadas en el repositorio de código)&lt;br /&gt;
&lt;br /&gt;
* [http://owasp-esapi-java.googlecode.com/files/owasp-esapi-java-1.1.1.jar ESAPI v1.1.1 Complete JAR file] (Java 1.4 compatible)&lt;br /&gt;
* [http://owasp-esapi-java.googlecode.com/files/owasp-esapi-java-src-1.1.1.zip ESAPI v1.1.1 Source archive]&lt;br /&gt;
&lt;br /&gt;
Primeros pasos&lt;br /&gt;
&lt;br /&gt;
* [http://owasp-esapi-java.googlecode.com/svn/trunk/javadoc/index.html Javadoc en línea]&lt;br /&gt;
* [http://owasp-esapi-java.googlecode.com/svn/trunk/documentation/OWASP%20ESAPI%20Overview.pptx Presentación PowerPoint de ESAPI]&lt;br /&gt;
&lt;br /&gt;
==Arquitectura==&lt;br /&gt;
&lt;br /&gt;
La arquitectura de ESAPI es muy simple, es solo una colección de clases que encapsula las operaciones clave de seguridad que la mayoría de las aplicaciones necesitan.  ESAPI esta diseñado para hacer fácil el ajustar la seguridad en aplicaciones existentes, así como proporcionar una base sólida para un nuevo desarrollo.  Nuevos proyectos de desarrollo deberían considerar integrar ESAPI en su framework para hacer que la seguridad ocurra automáticamente. ESAPI viene con un filtro ESAPI que minimiza los cambios requeridos en su aplicación base.&lt;br /&gt;
&lt;br /&gt;
https://www.owasp.org/images/7/71/OWASP_ESAPI_Architecture_es.png&lt;br /&gt;
&lt;br /&gt;
ESAPI cubre la mayoría de los retos de seguridad que enfrentan los desarrolladores. ESAPI provee la capacidad a los desarrolladores para crear aplicaciones que están protegidas en contra de casi todos los riesgos descritos en el OWASP [[Top Ten]]. Compare esta cobertura con escaneo automático y herramientas de análisis estático, y entonces considere como es mejor empleado su tiempo. &lt;br /&gt;
&lt;br /&gt;
https://www.owasp.org/images/4/48/OWASP_ESAPI_Top_Ten_es.png&lt;br /&gt;
&lt;br /&gt;
Hay dos partes clave en ESAPI:&lt;br /&gt;
* Un conjunto de interfaces &lt;br /&gt;
* Una implementación de referencia &lt;br /&gt;
&lt;br /&gt;
Usando ESAPI, las aplicaciones a lo largo de una organización serán mas fáciles de desarrollar, mas consistentes, y mas fáciles de actualizar en un solo lugar. El uso de ESAPI hará mucho mas fácil para las herramientas de análisis estático verificar una aplicación, como las llamadas a ESAPI pueden ser construidas en el conjunto de reglas.&lt;br /&gt;
&lt;br /&gt;
==Patrocinadores del proyecto== &lt;br /&gt;
&lt;br /&gt;
El proyecto OWASP ESAPI es patrocinado por &lt;br /&gt;
[http://www.aspectsecurity.com https://www.owasp.org/images/d/d1/Aspect_logo.gif]&lt;br /&gt;
&lt;br /&gt;
==Licenciamiento==&lt;br /&gt;
Este proyecto tiene doble licenciamiento bajo GPL and BSD. Elija cualquiera que se ajuste a su política corporativa...[JFM]&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Download]]&lt;br /&gt;
[[Category:OWASP Project|Enterprise Security API/es]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79870</id>
		<title>Anexo para Contrato de Software Seguro de OWASP</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79870"/>
				<updated>2010-03-12T21:29:12Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: /* SOBRE EL PROYECTO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''ANEXO DE CONTRATO PARA DESAROLLO DE SOFTWARE SEGURO'''&lt;br /&gt;
&lt;br /&gt;
  ADVERTENCIA: ESTE DOCUMENTO DEBE SER CONSIDERADO COMO UNA GUÍA SOLAMENTE.&lt;br /&gt;
  OWASP RECOMIENDA VEHEMENTEMENTE QUE CONSULTE UN ABOGADO CALIFICADO&lt;br /&gt;
  PARA AYUDARLE A NEGOCIAR UN CONTRATO DE SOFTWARE&lt;br /&gt;
  &lt;br /&gt;
== Introducción  ==&lt;br /&gt;
&lt;br /&gt;
Este anexo de contrato pretende ayudar a los proveedores de software y sus clientes a negociar y capturar importantes términos y condiciones contractuales relacionadas a la seguridad en el Software a ser desarrollado o entregado. La razon para este proyecto es que la mayoría de los contratos no mencionan estos temas, y las partes frecuentamente tienen puntos de vista dramaticamente diferentes a lo que en ralidad fue acordado. Creemos que articular claramente estos términos es la mejor manera de asegurarse que ambas partes pueden hacer desiciones informadas sobre como proceder. &lt;br /&gt;
&lt;br /&gt;
 &amp;quot;La seguridad del software comercial mejorará cuando el mercado demande mejor seguridad.&lt;br /&gt;
 Al menos, cada petición para propuestas de software debería pedir a los vendedores &lt;br /&gt;
 detallar como van ellos a probar sus productos para encotrar vulnerabilidades de&lt;br /&gt;
 seguridad. Este paso empezará convenciendo a los vendedores de software empaquetado&lt;br /&gt;
 y proveedores externos que las compañias valoran la seguridad.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- John Pescatore, Director de investiagacion con Gartner&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 Pedimos a los clientes y proveedores que usen este documento como un marco para discutir&lt;br /&gt;
 espectativas y negociar responsabilidades. Este anexo se creó para ser añadido a un&lt;br /&gt;
 contrato de desarrollo de software. Estos términos son negociables, significa que ellos&lt;br /&gt;
 pueden y deben ser discutidos por el cliente y el proveedor.&lt;br /&gt;
&lt;br /&gt;
== SOBRE EL PROYECTO ==&lt;br /&gt;
&lt;br /&gt;
Este documento fue creado por la fundación OWASP (Open Web Application Security Project por sus siglas en Inglés), una organización sin animo de lucro con el objetivo de crear herramientas y documentación, gratuita y abierta para asegurar software. Para facilitar su uso en contratación privada, este documento es de dominio publico. Puede encontrar detalles adicionales sobre este proyecto en http://www.owasp.org/index.php/OWASP_Legal_Project. Son Bienvenidos comentarios de ambos, productores y consumidores de software, asi como de la comunidad legal. &lt;br /&gt;
&lt;br /&gt;
OWASP reconoce gratamente la contribución especial de [http://www.aspectsecurity.com Aspect Security] por su rol en la investigación y preparación de este documento.&lt;br /&gt;
&lt;br /&gt;
==OBJECIONES==&lt;br /&gt;
&lt;br /&gt;
Las siguientes páginas cubren algunas objeciones que escuchamos frecuentemente sobre usar este lenguaje en contratos de desarrollo de software:&lt;br /&gt;
&lt;br /&gt;
=== PERO NO TODOS LOS TÉRMINOS SON CORRECTOS PARA NOSOTROS… ===&lt;br /&gt;
&lt;br /&gt;
Este documento debe ser considerado un punto de inicio para su contrato. Puede que no le gusten todas las actividades, o puede querer proponer mas. Puede querer asignar responsabilidades de manera diferente. Este documento no pretende capturar exactamente las necesidades de todos los clientes y proveedores de software. Pretende proveer un marco para discutir temas clave, importantes para asegurarse que el software se cree de forma segura. Despues de que tengan una discusión sobre seguridad y alcancen un acuerdo. Puede ajustar el convenio para que concuerde con el contrato.&lt;br /&gt;
&lt;br /&gt;
=== PERO, ¿QUIEN DEBE PAGAR POR ESTAS ACTIVIDADES?… ===&lt;br /&gt;
&lt;br /&gt;
Este contrato no es sobre poner mas peso al desarollo de software. La pregunta no es sobre si hay costos asociados con seguridad (por supuesto que hay). La pregunta correcta es qué actividades deberían hacerse por ambas partes para minimizar costos, y cuando deberían ocurrir. &lt;br /&gt;
&lt;br /&gt;
Este anexo no menciona (intensionalmente) sobre el detalle de quién debería pagar por la actividades descritas. Mientras muchas de estas actividades deben estar pasando ya, y son esperadas por muchos clientes, ellas no estan practicadas regularmente en la industria del software. La cuestion de quién paga (y cuándo) debe ser parte de la negociación. &lt;br /&gt;
&lt;br /&gt;
Calcular el costo de la seguridad es muy difícil. Auque hay costos asociados con realizar actividades de seguridad, hay también costos importantes asociados con ignorar estas actividades. Estamos convencidos el mejor costo-beneficio para desarrollar software es reducir la probabilidad de que fallas de seguridad sean introducidas y minimzar el tiempo entre introducir una falla y arreglarla. &lt;br /&gt;
&lt;br /&gt;
Una distición importante a hacer cuando calculamos costos es entre construir mecanismos de seguridad y las actividades para asegurarse que esos mecanismos sean correctos y efectivos. Intentar agregar mecanismoa al final de el ciclo de desarrollo puede causar serios problemas de diseño e incrementará el costo dramáticamente. Este convenio promueve decisiones sobre mecanismos para minimizar estos costos. Similarmente, esperar hasta justo antes de la puesta en producción para hacer actividades de aseguramiento, tales como revisión de código y pruebas de intrusión, tambien incrementaría los costos dramaticamente. Creemos que el mejor costo-beneficio para ganar certeza es poner un nivel constante de esfuerzo en el aseguramiento a través del ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
=== PERO EL NIVEL DE RIGOR ESTA INCORRECTO…. ===&lt;br /&gt;
&lt;br /&gt;
Este convenio asume que el software que esta siendo desarrollado es razonablemente importante para una empresa grande o agencia de gobierno. Hemos seleccionado un &amp;quot;nivel de rigor&amp;quot; para el convenio que es alcanzable por la mayoria de las organizaciones proveedoras de software, e identificaría y manejaría los riesgos más comunes. &lt;br /&gt;
&lt;br /&gt;
Sin embargo, para el software que va a ser usado en aplicaciones críticas, como aplicaciones médicas, financieras o relacionadas con el ejército. Puede querer incrementar el nivel de rigor. Puede querer agregar revisiones, documentación y actividades adicionales de prueba. Puede querer mejorar el proceso de encontrar, diagnosticar y remediar vulnerabilidades. Para aplicaciones menos sensibles, puede desear reducir o remover actividades.&lt;br /&gt;
&lt;br /&gt;
=== PERO NOSOTROS NO PODEMOS ACEPTAR TANTO RIESGO… ===&lt;br /&gt;
&lt;br /&gt;
Este convenio pretende facilitar la discusión sobre quién tomaría el riesgo por las vulnerabilidades de seguridad en el software. Por un lado del espectro, el cliente podría tomar todo el riesgo y el proveedor podría entregar código con muchas vulnerabilidades. Por el otro extremo, el proveedor podría tomar todo el riesgo y asumir la responsabilidad de entregar código perfecto. Ambos extremos son irrealizables. &lt;br /&gt;
&lt;br /&gt;
Actualmente, en este convenio, el proveedor toma el riesgo por problemas que sean descubiertos en los requerimientos o deben ser cubiertos por esfuerzos razonables en pruebas. Pero la remediación de &amp;quot;nuevos&amp;quot; problemas de seguridad tendría que ser pagado por el cliente. Creemos que este es un equilibrio funcional, ya que limita el riesgo adquirido por el proveedor y promueve obtener requerimientos de seguridad por anticipado. Pero hay muchas otras posibles soluciones a este problema. Por favor, dejenos saber si tiene sugerencias alternas, podriamos incluirlas en versiones futuras de este documento. &lt;br /&gt;
&lt;br /&gt;
Note que la discusión aqui solo cubre el riesgo asociado con arreglar las vulnerabilidades de seguridad en el código, y no incluye los costos asociados con recuperarse de incidentes de seguridad relacionados con explotar cualquiera de esas vulnerabilidades. Estamos interesados en las mejores prácticas en esta area.&lt;br /&gt;
&lt;br /&gt;
=== PERO COMO PODEMOS ASEGURAR CÓDIGO DE TERCEROS… ===&lt;br /&gt;
&lt;br /&gt;
Casi todos los proyectos de sofware tienen una cantidad importante de código de terceros como librerias, frameworks y productos. Desde la perspectiva de seguridad, este código es tan importante como el código desarrollado a la medida para su proyecto. Creemos que la responsabilidad de garantizar la seguridad de este código es llevada mejor por el proveedor, aunque ellos podrían no tener toda la capacidad para garantizar la seguridad por ellos mismos. Sin embargo, la seguridad puede ser parte de el la desición de &amp;quot;construir o comprar&amp;quot;, y esta parece ser la mejor manera de promoverla. &lt;br /&gt;
&lt;br /&gt;
El proveedor, por supuesto, tiene la opción de pasar la responsabilidad al proveedor del software de terceros. El desarrollador puede también analizar el código de terceros por él mismo o contratar expertos en seguridad para analizarlo por él.&lt;br /&gt;
&lt;br /&gt;
=== PERO PORQUE DEBO PASAR POR TODO ESTE PROBLEMA… ===&lt;br /&gt;
&lt;br /&gt;
En última instancia, creemos que no hay alternativa para hacer de la seguridad una parte de el proceso de contratación de software. Actualmente, creemos que hay serios malentendidos sobre la seguridad del código que esta siendo desarrollado bajo muchos contratos de desarrollo de software. Esto puede solamente llevar a una cara litigación y a desiciones hechas por individuos con poca experiencia y entendimiento sobre software. Lea el [[Secure software contracting hypothetical case study|Caso de estudio hipotético sobre contratación de software seguro]] para una discusión completa de este problema. &lt;br /&gt;
&lt;br /&gt;
Hay muchos beneficios al trabajar con este convenio. El principal es que pondrá claras las expectativas entre las partes involucradas. En algunos casos ayudará a evitar demandas cuando problemas de seguridad difíciles aparecen en el software. Tambien, estas son las mismas actividades requeridas por muchas razónes legales y de conformidad con estándares/leyes.&lt;br /&gt;
&lt;br /&gt;
=== PERO ES MUY DIFÍCIL PRODUCIR TODA ESTA DOCUMENTACIÓN… ===&lt;br /&gt;
&lt;br /&gt;
OWASP no promueve la documentación por la simpre documentación. Este convenio está enfocado en promover la calidad, no la cantidad. Creemos que puede ser posible (en algunos proyectos) cumplir con este contrato con una pequeña evaluación de riesgo, algunas páginas de requerimientos, un pequeño documento de diseño de seguridad, un plan de pruebas, y algunos resultados de pruebas. &lt;br /&gt;
&lt;br /&gt;
El objetivo de esta documentación es simplemente asegurar, en cada etapa del desarrollo de software, que se ha puesto la atención apropiada en la seguridad. Un beneficio adicional es que esta documentación puede ser recolectada en conjunto para formar un &amp;quot;paquete de certificación&amp;quot; que básicamente esboce el argumento de porque deberiamos confiar que el software hará lo que dice.&lt;br /&gt;
&lt;br /&gt;
==ANEXO DE CONTRATO==&lt;br /&gt;
&lt;br /&gt;
===1. INTRODUCCIÓN===&lt;br /&gt;
&lt;br /&gt;
Esta anexo esta hecho para _____________________ (&amp;quot;convenio&amp;quot;) entre el Cliente y el proveedor. Tanto el Cliente como el proveedor acuerdan maximisar la seguridad del software de acuerdo a los siguientes términos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2. FILOSOFÍA===&lt;br /&gt;
&lt;br /&gt;
Esta anexo pretende aclarar los derechos y obligaciones relacionados a seguridad de todas las partes en una relacion de desarrollo de software. Al mayor nivel, las partes acuerdan que:&lt;br /&gt;
&lt;br /&gt;
;(a) Las desiciones de seguridad estarán basadas en el riesgo : Las desciciones sobre la seguridad seran tomadas en conunto por el cliente y el proveedor basandose en un firme entendimiento de el riesgo involucrado. &lt;br /&gt;
&lt;br /&gt;
;(b) Las actividades de seguridad estarán balanceadas : El esfurzo de seguridad será distribuido equitativamente a través de todo el ciclo de desarollo de software.&lt;br /&gt;
&lt;br /&gt;
;(c) Las actividades de seguridad estarán integradas : Todas las actividades y documentación discutidas aqui pueden y deben ser integradas dentro del ciclo de desarrollo de software del proveedor y no mantenerse separadas de el resto del proyecto. Nada en este anexo implica algún processo de desarrollo de software en particular.&lt;br /&gt;
&lt;br /&gt;
;(d) Se esperan vulnerabilidades :  Todo software contiene defectos, y algunos de estos crearan problemas de seguridad. Ambos, cliente y proveedor se esforzará para identificar las vulnerabilidades tan pronto como sea posible en el ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
;(e) La información sobre seguridad será comunicada por completo : Toda la información relevante para la seguridad se compartirá entre el cliente y el proveedor inmediatamente y completamente.&lt;br /&gt;
&lt;br /&gt;
;(f) Se requerirá solo documentacion de seguridad necesaria : La documentación de seguridad no necesita ser demasiado amplia para describir claramente el diseño de seguridad, análisis de riesgo y problemas.&lt;br /&gt;
&lt;br /&gt;
=== 3. ACTIVIDADES EN EL CICLO DE DESARROLLO ===&lt;br /&gt;
&lt;br /&gt;
;(a) Entendimiento del Riesgo&amp;amp;nbsp;&lt;br /&gt;
:El proveedor y el cliente acuerdan trabajar juntos para entender y documentar los riesgos que enfrenta la aplicacion. Este esfuerzo debe identificar los riesgos clave para los activos y funciones importantes que provee la aplicación. Cada uno de los temas listados en la sección de requerimientos debe ser considerado.&lt;br /&gt;
&lt;br /&gt;
;(b) Requerimientos&amp;amp;nbsp;&lt;br /&gt;
:Basado en los riesgos, el proveedor y cliente acuerda trabajar juntos para crear requerimientos de seguridad detallados como parte de la especificacion del software a ser desarrollado. Cada uno de los temas listados en la sección de requerimientos de este anexo deben ser discutidos y evaluados por ambos, cliente y proveedor. Estos requerimientos pueden ser satisfechos por software creado a la medida, software de terceros, o la plataforma.&lt;br /&gt;
&lt;br /&gt;
;(c) Diseño&amp;amp;nbsp;&lt;br /&gt;
:El desarollador acuerda proveer documentación que explique claramente el diseño para adquirir cada uno de los requerimientos de seguridad. En muchos de los casos, esta documentacion describirá los mecanismos de seguridad, donde se incluirán dentro de la arquitectura, todos los patrones de diseño relevantes para asegurar su uso adecuado. El diseño debe especificar claramente si tales mecanismos vienen de software a la medida, software de terceros o de la plataforma.&lt;br /&gt;
&lt;br /&gt;
;(d) Implementación&amp;amp;nbsp;&lt;br /&gt;
:El proveedor acuerda entregar y seguir un conjunto de lineamientos de codificación segura. Estos lineamientos indicarán como se le de debe dar formato, estructurar y comentar el código fuente. Todo código relacionado a seguridad debe ser comentado profundamente. Guías sobre como evitar vulnerabilidades se seguridad comunes debe ser incluida. Tambien, todo el código debe ser revisado por al menos otro desarollador basándose en los requerimientos de seguridad y los lineamientos de codificación antes de ser conciderado listo para pruebas unitarias.&lt;br /&gt;
&lt;br /&gt;
;(e) Pruebas y análisis de seguridad&amp;amp;nbsp;&lt;br /&gt;
:El proveedor acuerda entregar y seguir un plan de pruebas de seguridad que defina cómo se realizarán las pruebas o bien establecer como cada uno de los requerimientos de seguridad va a ser complido. El nivel de rigor de esta actividad debe ser considerado y detallado en un plan. El proveedor ejecutará el plan de prueba y proveera los resultados a el cliente.&lt;br /&gt;
&lt;br /&gt;
;(f) Publicación segura&amp;amp;nbsp;&lt;br /&gt;
:El proveedor acuerda entregar lineamientos de configuración segura que describan completamente todas las opciones de configuración relacionadas con seguridad y sus implicaciones para la seguridad del software en su conjunto. Los lineamientos deben incluir una descripción completa de las dependencias en la plataforma y como deben ser configuradas de manera segura, incluidas las del sistema operativo, servidor Web y servidor de aplicacion. La configuración predeterminada del software debe ser segura.&lt;br /&gt;
&lt;br /&gt;
===4. ÁREAS CON REQUERIMIENTOS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
Los siguientes temas/áreas deben ser considerados durante las actividades de entendimiento de riesgo y definición de requerimientos. Este esfuerzo debe producir un conjunto de requerimientos ajustados, especificos y probables. Ambos, proveedor y cliente deben ser involucrados en este proceso y deben ponerse de acuerdo sobre el conjunto final de requerimientos.&lt;br /&gt;
&lt;br /&gt;
;(a) Validación de entradas y condificación : Los requerimientos deben especificar las reglas para canonicalización, validación y codificación de cada dato de entrada a la aplicación, ya sea de usuarios, sistemas de archivos, bases de datos o sistemas externos. La regla predeterminada debe ser que todas las entradas sean validadas a menos que cumplan con una especificacion detallada de que esta permitido. Además, los requerimientos deben especificar las acciones a tomar cuando se reciven entradas no válidas. Especificamente, la aplicación no debe ser susceptible a inyecciones, desbordamientos, manipulación y otros ataques con entradas de usuario corruptas.&lt;br /&gt;
&lt;br /&gt;
;(b) Autentificación y manejo de sessiones : Los requerimientos deben especificar como se protegeran las credenciales para autentificación y los identificadores de sesión a través del ciclo de desarrollo de software. Los requerimientos para todas las funciones relacionadas deben ser agregadas incluyendo recuperar contraseñas, cambio de contraseñas, recordar contraseñas, desconexión y conexión multiple.&lt;br /&gt;
&lt;br /&gt;
;(c) Control de Acceso : Los requerimientos deben incluir una descripcion detallada de todos los roles (grupos, privilegios, autorizaciones) usadas en la aplicación. Los requerimientos deben indicar todos los activos y funciones que provee la aplicacion. Los requerimientos deben especificar detallada y exactamente los derechos de acceso para cualquier activo y función de cada rol. Se sugiere utilizar un formato de matriz de control de acceso para documentar estas reglas.&lt;br /&gt;
&lt;br /&gt;
;(d) Manejo de Errores : Los requerimientos deben detallar como se van a manejar los errores que ocurran dentro del procesamiento. Algunas aplicaciones deberían hacer lo mejor posible en caso de un error, mientras que otras deberían terminar su procesamiento inmediatamente.&lt;br /&gt;
&lt;br /&gt;
;(e) Historial : Los requerimientos deben especificar que eventos son relevantes para la seguridad y necesitan ser registrados, como ataques detectados, intentos de conexión fallidos e intentos de exeder la autorización.  Los requerimientos deben especificar tambien que information registrar con cada evento, incluyendo hora y fecha, descripción del evento, detalles de aplicación, y otra información útil en esfuerzos forences.&lt;br /&gt;
&lt;br /&gt;
;(f) Conexiones a sistemas externos : Los requerimientos deben especifica como la autentificación y cifrado será manejado para todos los systemas externos, tales como bases de datos, directorios y servicios Web. Todas las credenciales requeridas para la comunicación con sistemas externos deben almacenarce cifradas y fuera de el código dentro de archivos de configuración. &lt;br /&gt;
&lt;br /&gt;
;(g) Cifrado : Los requerimientos deben especificar que datos deben ser cifrados, como serán cifrados y como todos los certificados y otras credenciales deben ser manejadas. Las aplicaciones deben usar algoritmos estándar implementados en una librerias de cifrado que hayan sido usadas y probadas ampliamente.&lt;br /&gt;
&lt;br /&gt;
;(h) Disponibilidad : Los requerimientos deben especificar como protegerse de ataques de negación de servicio. Todos los posibles ataques en la aplicacion deben ser considerados, incluyendo bloqueos de auntentificación, agotamiento de conexiones y otros ataques de agotamiento de recursos.&lt;br /&gt;
&lt;br /&gt;
;(i) Configuración segura : Los requerimientos deben especificar que los valores predeterminados para todas las configuraciones relacionadas a seguridad deben ser seguras. Para propósitos de auditoría, el software deberia ser capás de producir un reporte sencillo de leer que muestre los detalles de todas las configuraciones relacionadas con seguridad.&lt;br /&gt;
&lt;br /&gt;
;(j) Vulnerabilidades especificas : Los requerimientos deben incluir un conjunto de vulnerabilidades especificas que no deben estar presentes en el software. A menos que sea especificado de otra manera, el software no debe incluir ninguna de las fallas descritas en el la &amp;quot;Lista de OWASP sobre las 10 vulnerabilidades mas críticas en aplicaciones Web&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===5. PERSONAL Y ORGANIZACIÓN===&lt;br /&gt;
&lt;br /&gt;
;(a) Arquitecto en seguridad : El desarollador asignará la responsabilidad por la seguridad a un solo recurso técnico experimentado, para ser conocido como el arquitecto de seguridad del proyecto. El arquitecto de seguridad certificará la seguridad de cada entregable.&lt;br /&gt;
&lt;br /&gt;
;(b) Entrenamiento en Seguridad : el proveedor será responsable de verificar que todos los miembros del equipo de desarrollo han sido entrenados en tecnicas de programación segura.&lt;br /&gt;
&lt;br /&gt;
;(c) Desarrolladores dignos de confianza : El proveedor acuerda realizar las investigaciones de antecendentes apropiadas a todos los miembros del equipo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===6. AMBIENTE DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Codificación segura : El proveedor debe mencionar que herramientas se usarán en el ambiente de desarrollo de software para promover la codificación segura.&lt;br /&gt;
&lt;br /&gt;
;(b) Adminstración de configuración : El proveedor debe usar un sistema de control de versiones que autentifique y registre el miembro del equipo asociado con todos los cambios en el código base, todos los archivos de configuración y compilación.&lt;br /&gt;
&lt;br /&gt;
;(c) Distribución : El proveedor debe usar un proceso de compilación que construya confiablemente un archivo de distribución completo desde el código fuente. Este proceso debe incluir un método para verificar la integridad de el software entregado al cliente.&lt;br /&gt;
&lt;br /&gt;
===7. LIBRERIAS, MARCOS DE DESARROLLO Y PRODUCTOS===&lt;br /&gt;
&lt;br /&gt;
;(a) Apertura : El proveedor debe mencionar todas los aplicaciones de terceros usadas en el software, incluyendo todas las librerias, marcos de desarrollo, componentes y otros productos, ya sean comerciales, gratuitos, de código abierto o código cerrado.&lt;br /&gt;
&lt;br /&gt;
;(b) Evaluación : El proveedor debe hacer esfuerzos rasonables para asegurar que el sofware de terceros cumple con todos los términos de este contrato y es tan seguro como el código a la medida desarrollado bajo este contrato.&lt;br /&gt;
&lt;br /&gt;
===8. REVISIONES DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Derecho de revisión : El cliente tiene el derecho mandar revisar el software para buscar fallas de seguridad, esto a sus expesas y en cualquier momento dentro de los 60 dias despues de la entrega. El desarrollador acepta proveer apoyo rasonable al equipo de revisión proveyendo el codigo fuente y acceso a los ambientes de pruebas.&lt;br /&gt;
&lt;br /&gt;
;(b) Covertura de la revisión : Las revisiones de seguridad deben cubrir todos los aspectos de el software entregado, incluyendo código a la medida, componentes, productos y configuración de sistema.&lt;br /&gt;
&lt;br /&gt;
;(c) Alcance de la revisión : Al menos, la revisión debe cubrir todos los requerimientos de seguridad y debería buscar otras vulnerabilidades comunes. La revisión puede incluir una combinación de busqueda automatizada de vulnerabilidades, pruebas de intrusión, análisis estático de código fuente y revisión de código por expertos.&lt;br /&gt;
&lt;br /&gt;
;(d) Problemas encontrados : Los problemas de seguridad descubiertos serán reportados a el cliente y proveedor por igual. A todos los problemas se les dará seguimiento y serán reparados como se especifique en la sección de seguimiento de problemas de seguridad de este anexo.&lt;br /&gt;
&lt;br /&gt;
===9. ADMINISTRACIÓN DE PROBLEMAS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Identificación : El proveedor dara seguimiento a todos los problemas de seguridad descubiertos en todo el ciclo de desarrollo, ya sea un problema en los requerimientos, diseño, implementación, pruebas, publicación u operación. El riesgo asociado con cada problema de seguridad será evaluado, documentado y reportado a el cliente tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
;(b) Protección : El proveedor protegerá apropiadamente la información relacionada a problemas de seguridad y la documentación relacionada a ellos, esto, para ayudar a disminuir la probabilidad de las vulnerabilidades en el software operacioneal del cliente sean expuestas.&lt;br /&gt;
&lt;br /&gt;
;(c) Reparación : Los problemas de seguridad que sean indentificados antes de la entrega deben ser reparados por el proveedor. Los problemas de seguridad descubiertos despues de la entrega deben ser manejados en la misma manera que otros problemas funcionales según lo especificado en este contrato.&lt;br /&gt;
&lt;br /&gt;
===10. CERTEZA===&lt;br /&gt;
&lt;br /&gt;
;(a) Certeza : El proveedor proveera un &amp;quot;paquete de certificación&amp;quot; consistente en la documentación de seguridad creada a traves del proceso de desarrollo. El paquete deberá establecer que los requerimientos de seguridad, diseño, implementación y resultados de pruebas fueron completados apropiadamente y todos los problemas de seguridad fueron resueltos apropiadamente.&lt;br /&gt;
&lt;br /&gt;
;(b) Auto-Certificación : El aquitecto de seguridad certificará que el software cumple con los requerimientos de seguridad, que todas las actividades de seguridad se realizaron, y que todos los problemas de seguridad identificados han sido documentados y resueltos. Cualquier excepción a el estado de la certificacion debe estar totalmente documentada al momento de la entrega.&lt;br /&gt;
&lt;br /&gt;
;(c) No código malicioso : El proveedor garantize que el sofware no debe contener ningun código que no se alinee a algun requerimiento del software y debilite la seguridad de la aplicación, incluyendo viruses, gusanos, bombas de tiempo, puertas traseras, caballos de troya, huevos de pascua y cualquier otra forma de código malicioso.&lt;br /&gt;
&lt;br /&gt;
===11. CONCENTIMIENTO Y MANTENIMIENTO DE LA SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Consentimiento : El software no debe ser considerado como aceptado hasta que el paquete de certificación este completo y todos los problemas de seguridad han sido resueltos.&lt;br /&gt;
&lt;br /&gt;
;(b) Investigación de problemas de seguridad : Despues del concentimiento, si se sospecha (razonablemente) o descubren problemas de seguridad, el proveedor deberá asisitir al cliente en realizar una investigación para determinar la naturaleza del problema. El problema debe ser considerado &amp;quot;nuevo&amp;quot; si no es cubierto por los requerientos de seguridad y esta fuera de el alcance (razonable) de las pruebas de seguridad.&lt;br /&gt;
&lt;br /&gt;
;(c) Problemas de seguridad nuevos : El proveedor y el cliente consientes en medir el alcance y esfuerzo requerido para resolver problemas de seguridad nuevos, y negociad de buena fe para alcanzar un acuerdo y realizar el trabajor requerido para solucionarlos.&lt;br /&gt;
&lt;br /&gt;
;(d) Otros problemas de seguridad : El proveedor debe usar todos los esfuersos comercialmente rasonables consistentes con practicas de desarrollo comunes en la industria, tomando en cuenta la severidad de el riesgo, para resolver todos los problemas de seguridad considerados nuevos tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Legal Project]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79731</id>
		<title>Anexo para Contrato de Software Seguro de OWASP</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79731"/>
				<updated>2010-03-12T13:57:40Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''ANEXO DE CONTRATO PARA DESAROLLO DE SOFTWARE SEGURO'''&lt;br /&gt;
&lt;br /&gt;
  ADVERTENCIA: ESTE DOCUMENTO DEBE SER CONSIDERADO COMO UNA GUÍA SOLAMENTE.&lt;br /&gt;
  OWASP RECOMIENDA VEHEMENTEMENTE QUE CONSULTE UN ABOGADO CALIFICADO&lt;br /&gt;
  PARA AYUDARLE A NEGOCIAR UN CONTRATO DE SOFTWARE&lt;br /&gt;
  &lt;br /&gt;
== Introducción  ==&lt;br /&gt;
&lt;br /&gt;
Este anexo de contrato pretende ayudar a los proveedores de software y sus clientes a negociar y capturar importantes términos y condiciones contractuales relacionadas a la seguridad en el Software a ser desarrollado o entregado. La razon para este proyecto es que la mayoría de los contratos no mencionan estos temas, y las partes frecuentamente tienen puntos de vista dramaticamente diferentes a lo que en ralidad fue acordado. Creemos que articular claramente estos términos es la mejor manera de asegurarse que ambas partes pueden hacer desiciones informadas sobre como proceder. &lt;br /&gt;
&lt;br /&gt;
 &amp;quot;La seguridad del software comercial mejorará cuando el mercado demande mejor seguridad.&lt;br /&gt;
 Al menos, cada petición para propuestas de software debería pedir a los vendedores &lt;br /&gt;
 detallar como van ellos a probar sus productos para encotrar vulnerabilidades de&lt;br /&gt;
 seguridad. Este paso empezará convenciendo a los vendedores de software empaquetado&lt;br /&gt;
 y proveedores externos que las compañias valoran la seguridad.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- John Pescatore, Director de investiagacion con Gartner&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 Pedimos a los clientes y proveedores que usen este documento como un marco para discutir&lt;br /&gt;
 espectativas y negociar responsabilidades. Este anexo se creó para ser añadido a un&lt;br /&gt;
 contrato de desarrollo de software. Estos términos son negociables, significa que ellos&lt;br /&gt;
 pueden y deben ser discutidos por el cliente y el proveedor.&lt;br /&gt;
&lt;br /&gt;
== SOBRE EL PROYECTO ==&lt;br /&gt;
&lt;br /&gt;
Este documento fue creado por la fundación OWASP (Open Web Application Security Project por sus siglas en Inglés), una organización sin animo de lucro con el objetivo de crear herramientas y documentación, gratuita y abierta para asegurar software. Para facilitar su uso en contratación privada, este documento es de dominio publico. Puede encontrar detalles adicionales sobre este proyecto en http://www.owasp.com/index.php/OWASP_Legal_Project. Son Bienvenidos comentarios de ambos, productores y consumidores de software, asi como de la comunidad legal. &lt;br /&gt;
&lt;br /&gt;
OWASP reconoce gratamente la contribución especial de [http://www.aspectsecurity.com Aspect Security] por su rol en la investigación y preparación de este documento.&lt;br /&gt;
&lt;br /&gt;
==OBJECIONES==&lt;br /&gt;
&lt;br /&gt;
Las siguientes páginas cubren algunas objeciones que escuchamos frecuentemente sobre usar este lenguaje en contratos de desarrollo de software:&lt;br /&gt;
&lt;br /&gt;
=== PERO NO TODOS LOS TÉRMINOS SON CORRECTOS PARA NOSOTROS… ===&lt;br /&gt;
&lt;br /&gt;
Este documento debe ser considerado un punto de inicio para su contrato. Puede que no le gusten todas las actividades, o puede querer proponer mas. Puede querer asignar responsabilidades de manera diferente. Este documento no pretende capturar exactamente las necesidades de todos los clientes y proveedores de software. Pretende proveer un marco para discutir temas clave, importantes para asegurarse que el software se cree de forma segura. Despues de que tengan una discusión sobre seguridad y alcancen un acuerdo. Puede ajustar el convenio para que concuerde con el contrato.&lt;br /&gt;
&lt;br /&gt;
=== PERO, ¿QUIEN DEBE PAGAR POR ESTAS ACTIVIDADES?… ===&lt;br /&gt;
&lt;br /&gt;
Este contrato no es sobre poner mas peso al desarollo de software. La pregunta no es sobre si hay costos asociados con seguridad (por supuesto que hay). La pregunta correcta es qué actividades deberían hacerse por ambas partes para minimizar costos, y cuando deberían ocurrir. &lt;br /&gt;
&lt;br /&gt;
Este anexo no menciona (intensionalmente) sobre el detalle de quién debería pagar por la actividades descritas. Mientras muchas de estas actividades deben estar pasando ya, y son esperadas por muchos clientes, ellas no estan practicadas regularmente en la industria del software. La cuestion de quién paga (y cuándo) debe ser parte de la negociación. &lt;br /&gt;
&lt;br /&gt;
Calcular el costo de la seguridad es muy difícil. Auque hay costos asociados con realizar actividades de seguridad, hay también costos importantes asociados con ignorar estas actividades. Estamos convencidos el mejor costo-beneficio para desarrollar software es reducir la probabilidad de que fallas de seguridad sean introducidas y minimzar el tiempo entre introducir una falla y arreglarla. &lt;br /&gt;
&lt;br /&gt;
Una distición importante a hacer cuando calculamos costos es entre construir mecanismos de seguridad y las actividades para asegurarse que esos mecanismos sean correctos y efectivos. Intentar agregar mecanismoa al final de el ciclo de desarrollo puede causar serios problemas de diseño e incrementará el costo dramáticamente. Este convenio promueve decisiones sobre mecanismos para minimizar estos costos. Similarmente, esperar hasta justo antes de la puesta en producción para hacer actividades de aseguramiento, tales como revisión de código y pruebas de intrusión, tambien incrementaría los costos dramaticamente. Creemos que el mejor costo-beneficio para ganar certeza es poner un nivel constante de esfuerzo en el aseguramiento a través del ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
=== PERO EL NIVEL DE RIGOR ESTA INCORRECTO…. ===&lt;br /&gt;
&lt;br /&gt;
Este convenio asume que el software que esta siendo desarrollado es razonablemente importante para una empresa grande o agencia de gobierno. Hemos seleccionado un &amp;quot;nivel de rigor&amp;quot; para el convenio que es alcanzable por la mayoria de las organizaciones proveedoras de software, e identificaría y manejaría los riesgos más comunes. &lt;br /&gt;
&lt;br /&gt;
Sin embargo, para el software que va a ser usado en aplicaciones críticas, como aplicaciones médicas, financieras o relacionadas con el ejército. Puede querer incrementar el nivel de rigor. Puede querer agregar revisiones, documentación y actividades adicionales de prueba. Puede querer mejorar el proceso de encontrar, diagnosticar y remediar vulnerabilidades. Para aplicaciones menos sensibles, puede desear reducir o remover actividades.&lt;br /&gt;
&lt;br /&gt;
=== PERO NOSOTROS NO PODEMOS ACEPTAR TANTO RIESGO… ===&lt;br /&gt;
&lt;br /&gt;
Este convenio pretende facilitar la discusión sobre quién tomaría el riesgo por las vulnerabilidades de seguridad en el software. Por un lado del espectro, el cliente podría tomar todo el riesgo y el proveedor podría entregar código con muchas vulnerabilidades. Por el otro extremo, el proveedor podría tomar todo el riesgo y asumir la responsabilidad de entregar código perfecto. Ambos extremos son irrealizables. &lt;br /&gt;
&lt;br /&gt;
Actualmente, en este convenio, el proveedor toma el riesgo por problemas que sean descubiertos en los requerimientos o deben ser cubiertos por esfuerzos razonables en pruebas. Pero la remediación de &amp;quot;nuevos&amp;quot; problemas de seguridad tendría que ser pagado por el cliente. Creemos que este es un equilibrio funcional, ya que limita el riesgo adquirido por el proveedor y promueve obtener requerimientos de seguridad por anticipado. Pero hay muchas otras posibles soluciones a este problema. Por favor, dejenos saber si tiene sugerencias alternas, podriamos incluirlas en versiones futuras de este documento. &lt;br /&gt;
&lt;br /&gt;
Note que la discusión aqui solo cubre el riesgo asociado con arreglar las vulnerabilidades de seguridad en el código, y no incluye los costos asociados con recuperarse de incidentes de seguridad relacionados con explotar cualquiera de esas vulnerabilidades. Estamos interesados en las mejores prácticas en esta area.&lt;br /&gt;
&lt;br /&gt;
=== PERO COMO PODEMOS ASEGURAR CÓDIGO DE TERCEROS… ===&lt;br /&gt;
&lt;br /&gt;
Casi todos los proyectos de sofware tienen una cantidad importante de código de terceros como librerias, frameworks y productos. Desde la perspectiva de seguridad, este código es tan importante como el código desarrollado a la medida para su proyecto. Creemos que la responsabilidad de garantizar la seguridad de este código es llevada mejor por el proveedor, aunque ellos podrían no tener toda la capacidad para garantizar la seguridad por ellos mismos. Sin embargo, la seguridad puede ser parte de el la desición de &amp;quot;construir o comprar&amp;quot;, y esta parece ser la mejor manera de promoverla. &lt;br /&gt;
&lt;br /&gt;
El proveedor, por supuesto, tiene la opción de pasar la responsabilidad al proveedor del software de terceros. El desarrollador puede también analizar el código de terceros por él mismo o contratar expertos en seguridad para analizarlo por él.&lt;br /&gt;
&lt;br /&gt;
=== PERO PORQUE DEBO PASAR POR TODO ESTE PROBLEMA… ===&lt;br /&gt;
&lt;br /&gt;
En última instancia, creemos que no hay alternativa para hacer de la seguridad una parte de el proceso de contratación de software. Actualmente, creemos que hay serios malentendidos sobre la seguridad del código que esta siendo desarrollado bajo muchos contratos de desarrollo de software. Esto puede solamente llevar a una cara litigación y a desiciones hechas por individuos con poca experiencia y entendimiento sobre software. Lea el [[Secure software contracting hypothetical case study|Caso de estudio hipotético sobre contratación de software seguro]] para una discusión completa de este problema. &lt;br /&gt;
&lt;br /&gt;
Hay muchos beneficios al trabajar con este convenio. El principal es que pondrá claras las expectativas entre las partes involucradas. En algunos casos ayudará a evitar demandas cuando problemas de seguridad difíciles aparecen en el software. Tambien, estas son las mismas actividades requeridas por muchas razónes legales y de conformidad con estándares/leyes.&lt;br /&gt;
&lt;br /&gt;
=== PERO ES MUY DIFÍCIL PRODUCIR TODA ESTA DOCUMENTACIÓN… ===&lt;br /&gt;
&lt;br /&gt;
OWASP no promueve la documentación por la simpre documentación. Este convenio está enfocado en promover la calidad, no la cantidad. Creemos que puede ser posible (en algunos proyectos) cumplir con este contrato con una pequeña evaluación de riesgo, algunas páginas de requerimientos, un pequeño documento de diseño de seguridad, un plan de pruebas, y algunos resultados de pruebas. &lt;br /&gt;
&lt;br /&gt;
El objetivo de esta documentación es simplemente asegurar, en cada etapa del desarrollo de software, que se ha puesto la atención apropiada en la seguridad. Un beneficio adicional es que esta documentación puede ser recolectada en conjunto para formar un &amp;quot;paquete de certificación&amp;quot; que básicamente esboce el argumento de porque deberiamos confiar que el software hará lo que dice.&lt;br /&gt;
&lt;br /&gt;
==ANEXO DE CONTRATO==&lt;br /&gt;
&lt;br /&gt;
===1. INTRODUCCIÓN===&lt;br /&gt;
&lt;br /&gt;
Esta anexo esta hecho para _____________________ (&amp;quot;convenio&amp;quot;) entre el Cliente y el proveedor. Tanto el Cliente como el proveedor acuerdan maximisar la seguridad del software de acuerdo a los siguientes términos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2. FILOSOFÍA===&lt;br /&gt;
&lt;br /&gt;
Esta anexo pretende aclarar los derechos y obligaciones relacionados a seguridad de todas las partes en una relacion de desarrollo de software. Al mayor nivel, las partes acuerdan que:&lt;br /&gt;
&lt;br /&gt;
;(a) Las desiciones de seguridad estarán basadas en el riesgo : Las desciciones sobre la seguridad seran tomadas en conunto por el cliente y el proveedor basandose en un firme entendimiento de el riesgo involucrado. &lt;br /&gt;
&lt;br /&gt;
;(b) Las actividades de seguridad estarán balanceadas : El esfurzo de seguridad será distribuido equitativamente a través de todo el ciclo de desarollo de software.&lt;br /&gt;
&lt;br /&gt;
;(c) Las actividades de seguridad estarán integradas : Todas las actividades y documentación discutidas aqui pueden y deben ser integradas dentro del ciclo de desarrollo de software del proveedor y no mantenerse separadas de el resto del proyecto. Nada en este anexo implica algún processo de desarrollo de software en particular.&lt;br /&gt;
&lt;br /&gt;
;(d) Se esperan vulnerabilidades :  Todo software contiene defectos, y algunos de estos crearan problemas de seguridad. Ambos, cliente y proveedor se esforzará para identificar las vulnerabilidades tan pronto como sea posible en el ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
;(e) La información sobre seguridad será comunicada por completo : Toda la información relevante para la seguridad se compartirá entre el cliente y el proveedor inmediatamente y completamente.&lt;br /&gt;
&lt;br /&gt;
;(f) Se requerirá solo documentacion de seguridad necesaria : La documentación de seguridad no necesita ser demasiado amplia para describir claramente el diseño de seguridad, análisis de riesgo y problemas.&lt;br /&gt;
&lt;br /&gt;
=== 3. ACTIVIDADES EN EL CICLO DE DESARROLLO ===&lt;br /&gt;
&lt;br /&gt;
;(a) Entendimiento del Riesgo&amp;amp;nbsp;&lt;br /&gt;
:El proveedor y el cliente acuerdan trabajar juntos para entender y documentar los riesgos que enfrenta la aplicacion. Este esfuerzo debe identificar los riesgos clave para los activos y funciones importantes que provee la aplicación. Cada uno de los temas listados en la sección de requerimientos debe ser considerado.&lt;br /&gt;
&lt;br /&gt;
;(b) Requerimientos&amp;amp;nbsp;&lt;br /&gt;
:Basado en los riesgos, el proveedor y cliente acuerda trabajar juntos para crear requerimientos de seguridad detallados como parte de la especificacion del software a ser desarrollado. Cada uno de los temas listados en la sección de requerimientos de este anexo deben ser discutidos y evaluados por ambos, cliente y proveedor. Estos requerimientos pueden ser satisfechos por software creado a la medida, software de terceros, o la plataforma.&lt;br /&gt;
&lt;br /&gt;
;(c) Diseño&amp;amp;nbsp;&lt;br /&gt;
:El desarollador acuerda proveer documentación que explique claramente el diseño para adquirir cada uno de los requerimientos de seguridad. En muchos de los casos, esta documentacion describirá los mecanismos de seguridad, donde se incluirán dentro de la arquitectura, todos los patrones de diseño relevantes para asegurar su uso adecuado. El diseño debe especificar claramente si tales mecanismos vienen de software a la medida, software de terceros o de la plataforma.&lt;br /&gt;
&lt;br /&gt;
;(d) Implementación&amp;amp;nbsp;&lt;br /&gt;
:El proveedor acuerda entregar y seguir un conjunto de lineamientos de codificación segura. Estos lineamientos indicarán como se le de debe dar formato, estructurar y comentar el código fuente. Todo código relacionado a seguridad debe ser comentado profundamente. Guías sobre como evitar vulnerabilidades se seguridad comunes debe ser incluida. Tambien, todo el código debe ser revisado por al menos otro desarollador basándose en los requerimientos de seguridad y los lineamientos de codificación antes de ser conciderado listo para pruebas unitarias.&lt;br /&gt;
&lt;br /&gt;
;(e) Pruebas y análisis de seguridad&amp;amp;nbsp;&lt;br /&gt;
:El proveedor acuerda entregar y seguir un plan de pruebas de seguridad que defina cómo se realizarán las pruebas o bien establecer como cada uno de los requerimientos de seguridad va a ser complido. El nivel de rigor de esta actividad debe ser considerado y detallado en un plan. El proveedor ejecutará el plan de prueba y proveera los resultados a el cliente.&lt;br /&gt;
&lt;br /&gt;
;(f) Publicación segura&amp;amp;nbsp;&lt;br /&gt;
:El proveedor acuerda entregar lineamientos de configuración segura que describan completamente todas las opciones de configuración relacionadas con seguridad y sus implicaciones para la seguridad del software en su conjunto. Los lineamientos deben incluir una descripción completa de las dependencias en la plataforma y como deben ser configuradas de manera segura, incluidas las del sistema operativo, servidor Web y servidor de aplicacion. La configuración predeterminada del software debe ser segura.&lt;br /&gt;
&lt;br /&gt;
===4. ÁREAS CON REQUERIMIENTOS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
Los siguientes temas/áreas deben ser considerados durante las actividades de entendimiento de riesgo y definición de requerimientos. Este esfuerzo debe producir un conjunto de requerimientos ajustados, especificos y probables. Ambos, proveedor y cliente deben ser involucrados en este proceso y deben ponerse de acuerdo sobre el conjunto final de requerimientos.&lt;br /&gt;
&lt;br /&gt;
;(a) Validación de entradas y condificación : Los requerimientos deben especificar las reglas para canonicalización, validación y codificación de cada dato de entrada a la aplicación, ya sea de usuarios, sistemas de archivos, bases de datos o sistemas externos. La regla predeterminada debe ser que todas las entradas sean validadas a menos que cumplan con una especificacion detallada de que esta permitido. Además, los requerimientos deben especificar las acciones a tomar cuando se reciven entradas no válidas. Especificamente, la aplicación no debe ser susceptible a inyecciones, desbordamientos, manipulación y otros ataques con entradas de usuario corruptas.&lt;br /&gt;
&lt;br /&gt;
;(b) Autentificación y manejo de sessiones : Los requerimientos deben especificar como se protegeran las credenciales para autentificación y los identificadores de sesión a través del ciclo de desarrollo de software. Los requerimientos para todas las funciones relacionadas deben ser agregadas incluyendo recuperar contraseñas, cambio de contraseñas, recordar contraseñas, desconexión y conexión multiple.&lt;br /&gt;
&lt;br /&gt;
;(c) Control de Acceso : Los requerimientos deben incluir una descripcion detallada de todos los roles (grupos, privilegios, autorizaciones) usadas en la aplicación. Los requerimientos deben indicar todos los activos y funciones que provee la aplicacion. Los requerimientos deben especificar detallada y exactamente los derechos de acceso para cualquier activo y función de cada rol. Se sugiere utilizar un formato de matriz de control de acceso para documentar estas reglas.&lt;br /&gt;
&lt;br /&gt;
;(d) Manejo de Errores : Los requerimientos deben detallar como se van a manejar los errores que ocurran dentro del procesamiento. Algunas aplicaciones deberían hacer lo mejor posible en caso de un error, mientras que otras deberían terminar su procesamiento inmediatamente.&lt;br /&gt;
&lt;br /&gt;
;(e) Historial : Los requerimientos deben especificar que eventos son relevantes para la seguridad y necesitan ser registrados, como ataques detectados, intentos de conexión fallidos e intentos de exeder la autorización.  Los requerimientos deben especificar tambien que information registrar con cada evento, incluyendo hora y fecha, descripción del evento, detalles de aplicación, y otra información útil en esfuerzos forences.&lt;br /&gt;
&lt;br /&gt;
;(f) Conexiones a sistemas externos : Los requerimientos deben especifica como la autentificación y cifrado será manejado para todos los systemas externos, tales como bases de datos, directorios y servicios Web. Todas las credenciales requeridas para la comunicación con sistemas externos deben almacenarce cifradas y fuera de el código dentro de archivos de configuración. &lt;br /&gt;
&lt;br /&gt;
;(g) Cifrado : Los requerimientos deben especificar que datos deben ser cifrados, como serán cifrados y como todos los certificados y otras credenciales deben ser manejadas. Las aplicaciones deben usar algoritmos estándar implementados en una librerias de cifrado que hayan sido usadas y probadas ampliamente.&lt;br /&gt;
&lt;br /&gt;
;(h) Disponibilidad : Los requerimientos deben especificar como protegerse de ataques de negación de servicio. Todos los posibles ataques en la aplicacion deben ser considerados, incluyendo bloqueos de auntentificación, agotamiento de conexiones y otros ataques de agotamiento de recursos.&lt;br /&gt;
&lt;br /&gt;
;(i) Configuración segura : Los requerimientos deben especificar que los valores predeterminados para todas las configuraciones relacionadas a seguridad deben ser seguras. Para propósitos de auditoría, el software deberia ser capás de producir un reporte sencillo de leer que muestre los detalles de todas las configuraciones relacionadas con seguridad.&lt;br /&gt;
&lt;br /&gt;
;(j) Vulnerabilidades especificas : Los requerimientos deben incluir un conjunto de vulnerabilidades especificas que no deben estar presentes en el software. A menos que sea especificado de otra manera, el software no debe incluir ninguna de las fallas descritas en el la &amp;quot;Lista de OWASP sobre las 10 vulnerabilidades mas críticas en aplicaciones Web&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===5. PERSONAL Y ORGANIZACIÓN===&lt;br /&gt;
&lt;br /&gt;
;(a) Arquitecto en seguridad : El desarollador asignará la responsabilidad por la seguridad a un solo recurso técnico experimentado, para ser conocido como el arquitecto de seguridad del proyecto. El arquitecto de seguridad certificará la seguridad de cada entregable.&lt;br /&gt;
&lt;br /&gt;
;(b) Entrenamiento en Seguridad : el proveedor será responsable de verificar que todos los miembros del equipo de desarrollo han sido entrenados en tecnicas de programación segura.&lt;br /&gt;
&lt;br /&gt;
;(c) Desarrolladores dignos de confianza : El proveedor acuerda realizar las investigaciones de antecendentes apropiadas a todos los miembros del equipo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===6. AMBIENTE DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Codificación segura : El proveedor debe mencionar que herramientas se usarán en el ambiente de desarrollo de software para promover la codificación segura.&lt;br /&gt;
&lt;br /&gt;
;(b) Adminstración de configuración : El proveedor debe usar un sistema de control de versiones que autentifique y registre el miembro del equipo asociado con todos los cambios en el código base, todos los archivos de configuración y compilación.&lt;br /&gt;
&lt;br /&gt;
;(c) Distribución : El proveedor debe usar un proceso de compilación que construya confiablemente un archivo de distribución completo desde el código fuente. Este proceso debe incluir un método para verificar la integridad de el software entregado al cliente.&lt;br /&gt;
&lt;br /&gt;
===7. LIBRERIAS, MARCOS DE DESARROLLO Y PRODUCTOS===&lt;br /&gt;
&lt;br /&gt;
;(a) Apertura : El proveedor debe mencionar todas los aplicaciones de terceros usadas en el software, incluyendo todas las librerias, marcos de desarrollo, componentes y otros productos, ya sean comerciales, gratuitos, de código abierto o código cerrado.&lt;br /&gt;
&lt;br /&gt;
;(b) Evaluación : El proveedor debe hacer esfuerzos rasonables para asegurar que el sofware de terceros cumple con todos los términos de este contrato y es tan seguro como el código a la medida desarrollado bajo este contrato.&lt;br /&gt;
&lt;br /&gt;
===8. REVISIONES DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Derecho de revisión : El cliente tiene el derecho mandar revisar el software para buscar fallas de seguridad, esto a sus expesas y en cualquier momento dentro de los 60 dias despues de la entrega. El desarrollador acepta proveer apoyo rasonable al equipo de revisión proveyendo el codigo fuente y acceso a los ambientes de pruebas.&lt;br /&gt;
&lt;br /&gt;
;(b) Covertura de la revisión : Las revisiones de seguridad deben cubrir todos los aspectos de el software entregado, incluyendo código a la medida, componentes, productos y configuración de sistema.&lt;br /&gt;
&lt;br /&gt;
;(c) Alcance de la revisión : Al menos, la revisión debe cubrir todos los requerimientos de seguridad y debería buscar otras vulnerabilidades comunes. La revisión puede incluir una combinación de busqueda automatizada de vulnerabilidades, pruebas de intrusión, análisis estático de código fuente y revisión de código por expertos.&lt;br /&gt;
&lt;br /&gt;
;(d) Problemas encontrados : Los problemas de seguridad descubiertos serán reportados a el cliente y proveedor por igual. A todos los problemas se les dará seguimiento y serán reparados como se especifique en la sección de seguimiento de problemas de seguridad de este anexo.&lt;br /&gt;
&lt;br /&gt;
===9. ADMINISTRACIÓN DE PROBLEMAS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Identificación : El proveedor dara seguimiento a todos los problemas de seguridad descubiertos en todo el ciclo de desarrollo, ya sea un problema en los requerimientos, diseño, implementación, pruebas, publicación u operación. El riesgo asociado con cada problema de seguridad será evaluado, documentado y reportado a el cliente tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
;(b) Protección : El proveedor protegerá apropiadamente la información relacionada a problemas de seguridad y la documentación relacionada a ellos, esto, para ayudar a disminuir la probabilidad de las vulnerabilidades en el software operacioneal del cliente sean expuestas.&lt;br /&gt;
&lt;br /&gt;
;(c) Reparación : Los problemas de seguridad que sean indentificados antes de la entrega deben ser reparados por el proveedor. Los problemas de seguridad descubiertos despues de la entrega deben ser manejados en la misma manera que otros problemas funcionales según lo especificado en este contrato.&lt;br /&gt;
&lt;br /&gt;
===10. CERTEZA===&lt;br /&gt;
&lt;br /&gt;
;(a) Certeza : El proveedor proveera un &amp;quot;paquete de certificación&amp;quot; consistente en la documentación de seguridad creada a traves del proceso de desarrollo. El paquete deberá establecer que los requerimientos de seguridad, diseño, implementación y resultados de pruebas fueron completados apropiadamente y todos los problemas de seguridad fueron resueltos apropiadamente.&lt;br /&gt;
&lt;br /&gt;
;(b) Auto-Certificación : El aquitecto de seguridad certificará que el software cumple con los requerimientos de seguridad, que todas las actividades de seguridad se realizaron, y que todos los problemas de seguridad identificados han sido documentados y resueltos. Cualquier excepción a el estado de la certificacion debe estar totalmente documentada al momento de la entrega.&lt;br /&gt;
&lt;br /&gt;
;(c) No código malicioso : El proveedor garantize que el sofware no debe contener ningun código que no se alinee a algun requerimiento del software y debilite la seguridad de la aplicación, incluyendo viruses, gusanos, bombas de tiempo, puertas traseras, caballos de troya, huevos de pascua y cualquier otra forma de código malicioso.&lt;br /&gt;
&lt;br /&gt;
===11. CONCENTIMIENTO Y MANTENIMIENTO DE LA SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Consentimiento : El software no debe ser considerado como aceptado hasta que el paquete de certificación este completo y todos los problemas de seguridad han sido resueltos.&lt;br /&gt;
&lt;br /&gt;
;(b) Investigación de problemas de seguridad : Despues del concentimiento, si se sospecha (razonablemente) o descubren problemas de seguridad, el proveedor deberá asisitir al cliente en realizar una investigación para determinar la naturaleza del problema. El problema debe ser considerado &amp;quot;nuevo&amp;quot; si no es cubierto por los requerientos de seguridad y esta fuera de el alcance (razonable) de las pruebas de seguridad.&lt;br /&gt;
&lt;br /&gt;
;(c) Problemas de seguridad nuevos : El proveedor y el cliente consientes en medir el alcance y esfuerzo requerido para resolver problemas de seguridad nuevos, y negociad de buena fe para alcanzar un acuerdo y realizar el trabajor requerido para solucionarlos.&lt;br /&gt;
&lt;br /&gt;
;(d) Otros problemas de seguridad : El proveedor debe usar todos los esfuersos comercialmente rasonables consistentes con practicas de desarrollo comunes en la industria, tomando en cuenta la severidad de el riesgo, para resolver todos los problemas de seguridad considerados nuevos tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Legal Project]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79728</id>
		<title>Anexo para Contrato de Software Seguro de OWASP</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79728"/>
				<updated>2010-03-12T13:52:03Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''ANEXO DE CONTRATO PARA DESAROLLO DE SOFTWARE SEGURO'''&lt;br /&gt;
&lt;br /&gt;
  ADVERTENCIA: ESTE DOCUMENTO DEBE SER CONSIDERADO COMO UNA GUÍA SOLAMENTE.&lt;br /&gt;
  OWASP RECOMIENDA VEHEMENTEMENTE QUE CONSULTE UN ABOGADO CALIFICADO&lt;br /&gt;
  PARA AYUDARLE A NEGOCIAR UN CONTRATO DE SOFTWARE&lt;br /&gt;
  &lt;br /&gt;
== Introducción  ==&lt;br /&gt;
&lt;br /&gt;
Este anexo de contrato pretende ayudar a los proveedores de software y sus clientes a negociar y capturar importantes términos y condiciones contractuales relacionadas a la seguridad en el Software a ser desarrollado o entregado. La razon para este proyecto es que la mayoría de los contratos no mencionan estos temas, y las partes frecuentamente tienen puntos de vista dramaticamente diferentes a lo que en ralidad fue acordado. Creemos que articular claramente estos términos es la mejor manera de asegurarse que ambas partes pueden hacer desiciones informadas sobre como proceder. &lt;br /&gt;
&lt;br /&gt;
 &amp;quot;La seguridad del software comercial mejorará cuando el mercado demande mejor seguridad.&lt;br /&gt;
 Al menos, cada petición para propuestas de software debería pedir a los vendedores &lt;br /&gt;
 detallar como van ellos a probar sus productos para encotrar vulnerabilidades de&lt;br /&gt;
 seguridad. Este paso empezará convenciendo a los vendedores de software empaquetado&lt;br /&gt;
 y proveedores externos que las compañias valoran la seguridad.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- John Pescatore, Director de investiagacion con Gartner&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 Pedimos a los clientes y proveedores que usen este documento como un marco para discutir&lt;br /&gt;
 espectativas y negociar responsabilidades. Este anexo se creó para ser añadido a un&lt;br /&gt;
 contrato de desarrollo de software. Estos términos son negociables, significa que ellos&lt;br /&gt;
 pueden y deben ser discutidos por el cliente y el proveedor.&lt;br /&gt;
&lt;br /&gt;
== SOBRE EL PROYECTO ==&lt;br /&gt;
&lt;br /&gt;
Este documento fue creado por la fundación OWASP (Open Web Application Security Project por sus siglas en Inglés), una organización sin animo de lucro con el objetivo de crear herramientas y documentación, gratuita y abierta para asegurar software. Para facilitar su uso en contratación privada, este documento es de dominio publico. Puede encontrar detalles adicionales sobre este proyecto en http://www.owasp.com/index.php/OWASP_Legal_Project. Son Bienvenidos comentarios de ambos, productores y consumidores de software, asi como de la comunidad legal. &lt;br /&gt;
&lt;br /&gt;
OWASP reconoce gratamente la contribución especial de [http://www.aspectsecurity.com Aspect Security] por su rol en la investigación y preparación de este documento.&lt;br /&gt;
&lt;br /&gt;
==OBJECIONES==&lt;br /&gt;
&lt;br /&gt;
Las siguientes páginas cubren algunas objeciones que escuchamos frecuentemente sobre usar este lenguaje en contratos de desarrollo de software:&lt;br /&gt;
&lt;br /&gt;
=== PERO NO TODOS LOS TÉRMINOS SON CORRECTOS PARA NOSOTROS… ===&lt;br /&gt;
&lt;br /&gt;
Este documento debe ser considerado un punto de inicio para su contrato. Puede que no le gusten todas las actividades, o puede querer proponer mas. Puede querer asignar responsabilidades de manera diferente. Este documento no pretende capturar exactamente las necesidades de todos los clientes y proveedores de software. Pretende proveer un marco para discutir temas clave, importantes para asegurarse que el software se cree de forma segura. Despues de que tengan una discusión sobre seguridad y alcancen un acuerdo. Puede ajustar el convenio para que concuerde con el contrato.&lt;br /&gt;
&lt;br /&gt;
=== PERO, ¿QUIEN DEBE PAGAR POR ESTAS ACTIVIDADES?… ===&lt;br /&gt;
&lt;br /&gt;
Este contrato no es sobre poner mas peso al desarollo de software. La pregunta no es sobre si hay costos asociados con seguridad (por supuesto que hay). La pregunta correcta es qué actividades deberían hacerse por ambas partes para minimizar costos, y cuando deberían ocurrir. &lt;br /&gt;
&lt;br /&gt;
Este anexo no menciona (intensionalmente) sobre el detalle de quién debería pagar por la actividades descritas. Mientras muchas de estas actividades deben estar pasando ya, y son esperadas por muchos clientes, ellas no estan practicadas regularmente en la industria del software. La cuestion de quién paga (y cuándo) debe ser parte de la negociación. &lt;br /&gt;
&lt;br /&gt;
Calcular el costo de la seguridad es muy difícil. Auque hay costos asociados con realizar actividades de seguridad, hay también costos importantes asociados con ignorar estas actividades. Estamos convencidos el mejor costo-beneficio para desarrollar software es reducir la probabilidad de que fallas de seguridad sean introducidas y minimzar el tiempo entre introducir una falla y arreglarla. &lt;br /&gt;
&lt;br /&gt;
Una distición importante a hacer cuando calculamos costos es entre construir mecanismos de seguridad y las actividades para asegurarse que esos mecanismos sean correctos y efectivos. Intentar agregar mecanismoa al final de el ciclo de desarrollo puede causar serios problemas de diseño e incrementará el costo dramáticamente. Este convenio promueve decisiones sobre mecanismos para minimizar estos costos. Similarmente, esperar hasta justo antes de la puesta en producción para hacer actividades de aseguramiento, tales como revisión de código y pruebas de intrusión, tambien incrementaría los costos dramaticamente. Creemos que el mejor costo-beneficio para ganar certeza es poner un nivel constante de esfuerzo en el aseguramiento a través del ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
=== PERO EL NIVEL DE RIGOR ESTA INCORRECTO…. ===&lt;br /&gt;
&lt;br /&gt;
Este convenio asume que el software que esta siendo desarrollado es razonablemente importante para una empresa grande o agencia de gobierno. Hemos seleccionado un &amp;quot;nivel de rigor&amp;quot; para el convenio que es alcanzable por la mayoria de las organizaciones proveedoras de software, e identificaría y manejaría los riesgos más comunes. &lt;br /&gt;
&lt;br /&gt;
Sin embargo, para el software que va a ser usado en aplicaciones críticas, como aplicaciones médicas, financieras o relacionadas con el ejército. Puede querer incrementar el nivel de rigor. Puede querer agregar revisiones, documentación y actividades adicionales de prueba. Puede querer mejorar el proceso de encontrar, diagnosticar y remediar vulnerabilidades. Para aplicaciones menos sensibles, puede desear reducir o remover actividades.&lt;br /&gt;
&lt;br /&gt;
=== PERO NOSOTROS NO PODEMOS ACEPTAR TANTO RIESGO… ===&lt;br /&gt;
&lt;br /&gt;
Este convenio pretende facilitar la discusión sobre quién tomaría el riesgo por las vulnerabilidades de seguridad en el software. Por un lado del espectro, el cliente podría tomar todo el riesgo y el proveedor podría entregar código con muchas vulnerabilidades. Por el otro extremo, el proveedor podría tomar todo el riesgo y asumir la responsabilidad de entregar código perfecto. Ambos extremos son irrealizables. &lt;br /&gt;
&lt;br /&gt;
Actualmente, en este convenio, el proveedor toma el riesgo por problemas que sean descubiertos en los requerimientos o deben ser cubiertos por esfuerzos razonables en pruebas. Pero la remediación de &amp;quot;nuevos&amp;quot; problemas de seguridad tendría que ser pagado por el cliente. Creemos que este es un equilibrio funcional, ya que limita el riesgo adquirido por el proveedor y promueve obtener requerimientos de seguridad por anticipado. Pero hay muchas otras posibles soluciones a este problema. Por favor, dejenos saber si tiene sugerencias alternas, podriamos incluirlas en versiones futuras de este documento. &lt;br /&gt;
&lt;br /&gt;
Note que la discusión aqui solo cubre el riesgo asociado con arreglar las vulnerabilidades de seguridad en el código, y no incluye los costos asociados con recuperarse de incidentes de seguridad relacionados con explotar cualquiera de esas vulnerabilidades. Estamos interesados en las mejores prácticas en esta area.&lt;br /&gt;
&lt;br /&gt;
=== PERO COMO PODEMOS ASEGURAR CÓDIGO DE TERCEROS… ===&lt;br /&gt;
&lt;br /&gt;
Casi todos los proyectos de sofware tienen una cantidad importante de código de terceros como librerias, frameworks y productos. Desde la perspectiva de seguridad, este código es tan importante como el código desarrollado a la medida para su proyecto. Creemos que la responsabilidad de garantizar la seguridad de este código es llevada mejor por el proveedor, aunque ellos podrían no tener toda la capacidad para garantizar la seguridad por ellos mismos. Sin embargo, la seguridad puede ser parte de el la desición de &amp;quot;construir o comprar&amp;quot;, y esta parece ser la mejor manera de promoverla. &lt;br /&gt;
&lt;br /&gt;
El proveedor, por supuesto, tiene la opción de pasar la responsabilidad al proveedor del software de terceros. El desarrollador puede también analizar el código de terceros por él mismo o contratar expertos en seguridad para analizarlo por él.&lt;br /&gt;
&lt;br /&gt;
=== PERO PORQUE DEBO PASAR POR TODO ESTE PROBLEMA… ===&lt;br /&gt;
&lt;br /&gt;
En última instancia, creemos que no hay alternativa para hacer de la seguridad una parte de el proceso de contratación de software. Actualmente, creemos que hay serios malentendidos sobre la seguridad del código que esta siendo desarrollado bajo muchos contratos de desarrollo de software. Esto puede solamente llevar a una cara litigación y a desiciones hechas por individuos con poca experiencia y entendimiento sobre software. Lea el [[Secure software contracting hypothetical case study|Caso de estudio hipotético sobre contratación de software seguro]] para una discusión completa de este problema. &lt;br /&gt;
&lt;br /&gt;
Hay muchos beneficios al trabajar con este convenio. El principal es que pondrá claras las expectativas entre las partes involucradas. En algunos casos ayudará a evitar demandas cuando problemas de seguridad difíciles aparecen en el software. Tambien, estas son las mismas actividades requeridas por muchas razónes legales y de conformidad con estándares/leyes.&lt;br /&gt;
&lt;br /&gt;
=== PERO ES MUY DIFÍCIL PRODUCIR TODA ESTA DOCUMENTACIÓN… ===&lt;br /&gt;
&lt;br /&gt;
OWASP no promueve la documentación por la simpre documentación. Este convenio está enfocado en promover la calidad, no la cantidad. Creemos que puede ser posible (en algunos proyectos) cumplir con este contrato con una pequeña evaluación de riesgo, algunas páginas de requerimientos, un pequeño documento de diseño de seguridad, un plan de pruebas, y algunos resultados de pruebas. &lt;br /&gt;
&lt;br /&gt;
El objetivo de esta documentación es simplemente asegurar, en cada etapa del desarrollo de software, que se ha puesto la atención apropiada en la seguridad. Un beneficio adicional es que esta documentación puede ser recolectada en conjunto para formar un &amp;quot;paquete de certificación&amp;quot; que básicamente esboce el argumento de porque deberiamos confiar que el software hará lo que dice.&lt;br /&gt;
&lt;br /&gt;
==ANEXO DE CONTRATO==&lt;br /&gt;
&lt;br /&gt;
===1. INTRODUCCIÓN===&lt;br /&gt;
&lt;br /&gt;
Esta anexo esta hecho para _____________________ (&amp;quot;convenio&amp;quot;) entre el Cliente y el proveedor. Tanto el Cliente como el proveedor acuerdan maximisar la seguridad del software de acuerdo a los siguientes términos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2. FILOSOFÍA===&lt;br /&gt;
&lt;br /&gt;
Esta anexo pretende aclarar los derechos y obligaciones relacionados a seguridad de todas las partes en una relacion de desarrollo de software. Al mayor nivel, las partes acuerdan que:&lt;br /&gt;
&lt;br /&gt;
;(a) Las desiciones de seguridad estarán basadas en el riesgo : Las desciciones sobre la seguridad seran tomadas en conunto por el cliente y el proveedor basandose en un firme entendimiento de el riesgo involucrado. &lt;br /&gt;
&lt;br /&gt;
;(b) Las actividades de seguridad estarán balanceadas : El esfurzo de seguridad será distribuido equitativamente a través de todo el ciclo de desarollo de software.&lt;br /&gt;
&lt;br /&gt;
;(c) Las actividades de seguridad estarán integradas : Todas las actividades y documentación discutidas aqui pueden y deben ser integradas dentro del ciclo de desarrollo de software del proveedor y no mantenerse separadas de el resto del proyecto. Nada en este anexo implica algún processo de desarrollo de software en particular.&lt;br /&gt;
&lt;br /&gt;
;(d) Se esperan vulnerabilidades :  Todo software contiene defectos, y algunos de estos crearan problemas de seguridad. Ambos, cliente y proveedor se esforzará para identificar las vulnerabilidades tan pronto como sea posible en el ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
;(e) La información sobre seguridad será comunicada por completo : Toda la información relevante para la seguridad se compartirá entre el cliente y el proveedor inmediatamente y completamente.&lt;br /&gt;
&lt;br /&gt;
;(f) Se requerirá solo documentacion de seguridad necesaria : La documentación de seguridad no necesita ser demasiado amplia para describir claramente el diseño de seguridad, análisis de riesgo y problemas.&lt;br /&gt;
&lt;br /&gt;
===3. ACTIVIDADES EN EL CICLO DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Entendimiento del Riesgo : El proveedor y el cliente acuerdan trabajar juntos para entender y documentar los riesgos que enfrenta la aplicacion. Este esfuerzo debe identificar los riesgos clave para los activos y funciones importantes que provee la aplicación. Cada uno de los temas listados en la sección de requerimientos debe ser considerado.&lt;br /&gt;
&lt;br /&gt;
;(b) Requerimientos : Basado en los riesgos, El proveedor y cliente acuerda trabajar juntos para crear requerimientos de seguridad detallados como parte de la especificacion de el software a ser desarrollado. Cada uno de los temas listados en la sección de requerimientos de este anexo deben ser discutidos y evaluados por ambos, cliente y proveedor.  Estos requerimientos pueden ser satisfechos por software creado a la medida, software de terceros, o la plataforma. &lt;br /&gt;
&lt;br /&gt;
;(c) Diseño : el desarollador acuerda proveer documentation que explique claramente el diseño para adquirir cada uno de los requerimientos de seguridad. En muchos de los casos, esta documentacion describirá los mecanismos de seguridad, donde se incluiran dentro de la arquitectura, y todos los patrones de diseño relevantes para asegurar su uso adecuado. El diseño debe especificar claramente si tales mecanismos vienen de software a la medida, software de terceros o de la plataforma.&lt;br /&gt;
&lt;br /&gt;
;(d) Implementación : El proveedor acuerda entregar y seguir un conjunto de lineamientos de codificación segura. Estos lineamientos indicarán como sele de debe dar formato, estructurar y comentar el código fuente. Todo código relacionado a seguridad debe ser comentado profundamente. Guías sobre como evitar vulnerabilidades se seguridad comunes debe ser incluida. Tambien, todo el código debe ser revisado por al menos otro desarollador basandose en los requerimientos de seguridad y los lineamientos de codificación antes de ser conciderado listo para pruebas unitarias.&lt;br /&gt;
&lt;br /&gt;
;(e) Pruebas y análisis de seguridad : El proveedor acuerda entregar y seguir un plan de pruebas de seguridad que defina como se realizarán las pruebas o bien establecer como cada uno de los requerimientos de seguridad va a ser complido. El nivel de rigor de esta actividad debe ser considerado y detallado en un plan. El proveedor ejecutará el plan de prueba y proveera los resultados a el cliente.&lt;br /&gt;
&lt;br /&gt;
;(f) Publicación segura : El proveedor acuerda entregar lineamientos de configuración segura que describan completamente todas las opciones de configuracion relacionadas con seguridad y sus implicaciones para la seguridad del software en su conjunto. Los lineamientos deben incluir una descripción completa de las dependencias en la plataforma y como deben ser configuradas de manera segura, incluidas las del sistema operativo, servidor Web y servidor de aplicacion. La configuracion predeterminada del software debe ser segura.&lt;br /&gt;
&lt;br /&gt;
===4. ÁREAS CON REQUERIMIENTOS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
Los siguientes temas/áreas deben ser considerados durante las actividades de entendimiento de riesgo y definición de requerimientos. Este esfuerzo debe producir un conjunto de requerimientos ajustados, especificos y probables. Ambos, proveedor y cliente deben ser involucrados en este proceso y deben ponerse de acuerdo sobre el conjunto final de requerimientos.&lt;br /&gt;
&lt;br /&gt;
;(a) Validación de entradas y condificación : Los requerimientos deben especificar las reglas para canonicalización, validación y codificación de cada dato de entrada a la aplicación, ya sea de usuarios, sistemas de archivos, bases de datos o sistemas externos. La regla predeterminada debe ser que todas las entradas sean validadas a menos que cumplan con una especificacion detallada de que esta permitido. Además, los requerimientos deben especificar las acciones a tomar cuando se reciven entradas no válidas. Especificamente, la aplicación no debe ser susceptible a inyecciones, desbordamientos, manipulación y otros ataques con entradas de usuario corruptas.&lt;br /&gt;
&lt;br /&gt;
;(b) Autentificación y manejo de sessiones : Los requerimientos deben especificar como se protegeran las credenciales para autentificación y los identificadores de sesión a través del ciclo de desarrollo de software. Los requerimientos para todas las funciones relacionadas deben ser agregadas incluyendo recuperar contraseñas, cambio de contraseñas, recordar contraseñas, desconexión y conexión multiple.&lt;br /&gt;
&lt;br /&gt;
;(c) Control de Acceso : Los requerimientos deben incluir una descripcion detallada de todos los roles (grupos, privilegios, autorizaciones) usadas en la aplicación. Los requerimientos deben indicar todos los activos y funciones que provee la aplicacion. Los requerimientos deben especificar detallada y exactamente los derechos de acceso para cualquier activo y función de cada rol. Se sugiere utilizar un formato de matriz de control de acceso para documentar estas reglas.&lt;br /&gt;
&lt;br /&gt;
;(d) Manejo de Errores : Los requerimientos deben detallar como se van a manejar los errores que ocurran dentro del procesamiento. Algunas aplicaciones deberían hacer lo mejor posible en caso de un error, mientras que otras deberían terminar su procesamiento inmediatamente.&lt;br /&gt;
&lt;br /&gt;
;(e) Historial : Los requerimientos deben especificar que eventos son relevantes para la seguridad y necesitan ser registrados, como ataques detectados, intentos de conexión fallidos e intentos de exeder la autorización.  Los requerimientos deben especificar tambien que information registrar con cada evento, incluyendo hora y fecha, descripción del evento, detalles de aplicación, y otra información útil en esfuerzos forences.&lt;br /&gt;
&lt;br /&gt;
;(f) Conexiones a sistemas externos : Los requerimientos deben especifica como la autentificación y cifrado será manejado para todos los systemas externos, tales como bases de datos, directorios y servicios Web. Todas las credenciales requeridas para la comunicación con sistemas externos deben almacenarce cifradas y fuera de el código dentro de archivos de configuración. &lt;br /&gt;
&lt;br /&gt;
;(g) Cifrado : Los requerimientos deben especificar que datos deben ser cifrados, como serán cifrados y como todos los certificados y otras credenciales deben ser manejadas. Las aplicaciones deben usar algoritmos estándar implementados en una librerias de cifrado que hayan sido usadas y probadas ampliamente.&lt;br /&gt;
&lt;br /&gt;
;(h) Disponibilidad : Los requerimientos deben especificar como protegerse de ataques de negación de servicio. Todos los posibles ataques en la aplicacion deben ser considerados, incluyendo bloqueos de auntentificación, agotamiento de conexiones y otros ataques de agotamiento de recursos.&lt;br /&gt;
&lt;br /&gt;
;(i) Configuración segura : Los requerimientos deben especificar que los valores predeterminados para todas las configuraciones relacionadas a seguridad deben ser seguras. Para propósitos de auditoría, el software deberia ser capás de producir un reporte sencillo de leer que muestre los detalles de todas las configuraciones relacionadas con seguridad.&lt;br /&gt;
&lt;br /&gt;
;(j) Vulnerabilidades especificas : Los requerimientos deben incluir un conjunto de vulnerabilidades especificas que no deben estar presentes en el software. A menos que sea especificado de otra manera, el software no debe incluir ninguna de las fallas descritas en el la &amp;quot;Lista de OWASP sobre las 10 vulnerabilidades mas críticas en aplicaciones Web&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===5. PERSONAL Y ORGANIZACIÓN===&lt;br /&gt;
&lt;br /&gt;
;(a) Arquitecto en seguridad : El desarollador asignará la responsabilidad por la seguridad a un solo recurso técnico experimentado, para ser conocido como el arquitecto de seguridad del proyecto. El arquitecto de seguridad certificará la seguridad de cada entregable.&lt;br /&gt;
&lt;br /&gt;
;(b) Entrenamiento en Seguridad : el proveedor será responsable de verificar que todos los miembros del equipo de desarrollo han sido entrenados en tecnicas de programación segura.&lt;br /&gt;
&lt;br /&gt;
;(c) Desarrolladores dignos de confianza : El proveedor acuerda realizar las investigaciones de antecendentes apropiadas a todos los miembros del equipo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===6. AMBIENTE DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Codificación segura : El proveedor debe mencionar que herramientas se usarán en el ambiente de desarrollo de software para promover la codificación segura.&lt;br /&gt;
&lt;br /&gt;
;(b) Adminstración de configuración : El proveedor debe usar un sistema de control de versiones que autentifique y registre el miembro del equipo asociado con todos los cambios en el código base, todos los archivos de configuración y compilación.&lt;br /&gt;
&lt;br /&gt;
;(c) Distribución : El proveedor debe usar un proceso de compilación que construya confiablemente un archivo de distribución completo desde el código fuente. Este proceso debe incluir un método para verificar la integridad de el software entregado al cliente.&lt;br /&gt;
&lt;br /&gt;
===7. LIBRERIAS, MARCOS DE DESARROLLO Y PRODUCTOS===&lt;br /&gt;
&lt;br /&gt;
;(a) Apertura : El proveedor debe mencionar todas los aplicaciones de terceros usadas en el software, incluyendo todas las librerias, marcos de desarrollo, componentes y otros productos, ya sean comerciales, gratuitos, de código abierto o código cerrado.&lt;br /&gt;
&lt;br /&gt;
;(b) Evaluación : El proveedor debe hacer esfuerzos rasonables para asegurar que el sofware de terceros cumple con todos los términos de este contrato y es tan seguro como el código a la medida desarrollado bajo este contrato.&lt;br /&gt;
&lt;br /&gt;
===8. REVISIONES DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Derecho de revisión : El cliente tiene el derecho mandar revisar el software para buscar fallas de seguridad, esto a sus expesas y en cualquier momento dentro de los 60 dias despues de la entrega. El desarrollador acepta proveer apoyo rasonable al equipo de revisión proveyendo el codigo fuente y acceso a los ambientes de pruebas.&lt;br /&gt;
&lt;br /&gt;
;(b) Covertura de la revisión : Las revisiones de seguridad deben cubrir todos los aspectos de el software entregado, incluyendo código a la medida, componentes, productos y configuración de sistema.&lt;br /&gt;
&lt;br /&gt;
;(c) Alcance de la revisión : Al menos, la revisión debe cubrir todos los requerimientos de seguridad y debería buscar otras vulnerabilidades comunes. La revisión puede incluir una combinación de busqueda automatizada de vulnerabilidades, pruebas de intrusión, análisis estático de código fuente y revisión de código por expertos.&lt;br /&gt;
&lt;br /&gt;
;(d) Problemas encontrados : Los problemas de seguridad descubiertos serán reportados a el cliente y proveedor por igual. A todos los problemas se les dará seguimiento y serán reparados como se especifique en la sección de seguimiento de problemas de seguridad de este anexo.&lt;br /&gt;
&lt;br /&gt;
===9. ADMINISTRACIÓN DE PROBLEMAS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Identificación : El proveedor dara seguimiento a todos los problemas de seguridad descubiertos en todo el ciclo de desarrollo, ya sea un problema en los requerimientos, diseño, implementación, pruebas, publicación u operación. El riesgo asociado con cada problema de seguridad será evaluado, documentado y reportado a el cliente tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
;(b) Protección : El proveedor protegerá apropiadamente la información relacionada a problemas de seguridad y la documentación relacionada a ellos, esto, para ayudar a disminuir la probabilidad de las vulnerabilidades en el software operacioneal del cliente sean expuestas.&lt;br /&gt;
&lt;br /&gt;
;(c) Reparación : Los problemas de seguridad que sean indentificados antes de la entrega deben ser reparados por el proveedor. Los problemas de seguridad descubiertos despues de la entrega deben ser manejados en la misma manera que otros problemas funcionales según lo especificado en este contrato.&lt;br /&gt;
&lt;br /&gt;
===10. CERTEZA===&lt;br /&gt;
&lt;br /&gt;
;(a) Certeza : El proveedor proveera un &amp;quot;paquete de certificación&amp;quot; consistente en la documentación de seguridad creada a traves del proceso de desarrollo. El paquete deberá establecer que los requerimientos de seguridad, diseño, implementación y resultados de pruebas fueron completados apropiadamente y todos los problemas de seguridad fueron resueltos apropiadamente.&lt;br /&gt;
&lt;br /&gt;
;(b) Auto-Certificación : El aquitecto de seguridad certificará que el software cumple con los requerimientos de seguridad, que todas las actividades de seguridad se realizaron, y que todos los problemas de seguridad identificados han sido documentados y resueltos. Cualquier excepción a el estado de la certificacion debe estar totalmente documentada al momento de la entrega.&lt;br /&gt;
&lt;br /&gt;
;(c) No código malicioso : El proveedor garantize que el sofware no debe contener ningun código que no se alinee a algun requerimiento del software y debilite la seguridad de la aplicación, incluyendo viruses, gusanos, bombas de tiempo, puertas traseras, caballos de troya, huevos de pascua y cualquier otra forma de código malicioso.&lt;br /&gt;
&lt;br /&gt;
===11. CONCENTIMIENTO Y MANTENIMIENTO DE LA SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Consentimiento : El software no debe ser considerado como aceptado hasta que el paquete de certificación este completo y todos los problemas de seguridad han sido resueltos.&lt;br /&gt;
&lt;br /&gt;
;(b) Investigación de problemas de seguridad : Despues del concentimiento, si se sospecha (razonablemente) o descubren problemas de seguridad, el proveedor deberá asisitir al cliente en realizar una investigación para determinar la naturaleza del problema. El problema debe ser considerado &amp;quot;nuevo&amp;quot; si no es cubierto por los requerientos de seguridad y esta fuera de el alcance (razonable) de las pruebas de seguridad.&lt;br /&gt;
&lt;br /&gt;
;(c) Problemas de seguridad nuevos : El proveedor y el cliente consientes en medir el alcance y esfuerzo requerido para resolver problemas de seguridad nuevos, y negociad de buena fe para alcanzar un acuerdo y realizar el trabajor requerido para solucionarlos.&lt;br /&gt;
&lt;br /&gt;
;(d) Otros problemas de seguridad : El proveedor debe usar todos los esfuersos comercialmente rasonables consistentes con practicas de desarrollo comunes en la industria, tomando en cuenta la severidad de el riesgo, para resolver todos los problemas de seguridad considerados nuevos tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Legal Project]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79726</id>
		<title>Anexo para Contrato de Software Seguro de OWASP</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79726"/>
				<updated>2010-03-12T13:49:04Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''ANEXO DE CONTRATO PARA DESAROLLO DE SOFTWARE SEGURO'''&lt;br /&gt;
&lt;br /&gt;
  ADVERTENCIA: ESTE DOCUMENTO DEBE SER CONSIDERADO COMO UNA GUÍA SOLAMENTE.&lt;br /&gt;
  OWASP RECOMIENDA VEHEMENTEMENTE QUE CONSULTE UN ABOGADO CALIFICADO&lt;br /&gt;
  PARA AYUDARLE A NEGOCIAR UN CONTRATO DE SOFTWARE&lt;br /&gt;
  &lt;br /&gt;
== Introducción  ==&lt;br /&gt;
&lt;br /&gt;
Este anexo de contrato pretende ayudar a los proveedores de software y sus clientes a negociar y capturar importantes términos y condiciones contractuales relacionadas a la seguridad en el Software a ser desarrollado o entregado. La razon para este proyecto es que la mayoría de los contratos no mencionan estos temas, y las partes frecuentamente tienen puntos de vista dramaticamente diferentes a lo que en ralidad fue acordado. Creemos que articular claramente estos términos es la mejor manera de asegurarse que ambas partes pueden hacer desiciones informadas sobre como proceder. &lt;br /&gt;
&lt;br /&gt;
 &amp;quot;La seguridad del software comercial mejorará cuando el mercado demande mejor seguridad.&lt;br /&gt;
 Al menos, cada petición para propuestas de software debería pedir a los vendedores &lt;br /&gt;
 detallar como van ellos a probar sus productos para encotrar vulnerabilidades de&lt;br /&gt;
 seguridad. Este paso empezará convenciendo a los vendedores de software empaquetado&lt;br /&gt;
 y proveedores externos que las compañias valoran la seguridad.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- John Pescatore, Director de investiagacion con Gartner&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 Pedimos a los clientes y proveedores que usen este documento como un marco para discutir&lt;br /&gt;
 espectativas y negociar responsabilidades. Este anexo se creó para ser añadido a un&lt;br /&gt;
 contrato de desarrollo de software. Estos términos son negociables, significa que ellos&lt;br /&gt;
 pueden y deben ser discutidos por el cliente y el proveedor.&lt;br /&gt;
&lt;br /&gt;
== SOBRE EL PROYECTO ==&lt;br /&gt;
&lt;br /&gt;
Este documento fue creado por la fundación OWASP (Open Web Application Security Project por sus siglas en Inglés), una organización sin animo de lucro con el objetivo de crear herramientas y documentación, gratuita y abierta para asegurar software. Para facilitar su uso en contratación privada, este documento es de dominio publico. Puede encontrar detalles adicionales sobre este proyecto en http://www.owasp.com/index.php/OWASP_Legal_Project. Son Bienvenidos comentarios de ambos, productores y consumidores de software, asi como de la comunidad legal. &lt;br /&gt;
&lt;br /&gt;
OWASP reconoce gratamente la contribución especial de [http://www.aspectsecurity.com Aspect Security] por su rol en la investigación y preparación de este documento.&lt;br /&gt;
&lt;br /&gt;
==OBJECIONES==&lt;br /&gt;
&lt;br /&gt;
Las siguientes páginas cubren algunas objeciones que escuchamos frecuentemente sobre usar este lenguaje en contratos de desarrollo de software:&lt;br /&gt;
&lt;br /&gt;
=== PERO NO TODOS LOS TÉRMINOS SON CORRECTOS PARA NOSOTROS… ===&lt;br /&gt;
&lt;br /&gt;
Este documento debe ser considerado un punto de inicio para su contrato. Puede que no le gusten todas las actividades, o puede querer proponer mas. Puede querer asignar responsabilidades de manera diferente. Este documento no pretende capturar exactamente las necesidades de todos los clientes y proveedores de software. Pretende proveer un marco para discutir temas clave, importantes para asegurarse que el software se cree de forma segura. Despues de que tengan una discusión sobre seguridad y alcancen un acuerdo. Puede ajustar el convenio para que concuerde con el contrato.&lt;br /&gt;
&lt;br /&gt;
=== PERO, ¿QUIEN DEBE PAGAR POR ESTAS ACTIVIDADES?… ===&lt;br /&gt;
&lt;br /&gt;
Este contrato no es sobre poner mas peso al desarollo de software. La pregunta no es sobre si hay costos asociados con seguridad (por supuesto que hay). La pregunta correcta es qué actividades deberían hacerse por ambas partes para minimizar costos, y cuando deberían ocurrir. &lt;br /&gt;
&lt;br /&gt;
Este anexo no menciona (intensionalmente) sobre el detalle de quién debería pagar por la actividades descritas. Mientras muchas de estas actividades deben estar pasando ya, y son esperadas por muchos clientes, ellas no estan practicadas regularmente en la industria del software. La cuestion de quién paga (y cuándo) debe ser parte de la negociación. &lt;br /&gt;
&lt;br /&gt;
Calcular el costo de la seguridad es muy difícil. Auque hay costos asociados con realizar actividades de seguridad, hay también costos importantes asociados con ignorar estas actividades. Estamos convencidos el mejor costo-beneficio para desarrollar software es reducir la probabilidad de que fallas de seguridad sean introducidas y minimzar el tiempo entre introducir una falla y arreglarla. &lt;br /&gt;
&lt;br /&gt;
Una distición importante a hacer cuando calculamos costos es entre construir mecanismos de seguridad y las actividades para asegurarse que esos mecanismos sean correctos y efectivos. Intentar agregar mecanismoa al final de el ciclo de desarrollo puede causar serios problemas de diseño e incrementará el costo dramáticamente. Este convenio promueve decisiones sobre mecanismos para minimizar estos costos. Similarmente, esperar hasta justo antes de la puesta en producción para hacer actividades de aseguramiento, tales como revisión de código y pruebas de intrusión, tambien incrementaría los costos dramaticamente. Creemos que el mejor costo-beneficio para ganar certeza es poner un nivel constante de esfuerzo en el aseguramiento a través del ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
=== PERO EL NIVEL DE RIGOR ESTA INCORRECTO…. ===&lt;br /&gt;
&lt;br /&gt;
Este convenio asume que el software que esta siendo desarrollado es razonablemente importante para una empresa grande o agencia de gobierno. Hemos seleccionado un &amp;quot;nivel de rigor&amp;quot; para el convenio que es alcanzable por la mayoria de las organizaciones proveedoras de software, e identificaría y manejaría los riesgos más comunes. &lt;br /&gt;
&lt;br /&gt;
Sin embargo, para el software que va a ser usado en aplicaciones críticas, como aplicaciones médicas, financieras o relacionadas con el ejército. Puede querer incrementar el nivel de rigor. Puede querer agregar revisiones, documentación y actividades adicionales de prueba. Puede querer mejorar el proceso de encontrar, diagnosticar y remediar vulnerabilidades. Para aplicaciones menos sensibles, puede desear reducir o remover actividades.&lt;br /&gt;
&lt;br /&gt;
=== PERO NOSOTROS NO PODEMOS ACEPTAR TANTO RIESGO… ===&lt;br /&gt;
&lt;br /&gt;
Este convenio pretende facilitar la discusión sobre quién tomaría el riesgo por las vulnerabilidades de seguridad en el software. Por un lado del espectro, el cliente podría tomar todo el riesgo y el proveedor podría entregar código con muchas vulnerabilidades. Por el otro extremo, el proveedor podría tomar todo el riesgo y asumir la responsabilidad de entregar código perfecto. Ambos extremos son irrealizables. &lt;br /&gt;
&lt;br /&gt;
Actualmente, en este convenio, el proveedor toma el riesgo por problemas que sean descubiertos en los requerimientos o deben ser cubiertos por esfuerzos razonables en pruebas. Pero la remediación de &amp;quot;nuevos&amp;quot; problemas de seguridad tendría que ser pagado por el cliente. Creemos que este es un equilibrio funcional, ya que limita el riesgo adquirido por el proveedor y promueve obtener requerimientos de seguridad por anticipado. Pero hay muchas otras posibles soluciones a este problema. Por favor, dejenos saber si tiene sugerencias alternas, podriamos incluirlas en versiones futuras de este documento. &lt;br /&gt;
&lt;br /&gt;
Note que la discusión aqui solo cubre el riesgo asociado con arreglar las vulnerabilidades de seguridad en el código, y no incluye los costos asociados con recuperarse de incidentes de seguridad relacionados con explotar cualquiera de esas vulnerabilidades. Estamos interesados en las mejores prácticas en esta area.&lt;br /&gt;
&lt;br /&gt;
=== PERO COMO PODEMOS ASEGURAR CÓDIGO DE TERCEROS… ===&lt;br /&gt;
&lt;br /&gt;
Casi todos los proyectos de sofware tienen una cantidad importante de código de terceros como librerias, frameworks y productos. Desde la perspectiva de seguridad, este código es tan importante como el código desarrollado a la medida para su proyecto. Creemos que la responsabilidad de garantizar la seguridad de este código es llevada mejor por el proveedor, aunque ellos podrían no tener toda la capacidad para garantizar la seguridad por ellos mismos. Sin embargo, la seguridad puede ser parte de el la desición de &amp;quot;construir o comprar&amp;quot;, y esta parece ser la mejor manera de promoverla. &lt;br /&gt;
&lt;br /&gt;
El proveedor, por supuesto, tiene la opción de pasar la responsabilidad al proveedor del software de terceros. El desarrollador puede también analizar el código de terceros por él mismo o contratar expertos en seguridad para analizarlo por él.&lt;br /&gt;
&lt;br /&gt;
=== PERO PORQUE DEBO PASAR POR TODO ESTE PROBLEMA… ===&lt;br /&gt;
&lt;br /&gt;
En última instancia, creemos que no hay alternativa para hacer de la seguridad una parte de el proceso de contratación de software. Actualmente, creemos que hay serios malentendidos sobre la seguridad del código que esta siendo desarrollado bajo muchos contratos de desarrollo de software. Esto puede solamente llevar a una cara litigación y a desiciones hechas por individuos con poca experiencia y entendimiento sobre software. Lea el [[Secure software contracting hypothetical case study|Caso de estudio hipotético sobre contratación de software seguro]] para una discusión completa de este problema. &lt;br /&gt;
&lt;br /&gt;
Hay muchos beneficios al trabajar con este convenio. El principal es que pondrá claras las expectativas entre las partes involucradas. En algunos casos ayudará a evitar demandas cuando problemas de seguridad difíciles aparecen en el software. Tambien, estas son las mismas actividades requeridas por muchas razónes legales y de conformidad con estándares/leyes.&lt;br /&gt;
&lt;br /&gt;
===PERO ES MUY DIFÍCIL PRODUCIR TODA ESTA DOCUMENTACIÓN…===&lt;br /&gt;
&lt;br /&gt;
OWASP no promueve la documentacion por la simpre documentacion. Este convenio esta enfocado en promover la calidad, no la cantidad. Creemos que puede ser posible (en algunos proyectos) cumplir con este contrato con una pequeña evaluacion de riesgo, algunas páginas de requerimientos, un pequeño documento de diseño de seguridad, un plan de pruebas, y algunos resultados de pruebas.&lt;br /&gt;
&lt;br /&gt;
El objetivo de esta documentación es simplemente asegurar, en cada etapa del desarrollo de software, que se ha puesto la atención apropiada en la seguridad. Un beneficio adiciona es que esta documentacion puede ser recolectada en conjunto para formar un &amp;quot;paquete de certificación&amp;quot; que básicamente esbose el argumento de porque deberiamos confiar que el software hará lo que dice.&lt;br /&gt;
&lt;br /&gt;
==ANEXO DE CONTRATO==&lt;br /&gt;
&lt;br /&gt;
===1. INTRODUCCIÓN===&lt;br /&gt;
&lt;br /&gt;
Esta anexo esta hecho para _____________________ (&amp;quot;convenio&amp;quot;) entre el Cliente y el proveedor. Tanto el Cliente como el proveedor acuerdan maximisar la seguridad del software de acuerdo a los siguientes términos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2. FILOSOFÍA===&lt;br /&gt;
&lt;br /&gt;
Esta anexo pretende aclarar los derechos y obligaciones relacionados a seguridad de todas las partes en una relacion de desarrollo de software. Al mayor nivel, las partes acuerdan que:&lt;br /&gt;
&lt;br /&gt;
;(a) Las desiciones de seguridad estarán basadas en el riesgo : Las desciciones sobre la seguridad seran tomadas en conunto por el cliente y el proveedor basandose en un firme entendimiento de el riesgo involucrado. &lt;br /&gt;
&lt;br /&gt;
;(b) Las actividades de seguridad estarán balanceadas : El esfurzo de seguridad será distribuido equitativamente a través de todo el ciclo de desarollo de software.&lt;br /&gt;
&lt;br /&gt;
;(c) Las actividades de seguridad estarán integradas : Todas las actividades y documentación discutidas aqui pueden y deben ser integradas dentro del ciclo de desarrollo de software del proveedor y no mantenerse separadas de el resto del proyecto. Nada en este anexo implica algún processo de desarrollo de software en particular.&lt;br /&gt;
&lt;br /&gt;
;(d) Se esperan vulnerabilidades :  Todo software contiene defectos, y algunos de estos crearan problemas de seguridad. Ambos, cliente y proveedor se esforzará para identificar las vulnerabilidades tan pronto como sea posible en el ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
;(e) La información sobre seguridad será comunicada por completo : Toda la información relevante para la seguridad se compartirá entre el cliente y el proveedor inmediatamente y completamente.&lt;br /&gt;
&lt;br /&gt;
;(f) Se requerirá solo documentacion de seguridad necesaria : La documentación de seguridad no necesita ser demasiado amplia para describir claramente el diseño de seguridad, análisis de riesgo y problemas.&lt;br /&gt;
&lt;br /&gt;
===3. ACTIVIDADES EN EL CICLO DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Entendimiento del Riesgo : El proveedor y el cliente acuerdan trabajar juntos para entender y documentar los riesgos que enfrenta la aplicacion. Este esfuerzo debe identificar los riesgos clave para los activos y funciones importantes que provee la aplicación. Cada uno de los temas listados en la sección de requerimientos debe ser considerado.&lt;br /&gt;
&lt;br /&gt;
;(b) Requerimientos : Basado en los riesgos, El proveedor y cliente acuerda trabajar juntos para crear requerimientos de seguridad detallados como parte de la especificacion de el software a ser desarrollado. Cada uno de los temas listados en la sección de requerimientos de este anexo deben ser discutidos y evaluados por ambos, cliente y proveedor.  Estos requerimientos pueden ser satisfechos por software creado a la medida, software de terceros, o la plataforma. &lt;br /&gt;
&lt;br /&gt;
;(c) Diseño : el desarollador acuerda proveer documentation que explique claramente el diseño para adquirir cada uno de los requerimientos de seguridad. En muchos de los casos, esta documentacion describirá los mecanismos de seguridad, donde se incluiran dentro de la arquitectura, y todos los patrones de diseño relevantes para asegurar su uso adecuado. El diseño debe especificar claramente si tales mecanismos vienen de software a la medida, software de terceros o de la plataforma.&lt;br /&gt;
&lt;br /&gt;
;(d) Implementación : El proveedor acuerda entregar y seguir un conjunto de lineamientos de codificación segura. Estos lineamientos indicarán como sele de debe dar formato, estructurar y comentar el código fuente. Todo código relacionado a seguridad debe ser comentado profundamente. Guías sobre como evitar vulnerabilidades se seguridad comunes debe ser incluida. Tambien, todo el código debe ser revisado por al menos otro desarollador basandose en los requerimientos de seguridad y los lineamientos de codificación antes de ser conciderado listo para pruebas unitarias.&lt;br /&gt;
&lt;br /&gt;
;(e) Pruebas y análisis de seguridad : El proveedor acuerda entregar y seguir un plan de pruebas de seguridad que defina como se realizarán las pruebas o bien establecer como cada uno de los requerimientos de seguridad va a ser complido. El nivel de rigor de esta actividad debe ser considerado y detallado en un plan. El proveedor ejecutará el plan de prueba y proveera los resultados a el cliente.&lt;br /&gt;
&lt;br /&gt;
;(f) Publicación segura : El proveedor acuerda entregar lineamientos de configuración segura que describan completamente todas las opciones de configuracion relacionadas con seguridad y sus implicaciones para la seguridad del software en su conjunto. Los lineamientos deben incluir una descripción completa de las dependencias en la plataforma y como deben ser configuradas de manera segura, incluidas las del sistema operativo, servidor Web y servidor de aplicacion. La configuracion predeterminada del software debe ser segura.&lt;br /&gt;
&lt;br /&gt;
===4. ÁREAS CON REQUERIMIENTOS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
Los siguientes temas/áreas deben ser considerados durante las actividades de entendimiento de riesgo y definición de requerimientos. Este esfuerzo debe producir un conjunto de requerimientos ajustados, especificos y probables. Ambos, proveedor y cliente deben ser involucrados en este proceso y deben ponerse de acuerdo sobre el conjunto final de requerimientos.&lt;br /&gt;
&lt;br /&gt;
;(a) Validación de entradas y condificación : Los requerimientos deben especificar las reglas para canonicalización, validación y codificación de cada dato de entrada a la aplicación, ya sea de usuarios, sistemas de archivos, bases de datos o sistemas externos. La regla predeterminada debe ser que todas las entradas sean validadas a menos que cumplan con una especificacion detallada de que esta permitido. Además, los requerimientos deben especificar las acciones a tomar cuando se reciven entradas no válidas. Especificamente, la aplicación no debe ser susceptible a inyecciones, desbordamientos, manipulación y otros ataques con entradas de usuario corruptas.&lt;br /&gt;
&lt;br /&gt;
;(b) Autentificación y manejo de sessiones : Los requerimientos deben especificar como se protegeran las credenciales para autentificación y los identificadores de sesión a través del ciclo de desarrollo de software. Los requerimientos para todas las funciones relacionadas deben ser agregadas incluyendo recuperar contraseñas, cambio de contraseñas, recordar contraseñas, desconexión y conexión multiple.&lt;br /&gt;
&lt;br /&gt;
;(c) Control de Acceso : Los requerimientos deben incluir una descripcion detallada de todos los roles (grupos, privilegios, autorizaciones) usadas en la aplicación. Los requerimientos deben indicar todos los activos y funciones que provee la aplicacion. Los requerimientos deben especificar detallada y exactamente los derechos de acceso para cualquier activo y función de cada rol. Se sugiere utilizar un formato de matriz de control de acceso para documentar estas reglas.&lt;br /&gt;
&lt;br /&gt;
;(d) Manejo de Errores : Los requerimientos deben detallar como se van a manejar los errores que ocurran dentro del procesamiento. Algunas aplicaciones deberían hacer lo mejor posible en caso de un error, mientras que otras deberían terminar su procesamiento inmediatamente.&lt;br /&gt;
&lt;br /&gt;
;(e) Historial : Los requerimientos deben especificar que eventos son relevantes para la seguridad y necesitan ser registrados, como ataques detectados, intentos de conexión fallidos e intentos de exeder la autorización.  Los requerimientos deben especificar tambien que information registrar con cada evento, incluyendo hora y fecha, descripción del evento, detalles de aplicación, y otra información útil en esfuerzos forences.&lt;br /&gt;
&lt;br /&gt;
;(f) Conexiones a sistemas externos : Los requerimientos deben especifica como la autentificación y cifrado será manejado para todos los systemas externos, tales como bases de datos, directorios y servicios Web. Todas las credenciales requeridas para la comunicación con sistemas externos deben almacenarce cifradas y fuera de el código dentro de archivos de configuración. &lt;br /&gt;
&lt;br /&gt;
;(g) Cifrado : Los requerimientos deben especificar que datos deben ser cifrados, como serán cifrados y como todos los certificados y otras credenciales deben ser manejadas. Las aplicaciones deben usar algoritmos estándar implementados en una librerias de cifrado que hayan sido usadas y probadas ampliamente.&lt;br /&gt;
&lt;br /&gt;
;(h) Disponibilidad : Los requerimientos deben especificar como protegerse de ataques de negación de servicio. Todos los posibles ataques en la aplicacion deben ser considerados, incluyendo bloqueos de auntentificación, agotamiento de conexiones y otros ataques de agotamiento de recursos.&lt;br /&gt;
&lt;br /&gt;
;(i) Configuración segura : Los requerimientos deben especificar que los valores predeterminados para todas las configuraciones relacionadas a seguridad deben ser seguras. Para propósitos de auditoría, el software deberia ser capás de producir un reporte sencillo de leer que muestre los detalles de todas las configuraciones relacionadas con seguridad.&lt;br /&gt;
&lt;br /&gt;
;(j) Vulnerabilidades especificas : Los requerimientos deben incluir un conjunto de vulnerabilidades especificas que no deben estar presentes en el software. A menos que sea especificado de otra manera, el software no debe incluir ninguna de las fallas descritas en el la &amp;quot;Lista de OWASP sobre las 10 vulnerabilidades mas críticas en aplicaciones Web&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===5. PERSONAL Y ORGANIZACIÓN===&lt;br /&gt;
&lt;br /&gt;
;(a) Arquitecto en seguridad : El desarollador asignará la responsabilidad por la seguridad a un solo recurso técnico experimentado, para ser conocido como el arquitecto de seguridad del proyecto. El arquitecto de seguridad certificará la seguridad de cada entregable.&lt;br /&gt;
&lt;br /&gt;
;(b) Entrenamiento en Seguridad : el proveedor será responsable de verificar que todos los miembros del equipo de desarrollo han sido entrenados en tecnicas de programación segura.&lt;br /&gt;
&lt;br /&gt;
;(c) Desarrolladores dignos de confianza : El proveedor acuerda realizar las investigaciones de antecendentes apropiadas a todos los miembros del equipo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===6. AMBIENTE DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Codificación segura : El proveedor debe mencionar que herramientas se usarán en el ambiente de desarrollo de software para promover la codificación segura.&lt;br /&gt;
&lt;br /&gt;
;(b) Adminstración de configuración : El proveedor debe usar un sistema de control de versiones que autentifique y registre el miembro del equipo asociado con todos los cambios en el código base, todos los archivos de configuración y compilación.&lt;br /&gt;
&lt;br /&gt;
;(c) Distribución : El proveedor debe usar un proceso de compilación que construya confiablemente un archivo de distribución completo desde el código fuente. Este proceso debe incluir un método para verificar la integridad de el software entregado al cliente.&lt;br /&gt;
&lt;br /&gt;
===7. LIBRERIAS, MARCOS DE DESARROLLO Y PRODUCTOS===&lt;br /&gt;
&lt;br /&gt;
;(a) Apertura : El proveedor debe mencionar todas los aplicaciones de terceros usadas en el software, incluyendo todas las librerias, marcos de desarrollo, componentes y otros productos, ya sean comerciales, gratuitos, de código abierto o código cerrado.&lt;br /&gt;
&lt;br /&gt;
;(b) Evaluación : El proveedor debe hacer esfuerzos rasonables para asegurar que el sofware de terceros cumple con todos los términos de este contrato y es tan seguro como el código a la medida desarrollado bajo este contrato.&lt;br /&gt;
&lt;br /&gt;
===8. REVISIONES DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Derecho de revisión : El cliente tiene el derecho mandar revisar el software para buscar fallas de seguridad, esto a sus expesas y en cualquier momento dentro de los 60 dias despues de la entrega. El desarrollador acepta proveer apoyo rasonable al equipo de revisión proveyendo el codigo fuente y acceso a los ambientes de pruebas.&lt;br /&gt;
&lt;br /&gt;
;(b) Covertura de la revisión : Las revisiones de seguridad deben cubrir todos los aspectos de el software entregado, incluyendo código a la medida, componentes, productos y configuración de sistema.&lt;br /&gt;
&lt;br /&gt;
;(c) Alcance de la revisión : Al menos, la revisión debe cubrir todos los requerimientos de seguridad y debería buscar otras vulnerabilidades comunes. La revisión puede incluir una combinación de busqueda automatizada de vulnerabilidades, pruebas de intrusión, análisis estático de código fuente y revisión de código por expertos.&lt;br /&gt;
&lt;br /&gt;
;(d) Problemas encontrados : Los problemas de seguridad descubiertos serán reportados a el cliente y proveedor por igual. A todos los problemas se les dará seguimiento y serán reparados como se especifique en la sección de seguimiento de problemas de seguridad de este anexo.&lt;br /&gt;
&lt;br /&gt;
===9. ADMINISTRACIÓN DE PROBLEMAS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Identificación : El proveedor dara seguimiento a todos los problemas de seguridad descubiertos en todo el ciclo de desarrollo, ya sea un problema en los requerimientos, diseño, implementación, pruebas, publicación u operación. El riesgo asociado con cada problema de seguridad será evaluado, documentado y reportado a el cliente tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
;(b) Protección : El proveedor protegerá apropiadamente la información relacionada a problemas de seguridad y la documentación relacionada a ellos, esto, para ayudar a disminuir la probabilidad de las vulnerabilidades en el software operacioneal del cliente sean expuestas.&lt;br /&gt;
&lt;br /&gt;
;(c) Reparación : Los problemas de seguridad que sean indentificados antes de la entrega deben ser reparados por el proveedor. Los problemas de seguridad descubiertos despues de la entrega deben ser manejados en la misma manera que otros problemas funcionales según lo especificado en este contrato.&lt;br /&gt;
&lt;br /&gt;
===10. CERTEZA===&lt;br /&gt;
&lt;br /&gt;
;(a) Certeza : El proveedor proveera un &amp;quot;paquete de certificación&amp;quot; consistente en la documentación de seguridad creada a traves del proceso de desarrollo. El paquete deberá establecer que los requerimientos de seguridad, diseño, implementación y resultados de pruebas fueron completados apropiadamente y todos los problemas de seguridad fueron resueltos apropiadamente.&lt;br /&gt;
&lt;br /&gt;
;(b) Auto-Certificación : El aquitecto de seguridad certificará que el software cumple con los requerimientos de seguridad, que todas las actividades de seguridad se realizaron, y que todos los problemas de seguridad identificados han sido documentados y resueltos. Cualquier excepción a el estado de la certificacion debe estar totalmente documentada al momento de la entrega.&lt;br /&gt;
&lt;br /&gt;
;(c) No código malicioso : El proveedor garantize que el sofware no debe contener ningun código que no se alinee a algun requerimiento del software y debilite la seguridad de la aplicación, incluyendo viruses, gusanos, bombas de tiempo, puertas traseras, caballos de troya, huevos de pascua y cualquier otra forma de código malicioso.&lt;br /&gt;
&lt;br /&gt;
===11. CONCENTIMIENTO Y MANTENIMIENTO DE LA SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Consentimiento : El software no debe ser considerado como aceptado hasta que el paquete de certificación este completo y todos los problemas de seguridad han sido resueltos.&lt;br /&gt;
&lt;br /&gt;
;(b) Investigación de problemas de seguridad : Despues del concentimiento, si se sospecha (razonablemente) o descubren problemas de seguridad, el proveedor deberá asisitir al cliente en realizar una investigación para determinar la naturaleza del problema. El problema debe ser considerado &amp;quot;nuevo&amp;quot; si no es cubierto por los requerientos de seguridad y esta fuera de el alcance (razonable) de las pruebas de seguridad.&lt;br /&gt;
&lt;br /&gt;
;(c) Problemas de seguridad nuevos : El proveedor y el cliente consientes en medir el alcance y esfuerzo requerido para resolver problemas de seguridad nuevos, y negociad de buena fe para alcanzar un acuerdo y realizar el trabajor requerido para solucionarlos.&lt;br /&gt;
&lt;br /&gt;
;(d) Otros problemas de seguridad : El proveedor debe usar todos los esfuersos comercialmente rasonables consistentes con practicas de desarrollo comunes en la industria, tomando en cuenta la severidad de el riesgo, para resolver todos los problemas de seguridad considerados nuevos tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Legal Project]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79725</id>
		<title>Anexo para Contrato de Software Seguro de OWASP</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79725"/>
				<updated>2010-03-12T13:47:54Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''ANEXO DE CONTRATO PARA DESAROLLO DE SOFTWARE SEGURO'''&lt;br /&gt;
&lt;br /&gt;
  ADVERTENCIA: ESTE DOCUMENTO DEBE SER CONSIDERADO COMO UNA GUÍA SOLAMENTE.&lt;br /&gt;
  OWASP RECOMIENDA VEHEMENTEMENTE QUE CONSULTE UN ABOGADO CALIFICADO&lt;br /&gt;
  PARA AYUDARLE A NEGOCIAR UN CONTRATO DE SOFTWARE&lt;br /&gt;
  &lt;br /&gt;
== Introducción  ==&lt;br /&gt;
&lt;br /&gt;
Este anexo de contrato pretende ayudar a los proveedores de software y sus clientes a negociar y capturar importantes términos y condiciones contractuales relacionadas a la seguridad en el Software a ser desarrollado o entregado. La razon para este proyecto es que la mayoría de los contratos no mencionan estos temas, y las partes frecuentamente tienen puntos de vista dramaticamente diferentes a lo que en ralidad fue acordado. Creemos que articular claramente estos términos es la mejor manera de asegurarse que ambas partes pueden hacer desiciones informadas sobre como proceder. &lt;br /&gt;
&lt;br /&gt;
 &amp;quot;La seguridad del software comercial mejorará cuando el mercado demande mejor seguridad.&lt;br /&gt;
 Al menos, cada petición para propuestas de software debería pedir a los vendedores &lt;br /&gt;
 detallar como van ellos a probar sus productos para encotrar vulnerabilidades de&lt;br /&gt;
 seguridad. Este paso empezará convenciendo a los vendedores de software empaquetado&lt;br /&gt;
 y proveedores externos que las compañias valoran la seguridad.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- John Pescatore, Director de investiagacion con Gartner&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 Pedimos a los clientes y proveedores que usen este documento como un marco para discutir&lt;br /&gt;
 espectativas y negociar responsabilidades. Este anexo se creó para ser añadido a un&lt;br /&gt;
 contrato de desarrollo de software. Estos términos son negociables, significa que ellos&lt;br /&gt;
 pueden y deben ser discutidos por el cliente y el proveedor.&lt;br /&gt;
&lt;br /&gt;
== SOBRE EL PROYECTO ==&lt;br /&gt;
&lt;br /&gt;
Este documento fue creado por la fundación OWASP (Open Web Application Security Project por sus siglas en Inglés), una organización sin animo de lucro con el objetivo de crear herramientas y documentación, gratuita y abierta para asegurar software. Para facilitar su uso en contratación privada, este documento es de dominio publico. Puede encontrar detalles adicionales sobre este proyecto en http://www.owasp.com/index.php/OWASP_Legal_Project. Son Bienvenidos comentarios de ambos, productores y consumidores de software, asi como de la comunidad legal. &lt;br /&gt;
&lt;br /&gt;
OWASP reconoce gratamente la contribución especial de [http://www.aspectsecurity.com Aspect Security] por su rol en la investigación y preparación de este documento.&lt;br /&gt;
&lt;br /&gt;
==OBJECIONES==&lt;br /&gt;
&lt;br /&gt;
Las siguientes páginas cubren algunas objeciones que escuchamos frecuentemente sobre usar este lenguaje en contratos de desarrollo de software:&lt;br /&gt;
&lt;br /&gt;
=== PERO NO TODOS LOS TÉRMINOS SON CORRECTOS PARA NOSOTROS… ===&lt;br /&gt;
&lt;br /&gt;
Este documento debe ser considerado un punto de inicio para su contrato. Puede que no le gusten todas las actividades, o puede querer proponer mas. Puede querer asignar responsabilidades de manera diferente. Este documento no pretende capturar exactamente las necesidades de todos los clientes y proveedores de software. Pretende proveer un marco para discutir temas clave, importantes para asegurarse que el software se cree de forma segura. Despues de que tengan una discusión sobre seguridad y alcancen un acuerdo. Puede ajustar el convenio para que concuerde con el contrato.&lt;br /&gt;
&lt;br /&gt;
=== PERO, ¿QUIEN DEBE PAGAR POR ESTAS ACTIVIDADES?… ===&lt;br /&gt;
&lt;br /&gt;
Este contrato no es sobre poner mas peso al desarollo de software. La pregunta no es sobre si hay costos asociados con seguridad (por supuesto que hay). La pregunta correcta es qué actividades deberían hacerse por ambas partes para minimizar costos, y cuando deberían ocurrir. &lt;br /&gt;
&lt;br /&gt;
Este anexo no menciona (intensionalmente) sobre el detalle de quién debería pagar por la actividades descritas. Mientras muchas de estas actividades deben estar pasando ya, y son esperadas por muchos clientes, ellas no estan practicadas regularmente en la industria del software. La cuestion de quién paga (y cuándo) debe ser parte de la negociación. &lt;br /&gt;
&lt;br /&gt;
Calcular el costo de la seguridad es muy difícil. Auque hay costos asociados con realizar actividades de seguridad, hay también costos importantes asociados con ignorar estas actividades. Estamos convencidos el mejor costo-beneficio para desarrollar software es reducir la probabilidad de que fallas de seguridad sean introducidas y minimzar el tiempo entre introducir una falla y arreglarla. &lt;br /&gt;
&lt;br /&gt;
Una distición importante a hacer cuando calculamos costos es entre construir mecanismos de seguridad y las actividades para asegurarse que esos mecanismos sean correctos y efectivos. Intentar agregar mecanismoa al final de el ciclo de desarrollo puede causar serios problemas de diseño e incrementará el costo dramáticamente. Este convenio promueve decisiones sobre mecanismos para minimizar estos costos. Similarmente, esperar hasta justo antes de la puesta en producción para hacer actividades de aseguramiento, tales como revisión de código y pruebas de intrusión, tambien incrementaría los costos dramaticamente. Creemos que el mejor costo-beneficio para ganar certeza es poner un nivel constante de esfuerzo en el aseguramiento a través del ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
=== PERO EL NIVEL DE RIGOR ESTA INCORRECTO…. ===&lt;br /&gt;
&lt;br /&gt;
Este convenio asume que el software que esta siendo desarrollado es razonablemente importante para una empresa grande o agencia de gobierno. Hemos seleccionado un &amp;quot;nivel de rigor&amp;quot; para el convenio que es alcanzable por la mayoria de las organizaciones proveedoras de software, e identificaría y manejaría los riesgos más comunes. &lt;br /&gt;
&lt;br /&gt;
Sin embargo, para el software que va a ser usado en aplicaciones críticas, como aplicaciones médicas, financieras o relacionadas con el ejército. Puede querer incrementar el nivel de rigor. Puede querer agregar revisiones, documentación y actividades adicionales de prueba. Puede querer mejorar el proceso de encontrar, diagnosticar y remediar vulnerabilidades. Para aplicaciones menos sensibles, puede desear reducir o remover actividades.&lt;br /&gt;
&lt;br /&gt;
=== PERO NOSOTROS NO PODEMOS ACEPTAR TANTO RIESGO… ===&lt;br /&gt;
&lt;br /&gt;
Este convenio pretende facilitar la discusión sobre quién tomaría el riesgo por las vulnerabilidades de seguridad en el software. Por un lado del espectro, el cliente podría tomar todo el riesgo y el proveedor podría entregar código con muchas vulnerabilidades. Por el otro extremo, el proveedor podría tomar todo el riesgo y asumir la responsabilidad de entregar código perfecto. Ambos extremos son irrealizables. &lt;br /&gt;
&lt;br /&gt;
Actualmente, en este convenio, el proveedor toma el riesgo por problemas que sean descubiertos en los requerimientos o deben ser cubiertos por esfuerzos razonables en pruebas. Pero la remediación de &amp;quot;nuevos&amp;quot; problemas de seguridad tendría que ser pagado por el cliente. Creemos que este es un equilibrio funcional, ya que limita el riesgo adquirido por el proveedor y promueve obtener requerimientos de seguridad por anticipado. Pero hay muchas otras posibles soluciones a este problema. Por favor, dejenos saber si tiene sugerencias alternas, podriamos incluirlas en versiones futuras de este documento. &lt;br /&gt;
&lt;br /&gt;
Note que la discusión aqui solo cubre el riesgo asociado con arreglar las vulnerabilidades de seguridad en el código, y no incluye los costos asociados con recuperarse de incidentes de seguridad relacionados con explotar cualquiera de esas vulnerabilidades. Estamos interesados en las mejores prácticas en esta area.&lt;br /&gt;
&lt;br /&gt;
=== PERO COMO PODEMOS ASEGURAR CÓDIGO DE TERCEROS… ===&lt;br /&gt;
&lt;br /&gt;
Casi todos los proyectos de sofware tienen una cantidad importante de código de terceros como librerias, frameworks y productos. Desde la perspectiva de seguridad, este código es tan importante como el código desarrollado a la medida para su proyecto. Creemos que la responsabilidad de garantizar la seguridad de este código es llevada mejor por el proveedor, aunque ellos podrían no tener toda la capacidad para garantizar la seguridad por ellos mismos. Sin embargo, la seguridad puede ser parte de el la desición de &amp;quot;construir o comprar&amp;quot;, y esta parece ser la mejor manera de promoverla. &lt;br /&gt;
&lt;br /&gt;
El proveedor, por supuesto, tiene la opción de pasar la responsabilidad al proveedor del software de terceros. El desarrollador puede también analizar el código de terceros por él mismo o contratar expertos en seguridad para analizarlo por él.&lt;br /&gt;
&lt;br /&gt;
===PERO PORQUE DEBO PASAR POR TODO ESTE PROBLEMA…===&lt;br /&gt;
&lt;br /&gt;
En última instancia, creemos que no hay alternativa para hacer de la seguridad una parte de el proceso de contratación de software. Actualmente, creemos que hay serios malentendidos sobre la seguridad del código que esta siendo desarrollado bajo muchos contratos de desarrollo de software. Esto puede solamente llevar a una cara litigación y a desiciones hechas por individuos con poca experiencia y entendimiento sobre software. Lea el [[Secure software contracting hypothetical case study | Caso de estudio hipotético sobre contratación de software seguro]] para una discusión completa de este problema.&lt;br /&gt;
&lt;br /&gt;
Hay muchos beneficios al trabajar con este convenio. El principal es que pondrá claras las expectativas entre las partes involucradas. En algunos casos ayudará a evitar demandas cuando problemas de seguridad difíciles aparecen en el software. Tambien, estan son las mismas actividades requeridas por muchas razónes legales y de conformidad con estándares/leyes.&lt;br /&gt;
&lt;br /&gt;
===PERO ES MUY DIFÍCIL PRODUCIR TODA ESTA DOCUMENTACIÓN…===&lt;br /&gt;
&lt;br /&gt;
OWASP no promueve la documentacion por la simpre documentacion. Este convenio esta enfocado en promover la calidad, no la cantidad. Creemos que puede ser posible (en algunos proyectos) cumplir con este contrato con una pequeña evaluacion de riesgo, algunas páginas de requerimientos, un pequeño documento de diseño de seguridad, un plan de pruebas, y algunos resultados de pruebas.&lt;br /&gt;
&lt;br /&gt;
El objetivo de esta documentación es simplemente asegurar, en cada etapa del desarrollo de software, que se ha puesto la atención apropiada en la seguridad. Un beneficio adiciona es que esta documentacion puede ser recolectada en conjunto para formar un &amp;quot;paquete de certificación&amp;quot; que básicamente esbose el argumento de porque deberiamos confiar que el software hará lo que dice.&lt;br /&gt;
&lt;br /&gt;
==ANEXO DE CONTRATO==&lt;br /&gt;
&lt;br /&gt;
===1. INTRODUCCIÓN===&lt;br /&gt;
&lt;br /&gt;
Esta anexo esta hecho para _____________________ (&amp;quot;convenio&amp;quot;) entre el Cliente y el proveedor. Tanto el Cliente como el proveedor acuerdan maximisar la seguridad del software de acuerdo a los siguientes términos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2. FILOSOFÍA===&lt;br /&gt;
&lt;br /&gt;
Esta anexo pretende aclarar los derechos y obligaciones relacionados a seguridad de todas las partes en una relacion de desarrollo de software. Al mayor nivel, las partes acuerdan que:&lt;br /&gt;
&lt;br /&gt;
;(a) Las desiciones de seguridad estarán basadas en el riesgo : Las desciciones sobre la seguridad seran tomadas en conunto por el cliente y el proveedor basandose en un firme entendimiento de el riesgo involucrado. &lt;br /&gt;
&lt;br /&gt;
;(b) Las actividades de seguridad estarán balanceadas : El esfurzo de seguridad será distribuido equitativamente a través de todo el ciclo de desarollo de software.&lt;br /&gt;
&lt;br /&gt;
;(c) Las actividades de seguridad estarán integradas : Todas las actividades y documentación discutidas aqui pueden y deben ser integradas dentro del ciclo de desarrollo de software del proveedor y no mantenerse separadas de el resto del proyecto. Nada en este anexo implica algún processo de desarrollo de software en particular.&lt;br /&gt;
&lt;br /&gt;
;(d) Se esperan vulnerabilidades :  Todo software contiene defectos, y algunos de estos crearan problemas de seguridad. Ambos, cliente y proveedor se esforzará para identificar las vulnerabilidades tan pronto como sea posible en el ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
;(e) La información sobre seguridad será comunicada por completo : Toda la información relevante para la seguridad se compartirá entre el cliente y el proveedor inmediatamente y completamente.&lt;br /&gt;
&lt;br /&gt;
;(f) Se requerirá solo documentacion de seguridad necesaria : La documentación de seguridad no necesita ser demasiado amplia para describir claramente el diseño de seguridad, análisis de riesgo y problemas.&lt;br /&gt;
&lt;br /&gt;
===3. ACTIVIDADES EN EL CICLO DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Entendimiento del Riesgo : El proveedor y el cliente acuerdan trabajar juntos para entender y documentar los riesgos que enfrenta la aplicacion. Este esfuerzo debe identificar los riesgos clave para los activos y funciones importantes que provee la aplicación. Cada uno de los temas listados en la sección de requerimientos debe ser considerado.&lt;br /&gt;
&lt;br /&gt;
;(b) Requerimientos : Basado en los riesgos, El proveedor y cliente acuerda trabajar juntos para crear requerimientos de seguridad detallados como parte de la especificacion de el software a ser desarrollado. Cada uno de los temas listados en la sección de requerimientos de este anexo deben ser discutidos y evaluados por ambos, cliente y proveedor.  Estos requerimientos pueden ser satisfechos por software creado a la medida, software de terceros, o la plataforma. &lt;br /&gt;
&lt;br /&gt;
;(c) Diseño : el desarollador acuerda proveer documentation que explique claramente el diseño para adquirir cada uno de los requerimientos de seguridad. En muchos de los casos, esta documentacion describirá los mecanismos de seguridad, donde se incluiran dentro de la arquitectura, y todos los patrones de diseño relevantes para asegurar su uso adecuado. El diseño debe especificar claramente si tales mecanismos vienen de software a la medida, software de terceros o de la plataforma.&lt;br /&gt;
&lt;br /&gt;
;(d) Implementación : El proveedor acuerda entregar y seguir un conjunto de lineamientos de codificación segura. Estos lineamientos indicarán como sele de debe dar formato, estructurar y comentar el código fuente. Todo código relacionado a seguridad debe ser comentado profundamente. Guías sobre como evitar vulnerabilidades se seguridad comunes debe ser incluida. Tambien, todo el código debe ser revisado por al menos otro desarollador basandose en los requerimientos de seguridad y los lineamientos de codificación antes de ser conciderado listo para pruebas unitarias.&lt;br /&gt;
&lt;br /&gt;
;(e) Pruebas y análisis de seguridad : El proveedor acuerda entregar y seguir un plan de pruebas de seguridad que defina como se realizarán las pruebas o bien establecer como cada uno de los requerimientos de seguridad va a ser complido. El nivel de rigor de esta actividad debe ser considerado y detallado en un plan. El proveedor ejecutará el plan de prueba y proveera los resultados a el cliente.&lt;br /&gt;
&lt;br /&gt;
;(f) Publicación segura : El proveedor acuerda entregar lineamientos de configuración segura que describan completamente todas las opciones de configuracion relacionadas con seguridad y sus implicaciones para la seguridad del software en su conjunto. Los lineamientos deben incluir una descripción completa de las dependencias en la plataforma y como deben ser configuradas de manera segura, incluidas las del sistema operativo, servidor Web y servidor de aplicacion. La configuracion predeterminada del software debe ser segura.&lt;br /&gt;
&lt;br /&gt;
===4. ÁREAS CON REQUERIMIENTOS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
Los siguientes temas/áreas deben ser considerados durante las actividades de entendimiento de riesgo y definición de requerimientos. Este esfuerzo debe producir un conjunto de requerimientos ajustados, especificos y probables. Ambos, proveedor y cliente deben ser involucrados en este proceso y deben ponerse de acuerdo sobre el conjunto final de requerimientos.&lt;br /&gt;
&lt;br /&gt;
;(a) Validación de entradas y condificación : Los requerimientos deben especificar las reglas para canonicalización, validación y codificación de cada dato de entrada a la aplicación, ya sea de usuarios, sistemas de archivos, bases de datos o sistemas externos. La regla predeterminada debe ser que todas las entradas sean validadas a menos que cumplan con una especificacion detallada de que esta permitido. Además, los requerimientos deben especificar las acciones a tomar cuando se reciven entradas no válidas. Especificamente, la aplicación no debe ser susceptible a inyecciones, desbordamientos, manipulación y otros ataques con entradas de usuario corruptas.&lt;br /&gt;
&lt;br /&gt;
;(b) Autentificación y manejo de sessiones : Los requerimientos deben especificar como se protegeran las credenciales para autentificación y los identificadores de sesión a través del ciclo de desarrollo de software. Los requerimientos para todas las funciones relacionadas deben ser agregadas incluyendo recuperar contraseñas, cambio de contraseñas, recordar contraseñas, desconexión y conexión multiple.&lt;br /&gt;
&lt;br /&gt;
;(c) Control de Acceso : Los requerimientos deben incluir una descripcion detallada de todos los roles (grupos, privilegios, autorizaciones) usadas en la aplicación. Los requerimientos deben indicar todos los activos y funciones que provee la aplicacion. Los requerimientos deben especificar detallada y exactamente los derechos de acceso para cualquier activo y función de cada rol. Se sugiere utilizar un formato de matriz de control de acceso para documentar estas reglas.&lt;br /&gt;
&lt;br /&gt;
;(d) Manejo de Errores : Los requerimientos deben detallar como se van a manejar los errores que ocurran dentro del procesamiento. Algunas aplicaciones deberían hacer lo mejor posible en caso de un error, mientras que otras deberían terminar su procesamiento inmediatamente.&lt;br /&gt;
&lt;br /&gt;
;(e) Historial : Los requerimientos deben especificar que eventos son relevantes para la seguridad y necesitan ser registrados, como ataques detectados, intentos de conexión fallidos e intentos de exeder la autorización.  Los requerimientos deben especificar tambien que information registrar con cada evento, incluyendo hora y fecha, descripción del evento, detalles de aplicación, y otra información útil en esfuerzos forences.&lt;br /&gt;
&lt;br /&gt;
;(f) Conexiones a sistemas externos : Los requerimientos deben especifica como la autentificación y cifrado será manejado para todos los systemas externos, tales como bases de datos, directorios y servicios Web. Todas las credenciales requeridas para la comunicación con sistemas externos deben almacenarce cifradas y fuera de el código dentro de archivos de configuración. &lt;br /&gt;
&lt;br /&gt;
;(g) Cifrado : Los requerimientos deben especificar que datos deben ser cifrados, como serán cifrados y como todos los certificados y otras credenciales deben ser manejadas. Las aplicaciones deben usar algoritmos estándar implementados en una librerias de cifrado que hayan sido usadas y probadas ampliamente.&lt;br /&gt;
&lt;br /&gt;
;(h) Disponibilidad : Los requerimientos deben especificar como protegerse de ataques de negación de servicio. Todos los posibles ataques en la aplicacion deben ser considerados, incluyendo bloqueos de auntentificación, agotamiento de conexiones y otros ataques de agotamiento de recursos.&lt;br /&gt;
&lt;br /&gt;
;(i) Configuración segura : Los requerimientos deben especificar que los valores predeterminados para todas las configuraciones relacionadas a seguridad deben ser seguras. Para propósitos de auditoría, el software deberia ser capás de producir un reporte sencillo de leer que muestre los detalles de todas las configuraciones relacionadas con seguridad.&lt;br /&gt;
&lt;br /&gt;
;(j) Vulnerabilidades especificas : Los requerimientos deben incluir un conjunto de vulnerabilidades especificas que no deben estar presentes en el software. A menos que sea especificado de otra manera, el software no debe incluir ninguna de las fallas descritas en el la &amp;quot;Lista de OWASP sobre las 10 vulnerabilidades mas críticas en aplicaciones Web&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===5. PERSONAL Y ORGANIZACIÓN===&lt;br /&gt;
&lt;br /&gt;
;(a) Arquitecto en seguridad : El desarollador asignará la responsabilidad por la seguridad a un solo recurso técnico experimentado, para ser conocido como el arquitecto de seguridad del proyecto. El arquitecto de seguridad certificará la seguridad de cada entregable.&lt;br /&gt;
&lt;br /&gt;
;(b) Entrenamiento en Seguridad : el proveedor será responsable de verificar que todos los miembros del equipo de desarrollo han sido entrenados en tecnicas de programación segura.&lt;br /&gt;
&lt;br /&gt;
;(c) Desarrolladores dignos de confianza : El proveedor acuerda realizar las investigaciones de antecendentes apropiadas a todos los miembros del equipo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===6. AMBIENTE DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Codificación segura : El proveedor debe mencionar que herramientas se usarán en el ambiente de desarrollo de software para promover la codificación segura.&lt;br /&gt;
&lt;br /&gt;
;(b) Adminstración de configuración : El proveedor debe usar un sistema de control de versiones que autentifique y registre el miembro del equipo asociado con todos los cambios en el código base, todos los archivos de configuración y compilación.&lt;br /&gt;
&lt;br /&gt;
;(c) Distribución : El proveedor debe usar un proceso de compilación que construya confiablemente un archivo de distribución completo desde el código fuente. Este proceso debe incluir un método para verificar la integridad de el software entregado al cliente.&lt;br /&gt;
&lt;br /&gt;
===7. LIBRERIAS, MARCOS DE DESARROLLO Y PRODUCTOS===&lt;br /&gt;
&lt;br /&gt;
;(a) Apertura : El proveedor debe mencionar todas los aplicaciones de terceros usadas en el software, incluyendo todas las librerias, marcos de desarrollo, componentes y otros productos, ya sean comerciales, gratuitos, de código abierto o código cerrado.&lt;br /&gt;
&lt;br /&gt;
;(b) Evaluación : El proveedor debe hacer esfuerzos rasonables para asegurar que el sofware de terceros cumple con todos los términos de este contrato y es tan seguro como el código a la medida desarrollado bajo este contrato.&lt;br /&gt;
&lt;br /&gt;
===8. REVISIONES DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Derecho de revisión : El cliente tiene el derecho mandar revisar el software para buscar fallas de seguridad, esto a sus expesas y en cualquier momento dentro de los 60 dias despues de la entrega. El desarrollador acepta proveer apoyo rasonable al equipo de revisión proveyendo el codigo fuente y acceso a los ambientes de pruebas.&lt;br /&gt;
&lt;br /&gt;
;(b) Covertura de la revisión : Las revisiones de seguridad deben cubrir todos los aspectos de el software entregado, incluyendo código a la medida, componentes, productos y configuración de sistema.&lt;br /&gt;
&lt;br /&gt;
;(c) Alcance de la revisión : Al menos, la revisión debe cubrir todos los requerimientos de seguridad y debería buscar otras vulnerabilidades comunes. La revisión puede incluir una combinación de busqueda automatizada de vulnerabilidades, pruebas de intrusión, análisis estático de código fuente y revisión de código por expertos.&lt;br /&gt;
&lt;br /&gt;
;(d) Problemas encontrados : Los problemas de seguridad descubiertos serán reportados a el cliente y proveedor por igual. A todos los problemas se les dará seguimiento y serán reparados como se especifique en la sección de seguimiento de problemas de seguridad de este anexo.&lt;br /&gt;
&lt;br /&gt;
===9. ADMINISTRACIÓN DE PROBLEMAS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Identificación : El proveedor dara seguimiento a todos los problemas de seguridad descubiertos en todo el ciclo de desarrollo, ya sea un problema en los requerimientos, diseño, implementación, pruebas, publicación u operación. El riesgo asociado con cada problema de seguridad será evaluado, documentado y reportado a el cliente tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
;(b) Protección : El proveedor protegerá apropiadamente la información relacionada a problemas de seguridad y la documentación relacionada a ellos, esto, para ayudar a disminuir la probabilidad de las vulnerabilidades en el software operacioneal del cliente sean expuestas.&lt;br /&gt;
&lt;br /&gt;
;(c) Reparación : Los problemas de seguridad que sean indentificados antes de la entrega deben ser reparados por el proveedor. Los problemas de seguridad descubiertos despues de la entrega deben ser manejados en la misma manera que otros problemas funcionales según lo especificado en este contrato.&lt;br /&gt;
&lt;br /&gt;
===10. CERTEZA===&lt;br /&gt;
&lt;br /&gt;
;(a) Certeza : El proveedor proveera un &amp;quot;paquete de certificación&amp;quot; consistente en la documentación de seguridad creada a traves del proceso de desarrollo. El paquete deberá establecer que los requerimientos de seguridad, diseño, implementación y resultados de pruebas fueron completados apropiadamente y todos los problemas de seguridad fueron resueltos apropiadamente.&lt;br /&gt;
&lt;br /&gt;
;(b) Auto-Certificación : El aquitecto de seguridad certificará que el software cumple con los requerimientos de seguridad, que todas las actividades de seguridad se realizaron, y que todos los problemas de seguridad identificados han sido documentados y resueltos. Cualquier excepción a el estado de la certificacion debe estar totalmente documentada al momento de la entrega.&lt;br /&gt;
&lt;br /&gt;
;(c) No código malicioso : El proveedor garantize que el sofware no debe contener ningun código que no se alinee a algun requerimiento del software y debilite la seguridad de la aplicación, incluyendo viruses, gusanos, bombas de tiempo, puertas traseras, caballos de troya, huevos de pascua y cualquier otra forma de código malicioso.&lt;br /&gt;
&lt;br /&gt;
===11. CONCENTIMIENTO Y MANTENIMIENTO DE LA SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Consentimiento : El software no debe ser considerado como aceptado hasta que el paquete de certificación este completo y todos los problemas de seguridad han sido resueltos.&lt;br /&gt;
&lt;br /&gt;
;(b) Investigación de problemas de seguridad : Despues del concentimiento, si se sospecha (razonablemente) o descubren problemas de seguridad, el proveedor deberá asisitir al cliente en realizar una investigación para determinar la naturaleza del problema. El problema debe ser considerado &amp;quot;nuevo&amp;quot; si no es cubierto por los requerientos de seguridad y esta fuera de el alcance (razonable) de las pruebas de seguridad.&lt;br /&gt;
&lt;br /&gt;
;(c) Problemas de seguridad nuevos : El proveedor y el cliente consientes en medir el alcance y esfuerzo requerido para resolver problemas de seguridad nuevos, y negociad de buena fe para alcanzar un acuerdo y realizar el trabajor requerido para solucionarlos.&lt;br /&gt;
&lt;br /&gt;
;(d) Otros problemas de seguridad : El proveedor debe usar todos los esfuersos comercialmente rasonables consistentes con practicas de desarrollo comunes en la industria, tomando en cuenta la severidad de el riesgo, para resolver todos los problemas de seguridad considerados nuevos tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Legal Project]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79724</id>
		<title>Anexo para Contrato de Software Seguro de OWASP</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79724"/>
				<updated>2010-03-12T13:46:05Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''ANEXO DE CONTRATO PARA DESAROLLO DE SOFTWARE SEGURO'''&lt;br /&gt;
&lt;br /&gt;
  ADVERTENCIA: ESTE DOCUMENTO DEBE SER CONSIDERADO COMO UNA GUÍA SOLAMENTE.&lt;br /&gt;
  OWASP RECOMIENDA VEHEMENTEMENTE QUE CONSULTE UN ABOGADO CALIFICADO&lt;br /&gt;
  PARA AYUDARLE A NEGOCIAR UN CONTRATO DE SOFTWARE&lt;br /&gt;
  &lt;br /&gt;
== Introducción  ==&lt;br /&gt;
&lt;br /&gt;
Este anexo de contrato pretende ayudar a los proveedores de software y sus clientes a negociar y capturar importantes términos y condiciones contractuales relacionadas a la seguridad en el Software a ser desarrollado o entregado. La razon para este proyecto es que la mayoría de los contratos no mencionan estos temas, y las partes frecuentamente tienen puntos de vista dramaticamente diferentes a lo que en ralidad fue acordado. Creemos que articular claramente estos términos es la mejor manera de asegurarse que ambas partes pueden hacer desiciones informadas sobre como proceder. &lt;br /&gt;
&lt;br /&gt;
 &amp;quot;La seguridad del software comercial mejorará cuando el mercado demande mejor seguridad.&lt;br /&gt;
 Al menos, cada petición para propuestas de software debería pedir a los vendedores &lt;br /&gt;
 detallar como van ellos a probar sus productos para encotrar vulnerabilidades de&lt;br /&gt;
 seguridad. Este paso empezará convenciendo a los vendedores de software empaquetado&lt;br /&gt;
 y proveedores externos que las compañias valoran la seguridad.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- John Pescatore, Director de investiagacion con Gartner&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 Pedimos a los clientes y proveedores que usen este documento como un marco para discutir&lt;br /&gt;
 espectativas y negociar responsabilidades. Este anexo se creó para ser añadido a un&lt;br /&gt;
 contrato de desarrollo de software. Estos términos son negociables, significa que ellos&lt;br /&gt;
 pueden y deben ser discutidos por el cliente y el proveedor.&lt;br /&gt;
&lt;br /&gt;
== SOBRE EL PROYECTO ==&lt;br /&gt;
&lt;br /&gt;
Este documento fue creado por la fundación OWASP (Open Web Application Security Project por sus siglas en Inglés), una organización sin animo de lucro con el objetivo de crear herramientas y documentación, gratuita y abierta para asegurar software. Para facilitar su uso en contratación privada, este documento es de dominio publico. Puede encontrar detalles adicionales sobre este proyecto en http://www.owasp.com/index.php/OWASP_Legal_Project. Son Bienvenidos comentarios de ambos, productores y consumidores de software, asi como de la comunidad legal. &lt;br /&gt;
&lt;br /&gt;
OWASP reconoce gratamente la contribución especial de [http://www.aspectsecurity.com Aspect Security] por su rol en la investigación y preparación de este documento.&lt;br /&gt;
&lt;br /&gt;
==OBJECIONES==&lt;br /&gt;
&lt;br /&gt;
Las siguientes páginas cubren algunas objeciones que escuchamos frecuentemente sobre usar este lenguaje en contratos de desarrollo de software:&lt;br /&gt;
&lt;br /&gt;
=== PERO NO TODOS LOS TÉRMINOS SON CORRECTOS PARA NOSOTROS… ===&lt;br /&gt;
&lt;br /&gt;
Este documento debe ser considerado un punto de inicio para su contrato. Puede que no le gusten todas las actividades, o puede querer proponer mas. Puede querer asignar responsabilidades de manera diferente. Este documento no pretende capturar exactamente las necesidades de todos los clientes y proveedores de software. Pretende proveer un marco para discutir temas clave, importantes para asegurarse que el software se cree de forma segura. Despues de que tengan una discusión sobre seguridad y alcancen un acuerdo. Puede ajustar el convenio para que concuerde con el contrato.&lt;br /&gt;
&lt;br /&gt;
=== PERO, ¿QUIEN DEBE PAGAR POR ESTAS ACTIVIDADES?… ===&lt;br /&gt;
&lt;br /&gt;
Este contrato no es sobre poner mas peso al desarollo de software. La pregunta no es sobre si hay costos asociados con seguridad (por supuesto que hay). La pregunta correcta es qué actividades deberían hacerse por ambas partes para minimizar costos, y cuando deberían ocurrir. &lt;br /&gt;
&lt;br /&gt;
Este anexo no menciona (intensionalmente) sobre el detalle de quién debería pagar por la actividades descritas. Mientras muchas de estas actividades deben estar pasando ya, y son esperadas por muchos clientes, ellas no estan practicadas regularmente en la industria del software. La cuestion de quién paga (y cuándo) debe ser parte de la negociación. &lt;br /&gt;
&lt;br /&gt;
Calcular el costo de la seguridad es muy difícil. Auque hay costos asociados con realizar actividades de seguridad, hay también costos importantes asociados con ignorar estas actividades. Estamos convencidos el mejor costo-beneficio para desarrollar software es reducir la probabilidad de que fallas de seguridad sean introducidas y minimzar el tiempo entre introducir una falla y arreglarla. &lt;br /&gt;
&lt;br /&gt;
Una distición importante a hacer cuando calculamos costos es entre construir mecanismos de seguridad y las actividades para asegurarse que esos mecanismos sean correctos y efectivos. Intentar agregar mecanismoa al final de el ciclo de desarrollo puede causar serios problemas de diseño e incrementará el costo dramáticamente. Este convenio promueve decisiones sobre mecanismos para minimizar estos costos. Similarmente, esperar hasta justo antes de la puesta en producción para hacer actividades de aseguramiento, tales como revisión de código y pruebas de intrusión, tambien incrementaría los costos dramaticamente. Creemos que el mejor costo-beneficio para ganar certeza es poner un nivel constante de esfuerzo en el aseguramiento a través del ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
=== PERO EL NIVEL DE RIGOR ESTA INCORRECTO…. ===&lt;br /&gt;
&lt;br /&gt;
Este convenio asume que el software que esta siendo desarrollado es razonablemente importante para una empresa grande o agencia de gobierno. Hemos seleccionado un &amp;quot;nivel de rigor&amp;quot; para el convenio que es alcanzable por la mayoria de las organizaciones proveedoras de software, e identificaría y manejaría los riesgos más comunes. &lt;br /&gt;
&lt;br /&gt;
Sin embargo, para el software que va a ser usado en aplicaciones críticas, como aplicaciones médicas, financieras o relacionadas con el ejército. Puede querer incrementar el nivel de rigor. Puede querer agregar revisiones, documentación y actividades adicionales de prueba. Puede querer mejorar el proceso de encontrar, diagnosticar y remediar vulnerabilidades. Para aplicaciones menos sensibles, puede desear reducir o remover actividades.&lt;br /&gt;
&lt;br /&gt;
=== PERO NOSOTROS NO PODEMOS ACEPTAR TANTO RIESGO… ===&lt;br /&gt;
&lt;br /&gt;
Este convenio pretende facilitar la discusión sobre quién tomaría el riesgo por las vulnerabilidades de seguridad en el software. Por un lado del espectro, el cliente podría tomar todo el riesgo y el proveedor podría entregar código con muchas vulnerabilidades. Por el otro extremo, el proveedor podría tomar todo el riesgo y asumir la responsabilidad de entregar código perfecto. Ambos extremos son irrealizables. &lt;br /&gt;
&lt;br /&gt;
Actualmente, en este convenio, el proveedor toma el riesgo por problemas que sean descubiertos en los requerimientos o deben ser cubiertos por esfuerzos razonables en pruebas. Pero la remediación de &amp;quot;nuevos&amp;quot; problemas de seguridad tendría que ser pagado por el cliente. Creemos que este es un equilibrio funcional, ya que limita el riesgo adquirido por el proveedor y promueve obtener requerimientos de seguridad por anticipado. Pero hay muchas otras posibles soluciones a este problema. Por favor, dejenos saber si tiene sugerencias alternas, podriamos incluirlas en versiones futuras de este documento. &lt;br /&gt;
&lt;br /&gt;
Note que la discusión aqui solo cubre el riesgo asociado con arreglar las vulnerabilidades de seguridad en el código, y no incluye los costos asociados con recuperarse de incidentes de seguridad relacionados con explotar cualquiera de esas vulnerabilidades. Estamos interesados en las mejores prácticas en esta area.&lt;br /&gt;
&lt;br /&gt;
===PERO COMO PODEMOS ASEGURAR CÓDIGO DE TERCEROS…===&lt;br /&gt;
&lt;br /&gt;
Casi todos los proyectos de sofware tienen una cantidad importante de código de terceros como librarieas, frameworks y productos. Desde la perspectiva de seguridad, este código es tan importante como el código desarrollado a la medida para su proyecto.&lt;br /&gt;
Creemos  que la responsabilidad de asegurar la seguridad de este código es llevada mejor por el proveedor, aunque ellos podrían no tener toda la capacidad para garantizar la seguridad por ellos mismos. Sin embargo, La seguridad puede ser parte de el la desición de &amp;quot;construir o comprar&amp;quot;, y esta parece ser la mejor manera de promoverla.&lt;br /&gt;
&lt;br /&gt;
El proveedor, por supuesto, tiene la opción de pasar la responsabilidad a el proveedor del software de terceros. El desarrolador puede tambien analizar el código de terceros por él mismo o contratar expertos en seguridad para analizarlo por él.&lt;br /&gt;
&lt;br /&gt;
===PERO PORQUE DEBO PASAR POR TODO ESTE PROBLEMA…===&lt;br /&gt;
&lt;br /&gt;
En última instancia, creemos que no hay alternativa para hacer de la seguridad una parte de el proceso de contratación de software. Actualmente, creemos que hay serios malentendidos sobre la seguridad del código que esta siendo desarrollado bajo muchos contratos de desarrollo de software. Esto puede solamente llevar a una cara litigación y a desiciones hechas por individuos con poca experiencia y entendimiento sobre software. Lea el [[Secure software contracting hypothetical case study | Caso de estudio hipotético sobre contratación de software seguro]] para una discusión completa de este problema.&lt;br /&gt;
&lt;br /&gt;
Hay muchos beneficios al trabajar con este convenio. El principal es que pondrá claras las expectativas entre las partes involucradas. En algunos casos ayudará a evitar demandas cuando problemas de seguridad difíciles aparecen en el software. Tambien, estan son las mismas actividades requeridas por muchas razónes legales y de conformidad con estándares/leyes.&lt;br /&gt;
&lt;br /&gt;
===PERO ES MUY DIFÍCIL PRODUCIR TODA ESTA DOCUMENTACIÓN…===&lt;br /&gt;
&lt;br /&gt;
OWASP no promueve la documentacion por la simpre documentacion. Este convenio esta enfocado en promover la calidad, no la cantidad. Creemos que puede ser posible (en algunos proyectos) cumplir con este contrato con una pequeña evaluacion de riesgo, algunas páginas de requerimientos, un pequeño documento de diseño de seguridad, un plan de pruebas, y algunos resultados de pruebas.&lt;br /&gt;
&lt;br /&gt;
El objetivo de esta documentación es simplemente asegurar, en cada etapa del desarrollo de software, que se ha puesto la atención apropiada en la seguridad. Un beneficio adiciona es que esta documentacion puede ser recolectada en conjunto para formar un &amp;quot;paquete de certificación&amp;quot; que básicamente esbose el argumento de porque deberiamos confiar que el software hará lo que dice.&lt;br /&gt;
&lt;br /&gt;
==ANEXO DE CONTRATO==&lt;br /&gt;
&lt;br /&gt;
===1. INTRODUCCIÓN===&lt;br /&gt;
&lt;br /&gt;
Esta anexo esta hecho para _____________________ (&amp;quot;convenio&amp;quot;) entre el Cliente y el proveedor. Tanto el Cliente como el proveedor acuerdan maximisar la seguridad del software de acuerdo a los siguientes términos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2. FILOSOFÍA===&lt;br /&gt;
&lt;br /&gt;
Esta anexo pretende aclarar los derechos y obligaciones relacionados a seguridad de todas las partes en una relacion de desarrollo de software. Al mayor nivel, las partes acuerdan que:&lt;br /&gt;
&lt;br /&gt;
;(a) Las desiciones de seguridad estarán basadas en el riesgo : Las desciciones sobre la seguridad seran tomadas en conunto por el cliente y el proveedor basandose en un firme entendimiento de el riesgo involucrado. &lt;br /&gt;
&lt;br /&gt;
;(b) Las actividades de seguridad estarán balanceadas : El esfurzo de seguridad será distribuido equitativamente a través de todo el ciclo de desarollo de software.&lt;br /&gt;
&lt;br /&gt;
;(c) Las actividades de seguridad estarán integradas : Todas las actividades y documentación discutidas aqui pueden y deben ser integradas dentro del ciclo de desarrollo de software del proveedor y no mantenerse separadas de el resto del proyecto. Nada en este anexo implica algún processo de desarrollo de software en particular.&lt;br /&gt;
&lt;br /&gt;
;(d) Se esperan vulnerabilidades :  Todo software contiene defectos, y algunos de estos crearan problemas de seguridad. Ambos, cliente y proveedor se esforzará para identificar las vulnerabilidades tan pronto como sea posible en el ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
;(e) La información sobre seguridad será comunicada por completo : Toda la información relevante para la seguridad se compartirá entre el cliente y el proveedor inmediatamente y completamente.&lt;br /&gt;
&lt;br /&gt;
;(f) Se requerirá solo documentacion de seguridad necesaria : La documentación de seguridad no necesita ser demasiado amplia para describir claramente el diseño de seguridad, análisis de riesgo y problemas.&lt;br /&gt;
&lt;br /&gt;
===3. ACTIVIDADES EN EL CICLO DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Entendimiento del Riesgo : El proveedor y el cliente acuerdan trabajar juntos para entender y documentar los riesgos que enfrenta la aplicacion. Este esfuerzo debe identificar los riesgos clave para los activos y funciones importantes que provee la aplicación. Cada uno de los temas listados en la sección de requerimientos debe ser considerado.&lt;br /&gt;
&lt;br /&gt;
;(b) Requerimientos : Basado en los riesgos, El proveedor y cliente acuerda trabajar juntos para crear requerimientos de seguridad detallados como parte de la especificacion de el software a ser desarrollado. Cada uno de los temas listados en la sección de requerimientos de este anexo deben ser discutidos y evaluados por ambos, cliente y proveedor.  Estos requerimientos pueden ser satisfechos por software creado a la medida, software de terceros, o la plataforma. &lt;br /&gt;
&lt;br /&gt;
;(c) Diseño : el desarollador acuerda proveer documentation que explique claramente el diseño para adquirir cada uno de los requerimientos de seguridad. En muchos de los casos, esta documentacion describirá los mecanismos de seguridad, donde se incluiran dentro de la arquitectura, y todos los patrones de diseño relevantes para asegurar su uso adecuado. El diseño debe especificar claramente si tales mecanismos vienen de software a la medida, software de terceros o de la plataforma.&lt;br /&gt;
&lt;br /&gt;
;(d) Implementación : El proveedor acuerda entregar y seguir un conjunto de lineamientos de codificación segura. Estos lineamientos indicarán como sele de debe dar formato, estructurar y comentar el código fuente. Todo código relacionado a seguridad debe ser comentado profundamente. Guías sobre como evitar vulnerabilidades se seguridad comunes debe ser incluida. Tambien, todo el código debe ser revisado por al menos otro desarollador basandose en los requerimientos de seguridad y los lineamientos de codificación antes de ser conciderado listo para pruebas unitarias.&lt;br /&gt;
&lt;br /&gt;
;(e) Pruebas y análisis de seguridad : El proveedor acuerda entregar y seguir un plan de pruebas de seguridad que defina como se realizarán las pruebas o bien establecer como cada uno de los requerimientos de seguridad va a ser complido. El nivel de rigor de esta actividad debe ser considerado y detallado en un plan. El proveedor ejecutará el plan de prueba y proveera los resultados a el cliente.&lt;br /&gt;
&lt;br /&gt;
;(f) Publicación segura : El proveedor acuerda entregar lineamientos de configuración segura que describan completamente todas las opciones de configuracion relacionadas con seguridad y sus implicaciones para la seguridad del software en su conjunto. Los lineamientos deben incluir una descripción completa de las dependencias en la plataforma y como deben ser configuradas de manera segura, incluidas las del sistema operativo, servidor Web y servidor de aplicacion. La configuracion predeterminada del software debe ser segura.&lt;br /&gt;
&lt;br /&gt;
===4. ÁREAS CON REQUERIMIENTOS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
Los siguientes temas/áreas deben ser considerados durante las actividades de entendimiento de riesgo y definición de requerimientos. Este esfuerzo debe producir un conjunto de requerimientos ajustados, especificos y probables. Ambos, proveedor y cliente deben ser involucrados en este proceso y deben ponerse de acuerdo sobre el conjunto final de requerimientos.&lt;br /&gt;
&lt;br /&gt;
;(a) Validación de entradas y condificación : Los requerimientos deben especificar las reglas para canonicalización, validación y codificación de cada dato de entrada a la aplicación, ya sea de usuarios, sistemas de archivos, bases de datos o sistemas externos. La regla predeterminada debe ser que todas las entradas sean validadas a menos que cumplan con una especificacion detallada de que esta permitido. Además, los requerimientos deben especificar las acciones a tomar cuando se reciven entradas no válidas. Especificamente, la aplicación no debe ser susceptible a inyecciones, desbordamientos, manipulación y otros ataques con entradas de usuario corruptas.&lt;br /&gt;
&lt;br /&gt;
;(b) Autentificación y manejo de sessiones : Los requerimientos deben especificar como se protegeran las credenciales para autentificación y los identificadores de sesión a través del ciclo de desarrollo de software. Los requerimientos para todas las funciones relacionadas deben ser agregadas incluyendo recuperar contraseñas, cambio de contraseñas, recordar contraseñas, desconexión y conexión multiple.&lt;br /&gt;
&lt;br /&gt;
;(c) Control de Acceso : Los requerimientos deben incluir una descripcion detallada de todos los roles (grupos, privilegios, autorizaciones) usadas en la aplicación. Los requerimientos deben indicar todos los activos y funciones que provee la aplicacion. Los requerimientos deben especificar detallada y exactamente los derechos de acceso para cualquier activo y función de cada rol. Se sugiere utilizar un formato de matriz de control de acceso para documentar estas reglas.&lt;br /&gt;
&lt;br /&gt;
;(d) Manejo de Errores : Los requerimientos deben detallar como se van a manejar los errores que ocurran dentro del procesamiento. Algunas aplicaciones deberían hacer lo mejor posible en caso de un error, mientras que otras deberían terminar su procesamiento inmediatamente.&lt;br /&gt;
&lt;br /&gt;
;(e) Historial : Los requerimientos deben especificar que eventos son relevantes para la seguridad y necesitan ser registrados, como ataques detectados, intentos de conexión fallidos e intentos de exeder la autorización.  Los requerimientos deben especificar tambien que information registrar con cada evento, incluyendo hora y fecha, descripción del evento, detalles de aplicación, y otra información útil en esfuerzos forences.&lt;br /&gt;
&lt;br /&gt;
;(f) Conexiones a sistemas externos : Los requerimientos deben especifica como la autentificación y cifrado será manejado para todos los systemas externos, tales como bases de datos, directorios y servicios Web. Todas las credenciales requeridas para la comunicación con sistemas externos deben almacenarce cifradas y fuera de el código dentro de archivos de configuración. &lt;br /&gt;
&lt;br /&gt;
;(g) Cifrado : Los requerimientos deben especificar que datos deben ser cifrados, como serán cifrados y como todos los certificados y otras credenciales deben ser manejadas. Las aplicaciones deben usar algoritmos estándar implementados en una librerias de cifrado que hayan sido usadas y probadas ampliamente.&lt;br /&gt;
&lt;br /&gt;
;(h) Disponibilidad : Los requerimientos deben especificar como protegerse de ataques de negación de servicio. Todos los posibles ataques en la aplicacion deben ser considerados, incluyendo bloqueos de auntentificación, agotamiento de conexiones y otros ataques de agotamiento de recursos.&lt;br /&gt;
&lt;br /&gt;
;(i) Configuración segura : Los requerimientos deben especificar que los valores predeterminados para todas las configuraciones relacionadas a seguridad deben ser seguras. Para propósitos de auditoría, el software deberia ser capás de producir un reporte sencillo de leer que muestre los detalles de todas las configuraciones relacionadas con seguridad.&lt;br /&gt;
&lt;br /&gt;
;(j) Vulnerabilidades especificas : Los requerimientos deben incluir un conjunto de vulnerabilidades especificas que no deben estar presentes en el software. A menos que sea especificado de otra manera, el software no debe incluir ninguna de las fallas descritas en el la &amp;quot;Lista de OWASP sobre las 10 vulnerabilidades mas críticas en aplicaciones Web&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===5. PERSONAL Y ORGANIZACIÓN===&lt;br /&gt;
&lt;br /&gt;
;(a) Arquitecto en seguridad : El desarollador asignará la responsabilidad por la seguridad a un solo recurso técnico experimentado, para ser conocido como el arquitecto de seguridad del proyecto. El arquitecto de seguridad certificará la seguridad de cada entregable.&lt;br /&gt;
&lt;br /&gt;
;(b) Entrenamiento en Seguridad : el proveedor será responsable de verificar que todos los miembros del equipo de desarrollo han sido entrenados en tecnicas de programación segura.&lt;br /&gt;
&lt;br /&gt;
;(c) Desarrolladores dignos de confianza : El proveedor acuerda realizar las investigaciones de antecendentes apropiadas a todos los miembros del equipo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===6. AMBIENTE DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Codificación segura : El proveedor debe mencionar que herramientas se usarán en el ambiente de desarrollo de software para promover la codificación segura.&lt;br /&gt;
&lt;br /&gt;
;(b) Adminstración de configuración : El proveedor debe usar un sistema de control de versiones que autentifique y registre el miembro del equipo asociado con todos los cambios en el código base, todos los archivos de configuración y compilación.&lt;br /&gt;
&lt;br /&gt;
;(c) Distribución : El proveedor debe usar un proceso de compilación que construya confiablemente un archivo de distribución completo desde el código fuente. Este proceso debe incluir un método para verificar la integridad de el software entregado al cliente.&lt;br /&gt;
&lt;br /&gt;
===7. LIBRERIAS, MARCOS DE DESARROLLO Y PRODUCTOS===&lt;br /&gt;
&lt;br /&gt;
;(a) Apertura : El proveedor debe mencionar todas los aplicaciones de terceros usadas en el software, incluyendo todas las librerias, marcos de desarrollo, componentes y otros productos, ya sean comerciales, gratuitos, de código abierto o código cerrado.&lt;br /&gt;
&lt;br /&gt;
;(b) Evaluación : El proveedor debe hacer esfuerzos rasonables para asegurar que el sofware de terceros cumple con todos los términos de este contrato y es tan seguro como el código a la medida desarrollado bajo este contrato.&lt;br /&gt;
&lt;br /&gt;
===8. REVISIONES DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Derecho de revisión : El cliente tiene el derecho mandar revisar el software para buscar fallas de seguridad, esto a sus expesas y en cualquier momento dentro de los 60 dias despues de la entrega. El desarrollador acepta proveer apoyo rasonable al equipo de revisión proveyendo el codigo fuente y acceso a los ambientes de pruebas.&lt;br /&gt;
&lt;br /&gt;
;(b) Covertura de la revisión : Las revisiones de seguridad deben cubrir todos los aspectos de el software entregado, incluyendo código a la medida, componentes, productos y configuración de sistema.&lt;br /&gt;
&lt;br /&gt;
;(c) Alcance de la revisión : Al menos, la revisión debe cubrir todos los requerimientos de seguridad y debería buscar otras vulnerabilidades comunes. La revisión puede incluir una combinación de busqueda automatizada de vulnerabilidades, pruebas de intrusión, análisis estático de código fuente y revisión de código por expertos.&lt;br /&gt;
&lt;br /&gt;
;(d) Problemas encontrados : Los problemas de seguridad descubiertos serán reportados a el cliente y proveedor por igual. A todos los problemas se les dará seguimiento y serán reparados como se especifique en la sección de seguimiento de problemas de seguridad de este anexo.&lt;br /&gt;
&lt;br /&gt;
===9. ADMINISTRACIÓN DE PROBLEMAS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Identificación : El proveedor dara seguimiento a todos los problemas de seguridad descubiertos en todo el ciclo de desarrollo, ya sea un problema en los requerimientos, diseño, implementación, pruebas, publicación u operación. El riesgo asociado con cada problema de seguridad será evaluado, documentado y reportado a el cliente tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
;(b) Protección : El proveedor protegerá apropiadamente la información relacionada a problemas de seguridad y la documentación relacionada a ellos, esto, para ayudar a disminuir la probabilidad de las vulnerabilidades en el software operacioneal del cliente sean expuestas.&lt;br /&gt;
&lt;br /&gt;
;(c) Reparación : Los problemas de seguridad que sean indentificados antes de la entrega deben ser reparados por el proveedor. Los problemas de seguridad descubiertos despues de la entrega deben ser manejados en la misma manera que otros problemas funcionales según lo especificado en este contrato.&lt;br /&gt;
&lt;br /&gt;
===10. CERTEZA===&lt;br /&gt;
&lt;br /&gt;
;(a) Certeza : El proveedor proveera un &amp;quot;paquete de certificación&amp;quot; consistente en la documentación de seguridad creada a traves del proceso de desarrollo. El paquete deberá establecer que los requerimientos de seguridad, diseño, implementación y resultados de pruebas fueron completados apropiadamente y todos los problemas de seguridad fueron resueltos apropiadamente.&lt;br /&gt;
&lt;br /&gt;
;(b) Auto-Certificación : El aquitecto de seguridad certificará que el software cumple con los requerimientos de seguridad, que todas las actividades de seguridad se realizaron, y que todos los problemas de seguridad identificados han sido documentados y resueltos. Cualquier excepción a el estado de la certificacion debe estar totalmente documentada al momento de la entrega.&lt;br /&gt;
&lt;br /&gt;
;(c) No código malicioso : El proveedor garantize que el sofware no debe contener ningun código que no se alinee a algun requerimiento del software y debilite la seguridad de la aplicación, incluyendo viruses, gusanos, bombas de tiempo, puertas traseras, caballos de troya, huevos de pascua y cualquier otra forma de código malicioso.&lt;br /&gt;
&lt;br /&gt;
===11. CONCENTIMIENTO Y MANTENIMIENTO DE LA SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Consentimiento : El software no debe ser considerado como aceptado hasta que el paquete de certificación este completo y todos los problemas de seguridad han sido resueltos.&lt;br /&gt;
&lt;br /&gt;
;(b) Investigación de problemas de seguridad : Despues del concentimiento, si se sospecha (razonablemente) o descubren problemas de seguridad, el proveedor deberá asisitir al cliente en realizar una investigación para determinar la naturaleza del problema. El problema debe ser considerado &amp;quot;nuevo&amp;quot; si no es cubierto por los requerientos de seguridad y esta fuera de el alcance (razonable) de las pruebas de seguridad.&lt;br /&gt;
&lt;br /&gt;
;(c) Problemas de seguridad nuevos : El proveedor y el cliente consientes en medir el alcance y esfuerzo requerido para resolver problemas de seguridad nuevos, y negociad de buena fe para alcanzar un acuerdo y realizar el trabajor requerido para solucionarlos.&lt;br /&gt;
&lt;br /&gt;
;(d) Otros problemas de seguridad : El proveedor debe usar todos los esfuersos comercialmente rasonables consistentes con practicas de desarrollo comunes en la industria, tomando en cuenta la severidad de el riesgo, para resolver todos los problemas de seguridad considerados nuevos tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Legal Project]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79723</id>
		<title>Anexo para Contrato de Software Seguro de OWASP</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79723"/>
				<updated>2010-03-12T13:44:28Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''ANEXO DE CONTRATO PARA DESAROLLO DE SOFTWARE SEGURO'''&lt;br /&gt;
&lt;br /&gt;
  ADVERTENCIA: ESTE DOCUMENTO DEBE SER CONSIDERADO COMO UNA GUÍA SOLAMENTE.&lt;br /&gt;
  OWASP RECOMIENDA VEHEMENTEMENTE QUE CONSULTE UN ABOGADO CALIFICADO&lt;br /&gt;
  PARA AYUDARLE A NEGOCIAR UN CONTRATO DE SOFTWARE&lt;br /&gt;
  &lt;br /&gt;
== Introducción  ==&lt;br /&gt;
&lt;br /&gt;
Este anexo de contrato pretende ayudar a los proveedores de software y sus clientes a negociar y capturar importantes términos y condiciones contractuales relacionadas a la seguridad en el Software a ser desarrollado o entregado. La razon para este proyecto es que la mayoría de los contratos no mencionan estos temas, y las partes frecuentamente tienen puntos de vista dramaticamente diferentes a lo que en ralidad fue acordado. Creemos que articular claramente estos términos es la mejor manera de asegurarse que ambas partes pueden hacer desiciones informadas sobre como proceder. &lt;br /&gt;
&lt;br /&gt;
 &amp;quot;La seguridad del software comercial mejorará cuando el mercado demande mejor seguridad.&lt;br /&gt;
 Al menos, cada petición para propuestas de software debería pedir a los vendedores &lt;br /&gt;
 detallar como van ellos a probar sus productos para encotrar vulnerabilidades de&lt;br /&gt;
 seguridad. Este paso empezará convenciendo a los vendedores de software empaquetado&lt;br /&gt;
 y proveedores externos que las compañias valoran la seguridad.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- John Pescatore, Director de investiagacion con Gartner&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 Pedimos a los clientes y proveedores que usen este documento como un marco para discutir&lt;br /&gt;
 espectativas y negociar responsabilidades. Este anexo se creó para ser añadido a un&lt;br /&gt;
 contrato de desarrollo de software. Estos términos son negociables, significa que ellos&lt;br /&gt;
 pueden y deben ser discutidos por el cliente y el proveedor.&lt;br /&gt;
&lt;br /&gt;
== SOBRE EL PROYECTO ==&lt;br /&gt;
&lt;br /&gt;
Este documento fue creado por la fundación OWASP (Open Web Application Security Project por sus siglas en Inglés), una organización sin animo de lucro con el objetivo de crear herramientas y documentación, gratuita y abierta para asegurar software. Para facilitar su uso en contratación privada, este documento es de dominio publico. Puede encontrar detalles adicionales sobre este proyecto en http://www.owasp.com/index.php/OWASP_Legal_Project. Son Bienvenidos comentarios de ambos, productores y consumidores de software, asi como de la comunidad legal. &lt;br /&gt;
&lt;br /&gt;
OWASP reconoce gratamente la contribución especial de [http://www.aspectsecurity.com Aspect Security] por su rol en la investigación y preparación de este documento.&lt;br /&gt;
&lt;br /&gt;
==OBJECIONES==&lt;br /&gt;
&lt;br /&gt;
Las siguientes páginas cubren algunas objeciones que escuchamos frecuentemente sobre usar este lenguaje en contratos de desarrollo de software:&lt;br /&gt;
&lt;br /&gt;
=== PERO NO TODOS LOS TÉRMINOS SON CORRECTOS PARA NOSOTROS… ===&lt;br /&gt;
&lt;br /&gt;
Este documento debe ser considerado un punto de inicio para su contrato. Puede que no le gusten todas las actividades, o puede querer proponer mas. Puede querer asignar responsabilidades de manera diferente. Este documento no pretende capturar exactamente las necesidades de todos los clientes y proveedores de software. Pretende proveer un marco para discutir temas clave, importantes para asegurarse que el software se cree de forma segura. Despues de que tengan una discusión sobre seguridad y alcancen un acuerdo. Puede ajustar el convenio para que concuerde con el contrato.&lt;br /&gt;
&lt;br /&gt;
=== PERO, ¿QUIEN DEBE PAGAR POR ESTAS ACTIVIDADES?… ===&lt;br /&gt;
&lt;br /&gt;
Este contrato no es sobre poner mas peso al desarollo de software. La pregunta no es sobre si hay costos asociados con seguridad (por supuesto que hay). La pregunta correcta es qué actividades deberían hacerse por ambas partes para minimizar costos, y cuando deberían ocurrir. &lt;br /&gt;
&lt;br /&gt;
Este anexo no menciona (intensionalmente) sobre el detalle de quién debería pagar por la actividades descritas. Mientras muchas de estas actividades deben estar pasando ya, y son esperadas por muchos clientes, ellas no estan practicadas regularmente en la industria del software. La cuestion de quién paga (y cuándo) debe ser parte de la negociación. &lt;br /&gt;
&lt;br /&gt;
Calcular el costo de la seguridad es muy difícil. Auque hay costos asociados con realizar actividades de seguridad, hay también costos importantes asociados con ignorar estas actividades. Estamos convencidos el mejor costo-beneficio para desarrollar software es reducir la probabilidad de que fallas de seguridad sean introducidas y minimzar el tiempo entre introducir una falla y arreglarla. &lt;br /&gt;
&lt;br /&gt;
Una distición importante a hacer cuando calculamos costos es entre construir mecanismos de seguridad y las actividades para asegurarse que esos mecanismos sean correctos y efectivos. Intentar agregar mecanismoa al final de el ciclo de desarrollo puede causar serios problemas de diseño e incrementará el costo dramáticamente. Este convenio promueve decisiones sobre mecanismos para minimizar estos costos. Similarmente, esperar hasta justo antes de la puesta en producción para hacer actividades de aseguramiento, tales como revisión de código y pruebas de intrusión, tambien incrementaría los costos dramaticamente. Creemos que el mejor costo-beneficio para ganar certeza es poner un nivel constante de esfuerzo en el aseguramiento a través del ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
=== PERO EL NIVEL DE RIGOR ESTA INCORRECTO…. ===&lt;br /&gt;
&lt;br /&gt;
Este convenio asume que el software que esta siendo desarrollado es razonablemente importante para una empresa grande o agencia de gobierno. Hemos seleccionado un &amp;quot;nivel de rigor&amp;quot; para el convenio que es alcanzable por la mayoria de las organizaciones proveedoras de software, e identificaría y manejaría los riesgos más comunes. &lt;br /&gt;
&lt;br /&gt;
Sin embargo, para el software que va a ser usado en aplicaciones críticas, como aplicaciones médicas, financieras o relacionadas con el ejército. Puede querer incrementar el nivel de rigor. Puede querer agregar revisiones, documentación y actividades adicionales de prueba. Puede querer mejorar el proceso de encontrar, diagnosticar y remediar vulnerabilidades. Para aplicaciones menos sensibles, puede desear reducir o remover actividades.&lt;br /&gt;
&lt;br /&gt;
===PERO NOSOTROS NO PODEMOS ACEPTAR TANTO RIESGO…===&lt;br /&gt;
Este convenio pretende facilitar la discusión sobre quien tomaría el riesgo por las vulnerabilidades de seguridad en el software. Por un lado del espectro, el cliente podria tomar todo el riesgo y el proveedor podria entregar código con muchas vulnerabilidades. Por el otro extremo, el proveedor podría tomar todo el riesgo y asumir la responsabilidad de entregar código perfecto. Ambos extremos son irrealizables.&lt;br /&gt;
&lt;br /&gt;
Actualmente, en este convenio, el proveedor toma el riesgo por problemas que sean descubiertos en los requerimientos o deben ser cubiertos por esfuerzos razonables en pruebas. Pero la remediación de &amp;quot;nuevos&amp;quot; problemas de seguridad tendría que ser pagado por el cliente.  Creemos que este es un equilibrio funcional, ya que limita el riesgo adquirido por el proveedor y promueve obtener requerimientos de seguridad por anticipado. Pero hay muchas otras posibles soluciones a este problema. Por favor, dejenos saber si tiene sugerencias alternas, podriamos incluirlas en versiones futuras de este documento.&lt;br /&gt;
&lt;br /&gt;
Note que la discusión aqui solo cubre el riesgo asociado con arreglar las vulnerabilidades de seguridad en el código, y no incluye los costos asociados con recuperarse de incidentes de seguridad relacionados con explotar cualquiera de esas vulnerabilidades. Estamos interesados en mejores prácticas en esta area.&lt;br /&gt;
&lt;br /&gt;
===PERO COMO PODEMOS ASEGURAR CÓDIGO DE TERCEROS…===&lt;br /&gt;
&lt;br /&gt;
Casi todos los proyectos de sofware tienen una cantidad importante de código de terceros como librarieas, frameworks y productos. Desde la perspectiva de seguridad, este código es tan importante como el código desarrollado a la medida para su proyecto.&lt;br /&gt;
Creemos  que la responsabilidad de asegurar la seguridad de este código es llevada mejor por el proveedor, aunque ellos podrían no tener toda la capacidad para garantizar la seguridad por ellos mismos. Sin embargo, La seguridad puede ser parte de el la desición de &amp;quot;construir o comprar&amp;quot;, y esta parece ser la mejor manera de promoverla.&lt;br /&gt;
&lt;br /&gt;
El proveedor, por supuesto, tiene la opción de pasar la responsabilidad a el proveedor del software de terceros. El desarrolador puede tambien analizar el código de terceros por él mismo o contratar expertos en seguridad para analizarlo por él.&lt;br /&gt;
&lt;br /&gt;
===PERO PORQUE DEBO PASAR POR TODO ESTE PROBLEMA…===&lt;br /&gt;
&lt;br /&gt;
En última instancia, creemos que no hay alternativa para hacer de la seguridad una parte de el proceso de contratación de software. Actualmente, creemos que hay serios malentendidos sobre la seguridad del código que esta siendo desarrollado bajo muchos contratos de desarrollo de software. Esto puede solamente llevar a una cara litigación y a desiciones hechas por individuos con poca experiencia y entendimiento sobre software. Lea el [[Secure software contracting hypothetical case study | Caso de estudio hipotético sobre contratación de software seguro]] para una discusión completa de este problema.&lt;br /&gt;
&lt;br /&gt;
Hay muchos beneficios al trabajar con este convenio. El principal es que pondrá claras las expectativas entre las partes involucradas. En algunos casos ayudará a evitar demandas cuando problemas de seguridad difíciles aparecen en el software. Tambien, estan son las mismas actividades requeridas por muchas razónes legales y de conformidad con estándares/leyes.&lt;br /&gt;
&lt;br /&gt;
===PERO ES MUY DIFÍCIL PRODUCIR TODA ESTA DOCUMENTACIÓN…===&lt;br /&gt;
&lt;br /&gt;
OWASP no promueve la documentacion por la simpre documentacion. Este convenio esta enfocado en promover la calidad, no la cantidad. Creemos que puede ser posible (en algunos proyectos) cumplir con este contrato con una pequeña evaluacion de riesgo, algunas páginas de requerimientos, un pequeño documento de diseño de seguridad, un plan de pruebas, y algunos resultados de pruebas.&lt;br /&gt;
&lt;br /&gt;
El objetivo de esta documentación es simplemente asegurar, en cada etapa del desarrollo de software, que se ha puesto la atención apropiada en la seguridad. Un beneficio adiciona es que esta documentacion puede ser recolectada en conjunto para formar un &amp;quot;paquete de certificación&amp;quot; que básicamente esbose el argumento de porque deberiamos confiar que el software hará lo que dice.&lt;br /&gt;
&lt;br /&gt;
==ANEXO DE CONTRATO==&lt;br /&gt;
&lt;br /&gt;
===1. INTRODUCCIÓN===&lt;br /&gt;
&lt;br /&gt;
Esta anexo esta hecho para _____________________ (&amp;quot;convenio&amp;quot;) entre el Cliente y el proveedor. Tanto el Cliente como el proveedor acuerdan maximisar la seguridad del software de acuerdo a los siguientes términos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2. FILOSOFÍA===&lt;br /&gt;
&lt;br /&gt;
Esta anexo pretende aclarar los derechos y obligaciones relacionados a seguridad de todas las partes en una relacion de desarrollo de software. Al mayor nivel, las partes acuerdan que:&lt;br /&gt;
&lt;br /&gt;
;(a) Las desiciones de seguridad estarán basadas en el riesgo : Las desciciones sobre la seguridad seran tomadas en conunto por el cliente y el proveedor basandose en un firme entendimiento de el riesgo involucrado. &lt;br /&gt;
&lt;br /&gt;
;(b) Las actividades de seguridad estarán balanceadas : El esfurzo de seguridad será distribuido equitativamente a través de todo el ciclo de desarollo de software.&lt;br /&gt;
&lt;br /&gt;
;(c) Las actividades de seguridad estarán integradas : Todas las actividades y documentación discutidas aqui pueden y deben ser integradas dentro del ciclo de desarrollo de software del proveedor y no mantenerse separadas de el resto del proyecto. Nada en este anexo implica algún processo de desarrollo de software en particular.&lt;br /&gt;
&lt;br /&gt;
;(d) Se esperan vulnerabilidades :  Todo software contiene defectos, y algunos de estos crearan problemas de seguridad. Ambos, cliente y proveedor se esforzará para identificar las vulnerabilidades tan pronto como sea posible en el ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
;(e) La información sobre seguridad será comunicada por completo : Toda la información relevante para la seguridad se compartirá entre el cliente y el proveedor inmediatamente y completamente.&lt;br /&gt;
&lt;br /&gt;
;(f) Se requerirá solo documentacion de seguridad necesaria : La documentación de seguridad no necesita ser demasiado amplia para describir claramente el diseño de seguridad, análisis de riesgo y problemas.&lt;br /&gt;
&lt;br /&gt;
===3. ACTIVIDADES EN EL CICLO DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Entendimiento del Riesgo : El proveedor y el cliente acuerdan trabajar juntos para entender y documentar los riesgos que enfrenta la aplicacion. Este esfuerzo debe identificar los riesgos clave para los activos y funciones importantes que provee la aplicación. Cada uno de los temas listados en la sección de requerimientos debe ser considerado.&lt;br /&gt;
&lt;br /&gt;
;(b) Requerimientos : Basado en los riesgos, El proveedor y cliente acuerda trabajar juntos para crear requerimientos de seguridad detallados como parte de la especificacion de el software a ser desarrollado. Cada uno de los temas listados en la sección de requerimientos de este anexo deben ser discutidos y evaluados por ambos, cliente y proveedor.  Estos requerimientos pueden ser satisfechos por software creado a la medida, software de terceros, o la plataforma. &lt;br /&gt;
&lt;br /&gt;
;(c) Diseño : el desarollador acuerda proveer documentation que explique claramente el diseño para adquirir cada uno de los requerimientos de seguridad. En muchos de los casos, esta documentacion describirá los mecanismos de seguridad, donde se incluiran dentro de la arquitectura, y todos los patrones de diseño relevantes para asegurar su uso adecuado. El diseño debe especificar claramente si tales mecanismos vienen de software a la medida, software de terceros o de la plataforma.&lt;br /&gt;
&lt;br /&gt;
;(d) Implementación : El proveedor acuerda entregar y seguir un conjunto de lineamientos de codificación segura. Estos lineamientos indicarán como sele de debe dar formato, estructurar y comentar el código fuente. Todo código relacionado a seguridad debe ser comentado profundamente. Guías sobre como evitar vulnerabilidades se seguridad comunes debe ser incluida. Tambien, todo el código debe ser revisado por al menos otro desarollador basandose en los requerimientos de seguridad y los lineamientos de codificación antes de ser conciderado listo para pruebas unitarias.&lt;br /&gt;
&lt;br /&gt;
;(e) Pruebas y análisis de seguridad : El proveedor acuerda entregar y seguir un plan de pruebas de seguridad que defina como se realizarán las pruebas o bien establecer como cada uno de los requerimientos de seguridad va a ser complido. El nivel de rigor de esta actividad debe ser considerado y detallado en un plan. El proveedor ejecutará el plan de prueba y proveera los resultados a el cliente.&lt;br /&gt;
&lt;br /&gt;
;(f) Publicación segura : El proveedor acuerda entregar lineamientos de configuración segura que describan completamente todas las opciones de configuracion relacionadas con seguridad y sus implicaciones para la seguridad del software en su conjunto. Los lineamientos deben incluir una descripción completa de las dependencias en la plataforma y como deben ser configuradas de manera segura, incluidas las del sistema operativo, servidor Web y servidor de aplicacion. La configuracion predeterminada del software debe ser segura.&lt;br /&gt;
&lt;br /&gt;
===4. ÁREAS CON REQUERIMIENTOS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
Los siguientes temas/áreas deben ser considerados durante las actividades de entendimiento de riesgo y definición de requerimientos. Este esfuerzo debe producir un conjunto de requerimientos ajustados, especificos y probables. Ambos, proveedor y cliente deben ser involucrados en este proceso y deben ponerse de acuerdo sobre el conjunto final de requerimientos.&lt;br /&gt;
&lt;br /&gt;
;(a) Validación de entradas y condificación : Los requerimientos deben especificar las reglas para canonicalización, validación y codificación de cada dato de entrada a la aplicación, ya sea de usuarios, sistemas de archivos, bases de datos o sistemas externos. La regla predeterminada debe ser que todas las entradas sean validadas a menos que cumplan con una especificacion detallada de que esta permitido. Además, los requerimientos deben especificar las acciones a tomar cuando se reciven entradas no válidas. Especificamente, la aplicación no debe ser susceptible a inyecciones, desbordamientos, manipulación y otros ataques con entradas de usuario corruptas.&lt;br /&gt;
&lt;br /&gt;
;(b) Autentificación y manejo de sessiones : Los requerimientos deben especificar como se protegeran las credenciales para autentificación y los identificadores de sesión a través del ciclo de desarrollo de software. Los requerimientos para todas las funciones relacionadas deben ser agregadas incluyendo recuperar contraseñas, cambio de contraseñas, recordar contraseñas, desconexión y conexión multiple.&lt;br /&gt;
&lt;br /&gt;
;(c) Control de Acceso : Los requerimientos deben incluir una descripcion detallada de todos los roles (grupos, privilegios, autorizaciones) usadas en la aplicación. Los requerimientos deben indicar todos los activos y funciones que provee la aplicacion. Los requerimientos deben especificar detallada y exactamente los derechos de acceso para cualquier activo y función de cada rol. Se sugiere utilizar un formato de matriz de control de acceso para documentar estas reglas.&lt;br /&gt;
&lt;br /&gt;
;(d) Manejo de Errores : Los requerimientos deben detallar como se van a manejar los errores que ocurran dentro del procesamiento. Algunas aplicaciones deberían hacer lo mejor posible en caso de un error, mientras que otras deberían terminar su procesamiento inmediatamente.&lt;br /&gt;
&lt;br /&gt;
;(e) Historial : Los requerimientos deben especificar que eventos son relevantes para la seguridad y necesitan ser registrados, como ataques detectados, intentos de conexión fallidos e intentos de exeder la autorización.  Los requerimientos deben especificar tambien que information registrar con cada evento, incluyendo hora y fecha, descripción del evento, detalles de aplicación, y otra información útil en esfuerzos forences.&lt;br /&gt;
&lt;br /&gt;
;(f) Conexiones a sistemas externos : Los requerimientos deben especifica como la autentificación y cifrado será manejado para todos los systemas externos, tales como bases de datos, directorios y servicios Web. Todas las credenciales requeridas para la comunicación con sistemas externos deben almacenarce cifradas y fuera de el código dentro de archivos de configuración. &lt;br /&gt;
&lt;br /&gt;
;(g) Cifrado : Los requerimientos deben especificar que datos deben ser cifrados, como serán cifrados y como todos los certificados y otras credenciales deben ser manejadas. Las aplicaciones deben usar algoritmos estándar implementados en una librerias de cifrado que hayan sido usadas y probadas ampliamente.&lt;br /&gt;
&lt;br /&gt;
;(h) Disponibilidad : Los requerimientos deben especificar como protegerse de ataques de negación de servicio. Todos los posibles ataques en la aplicacion deben ser considerados, incluyendo bloqueos de auntentificación, agotamiento de conexiones y otros ataques de agotamiento de recursos.&lt;br /&gt;
&lt;br /&gt;
;(i) Configuración segura : Los requerimientos deben especificar que los valores predeterminados para todas las configuraciones relacionadas a seguridad deben ser seguras. Para propósitos de auditoría, el software deberia ser capás de producir un reporte sencillo de leer que muestre los detalles de todas las configuraciones relacionadas con seguridad.&lt;br /&gt;
&lt;br /&gt;
;(j) Vulnerabilidades especificas : Los requerimientos deben incluir un conjunto de vulnerabilidades especificas que no deben estar presentes en el software. A menos que sea especificado de otra manera, el software no debe incluir ninguna de las fallas descritas en el la &amp;quot;Lista de OWASP sobre las 10 vulnerabilidades mas críticas en aplicaciones Web&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===5. PERSONAL Y ORGANIZACIÓN===&lt;br /&gt;
&lt;br /&gt;
;(a) Arquitecto en seguridad : El desarollador asignará la responsabilidad por la seguridad a un solo recurso técnico experimentado, para ser conocido como el arquitecto de seguridad del proyecto. El arquitecto de seguridad certificará la seguridad de cada entregable.&lt;br /&gt;
&lt;br /&gt;
;(b) Entrenamiento en Seguridad : el proveedor será responsable de verificar que todos los miembros del equipo de desarrollo han sido entrenados en tecnicas de programación segura.&lt;br /&gt;
&lt;br /&gt;
;(c) Desarrolladores dignos de confianza : El proveedor acuerda realizar las investigaciones de antecendentes apropiadas a todos los miembros del equipo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===6. AMBIENTE DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Codificación segura : El proveedor debe mencionar que herramientas se usarán en el ambiente de desarrollo de software para promover la codificación segura.&lt;br /&gt;
&lt;br /&gt;
;(b) Adminstración de configuración : El proveedor debe usar un sistema de control de versiones que autentifique y registre el miembro del equipo asociado con todos los cambios en el código base, todos los archivos de configuración y compilación.&lt;br /&gt;
&lt;br /&gt;
;(c) Distribución : El proveedor debe usar un proceso de compilación que construya confiablemente un archivo de distribución completo desde el código fuente. Este proceso debe incluir un método para verificar la integridad de el software entregado al cliente.&lt;br /&gt;
&lt;br /&gt;
===7. LIBRERIAS, MARCOS DE DESARROLLO Y PRODUCTOS===&lt;br /&gt;
&lt;br /&gt;
;(a) Apertura : El proveedor debe mencionar todas los aplicaciones de terceros usadas en el software, incluyendo todas las librerias, marcos de desarrollo, componentes y otros productos, ya sean comerciales, gratuitos, de código abierto o código cerrado.&lt;br /&gt;
&lt;br /&gt;
;(b) Evaluación : El proveedor debe hacer esfuerzos rasonables para asegurar que el sofware de terceros cumple con todos los términos de este contrato y es tan seguro como el código a la medida desarrollado bajo este contrato.&lt;br /&gt;
&lt;br /&gt;
===8. REVISIONES DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Derecho de revisión : El cliente tiene el derecho mandar revisar el software para buscar fallas de seguridad, esto a sus expesas y en cualquier momento dentro de los 60 dias despues de la entrega. El desarrollador acepta proveer apoyo rasonable al equipo de revisión proveyendo el codigo fuente y acceso a los ambientes de pruebas.&lt;br /&gt;
&lt;br /&gt;
;(b) Covertura de la revisión : Las revisiones de seguridad deben cubrir todos los aspectos de el software entregado, incluyendo código a la medida, componentes, productos y configuración de sistema.&lt;br /&gt;
&lt;br /&gt;
;(c) Alcance de la revisión : Al menos, la revisión debe cubrir todos los requerimientos de seguridad y debería buscar otras vulnerabilidades comunes. La revisión puede incluir una combinación de busqueda automatizada de vulnerabilidades, pruebas de intrusión, análisis estático de código fuente y revisión de código por expertos.&lt;br /&gt;
&lt;br /&gt;
;(d) Problemas encontrados : Los problemas de seguridad descubiertos serán reportados a el cliente y proveedor por igual. A todos los problemas se les dará seguimiento y serán reparados como se especifique en la sección de seguimiento de problemas de seguridad de este anexo.&lt;br /&gt;
&lt;br /&gt;
===9. ADMINISTRACIÓN DE PROBLEMAS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Identificación : El proveedor dara seguimiento a todos los problemas de seguridad descubiertos en todo el ciclo de desarrollo, ya sea un problema en los requerimientos, diseño, implementación, pruebas, publicación u operación. El riesgo asociado con cada problema de seguridad será evaluado, documentado y reportado a el cliente tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
;(b) Protección : El proveedor protegerá apropiadamente la información relacionada a problemas de seguridad y la documentación relacionada a ellos, esto, para ayudar a disminuir la probabilidad de las vulnerabilidades en el software operacioneal del cliente sean expuestas.&lt;br /&gt;
&lt;br /&gt;
;(c) Reparación : Los problemas de seguridad que sean indentificados antes de la entrega deben ser reparados por el proveedor. Los problemas de seguridad descubiertos despues de la entrega deben ser manejados en la misma manera que otros problemas funcionales según lo especificado en este contrato.&lt;br /&gt;
&lt;br /&gt;
===10. CERTEZA===&lt;br /&gt;
&lt;br /&gt;
;(a) Certeza : El proveedor proveera un &amp;quot;paquete de certificación&amp;quot; consistente en la documentación de seguridad creada a traves del proceso de desarrollo. El paquete deberá establecer que los requerimientos de seguridad, diseño, implementación y resultados de pruebas fueron completados apropiadamente y todos los problemas de seguridad fueron resueltos apropiadamente.&lt;br /&gt;
&lt;br /&gt;
;(b) Auto-Certificación : El aquitecto de seguridad certificará que el software cumple con los requerimientos de seguridad, que todas las actividades de seguridad se realizaron, y que todos los problemas de seguridad identificados han sido documentados y resueltos. Cualquier excepción a el estado de la certificacion debe estar totalmente documentada al momento de la entrega.&lt;br /&gt;
&lt;br /&gt;
;(c) No código malicioso : El proveedor garantize que el sofware no debe contener ningun código que no se alinee a algun requerimiento del software y debilite la seguridad de la aplicación, incluyendo viruses, gusanos, bombas de tiempo, puertas traseras, caballos de troya, huevos de pascua y cualquier otra forma de código malicioso.&lt;br /&gt;
&lt;br /&gt;
===11. CONCENTIMIENTO Y MANTENIMIENTO DE LA SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Consentimiento : El software no debe ser considerado como aceptado hasta que el paquete de certificación este completo y todos los problemas de seguridad han sido resueltos.&lt;br /&gt;
&lt;br /&gt;
;(b) Investigación de problemas de seguridad : Despues del concentimiento, si se sospecha (razonablemente) o descubren problemas de seguridad, el proveedor deberá asisitir al cliente en realizar una investigación para determinar la naturaleza del problema. El problema debe ser considerado &amp;quot;nuevo&amp;quot; si no es cubierto por los requerientos de seguridad y esta fuera de el alcance (razonable) de las pruebas de seguridad.&lt;br /&gt;
&lt;br /&gt;
;(c) Problemas de seguridad nuevos : El proveedor y el cliente consientes en medir el alcance y esfuerzo requerido para resolver problemas de seguridad nuevos, y negociad de buena fe para alcanzar un acuerdo y realizar el trabajor requerido para solucionarlos.&lt;br /&gt;
&lt;br /&gt;
;(d) Otros problemas de seguridad : El proveedor debe usar todos los esfuersos comercialmente rasonables consistentes con practicas de desarrollo comunes en la industria, tomando en cuenta la severidad de el riesgo, para resolver todos los problemas de seguridad considerados nuevos tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Legal Project]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79722</id>
		<title>Anexo para Contrato de Software Seguro de OWASP</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79722"/>
				<updated>2010-03-12T13:43:24Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''ANEXO DE CONTRATO PARA DESAROLLO DE SOFTWARE SEGURO'''&lt;br /&gt;
&lt;br /&gt;
  ADVERTENCIA: ESTE DOCUMENTO DEBE SER CONSIDERADO COMO UNA GUÍA SOLAMENTE.&lt;br /&gt;
  OWASP RECOMIENDA VEHEMENTEMENTE QUE CONSULTE UN ABOGADO CALIFICADO&lt;br /&gt;
  PARA AYUDARLE A NEGOCIAR UN CONTRATO DE SOFTWARE&lt;br /&gt;
  &lt;br /&gt;
== Introducción  ==&lt;br /&gt;
&lt;br /&gt;
Este anexo de contrato pretende ayudar a los proveedores de software y sus clientes a negociar y capturar importantes términos y condiciones contractuales relacionadas a la seguridad en el Software a ser desarrollado o entregado. La razon para este proyecto es que la mayoría de los contratos no mencionan estos temas, y las partes frecuentamente tienen puntos de vista dramaticamente diferentes a lo que en ralidad fue acordado. Creemos que articular claramente estos términos es la mejor manera de asegurarse que ambas partes pueden hacer desiciones informadas sobre como proceder. &lt;br /&gt;
&lt;br /&gt;
 &amp;quot;La seguridad del software comercial mejorará cuando el mercado demande mejor seguridad.&lt;br /&gt;
 Al menos, cada petición para propuestas de software debería pedir a los vendedores &lt;br /&gt;
 detallar como van ellos a probar sus productos para encotrar vulnerabilidades de&lt;br /&gt;
 seguridad. Este paso empezará convenciendo a los vendedores de software empaquetado&lt;br /&gt;
 y proveedores externos que las compañias valoran la seguridad.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- John Pescatore, Director de investiagacion con Gartner&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 Pedimos a los clientes y proveedores que usen este documento como un marco para discutir&lt;br /&gt;
 espectativas y negociar responsabilidades. Este anexo se creó para ser añadido a un&lt;br /&gt;
 contrato de desarrollo de software. Estos términos son negociables, significa que ellos&lt;br /&gt;
 pueden y deben ser discutidos por el cliente y el proveedor.&lt;br /&gt;
&lt;br /&gt;
== SOBRE EL PROYECTO ==&lt;br /&gt;
&lt;br /&gt;
Este documento fue creado por la fundación OWASP (Open Web Application Security Project por sus siglas en Inglés), una organización sin animo de lucro con el objetivo de crear herramientas y documentación, gratuita y abierta para asegurar software. Para facilitar su uso en contratación privada, este documento es de dominio publico. Puede encontrar detalles adicionales sobre este proyecto en http://www.owasp.com/index.php/OWASP_Legal_Project. Son Bienvenidos comentarios de ambos, productores y consumidores de software, asi como de la comunidad legal. &lt;br /&gt;
&lt;br /&gt;
OWASP reconoce gratamente la contribución especial de [http://www.aspectsecurity.com Aspect Security] por su rol en la investigación y preparación de este documento.&lt;br /&gt;
&lt;br /&gt;
==OBJECIONES==&lt;br /&gt;
&lt;br /&gt;
Las siguientes páginas cubren algunas objeciones que escuchamos frecuentemente sobre usar este lenguaje en contratos de desarrollo de software:&lt;br /&gt;
&lt;br /&gt;
=== PERO NO TODOS LOS TÉRMINOS SON CORRECTOS PARA NOSOTROS… ===&lt;br /&gt;
&lt;br /&gt;
Este documento debe ser considerado un punto de inicio para su contrato. Puede que no le gusten todas las actividades, o puede querer proponer mas. Puede querer asignar responsabilidades de manera diferente. Este documento no pretende capturar exactamente las necesidades de todos los clientes y proveedores de software. Pretende proveer un marco para discutir temas clave, importantes para asegurarse que el software se cree de forma segura. Despues de que tengan una discusión sobre seguridad y alcancen un acuerdo. Puede ajustar el convenio para que concuerde con el contrato.&lt;br /&gt;
&lt;br /&gt;
=== PERO, ¿QUIEN DEBE PAGAR POR ESTAS ACTIVIDADES?… ===&lt;br /&gt;
&lt;br /&gt;
Este contrato no es sobre poner mas peso al desarollo de software. La pregunta no es sobre si hay costos asociados con seguridad (por supuesto que hay). La pregunta correcta es qué actividades deberían hacerse por ambas partes para minimizar costos, y cuando deberían ocurrir. &lt;br /&gt;
&lt;br /&gt;
Este anexo no menciona (intensionalmente) sobre el detalle de quién debería pagar por la actividades descritas. Mientras muchas de estas actividades deben estar pasando ya, y son esperadas por muchos clientes, ellas no estan practicadas regularmente en la industria del software. La cuestion de quién paga (y cuándo) debe ser parte de la negociación. &lt;br /&gt;
&lt;br /&gt;
Calcular el costo de la seguridad es muy difícil. Auque hay costos asociados con realizar actividades de seguridad, hay también costos importantes asociados con ignorar estas actividades. Estamos convencidos el mejor costo-beneficio para desarrollar software es reducir la probabilidad de que fallas de seguridad sean introducidas y minimzar el tiempo entre introducir una falla y arreglarla. &lt;br /&gt;
&lt;br /&gt;
Una distición importante a hacer cuando calculamos costos es entre construir mecanismos de seguridad y las actividades para asegurarse que esos mecanismos sean correctos y efectivos. Intentar agregar mecanismoa al final de el ciclo de desarrollo puede causar serios problemas de diseño e incrementará el costo dramáticamente. Este convenio promueve decisiones sobre mecanismos para minimizar estos costos. Similarmente, esperar hasta justo antes de la puesta en producción para hacer actividades de aseguramiento, tales como revisión de código y pruebas de intrusión, tambien incrementaría los costos dramaticamente. Creemos que el mejor costo-beneficio para ganar certeza es poner un nivel constante de esfuerzo en el aseguramiento a través del ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===PERO EL NIVEL DE RIGOR ESTA INCORRECTO….===&lt;br /&gt;
&lt;br /&gt;
Este convenio asume que el software que esta siendo desarrollado es rasonablemente importante para una empresa grande o agencia de gobierno. Hemos seleccionado un &amp;quot;nivel de rigor&amp;quot; para el convenio que es alcanzable por la mayoria de las organizaciones proveedoras de software, e identificaría y manejaría los riesgos más comunes.&lt;br /&gt;
&lt;br /&gt;
Sin embargo, para el software que va a ser usado en aplicaciones críticas, como aplicaciones médicas, financieras o relacionadas con el ejército. Puede querer incrementar el nivel de rigor. Puede querer agregar revisiones, documentación y actividades adicionales de prueba. Puede querer mejorar el proceso de encontrar, diagnosticar y remediar vulnerabilidades. Para aplicaciones menos sensibles, puede desear reducir o remover actividades.&lt;br /&gt;
&lt;br /&gt;
===PERO NOSOTROS NO PODEMOS ACEPTAR TANTO RIESGO…===&lt;br /&gt;
Este convenio pretende facilitar la discusión sobre quien tomaría el riesgo por las vulnerabilidades de seguridad en el software. Por un lado del espectro, el cliente podria tomar todo el riesgo y el proveedor podria entregar código con muchas vulnerabilidades. Por el otro extremo, el proveedor podría tomar todo el riesgo y asumir la responsabilidad de entregar código perfecto. Ambos extremos son irrealizables.&lt;br /&gt;
&lt;br /&gt;
Actualmente, en este convenio, el proveedor toma el riesgo por problemas que sean descubiertos en los requerimientos o deben ser cubiertos por esfuerzos razonables en pruebas. Pero la remediación de &amp;quot;nuevos&amp;quot; problemas de seguridad tendría que ser pagado por el cliente.  Creemos que este es un equilibrio funcional, ya que limita el riesgo adquirido por el proveedor y promueve obtener requerimientos de seguridad por anticipado. Pero hay muchas otras posibles soluciones a este problema. Por favor, dejenos saber si tiene sugerencias alternas, podriamos incluirlas en versiones futuras de este documento.&lt;br /&gt;
&lt;br /&gt;
Note que la discusión aqui solo cubre el riesgo asociado con arreglar las vulnerabilidades de seguridad en el código, y no incluye los costos asociados con recuperarse de incidentes de seguridad relacionados con explotar cualquiera de esas vulnerabilidades. Estamos interesados en mejores prácticas en esta area.&lt;br /&gt;
&lt;br /&gt;
===PERO COMO PODEMOS ASEGURAR CÓDIGO DE TERCEROS…===&lt;br /&gt;
&lt;br /&gt;
Casi todos los proyectos de sofware tienen una cantidad importante de código de terceros como librarieas, frameworks y productos. Desde la perspectiva de seguridad, este código es tan importante como el código desarrollado a la medida para su proyecto.&lt;br /&gt;
Creemos  que la responsabilidad de asegurar la seguridad de este código es llevada mejor por el proveedor, aunque ellos podrían no tener toda la capacidad para garantizar la seguridad por ellos mismos. Sin embargo, La seguridad puede ser parte de el la desición de &amp;quot;construir o comprar&amp;quot;, y esta parece ser la mejor manera de promoverla.&lt;br /&gt;
&lt;br /&gt;
El proveedor, por supuesto, tiene la opción de pasar la responsabilidad a el proveedor del software de terceros. El desarrolador puede tambien analizar el código de terceros por él mismo o contratar expertos en seguridad para analizarlo por él.&lt;br /&gt;
&lt;br /&gt;
===PERO PORQUE DEBO PASAR POR TODO ESTE PROBLEMA…===&lt;br /&gt;
&lt;br /&gt;
En última instancia, creemos que no hay alternativa para hacer de la seguridad una parte de el proceso de contratación de software. Actualmente, creemos que hay serios malentendidos sobre la seguridad del código que esta siendo desarrollado bajo muchos contratos de desarrollo de software. Esto puede solamente llevar a una cara litigación y a desiciones hechas por individuos con poca experiencia y entendimiento sobre software. Lea el [[Secure software contracting hypothetical case study | Caso de estudio hipotético sobre contratación de software seguro]] para una discusión completa de este problema.&lt;br /&gt;
&lt;br /&gt;
Hay muchos beneficios al trabajar con este convenio. El principal es que pondrá claras las expectativas entre las partes involucradas. En algunos casos ayudará a evitar demandas cuando problemas de seguridad difíciles aparecen en el software. Tambien, estan son las mismas actividades requeridas por muchas razónes legales y de conformidad con estándares/leyes.&lt;br /&gt;
&lt;br /&gt;
===PERO ES MUY DIFÍCIL PRODUCIR TODA ESTA DOCUMENTACIÓN…===&lt;br /&gt;
&lt;br /&gt;
OWASP no promueve la documentacion por la simpre documentacion. Este convenio esta enfocado en promover la calidad, no la cantidad. Creemos que puede ser posible (en algunos proyectos) cumplir con este contrato con una pequeña evaluacion de riesgo, algunas páginas de requerimientos, un pequeño documento de diseño de seguridad, un plan de pruebas, y algunos resultados de pruebas.&lt;br /&gt;
&lt;br /&gt;
El objetivo de esta documentación es simplemente asegurar, en cada etapa del desarrollo de software, que se ha puesto la atención apropiada en la seguridad. Un beneficio adiciona es que esta documentacion puede ser recolectada en conjunto para formar un &amp;quot;paquete de certificación&amp;quot; que básicamente esbose el argumento de porque deberiamos confiar que el software hará lo que dice.&lt;br /&gt;
&lt;br /&gt;
==ANEXO DE CONTRATO==&lt;br /&gt;
&lt;br /&gt;
===1. INTRODUCCIÓN===&lt;br /&gt;
&lt;br /&gt;
Esta anexo esta hecho para _____________________ (&amp;quot;convenio&amp;quot;) entre el Cliente y el proveedor. Tanto el Cliente como el proveedor acuerdan maximisar la seguridad del software de acuerdo a los siguientes términos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2. FILOSOFÍA===&lt;br /&gt;
&lt;br /&gt;
Esta anexo pretende aclarar los derechos y obligaciones relacionados a seguridad de todas las partes en una relacion de desarrollo de software. Al mayor nivel, las partes acuerdan que:&lt;br /&gt;
&lt;br /&gt;
;(a) Las desiciones de seguridad estarán basadas en el riesgo : Las desciciones sobre la seguridad seran tomadas en conunto por el cliente y el proveedor basandose en un firme entendimiento de el riesgo involucrado. &lt;br /&gt;
&lt;br /&gt;
;(b) Las actividades de seguridad estarán balanceadas : El esfurzo de seguridad será distribuido equitativamente a través de todo el ciclo de desarollo de software.&lt;br /&gt;
&lt;br /&gt;
;(c) Las actividades de seguridad estarán integradas : Todas las actividades y documentación discutidas aqui pueden y deben ser integradas dentro del ciclo de desarrollo de software del proveedor y no mantenerse separadas de el resto del proyecto. Nada en este anexo implica algún processo de desarrollo de software en particular.&lt;br /&gt;
&lt;br /&gt;
;(d) Se esperan vulnerabilidades :  Todo software contiene defectos, y algunos de estos crearan problemas de seguridad. Ambos, cliente y proveedor se esforzará para identificar las vulnerabilidades tan pronto como sea posible en el ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
;(e) La información sobre seguridad será comunicada por completo : Toda la información relevante para la seguridad se compartirá entre el cliente y el proveedor inmediatamente y completamente.&lt;br /&gt;
&lt;br /&gt;
;(f) Se requerirá solo documentacion de seguridad necesaria : La documentación de seguridad no necesita ser demasiado amplia para describir claramente el diseño de seguridad, análisis de riesgo y problemas.&lt;br /&gt;
&lt;br /&gt;
===3. ACTIVIDADES EN EL CICLO DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Entendimiento del Riesgo : El proveedor y el cliente acuerdan trabajar juntos para entender y documentar los riesgos que enfrenta la aplicacion. Este esfuerzo debe identificar los riesgos clave para los activos y funciones importantes que provee la aplicación. Cada uno de los temas listados en la sección de requerimientos debe ser considerado.&lt;br /&gt;
&lt;br /&gt;
;(b) Requerimientos : Basado en los riesgos, El proveedor y cliente acuerda trabajar juntos para crear requerimientos de seguridad detallados como parte de la especificacion de el software a ser desarrollado. Cada uno de los temas listados en la sección de requerimientos de este anexo deben ser discutidos y evaluados por ambos, cliente y proveedor.  Estos requerimientos pueden ser satisfechos por software creado a la medida, software de terceros, o la plataforma. &lt;br /&gt;
&lt;br /&gt;
;(c) Diseño : el desarollador acuerda proveer documentation que explique claramente el diseño para adquirir cada uno de los requerimientos de seguridad. En muchos de los casos, esta documentacion describirá los mecanismos de seguridad, donde se incluiran dentro de la arquitectura, y todos los patrones de diseño relevantes para asegurar su uso adecuado. El diseño debe especificar claramente si tales mecanismos vienen de software a la medida, software de terceros o de la plataforma.&lt;br /&gt;
&lt;br /&gt;
;(d) Implementación : El proveedor acuerda entregar y seguir un conjunto de lineamientos de codificación segura. Estos lineamientos indicarán como sele de debe dar formato, estructurar y comentar el código fuente. Todo código relacionado a seguridad debe ser comentado profundamente. Guías sobre como evitar vulnerabilidades se seguridad comunes debe ser incluida. Tambien, todo el código debe ser revisado por al menos otro desarollador basandose en los requerimientos de seguridad y los lineamientos de codificación antes de ser conciderado listo para pruebas unitarias.&lt;br /&gt;
&lt;br /&gt;
;(e) Pruebas y análisis de seguridad : El proveedor acuerda entregar y seguir un plan de pruebas de seguridad que defina como se realizarán las pruebas o bien establecer como cada uno de los requerimientos de seguridad va a ser complido. El nivel de rigor de esta actividad debe ser considerado y detallado en un plan. El proveedor ejecutará el plan de prueba y proveera los resultados a el cliente.&lt;br /&gt;
&lt;br /&gt;
;(f) Publicación segura : El proveedor acuerda entregar lineamientos de configuración segura que describan completamente todas las opciones de configuracion relacionadas con seguridad y sus implicaciones para la seguridad del software en su conjunto. Los lineamientos deben incluir una descripción completa de las dependencias en la plataforma y como deben ser configuradas de manera segura, incluidas las del sistema operativo, servidor Web y servidor de aplicacion. La configuracion predeterminada del software debe ser segura.&lt;br /&gt;
&lt;br /&gt;
===4. ÁREAS CON REQUERIMIENTOS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
Los siguientes temas/áreas deben ser considerados durante las actividades de entendimiento de riesgo y definición de requerimientos. Este esfuerzo debe producir un conjunto de requerimientos ajustados, especificos y probables. Ambos, proveedor y cliente deben ser involucrados en este proceso y deben ponerse de acuerdo sobre el conjunto final de requerimientos.&lt;br /&gt;
&lt;br /&gt;
;(a) Validación de entradas y condificación : Los requerimientos deben especificar las reglas para canonicalización, validación y codificación de cada dato de entrada a la aplicación, ya sea de usuarios, sistemas de archivos, bases de datos o sistemas externos. La regla predeterminada debe ser que todas las entradas sean validadas a menos que cumplan con una especificacion detallada de que esta permitido. Además, los requerimientos deben especificar las acciones a tomar cuando se reciven entradas no válidas. Especificamente, la aplicación no debe ser susceptible a inyecciones, desbordamientos, manipulación y otros ataques con entradas de usuario corruptas.&lt;br /&gt;
&lt;br /&gt;
;(b) Autentificación y manejo de sessiones : Los requerimientos deben especificar como se protegeran las credenciales para autentificación y los identificadores de sesión a través del ciclo de desarrollo de software. Los requerimientos para todas las funciones relacionadas deben ser agregadas incluyendo recuperar contraseñas, cambio de contraseñas, recordar contraseñas, desconexión y conexión multiple.&lt;br /&gt;
&lt;br /&gt;
;(c) Control de Acceso : Los requerimientos deben incluir una descripcion detallada de todos los roles (grupos, privilegios, autorizaciones) usadas en la aplicación. Los requerimientos deben indicar todos los activos y funciones que provee la aplicacion. Los requerimientos deben especificar detallada y exactamente los derechos de acceso para cualquier activo y función de cada rol. Se sugiere utilizar un formato de matriz de control de acceso para documentar estas reglas.&lt;br /&gt;
&lt;br /&gt;
;(d) Manejo de Errores : Los requerimientos deben detallar como se van a manejar los errores que ocurran dentro del procesamiento. Algunas aplicaciones deberían hacer lo mejor posible en caso de un error, mientras que otras deberían terminar su procesamiento inmediatamente.&lt;br /&gt;
&lt;br /&gt;
;(e) Historial : Los requerimientos deben especificar que eventos son relevantes para la seguridad y necesitan ser registrados, como ataques detectados, intentos de conexión fallidos e intentos de exeder la autorización.  Los requerimientos deben especificar tambien que information registrar con cada evento, incluyendo hora y fecha, descripción del evento, detalles de aplicación, y otra información útil en esfuerzos forences.&lt;br /&gt;
&lt;br /&gt;
;(f) Conexiones a sistemas externos : Los requerimientos deben especifica como la autentificación y cifrado será manejado para todos los systemas externos, tales como bases de datos, directorios y servicios Web. Todas las credenciales requeridas para la comunicación con sistemas externos deben almacenarce cifradas y fuera de el código dentro de archivos de configuración. &lt;br /&gt;
&lt;br /&gt;
;(g) Cifrado : Los requerimientos deben especificar que datos deben ser cifrados, como serán cifrados y como todos los certificados y otras credenciales deben ser manejadas. Las aplicaciones deben usar algoritmos estándar implementados en una librerias de cifrado que hayan sido usadas y probadas ampliamente.&lt;br /&gt;
&lt;br /&gt;
;(h) Disponibilidad : Los requerimientos deben especificar como protegerse de ataques de negación de servicio. Todos los posibles ataques en la aplicacion deben ser considerados, incluyendo bloqueos de auntentificación, agotamiento de conexiones y otros ataques de agotamiento de recursos.&lt;br /&gt;
&lt;br /&gt;
;(i) Configuración segura : Los requerimientos deben especificar que los valores predeterminados para todas las configuraciones relacionadas a seguridad deben ser seguras. Para propósitos de auditoría, el software deberia ser capás de producir un reporte sencillo de leer que muestre los detalles de todas las configuraciones relacionadas con seguridad.&lt;br /&gt;
&lt;br /&gt;
;(j) Vulnerabilidades especificas : Los requerimientos deben incluir un conjunto de vulnerabilidades especificas que no deben estar presentes en el software. A menos que sea especificado de otra manera, el software no debe incluir ninguna de las fallas descritas en el la &amp;quot;Lista de OWASP sobre las 10 vulnerabilidades mas críticas en aplicaciones Web&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===5. PERSONAL Y ORGANIZACIÓN===&lt;br /&gt;
&lt;br /&gt;
;(a) Arquitecto en seguridad : El desarollador asignará la responsabilidad por la seguridad a un solo recurso técnico experimentado, para ser conocido como el arquitecto de seguridad del proyecto. El arquitecto de seguridad certificará la seguridad de cada entregable.&lt;br /&gt;
&lt;br /&gt;
;(b) Entrenamiento en Seguridad : el proveedor será responsable de verificar que todos los miembros del equipo de desarrollo han sido entrenados en tecnicas de programación segura.&lt;br /&gt;
&lt;br /&gt;
;(c) Desarrolladores dignos de confianza : El proveedor acuerda realizar las investigaciones de antecendentes apropiadas a todos los miembros del equipo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===6. AMBIENTE DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Codificación segura : El proveedor debe mencionar que herramientas se usarán en el ambiente de desarrollo de software para promover la codificación segura.&lt;br /&gt;
&lt;br /&gt;
;(b) Adminstración de configuración : El proveedor debe usar un sistema de control de versiones que autentifique y registre el miembro del equipo asociado con todos los cambios en el código base, todos los archivos de configuración y compilación.&lt;br /&gt;
&lt;br /&gt;
;(c) Distribución : El proveedor debe usar un proceso de compilación que construya confiablemente un archivo de distribución completo desde el código fuente. Este proceso debe incluir un método para verificar la integridad de el software entregado al cliente.&lt;br /&gt;
&lt;br /&gt;
===7. LIBRERIAS, MARCOS DE DESARROLLO Y PRODUCTOS===&lt;br /&gt;
&lt;br /&gt;
;(a) Apertura : El proveedor debe mencionar todas los aplicaciones de terceros usadas en el software, incluyendo todas las librerias, marcos de desarrollo, componentes y otros productos, ya sean comerciales, gratuitos, de código abierto o código cerrado.&lt;br /&gt;
&lt;br /&gt;
;(b) Evaluación : El proveedor debe hacer esfuerzos rasonables para asegurar que el sofware de terceros cumple con todos los términos de este contrato y es tan seguro como el código a la medida desarrollado bajo este contrato.&lt;br /&gt;
&lt;br /&gt;
===8. REVISIONES DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Derecho de revisión : El cliente tiene el derecho mandar revisar el software para buscar fallas de seguridad, esto a sus expesas y en cualquier momento dentro de los 60 dias despues de la entrega. El desarrollador acepta proveer apoyo rasonable al equipo de revisión proveyendo el codigo fuente y acceso a los ambientes de pruebas.&lt;br /&gt;
&lt;br /&gt;
;(b) Covertura de la revisión : Las revisiones de seguridad deben cubrir todos los aspectos de el software entregado, incluyendo código a la medida, componentes, productos y configuración de sistema.&lt;br /&gt;
&lt;br /&gt;
;(c) Alcance de la revisión : Al menos, la revisión debe cubrir todos los requerimientos de seguridad y debería buscar otras vulnerabilidades comunes. La revisión puede incluir una combinación de busqueda automatizada de vulnerabilidades, pruebas de intrusión, análisis estático de código fuente y revisión de código por expertos.&lt;br /&gt;
&lt;br /&gt;
;(d) Problemas encontrados : Los problemas de seguridad descubiertos serán reportados a el cliente y proveedor por igual. A todos los problemas se les dará seguimiento y serán reparados como se especifique en la sección de seguimiento de problemas de seguridad de este anexo.&lt;br /&gt;
&lt;br /&gt;
===9. ADMINISTRACIÓN DE PROBLEMAS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Identificación : El proveedor dara seguimiento a todos los problemas de seguridad descubiertos en todo el ciclo de desarrollo, ya sea un problema en los requerimientos, diseño, implementación, pruebas, publicación u operación. El riesgo asociado con cada problema de seguridad será evaluado, documentado y reportado a el cliente tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
;(b) Protección : El proveedor protegerá apropiadamente la información relacionada a problemas de seguridad y la documentación relacionada a ellos, esto, para ayudar a disminuir la probabilidad de las vulnerabilidades en el software operacioneal del cliente sean expuestas.&lt;br /&gt;
&lt;br /&gt;
;(c) Reparación : Los problemas de seguridad que sean indentificados antes de la entrega deben ser reparados por el proveedor. Los problemas de seguridad descubiertos despues de la entrega deben ser manejados en la misma manera que otros problemas funcionales según lo especificado en este contrato.&lt;br /&gt;
&lt;br /&gt;
===10. CERTEZA===&lt;br /&gt;
&lt;br /&gt;
;(a) Certeza : El proveedor proveera un &amp;quot;paquete de certificación&amp;quot; consistente en la documentación de seguridad creada a traves del proceso de desarrollo. El paquete deberá establecer que los requerimientos de seguridad, diseño, implementación y resultados de pruebas fueron completados apropiadamente y todos los problemas de seguridad fueron resueltos apropiadamente.&lt;br /&gt;
&lt;br /&gt;
;(b) Auto-Certificación : El aquitecto de seguridad certificará que el software cumple con los requerimientos de seguridad, que todas las actividades de seguridad se realizaron, y que todos los problemas de seguridad identificados han sido documentados y resueltos. Cualquier excepción a el estado de la certificacion debe estar totalmente documentada al momento de la entrega.&lt;br /&gt;
&lt;br /&gt;
;(c) No código malicioso : El proveedor garantize que el sofware no debe contener ningun código que no se alinee a algun requerimiento del software y debilite la seguridad de la aplicación, incluyendo viruses, gusanos, bombas de tiempo, puertas traseras, caballos de troya, huevos de pascua y cualquier otra forma de código malicioso.&lt;br /&gt;
&lt;br /&gt;
===11. CONCENTIMIENTO Y MANTENIMIENTO DE LA SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Consentimiento : El software no debe ser considerado como aceptado hasta que el paquete de certificación este completo y todos los problemas de seguridad han sido resueltos.&lt;br /&gt;
&lt;br /&gt;
;(b) Investigación de problemas de seguridad : Despues del concentimiento, si se sospecha (razonablemente) o descubren problemas de seguridad, el proveedor deberá asisitir al cliente en realizar una investigación para determinar la naturaleza del problema. El problema debe ser considerado &amp;quot;nuevo&amp;quot; si no es cubierto por los requerientos de seguridad y esta fuera de el alcance (razonable) de las pruebas de seguridad.&lt;br /&gt;
&lt;br /&gt;
;(c) Problemas de seguridad nuevos : El proveedor y el cliente consientes en medir el alcance y esfuerzo requerido para resolver problemas de seguridad nuevos, y negociad de buena fe para alcanzar un acuerdo y realizar el trabajor requerido para solucionarlos.&lt;br /&gt;
&lt;br /&gt;
;(d) Otros problemas de seguridad : El proveedor debe usar todos los esfuersos comercialmente rasonables consistentes con practicas de desarrollo comunes en la industria, tomando en cuenta la severidad de el riesgo, para resolver todos los problemas de seguridad considerados nuevos tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Legal Project]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79721</id>
		<title>Anexo para Contrato de Software Seguro de OWASP</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79721"/>
				<updated>2010-03-12T13:40:21Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''ANEXO DE CONTRATO PARA DESAROLLO DE SOFTWARE SEGURO'''&lt;br /&gt;
&lt;br /&gt;
  ADVERTENCIA: ESTE DOCUMENTO DEBE SER CONSIDERADO COMO UNA GUÍA SOLAMENTE.&lt;br /&gt;
  OWASP RECOMIENDA VEHEMENTEMENTE QUE CONSULTE UN ABOGADO CALIFICADO&lt;br /&gt;
  PARA AYUDARLE A NEGOCIAR UN CONTRATO DE SOFTWARE&lt;br /&gt;
  &lt;br /&gt;
== Introducción  ==&lt;br /&gt;
&lt;br /&gt;
Este anexo de contrato pretende ayudar a los proveedores de software y sus clientes a negociar y capturar importantes términos y condiciones contractuales relacionadas a la seguridad en el Software a ser desarrollado o entregado. La razon para este proyecto es que la mayoría de los contratos no mencionan estos temas, y las partes frecuentamente tienen puntos de vista dramaticamente diferentes a lo que en ralidad fue acordado. Creemos que articular claramente estos términos es la mejor manera de asegurarse que ambas partes pueden hacer desiciones informadas sobre como proceder. &lt;br /&gt;
&lt;br /&gt;
 &amp;quot;La seguridad del software comercial mejorará cuando el mercado demande mejor seguridad.&lt;br /&gt;
 Al menos, cada petición para propuestas de software debería pedir a los vendedores &lt;br /&gt;
 detallar como van ellos a probar sus productos para encotrar vulnerabilidades de&lt;br /&gt;
 seguridad. Este paso empezará convenciendo a los vendedores de software empaquetado&lt;br /&gt;
 y proveedores externos que las compañias valoran la seguridad.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- John Pescatore, Director de investiagacion con Gartner&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 Pedimos a los clientes y proveedores que usen este documento como un marco para discutir&lt;br /&gt;
 espectativas y negociar responsabilidades. Este anexo se creó para ser añadido a un&lt;br /&gt;
 contrato de desarrollo de software. Estos términos son negociables, significa que ellos&lt;br /&gt;
 pueden y deben ser discutidos por el cliente y el proveedor.&lt;br /&gt;
&lt;br /&gt;
== SOBRE EL PROYECTO ==&lt;br /&gt;
&lt;br /&gt;
Este documento fue creado por la fundación OWASP (Open Web Application Security Project por sus siglas en Inglés), una organización sin animo de lucro con el objetivo de crear herramientas y documentación, gratuita y abierta para asegurar software. Para facilitar su uso en contratación privada, este documento es de dominio publico. Puede encontrar detalles adicionales sobre este proyecto en http://www.owasp.com/index.php/OWASP_Legal_Project. Son Bienvenidos comentarios de ambos, productores y consumidores de software, asi como de la comunidad legal. &lt;br /&gt;
&lt;br /&gt;
OWASP reconoce gratamente la contribución especial de [http://www.aspectsecurity.com Aspect Security] por su rol en la investigación y preparación de este documento.&lt;br /&gt;
&lt;br /&gt;
==OBJECIONES==&lt;br /&gt;
&lt;br /&gt;
Las siguientes páginas cubren algunas objeciones que escuchamos frecuentemente sobre usar este lenguaje en contratos de desarrollo de software:&lt;br /&gt;
&lt;br /&gt;
=== PERO NO TODOS LOS TÉRMINOS SON CORRECTOS PARA NOSOTROS… ===&lt;br /&gt;
&lt;br /&gt;
Este documento debe ser considerado un punto de inicio para su contrato. Puede que no le gusten todas las actividades, o puede querer proponer mas. Puede querer asignar responsabilidades de manera diferente. Este documento no pretende capturar exactamente las necesidades de todos los clientes y proveedores de software. Pretende proveer un marco para discutir temas clave, importantes para asegurarse que el software se cree de forma segura. Despues de que tengan una discusión sobre seguridad y alcancen un acuerdo. Puede ajustar el convenio para que concuerde con el contrato.&lt;br /&gt;
&lt;br /&gt;
===PERO, ¿QUIEN DEBE PAGAR POR ESTAS ACTIVIDADES?…===&lt;br /&gt;
&lt;br /&gt;
Este contrato no es sobre poner mas peso al desarollo de software. La pregunta no es sobre si hay costos asociados con seguridad (por supuesto que hay). Sino, la pregunta correcta es que actividades deberían hacerse por ambas partes para minimizar costos, y cuando deberían ocurrir.&lt;br /&gt;
&lt;br /&gt;
Este anexo no menciona (intensionalmente) sobre el detalle de quien debería pagar por la actividades descritas. Mientras muchas de estas actividades deben estar pasando ya, y son esperadas por muchos clientes, ellas no estan practicadas regularmente en la industria del software. La cuestion de quien paga (y cuando) debe ser parte de la negociación.&lt;br /&gt;
&lt;br /&gt;
Calcular el costo de la seguridad es muy difícil. Auque hay costos asociados con realizar actividades de seguridad, hay también costos importantes asociados con ignorar estas actividades. Estamos convencidos el mejor costo-beneficio para desarrollar software es reducir la probabilidad de que fallas de seguridad sean introducidas y minimzar el tiempo entre introducir una falla y arreglarla.&lt;br /&gt;
&lt;br /&gt;
Una distición importante a hacer cuando calculamos costos es entre construir mecanismos de seguridad y las actividades para asegurarse que esos mecanismos sean correctos y efectivos. Intentar agregar mecanismoa al final de el ciclo de desarrollo puede causar serios problemas de diseño e incrementará el costo dramáticamente. Este convenio promieve decisiones sobre mecanismos para minimizar estos costos. Similarmente, esperas hasta justo antes de la publicación para hacer actividades de aseguramiento, tales como revisión de código y pruebas de intrudión, tambien incrementaría los costos dramaticamente. Creemos que el mejor costo-beneficio para ganar certeza es poner un nivel constante de esfuerzo en el aseguramiento a través del ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===PERO EL NIVEL DE RIGOR ESTA INCORRECTO….===&lt;br /&gt;
&lt;br /&gt;
Este convenio asume que el software que esta siendo desarrollado es rasonablemente importante para una empresa grande o agencia de gobierno. Hemos seleccionado un &amp;quot;nivel de rigor&amp;quot; para el convenio que es alcanzable por la mayoria de las organizaciones proveedoras de software, e identificaría y manejaría los riesgos más comunes.&lt;br /&gt;
&lt;br /&gt;
Sin embargo, para el software que va a ser usado en aplicaciones críticas, como aplicaciones médicas, financieras o relacionadas con el ejército. Puede querer incrementar el nivel de rigor. Puede querer agregar revisiones, documentación y actividades adicionales de prueba. Puede querer mejorar el proceso de encontrar, diagnosticar y remediar vulnerabilidades. Para aplicaciones menos sensibles, puede desear reducir o remover actividades.&lt;br /&gt;
&lt;br /&gt;
===PERO NOSOTROS NO PODEMOS ACEPTAR TANTO RIESGO…===&lt;br /&gt;
Este convenio pretende facilitar la discusión sobre quien tomaría el riesgo por las vulnerabilidades de seguridad en el software. Por un lado del espectro, el cliente podria tomar todo el riesgo y el proveedor podria entregar código con muchas vulnerabilidades. Por el otro extremo, el proveedor podría tomar todo el riesgo y asumir la responsabilidad de entregar código perfecto. Ambos extremos son irrealizables.&lt;br /&gt;
&lt;br /&gt;
Actualmente, en este convenio, el proveedor toma el riesgo por problemas que sean descubiertos en los requerimientos o deben ser cubiertos por esfuerzos razonables en pruebas. Pero la remediación de &amp;quot;nuevos&amp;quot; problemas de seguridad tendría que ser pagado por el cliente.  Creemos que este es un equilibrio funcional, ya que limita el riesgo adquirido por el proveedor y promueve obtener requerimientos de seguridad por anticipado. Pero hay muchas otras posibles soluciones a este problema. Por favor, dejenos saber si tiene sugerencias alternas, podriamos incluirlas en versiones futuras de este documento.&lt;br /&gt;
&lt;br /&gt;
Note que la discusión aqui solo cubre el riesgo asociado con arreglar las vulnerabilidades de seguridad en el código, y no incluye los costos asociados con recuperarse de incidentes de seguridad relacionados con explotar cualquiera de esas vulnerabilidades. Estamos interesados en mejores prácticas en esta area.&lt;br /&gt;
&lt;br /&gt;
===PERO COMO PODEMOS ASEGURAR CÓDIGO DE TERCEROS…===&lt;br /&gt;
&lt;br /&gt;
Casi todos los proyectos de sofware tienen una cantidad importante de código de terceros como librarieas, frameworks y productos. Desde la perspectiva de seguridad, este código es tan importante como el código desarrollado a la medida para su proyecto.&lt;br /&gt;
Creemos  que la responsabilidad de asegurar la seguridad de este código es llevada mejor por el proveedor, aunque ellos podrían no tener toda la capacidad para garantizar la seguridad por ellos mismos. Sin embargo, La seguridad puede ser parte de el la desición de &amp;quot;construir o comprar&amp;quot;, y esta parece ser la mejor manera de promoverla.&lt;br /&gt;
&lt;br /&gt;
El proveedor, por supuesto, tiene la opción de pasar la responsabilidad a el proveedor del software de terceros. El desarrolador puede tambien analizar el código de terceros por él mismo o contratar expertos en seguridad para analizarlo por él.&lt;br /&gt;
&lt;br /&gt;
===PERO PORQUE DEBO PASAR POR TODO ESTE PROBLEMA…===&lt;br /&gt;
&lt;br /&gt;
En última instancia, creemos que no hay alternativa para hacer de la seguridad una parte de el proceso de contratación de software. Actualmente, creemos que hay serios malentendidos sobre la seguridad del código que esta siendo desarrollado bajo muchos contratos de desarrollo de software. Esto puede solamente llevar a una cara litigación y a desiciones hechas por individuos con poca experiencia y entendimiento sobre software. Lea el [[Secure software contracting hypothetical case study | Caso de estudio hipotético sobre contratación de software seguro]] para una discusión completa de este problema.&lt;br /&gt;
&lt;br /&gt;
Hay muchos beneficios al trabajar con este convenio. El principal es que pondrá claras las expectativas entre las partes involucradas. En algunos casos ayudará a evitar demandas cuando problemas de seguridad difíciles aparecen en el software. Tambien, estan son las mismas actividades requeridas por muchas razónes legales y de conformidad con estándares/leyes.&lt;br /&gt;
&lt;br /&gt;
===PERO ES MUY DIFÍCIL PRODUCIR TODA ESTA DOCUMENTACIÓN…===&lt;br /&gt;
&lt;br /&gt;
OWASP no promueve la documentacion por la simpre documentacion. Este convenio esta enfocado en promover la calidad, no la cantidad. Creemos que puede ser posible (en algunos proyectos) cumplir con este contrato con una pequeña evaluacion de riesgo, algunas páginas de requerimientos, un pequeño documento de diseño de seguridad, un plan de pruebas, y algunos resultados de pruebas.&lt;br /&gt;
&lt;br /&gt;
El objetivo de esta documentación es simplemente asegurar, en cada etapa del desarrollo de software, que se ha puesto la atención apropiada en la seguridad. Un beneficio adiciona es que esta documentacion puede ser recolectada en conjunto para formar un &amp;quot;paquete de certificación&amp;quot; que básicamente esbose el argumento de porque deberiamos confiar que el software hará lo que dice.&lt;br /&gt;
&lt;br /&gt;
==ANEXO DE CONTRATO==&lt;br /&gt;
&lt;br /&gt;
===1. INTRODUCCIÓN===&lt;br /&gt;
&lt;br /&gt;
Esta anexo esta hecho para _____________________ (&amp;quot;convenio&amp;quot;) entre el Cliente y el proveedor. Tanto el Cliente como el proveedor acuerdan maximisar la seguridad del software de acuerdo a los siguientes términos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2. FILOSOFÍA===&lt;br /&gt;
&lt;br /&gt;
Esta anexo pretende aclarar los derechos y obligaciones relacionados a seguridad de todas las partes en una relacion de desarrollo de software. Al mayor nivel, las partes acuerdan que:&lt;br /&gt;
&lt;br /&gt;
;(a) Las desiciones de seguridad estarán basadas en el riesgo : Las desciciones sobre la seguridad seran tomadas en conunto por el cliente y el proveedor basandose en un firme entendimiento de el riesgo involucrado. &lt;br /&gt;
&lt;br /&gt;
;(b) Las actividades de seguridad estarán balanceadas : El esfurzo de seguridad será distribuido equitativamente a través de todo el ciclo de desarollo de software.&lt;br /&gt;
&lt;br /&gt;
;(c) Las actividades de seguridad estarán integradas : Todas las actividades y documentación discutidas aqui pueden y deben ser integradas dentro del ciclo de desarrollo de software del proveedor y no mantenerse separadas de el resto del proyecto. Nada en este anexo implica algún processo de desarrollo de software en particular.&lt;br /&gt;
&lt;br /&gt;
;(d) Se esperan vulnerabilidades :  Todo software contiene defectos, y algunos de estos crearan problemas de seguridad. Ambos, cliente y proveedor se esforzará para identificar las vulnerabilidades tan pronto como sea posible en el ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
;(e) La información sobre seguridad será comunicada por completo : Toda la información relevante para la seguridad se compartirá entre el cliente y el proveedor inmediatamente y completamente.&lt;br /&gt;
&lt;br /&gt;
;(f) Se requerirá solo documentacion de seguridad necesaria : La documentación de seguridad no necesita ser demasiado amplia para describir claramente el diseño de seguridad, análisis de riesgo y problemas.&lt;br /&gt;
&lt;br /&gt;
===3. ACTIVIDADES EN EL CICLO DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Entendimiento del Riesgo : El proveedor y el cliente acuerdan trabajar juntos para entender y documentar los riesgos que enfrenta la aplicacion. Este esfuerzo debe identificar los riesgos clave para los activos y funciones importantes que provee la aplicación. Cada uno de los temas listados en la sección de requerimientos debe ser considerado.&lt;br /&gt;
&lt;br /&gt;
;(b) Requerimientos : Basado en los riesgos, El proveedor y cliente acuerda trabajar juntos para crear requerimientos de seguridad detallados como parte de la especificacion de el software a ser desarrollado. Cada uno de los temas listados en la sección de requerimientos de este anexo deben ser discutidos y evaluados por ambos, cliente y proveedor.  Estos requerimientos pueden ser satisfechos por software creado a la medida, software de terceros, o la plataforma. &lt;br /&gt;
&lt;br /&gt;
;(c) Diseño : el desarollador acuerda proveer documentation que explique claramente el diseño para adquirir cada uno de los requerimientos de seguridad. En muchos de los casos, esta documentacion describirá los mecanismos de seguridad, donde se incluiran dentro de la arquitectura, y todos los patrones de diseño relevantes para asegurar su uso adecuado. El diseño debe especificar claramente si tales mecanismos vienen de software a la medida, software de terceros o de la plataforma.&lt;br /&gt;
&lt;br /&gt;
;(d) Implementación : El proveedor acuerda entregar y seguir un conjunto de lineamientos de codificación segura. Estos lineamientos indicarán como sele de debe dar formato, estructurar y comentar el código fuente. Todo código relacionado a seguridad debe ser comentado profundamente. Guías sobre como evitar vulnerabilidades se seguridad comunes debe ser incluida. Tambien, todo el código debe ser revisado por al menos otro desarollador basandose en los requerimientos de seguridad y los lineamientos de codificación antes de ser conciderado listo para pruebas unitarias.&lt;br /&gt;
&lt;br /&gt;
;(e) Pruebas y análisis de seguridad : El proveedor acuerda entregar y seguir un plan de pruebas de seguridad que defina como se realizarán las pruebas o bien establecer como cada uno de los requerimientos de seguridad va a ser complido. El nivel de rigor de esta actividad debe ser considerado y detallado en un plan. El proveedor ejecutará el plan de prueba y proveera los resultados a el cliente.&lt;br /&gt;
&lt;br /&gt;
;(f) Publicación segura : El proveedor acuerda entregar lineamientos de configuración segura que describan completamente todas las opciones de configuracion relacionadas con seguridad y sus implicaciones para la seguridad del software en su conjunto. Los lineamientos deben incluir una descripción completa de las dependencias en la plataforma y como deben ser configuradas de manera segura, incluidas las del sistema operativo, servidor Web y servidor de aplicacion. La configuracion predeterminada del software debe ser segura.&lt;br /&gt;
&lt;br /&gt;
===4. ÁREAS CON REQUERIMIENTOS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
Los siguientes temas/áreas deben ser considerados durante las actividades de entendimiento de riesgo y definición de requerimientos. Este esfuerzo debe producir un conjunto de requerimientos ajustados, especificos y probables. Ambos, proveedor y cliente deben ser involucrados en este proceso y deben ponerse de acuerdo sobre el conjunto final de requerimientos.&lt;br /&gt;
&lt;br /&gt;
;(a) Validación de entradas y condificación : Los requerimientos deben especificar las reglas para canonicalización, validación y codificación de cada dato de entrada a la aplicación, ya sea de usuarios, sistemas de archivos, bases de datos o sistemas externos. La regla predeterminada debe ser que todas las entradas sean validadas a menos que cumplan con una especificacion detallada de que esta permitido. Además, los requerimientos deben especificar las acciones a tomar cuando se reciven entradas no válidas. Especificamente, la aplicación no debe ser susceptible a inyecciones, desbordamientos, manipulación y otros ataques con entradas de usuario corruptas.&lt;br /&gt;
&lt;br /&gt;
;(b) Autentificación y manejo de sessiones : Los requerimientos deben especificar como se protegeran las credenciales para autentificación y los identificadores de sesión a través del ciclo de desarrollo de software. Los requerimientos para todas las funciones relacionadas deben ser agregadas incluyendo recuperar contraseñas, cambio de contraseñas, recordar contraseñas, desconexión y conexión multiple.&lt;br /&gt;
&lt;br /&gt;
;(c) Control de Acceso : Los requerimientos deben incluir una descripcion detallada de todos los roles (grupos, privilegios, autorizaciones) usadas en la aplicación. Los requerimientos deben indicar todos los activos y funciones que provee la aplicacion. Los requerimientos deben especificar detallada y exactamente los derechos de acceso para cualquier activo y función de cada rol. Se sugiere utilizar un formato de matriz de control de acceso para documentar estas reglas.&lt;br /&gt;
&lt;br /&gt;
;(d) Manejo de Errores : Los requerimientos deben detallar como se van a manejar los errores que ocurran dentro del procesamiento. Algunas aplicaciones deberían hacer lo mejor posible en caso de un error, mientras que otras deberían terminar su procesamiento inmediatamente.&lt;br /&gt;
&lt;br /&gt;
;(e) Historial : Los requerimientos deben especificar que eventos son relevantes para la seguridad y necesitan ser registrados, como ataques detectados, intentos de conexión fallidos e intentos de exeder la autorización.  Los requerimientos deben especificar tambien que information registrar con cada evento, incluyendo hora y fecha, descripción del evento, detalles de aplicación, y otra información útil en esfuerzos forences.&lt;br /&gt;
&lt;br /&gt;
;(f) Conexiones a sistemas externos : Los requerimientos deben especifica como la autentificación y cifrado será manejado para todos los systemas externos, tales como bases de datos, directorios y servicios Web. Todas las credenciales requeridas para la comunicación con sistemas externos deben almacenarce cifradas y fuera de el código dentro de archivos de configuración. &lt;br /&gt;
&lt;br /&gt;
;(g) Cifrado : Los requerimientos deben especificar que datos deben ser cifrados, como serán cifrados y como todos los certificados y otras credenciales deben ser manejadas. Las aplicaciones deben usar algoritmos estándar implementados en una librerias de cifrado que hayan sido usadas y probadas ampliamente.&lt;br /&gt;
&lt;br /&gt;
;(h) Disponibilidad : Los requerimientos deben especificar como protegerse de ataques de negación de servicio. Todos los posibles ataques en la aplicacion deben ser considerados, incluyendo bloqueos de auntentificación, agotamiento de conexiones y otros ataques de agotamiento de recursos.&lt;br /&gt;
&lt;br /&gt;
;(i) Configuración segura : Los requerimientos deben especificar que los valores predeterminados para todas las configuraciones relacionadas a seguridad deben ser seguras. Para propósitos de auditoría, el software deberia ser capás de producir un reporte sencillo de leer que muestre los detalles de todas las configuraciones relacionadas con seguridad.&lt;br /&gt;
&lt;br /&gt;
;(j) Vulnerabilidades especificas : Los requerimientos deben incluir un conjunto de vulnerabilidades especificas que no deben estar presentes en el software. A menos que sea especificado de otra manera, el software no debe incluir ninguna de las fallas descritas en el la &amp;quot;Lista de OWASP sobre las 10 vulnerabilidades mas críticas en aplicaciones Web&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===5. PERSONAL Y ORGANIZACIÓN===&lt;br /&gt;
&lt;br /&gt;
;(a) Arquitecto en seguridad : El desarollador asignará la responsabilidad por la seguridad a un solo recurso técnico experimentado, para ser conocido como el arquitecto de seguridad del proyecto. El arquitecto de seguridad certificará la seguridad de cada entregable.&lt;br /&gt;
&lt;br /&gt;
;(b) Entrenamiento en Seguridad : el proveedor será responsable de verificar que todos los miembros del equipo de desarrollo han sido entrenados en tecnicas de programación segura.&lt;br /&gt;
&lt;br /&gt;
;(c) Desarrolladores dignos de confianza : El proveedor acuerda realizar las investigaciones de antecendentes apropiadas a todos los miembros del equipo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===6. AMBIENTE DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Codificación segura : El proveedor debe mencionar que herramientas se usarán en el ambiente de desarrollo de software para promover la codificación segura.&lt;br /&gt;
&lt;br /&gt;
;(b) Adminstración de configuración : El proveedor debe usar un sistema de control de versiones que autentifique y registre el miembro del equipo asociado con todos los cambios en el código base, todos los archivos de configuración y compilación.&lt;br /&gt;
&lt;br /&gt;
;(c) Distribución : El proveedor debe usar un proceso de compilación que construya confiablemente un archivo de distribución completo desde el código fuente. Este proceso debe incluir un método para verificar la integridad de el software entregado al cliente.&lt;br /&gt;
&lt;br /&gt;
===7. LIBRERIAS, MARCOS DE DESARROLLO Y PRODUCTOS===&lt;br /&gt;
&lt;br /&gt;
;(a) Apertura : El proveedor debe mencionar todas los aplicaciones de terceros usadas en el software, incluyendo todas las librerias, marcos de desarrollo, componentes y otros productos, ya sean comerciales, gratuitos, de código abierto o código cerrado.&lt;br /&gt;
&lt;br /&gt;
;(b) Evaluación : El proveedor debe hacer esfuerzos rasonables para asegurar que el sofware de terceros cumple con todos los términos de este contrato y es tan seguro como el código a la medida desarrollado bajo este contrato.&lt;br /&gt;
&lt;br /&gt;
===8. REVISIONES DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Derecho de revisión : El cliente tiene el derecho mandar revisar el software para buscar fallas de seguridad, esto a sus expesas y en cualquier momento dentro de los 60 dias despues de la entrega. El desarrollador acepta proveer apoyo rasonable al equipo de revisión proveyendo el codigo fuente y acceso a los ambientes de pruebas.&lt;br /&gt;
&lt;br /&gt;
;(b) Covertura de la revisión : Las revisiones de seguridad deben cubrir todos los aspectos de el software entregado, incluyendo código a la medida, componentes, productos y configuración de sistema.&lt;br /&gt;
&lt;br /&gt;
;(c) Alcance de la revisión : Al menos, la revisión debe cubrir todos los requerimientos de seguridad y debería buscar otras vulnerabilidades comunes. La revisión puede incluir una combinación de busqueda automatizada de vulnerabilidades, pruebas de intrusión, análisis estático de código fuente y revisión de código por expertos.&lt;br /&gt;
&lt;br /&gt;
;(d) Problemas encontrados : Los problemas de seguridad descubiertos serán reportados a el cliente y proveedor por igual. A todos los problemas se les dará seguimiento y serán reparados como se especifique en la sección de seguimiento de problemas de seguridad de este anexo.&lt;br /&gt;
&lt;br /&gt;
===9. ADMINISTRACIÓN DE PROBLEMAS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Identificación : El proveedor dara seguimiento a todos los problemas de seguridad descubiertos en todo el ciclo de desarrollo, ya sea un problema en los requerimientos, diseño, implementación, pruebas, publicación u operación. El riesgo asociado con cada problema de seguridad será evaluado, documentado y reportado a el cliente tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
;(b) Protección : El proveedor protegerá apropiadamente la información relacionada a problemas de seguridad y la documentación relacionada a ellos, esto, para ayudar a disminuir la probabilidad de las vulnerabilidades en el software operacioneal del cliente sean expuestas.&lt;br /&gt;
&lt;br /&gt;
;(c) Reparación : Los problemas de seguridad que sean indentificados antes de la entrega deben ser reparados por el proveedor. Los problemas de seguridad descubiertos despues de la entrega deben ser manejados en la misma manera que otros problemas funcionales según lo especificado en este contrato.&lt;br /&gt;
&lt;br /&gt;
===10. CERTEZA===&lt;br /&gt;
&lt;br /&gt;
;(a) Certeza : El proveedor proveera un &amp;quot;paquete de certificación&amp;quot; consistente en la documentación de seguridad creada a traves del proceso de desarrollo. El paquete deberá establecer que los requerimientos de seguridad, diseño, implementación y resultados de pruebas fueron completados apropiadamente y todos los problemas de seguridad fueron resueltos apropiadamente.&lt;br /&gt;
&lt;br /&gt;
;(b) Auto-Certificación : El aquitecto de seguridad certificará que el software cumple con los requerimientos de seguridad, que todas las actividades de seguridad se realizaron, y que todos los problemas de seguridad identificados han sido documentados y resueltos. Cualquier excepción a el estado de la certificacion debe estar totalmente documentada al momento de la entrega.&lt;br /&gt;
&lt;br /&gt;
;(c) No código malicioso : El proveedor garantize que el sofware no debe contener ningun código que no se alinee a algun requerimiento del software y debilite la seguridad de la aplicación, incluyendo viruses, gusanos, bombas de tiempo, puertas traseras, caballos de troya, huevos de pascua y cualquier otra forma de código malicioso.&lt;br /&gt;
&lt;br /&gt;
===11. CONCENTIMIENTO Y MANTENIMIENTO DE LA SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Consentimiento : El software no debe ser considerado como aceptado hasta que el paquete de certificación este completo y todos los problemas de seguridad han sido resueltos.&lt;br /&gt;
&lt;br /&gt;
;(b) Investigación de problemas de seguridad : Despues del concentimiento, si se sospecha (razonablemente) o descubren problemas de seguridad, el proveedor deberá asisitir al cliente en realizar una investigación para determinar la naturaleza del problema. El problema debe ser considerado &amp;quot;nuevo&amp;quot; si no es cubierto por los requerientos de seguridad y esta fuera de el alcance (razonable) de las pruebas de seguridad.&lt;br /&gt;
&lt;br /&gt;
;(c) Problemas de seguridad nuevos : El proveedor y el cliente consientes en medir el alcance y esfuerzo requerido para resolver problemas de seguridad nuevos, y negociad de buena fe para alcanzar un acuerdo y realizar el trabajor requerido para solucionarlos.&lt;br /&gt;
&lt;br /&gt;
;(d) Otros problemas de seguridad : El proveedor debe usar todos los esfuersos comercialmente rasonables consistentes con practicas de desarrollo comunes en la industria, tomando en cuenta la severidad de el riesgo, para resolver todos los problemas de seguridad considerados nuevos tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Legal Project]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79720</id>
		<title>Anexo para Contrato de Software Seguro de OWASP</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79720"/>
				<updated>2010-03-12T13:39:09Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''ANEXO DE CONTRATO PARA DESAROLLO DE SOFTWARE SEGURO'''&lt;br /&gt;
&lt;br /&gt;
  ADVERTENCIA: ESTE DOCUMENTO DEBE SER CONSIDERADO COMO UNA GUÍA SOLAMENTE.&lt;br /&gt;
  OWASP RECOMIENDA VEHEMENTEMENTE QUE CONSULTE UN ABOGADO CALIFICADO&lt;br /&gt;
  PARA AYUDARLE A NEGOCIAR UN CONTRATO DE SOFTWARE&lt;br /&gt;
  &lt;br /&gt;
== Introducción  ==&lt;br /&gt;
&lt;br /&gt;
Este anexo de contrato pretende ayudar a los proveedores de software y sus clientes a negociar y capturar importantes términos y condiciones contractuales relacionadas a la seguridad en el Software a ser desarrollado o entregado. La razon para este proyecto es que la mayoría de los contratos no mencionan estos temas, y las partes frecuentamente tienen puntos de vista dramaticamente diferentes a lo que en ralidad fue acordado. Creemos que articular claramente estos términos es la mejor manera de asegurarse que ambas partes pueden hacer desiciones informadas sobre como proceder. &lt;br /&gt;
&lt;br /&gt;
 &amp;quot;La seguridad del software comercial mejorará cuando el mercado demande mejor seguridad.&lt;br /&gt;
 Al menos, cada petición para propuestas de software debería pedir a los vendedores &lt;br /&gt;
 detallar como van ellos a probar sus productos para encotrar vulnerabilidades de&lt;br /&gt;
 seguridad. Este paso empezará convenciendo a los vendedores de software empaquetado&lt;br /&gt;
 y proveedores externos que las compañias valoran la seguridad.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- John Pescatore, Director de investiagacion con Gartner&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 Pedimos a los clientes y proveedores que usen este documento como un marco para discutir&lt;br /&gt;
 espectativas y negociar responsabilidades. Este anexo se creó para ser añadido a un&lt;br /&gt;
 contrato de desarrollo de software. Estos términos son negociables, significa que ellos&lt;br /&gt;
 pueden y deben ser discutidos por el cliente y el proveedor.&lt;br /&gt;
&lt;br /&gt;
== SOBRE EL PROYECTO ==&lt;br /&gt;
&lt;br /&gt;
Este documento fue creado por la fundación OWASP (Open Web Application Security Project por sus siglas en Inglés), una organización sin animo de lucro con el objetivo de crear herramientas y documentación, gratuita y abierta para asegurar software. Para facilitar su uso en contratación privada, este documento es de dominio publico. Puede encontrar detalles adicionales sobre este proyecto en http://www.owasp.com/index.php/OWASP_Legal_Project. Son Bienvenidos comentarios de ambos, productores y consumidores de software, asi como de la comunidad legal. &lt;br /&gt;
&lt;br /&gt;
OWASP reconoce gratamente la contribución especial de [http://www.aspectsecurity.com Aspect Security] por su rol en la investigación y preparación de este documento.&lt;br /&gt;
&lt;br /&gt;
==OBJECIONES==&lt;br /&gt;
&lt;br /&gt;
Las siguientes páginas cubren algunas objeciones que escuchamos frecuentemente sobre usar este lenguaje en contratos de desarrollo de software:&lt;br /&gt;
&lt;br /&gt;
===PERO NO TODOS LOS TÉRMINOS SON CORRECTOS PARA NOSOTROS…===&lt;br /&gt;
&lt;br /&gt;
Este documento debe ser considerado un punto de inicio para su contrato. Puede que no le gusten todas las actividades, o puede querer proponer mas. Puede querer asignar responsabilidades de manera diferente. Este document no pretende capturar exactamente las necesidades de todos los clientes y proveedores de software. Pretende proveer un marco para discutir temas clave, importantes para asegurarse que el software se cree seguro. Despues de que tengan una discusión sobre seguridad y alcancen un acuerdo. Puede ajustar el convenio para que concuerde con el contrato.&lt;br /&gt;
&lt;br /&gt;
===PERO, ¿QUIEN DEBE PAGAR POR ESTAS ACTIVIDADES?…===&lt;br /&gt;
&lt;br /&gt;
Este contrato no es sobre poner mas peso al desarollo de software. La pregunta no es sobre si hay costos asociados con seguridad (por supuesto que hay). Sino, la pregunta correcta es que actividades deberían hacerse por ambas partes para minimizar costos, y cuando deberían ocurrir.&lt;br /&gt;
&lt;br /&gt;
Este anexo no menciona (intensionalmente) sobre el detalle de quien debería pagar por la actividades descritas. Mientras muchas de estas actividades deben estar pasando ya, y son esperadas por muchos clientes, ellas no estan practicadas regularmente en la industria del software. La cuestion de quien paga (y cuando) debe ser parte de la negociación.&lt;br /&gt;
&lt;br /&gt;
Calcular el costo de la seguridad es muy difícil. Auque hay costos asociados con realizar actividades de seguridad, hay también costos importantes asociados con ignorar estas actividades. Estamos convencidos el mejor costo-beneficio para desarrollar software es reducir la probabilidad de que fallas de seguridad sean introducidas y minimzar el tiempo entre introducir una falla y arreglarla.&lt;br /&gt;
&lt;br /&gt;
Una distición importante a hacer cuando calculamos costos es entre construir mecanismos de seguridad y las actividades para asegurarse que esos mecanismos sean correctos y efectivos. Intentar agregar mecanismoa al final de el ciclo de desarrollo puede causar serios problemas de diseño e incrementará el costo dramáticamente. Este convenio promieve decisiones sobre mecanismos para minimizar estos costos. Similarmente, esperas hasta justo antes de la publicación para hacer actividades de aseguramiento, tales como revisión de código y pruebas de intrudión, tambien incrementaría los costos dramaticamente. Creemos que el mejor costo-beneficio para ganar certeza es poner un nivel constante de esfuerzo en el aseguramiento a través del ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===PERO EL NIVEL DE RIGOR ESTA INCORRECTO….===&lt;br /&gt;
&lt;br /&gt;
Este convenio asume que el software que esta siendo desarrollado es rasonablemente importante para una empresa grande o agencia de gobierno. Hemos seleccionado un &amp;quot;nivel de rigor&amp;quot; para el convenio que es alcanzable por la mayoria de las organizaciones proveedoras de software, e identificaría y manejaría los riesgos más comunes.&lt;br /&gt;
&lt;br /&gt;
Sin embargo, para el software que va a ser usado en aplicaciones críticas, como aplicaciones médicas, financieras o relacionadas con el ejército. Puede querer incrementar el nivel de rigor. Puede querer agregar revisiones, documentación y actividades adicionales de prueba. Puede querer mejorar el proceso de encontrar, diagnosticar y remediar vulnerabilidades. Para aplicaciones menos sensibles, puede desear reducir o remover actividades.&lt;br /&gt;
&lt;br /&gt;
===PERO NOSOTROS NO PODEMOS ACEPTAR TANTO RIESGO…===&lt;br /&gt;
Este convenio pretende facilitar la discusión sobre quien tomaría el riesgo por las vulnerabilidades de seguridad en el software. Por un lado del espectro, el cliente podria tomar todo el riesgo y el proveedor podria entregar código con muchas vulnerabilidades. Por el otro extremo, el proveedor podría tomar todo el riesgo y asumir la responsabilidad de entregar código perfecto. Ambos extremos son irrealizables.&lt;br /&gt;
&lt;br /&gt;
Actualmente, en este convenio, el proveedor toma el riesgo por problemas que sean descubiertos en los requerimientos o deben ser cubiertos por esfuerzos razonables en pruebas. Pero la remediación de &amp;quot;nuevos&amp;quot; problemas de seguridad tendría que ser pagado por el cliente.  Creemos que este es un equilibrio funcional, ya que limita el riesgo adquirido por el proveedor y promueve obtener requerimientos de seguridad por anticipado. Pero hay muchas otras posibles soluciones a este problema. Por favor, dejenos saber si tiene sugerencias alternas, podriamos incluirlas en versiones futuras de este documento.&lt;br /&gt;
&lt;br /&gt;
Note que la discusión aqui solo cubre el riesgo asociado con arreglar las vulnerabilidades de seguridad en el código, y no incluye los costos asociados con recuperarse de incidentes de seguridad relacionados con explotar cualquiera de esas vulnerabilidades. Estamos interesados en mejores prácticas en esta area.&lt;br /&gt;
&lt;br /&gt;
===PERO COMO PODEMOS ASEGURAR CÓDIGO DE TERCEROS…===&lt;br /&gt;
&lt;br /&gt;
Casi todos los proyectos de sofware tienen una cantidad importante de código de terceros como librarieas, frameworks y productos. Desde la perspectiva de seguridad, este código es tan importante como el código desarrollado a la medida para su proyecto.&lt;br /&gt;
Creemos  que la responsabilidad de asegurar la seguridad de este código es llevada mejor por el proveedor, aunque ellos podrían no tener toda la capacidad para garantizar la seguridad por ellos mismos. Sin embargo, La seguridad puede ser parte de el la desición de &amp;quot;construir o comprar&amp;quot;, y esta parece ser la mejor manera de promoverla.&lt;br /&gt;
&lt;br /&gt;
El proveedor, por supuesto, tiene la opción de pasar la responsabilidad a el proveedor del software de terceros. El desarrolador puede tambien analizar el código de terceros por él mismo o contratar expertos en seguridad para analizarlo por él.&lt;br /&gt;
&lt;br /&gt;
===PERO PORQUE DEBO PASAR POR TODO ESTE PROBLEMA…===&lt;br /&gt;
&lt;br /&gt;
En última instancia, creemos que no hay alternativa para hacer de la seguridad una parte de el proceso de contratación de software. Actualmente, creemos que hay serios malentendidos sobre la seguridad del código que esta siendo desarrollado bajo muchos contratos de desarrollo de software. Esto puede solamente llevar a una cara litigación y a desiciones hechas por individuos con poca experiencia y entendimiento sobre software. Lea el [[Secure software contracting hypothetical case study | Caso de estudio hipotético sobre contratación de software seguro]] para una discusión completa de este problema.&lt;br /&gt;
&lt;br /&gt;
Hay muchos beneficios al trabajar con este convenio. El principal es que pondrá claras las expectativas entre las partes involucradas. En algunos casos ayudará a evitar demandas cuando problemas de seguridad difíciles aparecen en el software. Tambien, estan son las mismas actividades requeridas por muchas razónes legales y de conformidad con estándares/leyes.&lt;br /&gt;
&lt;br /&gt;
===PERO ES MUY DIFÍCIL PRODUCIR TODA ESTA DOCUMENTACIÓN…===&lt;br /&gt;
&lt;br /&gt;
OWASP no promueve la documentacion por la simpre documentacion. Este convenio esta enfocado en promover la calidad, no la cantidad. Creemos que puede ser posible (en algunos proyectos) cumplir con este contrato con una pequeña evaluacion de riesgo, algunas páginas de requerimientos, un pequeño documento de diseño de seguridad, un plan de pruebas, y algunos resultados de pruebas.&lt;br /&gt;
&lt;br /&gt;
El objetivo de esta documentación es simplemente asegurar, en cada etapa del desarrollo de software, que se ha puesto la atención apropiada en la seguridad. Un beneficio adiciona es que esta documentacion puede ser recolectada en conjunto para formar un &amp;quot;paquete de certificación&amp;quot; que básicamente esbose el argumento de porque deberiamos confiar que el software hará lo que dice.&lt;br /&gt;
&lt;br /&gt;
==ANEXO DE CONTRATO==&lt;br /&gt;
&lt;br /&gt;
===1. INTRODUCCIÓN===&lt;br /&gt;
&lt;br /&gt;
Esta anexo esta hecho para _____________________ (&amp;quot;convenio&amp;quot;) entre el Cliente y el proveedor. Tanto el Cliente como el proveedor acuerdan maximisar la seguridad del software de acuerdo a los siguientes términos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2. FILOSOFÍA===&lt;br /&gt;
&lt;br /&gt;
Esta anexo pretende aclarar los derechos y obligaciones relacionados a seguridad de todas las partes en una relacion de desarrollo de software. Al mayor nivel, las partes acuerdan que:&lt;br /&gt;
&lt;br /&gt;
;(a) Las desiciones de seguridad estarán basadas en el riesgo : Las desciciones sobre la seguridad seran tomadas en conunto por el cliente y el proveedor basandose en un firme entendimiento de el riesgo involucrado. &lt;br /&gt;
&lt;br /&gt;
;(b) Las actividades de seguridad estarán balanceadas : El esfurzo de seguridad será distribuido equitativamente a través de todo el ciclo de desarollo de software.&lt;br /&gt;
&lt;br /&gt;
;(c) Las actividades de seguridad estarán integradas : Todas las actividades y documentación discutidas aqui pueden y deben ser integradas dentro del ciclo de desarrollo de software del proveedor y no mantenerse separadas de el resto del proyecto. Nada en este anexo implica algún processo de desarrollo de software en particular.&lt;br /&gt;
&lt;br /&gt;
;(d) Se esperan vulnerabilidades :  Todo software contiene defectos, y algunos de estos crearan problemas de seguridad. Ambos, cliente y proveedor se esforzará para identificar las vulnerabilidades tan pronto como sea posible en el ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
;(e) La información sobre seguridad será comunicada por completo : Toda la información relevante para la seguridad se compartirá entre el cliente y el proveedor inmediatamente y completamente.&lt;br /&gt;
&lt;br /&gt;
;(f) Se requerirá solo documentacion de seguridad necesaria : La documentación de seguridad no necesita ser demasiado amplia para describir claramente el diseño de seguridad, análisis de riesgo y problemas.&lt;br /&gt;
&lt;br /&gt;
===3. ACTIVIDADES EN EL CICLO DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Entendimiento del Riesgo : El proveedor y el cliente acuerdan trabajar juntos para entender y documentar los riesgos que enfrenta la aplicacion. Este esfuerzo debe identificar los riesgos clave para los activos y funciones importantes que provee la aplicación. Cada uno de los temas listados en la sección de requerimientos debe ser considerado.&lt;br /&gt;
&lt;br /&gt;
;(b) Requerimientos : Basado en los riesgos, El proveedor y cliente acuerda trabajar juntos para crear requerimientos de seguridad detallados como parte de la especificacion de el software a ser desarrollado. Cada uno de los temas listados en la sección de requerimientos de este anexo deben ser discutidos y evaluados por ambos, cliente y proveedor.  Estos requerimientos pueden ser satisfechos por software creado a la medida, software de terceros, o la plataforma. &lt;br /&gt;
&lt;br /&gt;
;(c) Diseño : el desarollador acuerda proveer documentation que explique claramente el diseño para adquirir cada uno de los requerimientos de seguridad. En muchos de los casos, esta documentacion describirá los mecanismos de seguridad, donde se incluiran dentro de la arquitectura, y todos los patrones de diseño relevantes para asegurar su uso adecuado. El diseño debe especificar claramente si tales mecanismos vienen de software a la medida, software de terceros o de la plataforma.&lt;br /&gt;
&lt;br /&gt;
;(d) Implementación : El proveedor acuerda entregar y seguir un conjunto de lineamientos de codificación segura. Estos lineamientos indicarán como sele de debe dar formato, estructurar y comentar el código fuente. Todo código relacionado a seguridad debe ser comentado profundamente. Guías sobre como evitar vulnerabilidades se seguridad comunes debe ser incluida. Tambien, todo el código debe ser revisado por al menos otro desarollador basandose en los requerimientos de seguridad y los lineamientos de codificación antes de ser conciderado listo para pruebas unitarias.&lt;br /&gt;
&lt;br /&gt;
;(e) Pruebas y análisis de seguridad : El proveedor acuerda entregar y seguir un plan de pruebas de seguridad que defina como se realizarán las pruebas o bien establecer como cada uno de los requerimientos de seguridad va a ser complido. El nivel de rigor de esta actividad debe ser considerado y detallado en un plan. El proveedor ejecutará el plan de prueba y proveera los resultados a el cliente.&lt;br /&gt;
&lt;br /&gt;
;(f) Publicación segura : El proveedor acuerda entregar lineamientos de configuración segura que describan completamente todas las opciones de configuracion relacionadas con seguridad y sus implicaciones para la seguridad del software en su conjunto. Los lineamientos deben incluir una descripción completa de las dependencias en la plataforma y como deben ser configuradas de manera segura, incluidas las del sistema operativo, servidor Web y servidor de aplicacion. La configuracion predeterminada del software debe ser segura.&lt;br /&gt;
&lt;br /&gt;
===4. ÁREAS CON REQUERIMIENTOS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
Los siguientes temas/áreas deben ser considerados durante las actividades de entendimiento de riesgo y definición de requerimientos. Este esfuerzo debe producir un conjunto de requerimientos ajustados, especificos y probables. Ambos, proveedor y cliente deben ser involucrados en este proceso y deben ponerse de acuerdo sobre el conjunto final de requerimientos.&lt;br /&gt;
&lt;br /&gt;
;(a) Validación de entradas y condificación : Los requerimientos deben especificar las reglas para canonicalización, validación y codificación de cada dato de entrada a la aplicación, ya sea de usuarios, sistemas de archivos, bases de datos o sistemas externos. La regla predeterminada debe ser que todas las entradas sean validadas a menos que cumplan con una especificacion detallada de que esta permitido. Además, los requerimientos deben especificar las acciones a tomar cuando se reciven entradas no válidas. Especificamente, la aplicación no debe ser susceptible a inyecciones, desbordamientos, manipulación y otros ataques con entradas de usuario corruptas.&lt;br /&gt;
&lt;br /&gt;
;(b) Autentificación y manejo de sessiones : Los requerimientos deben especificar como se protegeran las credenciales para autentificación y los identificadores de sesión a través del ciclo de desarrollo de software. Los requerimientos para todas las funciones relacionadas deben ser agregadas incluyendo recuperar contraseñas, cambio de contraseñas, recordar contraseñas, desconexión y conexión multiple.&lt;br /&gt;
&lt;br /&gt;
;(c) Control de Acceso : Los requerimientos deben incluir una descripcion detallada de todos los roles (grupos, privilegios, autorizaciones) usadas en la aplicación. Los requerimientos deben indicar todos los activos y funciones que provee la aplicacion. Los requerimientos deben especificar detallada y exactamente los derechos de acceso para cualquier activo y función de cada rol. Se sugiere utilizar un formato de matriz de control de acceso para documentar estas reglas.&lt;br /&gt;
&lt;br /&gt;
;(d) Manejo de Errores : Los requerimientos deben detallar como se van a manejar los errores que ocurran dentro del procesamiento. Algunas aplicaciones deberían hacer lo mejor posible en caso de un error, mientras que otras deberían terminar su procesamiento inmediatamente.&lt;br /&gt;
&lt;br /&gt;
;(e) Historial : Los requerimientos deben especificar que eventos son relevantes para la seguridad y necesitan ser registrados, como ataques detectados, intentos de conexión fallidos e intentos de exeder la autorización.  Los requerimientos deben especificar tambien que information registrar con cada evento, incluyendo hora y fecha, descripción del evento, detalles de aplicación, y otra información útil en esfuerzos forences.&lt;br /&gt;
&lt;br /&gt;
;(f) Conexiones a sistemas externos : Los requerimientos deben especifica como la autentificación y cifrado será manejado para todos los systemas externos, tales como bases de datos, directorios y servicios Web. Todas las credenciales requeridas para la comunicación con sistemas externos deben almacenarce cifradas y fuera de el código dentro de archivos de configuración. &lt;br /&gt;
&lt;br /&gt;
;(g) Cifrado : Los requerimientos deben especificar que datos deben ser cifrados, como serán cifrados y como todos los certificados y otras credenciales deben ser manejadas. Las aplicaciones deben usar algoritmos estándar implementados en una librerias de cifrado que hayan sido usadas y probadas ampliamente.&lt;br /&gt;
&lt;br /&gt;
;(h) Disponibilidad : Los requerimientos deben especificar como protegerse de ataques de negación de servicio. Todos los posibles ataques en la aplicacion deben ser considerados, incluyendo bloqueos de auntentificación, agotamiento de conexiones y otros ataques de agotamiento de recursos.&lt;br /&gt;
&lt;br /&gt;
;(i) Configuración segura : Los requerimientos deben especificar que los valores predeterminados para todas las configuraciones relacionadas a seguridad deben ser seguras. Para propósitos de auditoría, el software deberia ser capás de producir un reporte sencillo de leer que muestre los detalles de todas las configuraciones relacionadas con seguridad.&lt;br /&gt;
&lt;br /&gt;
;(j) Vulnerabilidades especificas : Los requerimientos deben incluir un conjunto de vulnerabilidades especificas que no deben estar presentes en el software. A menos que sea especificado de otra manera, el software no debe incluir ninguna de las fallas descritas en el la &amp;quot;Lista de OWASP sobre las 10 vulnerabilidades mas críticas en aplicaciones Web&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===5. PERSONAL Y ORGANIZACIÓN===&lt;br /&gt;
&lt;br /&gt;
;(a) Arquitecto en seguridad : El desarollador asignará la responsabilidad por la seguridad a un solo recurso técnico experimentado, para ser conocido como el arquitecto de seguridad del proyecto. El arquitecto de seguridad certificará la seguridad de cada entregable.&lt;br /&gt;
&lt;br /&gt;
;(b) Entrenamiento en Seguridad : el proveedor será responsable de verificar que todos los miembros del equipo de desarrollo han sido entrenados en tecnicas de programación segura.&lt;br /&gt;
&lt;br /&gt;
;(c) Desarrolladores dignos de confianza : El proveedor acuerda realizar las investigaciones de antecendentes apropiadas a todos los miembros del equipo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===6. AMBIENTE DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Codificación segura : El proveedor debe mencionar que herramientas se usarán en el ambiente de desarrollo de software para promover la codificación segura.&lt;br /&gt;
&lt;br /&gt;
;(b) Adminstración de configuración : El proveedor debe usar un sistema de control de versiones que autentifique y registre el miembro del equipo asociado con todos los cambios en el código base, todos los archivos de configuración y compilación.&lt;br /&gt;
&lt;br /&gt;
;(c) Distribución : El proveedor debe usar un proceso de compilación que construya confiablemente un archivo de distribución completo desde el código fuente. Este proceso debe incluir un método para verificar la integridad de el software entregado al cliente.&lt;br /&gt;
&lt;br /&gt;
===7. LIBRERIAS, MARCOS DE DESARROLLO Y PRODUCTOS===&lt;br /&gt;
&lt;br /&gt;
;(a) Apertura : El proveedor debe mencionar todas los aplicaciones de terceros usadas en el software, incluyendo todas las librerias, marcos de desarrollo, componentes y otros productos, ya sean comerciales, gratuitos, de código abierto o código cerrado.&lt;br /&gt;
&lt;br /&gt;
;(b) Evaluación : El proveedor debe hacer esfuerzos rasonables para asegurar que el sofware de terceros cumple con todos los términos de este contrato y es tan seguro como el código a la medida desarrollado bajo este contrato.&lt;br /&gt;
&lt;br /&gt;
===8. REVISIONES DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Derecho de revisión : El cliente tiene el derecho mandar revisar el software para buscar fallas de seguridad, esto a sus expesas y en cualquier momento dentro de los 60 dias despues de la entrega. El desarrollador acepta proveer apoyo rasonable al equipo de revisión proveyendo el codigo fuente y acceso a los ambientes de pruebas.&lt;br /&gt;
&lt;br /&gt;
;(b) Covertura de la revisión : Las revisiones de seguridad deben cubrir todos los aspectos de el software entregado, incluyendo código a la medida, componentes, productos y configuración de sistema.&lt;br /&gt;
&lt;br /&gt;
;(c) Alcance de la revisión : Al menos, la revisión debe cubrir todos los requerimientos de seguridad y debería buscar otras vulnerabilidades comunes. La revisión puede incluir una combinación de busqueda automatizada de vulnerabilidades, pruebas de intrusión, análisis estático de código fuente y revisión de código por expertos.&lt;br /&gt;
&lt;br /&gt;
;(d) Problemas encontrados : Los problemas de seguridad descubiertos serán reportados a el cliente y proveedor por igual. A todos los problemas se les dará seguimiento y serán reparados como se especifique en la sección de seguimiento de problemas de seguridad de este anexo.&lt;br /&gt;
&lt;br /&gt;
===9. ADMINISTRACIÓN DE PROBLEMAS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Identificación : El proveedor dara seguimiento a todos los problemas de seguridad descubiertos en todo el ciclo de desarrollo, ya sea un problema en los requerimientos, diseño, implementación, pruebas, publicación u operación. El riesgo asociado con cada problema de seguridad será evaluado, documentado y reportado a el cliente tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
;(b) Protección : El proveedor protegerá apropiadamente la información relacionada a problemas de seguridad y la documentación relacionada a ellos, esto, para ayudar a disminuir la probabilidad de las vulnerabilidades en el software operacioneal del cliente sean expuestas.&lt;br /&gt;
&lt;br /&gt;
;(c) Reparación : Los problemas de seguridad que sean indentificados antes de la entrega deben ser reparados por el proveedor. Los problemas de seguridad descubiertos despues de la entrega deben ser manejados en la misma manera que otros problemas funcionales según lo especificado en este contrato.&lt;br /&gt;
&lt;br /&gt;
===10. CERTEZA===&lt;br /&gt;
&lt;br /&gt;
;(a) Certeza : El proveedor proveera un &amp;quot;paquete de certificación&amp;quot; consistente en la documentación de seguridad creada a traves del proceso de desarrollo. El paquete deberá establecer que los requerimientos de seguridad, diseño, implementación y resultados de pruebas fueron completados apropiadamente y todos los problemas de seguridad fueron resueltos apropiadamente.&lt;br /&gt;
&lt;br /&gt;
;(b) Auto-Certificación : El aquitecto de seguridad certificará que el software cumple con los requerimientos de seguridad, que todas las actividades de seguridad se realizaron, y que todos los problemas de seguridad identificados han sido documentados y resueltos. Cualquier excepción a el estado de la certificacion debe estar totalmente documentada al momento de la entrega.&lt;br /&gt;
&lt;br /&gt;
;(c) No código malicioso : El proveedor garantize que el sofware no debe contener ningun código que no se alinee a algun requerimiento del software y debilite la seguridad de la aplicación, incluyendo viruses, gusanos, bombas de tiempo, puertas traseras, caballos de troya, huevos de pascua y cualquier otra forma de código malicioso.&lt;br /&gt;
&lt;br /&gt;
===11. CONCENTIMIENTO Y MANTENIMIENTO DE LA SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Consentimiento : El software no debe ser considerado como aceptado hasta que el paquete de certificación este completo y todos los problemas de seguridad han sido resueltos.&lt;br /&gt;
&lt;br /&gt;
;(b) Investigación de problemas de seguridad : Despues del concentimiento, si se sospecha (razonablemente) o descubren problemas de seguridad, el proveedor deberá asisitir al cliente en realizar una investigación para determinar la naturaleza del problema. El problema debe ser considerado &amp;quot;nuevo&amp;quot; si no es cubierto por los requerientos de seguridad y esta fuera de el alcance (razonable) de las pruebas de seguridad.&lt;br /&gt;
&lt;br /&gt;
;(c) Problemas de seguridad nuevos : El proveedor y el cliente consientes en medir el alcance y esfuerzo requerido para resolver problemas de seguridad nuevos, y negociad de buena fe para alcanzar un acuerdo y realizar el trabajor requerido para solucionarlos.&lt;br /&gt;
&lt;br /&gt;
;(d) Otros problemas de seguridad : El proveedor debe usar todos los esfuersos comercialmente rasonables consistentes con practicas de desarrollo comunes en la industria, tomando en cuenta la severidad de el riesgo, para resolver todos los problemas de seguridad considerados nuevos tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Legal Project]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79719</id>
		<title>Anexo para Contrato de Software Seguro de OWASP</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79719"/>
				<updated>2010-03-12T13:37:51Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''ANEXO DE CONTRATO PARA DESAROLLO DE SOFTWARE SEGURO'''&lt;br /&gt;
&lt;br /&gt;
  ADVERTENCIA: ESTE DOCUMENTO DEBE SER CONSIDERADO COMO UNA GUÍA SOLAMENTE.&lt;br /&gt;
  OWASP RECOMIENDA VEHEMENTEMENTE QUE CONSULTE UN ABOGADO CALIFICADO&lt;br /&gt;
  PARA AYUDARLE A NEGOCIAR UN CONTRATO DE SOFTWARE&lt;br /&gt;
  &lt;br /&gt;
== Introducción  ==&lt;br /&gt;
&lt;br /&gt;
Este anexo de contrato pretende ayudar a los proveedores de software y sus clientes a negociar y capturar importantes términos y condiciones contractuales relacionadas a la seguridad en el Software a ser desarrollado o entregado. La razon para este proyecto es que la mayoría de los contratos no mencionan estos temas, y las partes frecuentamente tienen puntos de vista dramaticamente diferentes a lo que en ralidad fue acordado. Creemos que articular claramente estos términos es la mejor manera de asegurarse que ambas partes pueden hacer desiciones informadas sobre como proceder. &lt;br /&gt;
&lt;br /&gt;
 &amp;quot;La seguridad del software comercial mejorará cuando el mercado demande mejor seguridad.&lt;br /&gt;
 Al menos, cada petición para propuestas de software debería pedir a los vendedores &lt;br /&gt;
 detallar como van ellos a probar sus productos para encotrar vulnerabilidades de&lt;br /&gt;
 seguridad. Este paso empezará convenciendo a los vendedores de software empaquetado&lt;br /&gt;
 y proveedores externos que las compañias valoran la seguridad.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- John Pescatore, Director de investiagacion con Gartner&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 Pedimos a los clientes y proveedores que usen este documento como un marco para discutir&lt;br /&gt;
 espectativas y negociar responsabilidades. Este anexo se creó para ser añadido a un&lt;br /&gt;
 contrato de desarrollo de software. Estos términos son negociables, significa que ellos&lt;br /&gt;
 pueden y deben ser discutidos por el cliente y el proveedor.&lt;br /&gt;
&lt;br /&gt;
==SOBRE EL PROYECTO==&lt;br /&gt;
Este documento fue creado por la fundación OWASP (Open Web Application Security Project por sus siglas en Inglés), una organización caritativa sin animos de lucro con el objetivo de crear herramientas y documentación, gratuita y abierta para asegurar software. Para facilitar su uso en contratación privada, este documento es de dominio publico. Puede encontrar detalles adicionales sobre este proyecto en http://www.owasp.com/index.php/OWASP_Legal_Project. Son Bienvenidos comentarios de ambos, productores y consumidores de software, asi como de la comunidad legal.&lt;br /&gt;
&lt;br /&gt;
OWASP reconoce gratamente la contribución especial de [http://www.aspectsecurity.com Aspect Security] por su rol en la investigación y preparación de este documento.&lt;br /&gt;
&lt;br /&gt;
==OBJECIONES==&lt;br /&gt;
&lt;br /&gt;
Las siguientes páginas cubren algunas objeciones que escuchamos frecuentemente sobre usar este lenguaje en contratos de desarrollo de software:&lt;br /&gt;
&lt;br /&gt;
===PERO NO TODOS LOS TÉRMINOS SON CORRECTOS PARA NOSOTROS…===&lt;br /&gt;
&lt;br /&gt;
Este documento debe ser considerado un punto de inicio para su contrato. Puede que no le gusten todas las actividades, o puede querer proponer mas. Puede querer asignar responsabilidades de manera diferente. Este document no pretende capturar exactamente las necesidades de todos los clientes y proveedores de software. Pretende proveer un marco para discutir temas clave, importantes para asegurarse que el software se cree seguro. Despues de que tengan una discusión sobre seguridad y alcancen un acuerdo. Puede ajustar el convenio para que concuerde con el contrato.&lt;br /&gt;
&lt;br /&gt;
===PERO, ¿QUIEN DEBE PAGAR POR ESTAS ACTIVIDADES?…===&lt;br /&gt;
&lt;br /&gt;
Este contrato no es sobre poner mas peso al desarollo de software. La pregunta no es sobre si hay costos asociados con seguridad (por supuesto que hay). Sino, la pregunta correcta es que actividades deberían hacerse por ambas partes para minimizar costos, y cuando deberían ocurrir.&lt;br /&gt;
&lt;br /&gt;
Este anexo no menciona (intensionalmente) sobre el detalle de quien debería pagar por la actividades descritas. Mientras muchas de estas actividades deben estar pasando ya, y son esperadas por muchos clientes, ellas no estan practicadas regularmente en la industria del software. La cuestion de quien paga (y cuando) debe ser parte de la negociación.&lt;br /&gt;
&lt;br /&gt;
Calcular el costo de la seguridad es muy difícil. Auque hay costos asociados con realizar actividades de seguridad, hay también costos importantes asociados con ignorar estas actividades. Estamos convencidos el mejor costo-beneficio para desarrollar software es reducir la probabilidad de que fallas de seguridad sean introducidas y minimzar el tiempo entre introducir una falla y arreglarla.&lt;br /&gt;
&lt;br /&gt;
Una distición importante a hacer cuando calculamos costos es entre construir mecanismos de seguridad y las actividades para asegurarse que esos mecanismos sean correctos y efectivos. Intentar agregar mecanismoa al final de el ciclo de desarrollo puede causar serios problemas de diseño e incrementará el costo dramáticamente. Este convenio promieve decisiones sobre mecanismos para minimizar estos costos. Similarmente, esperas hasta justo antes de la publicación para hacer actividades de aseguramiento, tales como revisión de código y pruebas de intrudión, tambien incrementaría los costos dramaticamente. Creemos que el mejor costo-beneficio para ganar certeza es poner un nivel constante de esfuerzo en el aseguramiento a través del ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===PERO EL NIVEL DE RIGOR ESTA INCORRECTO….===&lt;br /&gt;
&lt;br /&gt;
Este convenio asume que el software que esta siendo desarrollado es rasonablemente importante para una empresa grande o agencia de gobierno. Hemos seleccionado un &amp;quot;nivel de rigor&amp;quot; para el convenio que es alcanzable por la mayoria de las organizaciones proveedoras de software, e identificaría y manejaría los riesgos más comunes.&lt;br /&gt;
&lt;br /&gt;
Sin embargo, para el software que va a ser usado en aplicaciones críticas, como aplicaciones médicas, financieras o relacionadas con el ejército. Puede querer incrementar el nivel de rigor. Puede querer agregar revisiones, documentación y actividades adicionales de prueba. Puede querer mejorar el proceso de encontrar, diagnosticar y remediar vulnerabilidades. Para aplicaciones menos sensibles, puede desear reducir o remover actividades.&lt;br /&gt;
&lt;br /&gt;
===PERO NOSOTROS NO PODEMOS ACEPTAR TANTO RIESGO…===&lt;br /&gt;
Este convenio pretende facilitar la discusión sobre quien tomaría el riesgo por las vulnerabilidades de seguridad en el software. Por un lado del espectro, el cliente podria tomar todo el riesgo y el proveedor podria entregar código con muchas vulnerabilidades. Por el otro extremo, el proveedor podría tomar todo el riesgo y asumir la responsabilidad de entregar código perfecto. Ambos extremos son irrealizables.&lt;br /&gt;
&lt;br /&gt;
Actualmente, en este convenio, el proveedor toma el riesgo por problemas que sean descubiertos en los requerimientos o deben ser cubiertos por esfuerzos razonables en pruebas. Pero la remediación de &amp;quot;nuevos&amp;quot; problemas de seguridad tendría que ser pagado por el cliente.  Creemos que este es un equilibrio funcional, ya que limita el riesgo adquirido por el proveedor y promueve obtener requerimientos de seguridad por anticipado. Pero hay muchas otras posibles soluciones a este problema. Por favor, dejenos saber si tiene sugerencias alternas, podriamos incluirlas en versiones futuras de este documento.&lt;br /&gt;
&lt;br /&gt;
Note que la discusión aqui solo cubre el riesgo asociado con arreglar las vulnerabilidades de seguridad en el código, y no incluye los costos asociados con recuperarse de incidentes de seguridad relacionados con explotar cualquiera de esas vulnerabilidades. Estamos interesados en mejores prácticas en esta area.&lt;br /&gt;
&lt;br /&gt;
===PERO COMO PODEMOS ASEGURAR CÓDIGO DE TERCEROS…===&lt;br /&gt;
&lt;br /&gt;
Casi todos los proyectos de sofware tienen una cantidad importante de código de terceros como librarieas, frameworks y productos. Desde la perspectiva de seguridad, este código es tan importante como el código desarrollado a la medida para su proyecto.&lt;br /&gt;
Creemos  que la responsabilidad de asegurar la seguridad de este código es llevada mejor por el proveedor, aunque ellos podrían no tener toda la capacidad para garantizar la seguridad por ellos mismos. Sin embargo, La seguridad puede ser parte de el la desición de &amp;quot;construir o comprar&amp;quot;, y esta parece ser la mejor manera de promoverla.&lt;br /&gt;
&lt;br /&gt;
El proveedor, por supuesto, tiene la opción de pasar la responsabilidad a el proveedor del software de terceros. El desarrolador puede tambien analizar el código de terceros por él mismo o contratar expertos en seguridad para analizarlo por él.&lt;br /&gt;
&lt;br /&gt;
===PERO PORQUE DEBO PASAR POR TODO ESTE PROBLEMA…===&lt;br /&gt;
&lt;br /&gt;
En última instancia, creemos que no hay alternativa para hacer de la seguridad una parte de el proceso de contratación de software. Actualmente, creemos que hay serios malentendidos sobre la seguridad del código que esta siendo desarrollado bajo muchos contratos de desarrollo de software. Esto puede solamente llevar a una cara litigación y a desiciones hechas por individuos con poca experiencia y entendimiento sobre software. Lea el [[Secure software contracting hypothetical case study | Caso de estudio hipotético sobre contratación de software seguro]] para una discusión completa de este problema.&lt;br /&gt;
&lt;br /&gt;
Hay muchos beneficios al trabajar con este convenio. El principal es que pondrá claras las expectativas entre las partes involucradas. En algunos casos ayudará a evitar demandas cuando problemas de seguridad difíciles aparecen en el software. Tambien, estan son las mismas actividades requeridas por muchas razónes legales y de conformidad con estándares/leyes.&lt;br /&gt;
&lt;br /&gt;
===PERO ES MUY DIFÍCIL PRODUCIR TODA ESTA DOCUMENTACIÓN…===&lt;br /&gt;
&lt;br /&gt;
OWASP no promueve la documentacion por la simpre documentacion. Este convenio esta enfocado en promover la calidad, no la cantidad. Creemos que puede ser posible (en algunos proyectos) cumplir con este contrato con una pequeña evaluacion de riesgo, algunas páginas de requerimientos, un pequeño documento de diseño de seguridad, un plan de pruebas, y algunos resultados de pruebas.&lt;br /&gt;
&lt;br /&gt;
El objetivo de esta documentación es simplemente asegurar, en cada etapa del desarrollo de software, que se ha puesto la atención apropiada en la seguridad. Un beneficio adiciona es que esta documentacion puede ser recolectada en conjunto para formar un &amp;quot;paquete de certificación&amp;quot; que básicamente esbose el argumento de porque deberiamos confiar que el software hará lo que dice.&lt;br /&gt;
&lt;br /&gt;
==ANEXO DE CONTRATO==&lt;br /&gt;
&lt;br /&gt;
===1. INTRODUCCIÓN===&lt;br /&gt;
&lt;br /&gt;
Esta anexo esta hecho para _____________________ (&amp;quot;convenio&amp;quot;) entre el Cliente y el proveedor. Tanto el Cliente como el proveedor acuerdan maximisar la seguridad del software de acuerdo a los siguientes términos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2. FILOSOFÍA===&lt;br /&gt;
&lt;br /&gt;
Esta anexo pretende aclarar los derechos y obligaciones relacionados a seguridad de todas las partes en una relacion de desarrollo de software. Al mayor nivel, las partes acuerdan que:&lt;br /&gt;
&lt;br /&gt;
;(a) Las desiciones de seguridad estarán basadas en el riesgo : Las desciciones sobre la seguridad seran tomadas en conunto por el cliente y el proveedor basandose en un firme entendimiento de el riesgo involucrado. &lt;br /&gt;
&lt;br /&gt;
;(b) Las actividades de seguridad estarán balanceadas : El esfurzo de seguridad será distribuido equitativamente a través de todo el ciclo de desarollo de software.&lt;br /&gt;
&lt;br /&gt;
;(c) Las actividades de seguridad estarán integradas : Todas las actividades y documentación discutidas aqui pueden y deben ser integradas dentro del ciclo de desarrollo de software del proveedor y no mantenerse separadas de el resto del proyecto. Nada en este anexo implica algún processo de desarrollo de software en particular.&lt;br /&gt;
&lt;br /&gt;
;(d) Se esperan vulnerabilidades :  Todo software contiene defectos, y algunos de estos crearan problemas de seguridad. Ambos, cliente y proveedor se esforzará para identificar las vulnerabilidades tan pronto como sea posible en el ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
;(e) La información sobre seguridad será comunicada por completo : Toda la información relevante para la seguridad se compartirá entre el cliente y el proveedor inmediatamente y completamente.&lt;br /&gt;
&lt;br /&gt;
;(f) Se requerirá solo documentacion de seguridad necesaria : La documentación de seguridad no necesita ser demasiado amplia para describir claramente el diseño de seguridad, análisis de riesgo y problemas.&lt;br /&gt;
&lt;br /&gt;
===3. ACTIVIDADES EN EL CICLO DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Entendimiento del Riesgo : El proveedor y el cliente acuerdan trabajar juntos para entender y documentar los riesgos que enfrenta la aplicacion. Este esfuerzo debe identificar los riesgos clave para los activos y funciones importantes que provee la aplicación. Cada uno de los temas listados en la sección de requerimientos debe ser considerado.&lt;br /&gt;
&lt;br /&gt;
;(b) Requerimientos : Basado en los riesgos, El proveedor y cliente acuerda trabajar juntos para crear requerimientos de seguridad detallados como parte de la especificacion de el software a ser desarrollado. Cada uno de los temas listados en la sección de requerimientos de este anexo deben ser discutidos y evaluados por ambos, cliente y proveedor.  Estos requerimientos pueden ser satisfechos por software creado a la medida, software de terceros, o la plataforma. &lt;br /&gt;
&lt;br /&gt;
;(c) Diseño : el desarollador acuerda proveer documentation que explique claramente el diseño para adquirir cada uno de los requerimientos de seguridad. En muchos de los casos, esta documentacion describirá los mecanismos de seguridad, donde se incluiran dentro de la arquitectura, y todos los patrones de diseño relevantes para asegurar su uso adecuado. El diseño debe especificar claramente si tales mecanismos vienen de software a la medida, software de terceros o de la plataforma.&lt;br /&gt;
&lt;br /&gt;
;(d) Implementación : El proveedor acuerda entregar y seguir un conjunto de lineamientos de codificación segura. Estos lineamientos indicarán como sele de debe dar formato, estructurar y comentar el código fuente. Todo código relacionado a seguridad debe ser comentado profundamente. Guías sobre como evitar vulnerabilidades se seguridad comunes debe ser incluida. Tambien, todo el código debe ser revisado por al menos otro desarollador basandose en los requerimientos de seguridad y los lineamientos de codificación antes de ser conciderado listo para pruebas unitarias.&lt;br /&gt;
&lt;br /&gt;
;(e) Pruebas y análisis de seguridad : El proveedor acuerda entregar y seguir un plan de pruebas de seguridad que defina como se realizarán las pruebas o bien establecer como cada uno de los requerimientos de seguridad va a ser complido. El nivel de rigor de esta actividad debe ser considerado y detallado en un plan. El proveedor ejecutará el plan de prueba y proveera los resultados a el cliente.&lt;br /&gt;
&lt;br /&gt;
;(f) Publicación segura : El proveedor acuerda entregar lineamientos de configuración segura que describan completamente todas las opciones de configuracion relacionadas con seguridad y sus implicaciones para la seguridad del software en su conjunto. Los lineamientos deben incluir una descripción completa de las dependencias en la plataforma y como deben ser configuradas de manera segura, incluidas las del sistema operativo, servidor Web y servidor de aplicacion. La configuracion predeterminada del software debe ser segura.&lt;br /&gt;
&lt;br /&gt;
===4. ÁREAS CON REQUERIMIENTOS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
Los siguientes temas/áreas deben ser considerados durante las actividades de entendimiento de riesgo y definición de requerimientos. Este esfuerzo debe producir un conjunto de requerimientos ajustados, especificos y probables. Ambos, proveedor y cliente deben ser involucrados en este proceso y deben ponerse de acuerdo sobre el conjunto final de requerimientos.&lt;br /&gt;
&lt;br /&gt;
;(a) Validación de entradas y condificación : Los requerimientos deben especificar las reglas para canonicalización, validación y codificación de cada dato de entrada a la aplicación, ya sea de usuarios, sistemas de archivos, bases de datos o sistemas externos. La regla predeterminada debe ser que todas las entradas sean validadas a menos que cumplan con una especificacion detallada de que esta permitido. Además, los requerimientos deben especificar las acciones a tomar cuando se reciven entradas no válidas. Especificamente, la aplicación no debe ser susceptible a inyecciones, desbordamientos, manipulación y otros ataques con entradas de usuario corruptas.&lt;br /&gt;
&lt;br /&gt;
;(b) Autentificación y manejo de sessiones : Los requerimientos deben especificar como se protegeran las credenciales para autentificación y los identificadores de sesión a través del ciclo de desarrollo de software. Los requerimientos para todas las funciones relacionadas deben ser agregadas incluyendo recuperar contraseñas, cambio de contraseñas, recordar contraseñas, desconexión y conexión multiple.&lt;br /&gt;
&lt;br /&gt;
;(c) Control de Acceso : Los requerimientos deben incluir una descripcion detallada de todos los roles (grupos, privilegios, autorizaciones) usadas en la aplicación. Los requerimientos deben indicar todos los activos y funciones que provee la aplicacion. Los requerimientos deben especificar detallada y exactamente los derechos de acceso para cualquier activo y función de cada rol. Se sugiere utilizar un formato de matriz de control de acceso para documentar estas reglas.&lt;br /&gt;
&lt;br /&gt;
;(d) Manejo de Errores : Los requerimientos deben detallar como se van a manejar los errores que ocurran dentro del procesamiento. Algunas aplicaciones deberían hacer lo mejor posible en caso de un error, mientras que otras deberían terminar su procesamiento inmediatamente.&lt;br /&gt;
&lt;br /&gt;
;(e) Historial : Los requerimientos deben especificar que eventos son relevantes para la seguridad y necesitan ser registrados, como ataques detectados, intentos de conexión fallidos e intentos de exeder la autorización.  Los requerimientos deben especificar tambien que information registrar con cada evento, incluyendo hora y fecha, descripción del evento, detalles de aplicación, y otra información útil en esfuerzos forences.&lt;br /&gt;
&lt;br /&gt;
;(f) Conexiones a sistemas externos : Los requerimientos deben especifica como la autentificación y cifrado será manejado para todos los systemas externos, tales como bases de datos, directorios y servicios Web. Todas las credenciales requeridas para la comunicación con sistemas externos deben almacenarce cifradas y fuera de el código dentro de archivos de configuración. &lt;br /&gt;
&lt;br /&gt;
;(g) Cifrado : Los requerimientos deben especificar que datos deben ser cifrados, como serán cifrados y como todos los certificados y otras credenciales deben ser manejadas. Las aplicaciones deben usar algoritmos estándar implementados en una librerias de cifrado que hayan sido usadas y probadas ampliamente.&lt;br /&gt;
&lt;br /&gt;
;(h) Disponibilidad : Los requerimientos deben especificar como protegerse de ataques de negación de servicio. Todos los posibles ataques en la aplicacion deben ser considerados, incluyendo bloqueos de auntentificación, agotamiento de conexiones y otros ataques de agotamiento de recursos.&lt;br /&gt;
&lt;br /&gt;
;(i) Configuración segura : Los requerimientos deben especificar que los valores predeterminados para todas las configuraciones relacionadas a seguridad deben ser seguras. Para propósitos de auditoría, el software deberia ser capás de producir un reporte sencillo de leer que muestre los detalles de todas las configuraciones relacionadas con seguridad.&lt;br /&gt;
&lt;br /&gt;
;(j) Vulnerabilidades especificas : Los requerimientos deben incluir un conjunto de vulnerabilidades especificas que no deben estar presentes en el software. A menos que sea especificado de otra manera, el software no debe incluir ninguna de las fallas descritas en el la &amp;quot;Lista de OWASP sobre las 10 vulnerabilidades mas críticas en aplicaciones Web&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===5. PERSONAL Y ORGANIZACIÓN===&lt;br /&gt;
&lt;br /&gt;
;(a) Arquitecto en seguridad : El desarollador asignará la responsabilidad por la seguridad a un solo recurso técnico experimentado, para ser conocido como el arquitecto de seguridad del proyecto. El arquitecto de seguridad certificará la seguridad de cada entregable.&lt;br /&gt;
&lt;br /&gt;
;(b) Entrenamiento en Seguridad : el proveedor será responsable de verificar que todos los miembros del equipo de desarrollo han sido entrenados en tecnicas de programación segura.&lt;br /&gt;
&lt;br /&gt;
;(c) Desarrolladores dignos de confianza : El proveedor acuerda realizar las investigaciones de antecendentes apropiadas a todos los miembros del equipo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===6. AMBIENTE DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Codificación segura : El proveedor debe mencionar que herramientas se usarán en el ambiente de desarrollo de software para promover la codificación segura.&lt;br /&gt;
&lt;br /&gt;
;(b) Adminstración de configuración : El proveedor debe usar un sistema de control de versiones que autentifique y registre el miembro del equipo asociado con todos los cambios en el código base, todos los archivos de configuración y compilación.&lt;br /&gt;
&lt;br /&gt;
;(c) Distribución : El proveedor debe usar un proceso de compilación que construya confiablemente un archivo de distribución completo desde el código fuente. Este proceso debe incluir un método para verificar la integridad de el software entregado al cliente.&lt;br /&gt;
&lt;br /&gt;
===7. LIBRERIAS, MARCOS DE DESARROLLO Y PRODUCTOS===&lt;br /&gt;
&lt;br /&gt;
;(a) Apertura : El proveedor debe mencionar todas los aplicaciones de terceros usadas en el software, incluyendo todas las librerias, marcos de desarrollo, componentes y otros productos, ya sean comerciales, gratuitos, de código abierto o código cerrado.&lt;br /&gt;
&lt;br /&gt;
;(b) Evaluación : El proveedor debe hacer esfuerzos rasonables para asegurar que el sofware de terceros cumple con todos los términos de este contrato y es tan seguro como el código a la medida desarrollado bajo este contrato.&lt;br /&gt;
&lt;br /&gt;
===8. REVISIONES DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Derecho de revisión : El cliente tiene el derecho mandar revisar el software para buscar fallas de seguridad, esto a sus expesas y en cualquier momento dentro de los 60 dias despues de la entrega. El desarrollador acepta proveer apoyo rasonable al equipo de revisión proveyendo el codigo fuente y acceso a los ambientes de pruebas.&lt;br /&gt;
&lt;br /&gt;
;(b) Covertura de la revisión : Las revisiones de seguridad deben cubrir todos los aspectos de el software entregado, incluyendo código a la medida, componentes, productos y configuración de sistema.&lt;br /&gt;
&lt;br /&gt;
;(c) Alcance de la revisión : Al menos, la revisión debe cubrir todos los requerimientos de seguridad y debería buscar otras vulnerabilidades comunes. La revisión puede incluir una combinación de busqueda automatizada de vulnerabilidades, pruebas de intrusión, análisis estático de código fuente y revisión de código por expertos.&lt;br /&gt;
&lt;br /&gt;
;(d) Problemas encontrados : Los problemas de seguridad descubiertos serán reportados a el cliente y proveedor por igual. A todos los problemas se les dará seguimiento y serán reparados como se especifique en la sección de seguimiento de problemas de seguridad de este anexo.&lt;br /&gt;
&lt;br /&gt;
===9. ADMINISTRACIÓN DE PROBLEMAS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Identificación : El proveedor dara seguimiento a todos los problemas de seguridad descubiertos en todo el ciclo de desarrollo, ya sea un problema en los requerimientos, diseño, implementación, pruebas, publicación u operación. El riesgo asociado con cada problema de seguridad será evaluado, documentado y reportado a el cliente tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
;(b) Protección : El proveedor protegerá apropiadamente la información relacionada a problemas de seguridad y la documentación relacionada a ellos, esto, para ayudar a disminuir la probabilidad de las vulnerabilidades en el software operacioneal del cliente sean expuestas.&lt;br /&gt;
&lt;br /&gt;
;(c) Reparación : Los problemas de seguridad que sean indentificados antes de la entrega deben ser reparados por el proveedor. Los problemas de seguridad descubiertos despues de la entrega deben ser manejados en la misma manera que otros problemas funcionales según lo especificado en este contrato.&lt;br /&gt;
&lt;br /&gt;
===10. CERTEZA===&lt;br /&gt;
&lt;br /&gt;
;(a) Certeza : El proveedor proveera un &amp;quot;paquete de certificación&amp;quot; consistente en la documentación de seguridad creada a traves del proceso de desarrollo. El paquete deberá establecer que los requerimientos de seguridad, diseño, implementación y resultados de pruebas fueron completados apropiadamente y todos los problemas de seguridad fueron resueltos apropiadamente.&lt;br /&gt;
&lt;br /&gt;
;(b) Auto-Certificación : El aquitecto de seguridad certificará que el software cumple con los requerimientos de seguridad, que todas las actividades de seguridad se realizaron, y que todos los problemas de seguridad identificados han sido documentados y resueltos. Cualquier excepción a el estado de la certificacion debe estar totalmente documentada al momento de la entrega.&lt;br /&gt;
&lt;br /&gt;
;(c) No código malicioso : El proveedor garantize que el sofware no debe contener ningun código que no se alinee a algun requerimiento del software y debilite la seguridad de la aplicación, incluyendo viruses, gusanos, bombas de tiempo, puertas traseras, caballos de troya, huevos de pascua y cualquier otra forma de código malicioso.&lt;br /&gt;
&lt;br /&gt;
===11. CONCENTIMIENTO Y MANTENIMIENTO DE LA SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Consentimiento : El software no debe ser considerado como aceptado hasta que el paquete de certificación este completo y todos los problemas de seguridad han sido resueltos.&lt;br /&gt;
&lt;br /&gt;
;(b) Investigación de problemas de seguridad : Despues del concentimiento, si se sospecha (razonablemente) o descubren problemas de seguridad, el proveedor deberá asisitir al cliente en realizar una investigación para determinar la naturaleza del problema. El problema debe ser considerado &amp;quot;nuevo&amp;quot; si no es cubierto por los requerientos de seguridad y esta fuera de el alcance (razonable) de las pruebas de seguridad.&lt;br /&gt;
&lt;br /&gt;
;(c) Problemas de seguridad nuevos : El proveedor y el cliente consientes en medir el alcance y esfuerzo requerido para resolver problemas de seguridad nuevos, y negociad de buena fe para alcanzar un acuerdo y realizar el trabajor requerido para solucionarlos.&lt;br /&gt;
&lt;br /&gt;
;(d) Otros problemas de seguridad : El proveedor debe usar todos los esfuersos comercialmente rasonables consistentes con practicas de desarrollo comunes en la industria, tomando en cuenta la severidad de el riesgo, para resolver todos los problemas de seguridad considerados nuevos tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Legal Project]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79717</id>
		<title>Anexo para Contrato de Software Seguro de OWASP</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Anexo_para_Contrato_de_Software_Seguro_de_OWASP&amp;diff=79717"/>
				<updated>2010-03-12T13:33:46Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: /* Introducción */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''ANEXO DE CONTRATO PARA DESAROLLO DE SOFTWARE SEGURO'''&lt;br /&gt;
&lt;br /&gt;
  ADVERTENCIA: ESTE DOCUMENTO DEBE SER CONSIDERADO COMO UNA GUÍA SOLAMENTE.&lt;br /&gt;
  OWASP RECOMIENDA VEHEMENTEMENTE QUE CONSULTE UN ABOGADO CALIFICADO&lt;br /&gt;
  PARA AYUDARLE A NEGOCIAR UN CONTRATO DE SOFTWARE&lt;br /&gt;
  &lt;br /&gt;
== Introducción  ==&lt;br /&gt;
&lt;br /&gt;
Este anexo de contrato pretende ayudar a los proveedores de software y sus clientes a negociar y capturar importantes términos y condiciones contractuales relacionadas a la seguridad en el Software a ser desarrollado o entregado. La razon para este proyecto es que la mayoría de los contratos no mencionan estos temas, y las partes frecuentamente tienen puntos de vista dramaticamente diferentes a lo que en ralidad fue acordado. Creemos que articular claramente estos términos es la mejor manera de asegurarse que ambas partes pueden hacer desiciones informadas sobre como proceder. &lt;br /&gt;
&lt;br /&gt;
 &amp;quot;La seguridad del software comercial mejorará cuando el mercado demande mejor seguridad.&lt;br /&gt;
 Al menos, cada petición para propuestas de software debería pedir a los vendedores detallar como van ellos a probar &lt;br /&gt;
 sus productos para encotrar vulnerabilidades de seguridad.Este paso empezará convenciendo a los vendedores de&lt;br /&gt;
 software empaquetado y proveedores externos que las compañias valoran la seguridad.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- John Pescatore, Director de investiagacion con Gartner&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 Pedimos a los clientes y proveedores que usen este documento como un marco para discutir espectativas y negociar&lt;br /&gt;
 responsabilidades. Este anexo se creó para ser añadido a un contrato de desarrollo de software. Estos términos son&lt;br /&gt;
 negociables, significa que ellos pueden y deben ser discutidos por el cliente y el proveedor.&lt;br /&gt;
&lt;br /&gt;
==SOBRE EL PROYECTO==&lt;br /&gt;
Este documento fue creado por la fundación OWASP (Open Web Application Security Project por sus siglas en Inglés), una organización caritativa sin animos de lucro con el objetivo de crear herramientas y documentación, gratuita y abierta para asegurar software. Para facilitar su uso en contratación privada, este documento es de dominio publico. Puede encontrar detalles adicionales sobre este proyecto en http://www.owasp.com/index.php/OWASP_Legal_Project. Son Bienvenidos comentarios de ambos, productores y consumidores de software, asi como de la comunidad legal.&lt;br /&gt;
&lt;br /&gt;
OWASP reconoce gratamente la contribución especial de [http://www.aspectsecurity.com Aspect Security] por su rol en la investigación y preparación de este documento.&lt;br /&gt;
&lt;br /&gt;
==OBJECIONES==&lt;br /&gt;
&lt;br /&gt;
Las siguientes páginas cubren algunas objeciones que escuchamos frecuentemente sobre usar este lenguaje en contratos de desarrollo de software:&lt;br /&gt;
&lt;br /&gt;
===PERO NO TODOS LOS TÉRMINOS SON CORRECTOS PARA NOSOTROS…===&lt;br /&gt;
&lt;br /&gt;
Este documento debe ser considerado un punto de inicio para su contrato. Puede que no le gusten todas las actividades, o puede querer proponer mas. Puede querer asignar responsabilidades de manera diferente. Este document no pretende capturar exactamente las necesidades de todos los clientes y proveedores de software. Pretende proveer un marco para discutir temas clave, importantes para asegurarse que el software se cree seguro. Despues de que tengan una discusión sobre seguridad y alcancen un acuerdo. Puede ajustar el convenio para que concuerde con el contrato.&lt;br /&gt;
&lt;br /&gt;
===PERO, ¿QUIEN DEBE PAGAR POR ESTAS ACTIVIDADES?…===&lt;br /&gt;
&lt;br /&gt;
Este contrato no es sobre poner mas peso al desarollo de software. La pregunta no es sobre si hay costos asociados con seguridad (por supuesto que hay). Sino, la pregunta correcta es que actividades deberían hacerse por ambas partes para minimizar costos, y cuando deberían ocurrir.&lt;br /&gt;
&lt;br /&gt;
Este anexo no menciona (intensionalmente) sobre el detalle de quien debería pagar por la actividades descritas. Mientras muchas de estas actividades deben estar pasando ya, y son esperadas por muchos clientes, ellas no estan practicadas regularmente en la industria del software. La cuestion de quien paga (y cuando) debe ser parte de la negociación.&lt;br /&gt;
&lt;br /&gt;
Calcular el costo de la seguridad es muy difícil. Auque hay costos asociados con realizar actividades de seguridad, hay también costos importantes asociados con ignorar estas actividades. Estamos convencidos el mejor costo-beneficio para desarrollar software es reducir la probabilidad de que fallas de seguridad sean introducidas y minimzar el tiempo entre introducir una falla y arreglarla.&lt;br /&gt;
&lt;br /&gt;
Una distición importante a hacer cuando calculamos costos es entre construir mecanismos de seguridad y las actividades para asegurarse que esos mecanismos sean correctos y efectivos. Intentar agregar mecanismoa al final de el ciclo de desarrollo puede causar serios problemas de diseño e incrementará el costo dramáticamente. Este convenio promieve decisiones sobre mecanismos para minimizar estos costos. Similarmente, esperas hasta justo antes de la publicación para hacer actividades de aseguramiento, tales como revisión de código y pruebas de intrudión, tambien incrementaría los costos dramaticamente. Creemos que el mejor costo-beneficio para ganar certeza es poner un nivel constante de esfuerzo en el aseguramiento a través del ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===PERO EL NIVEL DE RIGOR ESTA INCORRECTO….===&lt;br /&gt;
&lt;br /&gt;
Este convenio asume que el software que esta siendo desarrollado es rasonablemente importante para una empresa grande o agencia de gobierno. Hemos seleccionado un &amp;quot;nivel de rigor&amp;quot; para el convenio que es alcanzable por la mayoria de las organizaciones proveedoras de software, e identificaría y manejaría los riesgos más comunes.&lt;br /&gt;
&lt;br /&gt;
Sin embargo, para el software que va a ser usado en aplicaciones críticas, como aplicaciones médicas, financieras o relacionadas con el ejército. Puede querer incrementar el nivel de rigor. Puede querer agregar revisiones, documentación y actividades adicionales de prueba. Puede querer mejorar el proceso de encontrar, diagnosticar y remediar vulnerabilidades. Para aplicaciones menos sensibles, puede desear reducir o remover actividades.&lt;br /&gt;
&lt;br /&gt;
===PERO NOSOTROS NO PODEMOS ACEPTAR TANTO RIESGO…===&lt;br /&gt;
Este convenio pretende facilitar la discusión sobre quien tomaría el riesgo por las vulnerabilidades de seguridad en el software. Por un lado del espectro, el cliente podria tomar todo el riesgo y el proveedor podria entregar código con muchas vulnerabilidades. Por el otro extremo, el proveedor podría tomar todo el riesgo y asumir la responsabilidad de entregar código perfecto. Ambos extremos son irrealizables.&lt;br /&gt;
&lt;br /&gt;
Actualmente, en este convenio, el proveedor toma el riesgo por problemas que sean descubiertos en los requerimientos o deben ser cubiertos por esfuerzos razonables en pruebas. Pero la remediación de &amp;quot;nuevos&amp;quot; problemas de seguridad tendría que ser pagado por el cliente.  Creemos que este es un equilibrio funcional, ya que limita el riesgo adquirido por el proveedor y promueve obtener requerimientos de seguridad por anticipado. Pero hay muchas otras posibles soluciones a este problema. Por favor, dejenos saber si tiene sugerencias alternas, podriamos incluirlas en versiones futuras de este documento.&lt;br /&gt;
&lt;br /&gt;
Note que la discusión aqui solo cubre el riesgo asociado con arreglar las vulnerabilidades de seguridad en el código, y no incluye los costos asociados con recuperarse de incidentes de seguridad relacionados con explotar cualquiera de esas vulnerabilidades. Estamos interesados en mejores prácticas en esta area.&lt;br /&gt;
&lt;br /&gt;
===PERO COMO PODEMOS ASEGURAR CÓDIGO DE TERCEROS…===&lt;br /&gt;
&lt;br /&gt;
Casi todos los proyectos de sofware tienen una cantidad importante de código de terceros como librarieas, frameworks y productos. Desde la perspectiva de seguridad, este código es tan importante como el código desarrollado a la medida para su proyecto.&lt;br /&gt;
Creemos  que la responsabilidad de asegurar la seguridad de este código es llevada mejor por el proveedor, aunque ellos podrían no tener toda la capacidad para garantizar la seguridad por ellos mismos. Sin embargo, La seguridad puede ser parte de el la desición de &amp;quot;construir o comprar&amp;quot;, y esta parece ser la mejor manera de promoverla.&lt;br /&gt;
&lt;br /&gt;
El proveedor, por supuesto, tiene la opción de pasar la responsabilidad a el proveedor del software de terceros. El desarrolador puede tambien analizar el código de terceros por él mismo o contratar expertos en seguridad para analizarlo por él.&lt;br /&gt;
&lt;br /&gt;
===PERO PORQUE DEBO PASAR POR TODO ESTE PROBLEMA…===&lt;br /&gt;
&lt;br /&gt;
En última instancia, creemos que no hay alternativa para hacer de la seguridad una parte de el proceso de contratación de software. Actualmente, creemos que hay serios malentendidos sobre la seguridad del código que esta siendo desarrollado bajo muchos contratos de desarrollo de software. Esto puede solamente llevar a una cara litigación y a desiciones hechas por individuos con poca experiencia y entendimiento sobre software. Lea el [[Secure software contracting hypothetical case study | Caso de estudio hipotético sobre contratación de software seguro]] para una discusión completa de este problema.&lt;br /&gt;
&lt;br /&gt;
Hay muchos beneficios al trabajar con este convenio. El principal es que pondrá claras las expectativas entre las partes involucradas. En algunos casos ayudará a evitar demandas cuando problemas de seguridad difíciles aparecen en el software. Tambien, estan son las mismas actividades requeridas por muchas razónes legales y de conformidad con estándares/leyes.&lt;br /&gt;
&lt;br /&gt;
===PERO ES MUY DIFÍCIL PRODUCIR TODA ESTA DOCUMENTACIÓN…===&lt;br /&gt;
&lt;br /&gt;
OWASP no promueve la documentacion por la simpre documentacion. Este convenio esta enfocado en promover la calidad, no la cantidad. Creemos que puede ser posible (en algunos proyectos) cumplir con este contrato con una pequeña evaluacion de riesgo, algunas páginas de requerimientos, un pequeño documento de diseño de seguridad, un plan de pruebas, y algunos resultados de pruebas.&lt;br /&gt;
&lt;br /&gt;
El objetivo de esta documentación es simplemente asegurar, en cada etapa del desarrollo de software, que se ha puesto la atención apropiada en la seguridad. Un beneficio adiciona es que esta documentacion puede ser recolectada en conjunto para formar un &amp;quot;paquete de certificación&amp;quot; que básicamente esbose el argumento de porque deberiamos confiar que el software hará lo que dice.&lt;br /&gt;
&lt;br /&gt;
==ANEXO DE CONTRATO==&lt;br /&gt;
&lt;br /&gt;
===1. INTRODUCCIÓN===&lt;br /&gt;
&lt;br /&gt;
Esta anexo esta hecho para _____________________ (&amp;quot;convenio&amp;quot;) entre el Cliente y el proveedor. Tanto el Cliente como el proveedor acuerdan maximisar la seguridad del software de acuerdo a los siguientes términos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2. FILOSOFÍA===&lt;br /&gt;
&lt;br /&gt;
Esta anexo pretende aclarar los derechos y obligaciones relacionados a seguridad de todas las partes en una relacion de desarrollo de software. Al mayor nivel, las partes acuerdan que:&lt;br /&gt;
&lt;br /&gt;
;(a) Las desiciones de seguridad estarán basadas en el riesgo : Las desciciones sobre la seguridad seran tomadas en conunto por el cliente y el proveedor basandose en un firme entendimiento de el riesgo involucrado. &lt;br /&gt;
&lt;br /&gt;
;(b) Las actividades de seguridad estarán balanceadas : El esfurzo de seguridad será distribuido equitativamente a través de todo el ciclo de desarollo de software.&lt;br /&gt;
&lt;br /&gt;
;(c) Las actividades de seguridad estarán integradas : Todas las actividades y documentación discutidas aqui pueden y deben ser integradas dentro del ciclo de desarrollo de software del proveedor y no mantenerse separadas de el resto del proyecto. Nada en este anexo implica algún processo de desarrollo de software en particular.&lt;br /&gt;
&lt;br /&gt;
;(d) Se esperan vulnerabilidades :  Todo software contiene defectos, y algunos de estos crearan problemas de seguridad. Ambos, cliente y proveedor se esforzará para identificar las vulnerabilidades tan pronto como sea posible en el ciclo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
;(e) La información sobre seguridad será comunicada por completo : Toda la información relevante para la seguridad se compartirá entre el cliente y el proveedor inmediatamente y completamente.&lt;br /&gt;
&lt;br /&gt;
;(f) Se requerirá solo documentacion de seguridad necesaria : La documentación de seguridad no necesita ser demasiado amplia para describir claramente el diseño de seguridad, análisis de riesgo y problemas.&lt;br /&gt;
&lt;br /&gt;
===3. ACTIVIDADES EN EL CICLO DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Entendimiento del Riesgo : El proveedor y el cliente acuerdan trabajar juntos para entender y documentar los riesgos que enfrenta la aplicacion. Este esfuerzo debe identificar los riesgos clave para los activos y funciones importantes que provee la aplicación. Cada uno de los temas listados en la sección de requerimientos debe ser considerado.&lt;br /&gt;
&lt;br /&gt;
;(b) Requerimientos : Basado en los riesgos, El proveedor y cliente acuerda trabajar juntos para crear requerimientos de seguridad detallados como parte de la especificacion de el software a ser desarrollado. Cada uno de los temas listados en la sección de requerimientos de este anexo deben ser discutidos y evaluados por ambos, cliente y proveedor.  Estos requerimientos pueden ser satisfechos por software creado a la medida, software de terceros, o la plataforma. &lt;br /&gt;
&lt;br /&gt;
;(c) Diseño : el desarollador acuerda proveer documentation que explique claramente el diseño para adquirir cada uno de los requerimientos de seguridad. En muchos de los casos, esta documentacion describirá los mecanismos de seguridad, donde se incluiran dentro de la arquitectura, y todos los patrones de diseño relevantes para asegurar su uso adecuado. El diseño debe especificar claramente si tales mecanismos vienen de software a la medida, software de terceros o de la plataforma.&lt;br /&gt;
&lt;br /&gt;
;(d) Implementación : El proveedor acuerda entregar y seguir un conjunto de lineamientos de codificación segura. Estos lineamientos indicarán como sele de debe dar formato, estructurar y comentar el código fuente. Todo código relacionado a seguridad debe ser comentado profundamente. Guías sobre como evitar vulnerabilidades se seguridad comunes debe ser incluida. Tambien, todo el código debe ser revisado por al menos otro desarollador basandose en los requerimientos de seguridad y los lineamientos de codificación antes de ser conciderado listo para pruebas unitarias.&lt;br /&gt;
&lt;br /&gt;
;(e) Pruebas y análisis de seguridad : El proveedor acuerda entregar y seguir un plan de pruebas de seguridad que defina como se realizarán las pruebas o bien establecer como cada uno de los requerimientos de seguridad va a ser complido. El nivel de rigor de esta actividad debe ser considerado y detallado en un plan. El proveedor ejecutará el plan de prueba y proveera los resultados a el cliente.&lt;br /&gt;
&lt;br /&gt;
;(f) Publicación segura : El proveedor acuerda entregar lineamientos de configuración segura que describan completamente todas las opciones de configuracion relacionadas con seguridad y sus implicaciones para la seguridad del software en su conjunto. Los lineamientos deben incluir una descripción completa de las dependencias en la plataforma y como deben ser configuradas de manera segura, incluidas las del sistema operativo, servidor Web y servidor de aplicacion. La configuracion predeterminada del software debe ser segura.&lt;br /&gt;
&lt;br /&gt;
===4. ÁREAS CON REQUERIMIENTOS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
Los siguientes temas/áreas deben ser considerados durante las actividades de entendimiento de riesgo y definición de requerimientos. Este esfuerzo debe producir un conjunto de requerimientos ajustados, especificos y probables. Ambos, proveedor y cliente deben ser involucrados en este proceso y deben ponerse de acuerdo sobre el conjunto final de requerimientos.&lt;br /&gt;
&lt;br /&gt;
;(a) Validación de entradas y condificación : Los requerimientos deben especificar las reglas para canonicalización, validación y codificación de cada dato de entrada a la aplicación, ya sea de usuarios, sistemas de archivos, bases de datos o sistemas externos. La regla predeterminada debe ser que todas las entradas sean validadas a menos que cumplan con una especificacion detallada de que esta permitido. Además, los requerimientos deben especificar las acciones a tomar cuando se reciven entradas no válidas. Especificamente, la aplicación no debe ser susceptible a inyecciones, desbordamientos, manipulación y otros ataques con entradas de usuario corruptas.&lt;br /&gt;
&lt;br /&gt;
;(b) Autentificación y manejo de sessiones : Los requerimientos deben especificar como se protegeran las credenciales para autentificación y los identificadores de sesión a través del ciclo de desarrollo de software. Los requerimientos para todas las funciones relacionadas deben ser agregadas incluyendo recuperar contraseñas, cambio de contraseñas, recordar contraseñas, desconexión y conexión multiple.&lt;br /&gt;
&lt;br /&gt;
;(c) Control de Acceso : Los requerimientos deben incluir una descripcion detallada de todos los roles (grupos, privilegios, autorizaciones) usadas en la aplicación. Los requerimientos deben indicar todos los activos y funciones que provee la aplicacion. Los requerimientos deben especificar detallada y exactamente los derechos de acceso para cualquier activo y función de cada rol. Se sugiere utilizar un formato de matriz de control de acceso para documentar estas reglas.&lt;br /&gt;
&lt;br /&gt;
;(d) Manejo de Errores : Los requerimientos deben detallar como se van a manejar los errores que ocurran dentro del procesamiento. Algunas aplicaciones deberían hacer lo mejor posible en caso de un error, mientras que otras deberían terminar su procesamiento inmediatamente.&lt;br /&gt;
&lt;br /&gt;
;(e) Historial : Los requerimientos deben especificar que eventos son relevantes para la seguridad y necesitan ser registrados, como ataques detectados, intentos de conexión fallidos e intentos de exeder la autorización.  Los requerimientos deben especificar tambien que information registrar con cada evento, incluyendo hora y fecha, descripción del evento, detalles de aplicación, y otra información útil en esfuerzos forences.&lt;br /&gt;
&lt;br /&gt;
;(f) Conexiones a sistemas externos : Los requerimientos deben especifica como la autentificación y cifrado será manejado para todos los systemas externos, tales como bases de datos, directorios y servicios Web. Todas las credenciales requeridas para la comunicación con sistemas externos deben almacenarce cifradas y fuera de el código dentro de archivos de configuración. &lt;br /&gt;
&lt;br /&gt;
;(g) Cifrado : Los requerimientos deben especificar que datos deben ser cifrados, como serán cifrados y como todos los certificados y otras credenciales deben ser manejadas. Las aplicaciones deben usar algoritmos estándar implementados en una librerias de cifrado que hayan sido usadas y probadas ampliamente.&lt;br /&gt;
&lt;br /&gt;
;(h) Disponibilidad : Los requerimientos deben especificar como protegerse de ataques de negación de servicio. Todos los posibles ataques en la aplicacion deben ser considerados, incluyendo bloqueos de auntentificación, agotamiento de conexiones y otros ataques de agotamiento de recursos.&lt;br /&gt;
&lt;br /&gt;
;(i) Configuración segura : Los requerimientos deben especificar que los valores predeterminados para todas las configuraciones relacionadas a seguridad deben ser seguras. Para propósitos de auditoría, el software deberia ser capás de producir un reporte sencillo de leer que muestre los detalles de todas las configuraciones relacionadas con seguridad.&lt;br /&gt;
&lt;br /&gt;
;(j) Vulnerabilidades especificas : Los requerimientos deben incluir un conjunto de vulnerabilidades especificas que no deben estar presentes en el software. A menos que sea especificado de otra manera, el software no debe incluir ninguna de las fallas descritas en el la &amp;quot;Lista de OWASP sobre las 10 vulnerabilidades mas críticas en aplicaciones Web&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===5. PERSONAL Y ORGANIZACIÓN===&lt;br /&gt;
&lt;br /&gt;
;(a) Arquitecto en seguridad : El desarollador asignará la responsabilidad por la seguridad a un solo recurso técnico experimentado, para ser conocido como el arquitecto de seguridad del proyecto. El arquitecto de seguridad certificará la seguridad de cada entregable.&lt;br /&gt;
&lt;br /&gt;
;(b) Entrenamiento en Seguridad : el proveedor será responsable de verificar que todos los miembros del equipo de desarrollo han sido entrenados en tecnicas de programación segura.&lt;br /&gt;
&lt;br /&gt;
;(c) Desarrolladores dignos de confianza : El proveedor acuerda realizar las investigaciones de antecendentes apropiadas a todos los miembros del equipo de desarrollo.&lt;br /&gt;
&lt;br /&gt;
===6. AMBIENTE DE DESARROLLO===&lt;br /&gt;
&lt;br /&gt;
;(a) Codificación segura : El proveedor debe mencionar que herramientas se usarán en el ambiente de desarrollo de software para promover la codificación segura.&lt;br /&gt;
&lt;br /&gt;
;(b) Adminstración de configuración : El proveedor debe usar un sistema de control de versiones que autentifique y registre el miembro del equipo asociado con todos los cambios en el código base, todos los archivos de configuración y compilación.&lt;br /&gt;
&lt;br /&gt;
;(c) Distribución : El proveedor debe usar un proceso de compilación que construya confiablemente un archivo de distribución completo desde el código fuente. Este proceso debe incluir un método para verificar la integridad de el software entregado al cliente.&lt;br /&gt;
&lt;br /&gt;
===7. LIBRERIAS, MARCOS DE DESARROLLO Y PRODUCTOS===&lt;br /&gt;
&lt;br /&gt;
;(a) Apertura : El proveedor debe mencionar todas los aplicaciones de terceros usadas en el software, incluyendo todas las librerias, marcos de desarrollo, componentes y otros productos, ya sean comerciales, gratuitos, de código abierto o código cerrado.&lt;br /&gt;
&lt;br /&gt;
;(b) Evaluación : El proveedor debe hacer esfuerzos rasonables para asegurar que el sofware de terceros cumple con todos los términos de este contrato y es tan seguro como el código a la medida desarrollado bajo este contrato.&lt;br /&gt;
&lt;br /&gt;
===8. REVISIONES DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Derecho de revisión : El cliente tiene el derecho mandar revisar el software para buscar fallas de seguridad, esto a sus expesas y en cualquier momento dentro de los 60 dias despues de la entrega. El desarrollador acepta proveer apoyo rasonable al equipo de revisión proveyendo el codigo fuente y acceso a los ambientes de pruebas.&lt;br /&gt;
&lt;br /&gt;
;(b) Covertura de la revisión : Las revisiones de seguridad deben cubrir todos los aspectos de el software entregado, incluyendo código a la medida, componentes, productos y configuración de sistema.&lt;br /&gt;
&lt;br /&gt;
;(c) Alcance de la revisión : Al menos, la revisión debe cubrir todos los requerimientos de seguridad y debería buscar otras vulnerabilidades comunes. La revisión puede incluir una combinación de busqueda automatizada de vulnerabilidades, pruebas de intrusión, análisis estático de código fuente y revisión de código por expertos.&lt;br /&gt;
&lt;br /&gt;
;(d) Problemas encontrados : Los problemas de seguridad descubiertos serán reportados a el cliente y proveedor por igual. A todos los problemas se les dará seguimiento y serán reparados como se especifique en la sección de seguimiento de problemas de seguridad de este anexo.&lt;br /&gt;
&lt;br /&gt;
===9. ADMINISTRACIÓN DE PROBLEMAS DE SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Identificación : El proveedor dara seguimiento a todos los problemas de seguridad descubiertos en todo el ciclo de desarrollo, ya sea un problema en los requerimientos, diseño, implementación, pruebas, publicación u operación. El riesgo asociado con cada problema de seguridad será evaluado, documentado y reportado a el cliente tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
;(b) Protección : El proveedor protegerá apropiadamente la información relacionada a problemas de seguridad y la documentación relacionada a ellos, esto, para ayudar a disminuir la probabilidad de las vulnerabilidades en el software operacioneal del cliente sean expuestas.&lt;br /&gt;
&lt;br /&gt;
;(c) Reparación : Los problemas de seguridad que sean indentificados antes de la entrega deben ser reparados por el proveedor. Los problemas de seguridad descubiertos despues de la entrega deben ser manejados en la misma manera que otros problemas funcionales según lo especificado en este contrato.&lt;br /&gt;
&lt;br /&gt;
===10. CERTEZA===&lt;br /&gt;
&lt;br /&gt;
;(a) Certeza : El proveedor proveera un &amp;quot;paquete de certificación&amp;quot; consistente en la documentación de seguridad creada a traves del proceso de desarrollo. El paquete deberá establecer que los requerimientos de seguridad, diseño, implementación y resultados de pruebas fueron completados apropiadamente y todos los problemas de seguridad fueron resueltos apropiadamente.&lt;br /&gt;
&lt;br /&gt;
;(b) Auto-Certificación : El aquitecto de seguridad certificará que el software cumple con los requerimientos de seguridad, que todas las actividades de seguridad se realizaron, y que todos los problemas de seguridad identificados han sido documentados y resueltos. Cualquier excepción a el estado de la certificacion debe estar totalmente documentada al momento de la entrega.&lt;br /&gt;
&lt;br /&gt;
;(c) No código malicioso : El proveedor garantize que el sofware no debe contener ningun código que no se alinee a algun requerimiento del software y debilite la seguridad de la aplicación, incluyendo viruses, gusanos, bombas de tiempo, puertas traseras, caballos de troya, huevos de pascua y cualquier otra forma de código malicioso.&lt;br /&gt;
&lt;br /&gt;
===11. CONCENTIMIENTO Y MANTENIMIENTO DE LA SEGURIDAD===&lt;br /&gt;
&lt;br /&gt;
;(a) Consentimiento : El software no debe ser considerado como aceptado hasta que el paquete de certificación este completo y todos los problemas de seguridad han sido resueltos.&lt;br /&gt;
&lt;br /&gt;
;(b) Investigación de problemas de seguridad : Despues del concentimiento, si se sospecha (razonablemente) o descubren problemas de seguridad, el proveedor deberá asisitir al cliente en realizar una investigación para determinar la naturaleza del problema. El problema debe ser considerado &amp;quot;nuevo&amp;quot; si no es cubierto por los requerientos de seguridad y esta fuera de el alcance (razonable) de las pruebas de seguridad.&lt;br /&gt;
&lt;br /&gt;
;(c) Problemas de seguridad nuevos : El proveedor y el cliente consientes en medir el alcance y esfuerzo requerido para resolver problemas de seguridad nuevos, y negociad de buena fe para alcanzar un acuerdo y realizar el trabajor requerido para solucionarlos.&lt;br /&gt;
&lt;br /&gt;
;(d) Otros problemas de seguridad : El proveedor debe usar todos los esfuersos comercialmente rasonables consistentes con practicas de desarrollo comunes en la industria, tomando en cuenta la severidad de el riesgo, para resolver todos los problemas de seguridad considerados nuevos tan pronto como sea posible.&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Legal Project]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Diez_Mayores_2007&amp;diff=76480</id>
		<title>Diez Mayores 2007</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Diez_Mayores_2007&amp;diff=76480"/>
				<updated>2010-01-18T19:42:21Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: /* Conclusión */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Top_10_2007:TopTemplate|usenext=NextLink|next=-Metodología|useprev=Nothing|usemain=Nothing}}&lt;br /&gt;
&lt;br /&gt;
==Presentación==&lt;br /&gt;
&lt;br /&gt;
Bienvenidos a la lista de las 10 mayores vulnerabilidades de OWASP 2007!  Esta edición, totalmente reescrita lista las vulnerabilidades más serias en aplicaciones web, discute como protegerse de ellas y provee ligas a mas información.  '''La lista de las 10 mayores vulnerabilidades de OWASP ha sido traducida al Español. [https://www.owasp.org/images/a/ae/OWASP_Top_10_2007_Spanish.pdf De clic aquí] para la traducción al español!'''&lt;br /&gt;
&lt;br /&gt;
La lista de las 10 mayores de OWASP para la versión empresarial de Java esta disponible para bajarla [https://www.owasp.org/images/8/89/OWASP_Top_10_2007_for_JEE.pdf aqui]&lt;br /&gt;
&lt;br /&gt;
== Objetivo ==&lt;br /&gt;
&lt;br /&gt;
'''El objetivo principal de la lista de las 10 de OWASP es formar desarrolladores, diseñadores, arquitectos y organizaciones''' sobre las consecuencias de las vulnerabilidades más comunes en aplicaciones web. Las lista provee métodos básicos para protegerse contra estas vulnerabilidades - un gran inicio para su programa de codificación segura.&lt;br /&gt;
&lt;br /&gt;
'''La seguridad no es un evento de una sola vez'''. No es suficiente asegurar su código solo una vez. Para 2008, esta lista cambiará y sin cambiar una línea de el código de su aplicación, puede ser vulnerable. Por favor revise el consejo en [[Top_10_2007-Where to Go From Here|Top 10 2007-¿A dondé sigo Ahora?]] para mas información.&lt;br /&gt;
&lt;br /&gt;
'''Una iniciativa de codificación segura debe lidiar con todas las etapas de desarrollo del programa'''. Las aplicaciones Web seguras '''''solo''''' es posible cuando un SDLC seguro es usado. Los programas seguros desde el inicio por su diseño y desarrollo. Hay al menos 300 problemas que afectan la seguridad en general de una aplicación Web. Estos mas de 300 problemas están detallados en la [http://www.owasp.org/index.php/OWASP_Guide_Project Guía de OWASP], la cua es una lectura escencial para cualquiera que desarolle aplicaciones Web en la actualidad.&lt;br /&gt;
&lt;br /&gt;
'''Este documento es el principalmente un documento educativo, no un standard'''.  Por favor no adopte este documento como una política o estándar sin [mailto:owasp@owasp.org hablar con nosotros] primero! Si necesita una política o estandar de codificación segura, OWASP tiene proyectos de políticas y estándares de seguridad que están en progreso.  Por favor considere unirse o asistir financieramente estos esfuerzos.&lt;br /&gt;
&lt;br /&gt;
== Retroalimentación ==&lt;br /&gt;
&lt;br /&gt;
{| &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|Agradecemos a [http://www.mitre.org/ MITRE] por hacer ''La  distribución de tipos de vulnerabilidades en el [http://cve.mitre.org/ CVE]'' disponibles libremente para su uso. El proyecto de la lista de las 10 mayores esta dirijida y patrocinada por [http://www.aspectsecurity.com https://www.owasp.org/images/d/d1/Aspect_logo.gif].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Líder de proyecto: Andrew van der Stock (Director ejecutivo, Fundación OWASP)&lt;br /&gt;
Co-autores:        Jeff Williams (Presidencia, Fundación OWASP), Dave Wichers (Presidencia de conferencia, Fundación OWASP)&lt;br /&gt;
&lt;br /&gt;
Queremos agradecer a los revisores:&lt;br /&gt;
&lt;br /&gt;
*Raoul Endres por ayudar a echar a andar la lista de nuevo y por sus valiosos comentarios.&lt;br /&gt;
*[mailto:coley...at...mitre.org Steve Christey](MITRE) por una importante revisión y la adición de los datos del MITRE CWE&lt;br /&gt;
*[http://jeremiahgrossman.blogspot.com/ Jeremiah Grossman] ([http://www.whitehatsec.com/ WhiteHat Security]) por revisar y contribuir con información sobre el éxico (o falla) de la medidas de detección automatizadas.&lt;br /&gt;
*[http://www.smithline.net/ Neil Smithline] ([http://www.bea.com/ BEA Systems]) por sus comentarios y producir la versión Wiki-&lt;br /&gt;
*Sylvan von Stuppe por una revisión ejemplar.&lt;br /&gt;
*Colin Wong, Nigel Evans y Andre Gironda por comentarios enviados por correo.&lt;br /&gt;
&lt;br /&gt;
== Conclusión ==&lt;br /&gt;
&lt;br /&gt;
{| border='1' cellpadding='2' &lt;br /&gt;
|-	&lt;br /&gt;
|[[Top 10 2007-Secuencia de Comandos en Sitios Cruzados (XSS)|A1 - Secuencia de comandos en sitios cruzados (XSS)]]&lt;br /&gt;
|Las fallas de XSS acurren cuando una aplicación toma la información proveida por el usuario y la envia a un navegador sin validarla primero o codificar el contenido. El XSS permite a los atacantes ejecurar scripts en el navegador de la víctima la cual puede secuestrar la sesión del usuario, modificación de sitios web, la posible introducción de gusanos, etc.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Fallas de Inyección|A2 - Inyección de código]]&lt;br /&gt;
|La fallas de inyección, particularmente la inyección de SQL, son comunes en las aplicaciones Web. La inyección ocurre cuando los datos proveidos por el usuario son enviados a un interprete como parte de un comando o petición. Los datos hostiles del atacante engañan al interprete a ejecutar comandos no intencionados o cambiar los datos.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Ejecución de Ficheros Malintencionados|A3 - Ejecución maliciosa de archivos]]&lt;br /&gt;
|El código vulnerable a inclusión remota de archivos permite a los atacantes incluir código y datos hostiles, resultando en ataques devastadores, como secuestro total del servidor. Los ataques de ejecución maliciosa de archivos afectan a PHP, XML y cualquier marco de trabajo que soporte el manejo de nombres de archivos o permita la interacción con los usuarios mediante el intercambio de archivos.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Referencia Insegura y Directa a Objetos|A4 - Referencia directa e insegura a objetos]]&lt;br /&gt;
|Una referencia directa e insegura a objetos ocurre cuando un desarrollador expone una referencia a una implementación interna de un objeto como unn archivo, un directorio, un registro de BD o una llave, en forma de parámetro de URL o de una forma. Los atacantes pueden manipular esas referencias para acceder a otros objetos sin tener autorización&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Vulnerabilidades de Falsificación de Petición en Sitios Cruzados (CSRF)|A5 - Falsificación de petición en sitios crusados (CSRF)]]&lt;br /&gt;
|A CSRF attack forces a logged-on victim's browser to send a pre-authenticated request to a vulnerable web application, which then forces the victim's browser to perform a hostile action to the benefit of the attacker. CSRF can be as powerful as the web application that it attacks.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Revelación de Información y Gestión Incorrecta de Errores|A6 - Revelación de Información y Gestión Incorrecta de Errores]]&lt;br /&gt;
|Las aplicaciones pueden (sin intención) revelar información sobre su configuración, funcionalidad interna o violar la privacidad a travez de una variedad de problemas de la aplicación. Los atacantes usan estas debilidades para robar información delicada o conducir ataques mas serios. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Autenticación y Gestión de Sesiones Disfuncional|A7 - Autentificación y gestión de sesiones disfuncional]]&lt;br /&gt;
|Las credenciales de las cuenta y testigos de sesión son frecuentemente protegidos inadecuadamente. Los atacantes roban contraseñas, llaves o testigos de autneticación para asumir la identidad de otros usuarios.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Almacenamiento Criptográfico Inseguro|A8 - Almacenamiento cirptográfico inseguro]]&lt;br /&gt;
|Las aplicaciones Web raramente usan funciones criptográdicas apropiadamente para proteger información y credenciales. Los atacantes usan la información mal protegida para hacer robos de identidad y otros crimenes, como fraude con tarjetas de crédito.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Comunicaciones inseguras|A9 - Comunicación Insegura]]&lt;br /&gt;
|Las aplicaciones frecuentement falla al cifrar el tráfico de red cuando es necesario proteger comunicaciones delicadas.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Falla de restricción de acceso a URL|A10 - Falla de restricción de acceso a URL]]&lt;br /&gt;
|Frecuentemente, una aplicacion solo protege funcionalidad delicada evitando mostrar la ligas o URLs a usuarios no autorizados. Los atacantes pueden usar esta debilidad para acceder y realizar operaciones no autorizadas al acceder a esas URLs directamente.&lt;br /&gt;
|}&lt;br /&gt;
'''&amp;lt;center&amp;gt;Tabla 1: La 10 mayores vulnerabilidades de OWASP 2007&amp;lt;/center&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hay muchas páginas en este documento que no están dedicadas a vulnerabilidades en específico y por lo tanto no están listadas en la tabla. Aqui hay una lista de ellas.&lt;br /&gt;
&lt;br /&gt;
{| border='1' cellpadding='2' &lt;br /&gt;
|-	&lt;br /&gt;
|[[Top 10 2007]]&lt;br /&gt;
|Ademas de proveed una presentación, y un marcador de la sección de &amp;quot;conclusiones&amp;quot; (esto puede hacerse arrastrando [https://www.owasp.org/index.php/Top_10_2007#Summary este enlace] a sus favoritos) nos da acceso rápido a el documento completo.&lt;br /&gt;
|-&lt;br /&gt;
|[[Top 10 2007-Metodología]]&lt;br /&gt;
|Una descripción de la metodología usada para selecionar las vulnerabilidades para este documento.&lt;br /&gt;
|-&lt;br /&gt;
|[[Top 10 2007-¿A dondé sigo Ahora?]]&lt;br /&gt;
|Algunas sugerencias sobre como proceder una ves que ha leído este documento.&lt;br /&gt;
|-&lt;br /&gt;
|[[Top 10 2007-Referencias]]&lt;br /&gt;
|Recomendaciones para lectura posterior.&lt;br /&gt;
|}&lt;br /&gt;
'''&amp;lt;center&amp;gt;Tabla 1a: Paginas en el documento de la ''lista de las 10 mayores 2007'' que no son la lista de vulnerabilidades mencionadas arriba.&amp;lt;/center&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
==Una nota sobre las diferentes versiones==&lt;br /&gt;
Mientras que la única versión oficial de la ''lista de las 10 mayores vulnerabilidades de OWASP 2007'' es la version en PDF y en inglés, OWASP ah puesto a su disposición este Wiki que inicialmente contenia el mismo contenido que el PDF. Pero OWASP espera que cambien con su ayuda. OWASP promueve el envolvimiento de la comunidad y quiere su ayuda para hacer la versión Wiki mejor que nunca. Para ayudar a esto han creado un pequeño [[Editing:Top_10_2007|tutorial]] para iniciarlo en este proceso.&lt;br /&gt;
&lt;br /&gt;
==Versiones para bajar==&lt;br /&gt;
Puede bajar la lista 2007 (versión final) aqui:&lt;br /&gt;
&lt;br /&gt;
* [http://www.owasp.org/images/e/e8/OWASP_Top_10_2007.pdf (PDF, 930 kb)]&lt;br /&gt;
&amp;lt;!--* [http://www.owasp.org/images/2/24/OWASP_Top_10_2007.doc (Word, 514 kb)]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/a/ae/OWASP_Top_10_2007_Spanish.pdf (Español PDF, 488kb)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/c/ce/OWASP_Top_10_2007_-_French.pdf (Francés PDF, 455 kb)]&lt;br /&gt;
&lt;br /&gt;
* [http://www.metasecurity.org/owasp/OWASP_Top_10_2007_Korean.pdf (Koreano PDF, 768 kb)]&lt;br /&gt;
&lt;br /&gt;
* [http://csirt.ulakbim.gov.tr/dokumanlar/Ceviri_OWASP_ilk10_2007.pdf (Turco PDF, 718 kb)]&lt;br /&gt;
&lt;br /&gt;
* [http://www.owasp.org/images/4/42/OWASP_TOP_10_2007_PT-BR.pdf (Portuguese Brasileño PDF, 329 kb)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/8/89/OWASP_Top_10_2007_for_JEE.pdf OWASP Top 10 para la versión empresarial de Java (PDF, 630 kb)]&lt;br /&gt;
&lt;br /&gt;
* Le gustaría tener esta versión en otro idioma? podriamos usar su ayuda para traducirla. Contacte a Andrew van der Stock (vanderaj ...(@)... owasp.org) para ayudarnos a traducir la lista de las 10 mayores a otro idioma.&lt;br /&gt;
&lt;br /&gt;
{{Top_10_2007:BottomTemplate|usenext=NextLink|next=-Metodología|useprev=Nothing|usemain=Nothing}}&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Diez_Mayores_2007&amp;diff=76479</id>
		<title>Diez Mayores 2007</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Diez_Mayores_2007&amp;diff=76479"/>
				<updated>2010-01-18T19:40:36Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: /* Conclusión */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Top_10_2007:TopTemplate|usenext=NextLink|next=-Metodología|useprev=Nothing|usemain=Nothing}}&lt;br /&gt;
&lt;br /&gt;
==Presentación==&lt;br /&gt;
&lt;br /&gt;
Bienvenidos a la lista de las 10 mayores vulnerabilidades de OWASP 2007!  Esta edición, totalmente reescrita lista las vulnerabilidades más serias en aplicaciones web, discute como protegerse de ellas y provee ligas a mas información.  '''La lista de las 10 mayores vulnerabilidades de OWASP ha sido traducida al Español. [https://www.owasp.org/images/a/ae/OWASP_Top_10_2007_Spanish.pdf De clic aquí] para la traducción al español!'''&lt;br /&gt;
&lt;br /&gt;
La lista de las 10 mayores de OWASP para la versión empresarial de Java esta disponible para bajarla [https://www.owasp.org/images/8/89/OWASP_Top_10_2007_for_JEE.pdf aqui]&lt;br /&gt;
&lt;br /&gt;
== Objetivo ==&lt;br /&gt;
&lt;br /&gt;
'''El objetivo principal de la lista de las 10 de OWASP es formar desarrolladores, diseñadores, arquitectos y organizaciones''' sobre las consecuencias de las vulnerabilidades más comunes en aplicaciones web. Las lista provee métodos básicos para protegerse contra estas vulnerabilidades - un gran inicio para su programa de codificación segura.&lt;br /&gt;
&lt;br /&gt;
'''La seguridad no es un evento de una sola vez'''. No es suficiente asegurar su código solo una vez. Para 2008, esta lista cambiará y sin cambiar una línea de el código de su aplicación, puede ser vulnerable. Por favor revise el consejo en [[Top_10_2007-Where to Go From Here|Top 10 2007-¿A dondé sigo Ahora?]] para mas información.&lt;br /&gt;
&lt;br /&gt;
'''Una iniciativa de codificación segura debe lidiar con todas las etapas de desarrollo del programa'''. Las aplicaciones Web seguras '''''solo''''' es posible cuando un SDLC seguro es usado. Los programas seguros desde el inicio por su diseño y desarrollo. Hay al menos 300 problemas que afectan la seguridad en general de una aplicación Web. Estos mas de 300 problemas están detallados en la [http://www.owasp.org/index.php/OWASP_Guide_Project Guía de OWASP], la cua es una lectura escencial para cualquiera que desarolle aplicaciones Web en la actualidad.&lt;br /&gt;
&lt;br /&gt;
'''Este documento es el principalmente un documento educativo, no un standard'''.  Por favor no adopte este documento como una política o estándar sin [mailto:owasp@owasp.org hablar con nosotros] primero! Si necesita una política o estandar de codificación segura, OWASP tiene proyectos de políticas y estándares de seguridad que están en progreso.  Por favor considere unirse o asistir financieramente estos esfuerzos.&lt;br /&gt;
&lt;br /&gt;
== Retroalimentación ==&lt;br /&gt;
&lt;br /&gt;
{| &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|Agradecemos a [http://www.mitre.org/ MITRE] por hacer ''La  distribución de tipos de vulnerabilidades en el [http://cve.mitre.org/ CVE]'' disponibles libremente para su uso. El proyecto de la lista de las 10 mayores esta dirijida y patrocinada por [http://www.aspectsecurity.com https://www.owasp.org/images/d/d1/Aspect_logo.gif].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Líder de proyecto: Andrew van der Stock (Director ejecutivo, Fundación OWASP)&lt;br /&gt;
Co-autores:        Jeff Williams (Presidencia, Fundación OWASP), Dave Wichers (Presidencia de conferencia, Fundación OWASP)&lt;br /&gt;
&lt;br /&gt;
Queremos agradecer a los revisores:&lt;br /&gt;
&lt;br /&gt;
*Raoul Endres por ayudar a echar a andar la lista de nuevo y por sus valiosos comentarios.&lt;br /&gt;
*[mailto:coley...at...mitre.org Steve Christey](MITRE) por una importante revisión y la adición de los datos del MITRE CWE&lt;br /&gt;
*[http://jeremiahgrossman.blogspot.com/ Jeremiah Grossman] ([http://www.whitehatsec.com/ WhiteHat Security]) por revisar y contribuir con información sobre el éxico (o falla) de la medidas de detección automatizadas.&lt;br /&gt;
*[http://www.smithline.net/ Neil Smithline] ([http://www.bea.com/ BEA Systems]) por sus comentarios y producir la versión Wiki-&lt;br /&gt;
*Sylvan von Stuppe por una revisión ejemplar.&lt;br /&gt;
*Colin Wong, Nigel Evans y Andre Gironda por comentarios enviados por correo.&lt;br /&gt;
&lt;br /&gt;
== Conclusión ==&lt;br /&gt;
&lt;br /&gt;
{| border='1' cellpadding='2' &lt;br /&gt;
|-	&lt;br /&gt;
|[[Top 10 2007-Secuencia de Comandos en Sitios Cruzados (XSS)|A1 - Secuencia de comandos en sitios cruzados (XSS)]]&lt;br /&gt;
|Las fallas de XSS acurren cuando una aplicación toma la información proveida por el usuario y la envia a un navegador sin validarla primero o codificar el contenido. El XSS permite a los atacantes ejecurar scripts en el navegador de la víctima la cual puede secuestrar la sesión del usuario, modificación de sitios web, la posible introducción de gusanos, etc.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Fallas de Inyección|A2 - Inyección de código]]&lt;br /&gt;
|La fallas de inyección, particularmente la inyección de SQL, son comunes en las aplicaciones Web. La inyección ocurre cuando los datos proveidos por el usuario son enviados a un interprete como parte de un comando o petición. Los datos hostiles del atacante engañan al interprete a ejecutar comandos no intencionados o cambiar los datos.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Ejecución de Ficheros Malintencionados|A3 - Ejecución maliciosa de archivos]]&lt;br /&gt;
|El código vulnerable a inclusión remota de archivos permite a los atacantes incluir código y datos hostiles, resultando en ataques devastadores, como secuestro total del servidor. Los ataques de ejecución maliciosa de archivos afectan a PHP, XML y cualquier marco de trabajo que soporte el manejo de nombres de archivos o permita la interacción con los usuarios mediante el intercambio de archivos.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Referencia Insegura y Directa a Objetos|A4 - Referencia directa e insegura a objetos]]&lt;br /&gt;
|Una referencia directa e insegura a objetos ocurre cuando un desarrollador expone una referencia a una implementación interna de un objeto como unn archivo, un directorio, un registro de BD o una llave, en forma de parámetro de URL o de una forma. Los atacantes pueden manipular esas referencias para acceder a otros objetos sin tener autorización&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Vulnerabilidades de Falsificación de Petición en Sitios Cruzados (CSRF)|A5 - Falsificación de petición en sitios crusados (CSRF)]]&lt;br /&gt;
|A CSRF attack forces a logged-on victim's browser to send a pre-authenticated request to a vulnerable web application, which then forces the victim's browser to perform a hostile action to the benefit of the attacker. CSRF can be as powerful as the web application that it attacks.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Revelación de Información y Gestión Incorrecta de Errores|A6 - Revelación de Información y Gestión Incorrecta de Errores]]&lt;br /&gt;
|Las aplicaciones pueden (sin intención) revelar información sobre su configuración, funcionalidad interna o violar la privacidad a travez de una variedad de problemas de la aplicación. Los atacantes usan estas debilidades para robar información delicada o conducir ataques mas serios. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Autenticación y Gestión de Sesiones Disfuncional|A7 - Autentificación y gestión de sesiones disfuncional]]&lt;br /&gt;
|Las credenciales de las cuenta y testigos de sesión son frecuentemente protegidos inadecuadamente. Los atacantes roban contraseñas, llaves o testigos de autneticación para asumir la identidad de otros usuarios.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Almacenamiento Criptográfico Inseguro|A8 - Almacenamiento cirptográfico inseguro]]&lt;br /&gt;
|Las aplicaciones Web raramente usan funciones criptográdicas apropiadamente para proteger información y credenciales. Los atacantes usan la información mal protegida para hacer robos de identidad y otros crimenes, como fraude con tarjetas de crédito.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Comunicaciones inseguras|A9 - Comunicación Insegura]]&lt;br /&gt;
|Las aplicaciones frecuentement falla al cifrar el tráfico de red cuando es necesario proteger comunicaciones delicadas.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Falla de restricción de acceso a URL|A10 - Falla de restricción de acceso a URL]]&lt;br /&gt;
|Frecuentemente, una aplicacion solo protege funcionalidad delicada evitando mostrar la ligas o URLs a usuarios no autorizados. Los atacantes pueden usar esta debilidad para acceder y realizar operaciones no autorizadas al acceder a esas URLs directamente.&lt;br /&gt;
|}&lt;br /&gt;
'''&amp;lt;center&amp;gt;Tabla 1: La 10 mayores vulnerabilidades de OWASP 2007&amp;lt;/center&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hay muchas páginas en este documento que no están dedicadas a vulnerabilidades en específico y por lo tanto no están listadas en la tabla. Aqui hay una lista de ellas.&lt;br /&gt;
&lt;br /&gt;
{| border='1' cellpadding='2' &lt;br /&gt;
|-	&lt;br /&gt;
|[[Top 10 2007]]&lt;br /&gt;
|Ademas de proveed una presentación, y un marcador de la sección de &amp;quot;conclusiones&amp;quot; (esto puede hacerse arrastrando [https://www.owasp.org/index.php/Top_10_2007#Summary esta liga] a sus favoritos) nos da acceso rápido a el documento completo.&lt;br /&gt;
|-&lt;br /&gt;
|[[Top 10 2007-Metodología]]&lt;br /&gt;
|Una descripción de la metodología usada para selecionar las vulnerabilidades para este documento.&lt;br /&gt;
|-&lt;br /&gt;
|[[Top 10 2007-¿A dondé sigo Ahora?]]&lt;br /&gt;
|Algunas sugerencias sobre como proceder una ves que ha leído este documento.&lt;br /&gt;
|-&lt;br /&gt;
|[[Top 10 2007-Referencias]]&lt;br /&gt;
|Recomendaciones para lectura posterior.&lt;br /&gt;
|}&lt;br /&gt;
'''&amp;lt;center&amp;gt;Tabla 1a: Paginas en el documento de la ''lista de las 10 mayores 2007'' que no son la lista de vulnerabilidades mencionadas arriba.&amp;lt;/center&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
==Una nota sobre las diferentes versiones==&lt;br /&gt;
Mientras que la única versión oficial de la ''lista de las 10 mayores vulnerabilidades de OWASP 2007'' es la version en PDF y en inglés, OWASP ah puesto a su disposición este Wiki que inicialmente contenia el mismo contenido que el PDF. Pero OWASP espera que cambien con su ayuda. OWASP promueve el envolvimiento de la comunidad y quiere su ayuda para hacer la versión Wiki mejor que nunca. Para ayudar a esto han creado un pequeño [[Editing:Top_10_2007|tutorial]] para iniciarlo en este proceso.&lt;br /&gt;
&lt;br /&gt;
==Versiones para bajar==&lt;br /&gt;
Puede bajar la lista 2007 (versión final) aqui:&lt;br /&gt;
&lt;br /&gt;
* [http://www.owasp.org/images/e/e8/OWASP_Top_10_2007.pdf (PDF, 930 kb)]&lt;br /&gt;
&amp;lt;!--* [http://www.owasp.org/images/2/24/OWASP_Top_10_2007.doc (Word, 514 kb)]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/a/ae/OWASP_Top_10_2007_Spanish.pdf (Español PDF, 488kb)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/c/ce/OWASP_Top_10_2007_-_French.pdf (Francés PDF, 455 kb)]&lt;br /&gt;
&lt;br /&gt;
* [http://www.metasecurity.org/owasp/OWASP_Top_10_2007_Korean.pdf (Koreano PDF, 768 kb)]&lt;br /&gt;
&lt;br /&gt;
* [http://csirt.ulakbim.gov.tr/dokumanlar/Ceviri_OWASP_ilk10_2007.pdf (Turco PDF, 718 kb)]&lt;br /&gt;
&lt;br /&gt;
* [http://www.owasp.org/images/4/42/OWASP_TOP_10_2007_PT-BR.pdf (Portuguese Brasileño PDF, 329 kb)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/8/89/OWASP_Top_10_2007_for_JEE.pdf OWASP Top 10 para la versión empresarial de Java (PDF, 630 kb)]&lt;br /&gt;
&lt;br /&gt;
* Le gustaría tener esta versión en otro idioma? podriamos usar su ayuda para traducirla. Contacte a Andrew van der Stock (vanderaj ...(@)... owasp.org) para ayudarnos a traducir la lista de las 10 mayores a otro idioma.&lt;br /&gt;
&lt;br /&gt;
{{Top_10_2007:BottomTemplate|usenext=NextLink|next=-Metodología|useprev=Nothing|usemain=Nothing}}&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Diez_Mayores_2007&amp;diff=76478</id>
		<title>Diez Mayores 2007</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Diez_Mayores_2007&amp;diff=76478"/>
				<updated>2010-01-18T19:38:23Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Top_10_2007:TopTemplate|usenext=NextLink|next=-Metodología|useprev=Nothing|usemain=Nothing}}&lt;br /&gt;
&lt;br /&gt;
==Presentación==&lt;br /&gt;
&lt;br /&gt;
Bienvenidos a la lista de las 10 mayores vulnerabilidades de OWASP 2007!  Esta edición, totalmente reescrita lista las vulnerabilidades más serias en aplicaciones web, discute como protegerse de ellas y provee ligas a mas información.  '''La lista de las 10 mayores vulnerabilidades de OWASP ha sido traducida al Español. [https://www.owasp.org/images/a/ae/OWASP_Top_10_2007_Spanish.pdf De clic aquí] para la traducción al español!'''&lt;br /&gt;
&lt;br /&gt;
La lista de las 10 mayores de OWASP para la versión empresarial de Java esta disponible para bajarla [https://www.owasp.org/images/8/89/OWASP_Top_10_2007_for_JEE.pdf aqui]&lt;br /&gt;
&lt;br /&gt;
== Objetivo ==&lt;br /&gt;
&lt;br /&gt;
'''El objetivo principal de la lista de las 10 de OWASP es formar desarrolladores, diseñadores, arquitectos y organizaciones''' sobre las consecuencias de las vulnerabilidades más comunes en aplicaciones web. Las lista provee métodos básicos para protegerse contra estas vulnerabilidades - un gran inicio para su programa de codificación segura.&lt;br /&gt;
&lt;br /&gt;
'''La seguridad no es un evento de una sola vez'''. No es suficiente asegurar su código solo una vez. Para 2008, esta lista cambiará y sin cambiar una línea de el código de su aplicación, puede ser vulnerable. Por favor revise el consejo en [[Top_10_2007-Where to Go From Here|Top 10 2007-¿A dondé sigo Ahora?]] para mas información.&lt;br /&gt;
&lt;br /&gt;
'''Una iniciativa de codificación segura debe lidiar con todas las etapas de desarrollo del programa'''. Las aplicaciones Web seguras '''''solo''''' es posible cuando un SDLC seguro es usado. Los programas seguros desde el inicio por su diseño y desarrollo. Hay al menos 300 problemas que afectan la seguridad en general de una aplicación Web. Estos mas de 300 problemas están detallados en la [http://www.owasp.org/index.php/OWASP_Guide_Project Guía de OWASP], la cua es una lectura escencial para cualquiera que desarolle aplicaciones Web en la actualidad.&lt;br /&gt;
&lt;br /&gt;
'''Este documento es el principalmente un documento educativo, no un standard'''.  Por favor no adopte este documento como una política o estándar sin [mailto:owasp@owasp.org hablar con nosotros] primero! Si necesita una política o estandar de codificación segura, OWASP tiene proyectos de políticas y estándares de seguridad que están en progreso.  Por favor considere unirse o asistir financieramente estos esfuerzos.&lt;br /&gt;
&lt;br /&gt;
== Retroalimentación ==&lt;br /&gt;
&lt;br /&gt;
{| &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|Agradecemos a [http://www.mitre.org/ MITRE] por hacer ''La  distribución de tipos de vulnerabilidades en el [http://cve.mitre.org/ CVE]'' disponibles libremente para su uso. El proyecto de la lista de las 10 mayores esta dirijida y patrocinada por [http://www.aspectsecurity.com https://www.owasp.org/images/d/d1/Aspect_logo.gif].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Líder de proyecto: Andrew van der Stock (Director ejecutivo, Fundación OWASP)&lt;br /&gt;
Co-autores:        Jeff Williams (Presidencia, Fundación OWASP), Dave Wichers (Presidencia de conferencia, Fundación OWASP)&lt;br /&gt;
&lt;br /&gt;
Queremos agradecer a los revisores:&lt;br /&gt;
&lt;br /&gt;
*Raoul Endres por ayudar a echar a andar la lista de nuevo y por sus valiosos comentarios.&lt;br /&gt;
*[mailto:coley...at...mitre.org Steve Christey](MITRE) por una importante revisión y la adición de los datos del MITRE CWE&lt;br /&gt;
*[http://jeremiahgrossman.blogspot.com/ Jeremiah Grossman] ([http://www.whitehatsec.com/ WhiteHat Security]) por revisar y contribuir con información sobre el éxico (o falla) de la medidas de detección automatizadas.&lt;br /&gt;
*[http://www.smithline.net/ Neil Smithline] ([http://www.bea.com/ BEA Systems]) por sus comentarios y producir la versión Wiki-&lt;br /&gt;
*Sylvan von Stuppe por una revisión ejemplar.&lt;br /&gt;
*Colin Wong, Nigel Evans y Andre Gironda por comentarios enviados por correo.&lt;br /&gt;
&lt;br /&gt;
== Conclusión ==&lt;br /&gt;
&lt;br /&gt;
{| border='1' cellpadding='2' &lt;br /&gt;
|-	&lt;br /&gt;
|[[Top 10 2007-Secuencia de Comandos en Sitios Cruzados (XSS)|A1 - Secuencia de comandos en sitios cruzados (XSS)]]&lt;br /&gt;
|Las fallas de XSS acurren cuando una aplicación toma la información proveida por el usuario y la envia a un navegador sin validarla primero o codificar el contenido. El XSS permite a los atacantes ejecurar scripts en el navegador de la víctima la cual puede secuestrar la sesión del usuario, modificación de sitios web, la posible introducción de gusanos, etc.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Fallas de Inyección|A2 - Inyección de código]]&lt;br /&gt;
|La fallas de inyección, particularmente la inyección de SQL, son comunes en las aplicaciones Web. La inyección ocurre cuando los datos proveidos por el usuario son enviados a un interprete como parte de un comando o petición. Los datos hostiles del atacante engañan al interprete a ejecutar comandos no intencionados o cambiar los datos.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Ejecución de Ficheros Malintencionados|A3 - Ejecución maliciosa de archivos]]&lt;br /&gt;
|El código vulnerable a inclusión remota de archivos permite a los atacantes incluir código y datos hostiles, resultando en ataques devastadores, como secuestro total del servidor. Los ataques de ejecución maliciosa de archivos afectan a PHP, XML y cualquier marco de trabajo que acepte nombres de archivos o archivos desde los usuarios.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Referencia Insegura y Directa a Objetos|A4 - Referencia directa e insegura a objetos]]&lt;br /&gt;
|Una referencia directa e insegura a objetos ocurre cuando un desarrollador expone una referencia a una implementación interna de un objeto como unn archivo, un directorio, un registro de BD o una llave, en forma de parámetro de URL o de una forma. Los atacantes pueden manipular esas referencias para acceder a otros objetos sin tener autorización&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Vulnerabilidades de Falsificación de Petición en Sitios Cruzados (CSRF)|A5 - Falsificación de petición en sitios crusados (CSRF)]]&lt;br /&gt;
|A CSRF attack forces a logged-on victim's browser to send a pre-authenticated request to a vulnerable web application, which then forces the victim's browser to perform a hostile action to the benefit of the attacker. CSRF can be as powerful as the web application that it attacks.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Revelación de Información y Gestión Incorrecta de Errores|A6 - Revelación de Información y Gestión Incorrecta de Errores]]&lt;br /&gt;
|Las aplicaciones pueden (sin intención) revelar información sobre su configuración, funcionalidad interna o violar la privacidad a travez de una variedad de problemas de la aplicación. Los atacantes usan estas debilidades para robar información delicada o conducir ataques mas serios. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Autenticación y Gestión de Sesiones Disfuncional|A7 - Autentificación y gestión de sesiones disfuncional]]&lt;br /&gt;
|Las credenciales de las cuenta y testigos de sesión son frecuentemente protegidos inadecuadamente. Los atacantes roban contraseñas, llaves o testigos de autneticación para asumir la identidad de otros usuarios.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Almacenamiento Criptográfico Inseguro|A8 - Almacenamiento cirptográfico inseguro]]&lt;br /&gt;
|Las aplicaciones Web raramente usan funciones criptográdicas apropiadamente para proteger información y credenciales. Los atacantes usan la información mal protegida para hacer robos de identidad y otros crimenes, como fraude con tarjetas de crédito.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Comunicaciones inseguras|A9 - Comunicación Insegura]]&lt;br /&gt;
|Las aplicaciones frecuentement falla al cifrar el tráfico de red cuando es necesario proteger comunicaciones delicadas.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Falla de restricción de acceso a URL|A10 - Falla de restricción de acceso a URL]]&lt;br /&gt;
|Frecuentemente, una aplicacion solo protege funcionalidad delicada evitando mostrar la ligas o URLs a usuarios no autorizados. Los atacantes pueden usar esta debilidad para acceder y realizar operaciones no autorizadas al acceder a esas URLs directamente.&lt;br /&gt;
|}&lt;br /&gt;
'''&amp;lt;center&amp;gt;Tabla 1: La 10 mayores vulnerabilidades de OWASP 2007&amp;lt;/center&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hay muchas páginas en este documento que no están dedicadas a vulnerabilidades en específico y por lo tanto no están listadas en la tabla. Aqui hay una lista de ellas.&lt;br /&gt;
&lt;br /&gt;
{| border='1' cellpadding='2' &lt;br /&gt;
|-	&lt;br /&gt;
|[[Top 10 2007]]&lt;br /&gt;
|Ademas de proveed una presentación, y un marcador de la sección de &amp;quot;conclusiones&amp;quot; (esto puede hacerse arrastrando [https://www.owasp.org/index.php/Top_10_2007#Summary esta liga] a sus favoritos) nos da acceso rápido a el documento completo.&lt;br /&gt;
|-&lt;br /&gt;
|[[Top 10 2007-Metodología]]&lt;br /&gt;
|Una descripción de la metodología usada para selecionar las vulnerabilidades para este documento.&lt;br /&gt;
|-&lt;br /&gt;
|[[Top 10 2007-¿A dondé sigo Ahora?]]&lt;br /&gt;
|Algunas sugerencias sobre como proceder una ves que ha leído este documento.&lt;br /&gt;
|-&lt;br /&gt;
|[[Top 10 2007-Referencias]]&lt;br /&gt;
|Recomendaciones para lectura posterior.&lt;br /&gt;
|}&lt;br /&gt;
'''&amp;lt;center&amp;gt;Tabla 1a: Paginas en el documento de la ''lista de las 10 mayores 2007'' que no son la lista de vulnerabilidades mencionadas arriba.&amp;lt;/center&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
==Una nota sobre las diferentes versiones==&lt;br /&gt;
Mientras que la única versión oficial de la ''lista de las 10 mayores vulnerabilidades de OWASP 2007'' es la version en PDF y en inglés, OWASP ah puesto a su disposición este Wiki que inicialmente contenia el mismo contenido que el PDF. Pero OWASP espera que cambien con su ayuda. OWASP promueve el envolvimiento de la comunidad y quiere su ayuda para hacer la versión Wiki mejor que nunca. Para ayudar a esto han creado un pequeño [[Editing:Top_10_2007|tutorial]] para iniciarlo en este proceso.&lt;br /&gt;
&lt;br /&gt;
==Versiones para bajar==&lt;br /&gt;
Puede bajar la lista 2007 (versión final) aqui:&lt;br /&gt;
&lt;br /&gt;
* [http://www.owasp.org/images/e/e8/OWASP_Top_10_2007.pdf (PDF, 930 kb)]&lt;br /&gt;
&amp;lt;!--* [http://www.owasp.org/images/2/24/OWASP_Top_10_2007.doc (Word, 514 kb)]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/a/ae/OWASP_Top_10_2007_Spanish.pdf (Español PDF, 488kb)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/c/ce/OWASP_Top_10_2007_-_French.pdf (Francés PDF, 455 kb)]&lt;br /&gt;
&lt;br /&gt;
* [http://www.metasecurity.org/owasp/OWASP_Top_10_2007_Korean.pdf (Koreano PDF, 768 kb)]&lt;br /&gt;
&lt;br /&gt;
* [http://csirt.ulakbim.gov.tr/dokumanlar/Ceviri_OWASP_ilk10_2007.pdf (Turco PDF, 718 kb)]&lt;br /&gt;
&lt;br /&gt;
* [http://www.owasp.org/images/4/42/OWASP_TOP_10_2007_PT-BR.pdf (Portuguese Brasileño PDF, 329 kb)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/8/89/OWASP_Top_10_2007_for_JEE.pdf OWASP Top 10 para la versión empresarial de Java (PDF, 630 kb)]&lt;br /&gt;
&lt;br /&gt;
* Le gustaría tener esta versión en otro idioma? podriamos usar su ayuda para traducirla. Contacte a Andrew van der Stock (vanderaj ...(@)... owasp.org) para ayudarnos a traducir la lista de las 10 mayores a otro idioma.&lt;br /&gt;
&lt;br /&gt;
{{Top_10_2007:BottomTemplate|usenext=NextLink|next=-Metodología|useprev=Nothing|usemain=Nothing}}&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Diez_Mayores_2007&amp;diff=76476</id>
		<title>Diez Mayores 2007</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Diez_Mayores_2007&amp;diff=76476"/>
				<updated>2010-01-18T19:32:55Z</updated>
		
		<summary type="html">&lt;p&gt;Jorge Correa: /* Conclusión */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Top_10_2007:TopTemplate|usenext=NextLink|next=-Metodología|useprev=Nothing|usemain=Nothing}}&lt;br /&gt;
&lt;br /&gt;
==Presentación==&lt;br /&gt;
&lt;br /&gt;
Bienvenidos a la lista de las 10 mayores vulnerabilidades de OWASP 2007!  Esta edición, totalmente reescrita lista las vulnerabilidades más serias en aplicaciones web, discute como protegerse de ellas y provee ligas a mas información.  '''La lista de las 10 mayores vulnerabilidades de OWASP ha sido traducida al Español. [https://www.owasp.org/images/a/ae/OWASP_Top_10_2007_Spanish.pdf De clic aquí] para la traducción al español!'''&lt;br /&gt;
&lt;br /&gt;
La lista de las 10 mayores de OWASP para la versión empresarial de Java esta disponible para bajarla [https://www.owasp.org/images/8/89/OWASP_Top_10_2007_for_JEE.pdf aqui]&lt;br /&gt;
&lt;br /&gt;
== Objetivo ==&lt;br /&gt;
&lt;br /&gt;
'''El objetivo principal de la lista de las 10 de OWASP es formar desarrolladores, diseñadores, arquitectos y organizaciones''' sobre las consecuencias de las vulnerabilidades más comunes en aplicaciones web. Las lista provee métodos básicos para protegerse contra estas vulnerabilidades - un gran inicio para su programa de codificación segura.&lt;br /&gt;
&lt;br /&gt;
'''La seguridad no es un evento de una sola vez'''. No es suficiente asegurar su código solo una vez. Para 2008, esta lista cambiará y sin cambiar una línea de el código de su aplicación, puede ser vulnerable. Por favor revise el consejo en [[Top_10_2007-Where to Go From Here|Top 10 2007-¿A dondé sigo Ahora?]] para mas información.&lt;br /&gt;
&lt;br /&gt;
'''Una iniciativa de codificación segura debe lidiar con todas las etapas de desarrollo del programa'''. Las aplicaciones Web seguras '''''solo''''' es posible cuando un SDLC seguro es usado. Los programas seguros desde el inicio por su diseño y desarrollo. Hay al menos 300 problemas que afectan la seguridad en general de una aplicación Web. Estos mas de 300 problemas están detallados en la [http://www.owasp.org/index.php/OWASP_Guide_Project Guía de OWASP], la cua es una lectura escencial para cualquiera que desarolle aplicaciones Web en la actualidad.&lt;br /&gt;
&lt;br /&gt;
'''Este documento es el principalmente un documento educativo, no un standard'''.  Por favor no adopte este documento como una política o estándar sin [mailto:owasp@owasp.org hablar con nosotros] primero! Si necesita una política o estandar de codificación segura, OWASP tiene proyectos de políticas y estándares de seguridad que están en progreso.  Por favor considere unirse o asistir financieramente estos esfuerzos.&lt;br /&gt;
&lt;br /&gt;
== Retroalimentación ==&lt;br /&gt;
&lt;br /&gt;
{| &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|Agradecemos a [http://www.mitre.org/ MITRE] por hacer ''La  distribución de tipos de vulnerabilidades en el [http://cve.mitre.org/ CVE]'' disponibles libremente para su uso. El proyecto de la lista de las 10 mayores esta dirijida y patrocinada por [http://www.aspectsecurity.com https://www.owasp.org/images/d/d1/Aspect_logo.gif].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Líder de proyecto: Andrew van der Stock (Director ejecutivo, Fundación OWASP)&lt;br /&gt;
Co-autores:        Jeff Williams (Presidencia, Fundación OWASP), Dave Wichers (Presidencia de conferencia, Fundación OWASP)&lt;br /&gt;
&lt;br /&gt;
Queremos agradecer a los revisores:&lt;br /&gt;
&lt;br /&gt;
*Raoul Endres por ayudar a echar a andar la lista de nuevo y por sus valiosos comentarios.&lt;br /&gt;
*[mailto:coley...at...mitre.org Steve Christey](MITRE) por una importante revisión y la adición de los datos del MITRE CWE&lt;br /&gt;
*[http://jeremiahgrossman.blogspot.com/ Jeremiah Grossman] ([http://www.whitehatsec.com/ WhiteHat Security]) por revisar y contribuir con información sobre el éxico (o falla) de la medidas de detección automatizadas.&lt;br /&gt;
*[http://www.smithline.net/ Neil Smithline] ([http://www.bea.com/ BEA Systems]) por sus comentarios y producir la versión Wiki-&lt;br /&gt;
*Sylvan von Stuppe por una revisión ejemplar.&lt;br /&gt;
*Colin Wong, Nigel Evans y Andre Gironda por comentarios enviados por correo.&lt;br /&gt;
&lt;br /&gt;
== Conclusión ==&lt;br /&gt;
&lt;br /&gt;
{| border='1' cellpadding='2' &lt;br /&gt;
|-	&lt;br /&gt;
|[[Top 10 2007-Secuencia de Comandos en Sitios Cruzados (XSS)|A1 - Secuencia de comandos en sitios cruzados (XSS)]]&lt;br /&gt;
|Las fallas de XSS acurren cuando una aplicación toma la información proveida por el usuario y la envia a un navegador sin validarla primero o codificar el contenido. El XSS permite a los atacantes ejecurar scripts en el navegador de la víctima la cual puede secuestrar la sesión del usuario, modificación de sitios web, la posible introducción de gusanos, etc.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Fallas de Inyección|A2 - Inyección de código SQL]]&lt;br /&gt;
|La fallas de inyección, particularmente la inyección de SQL, son comunes en las aplicaciones Web. La inyección ocurre cuando los datos proveidos por el usuario son enviados a un interprete como parte de un comando o petición. Los datos hostiles del atacante engañan al interprete a ejecutar comandos no intencionados o cambiar los datos.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Ejecución de Ficheros Malintencionados|A3 - Ejecución maliciosa de archivos]]&lt;br /&gt;
|El código vulnerable a inclusión remota de archivos permite a los atacantes incluir código y datos hostiles, resultando en ataques devastadores, como secuestro total del servidor. Los ataques de ejecución maliciosa de archivos afectan a PHP, XML y cualquier marco de trabajo que acepte nombres de archivos o archivos desde los usuarios.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Referencia Insegura y Directa a Objetos|A4 - Referencia directa e insegura a objetos]]&lt;br /&gt;
|Una referencia directa e insegura a objetos ocurre cuando un desarrollador expone una referencia a una implementación interna de un objeto como unn archivo, un directorio, un registro de BD o una llave, en forma de parámetro de URL o de una forma. Los atacantes pueden manipular esas referencias para acceder a otros objetos sin tener autorización&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Vulnerabilidades de Falsificación de Petición en Sitios Cruzados (CSRF)|A5 - Falsificación de petición en sitios crusados (CSRF)]]&lt;br /&gt;
|A CSRF attack forces a logged-on victim's browser to send a pre-authenticated request to a vulnerable web application, which then forces the victim's browser to perform a hostile action to the benefit of the attacker. CSRF can be as powerful as the web application that it attacks.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Revelación de Información y Gestión Incorrecta de Errores|A6 - Revelación de Información y Gestión Incorrecta de Errores]]&lt;br /&gt;
|Las aplicaciones pueden (sin intención) revelar información sobre su configuración, funcionalidad interna o violar la privacidad a travez de una variedad de problemas de la aplicación. Los atacantes usan estas debilidades para robar información delicada o conducir ataques mas serios. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Autenticación y Gestión de Sesiones Disfuncional|A7 - Autentificación y gestión de sesiones disfuncional]]&lt;br /&gt;
|Las credenciales de las cuenta y testigos de sesión son frecuentemente protegidos inadecuadamente. Los atacantes roban contraseñas, llaves o testigos de autneticación para asumir la identidad de otros usuarios.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Almacenamiento Criptográfico Inseguro|A8 - Almacenamiento cirptográfico inseguro]]&lt;br /&gt;
|Las aplicaciones Web raramente usan funciones criptográdicas apropiadamente para proteger información y credenciales. Los atacantes usan la información mal protegida para hacer robos de identidad y otros crimenes, como fraude con tarjetas de crédito.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Comunicaciones inseguras|A9 - Comunicación Insegura]]&lt;br /&gt;
|Las aplicaciones frecuentement falla al cifrar el tráfico de red cuando es necesario proteger comunicaciones delicadas.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|[[Top 10 2007-Falla de restricción de acceso a URL|A10 - Falla de restricción de acceso a URL]]&lt;br /&gt;
|Frecuentemente, una aplicacion solo protege funcionalidad delicada evitando mostrar la ligas o URLs a usuarios no autorizados. Los atacantes pueden usar esta debilidad para acceder y realizar operaciones no autorizadas al acceder a esas URLs directamente.&lt;br /&gt;
|}&lt;br /&gt;
'''&amp;lt;center&amp;gt;Tabla 1: La 10 mayores vulnerabilidades de OWASP 2007&amp;lt;/center&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hay muchas páginas en este documento que no están dedicadas a vulnerabilidades en específico y por lo tanto no están listadas en la tabla. Aqui hay una lista de ellas.&lt;br /&gt;
&lt;br /&gt;
{| border='1' cellpadding='2' &lt;br /&gt;
|-	&lt;br /&gt;
|[[Top 10 2007]]&lt;br /&gt;
|Ademas de proveed una presentación, y un marcador de la sección de &amp;quot;conclusiones&amp;quot; (esto puede hacerse arrastrando [https://www.owasp.org/index.php/Top_10_2007#Summary esta liga] a sus favoritos) nos da acceso rápido a el documento completo.&lt;br /&gt;
|-&lt;br /&gt;
|[[Top 10 2007-Metodología]]&lt;br /&gt;
|Una descripción de la metodología usada para selecionar las vulnerabilidades para este documento.&lt;br /&gt;
|-&lt;br /&gt;
|[[Top 10 2007-¿A dondé sigo Ahora?]]&lt;br /&gt;
|Algunas sugerencias sobre como proceder una ves que ha leído este documento.&lt;br /&gt;
|-&lt;br /&gt;
|[[Top 10 2007-Referencias]]&lt;br /&gt;
|Recomendaciones para lectura posterior.&lt;br /&gt;
|}&lt;br /&gt;
'''&amp;lt;center&amp;gt;Tabla 1a: Paginas en el documento de la ''lista de las 10 mayores 2007'' que no son la lista de vulnerabilidades mencionadas arriba.&amp;lt;/center&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
==Una nota sobre las diferentes versiones==&lt;br /&gt;
Mientras que la única versión oficial de la ''lista de las 10 mayores vulnerabilidades de OWASP 2007'' es la version en PDF y en inglés, OWASP ah puesto a su disposición este Wiki que inicialmente contenia el mismo contenido que el PDF. Pero OWASP espera que cambien con su ayuda. OWASP promueve el envolvimiento de la comunidad y quiere su ayuda para hacer la versión Wiki mejor que nunca. Para ayudar a esto han creado un pequeño [[Editing:Top_10_2007|tutorial]] para iniciarlo en este proceso.&lt;br /&gt;
&lt;br /&gt;
==Versiones para bajar==&lt;br /&gt;
Puede bajar la lista 2007 (versión final) aqui:&lt;br /&gt;
&lt;br /&gt;
* [http://www.owasp.org/images/e/e8/OWASP_Top_10_2007.pdf (PDF, 930 kb)]&lt;br /&gt;
&amp;lt;!--* [http://www.owasp.org/images/2/24/OWASP_Top_10_2007.doc (Word, 514 kb)]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/a/ae/OWASP_Top_10_2007_Spanish.pdf (Español PDF, 488kb)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/c/ce/OWASP_Top_10_2007_-_French.pdf (Francés PDF, 455 kb)]&lt;br /&gt;
&lt;br /&gt;
* [http://www.metasecurity.org/owasp/OWASP_Top_10_2007_Korean.pdf (Koreano PDF, 768 kb)]&lt;br /&gt;
&lt;br /&gt;
* [http://csirt.ulakbim.gov.tr/dokumanlar/Ceviri_OWASP_ilk10_2007.pdf (Turco PDF, 718 kb)]&lt;br /&gt;
&lt;br /&gt;
* [http://www.owasp.org/images/4/42/OWASP_TOP_10_2007_PT-BR.pdf (Portuguese Brasileño PDF, 329 kb)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/8/89/OWASP_Top_10_2007_for_JEE.pdf OWASP Top 10 para la versión empresarial de Java (PDF, 630 kb)]&lt;br /&gt;
&lt;br /&gt;
* Le gustaría tener esta versión en otro idioma? podriamos usar su ayuda para traducirla. Contacte a Andrew van der Stock (vanderaj ...(@)... owasp.org) para ayudarnos a traducir la lista de las 10 mayores a otro idioma.&lt;br /&gt;
&lt;br /&gt;
{{Top_10_2007:BottomTemplate|usenext=NextLink|next=-Metodología|useprev=Nothing|usemain=Nothing}}&lt;/div&gt;</summary>
		<author><name>Jorge Correa</name></author>	</entry>

	</feed>