<?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>EricLaw's IEInternals</title><link>http://blogs.msdn.com/ieinternals/default.aspx</link><description>A look at Internet Explorer from the inside out.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Security Intelligence Report Volume 7 Released</title><link>http://blogs.msdn.com/ieinternals/archive/2009/11/03/Real-Web-Security-Statistics.aspx</link><pubDate>Tue, 03 Nov 2009 00:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9916489</guid><dc:creator>EricLaw</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/ieinternals/comments/9916489.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ieinternals/commentrss.aspx?PostID=9916489</wfw:commentRss><description>&lt;P&gt;Security researchers at Microsoft release a biannual "Intelligence Report" containing statistics about the software-related security incidents over the past 6 months.&amp;nbsp;This report is called the &lt;A href="http://www.microsoft.com/security/portal/Threat/SIR.aspx" mce_href="http://www.microsoft.com/security/portal/Threat/SIR.aspx"&gt;SIR&lt;/A&gt;, and the latest version can be found &lt;A href="http://go.microsoft.com/?linkid=9693456" mce_href="http://go.microsoft.com/?linkid=9693456"&gt;here&lt;/A&gt;. There are many interesting charts and data points in the report, but I have&amp;nbsp;two favorites from the latest edition.&lt;/P&gt;
&lt;P&gt;As browser code quality improves, add-ons become a more appealing target:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;IMG alt="Most browser attacks are against 3rd party (addon) code" src="http://www.enhanceie.com/images/blog/SIR7-BrowserAttacks.png"&gt; &lt;/BLOCKQUOTE&gt;
&lt;P&gt;Here's a chart of the types of malicious downloads that SmartScreen has blocked over the last six months:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;IMG alt="SmartScreen blocks a wide range of malicious downloads" src="http://www.enhanceie.com/images/blog/SIR7-SmartScreenBlocks.png"&gt; &lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Microsoft remains committed to help protect you on the web--&amp;nbsp;IE8's SmartScreen&amp;nbsp;and &lt;A href="http://blogs.msdn.com/ieinternals/archive/2009/10/06/Free-antivirus-and-antimalware-scanner-from-Microsoft.aspx" mce_href="http://blogs.msdn.com/ieinternals/archive/2009/10/06/Free-antivirus-and-antimalware-scanner-from-Microsoft.aspx"&gt;Microsoft Security Essentials&lt;/A&gt; are making a significant impact against the bad guys.&lt;/P&gt;
&lt;P&gt;-Eric&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9916489" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ieinternals/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/phishing/default.aspx">phishing</category></item><item><title>Using Meddler to Simulate Web Traffic</title><link>http://blogs.msdn.com/ieinternals/archive/2009/10/13/Using-Meddler-to-Simulate-HTTP.aspx</link><pubDate>Tue, 13 Oct 2009 21:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9906859</guid><dc:creator>EricLaw</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/ieinternals/comments/9906859.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ieinternals/commentrss.aspx?PostID=9906859</wfw:commentRss><description>&lt;P&gt;As &lt;A href="http://blogs.msdn.com/ieinternals/archive/2009/07/27/Bugs-in-the-IE8-Lookahead-Downloader.aspx" mce_href="http://blogs.msdn.com/ieinternals/archive/2009/07/27/Bugs-in-the-IE8-Lookahead-Downloader.aspx"&gt;mentioned back in July&lt;/A&gt;, IE8’s new lookahead downloader has a number of bugs which cause it to issue incorrect speculative download requests.&lt;/P&gt;
&lt;P&gt;The “BASE Bug” caused the speculative downloader to only respect the &amp;lt;BASE&amp;gt; element for the &lt;EM&gt;first&lt;/EM&gt; speculatively downloaded script file. Subsequent relative SCRIPT SRCs would be combined without respecting the specified BASE, which resulted in spurious requests being sent to the server. Eventually, the main parser would catch up and request the proper URLs, but the spurious requests waste bandwidth and could cause problems for some servers.&lt;/P&gt;
&lt;P&gt;When first investigating the speculative downloader problems, I decided to use the &lt;A href="http://www.fiddler2.com/Meddler/" mce_href="http://www.fiddler2.com/Meddler/"&gt;Meddler HTTP Traffic Generation&lt;/A&gt; tool to build some test cases. Meddler is a simple little tool that allows you to write JavaScript.NET scripts to emulate a web server. Meddler allows for precisely timed delivery of responses, and includes classes to enable basic fuzzing scenarios. The best part of Meddler is that you can use a single MeddlerScript (.ms) file to contain an entire test case, even if that test case is made up of multiple pages, images, scripts, and other resources. These .ms files can be shared with others, run across multiple operating systems, and attached to bugs or test harnesses for future regression testing. The test machine only requires the .NET Framework and Meddler installed, and does not need IIS, Apache, Perl, ASP.NET, etc.&lt;/P&gt;
&lt;P&gt;Because the base issue was so simple, I was able to quickly build a simple MeddlerScript which demonstrates the BASE Bug. If you’d like, you can follow along using my MeddlerScript: &lt;A href="http://www.enhanceie.com/meddler/scripts/PreParserBaseBug.ms" mce_href="http://www.enhanceie.com/meddler/scripts/PreParserBaseBug.ms"&gt;PreParserBaseBug.ms&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;The test script generates the following sample HTML:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#008000 size=2 face="Courier New"&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;base href="&lt;/FONT&gt;&lt;FONT color=#008000 size=2 face="Courier New"&gt;http://ipv4.fiddler:8088/pass/"&lt;/FONT&gt;&lt;FONT color=#008000 size=2 face="Courier New"&gt;&amp;gt;&amp;lt;/base&amp;gt; &lt;BR&gt;&amp;lt;script type="text/javascript" src="inc/1.js"&amp;gt;&amp;lt;/script&amp;gt; &lt;BR&gt;&amp;lt;script type="text/javascript" src="inc/2.js"&amp;gt;&amp;lt;/script&amp;gt; &lt;BR&gt;&amp;lt;script type="text/javascript" src="inc/3.js"&amp;gt;&amp;lt;/script&amp;gt; &lt;BR&gt;&amp;lt;script type="text/javascript" src="inc/4.js"&amp;gt;&amp;lt;/script&amp;gt; &lt;BR&gt;&amp;lt;script type="text/javascript" src="inc/5.js"&amp;gt;&amp;lt;/script&amp;gt; &lt;BR&gt;&amp;lt;script type="text/javascript" src="inc/6.js"&amp;gt;&amp;lt;/script&amp;gt; &lt;BR&gt;&amp;lt;script type="text/javascript" src="inc/7.js"&amp;gt;&amp;lt;/script&amp;gt; &lt;BR&gt;&amp;lt;script type="text/javascript" src="inc/8.js"&amp;gt;&amp;lt;/script&amp;gt; &lt;BR&gt;&amp;lt;script type="text/javascript" src="inc/9.js"&amp;gt;&amp;lt;/script&amp;gt; &lt;BR&gt;&amp;lt;/head&amp;gt; &lt;BR&gt;&amp;lt;body&amp;gt; Test page.&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Note that I plan to watch the network traffic with &lt;A href="http://www.fiddler2.com/" mce_href="http://www.fiddler2.com/"&gt;Fiddler&lt;/A&gt;, and because &lt;A href="http://www.fiddler2.com/Fiddler/help/hookup.asp#Q-LocalTraffic" mce_href="http://www.fiddler2.com/Fiddler/help/hookup.asp#Q-LocalTraffic"&gt;traffic sent to localhost isn’t proxied&lt;/A&gt;, I will use “ipv4.fiddler” as an alias to 127.0.0.1. &lt;/P&gt;
&lt;P&gt;When visiting the Meddler test page, the traffic from IE is as follows:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;IMG alt="Screenshot of original incorrect network traffic" src="http://www.enhanceie.com/images/blog/Preparser-Fails-To-Respect-Base.png" mce_src="http://www.enhanceie.com/images/blog/Preparser-Fails-To-Respect-Base.png"&gt; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As you can see, there are spurious download requests containing the wrong path; these are shown in red as the MeddlerScript is designed to return failure for such requests. Later, the correct URLs are downloaded as the main parser encounters the script tags and correctly combines the URLs.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/ie/archive/2009/10/13/ie-october-2009-security-update-now-available.aspx" mce_href="http://blogs.msdn.com/ie/archive/2009/10/13/ie-october-2009-security-update-now-available.aspx"&gt;Today's IE8 Cumulative Update&lt;/A&gt; (&lt;A href="http://www.microsoft.com/downloads/en/results.aspx?pocId=&amp;amp;freetext=KB974455&amp;amp;DisplayLang=en" mce_href="http://www.microsoft.com/downloads/en/results.aspx?pocId=&amp;amp;freetext=KB974455&amp;amp;DisplayLang=en"&gt;KB974455&lt;/A&gt;) fixes the BASE Bug. After installing the update, loading the sample HTML results in no spurious requests-- each script URL is correctly relative to the specified BASE. &lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;IMG alt="Screenshot of corrected network traffic" src="http://www.enhanceie.com/images/blog/Preparser-Fixed-To-Respect-Base.png" mce_src="http://www.enhanceie.com/images/blog/Preparser-Fixed-To-Respect-Base.png"&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please note that while the BASE bug is fixed, the “4k Bug” is not fixed by this update. If you want to view that bug in action, try this script: &lt;A href="http://www.enhanceie.com/meddler/scripts/PreParser4kBug.ms" mce_href="http://www.enhanceie.com/meddler/scripts/PreParser4kBug.ms"&gt;PreParser4kBug.ms&lt;/A&gt;. As it is a timing issue, you may need to reload the “hammer” page a few times to encounter the problem.&lt;/P&gt;
&lt;P&gt;While Meddler is rather simplistic, it can be very useful for sharing test cases and simulating the behavior of web servers. You can use Meddler to build reduced test cases that reliably generate problematic HTTP responses.&lt;/P&gt;
&lt;P&gt;Until next time, &lt;/P&gt;
&lt;P&gt;-Eric &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9906859" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ieinternals/archive/tags/http/default.aspx">http</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/fixes/default.aspx">fixes</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/problems/default.aspx">problems</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/networking/default.aspx">networking</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/parser/default.aspx">parser</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/tools/default.aspx">tools</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/troubleshooting/default.aspx">troubleshooting</category></item><item><title>Capturing Crash Dumps for Analysis</title><link>http://blogs.msdn.com/ieinternals/archive/2009/10/12/Collecting-Internet-Explorer-Crash-Dumps.aspx</link><pubDate>Mon, 12 Oct 2009 11:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9905905</guid><dc:creator>EricLaw</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/ieinternals/comments/9905905.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ieinternals/commentrss.aspx?PostID=9905905</wfw:commentRss><description>&lt;P&gt;Sometimes, folks report crashes to the IE team that we are unable to reproduce internally. That’s usually because, as mentioned often, most crashes are caused by buggy browser add-ons.&lt;/P&gt;
&lt;P&gt;In some cases, however, crashes occur even when running with &lt;A href="http://www.enhanceie.com/ie/troubleshoot.asp#crash" mce_href="http://www.enhanceie.com/ie/troubleshoot.asp#crash"&gt;browser add-ons off&lt;/A&gt;, and if we cannot reproduce the problem, the next best thing is a crash dump file from the affected machine.&lt;/P&gt;
&lt;P&gt;Collecting crash dumps isn’t hard:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Install WinDBG from &lt;A href="http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#ERB" mce_href="http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#ERB"&gt;http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#ERB&lt;/A&gt; &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Configure WinDBG to run whenever a crash occurs: In an elevated command prompt, run WinDBG with the -I (case-sensitive) parameter.&amp;nbsp; For instance:&amp;nbsp; &lt;BR&gt;&lt;BR&gt;&lt;FONT color=#008000 size=2 face="Courier New"&gt;C:\debuggers\windbg.exe –I &lt;BR&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;When the crash occurs, WinDBG opens.&amp;nbsp; Type the following command to generate a .DMP file: &lt;BR&gt;&lt;BR&gt;&lt;FONT color=#008000 size=2 face="Courier New"&gt;dump /ma %USERPROFILE%\Desktop\IECrash.dmp&lt;/FONT&gt; &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Dump files tend to be dozens to hundreds of megabytes in size, so they typically cannot be readily passed around via email (although they often compress well). If a DMP file is requested, the person asking for the file will typically tell you how to return the file to them.&lt;/P&gt;
&lt;P&gt;Depending on the problem reported, we may also want to get a &lt;A href="http://www.fiddlercap.com/" mce_href="http://www.fiddlercap.com"&gt;network traffic log&lt;/A&gt; or a &lt;A href="http://blogs.msdn.com/ieinternals/archive/2009/07/20/IE8-Performance-and-Speed-Tips.aspx" mce_href="http://blogs.msdn.com/ieinternals/archive/2009/07/20/IE8-Performance-and-Speed-Tips.aspx"&gt;Process Monitor log&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;-Eric&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9905905" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ieinternals/archive/tags/problems/default.aspx">problems</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/dev/default.aspx">dev</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/tools/default.aspx">tools</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/troubleshooting/default.aspx">troubleshooting</category></item><item><title>Understanding DEP/NX</title><link>http://blogs.msdn.com/ieinternals/archive/2009/10/10/Understanding-Data-Execution-Prevention-Crashes-in-IE8.aspx</link><pubDate>Sat, 10 Oct 2009 18:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9905773</guid><dc:creator>EricLaw</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/ieinternals/comments/9905773.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ieinternals/commentrss.aspx?PostID=9905773</wfw:commentRss><description>&lt;H3&gt;&lt;/H3&gt;
&lt;P&gt;Despite being one&amp;nbsp;of the crucial security features of modern browsers, Data Execution Prevention / No Execute (DEP/NX) is not well understood by most users, even technical experts&amp;nbsp;without a&amp;nbsp;security background. &lt;/P&gt;
&lt;P&gt;In this post, I’ll try to provide some insight into how DEP/NX works, explain why you might encounter a DEP/NX crash, and convince you that turning off DEP/NX is almost never the right decision.&lt;/P&gt;
&lt;P&gt;More than anything else, I hope you take away two important facts from reading this post:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;In many cases where you encounter a DEP/NX crash, the browser would have crashed anyway.&lt;/LI&gt;
&lt;LI&gt;The vast majority of DEP/NX crashes are caused by browser add-ons. If you run IE in &lt;A href="http://www.enhanceie.com/ie/troubleshoot.asp#crash" mce_href="http://www.enhanceie.com/ie/troubleshoot.asp#crash"&gt;No Add-ons Mode&lt;/A&gt;, it’s very unlikely that you will encounter a DEP/NX crash. &lt;/LI&gt;&lt;/UL&gt;
&lt;H2&gt;Background&lt;/H2&gt;
&lt;P&gt;I’ll begin by providing some background information on DEP/NX and how the browser makes use of it.&lt;/P&gt;
&lt;H3&gt;What is DEP/NX?&lt;/H3&gt;
&lt;P&gt;DEP/NX is a feature of modern CPUs that allows marking of memory pages as Executable or non-Executable. This allows the CPU to help prevent execution of malicious data placed into memory by an attacker. If the CPU detects that it is about to jump to (begin execution of) data which is in a memory page which is not marked as Executable, the CPU will &lt;A href="http://support.microsoft.com/kb/875352" mce_href="http://support.microsoft.com/kb/875352"&gt;raise an exception&lt;/A&gt; which results in termination of the process. &lt;/P&gt;
&lt;P&gt;Stated another way, if DEP/NX determines that if a potentially dangerous jump is about to be made, the process is intentionally “safely crashed” to prevent a potential security exploit.&lt;/P&gt;
&lt;H3&gt;Checking Your Protection&lt;/H3&gt;
&lt;P&gt;You can see which processes are protected by DEP/NX using Task Manager’s Process tab. On Windows XP, you need to use &lt;A href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx" mce_href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx"&gt;Process Explorer&lt;/A&gt; instead. In either case, ensure that the “Data Execution Prevention box” is checked in the View &amp;gt; Select Columns menu, and a column in the process list will show the DEP/NX protection status.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;IMG alt="Process Explorer showing DEP Permanent for iexplore.exe" src="http://www.enhanceie.com/images/blog/DEP-Enabled.png" mce_src="http://www.enhanceie.com/images/blog/DEP-Enabled.png"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As &lt;A href="http://blogs.msdn.com/ie/archive/2008/04/08/ie8-security-part-I_3A00_-dep-nx-memory-protection.aspx" mce_href="http://blogs.msdn.com/ie/archive/2008/04/08/ie8-security-part-I_3A00_-dep-nx-memory-protection.aspx"&gt;mentioned last year&lt;/A&gt;, Internet Explorer 8 enables DEP/NX protection by default. In IE7 and earlier, DEP/NX was disabled by default due to compatibility concerns that were resolved in IE8.&lt;/P&gt;
&lt;H3&gt;Opting-in to DEP/NX &lt;/H3&gt;
&lt;P&gt;Internet Explorer 8 uses the &lt;A href="http://msdn.microsoft.com/en-us/library/bb736299(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb736299(VS.85).aspx"&gt;SetProcessDEPPolicy()&lt;/A&gt; API to enable DEP/NX. This provides the following benefits versus using the &lt;A href="http://msdn.microsoft.com/en-us/library/ms235442(VS.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms235442(VS.80).aspx"&gt;/NXCOMPAT linker flag&lt;/A&gt;:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;It allows us to offer an Internet Control Panel checkbox and Group Policy option to disable DEP/NX if desired. &lt;/LI&gt;
&lt;LI&gt;It enables DEP/NX on Windows XP SP3. The Windows XP loader does not check the &lt;STRONG&gt;NX Compatible&lt;/STRONG&gt; bit. &lt;/LI&gt;
&lt;LI&gt;It ensures that ATL_THUNK_EMULATION, an important compatibility feature, works properly. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;EM&gt;Note: New applications without 3rd-party code compatibility concerns, targeted for use on Vista and later, should simply use the /NXCOMPAT linker flag.&lt;/EM&gt;&lt;/P&gt;
&lt;H3&gt;Recognizing a DEP/NX Crash in Internet Explorer&lt;/H3&gt;
&lt;P&gt;When Internet Explorer 8 recovers from a DEP/NX-induced crash, it will not automatically recover the current tabs. This is a security measure designed to help prevent a malicious site from having multiple attempts to exploit a vulnerability. Instead of reloading the tabs, the browser will show the following error page:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;IMG alt="Error page for DEP/NX Crash Recovery" src="http://www.enhanceie.com/images/blog/DEP-CrashPage.png" mce_src="http://www.enhanceie.com/images/blog/DEP-CrashPage.png"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Unfortunately, the nature of DEP/NX crashes makes it infeasible for the browser to “pin the blame” on the specific add-on that is responsible for the problem. &lt;/P&gt;
&lt;H2&gt;Why do DEP/NX Crashes Occur in the Real World?&lt;/H2&gt;
&lt;P&gt;Now, let’s take a look at why users encounter DEP/NX crashes in the real-world.&lt;/P&gt;
&lt;P&gt;When the CPU is about to jump to a non-Executable memory page, there are three possible types of data in that page: malicious code, non-malicious code, and garbage data. I’ll discuss each of these in the following sections.&lt;/P&gt;
&lt;H3&gt;Jump Target: Malicious code&lt;/H3&gt;
&lt;P&gt;This is the scenario where DEP/NX shines. In this scenario, an attacker has put malicious data in memory that will be executed as x86 instructions if he can get the CPU to jump to it. The attacker then exploits some vulnerability to induce the CPU to jump to his data, typically using a memory-related vulnerability in an add-on or the browser itself.&lt;/P&gt;
&lt;P&gt;In this scenario, the CPU notes that the attacker’s code is not in an executable memory page and prevents the interpretation of the attacker-supplied data as instructions. The attack is foiled and the user’s machine is protected. If not for DEP/NX, the attacker would have been able to execute his instructions and potentially infect the user’s machine with malware, steal their data, or achieve some other nefarious goal.&lt;/P&gt;
&lt;P&gt;Now, the obvious next question is: &lt;EM&gt;What if the attacker can somehow get his data marked as executable?&lt;/EM&gt; &lt;/P&gt;
&lt;P&gt;The answer is that doing so is intentionally difficult. &lt;A href="http://blogs.msdn.com/ieinternals/archive/2009/10/09/DotNet-UserControls-Do-Not-Load-in-IE8-Internet-Zone.aspx" mce_href="http://blogs.msdn.com/ieinternals/archive/2009/10/09/DotNet-UserControls-Do-Not-Load-in-IE8-Internet-Zone.aspx"&gt;IE8 blocks the best known trick&lt;/A&gt; used to get the attacker’s data in an executable page. That means that the attacker must find some other way to get the memory page containing his instructions marked as executable. &lt;/P&gt;
&lt;P&gt;The obvious choice would be for the attacker to call &lt;A href="http://msdn.microsoft.com/en-us/library/aa366898(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa366898(VS.85).aspx"&gt;VirtualProtect()&lt;/A&gt; directly, passing &lt;A href="http://msdn.microsoft.com/en-us/library/aa366786(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa366786(VS.85).aspx"&gt;PAGE_EXECUTE_READ&lt;/A&gt; as the flNewProtect flag. However, thanks to &lt;A href="http://blogs.msdn.com/michael_howard/archive/2006/05/26/address-space-layout-randomization-in-windows-vista.aspx" mce_href="http://blogs.msdn.com/michael_howard/archive/2006/05/26/address-space-layout-randomization-in-windows-vista.aspx"&gt;Address Space Layout Randomization (ASLR)&lt;/A&gt; it is difficult for the attacker to guess where the VirtualProtect function is in memory. If he guesses wrong (and he almost always will), the process will crash and not execute his attack instructions.&lt;/P&gt;
&lt;H3&gt;Jump Target: Non-malicious code&lt;/H3&gt;
&lt;P&gt;In this scenario, a browser add-on is designed in such a way that it &lt;EM&gt;expects &lt;/EM&gt;to be able to execute data from memory pages which are not marked as executable, or otherwise makes a bad assumption. &lt;/P&gt;
&lt;P&gt;There are a number of possible cases where this may happen.&lt;/P&gt;&lt;EM&gt;&lt;/EM&gt;
&lt;H4&gt;&lt;/H4&gt;
&lt;P&gt;&lt;EM&gt;Case #1: Code Generation&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;In the first case, the add-on (or the technology it is built upon) depends on the ability to execute dynamically generated instructions at runtime. Examples of this are the Java Virtual Machine (JVM) and the Active Template Library (&lt;A href="http://msdn2.microsoft.com/en-us/library/t9adwcde(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/t9adwcde(VS.80).aspx"&gt;ATL&lt;/A&gt;). These frameworks generate (“JIT compile”)&amp;nbsp;executable code at runtime and jump to it. Older versions of these frameworks did not mark the memory pages containing the generated code as executable and would hence crash when DEP/NX was enabled. The Java team fixed this problem in the JVM years ago, and the ATL team also fixed this problem several versions ago. &lt;/P&gt;
&lt;P&gt;Because ATL is so commonly used to build Internet Explorer add-ons, additional work was done to allow Windows to “emulate” the ATL Thunk code which violated DEP/NX, so that even if an add-on was compiled against an ancient version of ATL, ATL Thunk Emulation will ensure that the code runs properly inside Internet Explorer with DEP/NX enabled.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Case #2: Code Rewriting&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;In another common case, the add-on depends on “thunking” or modifying an existing Internet Explorer API or Windows function at runtime by rewriting the instructions in the existing function’s memory page. In order to accomplish this, the add-on uses VirtualProtect() to change the memory protection of the target page to allow Write and then update the memory with new instructions that point to some code that the add-on would like to have run inside the target function. &lt;/P&gt;
&lt;P&gt;If the add-on fails to subsequently call VirtualProtect() to revert the memory protection back to allow Execute, the process will crash with a DEP/NX violation the next time that function is called. &lt;/P&gt;
&lt;P&gt;More commonly, the add-on &lt;EM&gt;will&lt;/EM&gt; later&amp;nbsp;change the memory protection back to allow Execute, but the developer ignores the fact that it’s entirely unsafe to perform modification of shared code while any&amp;nbsp;other threads are executing.&amp;nbsp;While an add-on thread is modifying the code in a memory page, if &lt;EM&gt;any&lt;/EM&gt; thread attempts to call any function in the same memory page, the process will crash. Internet Explorer makes extensive use of threads, so such crashes are likely if an add-on uses thunking.&lt;/P&gt;
&lt;P&gt;Because timing is a critical factor here, the add-on may seem to “work fine” on one machine (e.g. a slower single-core machine) and always crash on another (e.g. a fast multi-core machine). This problem is just one of the major reasons why function thunking by Add-ons is not supported and is strongly discouraged. &lt;/P&gt;
&lt;H3&gt;Jump Target: Garbage data&lt;/H3&gt;
&lt;P&gt;In this scenario, inadvertent memory corruption has occurred such that the CPU is about to jump to arbitrary data somewhere in memory. This scenario is probably the most common source of DEP/NX crashes, particularly when the crash occurs at a seemingly random time, or when a browser tab is closed.&lt;/P&gt;
&lt;P&gt;This arbitrary data isn't usually chosen by an&amp;nbsp;attacker, and usually doesn’t even represent sensible x86 instructions. For instance, the jump may be to an address near 0x000000 where no code is loaded (&lt;EM&gt;near-null jump)&lt;/EM&gt;, if a virtual function was called off an object pointer which has been nulled. Or, the jump may be to some other address where code used to exist (&lt;EM&gt;stale pointer)&lt;/EM&gt; but that memory was later freed and potentially reused for another purpose.&lt;/P&gt;
&lt;P&gt;In this “garbage data” scenario, the process will almost always crash, even if DEP/NX were not enabled. That’s because the CPU is very unlikely to reliably execute arbitrary data as sensible x86 instructions. Most likely, the process will crash within a microsecond with an exception like “Access Violation”, “Invalid Instruction”,&amp;nbsp; “Divide by 0” or similar.&lt;/P&gt;
&lt;P&gt;Attackers look for this type of memory corruption to use as an entry point in their attacks; they may, for instance, “&lt;A href="http://en.wikipedia.org/wiki/Heap_spraying" mce_href="http://en.wikipedia.org/wiki/Heap_spraying"&gt;spray the heap&lt;/A&gt;” with many copies of their malicious data, then trigger the memory corruption vulnerability with the hope that the CPU will jump into a copy of their malicious code.&lt;/P&gt;
&lt;H2&gt;Resolving DEP/NX Problems&lt;/H2&gt;
&lt;P&gt;Your best bet to resolve DEP/NX problems in Internet Explorer is to first confirm that the problem is caused by a buggy browser add-on. You can do this by running IE in &lt;A href="http://www.enhanceie.com/ie/troubleshoot.asp#crash" mce_href="http://www.enhanceie.com/ie/troubleshoot.asp#crash"&gt;No Add-ons Mode&lt;/A&gt;. After confirming that the problem is related to an add-on, you should use the browser’s Manage Add-Ons feature to disable unwanted add-ons and find updated versions of any add-ons that you wish to keep.&lt;/P&gt;
&lt;P&gt;If you find that you’re encountering DEP/NX crashes in multiple software applications, it’s possible that you have malicious or buggy system software installed (e.g. malware or a buggy anti-virus product). You should &lt;A href="http://www.enhanceie.com/ie/troubleshoot.asp#malware" mce_href="http://www.enhanceie.com/ie/troubleshoot.asp#malware"&gt;check your system for malware&lt;/A&gt; and ensure that you install the latest updates for your system software.&lt;/P&gt;
&lt;P&gt;Frequent DEP/NX crashes also suggest that your computer might have a hardware problem (e.g. bad system memory). To help rule out hardware failure, you can use &lt;A href="http://oca.microsoft.com/en/windiag.asp" mce_href="http://oca.microsoft.com/en/windiag.asp"&gt;the Windows Memory Diagnostic&lt;/A&gt;.&lt;/P&gt;
&lt;H2&gt;Conclusion&lt;/H2&gt;
&lt;P&gt;DEP/NX provides an important defense against malicious websites that may try to exploit vulnerabilities in your add-ons or web browser. By ensuring that you are running the latest version of add-ons and system software, you can improve your security and minimize the incidence of DEP/NX crashes. If you're currently using an older version (6 or 7)&amp;nbsp;of Internet Explorer that does not have DEP/NX protections enabled by default, you should upgrade to IE8 as soon as possible.&lt;/P&gt;
&lt;P&gt;Thanks for reading!&lt;/P&gt;
&lt;P&gt;-Eric&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9905773" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ieinternals/archive/tags/ActiveX/default.aspx">ActiveX</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/Best-Practices/default.aspx">Best-Practices</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/problems/default.aspx">problems</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/dev/default.aspx">dev</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/add-ons/default.aspx">add-ons</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/ie8/default.aspx">ie8</category></item><item><title>DotNet UserControls Restricted in IE8</title><link>http://blogs.msdn.com/ieinternals/archive/2009/10/09/DotNet-UserControls-Do-Not-Load-in-IE8-Internet-Zone.aspx</link><pubDate>Fri, 09 Oct 2009 05:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9905231</guid><dc:creator>EricLaw</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/ieinternals/comments/9905231.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ieinternals/commentrss.aspx?PostID=9905231</wfw:commentRss><description>&lt;P&gt;In the past, Internet Explorer supported a really easy way to host &lt;A href="http://msdn.microsoft.com/en-us/magazine/cc301932.aspx" mce_href="http://msdn.microsoft.com/en-us/magazine/cc301932.aspx"&gt;.NET UserControls&lt;/A&gt; in HTML. These controls worked much like ActiveX controls, but because they ran with limited permissions, sandboxed by the .NET Framework, they would download and run without security prompts.&lt;/P&gt;
&lt;P&gt;It was a very cool technology, but didn’t see much use in the real-world, partly because the .NET Framework wasn’t broadly deployed when the feature was introduced. Later, ClickOnce, WPF, and other technologies took center stage, leaving this relic around, mostly unused beyond&amp;nbsp;developer demonstration pages and tutorials.&lt;/P&gt;
&lt;P&gt;Until the summer of 2008, that is. At BlackHat 2008, security researchers &lt;A href="http://taossa.com/archive/bh08sotirovdowd.pdf" mce_href="http://taossa.com/archive/bh08sotirovdowd.pdf"&gt;Dowd and Sotirov&lt;/A&gt; revealed that the loader for UserControls enabled bypass of &lt;A href="http://blogs.msdn.com/ie/archive/2008/04/08/ie8-security-part-I_3A00_-dep-nx-memory-protection.aspx" mce_href="http://blogs.msdn.com/ie/archive/2008/04/08/ie8-security-part-I_3A00_-dep-nx-memory-protection.aspx"&gt;memory-protection&lt;/A&gt; mechanisms, meaning that browser vulnerabilities could be exploited with improved reliability.&lt;/P&gt;
&lt;P&gt;While Protected Mode and other features are useful to constrain the impact of vulnerabilities, DEP/NX and ASLR memory protection are a very important part of the overall mitigation strategy. After investigating the options, crawling the web to examine use “in the wild,” and consulting with the .NET team, we elected to disable UserControls in the Internet Zone by default for IE8.&lt;/P&gt;
&lt;P&gt;Now, since the UserControls feature was first introduced, IE’s security settings allowed disabling ".NET Framework-reliant components," but the existing settings were overly broad. They controlled not only UserControls, but also out-of-process features like &lt;A href="http://msdn.microsoft.com/en-us/library/t71a733d(VS.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/t71a733d(VS.80).aspx"&gt;ClickOnce&lt;/A&gt;. Because out-of-process use of .NET is not a vector for memory-protection-bypass in the browser, we chose to create a new URLAction that would restrict only use of UserControls.&lt;/P&gt;
&lt;P&gt;IE8 introduced the &lt;A href="http://msdn.microsoft.com/en-us/library/ms537178(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms537178(VS.85).aspx"&gt;URLACTION_DOTNET_USERCONTROLS&lt;/A&gt; setting, which allows .NET UserControls to load only from Intranet and Trusted pages by default. On Internet pages, the controls are blocked as if they had failed to download. This setting is not exposed in the Internet Options dialog or in the Group Policy editor; it can only be controlled via the registry keys. &lt;/P&gt;
&lt;P&gt;Reducing attack surface by removing an extensibility feature was painful decision, but ultimately a good one. Not long&amp;nbsp;after we made this change, the new URLAction would cleanly &lt;A href="http://blogs.technet.com/srd/archive/2009/03/23/released-build-of-internet-explorer-8-blocks-dowd-sotirov-aslr-dep-net-bypass.aspx" mce_href="http://blogs.technet.com/srd/archive/2009/03/23/released-build-of-internet-explorer-8-blocks-dowd-sotirov-aslr-dep-net-bypass.aspx"&gt;block exploitation&lt;/A&gt; of a browser vulnerability that was unveiled at the CanSecWest security conference.&lt;/P&gt;
&lt;P&gt;IE8 includes a number of important security features and defense-in-depth changes that raise the bar against the bad guys. If you haven’t upgraded yet, you should do so today!&lt;/P&gt;
&lt;P&gt;thanks,&lt;/P&gt;
&lt;P&gt;-Eric&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9905231" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ieinternals/archive/tags/Security/default.aspx">Security</category></item><item><title>The User-Agent String: Use and Abuse</title><link>http://blogs.msdn.com/ieinternals/archive/2009/10/08/Extending-the-User-Agent-String-Problems-and-Alternatives.aspx</link><pubDate>Thu, 08 Oct 2009 05:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9904696</guid><dc:creator>EricLaw</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/ieinternals/comments/9904696.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ieinternals/commentrss.aspx?PostID=9904696</wfw:commentRss><description>&lt;P&gt;When I first joined the IE team five years ago, I became responsible for the User-Agent string. While I’ve owned significantly more “important” features over the years, on a byte-for-byte basis, few have proved as complicated as the “simple” UA string. &lt;/P&gt;
&lt;P&gt;I (&lt;A href="http://blogs.msdn.com/ie/archive/2008/02/27/the-rss-platform-ie8-user-agent-string.aspx" mce_href="http://blogs.msdn.com/ie/archive/2008/02/27/the-rss-platform-ie8-user-agent-string.aspx"&gt;and&lt;/A&gt; &lt;A href="http://blogs.msdn.com/ie/archive/2004/09/02/224902.aspx" mce_href="http://blogs.msdn.com/ie/archive/2004/09/02/224902.aspx"&gt;others&lt;/A&gt;) have written a &lt;A href="http://blogs.msdn.com/ie/archive/2008/02/21/the-internet-explorer-8-user-agent-string.aspx" mce_href="http://blogs.msdn.com/ie/archive/2008/02/21/the-internet-explorer-8-user-agent-string.aspx"&gt;lot&lt;/A&gt; &lt;A href="http://blogs.msdn.com/ie/archive/2005/04/27/412813.aspx" mce_href="http://blogs.msdn.com/ie/archive/2005/04/27/412813.aspx"&gt;about&lt;/A&gt; &lt;A href="http://blogs.msdn.com/ie/archive/2005/09/01/459541.aspx" mce_href="http://blogs.msdn.com/ie/archive/2005/09/01/459541.aspx"&gt;the&lt;/A&gt; &lt;A href="http://blogs.msdn.com/ie/archive/2006/02/03/524256.aspx" mce_href="http://blogs.msdn.com/ie/archive/2006/02/03/524256.aspx"&gt;UA&lt;/A&gt; &lt;A href="http://blogs.msdn.com/ie/archive/2006/09/20/763891.aspx" mce_href="http://blogs.msdn.com/ie/archive/2006/09/20/763891.aspx"&gt;string&lt;/A&gt; &lt;A href="http://blogs.msdn.com/ie/archive/2005/03/12/394526.aspx" mce_href="http://blogs.msdn.com/ie/archive/2005/03/12/394526.aspx"&gt;over&lt;/A&gt; &lt;A href="http://blogs.msdn.com/ie/archive/2009/01/09/the-internet-explorer-8-user-agent-string-updated-edition.aspx" mce_href="http://blogs.msdn.com/ie/archive/2009/01/09/the-internet-explorer-8-user-agent-string-updated-edition.aspx"&gt;the&lt;/A&gt; &lt;A href="http://blogs.msdn.com/ie/archive/2008/08/27/introducing-compatibility-view.aspx" mce_href="http://blogs.msdn.com/ie/archive/2008/08/27/introducing-compatibility-view.aspx"&gt;years&lt;/A&gt;. This post largely assumes that you’re familiar with what the user-agent string is and what it’s commonly (mis)used for.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;In this post, I’ll try to summarize why the UA string causes so many problems (beyond &lt;A href="http://my.opera.com/ODIN/blog/perils-browser-sniffing" mce_href="http://my.opera.com/ODIN/blog/perils-browser-sniffing"&gt;browser version sniffing&lt;/A&gt;), and expose the complex tradeoff between compatibility and extensibility.&lt;/P&gt;
&lt;H3&gt;Background&lt;/H3&gt;
&lt;P&gt;First things first-- you can check the UA string currently sent by your browser using my &lt;A title=http://www.enhanceie.com/ua.aspx href="http://www.enhanceie.com/ua.aspx" mce_href="http://www.enhanceie.com/ua.aspx"&gt;User-Agent string test page&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Do you see anything in there that you weren’t expecting?&lt;/EM&gt;&lt;/P&gt;
&lt;H3&gt;Changing the User-Agent String at Runtime&lt;/H3&gt;
&lt;P&gt;For IE8, we fixed significant bugs in the &lt;A href="http://msdn.microsoft.com/en-us/library/ms775125(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms775125(VS.85).aspx"&gt;UrlMkSetSessionOption&lt;/A&gt; API, which allows setting of the User-Agent for the current process. Before IE8, calling this API inside IE would (depending on timing) set the User-Agent sent to the server by WinINET, &lt;EM&gt;or &lt;/EM&gt;set the User-Agent property in the DOM, but &lt;EM&gt;never&lt;/EM&gt; properly set both. &lt;/P&gt;
&lt;P&gt;I developed a simple &lt;A href="http://www.enhanceie.com/ietoys/uapick.asp" mce_href="http://www.enhanceie.com/ietoys/uapick.asp"&gt;User-Agent Picker Add-on&lt;/A&gt; for IE8 that allows you to change your User-Agent string to whatever you like. You can then easily see how websites react to various UA strings. For instance, try sending the GoogleBot UA string to &lt;A href="http://msdn.microsoft.com/" mce_href="http://msdn.microsoft.com/"&gt;MSDN&lt;/A&gt; to see how that site is optimized for search.&lt;/P&gt;
&lt;P&gt;Internally, the add-on simply exercises the URLMon API: &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, szNewUA, strlen(szNewUA), 0)&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Alternatively, Web Browser Control hosts can change the User-Agent string sent by hyperlink navigations by overriding the OnAmbientProperty method for &lt;A href="http://support.microsoft.com/kb/183412" mce_href="http://support.microsoft.com/kb/183412"&gt;DISPID_AMBIENT_USERAGENT&lt;/A&gt;. However, the overridden property is not used when programmatically calling the Navigate method, and it will not impact the &lt;A href="http://msdn.microsoft.com/en-us/library/cc197025(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc197025(VS.85).aspx"&gt;userAgent property&lt;/A&gt; of the DOM's &lt;A href="http://msdn.microsoft.com/en-us/library/ms535867(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms535867(VS.85).aspx"&gt;navigator&lt;/A&gt; or &lt;A href="http://msdn.microsoft.com/en-us/library/ms535860(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms535860(VS.85).aspx"&gt;clientInformation&lt;/A&gt; objects.&lt;/P&gt;
&lt;H3&gt;Extending the User-Agent String in the Registry&lt;/H3&gt;
&lt;P&gt;It’s trivial to add tokens to the User-Agent string using &lt;A href="http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx#UARegistry" mce_href="http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx#UARegistry"&gt;simple registry modifications&lt;/A&gt;. Tokens added to the registry keys are sent by all requests from Internet Explorer and other hosts of the Web Browser control. These registry keys have been supported since IE5, meaning that all currently supported IE versions will send these tokens.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Other browsers (Firefox, Chrome, etc) do not&amp;nbsp;offer the same degree of ease in extending the UA string, so it’s uncommon for software to extend&amp;nbsp;the UA string in non-IE browsers.&lt;/EM&gt;&lt;/P&gt;
&lt;H3&gt;The Fiasco&lt;/H3&gt;
&lt;P&gt;Unfortunately, the ease of extending IE’s UA string means that it’s a very common practice. That, in turn, leads to a number of major problems that impact normal folks who don’t even know what a UA string is.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;A few of the problems include:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Many websites will return only error pages upon receiving a UA header over a fixed length (often 256 characters). &lt;/LI&gt;
&lt;LI&gt;In IE7 and below, if the UA string grows to over 260 characters, the navigator.userAgent property &lt;A href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=362923" mce_href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=362923"&gt;is incorrectly computed.&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.codeproject.com/KB/aspnet/mobiledetect.aspx?msg=3119599#xx3119599xx" mce_href="http://www.codeproject.com/KB/aspnet/mobiledetect.aspx?msg=3119599#xx3119599xx"&gt;Poorly designed UA-sniffing code&lt;/A&gt; may be confused and misinterpret tokens in the UA. &lt;/LI&gt;
&lt;LI&gt;Poorly designed browser add-ons are known to misinterpret how the registry keys are used, and shove an entire UA string into one of the tokens, resulting in a “nested” UA string. &lt;/LI&gt;
&lt;LI&gt;Because UA strings are sent for &lt;EM&gt;every &lt;/EM&gt;HTTP request, they entail a significant performance cost. In &lt;A href="http://brianary.blogspot.com/2009/07/internet-explorer-user-agent-spam.html" mce_href="http://brianary.blogspot.com/2009/07/internet-explorer-user-agent-spam.html"&gt;degenerate cases&lt;/A&gt;, sending the UA string might consume 50% of the overall request bandwidth. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Two real-world examples:&lt;/P&gt;
&lt;P&gt;My bank has problem #1. They have security software on their firewall looking for “suspicious” requests, and the developers assumed that they’d never see a UA over 256 bytes.&lt;/P&gt;
&lt;P&gt;Some major sites are using super-liberal UA parsing code (problem #3) to detect mobile browsers. Unfortunately, for instance, Creative Labs adds the token “Creative AutoU&lt;STRONG&gt;pda&lt;/STRONG&gt;te” to the UA string. Naive server code sees the characters &lt;STRONG&gt;pda &lt;/STRONG&gt;inside that token and decides that the user must be on a mobile browser. The server might then return &lt;A href="http://msdn.microsoft.com/en-us/library/bb415528.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb415528.aspx"&gt;WML&lt;/A&gt; content that the desktop browser will not even render, or provide an otherwise degraded experience. Worse still, some sites don’t send a &lt;FONT face="Courier New"&gt;Vary: User-Agent&lt;/FONT&gt; response header when returning the mobile content, meaning that network proxies will sometimes start sending &lt;EM&gt;everyone&lt;/EM&gt; content designed for mobile devices.&lt;/P&gt;
&lt;P&gt;Ultimately, the problem is what economists call the &lt;A href="http://en.wikipedia.org/wiki/Tragedy_of_the_commons" mce_href="http://en.wikipedia.org/wiki/Tragedy_of_the_commons"&gt;Tragedy of the Commons&lt;/A&gt;, although personally I prefer the &lt;A href="http://despair.com/ir.html" mce_href="http://despair.com/ir.html"&gt;visual representation&lt;/A&gt;. You might remember that the extensibility of the &lt;A href="http://blogs.msdn.com/ieinternals/archive/2009/07/01/IE-and-the-Accept-Header.aspx" mce_href="http://blogs.msdn.com/ieinternals/archive/2009/07/01/IE-and-the-Accept-Header.aspx"&gt;Accept header&lt;/A&gt; leads to the same problem, although that header is sent so unreliably that no sane website would depend upon it.&lt;/P&gt;
&lt;H3&gt;Standards&lt;/H3&gt;
&lt;P&gt;It’s tempting to look to the standards for restrictions on the UA string. Unfortunately, the &lt;A href="http://www.ietf.org/rfc/rfc2616.txt" mce_href="http://www.ietf.org/rfc/rfc2616.txt"&gt;RFC for HTTP&lt;/A&gt; has little to say on the topic:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;14.43 User-Agent &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;The User-Agent request-header field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests. The field can contain multiple product tokens (section 3.8) and comments identifying the agent and any subproducts which form a significant part of the user agent. By convention, the product tokens are listed in order of their significance for identifying the application. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;User-Agent = "User-Agent" ":" 1*( product | comment ) &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;Example: &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;User-Agent: CERN-LineMode/2.15 libwww/2.17b3&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Notably, the RFC does not define a maximum length for the header value, and does not provide much guidance into what “subproducts which form a significant part of the user agent” means. It suggests a few broad uses of the UA string on the server-side, without discussion of what problems such usage might introduce. &lt;/P&gt;
&lt;H3&gt;Motivations for UA Modification&lt;/H3&gt;
&lt;P&gt;OEMs and ISVs have a number of motivations for adding to the UA string.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Metrics. &lt;/STRONG&gt;Every server on the web can easily tell if your software is installed. &lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Client capability detection. &lt;/STRONG&gt;JavaScript can easily detect if your (ActiveX control / Protocol Handler / Client application / etc) is available. &lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;User Tracking. &lt;/STRONG&gt;I don’t know of any current offenders, but at some point in the past some software would add a &lt;A href="http://msdn.microsoft.com/en-us/library/aa373931(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa373931(VS.85).aspx"&gt;GUID&lt;/A&gt; token to the UA string. This token would effectively act as an invisible “super-cookie” that would be sent to every site the user ever visited. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Now, scenario #3 is clearly evil, and we have no desire to support it. Scenarios #1 and #2 aren’t inherently bad—but advertising to every site in the world that a given piece of software is available on the client is probably the wrong design.&lt;/P&gt;
&lt;H3&gt;Known UA Tokens&lt;/H3&gt;
&lt;P&gt;Here are some explanations of common tokens found in &lt;A href="http://www.useragentstring.com/pages/Internet%20Explorer/" mce_href="http://www.useragentstring.com/pages/Internet%20Explorer/"&gt;real-world IE UA strings&lt;/A&gt;.&lt;/P&gt;
&lt;TABLE border=1&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;STRONG&gt;Token&lt;/STRONG&gt; &lt;/TD&gt;
&lt;TD&gt;&lt;STRONG&gt;Meaning&amp;nbsp;/ Component&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;SV1&lt;/TD&gt;
&lt;TD&gt;&lt;EM&gt;Security Version 1&lt;/EM&gt;- Indicates that&amp;nbsp;XP SP2 was installed. Removed from IE7.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;SLCC1&lt;/TD&gt;
&lt;TD&gt;&lt;EM&gt;Software Licensing Commerce Client&lt;/EM&gt;- Indicates Vista+ &lt;A href="http://support.microsoft.com/kb/930379" mce_href="http://support.microsoft.com/kb/930379"&gt;AnyTime Upgrade component&lt;/A&gt; is available.&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MS-RTC LM 8&lt;/TD&gt;
&lt;TD&gt;&lt;EM&gt;Microsoft Real Time Conferencing Live Meeting&lt;/EM&gt; version 8&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;InfoPath.2&lt;/TD&gt;
&lt;TD&gt;InfoPath XML MIME Filter&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;GTB6&lt;/TD&gt;
&lt;TD&gt;Google Toolbar&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Creative AutoUpdate&lt;/TD&gt;
&lt;TD&gt;Creative AutoUpdate software&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Trident/4.0&lt;/TD&gt;
&lt;TD&gt;IE8 version of HTML Renderer installed&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Zune 3.0&lt;/TD&gt;
&lt;TD&gt;Zune Software client&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Media Center PC 6.0&lt;/TD&gt;
&lt;TD&gt;It's a Media Center PC&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Tablet PC 2.0&lt;/TD&gt;
&lt;TD&gt;It's a TabletPC&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;.NET CLR 3.5.30729&lt;/TD&gt;
&lt;TD&gt;The &lt;A href="http://www.hanselman.com/blog/TheNETFrameworkAndTheBrowsersUserAgentString.aspx"&gt;.NET Common Language Runtime&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;chromeframe&lt;/TD&gt;
&lt;TD&gt;Google ChromeFrame addon&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;fdm&lt;/TD&gt;
&lt;TD&gt;FreeDownloadManager.org add-on&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Comcast Install 1.0&lt;/TD&gt;
&lt;TD&gt;Comcast High-speed Internet installer&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;OfficeLiveConnector.1.3&lt;/TD&gt;
&lt;TD&gt;??&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;OfficeLivePatch.0.0&lt;/TD&gt;
&lt;TD&gt;Comcast browser installer&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;WOW64&lt;/TD&gt;
&lt;TD&gt;Running in &lt;A href="http://blogs.msdn.com/ie/archive/2009/01/09/the-internet-explorer-8-user-agent-string-updated-edition.aspx"&gt;32bit IE on 64bit Windows&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Win64; x64&lt;/TD&gt;
&lt;TD&gt;Running in 64bit IE&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;msn OptimizedIE8&lt;/TD&gt;
&lt;TD&gt;Installed with MSN branding and services&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;yie8&lt;/TD&gt;
&lt;TD&gt;Installed with Yahoo! branding and services&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;H3&gt;Alternatives to UA Modification&lt;/H3&gt;
&lt;P&gt;In many cases, allowing client-side script to detect a capability without forcing the browser to send that information to the server would be sufficient. While new APIs might be proposed for this purpose, we need an alternative that already works in all versions of IE. &lt;/P&gt;
&lt;P&gt;You probably know that &lt;A href="http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx"&gt;Conditional Comments&lt;/A&gt; can be used to detect the IE version, but they can also be used to detect custom information about any component listed in the registry’s &lt;STRONG&gt;version vector &lt;/STRONG&gt;key. For instance, Windows 7 uses the new &lt;STRONG&gt;WindowsVersion &lt;/STRONG&gt;entry to allow script to detect the &lt;A href="http://msdn.microsoft.com/en-us/library/aa394239(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa394239(VS.85).aspx"&gt;OperatingSystemSKU&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;To expose your capabilities via conditional comments, simply create a &lt;FONT face="Courier New"&gt;REG_SZ&lt;/FONT&gt; inside &lt;FONT face="Courier New"&gt;HKLM\SOFTWARE\Microsoft\Internet Explorer\Version Vector&lt;/FONT&gt;. The new entry should be named uniquely (e.g. &lt;FONT color=#008000 face="Courier New"&gt;EricLaw-SampleAddon&lt;/FONT&gt;) and contain a string in the format x.xxxx (e.g. &lt;FONT color=#008000 face="Courier New"&gt;1.0002&lt;/FONT&gt;).&lt;/P&gt;
&lt;P&gt;You can then detect the version (or absence) of your component using conditional comments:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008000 face="Courier New"&gt;&amp;lt;!--[if !&lt;FONT color=#008000 face="Courier New"&gt;EricLawSampleAddon&lt;/FONT&gt;]&amp;gt;&amp;lt;script&amp;gt;alert("&lt;/FONT&gt;&lt;FONT color=#008000 face="Courier New"&gt;You don’t have my IE add-on yet. Go install it!");&amp;lt;/script&amp;gt;&amp;lt;![endif]--&amp;gt; &lt;BR&gt;&lt;FONT color=#008000 face="Courier New"&gt;&amp;lt;!--[if lt &lt;FONT color=#008000 face="Courier New"&gt;EricLawSampleAddon 1.0002&lt;/FONT&gt;]&amp;gt;&amp;lt;b&amp;gt;&lt;/FONT&gt;&lt;FONT color=#008000 face="Courier New"&gt;You have an outdated version. Go upgrade!&amp;lt;/b&amp;gt;&amp;lt;![endif]--&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;These conditional comments are hidden from non-IE browsers, and will work properly in IE5 and above.&lt;/P&gt;
&lt;H3&gt;Conclusions?&lt;/H3&gt;
&lt;P&gt;Extensibility is an important aspect for any major software project, but can also be the source of severe compatibility problems that are extremely painful to fix in the future. As we increase the power of the web platform, we need to find ways to ensure that extension points and the tragedy of the commons don’t destroy the user’s experience.&lt;/P&gt;
&lt;P&gt;Until next time,&lt;/P&gt;
&lt;P&gt;-Eric&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9904696" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ieinternals/archive/tags/design/default.aspx">design</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/Best-Practices/default.aspx">Best-Practices</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/problems/default.aspx">problems</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/hosting/default.aspx">hosting</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/dev/default.aspx">dev</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/add-ons/default.aspx">add-ons</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/networking/default.aspx">networking</category></item><item><title>Good News: Microsoft Security Essentials Released</title><link>http://blogs.msdn.com/ieinternals/archive/2009/10/06/Free-antivirus-and-antimalware-scanner-from-Microsoft.aspx</link><pubDate>Tue, 06 Oct 2009 18:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9903767</guid><dc:creator>EricLaw</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/ieinternals/comments/9903767.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ieinternals/commentrss.aspx?PostID=9903767</wfw:commentRss><description>&lt;P&gt;Microsoft’s free new anti-virus / anti-malware realtime scanner is now available as &lt;A href="http://www.microsoft.com/security_essentials/" mce_href="http://www.microsoft.com/security_essentials/"&gt;a free download&lt;/A&gt;. Installing MSE, a traditional&amp;nbsp;signature-based scanner, alongside IE8’s URL Reputation-based &lt;A href="http://blogs.msdn.com/ie/archive/2009/08/13/real-world-protection-with-ie8-s-smartscreen-filter.aspx" mce_href="http://blogs.msdn.com/ie/archive/2009/08/13/real-world-protection-with-ie8-s-smartscreen-filter.aspx"&gt;SmartScreen Filter&lt;/A&gt; yields comprehensive protection to help keep your computers safe from malicious software. &lt;/P&gt;
&lt;P&gt;There are a few things I like about MSE over other scanners:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;You won’t see advertisements trying to “upsell” you to a professional version.&lt;/LI&gt;
&lt;LI&gt;You won’t see “scareware” style warnings trying to convince you that MSE is providing value-- &lt;EM&gt;“oh my gosh, we found a cookie! Panic!”&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;Signature updates are free—there’s no “subscription” that will expire and leave you unprotected.&lt;/LI&gt;
&lt;LI&gt;The product doesn’t install a bunch of 3rd party toolbars or other such nonsense— unfortunately, a common business model for other “free” products.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;The product has been getting some &lt;A href="http://www.winsupersite.com/win7/mse.asp" mce_href="http://www.winsupersite.com/win7/mse.asp"&gt;great&lt;/A&gt; &lt;A href="http://www.computerworld.com/s/article/9134753/Antivirus_testing_outfit_Microsoft_Security_Essentials_makes_the_grade?intsrc=it_blogwatch" mce_href="http://www.computerworld.com/s/article/9134753/Antivirus_testing_outfit_Microsoft_Security_Essentials_makes_the_grade?intsrc=it_blogwatch"&gt;reviews&lt;/A&gt;.&amp;nbsp; I’ll definitely be installing this on my parent’s computer the next time I’m home.&amp;nbsp; :-)&lt;/P&gt;
&lt;P&gt;-Eric&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9903767" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ieinternals/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/tools/default.aspx">tools</category></item><item><title>Internet Explorer Cannot Download https://something</title><link>http://blogs.msdn.com/ieinternals/archive/2009/10/02/Internet-Explorer-cannot-download-over-HTTPS-when-no-cache.aspx</link><pubDate>Sat, 03 Oct 2009 00:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9902596</guid><dc:creator>EricLaw</dc:creator><slash:comments>14</slash:comments><comments>http://blogs.msdn.com/ieinternals/comments/9902596.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ieinternals/commentrss.aspx?PostID=9902596</wfw:commentRss><description>&lt;P&gt;Earlier today, I was asked to troubleshoot a secure site where file downloads were always failing. Having seen this problem many times often over the years, I immediately suspected that the web developer wasn’t aware that &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;if a user tries to download&lt;/STRONG&gt;&lt;EM&gt;*&lt;/EM&gt;&lt;STRONG&gt; a file over a HTTPS connection, any response headers that prevent caching will cause the file download process to fail.&lt;/STRONG&gt; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;* Note that this applies to “downloaded” files that open in programs other than IE. It does not apply to resources that render&lt;/EM&gt; inside &lt;EM&gt;IE’s HTML rendering engine, like images/script/css/etc&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;When Internet Explorer encounters a HTTPS download that will not be cached, the download is aborted with the following dialog box:&lt;/P&gt;
&lt;P&gt;&lt;IMG alt="Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found." src="http://www.enhanceie.com/images/blog/DownloadFail.png" mce_src="http://www.enhanceie.com/images/blog/DownloadFail.png"&gt; &lt;/P&gt;
&lt;P&gt;The &lt;A href="http://www.fiddler2.com/" mce_href="http://www.fiddler2.com/"&gt;Fiddler&lt;/A&gt; web debugger allows you to easily check to see whether a download contains headers that prevent caching.&lt;/P&gt;
&lt;P&gt;Cache-preventing headers include:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A &lt;STRONG&gt;Cache-Control&lt;/STRONG&gt; header with the tokens &lt;STRONG&gt;no-cache&lt;/STRONG&gt;, &lt;STRONG&gt;no-store&lt;/STRONG&gt;, or &lt;STRONG&gt;max-age=0&lt;/STRONG&gt; &lt;/LI&gt;
&lt;LI&gt;An &lt;STRONG&gt;Expires&lt;/STRONG&gt; header that specifies a time in the past &lt;/LI&gt;
&lt;LI&gt;A &lt;STRONG&gt;Vary &lt;/STRONG&gt;header that specifies &lt;A href="http://blogs.msdn.com/ieinternals/archive/2009/06/17/Vary-Header-Prevents-Caching-in-IE.aspx" mce_href="http://blogs.msdn.com/ieinternals/archive/2009/06/17/Vary-Header-Prevents-Caching-in-IE.aspx"&gt;almost anything&lt;/A&gt;&amp;nbsp; &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Without changing the site’s code, you can easily confirm that the problem is caused by cache-prevention headers using Fiddler’s Filters tab:&lt;/P&gt;
&lt;P&gt;&lt;IMG alt="Fiddler Filter UI: Remove Cache-Control Header" src="http://www.enhanceie.com/images/blog/RemoveCacheControl.png" mce_src="http://www.enhanceie.com/images/blog/RemoveCacheControl.png"&gt;&lt;/P&gt;
&lt;P&gt;Fiddler allowed me to determine that today’s instance was caused by cache-preventing headers. After the web developer updates these headers to allow local caching (e.g. &lt;STRONG&gt;Cache-Control: private, max-age=15&lt;/STRONG&gt;) the file download process will work correctly.&lt;/P&gt;
&lt;P&gt;-Eric&lt;/P&gt;
&lt;P&gt;PS: In the unlikely event that the user has checked the &lt;STRONG&gt;Do not save encrypted pages to disk&lt;/STRONG&gt; option inside Tools / Internet Options &amp;gt; Advanced, this error dialog may be shown for &lt;EM&gt;any &lt;/EM&gt;file downloads from secure sites, regardless of caching headers. I recommend that folks avoid enabling this option, and use the &lt;STRONG&gt;Delete Browser History on Exit &lt;/STRONG&gt;feature instead.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9902596" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ieinternals/archive/tags/caching/default.aspx">caching</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/https/default.aspx">https</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/problems/default.aspx">problems</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/networking/default.aspx">networking</category></item><item><title>New Tool: Compare IE Security Settings</title><link>http://blogs.msdn.com/ieinternals/archive/2009/10/02/IE-Zone-Comparer-Tool-Released.aspx</link><pubDate>Fri, 02 Oct 2009 03:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9902152</guid><dc:creator>EricLaw</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/ieinternals/comments/9902152.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ieinternals/commentrss.aspx?PostID=9902152</wfw:commentRss><description>&lt;P&gt;“IE Zone Comparer” was designed to&amp;nbsp;provide additional visibility into URLMon's&amp;nbsp;security zone settings.&amp;nbsp; Pick any two collections of security zone settings, and IE Zone Comparer displays the values of those settings, highlighting any differences between the two collections.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/fdcc/archive/2009/10/01/viewing-and-comparing-ie-security-zone-settings.aspx"&gt;http://blogs.technet.com/fdcc/archive/2009/10/01/viewing-and-comparing-ie-security-zone-settings.aspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9902152" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ieinternals/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/tools/default.aspx">tools</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/Zones/default.aspx">Zones</category></item><item><title>Understanding Domain Names in Internet Explorer</title><link>http://blogs.msdn.com/ieinternals/archive/2009/09/19/Private-Domain-Names-and-Public-Suffixes-in-Internet-Explorer.aspx</link><pubDate>Sat, 19 Sep 2009 03:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9897015</guid><dc:creator>EricLaw</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/ieinternals/comments/9897015.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ieinternals/commentrss.aspx?PostID=9897015</wfw:commentRss><description>&lt;P&gt;Web browsers use domain names for a variety of purposes, but how they’re used is much more complicated than most developers realize. In this post, I’ll attempt to cover the most important aspects of this topic.&lt;/P&gt;
&lt;H2&gt;Definitions&lt;/H2&gt;
&lt;P&gt;When talking about “domains” the terminology alone is confusing (and contentious).&amp;nbsp; So, let’s start with some simplistic definitions for terms used in this post:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A &lt;A href="http://en.wikipedia.org/wiki/DNS_label#Parts_of_a_domain_name" mce_href="http://en.wikipedia.org/wiki/DNS_label#Parts_of_a_domain_name"&gt;label&lt;/A&gt; is a single component of a &lt;A href="http://en.wikipedia.org/wiki/Domain_name" mce_href="http://en.wikipedia.org/wiki/Domain_name"&gt;domain name&lt;/A&gt; string, delimited by periods. For instance, “&lt;EM&gt;www&lt;/EM&gt;” “&lt;EM&gt;microsoft&lt;/EM&gt;” and “&lt;EM&gt;com&lt;/EM&gt;” are the three labels in the domain name “&lt;EM&gt;www.microsoft.com&lt;/EM&gt;” &lt;/LI&gt;
&lt;LI&gt;A &lt;STRONG&gt;plainhostname&lt;/STRONG&gt; is an unqualified, single label hostname like “&lt;EM&gt;Payroll&lt;/EM&gt;”, which typically refers to a server on a local intranet. &lt;/LI&gt;
&lt;LI&gt;A &lt;A href="http://en.wikipedia.org/wiki/Fqdn" mce_href="http://en.wikipedia.org/wiki/Fqdn"&gt;FQDN&lt;/A&gt; is an absolute, fully-qualified domain name, like “&lt;EM&gt;www.microsoft.com&lt;/EM&gt;” &lt;/LI&gt;
&lt;LI&gt;A &lt;A href="http://publicsuffix.org/" mce_href="http://publicsuffix.org/"&gt;Public Suffix&lt;/A&gt; is the suffix portion of a FQDN under which independent entities may register subdomains. For example, &lt;EM&gt;ltd.co.im &lt;/EM&gt;is a Public Suffix. A Public Suffix contains one or more labels. Sometimes the term “&lt;A href="https://wiki.mozilla.org/Gecko:Effective_TLD_List" mce_href="https://wiki.mozilla.org/Gecko:Effective_TLD_List"&gt;effective TLD&lt;/A&gt;” is used as a synonym. &lt;/LI&gt;
&lt;LI&gt;A &lt;STRONG&gt;&lt;A href="http://en.wikipedia.org/wiki/Top-level_domain" mce_href="http://en.wikipedia.org/wiki/Top-level_domain"&gt;TLD&lt;/A&gt; &lt;/STRONG&gt;is a top-level-domain, the right-most label of a domain name &lt;/LI&gt;
&lt;LI&gt;A &lt;STRONG&gt;&lt;A href="http://en.wikipedia.org/wiki/Generic_top-level_domain" mce_href="http://en.wikipedia.org/wiki/Generic_top-level_domain"&gt;gTLD&lt;/A&gt; &lt;/STRONG&gt;is a generic TLD, like ".&lt;EM&gt;com&lt;/EM&gt;”, “.&lt;EM&gt;net&lt;/EM&gt;”, “.&lt;EM&gt;gov&lt;/EM&gt;”, etc &lt;/LI&gt;
&lt;LI&gt;A &lt;STRONG&gt;&lt;A href="http://en.wikipedia.org/wiki/Cctld" mce_href="http://en.wikipedia.org/wiki/Cctld"&gt;ccTLD&lt;/A&gt; &lt;/STRONG&gt;is a country-code TLD, like “.&lt;EM&gt;us&lt;/EM&gt;” or “.&lt;EM&gt;ru&lt;/EM&gt;” &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://en.wikipedia.org/wiki/Internet_Corporation_for_Assigned_Names_and_Numbers" mce_href="http://en.wikipedia.org/wiki/Internet_Corporation_for_Assigned_Names_and_Numbers"&gt;ICANN&lt;/A&gt; (the Internet Corporation for Assigned Names and Numbers) is responsible for the creation and management of TLDs &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;When web developers talk about “the domain,” they’re often referring to what this post calls the Private Domain:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A &lt;STRONG&gt;Private Domain &lt;/STRONG&gt;is a single label with a Public Suffix appended. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;For instance, the two Private Domains “&lt;EM&gt;Acme.ltd.co.im”&lt;/EM&gt; and “&lt;EM&gt;Bayden.ltd.co.im”&lt;/EM&gt;, are each independently operated subdomains of Public Suffix “&lt;EM&gt;ltd.co.im”. &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Okay, now on to the fun stuff.&lt;/P&gt;
&lt;H2&gt;Domains and the IURI Interface&lt;/H2&gt;
&lt;P&gt;&lt;EM&gt;First, some foreshadowing…&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;IE7 and above use a &lt;A href="http://blogs.msdn.com/ie/archive/2005/08/15/452006.aspx" mce_href="http://blogs.msdn.com/ie/archive/2005/08/15/452006.aspx"&gt;Consolidated URI&lt;/A&gt; handling feature which exposes the &lt;A href="http://msdn.microsoft.com/en-us/library/ms775038(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms775038(VS.85).aspx"&gt;IURI interface&lt;/A&gt;.&amp;nbsp; Let’s have a quick look at a partial list of IURI property values from a sample URI: &lt;STRONG&gt;http://www.example.com/path/file.ext?query=val#frag&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;TABLE border=0 cellSpacing=0 cellPadding=1 width=631&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Uri_PROPERTY_ABSOLUTE_URI&lt;/TD&gt;
&lt;TD vAlign=top width=429&gt;"http://www.example.com/path/file.ext?query=val#frag"&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Uri_PROPERTY_DISPLAY_URI&lt;/TD&gt;
&lt;TD vAlign=top width=429&gt;"http://www.example.com/path/file.ext?query=val#frag" &lt;BR&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Uri_PROPERTY_RAW_URI&lt;/TD&gt;
&lt;TD vAlign=top width=429&gt;"http://www.example.com/path/file.ext?query=val#frag"&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Uri_PROPERTY_SCHEME_NAME&lt;/TD&gt;
&lt;TD vAlign=top width=429&gt;"http"&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms775016(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms775016(VS.85).aspx"&gt;Uri_PROPERTY_DOMAIN &lt;BR&gt;&lt;/A&gt;&lt;FONT color=#008000&gt;&lt;EM&gt;aka Private Domain&lt;/EM&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=429&gt;"example.com"&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms775019(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms775019(VS.85).aspx"&gt;Uri_PROPERTY_HOST&lt;/A&gt; &lt;BR&gt;&lt;FONT color=#008000&gt;&lt;EM&gt;aka FQDN or Plainhostname&lt;/EM&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=429&gt;"www.example.com"&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms775020(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms775020(VS.85).aspx"&gt;Uri_PROPERTY_HOST_TYPE&lt;/A&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=429&gt;1&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Uri_PROPERTY_PORT&lt;/TD&gt;
&lt;TD vAlign=top width=429&gt;80&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Uri_PROPERTY_PATH&lt;/TD&gt;
&lt;TD vAlign=top width=429&gt;"/path/file.ext"&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Uri_PROPERTY_QUERY&lt;/TD&gt;
&lt;TD vAlign=top width=429&gt;"?query=val"&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It’s important to note that if the URI contains only a plainhostname (e.g. “&lt;EM&gt;http://&lt;STRONG&gt;example&lt;/STRONG&gt;/”&lt;/EM&gt;) or a Public Suffix (e.g. “&lt;EM&gt;http://&lt;STRONG&gt;co.uk&lt;/STRONG&gt;/&lt;/EM&gt;”), then Uri_PROPERTY_DOMAIN is &lt;EM&gt;null&lt;/EM&gt;.&lt;/P&gt;
&lt;H2&gt;Why Do Browsers Care About Domains?&lt;/H2&gt;
&lt;P&gt;Every browser must be able to determine the Private Domain for &lt;A href="http://publicsuffix.org/learn/" mce_href="http://publicsuffix.org/learn/"&gt;a number of uses&lt;/A&gt;, but in this post I’ll concentrate on IE’s use of this information.&lt;/P&gt;
&lt;H5&gt;&lt;STRONG&gt;1. &lt;/STRONG&gt;Domain Highlighting&lt;STRONG&gt; in the Address Bar&lt;/STRONG&gt;&lt;/H5&gt;
&lt;P&gt;IE8’s &lt;A href="http://blogs.msdn.com/ie/archive/2008/03/11/address-bar-improvements-in-internet-explorer-8-beta-1.aspx" mce_href="http://blogs.msdn.com/ie/archive/2008/03/11/address-bar-improvements-in-internet-explorer-8-beta-1.aspx"&gt;Domain Highlighting&lt;/A&gt; feature renders the Private Domain in black text and the rest of the URL in gray to help prevent the use of misleading URLs in spoofing attacks. &lt;/P&gt;
&lt;P&gt;If the URL contains a plainhostname, the address bar will render the plainhostname in black instead.&lt;/P&gt;
&lt;H5&gt;&lt;STRONG&gt;2. Quota management for &lt;/STRONG&gt;Local Storage&lt;/H5&gt;
&lt;P&gt;IE8 applies a &lt;A href="http://msdn.microsoft.com/en-us/library/cc197062(VS.85).aspx#_quota" mce_href="http://msdn.microsoft.com/en-us/library/cc197062(VS.85).aspx#_quota"&gt;per-Private Domain quota&lt;/A&gt; to values stored using the HTML5 Local Storage API.&lt;/P&gt;
&lt;P&gt;If the Uri_PROPERTY_DOMAIN is null (because the URL contains a plainhostname) the browser will enforce the quota against Uri_PROPERTY_HOST instead.&lt;/P&gt;
&lt;H5&gt;3. document.domain relaxation&lt;/H5&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/ieinternals/archive/2009/08/28/Explaining-Same-Origin-Policy-Part-1-Deny-Read.aspx" mce_href="http://blogs.msdn.com/ieinternals/archive/2009/08/28/Explaining-Same-Origin-Policy-Part-1-Deny-Read.aspx"&gt;Same-Origin-Policy&lt;/A&gt; typically means that two pages must have exactly-matching FQDNs in order to script against each others’ DOM. However, HTML allows a page to &lt;A href="http://msdn.microsoft.com/en-us/library/ms533028(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms533028(VS.85).aspx"&gt;relax its document.domain&lt;/A&gt; property to a suffix of its current value to enable cross host DOM communication within a single Private Domain. Script is not permitted to change its &lt;A href="http://msdn.microsoft.com/en-us/library/cc196989(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc196989(VS.85).aspx"&gt;document.domain property&lt;/A&gt; to a string shorter than the private domain. This prevents sites from unrelated organizations from intentionally or inadvertently scripting against each others’ DOM.&lt;/P&gt;
&lt;H5&gt;4. HTTP Cookies&lt;/H5&gt;
&lt;P&gt;When setting a cookie, a website may specify which hosts the cookie should be sent to using the domain attribute. The browser must block attempts to set a cookie where the domain attribute does not end with the current page’s Private Domain. Failure to do so results in privacy and security concerns.&lt;/P&gt;
&lt;P&gt;Privacy: Allowing unrelated domains to share cookies can result in “super-cookies”-- cookies which are sent to multiple unrelated organizations that happen to share a Public Suffix.&lt;/P&gt;
&lt;P&gt;Security: Session-fixation attacks, where a good site and an evil site share a Public Suffix, and the evil site sets a malicious cookie on the Public Suffix so that the Good site is sent the evil cookie.&lt;/P&gt;
&lt;H5&gt;5. Security Zones – Mapping Domains to Zones&lt;/H5&gt;
&lt;P&gt;Because Public Suffixes are typically shared by multiple unrelated organizations, URLMon &lt;A href="http://support.microsoft.com/default.aspx/kb/259493" mce_href="http://support.microsoft.com/default.aspx/kb/259493"&gt;does not permit&lt;/A&gt; users to add all sites in a given public-suffix to a security zone. &lt;/P&gt;
&lt;P&gt;We are aware that there are scenarios where such assignments may be desirable to some organizations (e.g. perhaps I would like to assign *.mil to the Trusted Sites Zone).&lt;/P&gt;
&lt;H5&gt;6. Security Zones – Automatic Zone Determination&lt;/H5&gt;
&lt;P&gt;URLMon (subject to &lt;A href="http://blogs.msdn.com/ie/archive/2005/12/07/501075.aspx" mce_href="http://blogs.msdn.com/ie/archive/2005/12/07/501075.aspx"&gt;some caveats&lt;/A&gt;) is configured by default to &lt;A href="http://msdn.microsoft.com/en-us/library/bb250483(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb250483(VS.85).aspx"&gt;map&lt;/A&gt; plainhostnames to the Intranet zone. &lt;/P&gt;
&lt;H5&gt;7. Per-site ActiveX&lt;/H5&gt;
&lt;P&gt;When the user uses the Information Bar to allow an ActiveX control to run, Internet Explorer 8’s &lt;A href="http://msdn.microsoft.com/en-us/library/dd433050(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd433050(VS.85).aspx"&gt;Per-Site ActiveX feature&lt;/A&gt; adds the current Private Domain to the Allow list for that control.&lt;/P&gt;
&lt;H5&gt;8. Compatibility View&lt;/H5&gt;
&lt;P&gt;Internet Explorer 8’s &lt;A href="http://blogs.msdn.com/ie/archive/2008/08/27/introducing-compatibility-view.aspx" mce_href="http://blogs.msdn.com/ie/archive/2008/08/27/introducing-compatibility-view.aspx"&gt;Compatibility View button&lt;/A&gt; adds the current Private Domain to the compatibility view list. &lt;/P&gt;
&lt;H5&gt;9. XSS Filter&lt;/H5&gt;
&lt;P&gt;IE8’s &lt;A href="http://blogs.msdn.com/ie/archive/2008/07/01/ie8-security-part-iv-the-xss-filter.aspx" mce_href="http://blogs.msdn.com/ie/archive/2008/07/01/ie8-security-part-iv-the-xss-filter.aspx"&gt;XSS Filter&lt;/A&gt; uses the Private Domain to determine whether a given navigation crosses from one Private Domain to another. &lt;/P&gt;
&lt;H5&gt;10. InPrivate Filtering&lt;/H5&gt;
&lt;P&gt;IE8’s &lt;A href="http://community.winsupersite.com/blogs/paul/archive/2009/04/03/ie8-ad-blocking-with-the-inprivate-filter.aspx" mce_href="http://community.winsupersite.com/blogs/paul/archive/2009/04/03/ie8-ad-blocking-with-the-inprivate-filter.aspx"&gt;InPrivate Filtering&lt;/A&gt; feature uses Private Domain information to help determine whether a given request is being sent to a 3rd party site.&lt;/P&gt;
&lt;H5&gt;11. Preserve Favorite Website Data&lt;/H5&gt;
&lt;P&gt;IE8’s Delete Browsing History feature includes a new “Preserve Favorites website data” option. As I described back in &lt;A href="http://blogs.msdn.com/ieinternals/archive/2009/06/30/IE8-Privacy-APIs-for-Addons.aspx" mce_href="http://blogs.msdn.com/ieinternals/archive/2009/06/30/IE8-Privacy-APIs-for-Addons.aspx"&gt;this post from June&lt;/A&gt;, this feature relies on the Private Domain to help determine whether stored data is related to one of the user’s favorite websites. &lt;/P&gt;
&lt;H2&gt;The Challenge of ccTLDs&lt;/H2&gt;
&lt;P&gt;In the early days of the web, most ccTLDs were organized in such a way that it was relatively easy to heuristically determine the Public Suffix of any FQDN. Over time, however, different ccTLDs decided that they wanted to create new Public Suffixes within their ccTLD, or decided to allow registration of Private Domains that the heuristics would incorrectly treat as Public Suffixes. Some nations (like &lt;A href="http://en.wikipedia.org/wiki/Tuvalu" mce_href="http://en.wikipedia.org/wiki/Tuvalu"&gt;Tuvalu&lt;/A&gt;) have outsourced registration of subdomains and allow anyone to obtain Private Domains within their ccTLD (&lt;A href="http://www.verisign.tv/" mce_href="http://www.verisign.tv/"&gt;.TV&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;Prior to IE8, there was no one codepath in IE where the Private Domain was calculated, so over time several point-fixes were made to liberalize &lt;A href="http://support.microsoft.com/kb/310676" mce_href="http://support.microsoft.com/kb/310676"&gt;cookie setting in certain ccTLDs&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;The heuristic Private Domain determination algorithm in IE5+ is: &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#008040 size=1&gt;1&amp;gt; If the final label is empty, drop it for the purposes of this algorithm&amp;nbsp; &lt;BR&gt;&lt;FONT color=#808080&gt;Otherwise "www.example.com." would have four labels "www", "example", "com", "".&amp;nbsp; Instead, we drop the final label.&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008040 size=1&gt;2&amp;gt; Name the labels Ln,...,L3,L2,L1; decreasing from start (Leftmost=Ln) to finish (Rightmost=L1).&amp;nbsp; &lt;BR&gt;&lt;FONT color=#808080&gt;If at any point in this algorithm the result demands &amp;gt;n labels, getPrivateDomain returns "". &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008040 size=1&gt;3&amp;gt; Check n &amp;gt; 1.&amp;nbsp; If not, there's no PublicSuffix, just a plainhostname. Return ""; exit.&amp;nbsp; &lt;BR&gt;&lt;FONT color=#808080&gt;Dotless FQDNs consist of a host only, there is no domain. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008040 size=1&gt;4&amp;gt; Check L1 == "tv".&amp;nbsp; If so, getPrivateDomain returns L2.L1; exit.&amp;nbsp; &lt;BR&gt;&lt;FONT color=#808080&gt;"tv" is a special-case "completely flat" ccTLD for historical reasons.&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008040 size=1&gt;5&amp;gt; Check Len(L1) &amp;gt; 2.&amp;nbsp; If so, getPrivateDomain returns L2.L1; exit.&amp;nbsp; &lt;BR&gt;&lt;FONT color=#808080&gt;Len(L1)&amp;gt;2 suggests L1 is a gTLD rather than a ccTLD.&amp;nbsp; &lt;BR&gt;If Len(L1)&amp;lt;=2 we assume L1 is a part of a ccTLD.&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008040 size=1&gt;6&amp;gt; Check if L2 in gTLD list "com,edu,net,org,gov,mil,int".&amp;nbsp; If so, getPrivateDomain returns L3.L2.L1; exit.&amp;nbsp; &lt;BR&gt;&lt;FONT color=#808080&gt;gTLDs, when they appear immediately left of a ccTLD (modulo exception in step 4), are considered a part of the Public Suffix.&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008040 size=1&gt;7&amp;gt; If L1 is in the list "GR,PL" AND L2 is NOT in the gTLD list, getPrivateDomain returns L2.L1; exit.&amp;nbsp; &lt;BR&gt;&lt;FONT color=#808080&gt;GR and PL are considered "flat" ccTLDs EXCEPT when a gTLD appears in L2.&amp;nbsp; &lt;BR&gt;getPrivateDomain("a.pl") returns "a.pl"&amp;nbsp; &lt;BR&gt;getPrivateDomain("a.uk") returns ""&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008040 size=1&gt;8&amp;gt; If Len(L2) &amp;lt; 3 getPrivateDomain returns L3.L2.L1; exit.&amp;nbsp; &lt;BR&gt;&lt;FONT color=#808080&gt;getPrivateDomain("aa.bb.cc") returns "aa.bb.cc"&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#008040&gt;9&amp;gt; Otherwise, getPrivateDomain returns L2.L1&amp;nbsp; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#808080&gt;getPrivateDomain("aa.bbb.cc") returns "bbb.cc" &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;While this heuristic worked pretty well for many years (and still works reasonably well in general) it clearly was becoming increasingly complicated due to the fact that each ccTLD established different operating practices (and those, in turn, changed over time).&lt;/P&gt;
&lt;H2&gt;Changes in Internet Explorer 8&lt;/H2&gt;
&lt;P&gt;For IE8, we’ve updated major codepaths to use CURI’s Uri_PROPERTY_DOMAIN for Private Domain determination, helping to ensure consistency throughout the various browser components. &lt;/P&gt;
&lt;P&gt;IE8's version of URLMon maintains a list of special-cases which are used as exceptions to the default heuristics that CURI uses. You can click &lt;A href="res://urlmon.dll/ietldlist.xml" mce_href="res://urlmon.dll/ietldlist.xml"&gt;this link&lt;/A&gt; to view the list&amp;nbsp;maintained as an XML resource inside URLMon.dll. The list contains elements which should be treated as Public Suffixes (the XML nodes named “tld”) and elements which should be treated as private domains (the XML nodes named “domain”).&lt;/P&gt;
&lt;P&gt;From a browser architecture perspective, lists like this one are the option of last resort, for a number of important reasons. However, there’s no currently no standard that promises relief. One proposal which has been discussed in a few forums is to allow the DNS itself to indicate (via a new record) which names are part of a Public Suffix and which are part of a Private Domain, but that approach is &lt;A href="http://www.mail-archive.com/dnsop@ietf.org/msg01002.html" mce_href="http://www.mail-archive.com/dnsop@ietf.org/msg01002.html"&gt;not without problems&lt;/A&gt;.&lt;/P&gt;
&lt;H2&gt;The (Coming) Challenges with gTLDS&lt;/H2&gt;
&lt;P&gt;ICANN &lt;A href="http://news.bbc.co.uk/2/hi/technology/7475986.stm" mce_href="http://news.bbc.co.uk/2/hi/technology/7475986.stm"&gt;recently voted&lt;/A&gt; to allow organizations to create new generic TLDs. Introduction of new gTLDs may introduce additional problems, because previously most of the “special cases” were found only in ccTLDs. Other parties (like Certificate Authorities) would also likely be significantly impacted by this liberalization of gTLDs.&lt;/P&gt;
&lt;P&gt;As this area is still developing, it will likely be the topic of a future post.&lt;/P&gt;
&lt;P&gt;Until then…&lt;/P&gt;
&lt;P&gt;-Eric &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9897015" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ieinternals/archive/tags/design/default.aspx">design</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/standards/default.aspx">standards</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/ie8/default.aspx">ie8</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/cookies/default.aspx">cookies</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/webdev/default.aspx">webdev</category></item><item><title>Two New Tools Available from the SDL Team</title><link>http://blogs.msdn.com/ieinternals/archive/2009/09/18/BinScope-and-MiniFuzz-Released-by-the-SDL-Team.aspx</link><pubDate>Fri, 18 Sep 2009 04:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9896606</guid><dc:creator>EricLaw</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/ieinternals/comments/9896606.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ieinternals/commentrss.aspx?PostID=9896606</wfw:commentRss><description>&lt;P&gt;Yesterday, IE Team alumnus Jeremy Dallman posted over on the Security Development Lifecycle team’s blog, announcing the &lt;A href="http://blogs.msdn.com/sdl/archive/2009/09/16/two-new-security-tools-for-your-sdl-tool-belt-bonus-a-7-easy-steps-whitepaper.aspx" mce_href="http://blogs.msdn.com/sdl/archive/2009/09/16/two-new-security-tools-for-your-sdl-tool-belt-bonus-a-7-easy-steps-whitepaper.aspx"&gt;release of BinScope and MiniFuzz&lt;/A&gt;. These two tools are part of the toolset that the Internet Explorer team uses to help verify the security of our product code. &lt;/P&gt;
&lt;P&gt;If you’re building an Internet Explorer add-on (or any other product really), they’re great (free) additions to your toolbox to help ensure that the bad guys can’t abuse your code. The SDL team also posted two demo videos (&lt;A href="http://edge.technet.com/Media/binscope-overview-and-demo/" mce_href="http://edge.technet.com/Media/binscope-overview-and-demo/"&gt;BinScope video&lt;/A&gt; &amp;amp; &lt;A href="http://edge.technet.com/Media/minifuzz-overview-and-demo/" mce_href="http://edge.technet.com/Media/minifuzz-overview-and-demo/"&gt;MiniFuzz video&lt;/A&gt;) explaining the tools, and a &lt;A href="http://go.microsoft.com/?linkid=9683340" mce_href="http://go.microsoft.com/?linkid=9683340"&gt;whitepaper&lt;/A&gt; on how to integrate the SDL into an existing VSTS project.&lt;/P&gt;
&lt;P&gt;-Eric&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9896606" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ieinternals/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/Best-Practices/default.aspx">Best-Practices</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/dev/default.aspx">dev</category></item><item><title>Preventing Automatic Hyperlinking in ContentEditable HTML</title><link>http://blogs.msdn.com/ieinternals/archive/2009/09/17/Prevent-Automatic-Hyperlinking-in-ContentEditable-HTML.aspx</link><pubDate>Thu, 17 Sep 2009 20:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9896414</guid><dc:creator>EricLaw</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/ieinternals/comments/9896414.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ieinternals/commentrss.aspx?PostID=9896414</wfw:commentRss><description>&lt;P&gt;&lt;EM&gt;Today, a question from the mail bag…&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Q: Is there a way to stop IE from “auto-magically” recognizing and creating hyperlinks inside HTML?&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;First, a bit of context. Web developers can use the &lt;A href="http://msdn.microsoft.com/en-us/library/ms537837(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms537837(VS.85).aspx"&gt;ContentEditable&lt;/A&gt; property to allow users to edit part of a HTML page. This mechanism is often used to allow users to edit “rich text” when composing a blog post, comment, or HTML email. Similarly, Client Application developers can use the same property when hosting the Web Browser Control (WebOC), again for similar purposes.&lt;/P&gt;
&lt;P&gt;However, you’ll notice that if you type text that looks like a hyperlink (e.g. http://example or a@example) into the editable HTML region, the web browser will automatically convert that text into an active hyperlink. In many cases, this automatic conversion is desirable, but in some cases it may not be.&lt;/P&gt;
&lt;P&gt;Client Application developers can call IOleCommandTarget::Exec, passing &lt;A href="http://msdn.microsoft.com/en-us/library/aa769893%28VS.85%29.aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa769893%28VS.85%29.aspx"&gt;IDM_AUTOURLDETECT_MODE&lt;/A&gt; and a boolean value specifying whether or not automatic detection should occur. Unfortunately, this command ID is not mapped to a &lt;A href="http://msdn.microsoft.com/en-us/library/ms533049(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms533049(VS.85).aspx"&gt;command identifier string&lt;/A&gt; which can be used when calling &lt;A href="http://msdn.microsoft.com/en-us/library/ms536419(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms536419(VS.85).aspx"&gt;document.ExecCommand()&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;This means that, unfortunately, current versions of IE do not offer a way to disable automatic hyperlink recognition from script in the page. There’s no great workaround for this. Some web developers have pointed out that script may execCommand(&lt;A href="http://msdn.microsoft.com/en-us/library/ms537431(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms537431(VS.85).aspx"&gt;Unlink&lt;/A&gt;) to remove all hyperlinks from the current selection, but this may not be desirable for all scenarios.&lt;/P&gt;
&lt;P&gt;-Eric&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9896414" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ieinternals/archive/tags/Q_2600_amp_3B00_A/default.aspx">Q&amp;amp;A</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/limitations/default.aspx">limitations</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/hosting/default.aspx">hosting</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/dev/default.aspx">dev</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/webdev/default.aspx">webdev</category></item><item><title>The Mystery of the Forgetful Browser Settings</title><link>http://blogs.msdn.com/ieinternals/archive/2009/09/16/Outdated-Norton-360-Disables-SmartScreen-Filter.aspx</link><pubDate>Wed, 16 Sep 2009 19:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9886394</guid><dc:creator>EricLaw</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/ieinternals/comments/9886394.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ieinternals/commentrss.aspx?PostID=9886394</wfw:commentRss><description>&lt;P&gt;A friend recently wrote to me, alarmed that the SmartScreen Filter feature was constantly turning off on his laptop with IE8. Despite manually re-enabling the feature using the Safety menu multiple times per hour, it was mysteriously and repeatedly turned off without any action on his part. &lt;/P&gt;
&lt;P&gt;He was worried for two reasons: first, because he wanted to benefit from the &lt;A href="http://blogs.msdn.com/ie/archive/2009/08/13/real-world-protection-with-ie8-s-smartscreen-filter.aspx" mce_href="http://blogs.msdn.com/ie/archive/2009/08/13/real-world-protection-with-ie8-s-smartscreen-filter.aspx"&gt;great protection&lt;/A&gt; provided by SmartScreen’s anti-malware feature, and second, because he feared that perhaps he was already infected by malware and that it was turning off SmartScreen. I suggested that it wasn’t likely that a malware infection was disabling SmartScreen—if his machine was &lt;EM&gt;already&lt;/EM&gt; infected by malware, the attacker need not bother trying to socially-engineer him into installing &lt;EM&gt;additional &lt;/EM&gt;malicious code.&lt;/P&gt;
&lt;P&gt;Fortunately, he was willing to let me have a quick look at his laptop to figure out what was going on. &lt;A href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx" mce_href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx"&gt;Process Monitor&lt;/A&gt; is a great tool for hunting down more than &lt;A title="Unshackling IE8 Performance" href="http://blogs.msdn.com/ieinternals/archive/2009/07/20/IE8-Performance-and-Speed-Tips.aspx" mce_href="http://blogs.msdn.com/ieinternals/archive/2009/07/20/IE8-Performance-and-Speed-Tips.aspx"&gt;performance bottlenecks&lt;/A&gt;— it’s also easily used to watch for unexpected changes in Internet Explorer’s registry settings.&lt;/P&gt;
&lt;P&gt;As it turns out, I happened to know that SmartScreen’s state is controlled by a registry key named &lt;STRONG&gt;EnabledV8&lt;/STRONG&gt;, but using ProcMon’s filters to watch registry keys containing the word “phishing” would have worked just as well. After re-enabling SmartScreen and restarting the browser, ProcMon reported the following reads and writes to the EnabledV8 key: &lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;IMG alt="EnabledV8 registry key reads and writes" src="http://www.enhanceie.com/images/blog/EnabledV8.png" mce_src="http://www.enhanceie.com/images/blog/EnabledV8.png"&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As you can plainly see, IE initially &lt;EM&gt;reads&lt;/EM&gt; the SmartScreen state as enabled (“1”) but shortly afterwards, a different process comes along and &lt;EM&gt;writes&lt;/EM&gt; the value “0” to the key, disabling SmartScreen.&amp;nbsp; But what is ccSvcHst.exe?&lt;/P&gt;
&lt;P&gt;Double-clicking on the first &lt;STRONG&gt;RegSetValue&lt;/STRONG&gt; operation opens the &lt;STRONG&gt;Event Properties&lt;/STRONG&gt; dialog, where we can see details about the event. By clicking on the &lt;STRONG&gt;Process&lt;/STRONG&gt; tab, we easily can learn more about the ccSvcHst.exe process:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;IMG alt="Norton360 Process" src="http://www.enhanceie.com/images/blog/NortonService.png" mce_src="http://www.enhanceie.com/images/blog/NortonService.png"&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It turns out that this version of Norton 360 intentionally disables IE8’s SmartScreen Filter. Looking around the Norton control panel, I wasn’t able to find anywhere to turn off this behavior. I did notice that the control panel offered an “Anti-Phishing” checkbox. Experimentation revealed that when you use this checkbox to disable Norton’s phishing filter, Norton does not automatically re-enable SmartScreen Filter. However, with Norton’s filter disabled, the Norton 360 service stops repeatedly disabling SmartScreen.&amp;nbsp; If you uncheck the checkbox in the Norton control panel, and manually re-enable SmartScreen, your protection from phishing and malware sites resumes without further interruption. &lt;/P&gt;
&lt;P&gt;(&lt;STRONG&gt;Update: &lt;/STRONG&gt;Symantec has changed the SmartScreen-disabling behavior in updated versions of the Norton 360 product.)&lt;/P&gt;
&lt;P&gt;While this wasn’t one of the &lt;A href="http://blogs.msdn.com/ie/archive/2005/03/12/394526.aspx" mce_href="http://blogs.msdn.com/ie/archive/2005/03/12/394526.aspx"&gt;harder cases&lt;/A&gt; I’ve been asked solve, the moral of the story is clear: using the right tools takes most of the &lt;EM&gt;work &lt;/EM&gt;out of detective work.&lt;/P&gt;
&lt;P&gt;Until next time,&lt;/P&gt;
&lt;P&gt;Eric Lawrence&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9886394" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ieinternals/archive/tags/user-choice/default.aspx">user-choice</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/phishing/default.aspx">phishing</category></item><item><title>HTML5 Implementation Issues in IE8</title><link>http://blogs.msdn.com/ieinternals/archive/2009/09/16/Bugs-in-IE8-support-for-HTML5-postMessage-sessionStorage-and-localStorage.aspx</link><pubDate>Wed, 16 Sep 2009 02:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9895641</guid><dc:creator>EricLaw</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/ieinternals/comments/9895641.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ieinternals/commentrss.aspx?PostID=9895641</wfw:commentRss><description>&lt;P&gt;&lt;EM&gt;IE8 introduced&amp;nbsp;support for some of the more stable features in the HTML5 spec. However,&amp;nbsp;web developers have reported some problematic scenarios in IE8's support for these features, as described below.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;1. postMessage only works for IFRAMES/FRAMES&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The HTML5&amp;nbsp;&lt;A href="http://msdn.microsoft.com/en-us/library/cc197015(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc197015(VS.85).aspx"&gt;postMessage&lt;/A&gt; function provides a great way for mutually distrusting&amp;nbsp;documents (&lt;A href="http://msdn.microsoft.com/en-us/library/cc197015(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc197015(VS.85).aspx"&gt;even cross-domain&lt;/A&gt;) to communicate securely and with high performance and reliability. Unfortunately, as reported on &lt;A href="http://connect.microsoft.com/IE/feedback/ViewFeedback.aspx?FeedbackID=423112" mce_href="http://connect.microsoft.com/IE/feedback/ViewFeedback.aspx?FeedbackID=423112"&gt;Connect&lt;/A&gt;, the HTML5 postMessage function&amp;nbsp;does not work &lt;EM&gt;between&lt;/EM&gt; tabs/windows in IE8. &lt;/P&gt;
&lt;P&gt;Attempting to send a message to a different window or tab results in&amp;nbsp;an exception with the text&amp;nbsp;"&lt;STRONG&gt;Error: No such interface supported&lt;/STRONG&gt;."&amp;nbsp;You can test for this problem at the following &lt;A href="http://www.debugtheweb.com/test/xdm/origin/" mce_href="http://www.debugtheweb.com/test/xdm/origin/"&gt;test page&lt;/A&gt;. Click the &lt;STRONG&gt;Create Popup &lt;/STRONG&gt;button and then in the popup window, click the &lt;STRONG&gt;Call postMessage directly&lt;/STRONG&gt; button to attempt to send a message to the subframe from the popup window. In IE8, this demo will fail and the script will display the exception.&lt;/P&gt;
&lt;P&gt;The test page demonstrates one case where there is a&amp;nbsp;workaround for this problem. If the popup window instead calls a script function in its&amp;nbsp;window.opener page (click the &lt;STRONG&gt;Call opener's proxy function &lt;/STRONG&gt;button), &lt;EM&gt;that&lt;/EM&gt; script function can call postMessage&amp;nbsp;to send a message to the child frame. Unfortunately, this workaround often isn't possible, because same-origin-policy dictates&amp;nbsp;that the popup window and the window.opener page must be from the same origin in order&amp;nbsp;to call each other's script functions.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;2. sessionStorage isn't properly shared between child frames&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;By design, the HTML5 &lt;A href="http://msdn.microsoft.com/en-us/library/cc197062%28VS.85%29.aspx#_session" mce_href="http://msdn.microsoft.com/en-us/library/cc197062%28VS.85%29.aspx#_session"&gt;sessionStorage&lt;/A&gt; feature is designed such that even tabs within the same browser session have independent sessionStorage objects.&amp;nbsp; If you change a sessionStorage attribute’s value in one tab, that change should not be reflected within another tab, even within the same browser session.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, sessionStorage is intended to be&amp;nbsp;isolated&lt;EM&gt; per top-level-browsing-context&lt;/EM&gt;, meaning that a page and any subframes on that page are intended to share sessionStorage values.&amp;nbsp;IE8 does not reliably share sessionStorage objects between frames on a page. &lt;/P&gt;
&lt;P&gt;A &lt;A href="http://www.enhanceie.com/test/sessions/frames.asp" mce_href="http://www.enhanceie.com/test/sessions/frames.asp"&gt;test page&lt;/A&gt;&amp;nbsp;demonstrates this problem.&amp;nbsp;Choosing&amp;nbsp;a color from&amp;nbsp;any of the three select controls on the page does the following:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Sets a cookie named &lt;EM&gt;sessionColor&lt;/EM&gt;&amp;nbsp;containing the color name&lt;/LI&gt;
&lt;LI&gt;Sets a sessionStorage property named &lt;EM&gt;sessionColor &lt;/EM&gt;to the color name&lt;/LI&gt;
&lt;LI&gt;Sets a localStorage property named &lt;EM&gt;sessionColor &lt;/EM&gt;to the color name&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;A timer runs in each frame.&amp;nbsp; Every 500 milliseconds, the timer does the following:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Changes the background color of the frame to the color specified in the cookie.&lt;/LI&gt;
&lt;LI&gt;Updates the display of the current localStorage.sessionColor value&lt;/LI&gt;
&lt;LI&gt;Updates the display of the current sessionStorage.sessionColor value&lt;/LI&gt;
&lt;LI&gt;Updates the Current time value&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;When interacting with the demo in IE8, you will likely notice that while the cookie/backcolor changes properly across the frames, often one or more of the sessionStorage values are not properly updated.&lt;/P&gt;
&lt;P&gt;Unfortunately, there's no trivial workaround for this problem;&amp;nbsp;a page can use the&amp;nbsp;postMessage function to push state changes between frames, but this is somewhat more complex than simply querying the value of properties on the sessionStorage object.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3.&lt;EM&gt; Changes to localStorage values are not reflected across active tabs/processes&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In contrast to sessionStorage, &lt;A href="http://dev.w3.org/html5/webstorage/#the-localstorage-attribute" mce_href="http://dev.w3.org/html5/webstorage/#the-localstorage-attribute"&gt;localStorage&lt;/A&gt; is meant to be shared across all browser instances, much like a persistent cookie. However, Internet Explorer's &lt;A href="http://blogs.msdn.com/ie/archive/2009/05/06/session-cookies-sessionstorage-and-ie8.aspx" mce_href="http://blogs.msdn.com/ie/archive/2009/05/06/session-cookies-sessionstorage-and-ie8.aspx"&gt;new session command&lt;/A&gt;&amp;nbsp;does not properly interact with localStorage, so new browser&amp;nbsp;sessions do not properly share localStorage information with other instances.&lt;/P&gt;
&lt;P&gt;Using the same &lt;A href="http://www.enhanceie.com/test/sessions/frames.asp" mce_href="http://www.enhanceie.com/test/sessions/frames.asp"&gt;test page&lt;/A&gt;&amp;nbsp;as in the previous example, change the localStorage session color to, say, blue.&amp;nbsp;Then, use &lt;STRONG&gt;File &lt;/STRONG&gt;&amp;gt; &lt;STRONG&gt;New Session &lt;/STRONG&gt;to open a new browser session.&amp;nbsp;Navigate that new window to the test page, and observe that while the background color of the page is properly reset (because session cookies &lt;EM&gt;are &lt;/EM&gt;isolated by session) the localStorage value is &lt;EM&gt;improperly &lt;/EM&gt;reset.&amp;nbsp;You will notice that changing the localStorage values in the new session does not impact the local storage values of the prior session. Such isolation is not intended.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A Caveat about InPrivate Browsing&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Note that scenarios #2 and #3 &lt;EM&gt;intentionally &lt;/EM&gt;have somewhat different isolation&amp;nbsp;behaviors when browsing with&amp;nbsp;an InPrivate Browsing session instance. InPrivate Browsing sessions are&amp;nbsp;&lt;EM&gt;intentionally &lt;/EM&gt;isolated, and&amp;nbsp;cookies and storage values intentionally start blank and are intentionally cleared at the end of the browser session.&lt;/P&gt;
&lt;P&gt;-Eric Lawrence&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Appendix&lt;BR&gt;&lt;/STRONG&gt;&lt;EM&gt;Cross-browser remarks&lt;/EM&gt;: Firefox 3.5.3 and Safari 4.0.2&amp;nbsp;had no problem with scenarios&amp;nbsp;#2, #3. Opera 10 and Chrome 3.0.195.21 could not complete the test because they do not support the storage objects. When using the "Private Browsing" feature, Safari throws a "Quota exceeded"&amp;nbsp;exception when trying to use the storage objects. None of these browsers had problems with scenario #1.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9895641" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ieinternals/archive/tags/limitations/default.aspx">limitations</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/standards/default.aspx">standards</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/bugs/default.aspx">bugs</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/webdev/default.aspx">webdev</category></item><item><title>Welcome to Security Theater...</title><link>http://blogs.msdn.com/ieinternals/archive/2009/09/15/9895460.aspx</link><pubDate>Tue, 15 Sep 2009 19:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9895460</guid><dc:creator>EricLaw</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/ieinternals/comments/9895460.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ieinternals/commentrss.aspx?PostID=9895460</wfw:commentRss><description>&lt;P&gt;From the &lt;EM&gt;things that make you go hmm....&lt;/EM&gt; department:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;http://personal.fidelity.com/misc/buffers/coming-soon-identity.shtml.cvsr&lt;BR&gt;&lt;EM&gt;Choose a question like “In what city was your high school?” then enter the answer. This kind of information gives us a way to identify you that someone else won’t know or be able to fake.&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In &lt;EM&gt;this &lt;/EM&gt;century, I find the claim that this "&lt;EM&gt;significantly improves your online security&lt;/EM&gt;" rather dubious. In the pre-2000 days before social networks&amp;nbsp;and massive free databases, maybe this might have been more useful.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9895460" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ieinternals/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/rants/default.aspx">rants</category><category domain="http://blogs.msdn.com/ieinternals/archive/tags/phishing/default.aspx">phishing</category></item></channel></rss>