<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.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>jorkeo - hosting geek : security</title><link>http://blogs.technet.com/jorke/archive/tags/security/default.aspx</link><description>Tags: security</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>PHP on IIS7 for Shared Hosting- AWESOME article!</title><link>http://blogs.technet.com/jorke/archive/2008/06/25/php-on-iis7-for-shared-hosting-awesome-article.aspx</link><pubDate>Wed, 25 Jun 2008 08:17:32 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3080660</guid><dc:creator>jorkeo</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jorke/comments/3080660.aspx</comments><wfw:commentRss>http://blogs.technet.com/jorke/commentrss.aspx?PostID=3080660</wfw:commentRss><wfw:comment>http://blogs.technet.com/jorke/rsscomments.aspx?PostID=3080660</wfw:comment><description>&lt;p&gt;check it out on &lt;a href="http://iis.net" target="_blank"&gt;IIS.NET&lt;/a&gt; - &lt;a title="http://learn.iis.net/page.aspx/208/fastcgi-with-php/" href="http://learn.iis.net/page.aspx/208/fastcgi-with-php/"&gt;http://learn.iis.net/page.aspx/208/fastcgi-with-php/&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;here are a couple of excerpts from the article that I strongly recommend:&lt;/p&gt;  &lt;p&gt;-----------&lt;/p&gt;  &lt;h5&gt;PHP Security Recommendations&lt;/h5&gt;  &lt;p&gt;The following recommendations describe how to tighten security of PHP in shared hosting environment. To make the recommended changes locate and open php.ini file and edit it as described below:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Disable remote URL's for file handling functions:      &lt;ul&gt;       &lt;li&gt;Set allow_url_fopen=Off &lt;/li&gt;        &lt;li&gt;Set allow_url_include=Off &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Disable register_globals:      &lt;ul&gt;       &lt;li&gt;register_globals=Off &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Restrict where PHP can read and write on a file system, e.g.:      &lt;ul&gt;       &lt;li&gt;open_basedir=&amp;quot;c:\inetpub\&amp;quot; &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Disable safe mode:      &lt;ul&gt;       &lt;li&gt;safe_mode=Off &lt;/li&gt;        &lt;li&gt;safe_mode_gid=Off &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Limit script execution time:      &lt;ul&gt;       &lt;li&gt;max_execution_time=30 &lt;/li&gt;        &lt;li&gt;max_input_time=60 &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Limit memory usage and file sizes:      &lt;ul&gt;       &lt;li&gt;memory_limit=16M &lt;/li&gt;        &lt;li&gt;upload_max_filesize=2M &lt;/li&gt;        &lt;li&gt;post_max_size=8M &lt;/li&gt;        &lt;li&gt;max_input_nesting_levels=64 &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Configure error messages and logging:      &lt;ul&gt;       &lt;li&gt;display_errors=Off &lt;/li&gt;        &lt;li&gt;log_errors=On &lt;/li&gt;        &lt;li&gt;error_log=&amp;quot;C:\path\of\your\choice&amp;quot; &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Hide presence of PHP:      &lt;ul&gt;       &lt;li&gt;expose_php=Off &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;-----------    &lt;br /&gt;and how to ensure you can configure your own PHP.INI for each site:     &lt;br /&gt;-----------&lt;/p&gt;  &lt;h5&gt;Specifying php.ini location&lt;/h5&gt;  &lt;p&gt;When PHP process starts it determines the location of configuration php.ini file by using various settings. &lt;a href="http://www.php.net/manual/en/configuration.php"&gt;The PHP documentation&lt;/a&gt; provides detailed description of the PHP start up process. Note that one of the places where PHP process searches for php.ini location is the PHPRC environment variable. If PHP process finds a php.ini file in the path specified in this environment variable then it will use it, otherwise it will revert to default location of php.ini. This environment variable can be used to allow hosting customers to use their own versions of php.ini files.&lt;/p&gt;  &lt;p&gt;For example if there are two websites: website1 and website2; located at the following file paths: C:\WebSites\website1 and C:\WebSites\website2 then the php-cgi.exe process pools in &amp;lt;fastCgi&amp;gt; section of applicationHost.config can be configured as below:&lt;/p&gt;  &lt;p&gt;&lt;samp&gt;&amp;lt;fastCgi&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;application fullPath=&amp;quot;C:\PHP\php-cgi.exe&amp;quot; arguments=&amp;quot;-d my.website=website1&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;environmentVariables&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;environmentVariable name=&amp;quot;PHPRC&amp;quot; value=&amp;quot;C:\WebSites\website1&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/environmentVariables&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/application&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;application fullPath=&amp;quot;C:\PHP\php-cgi.exe&amp;quot; arguments=&amp;quot;-d my.website=website2&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;environmentVariables&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;environmentVariable name=&amp;quot;PHPRC&amp;quot; value=&amp;quot;C:\WebSites\website2&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/environmentVariables&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/application&amp;gt;       &lt;br /&gt;&amp;lt;/fastCgi&amp;gt;&lt;/samp&gt;&lt;/p&gt;  &lt;p&gt;This way owner of website1 can place their own version of php.ini into the C:\WebSites\website1, while the owner of website2 can use their own version of php.ini located in C:\WebSites\website2. This configuration also ensures that if there is no php.ini found in location specified by PHPRC environment variable then PHP will fall back to using the default php.ini file located in the same folder where php-cgi.exe is located.    &lt;br /&gt;-----------&lt;/p&gt;  &lt;p&gt;&lt;a href="http://learn.iis.net/page.aspx/208/fastcgi-with-php/" target="_blank"&gt;Check it out in more detail&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;- jorke&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8918467d-4468-4c5c-83ca-9c959c5c47a8" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/PHP%20on%20Windows" rel="tag"&gt;PHP on Windows&lt;/a&gt;,&lt;a href="http://technorati.com/tags/PHP" rel="tag"&gt;PHP&lt;/a&gt;,&lt;a href="http://technorati.com/tags/IIS%207" rel="tag"&gt;IIS 7&lt;/a&gt;,&lt;a href="http://technorati.com/tags/FastCGI" rel="tag"&gt;FastCGI&lt;/a&gt;,&lt;a href="http://technorati.com/tags/IIS7" rel="tag"&gt;IIS7&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3080660" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jorke/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.technet.com/jorke/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jorke/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.technet.com/jorke/archive/tags/PHP/default.aspx">PHP</category><category domain="http://blogs.technet.com/jorke/archive/tags/FastCGI/default.aspx">FastCGI</category><category domain="http://blogs.technet.com/jorke/archive/tags/security/default.aspx">security</category></item><item><title>Hacked Web Applications causing storm - rattling Windows...</title><link>http://blogs.technet.com/jorke/archive/2008/04/29/hacked-web-applications-causing-storm-rattling-windows.aspx</link><pubDate>Mon, 28 Apr 2008 16:01:35 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3046318</guid><dc:creator>jorkeo</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/jorke/comments/3046318.aspx</comments><wfw:commentRss>http://blogs.technet.com/jorke/commentrss.aspx?PostID=3046318</wfw:commentRss><wfw:comment>http://blogs.technet.com/jorke/rsscomments.aspx?PostID=3046318</wfw:comment><description>&lt;p&gt;For the past few days a &amp;quot;Cyber attack&amp;quot; has been taking place and according to &lt;a href="http://www.internetnews.com/security/article.php/3742926/HalfMillion+IIS+Servers+Hit+in+Cyber+Attack.htm" target="_blank"&gt;internetnews.com&lt;/a&gt; : &lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;quot;number of infected IIS &lt;strong&gt;servers&lt;/strong&gt; at 282,000. Less than a day later, security firm F-Secure wrote its own &lt;/em&gt;&lt;a href="http://www.f-secure.com/weblog/archives/00001427.html"&gt;&lt;em&gt;blog entry&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, putting the infestation at over 500,000&amp;quot;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;and &lt;a href="http://www.f-secure.com/weblog/archives/00001427.html" target="_blank"&gt;f-secure&lt;/a&gt; :&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;quot;Performing a Google search results in over &lt;b&gt;510,000 modified pages&lt;/b&gt;.&amp;quot;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Without pointing out the reporting inconsistencies between &lt;strong&gt;servers&lt;/strong&gt; and &lt;strong&gt;pages&lt;/strong&gt; .... what is actually happening here.. &lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="132" alt="image" src="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/HackedWebApplicationscausingstormrattli_143A9/image_thumb.png" width="194" border="0" /&gt;&lt;/p&gt;  &lt;p&gt;First of all its &lt;strong&gt;not at all&lt;/strong&gt; related to the &lt;a href="http://blogs.technet.com/jorke/archive/2008/04/18/potential-security-vulnerability-for-networkservice-potential-new-iis-exploit.aspx" target="_blank"&gt;security advisory&lt;/a&gt; that was released last week. &lt;u&gt;Nor is it in fact related to any other security issue with IIS, ASP, ASP.NET or Windows.&lt;/u&gt; It's really important to understand that, its all to do with dodgy and insecure development practices.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/HackedWebApplicationscausingstormrattli_143A9/image_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="110" alt="image" src="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/HackedWebApplicationscausingstormrattli_143A9/image_thumb_1.png" width="394" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Well very simply put its an age old &lt;a href="http://en.wikipedia.org/wiki/Sql_injection" target="_blank"&gt;SQL injection&lt;/a&gt; attack on a web site that modifies the return code adding a hidden link to a site that downloads &lt;a href="http://en.wikipedia.org/wiki/Malware" target="_blank"&gt;malware&lt;/a&gt; to client viewing the web page. Nothing new technology wise here, just a new method of delivery - which really should not affect those who have kept their machines up-to-date.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/HackedWebApplicationscausingstormrattli_143A9/image_6.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="89" alt="image" src="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/HackedWebApplicationscausingstormrattli_143A9/image_thumb_2.png" width="324" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In this case the attackers have chosen to target ASP/ASPX based web sites that have poorly written validation methods and deliver their code via a database content management system. The result being that pages on the site will return a hidden script tag that directs to one of the sites listed in the &lt;a href="http://www.f-secure.com/weblog/archives/00001427.html" target="_blank"&gt;earlier articles&lt;/a&gt; - which picks on particular vulnerabilities available on the client machine, not just those related to software developed by Microsoft either.&lt;/p&gt;  &lt;p&gt;Well that's all very nice you say - but &lt;strong&gt;&amp;quot;How do I protect myself against these kind of attacks?&amp;quot;. &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The way I see it, there are three areas of responsibility where lies the ability to protect the world against those few malicious people.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;1. &lt;/strong&gt;&lt;strong&gt;The Developer - FIX YOUR BROKEN CODE!&lt;/strong&gt; Seriously - check your code for possible attack vectors and test, test test. I've seen heaps of web sites and web servers compromised due to poorly written or no validation checking. Incorrect security settings deploying to high risk environments. Don't always assume you know who is going to access your app. Don't assume that app will exist with everything local to it. Catch those errors - I could go on. There is heaps of guidance around this - here is a few to start you off:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms994921.aspx" target="_blank"&gt;Web Development Best practices&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms998271.aspx" target="_blank"&gt;SQL injection mitigation&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;2.The Client - Keep your machine up-to-date &lt;/strong&gt;- as &lt;a href="http://blogs.msdn.com/acoat" target="_blank"&gt;Coatsy&lt;/a&gt; says &amp;quot;go to &lt;a href="http://update.microsoft.com" target="_blank"&gt;update.microsoft.com&lt;/a&gt; and Download the golden padlock of goodness&amp;quot; from Microsoft Update.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/HackedWebApplicationscausingstormrattli_143A9/image_8.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="103" alt="image" src="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/HackedWebApplicationscausingstormrattli_143A9/image_thumb_3.png" width="291" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;3. The System Admin / Hoster / Guy who has to run the web server - &lt;/strong&gt;Hey I sympathise with you most (of course I would!) You have to get a site with poorly written code up and running, and &lt;strong&gt;now what&lt;/strong&gt;? you have to check the thing isn't going to compromise your server? but of course the code supplied doesn't work in your standard low security settings to you need to bend the rules to allow that code to work.. Be Strong! &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/wyts434y.aspx" target="_blank"&gt;ASP.NET trust levels&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms228096.aspx" target="_blank"&gt;Securing ASP.NET in Shared Server&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;But you may have been too late, and you have to clean this mess up on your server - how are you going to prevent this malicious code being delivered to and from your server, while keeping everything up and running?&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Stop the attack coming in&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you are using IIS7 or URLScan on IIS6.0/5.1 you can filter the request to prevent the incoming attacks. In IIS7 This is what the configuration string looks like in your server wide applicationhost.config file (based on the info in articles):&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" size="2"&gt;&amp;lt;requestFiltering&amp;gt;     &lt;br /&gt; &amp;lt;denyUrlSequences&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;add sequence=&amp;quot;DECLARE%20@S%20NVARCHAR(4000);SET%20@S=CAST(0x440045004300&amp;quot; /&amp;gt;      &lt;br /&gt; &amp;lt;/denyUrlSequences&amp;gt;      &lt;br /&gt;&amp;lt;/requestFiltering&amp;gt;&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Stop it going out&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This is a little trickier, but due to the awesome modularity of IIS7 (only going to look at this) you can very easily write a module that can look in all the requests scan for the URL sequence in the response and send it to null. More information on doing this &lt;a href="http://learn.iis.net/page.aspx/366/developing-iis7-modules-and-handlers-with-the-net-framework/" target="_blank"&gt;is at the IIS.NET website&lt;/a&gt;. Hey, if I get enough comments I'll write one and post it up here!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Done and Dusted&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;What we all need to remember about these kind of attacks is that vulnerability in the web sites being targeted are not limited to just a particular operating system platform. SQL Injection attacks is rampant in many platform agnostic applications and its such a simple thing to prevent. &lt;/p&gt;  &lt;p&gt;As you have probably guessed I'm pretty passionate about this subject, and when I see such misguided reports and irrational reactions to incorrect or misunderstood information, it inspires me to ensure that the truth of the issue is available. Speaking personally; In my short time at Microsoft, I have never seen such commitment behind ensuring that the Windows Operating System is the most versatile and secure operating system on earth.&lt;/p&gt;  &lt;p&gt;- jorke&lt;/p&gt;  &lt;p&gt;Note: Graphics &amp;quot;borrowed&amp;quot; from &lt;a href="http://www.microsoft.com/japan/security/default.mspx" target="_blank"&gt;Microsoft Japan Security Bulletins&lt;/a&gt;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6dcd4762-273d-4b56-ab20-751ee8adb6f3" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL%20Injection" rel="tag"&gt;SQL Injection&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Security%20Vunerability" rel="tag"&gt;Security Vunerability&lt;/a&gt;,&lt;a href="http://technorati.com/tags/IIS" rel="tag"&gt;IIS&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Windows" rel="tag"&gt;Windows&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Microsoft" rel="tag"&gt;Microsoft&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3046318" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jorke/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.technet.com/jorke/archive/tags/Hosting/default.aspx">Hosting</category><category domain="http://blogs.technet.com/jorke/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.technet.com/jorke/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jorke/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.technet.com/jorke/archive/tags/.net/default.aspx">.net</category><category domain="http://blogs.technet.com/jorke/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.technet.com/jorke/archive/tags/hosters/default.aspx">hosters</category><category domain="http://blogs.technet.com/jorke/archive/tags/security/default.aspx">security</category><category domain="http://blogs.technet.com/jorke/archive/tags/SQL+Injection/default.aspx">SQL Injection</category></item><item><title>Potential Security Vulnerability for NetworkService / potential new IIS exploit</title><link>http://blogs.technet.com/jorke/archive/2008/04/18/potential-security-vulnerability-for-networkservice-potential-new-iis-exploit.aspx</link><pubDate>Fri, 18 Apr 2008 11:25:39 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3039220</guid><dc:creator>jorkeo</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/jorke/comments/3039220.aspx</comments><wfw:commentRss>http://blogs.technet.com/jorke/commentrss.aspx?PostID=3039220</wfw:commentRss><wfw:comment>http://blogs.technet.com/jorke/rsscomments.aspx?PostID=3039220</wfw:comment><description>&lt;p&gt;Important heads up with regards to a potential privilege escalation issue when running under NetworkService &amp;#8211; which we all know is the IIS default.... But also note that it requires native code or full trust .NET. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Hosting Providers with Shared Hosting configurations&lt;/font&gt;&lt;/strong&gt; should pay careful attention to this and ensure that they are running a customised version of medium trust at the very least - &lt;a title="http://msdn2.microsoft.com/en-us/library/ms998341.aspx" href="http://msdn2.microsoft.com/en-us/library/ms998341.aspx"&gt;&lt;strong&gt;http://msdn2.microsoft.com/en-us/library/ms998341.aspx&lt;/strong&gt;&lt;/a&gt;. Also be wary of any custom ISAPI extensions - i.e do a code review.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;High level summary:&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;Processes running under Network Service identity can elevate to Local System on XP, Win2k3, Vista and Win2k8. Additionally, on Win2k3 any process running with an identity that has SeImpersonatePrivilege can elevate to Local System, and this privilege is required by IIS worker process identity. &lt;b&gt;The Elevation of Privilege requires running native user code or full-trust managed code.&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Our guidance is of course to move your app move WPI away from NetworkService to a windows account. Additionally on Win2k3, our guidance includes disabling Distributed Transaction Coordinator service (to close the hole where any identity with SeImpersonatePrivilege can elevate).&lt;/p&gt;  &lt;p&gt;More information here: &lt;a href="http://www.microsoft.com/technet/security/advisory/951306.mspx"&gt;http://www.microsoft.com/technet/security/advisory/951306.mspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Let me know if you have any further questions or require advice.&lt;/p&gt;  &lt;p&gt;- jorke&lt;/p&gt;  &lt;p&gt;UPDATE (6:23pm 18/4/08): &lt;/p&gt; &lt;a href="http://www.adopenstatic.com/cs/blogs/ken/archive/2008/04/17/17399.aspx" target="_blank"&gt;Check out Ken Schaefer's Blog for the origin of this potential issue.&lt;/a&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7f2bf51e-f7f4-4c90-9f8a-49d0dd23ceb1" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Security%20Vunerability" rel="tag"&gt;Security Vunerability&lt;/a&gt;,&lt;a href="http://technorati.com/tags/NetworkService" rel="tag"&gt;NetworkService&lt;/a&gt;,&lt;a href="http://technorati.com/tags/IIS" rel="tag"&gt;IIS&lt;/a&gt;,&lt;a href="http://technorati.com/tags/exploit" rel="tag"&gt;exploit&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3039220" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jorke/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.technet.com/jorke/archive/tags/Hosting/default.aspx">Hosting</category><category domain="http://blogs.technet.com/jorke/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.technet.com/jorke/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jorke/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.technet.com/jorke/archive/tags/security/default.aspx">security</category></item></channel></rss>