<?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>Alik Levin's : Authorization</title><link>http://blogs.msdn.com/alikl/archive/tags/Authorization/default.aspx</link><description>Tags: Authorization</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Security Code Review – String Search Patterns For Authorization Vulnerabilities</title><link>http://blogs.msdn.com/alikl/archive/2008/07/24/security-code-review-string-search-patterns-for-authorization-vulnerabilities.aspx</link><pubDate>Thu, 24 Jul 2008 22:53:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8769967</guid><dc:creator>alikl</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/alikl/comments/8769967.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alikl/commentrss.aspx?PostID=8769967</wfw:commentRss><wfw:comment>http://blogs.msdn.com/alikl/rsscomments.aspx?PostID=8769967</wfw:comment><description>&lt;p&gt;These are the &lt;a href="http://msdn.microsoft.com/en-us/library/ms998375.aspx" target="_blank"&gt;questions&lt;/a&gt; and the search criteria I use to identify authorization vulnerabilities in the code beyond web.config &amp;lt;authorization&amp;gt; node.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;How does the code protect access to page classes?&lt;/strong&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Attributes&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Search for PrincipalPermission attributes. If there is no match, the code does not perform standard authorization checks.&lt;/p&gt;  &lt;p&gt;findstr /S /I &amp;quot;PrincipalPermission&amp;quot; *.cs&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Empirical checks&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Search for empirical IsInRole calls. If there is no match, the code does not perform standard authorization checks.&lt;/p&gt;  &lt;p&gt;findstr /S /I &amp;quot;IsInRole&amp;quot; *.cs&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Rolemanager&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Search for empirical IsUserInRole calls for Rolemanager API. If there is no match, the code does not perform standard authorization checks.&lt;/p&gt;  &lt;p&gt;findstr /S /I &amp;quot;IsUserInRole&amp;quot; *.cs&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Does the code use Server.Transfer?&lt;/strong&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;When the code uses Server.Transfer it may improve performance but potentially it may pose a threat of elevation of privileges, more info is here &lt;a href="http://blogs.msdn.com/alikl/archive/2007/03/27/performance-gain-security-risk.aspx" target="_blank"&gt;Performance Gain - Security Risk&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;findstr /S /I &amp;quot;Transfer&amp;quot; *.cs&lt;/p&gt;  &lt;h3&gt;Related posts&lt;/h3&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/alikl/archive/2008/07/11/security-code-review-string-search-patterns-for-finding-input-validation-vulnerabilities.aspx"&gt;Security Code Review – String Search Patterns For Finding Input Validation Vulnerabilities&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/alikl/archive/2008/07/21/security-code-review-string-search-patterns-for-authentication-vulnerabilities.aspx"&gt;Security Code Review – String Search Patterns For Authentication Vulnerabilities&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/alikl/archive/2007/05/30/soa-strong-authentication-standard-authorization-cool-solution.aspx"&gt;SOA, Strong Authentication, Standard Authorization - Cool Solution&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/alikl/archive/2007/04/11/authentication-hub.aspx" target="_blank"&gt;Authentication Hub&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8769967" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alikl/archive/tags/Test+Phase/default.aspx">Test Phase</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Authorization/default.aspx">Authorization</category></item></channel></rss>