<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Eugene Siu's Thoughts on Security : IIS</title><link>http://blogs.msdn.com/esiu/archive/tags/IIS/default.aspx</link><description>Tags: IIS</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>ASP.NET ValidateRequest does not mitigate XSS completely</title><link>http://blogs.msdn.com/esiu/archive/2007/10/19/asp-net-validaterequest-does-not-mitigate-xss-completely.aspx</link><pubDate>Sat, 20 Oct 2007 00:26:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5529155</guid><dc:creator>esiu</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/esiu/comments/5529155.aspx</comments><wfw:commentRss>http://blogs.msdn.com/esiu/commentrss.aspx?PostID=5529155</wfw:commentRss><description>&lt;p&gt;As a security guy, I can safely say that there is no magic bullet to mitigate any security problems completely, and cross-site scripting(XSS) bugs are not exceptions.&amp;nbsp; Since ASP.NET 1.1, ValidateRequest can be configured in web.config to check and reject dangerous inputs, and &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.httprequestvalidationexception(vs.80).aspx"&gt;HttpRequestValidationException&lt;/a&gt;&amp;nbsp;is thrown before the input is even processed by your code.&amp;nbsp; For example, &lt;em&gt;&amp;lt;script&amp;gt;&lt;/em&gt; would be caught by ValidateRequest.&lt;/p&gt; &lt;p&gt;During my security reviews, I routinely find that many web applications turn on ValidateRequest (It is on by default), and do not follow XSS mitigation techniques, such as output encoding by HTMLEncode or &lt;a href="http://msdn2.microsoft.com/en-us/library/aa973813.aspx"&gt;ACE Anti-XSS library&lt;/a&gt;.&amp;nbsp; They believe that ValidateRequest can fix all XSS problems.&lt;/p&gt; &lt;p&gt;However, there are a couple downsides of relying on ValidateRequest:&lt;br&gt;1. ValidateRequest may miss some crafty inputs.&amp;nbsp; Please read MS07-040 for &lt;a href="http://www.microsoft.com/technet/security/Bulletin/MS07-040.mspx"&gt;a recent MSRC fix&lt;/a&gt; on ValidateRequest.&lt;/p&gt; &lt;p&gt;2. ValidateRequest cannot be turned on in all cases, as characters that trigger XSS may also be needed in valid user scenarios.&amp;nbsp; For example, AJAX transmits XML blobs between client and server,&amp;nbsp;but ValidateRequest will throw &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.httprequestvalidationexception(vs.80).aspx"&gt;HttpRequestValidationException&lt;/a&gt;&amp;nbsp;as it contains "dangerous" characters, such as &amp;lt; and &amp;gt;.&amp;nbsp; Exchange 2007 OWA cannot run with ValidateRequest turned on.&amp;nbsp; &lt;/p&gt; &lt;p&gt;In conclusion, ValidateRequest should be turned on if it does not block valid user scenarios.&amp;nbsp; However, even with ValidateRequest turned on, it MUST not be regarded as a sure-fire way to mitigate XSS.&amp;nbsp; Please read &lt;a title="http://msdn2.microsoft.com/en-us/library/ms998274.aspx" href="http://msdn2.microsoft.com/en-us/library/ms998274.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms998274.aspx&lt;/a&gt;&amp;nbsp;for full XSS mitigation.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5529155" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/esiu/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/esiu/archive/tags/Security/default.aspx">Security</category></item><item><title>What is the maximum size of post requests to IIS?</title><link>http://blogs.msdn.com/esiu/archive/2004/11/18/266018.aspx</link><pubDate>Thu, 18 Nov 2004 23:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:266018</guid><dc:creator>esiu</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/esiu/comments/266018.aspx</comments><wfw:commentRss>http://blogs.msdn.com/esiu/commentrss.aspx?PostID=266018</wfw:commentRss><description>&lt;div dir="ltr" align="left"&gt;&lt;span class="834351823"&gt;&lt;font face="Arial" size="2"&gt;ASP applications are protected, but what happens to non-ASP requests?&amp;nbsp; Currently, there is no limit.&lt;br /&gt;MaxRequestEntityAllowed is currently not set, but ASPMaxRequestEntityAllowed is set to 200k&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span class="834351823"&gt;&lt;span class="834351823"&gt;&lt;font face="Arial" size="2"&gt;ASP is simply a type of ISAPI, so obviously, the more restrictive of the two will apply for ASP.&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span class="834351823"&gt;&lt;span class="834351823"&gt;&lt;font face="Arial" size="2"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span class="834351823"&gt;&lt;font face="Arial" size="2"&gt;MaxRequestEntityAllowed&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/iissdk/iis/ref_mb_maxrequestentityallowed.asp"&gt;&lt;font size="3"&gt;http://msdn.microsoft.com/library/en-us/iissdk/iis/ref_mb_maxrequestentityallowed.asp&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span class="834351823"&gt;&lt;font face="Arial" size="2"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span class="834351823"&gt;&lt;font face="Arial" size="2"&gt;ASPMaxRequestEntityAllowed&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/iissdk/iis/ref_mb_aspmaxrequestentityallowed.asp"&gt;&lt;font size="3"&gt;http://msdn.microsoft.com/library/en-us/iissdk/iis/ref_mb_aspmaxrequestentityallowed.asp&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span class="834351823"&gt;&lt;font face="Arial" size="2"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span class="834351823"&gt;&lt;font face="Arial" size="2"&gt;Check out C:\WINDOWS\system32\inetsrv\MetaBase.xml for the values on your box.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span class="834351823"&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span class="834351823"&gt;&lt;font face="Arial" size="2"&gt;You cannot POST to a static file, so limit is effectively 0.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=266018" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/esiu/archive/tags/IIS/default.aspx">IIS</category></item></channel></rss>